public void OnGameNotifyPlayerGameReadyTime(byte[] pBuf) { GameProto.GameNotifyPlayerGameReadyTime oRet = GameProto.GameNotifyPlayerGameReadyTime.Parser.ParseFrom(pBuf); if (oRet == null) { SampleDebuger.LogYellow("GameNotifyPlayerGameReadyTime error parse"); return; } SampleDebuger.Log("game ready time left : " + oRet.DwLeftTime.ToString()); ReadyTime.SetReadyTime(oRet.DwLeftTime); }
public void OnGameNotifyPlayerGameState(byte[] pBuf) { GameProto.GameNotifyPlayerGameState oRet = GameProto.GameNotifyPlayerGameState.Parser.ParseFrom(pBuf); if (oRet == null) { SampleDebuger.LogYellow("OnGameNotifyPlayerGameState error parse"); return; } SampleDebuger.LogBlue("game state : " + oRet.State.ToString()); GameData.Instance().SetGameSceneState(oRet.State); if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != SysUtil.GetScesneNameBySceneState(oRet.State)) { AssetBundleLoader.Instance().LoadLevelAsset(SysUtil.GetScesneNameBySceneState(oRet.State), delegate() { SampleDebuger.LogBlue("game state load level : " + SysUtil.GetScesneNameBySceneState(oRet.State)); } ); } switch (oRet.State) { case GameProto.EGameSceneState.EssNone: break; case GameProto.EGameSceneState.EssPrepare: case GameProto.EGameSceneState.EssGameReady: { } break; case GameProto.EGameSceneState.EssGaming: { ReadyTime.SetGameBegin(); } break; case GameProto.EGameSceneState.EssTransact: { } break; default: { SampleDebuger.LogError("error game state : " + ((uint)(oRet.State)).ToString()); } break; } TetrisData.SetGameSceneState(oRet.State); }
public override int GetHashCode() { int hash = 1; hash ^= playerList_.GetHashCode(); if (RoundOrder != 0) { hash ^= RoundOrder.GetHashCode(); } hash ^= chessSetting_.GetHashCode(); if (RoomId.Length != 0) { hash ^= RoomId.GetHashCode(); } if (ReadyTime != 0) { hash ^= ReadyTime.GetHashCode(); } if (RoundTime != 0) { hash ^= RoundTime.GetHashCode(); } return(hash); }