/// <summary> /// 推送结算 /// </summary> public static void G2C_Result(DdzJieSuanResp result) { LandlordsModel.Instance.IsInFight = false; DdzJieSuanInfo juesuanInfo = result.jieSuanInfo; //yield return new WaitForSecondsRealtime(0.1f); LandlordsModel.Instance.ResultModel.zd = result.jieSuanInfo.zdbs; LandlordsModel.Instance.ResultModel.jdz = result.jieSuanInfo.dzbs; LandlordsModel.Instance.ResultModel.ct = result.jieSuanInfo.ct ? 2 : 0; LandlordsModel.Instance.ResultModel.fct = result.jieSuanInfo.fc ? 2 : 0; for (int i = 0; i < juesuanInfo.playerInfo.Count; i++) { DdzJSPlayerInfo playerIcom = juesuanInfo.playerInfo[i]; LandlordsModel.Instance.ResultModel.Add(playerIcom); if (playerIcom.income > 0) { LandlordsModel.Instance.CurWinerIds.Add(playerIcom.userId); } if (LandlordsModel.Instance.RoomModel.CurRoomInfo.IsMatch) { LandlordsModel.Instance.RoomPlayerHands.Find(p => p.playerInfo.uid == juesuanInfo.playerInfo[i].userId.ToString()).MatchScore += juesuanInfo.playerInfo[i].income; } else if (LandlordsModel.Instance.RoomModel.CurRoomInfo.RoomType == RoomType.RoomCard) { LandlordsModel.Instance.RoomPlayerHands.Find(p => p.playerInfo.uid == juesuanInfo.playerInfo[i].userId.ToString()).playerInfo.score += juesuanInfo.playerInfo[i].income; } else { LandlordsModel.Instance.RoomPlayerHands.Find(p => p.playerInfo.uid == juesuanInfo.playerInfo[i].userId.ToString()).playerInfo.money = juesuanInfo.playerInfo[i].coin; } } LandlordsModel.Instance.ResultModel.curJs = result.jieSuanInfo.currJs; LandlordsModel.Instance.ResultModel.allJs = result.jieSuanInfo.totalJs; float delay = 0; if (LandlordsModel.Instance.RoomModel.CurRoomInfo.RoomType != RoomType.Match) { delay = 1.5f; } else { delay = 0; } SetTimeout.add(delay, () => { CheckIsChuntianOrReverse(juesuanInfo); //总显示 LandlordsPage.Instance.GameOver(); }); }
/// <summary> /// 检查春天反春天 /// </summary> static void CheckIsChuntianOrReverse(DdzJieSuanInfo result) { //反春天 if (result.fc) { LandlordsPage.Instance.Multiples *= 2; NodeManager.OpenNode <LandlordsEffectNode>(null, null, false).Inits(LandlordsEventAniType.FanChunTian, 0, 0); } //春天 else if (result.ct) { NodeManager.OpenNode <LandlordsEffectNode>(null, null, false).Inits(LandlordsEventAniType.ChunTian, 0, 0); LandlordsPage.Instance.Multiples *= 2; } }