Esempio n. 1
0
 private void OnPvpStateChange(PvpStateCode oldState, PvpStateCode newState)
 {
     if (newState == PvpStateCode.Home)
     {
         this.RefreshPlayBtn();
     }
 }
Esempio n. 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);
 }
Esempio n. 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);
            }
        }
 protected PvpStateRecoverBase(PvpStateCode stateCode, PvpStateRecoverBase.ActiveLink activeLink) : base(stateCode)
 {
     this.CurrentLink = activeLink;
 }
Esempio n. 5
0
 public PvpStateRecover(PvpStateCode prevState, int queryInterval) : base(PvpStateCode.PvpRecover, PvpStateRecover.GetLink(prevState))
 {
     this._prevState = prevState;
     this._lostConnectionRecovery = false;
     this._queryInterval          = queryInterval;
 }
Esempio n. 6
0
 public PvpStateRecover(PvpStateCode prevState) : base(PvpStateCode.PvpRecover, PvpStateRecover.GetLink(prevState))
 {
     this._prevState = prevState;
     this._lostConnectionRecovery = true;
 }
 public PvpStateObserverLogin(PvpStateCode stateCode, string userId) : base(stateCode)
 {
     this._userId = userId;
 }
Esempio n. 8
0
 protected PvpStateBase(PvpStateCode stateCode)
 {
     this.StateCode = stateCode;
 }