public void OperateReconnectGameData(ReConnectDataResp mReConnectDataResp) { if (mReConnectDataResp != null) { if (!mReConnectDataResp.Actions.IsNullOrEmpty()) { mReConnectDataResp.Actions.ForEach(p => mUIGameModel.HandleGameAction(p)); } if (!mReConnectDataResp.Players.IsNullOrEmpty()) { mReConnectDataResp.Players.ForEach(p => { if (mUIGameModel.GetUser(p.UID) != null) { UserCardModel user = mUIGameModel.getOrAddUserCardModel(getPlayerIndex(p.Order)); if (user != null) { user.setHandCards(p.HandCards); user.setDeskCards(p.DeskCards); if (p.CurCard != null) { user.setTouchCard(p.CurCard); } user.setHandCardGroups(p.HandCardGroups); } } }); } mUIGameModel.RefreshCardInfo(); mUIGameModel.ReconnectGameAction(mReConnectDataResp.LastAction); } }
private void OperateStartTouchCard(MahJongGameAction action) { if (mUserCardModel != null) { mUserCardModel.setHandCards(action.Cards); RefreshHandCards(); } }