public void Sync(GameProto.GameNotifyPlayerNextTetris oTetris) { if (m_oNextTetris == null) { m_oNextTetris = new Tetris(); } m_oNextTetris.Init(oTetris.NextTetris); SampleDebuger.LogGreen(string.Format("next tetris [{0},{1}]", oTetris.NextTetris.DwTetrisShape, oTetris.NextTetris.DwTetrisDirect)); m_bNeedRefresh = true; }
public void OnGameNotifyPlayerNextTetris(byte[] pBuf) { GameProto.GameNotifyPlayerNextTetris oRet = GameProto.GameNotifyPlayerNextTetris.Parser.ParseFrom(pBuf); if (oRet == null) { SampleDebuger.LogYellow("GameNotifyPlayerNextTetris error parse"); return; } TetrisData pTetrisData = TetrisDataManager.Instance().GetTetrisData(oRet.DwPlayerId); if (pTetrisData == null) { SampleDebuger.LogYellow("can't find tetris data player id : " + oRet.DwPlayerId.ToString()); return; } pTetrisData.Sync(oRet); }