Пример #1
0
 public void EndReplay()
 {
     this._state  = ReplayController.State.None;
     this._inGame = false;
     Task.Clear(ref this._dispatchTask);
     PvpUtils.GoHome();
 }
Пример #2
0
 public void ResetCtrlState()
 {
     this._state = ReplayController.State.None;
     this._isSaveReconnectSyncMsgSuc   = false;
     this._savedReconnectSyncMsg.code  = PvpCode.C2P_QueryInFightInfo;
     this._savedReconnectSyncMsg.time  = 0.001f;
     this._savedReconnectSyncMsg.param = null;
 }
Пример #3
0
 private void OnGameEnd()
 {
     if (this._state == ReplayController.State.Replaying)
     {
         this._state = ReplayController.State.None;
     }
     this._inGame = false;
     Task.Clear(ref this._dispatchTask);
 }
Пример #4
0
 public void StartRecord()
 {
     this._state              = ReplayController.State.Recording;
     this._curReplayId        = ReplayController.GetReplayId();
     this._curRecordMetaEntry = new ReplayMetaInfo.ReplayMetaEntry
     {
         ReplayId   = this._curReplayId,
         ReplayFile = this._curReplayId + ".rep"
     };
     this._replayMessageIO = new ReplayMessageIO(ReplayController.ReplayStoreDir + "/" + this._curRecordMetaEntry.ReplayFile);
     if (this.IsSavedReconnectSyncMsgValid())
     {
         this._replayMessageIO.Push(this.GetSavedReconnectSyncMsg());
     }
 }
Пример #5
0
 public void StartReplay(int replayId)
 {
     this._state = ReplayController.State.None;
     this._curLoadReplayFileRatio = 0f;
     new Task(this.LoadByReplayId(replayId), true);
 }
Пример #6
0
 public void EndRecord(Action <Exception> callback)
 {
     this.Save(callback);
     this._state = ReplayController.State.None;
 }