override public void SetParams(bool is_new, object[] parms) { base.SetParams(is_new, parms); if (parms != null && parms.Length == 1) { EventParamPVPBattleEnd _param = (EventParamPVPBattleEnd)parms[0]; if (_param.end_type == pe_EndBattle.Win) { m_ToggleWin.value = true; m_Star1.SetActive(true); m_Star2.SetActive(true); m_Star3.SetActive(true); m_LabelRankUP.text = _param.rank_up.ToString(); } else { m_ToggleWin.value = false; } m_LabelRank.text = _param.rank.ToString(); } else { throw new System.Exception(string.Format("invalid parms", this.name)); } }
void OnPvpBattleEnd(C2G.PvpEnd packet, C2G.PvpEndAck ack) { _pvp_battle_end_param = new EventParamPVPBattleEnd(); _pvp_battle_end_param.end_type = battleEndType; _pvp_battle_end_param.rank = ack.rank; _pvp_battle_end_param.rank_up = ack.rank_up; if (_pvp_battle_end_param.end_type == pe_EndBattle.Exit) { GameMain.SetBattleMode(eBattleMode.None); } }