void InitPacketCallbacks() { PacketCallbacks.Add(new SPacketCallback() { packet = EControllerPackets.Introduction, callback = PacketIntroductionResponse }); PacketCallbacks.Add(new SPacketCallback() { packet = EControllerPackets.SyncData, callback = PacketDataSyncResponse }); }
void InitPacketCallbacks() { //Client PacketCallbacks.Add(new SPacketCallback() { ConnectionType = EConnectionType.Client, Packet = (byte)EClientPackets.Introduction, OnPacketCallback = OnClientIntroductionCallback }); PacketCallbacks.Add(new SPacketCallback() { ConnectionType = EConnectionType.Client, Packet = (byte)EClientPackets.Session, OnPacketCallback = OnClientSessionCallback }); //Controller PacketCallbacks.Add(new SPacketCallback() { ConnectionType = EConnectionType.Controller, Packet = (byte)EControllerPackets.Introduction, OnPacketCallback = OnControllerIntroductionCallback }); PacketCallbacks.Add(new SPacketCallback() { ConnectionType = EConnectionType.Controller, Packet = (byte)EControllerPackets.Session, OnPacketCallback = OnControllerSessionCallback }); }