private void SetEventsHandlers() { ServerPeerHandler.SetEventHandler((byte)GameEvents.SceneObjectAdded, SceneObjectAdded); ServerPeerHandler.SetEventHandler((byte)GameEvents.SceneObjectRemoved, SceneObjectRemoved); ServerPeerHandler.SetEventHandler((byte)GameEvents.SceneObjectsAdded, SceneObjectsAdded); ServerPeerHandler.SetEventHandler((byte)GameEvents.SceneObjectsRemoved, SceneObjectsRemoved); ServerPeerHandler.SetEventHandler((byte)GameEvents.PositionChanged, PositionChanged); ServerPeerHandler.SetEventHandler((byte)GameEvents.PlayerStateChanged, PlayerStateChanged); ServerPeerHandler.SetEventHandler((byte)GameEvents.PlayerAttacked, PlayerAttacked); ServerPeerHandler.SetEventHandler((byte)GameEvents.CharacterAdded, CharacterAdded); ServerPeerHandler.SetEventHandler((byte)GameEvents.CharactersAdded, CharactersAdded); ServerPeerHandler.SetEventHandler((byte)GameEvents.BubbleMessage, BubbleMessageReceived); }
protected override void OnAwake() { base.OnAwake(); ServerPeerHandler.SetEventHandler((byte)ChatEvents.ChatMessage, ChatMessageReceived); }