public new void StartGame() { _sessionManager.SetLocalPlayerState("start_primed", false); starting = true; base.StartGame(); _multiplayerLevelLoader.countdownFinishedEvent -= base.HandleMultiplayerLevelLoaderCountdownFinished; _multiplayerLevelLoader.countdownFinishedEvent += HandleCountdown; }
public void Initialize() { Plugin.Log?.Info("Setting up SessionManager"); MPState.CustomSongsEnabled = Plugin.Config.CustomSongs; _sessionManager.SetLocalPlayerState("modded", true); _sessionManager.SetLocalPlayerState("customsongs", Plugin.Config.CustomSongs); _sessionManager.SetLocalPlayerState("enforcemods", Plugin.Config.EnforceMods); _sessionManager.playerStateChangedEvent += HandlePlayerStateChanged; }
public void Initialize() { Plugin.Log?.Info("Setting up SessionManager"); MPState.CustomSongsEnabled = Plugin.Config.CustomSongs; MPState.FreeModEnabled = Plugin.Config.FreeMod; MPState.HostPickEnabled = Plugin.Config.HostPick; _sessionManager.SetLocalPlayerState("modded", true); _sessionManager.SetLocalPlayerState("customsongs", Plugin.Config.CustomSongs); _sessionManager.SetLocalPlayerState("freemod", Plugin.Config.FreeMod); _sessionManager.connectedEvent += HandleConnected; _sessionManager.playerStateChangedEvent += HandlePlayerStateChanged; }
public void Initialize() { Plugin.Log?.Info("Setting up SessionManager"); _sessionManager.SetLocalPlayerState("modded", true); _sessionManager.SetLocalPlayerState("customsongs", Plugin.Config.CustomSongs); _sessionManager.SetLocalPlayerState("enforcemods", Plugin.Config.EnforceMods); _sessionManager.connectedEvent += delegate() { connectedEvent?.Invoke(); }; _sessionManager.connectionFailedEvent += delegate(ConnectionFailedReason reason) { connectionFailedEvent?.Invoke(reason); }; _sessionManager.playerConnectedEvent += delegate(IConnectedPlayer player) { playerConnectedEvent?.Invoke(player); }; _sessionManager.playerDisconnectedEvent += delegate(IConnectedPlayer player) { playerDisconnectedEvent?.Invoke(player); }; _sessionManager.playerStateChangedEvent += delegate(IConnectedPlayer player) { playerStateChangedEvent?.Invoke(player); }; _sessionManager.disconnectedEvent += delegate(DisconnectedReason reason) { disconnectedEvent?.Invoke(reason); }; }
public void Initialize() { Plugin.Log?.Info("Setting up SessionManager"); _multiplayerSessionManager.RegisterSerializer((MultiplayerSessionManager.MessageType) 4, _packetSerializer); _multiplayerSessionManager.connectedEvent += connectedEvent; _multiplayerSessionManager.connectionFailedEvent += connectionFailedEvent; _multiplayerSessionManager.disconnectedEvent += disconnectedEvent; _multiplayerSessionManager.playerConnectedEvent += HandlePlayerConnected; _multiplayerSessionManager.playerDisconnectedEvent += HandlePlayerDisconnected; _multiplayerSessionManager.playerStateChangedEvent += HandlePlayerStateChanged; _multiplayerSessionManager.SetLocalPlayerState("modded", true); _multiplayerSessionManager.SetLocalPlayerState("customsongs", Plugin.Config.CustomSongs); _multiplayerSessionManager.SetLocalPlayerState("enforcemods", Plugin.Config.EnforceMods); }