protected override void OnRemoteEvent(RemoteEvent evt) { switch (evt.Event) { case RemoteEvent.Evt.Tick: if (Tick != null) { Tick(evt.Error, evt.Get <CommandsBundle>(0)); } break; case RemoteEvent.Evt.Ping: if (Ping != null) { Ping(evt.Error, evt.Get <RTTInfo>(0)); } break; case RemoteEvent.Evt.Pause: if (Paused != null) { Paused(evt.Error, evt.Get <bool>(0)); } break; case RemoteEvent.Evt.ReadyToPlayAll: if (ReadyToPlayAll != null) { ReadyToPlayAll(evt.Error, evt.Get <Player[]>(0), evt.Get <Guid[]>(1), evt.Get <VoxelAbilitiesArray[]>(2), evt.Get <SerializedTaskArray[]>(3), evt.Get <SerializedTaskTemplatesArray[]>(4), evt.Get <AssignmentGroupArray[]>(5), evt.Get <Room>(6)); } break; default: base.OnRemoteEvent(evt); break; } }
protected virtual void OnRemoteEvent(RemoteEvent evt) { switch (evt.Event) { case RemoteEvent.Evt.ChatMessage: if (ChatMessage != null) { ChatMessage(evt.Error, evt.Get <ChatMessage>(0)); } break; } }
protected override void OnRemoteEvent(RemoteEvent evt) { switch (evt.Event) { case RemoteEvent.Evt.JoinedRoom: if (JoinedRoom != null) { JoinedRoom(evt.Error, evt.Get <Guid[]>(0), evt.Get <Room>(1)); } break; case RemoteEvent.Evt.Launched: { string matchServerUrl = evt.Get <string>(0); Dependencies.State.SetValue("Battlehub.VoxelCombat.MatchServerUrl", matchServerUrl); if (Launched != null) { Launched(evt.Error, matchServerUrl); } } break; case RemoteEvent.Evt.LeftRoom: if (LeftRoom != null) { LeftRoom(evt.Error, evt.Get <Guid[]>(0), evt.Get <Room>(1)); } break; case RemoteEvent.Evt.LoggedIn: if (LoggedIn != null) { LoggedIn(evt.Error, evt.Get <Guid>(0)); } break; case RemoteEvent.Evt.LoggedOff: if (LoggedOff != null) { LoggedOff(evt.Error, evt.Get <Guid[]>(0)); } break; case RemoteEvent.Evt.ReadyToLaunch: if (ReadyToLaunch != null) { ReadyToLaunch(evt.Error, evt.Get <Room>(0)); } break; case RemoteEvent.Evt.RoomDestroyed: if (RoomDestroyed != null) { RoomDestroyed(evt.Error); } break; case RemoteEvent.Evt.RoomsListChanged: if (RoomsListChanged != null) { RoomsListChanged(evt.Error); } break; default: base.OnRemoteEvent(evt); break; } }