void FixedUpdate() { if (this.m_IsBattleStart) { int currentTick = TimeTickRecorder.Instance.CurrentTimeTick - this.m_MatchStartTick; if (currentTick == this.m_TotalMatchTick) { this.EndMatch(); } } else if (this.m_IsBattleObserve) { int currentTick = TimeTickRecorder.Instance.CurrentTimeTick - this.m_MatchObserveStartTick; if (currentTick >= this.m_TotalObserveTick) { this.StartBattle(); } } if (this.m_EndBattle) { if (this.m_IsBattleStart) { this.m_Summary.Summary(); this.m_IsBattleStart = false; FinishMatchRequestParameter request = new FinishMatchRequestParameter(); request.MatchFinishTime = TimeTickRecorder.Instance.CurrentTimeTick - this.m_MatchStartTick; CommunicationUtility.Instance.GetMatchID(request, this, "GetMatchID", true); if (BattleData.IsNewbie) { this.GetMatchID(null); BattleData.IsNewbie = false; } } else { LockScreen.Instance.DisableInput(); this.m_IsBattleObserve = false; this.m_Cloud.FadeIn(); CommunicationUtility.Instance.FinishObserve(); this.StartCoroutine("Wait"); } this.m_EndBattle = false; } }
public void GetMatchID(FinishMatchRequestParameter parameter, Component receiver, string methodName, bool isListenOnce) { this.CommunicateWithServer(receiver, methodName, isListenOnce, parameter.GetHashtableFromParameter(), ClientCommandConsts.FINISH_MATCH_COMMAND, ServerCommandConsts.ATTACK_LOG_RESPONSE); }