Table of Contents

Class CustomCommands<CommandEnum>

Namespace
Zorro.PhotonUtility
Assembly
Zorro.PhotonUtility.dll
public static class CustomCommands<CommandEnum> where CommandEnum : struct, IConvertible

Type Parameters

CommandEnum
Inheritance
CustomCommands<CommandEnum>
Inherited Members

Methods

RegisterListener<T>(Action<T>)

public static ListenerHandle RegisterListener<T>(Action<T> onReceived) where T : CustomCommandPackage<CommandEnum>

Parameters

onReceived Action<T>

Returns

ListenerHandle

Type Parameters

T

SendPackage(CustomCommandPackage<CommandEnum>, RaiseEventOptions)

public static bool SendPackage(CustomCommandPackage<CommandEnum> commandPackage, RaiseEventOptions eventOptions)

Parameters

commandPackage CustomCommandPackage<CommandEnum>
eventOptions RaiseEventOptions

Returns

bool

SendPackage(CustomCommandPackage<CommandEnum>, ReceiverGroup)

public static bool SendPackage(CustomCommandPackage<CommandEnum> commandPackage, ReceiverGroup receiverGroup)

Parameters

commandPackage CustomCommandPackage<CommandEnum>
receiverGroup ReceiverGroup

Returns

bool

SpawnCommandListener<T>()

public static T SpawnCommandListener<T>() where T : CustomCommandListener<CommandEnum>

Returns

T

Type Parameters

T

UnregisterListener(ListenerHandle)

public static void UnregisterListener(ListenerHandle handle)

Parameters

handle ListenerHandle