protected override void OnMessage(MessageEventArgs e) { var deviceId = int.Parse(e.Data); Debug.Log("Leave: " + deviceId); WSServerState.RemovePlayer(deviceId); if (GameManagerScript.GameState == 2) { GameManagerScript.ResetServer = true; } }
public static void Leave() { WSClientState.Reset(); if (Init.DebugStandalone) { WSServerState.RemovePlayer(WSConfig.DeviceId); return; } if (_leave == null) { Debug.LogError("Not yet connected"); return; } _leave.Send(WSConfig.DeviceId.ToString()); }