コード例 #1
0
 private void OnPvpStateChange(PvpStateCode oldState, PvpStateCode newState)
 {
     if (newState == PvpStateCode.Home)
     {
         this.RefreshPlayBtn();
     }
 }
コード例 #2
0
 private static PvpStateRecoverBase.ActiveLink GetLink(PvpStateCode state)
 {
     if (state == PvpStateCode.Home || state == PvpStateCode.PvpInQueue || state == PvpStateCode.PvpSelectHero)
     {
         return(PvpStateRecoverBase.ActiveLink.GateServer);
     }
     return(PvpStateRecoverBase.ActiveLink.PvpServer);
 }
コード例 #3
0
        public void ChangeState(PvpStateBase state)
        {
            if (this._curState != null && this._curState.StateCode == PvpStateCode.PvpNewbieBegin && state != null && state.StateCode != PvpStateCode.PvpLoad)
            {
                return;
            }
            PvpStateCode stateCode = this.StateCode;

            this._nextState = null;
            if (this._curState != null)
            {
                this._curState.Exit();
            }
            this._curState = state;
            if (this._curState != null)
            {
                this._curState.Enter();
            }
            if (this.OnStateChanged != null)
            {
                this.OnStateChanged(stateCode, this.StateCode);
            }
        }
コード例 #4
0
 protected PvpStateRecoverBase(PvpStateCode stateCode, PvpStateRecoverBase.ActiveLink activeLink) : base(stateCode)
 {
     this.CurrentLink = activeLink;
 }
コード例 #5
0
 public PvpStateRecover(PvpStateCode prevState, int queryInterval) : base(PvpStateCode.PvpRecover, PvpStateRecover.GetLink(prevState))
 {
     this._prevState = prevState;
     this._lostConnectionRecovery = false;
     this._queryInterval          = queryInterval;
 }
コード例 #6
0
 public PvpStateRecover(PvpStateCode prevState) : base(PvpStateCode.PvpRecover, PvpStateRecover.GetLink(prevState))
 {
     this._prevState = prevState;
     this._lostConnectionRecovery = true;
 }
コード例 #7
0
 public PvpStateObserverLogin(PvpStateCode stateCode, string userId) : base(stateCode)
 {
     this._userId = userId;
 }
コード例 #8
0
ファイル: PvpStateBase.cs プロジェクト: whztt07/mobahero_src
 protected PvpStateBase(PvpStateCode stateCode)
 {
     this.StateCode = stateCode;
 }