private void OnPvpStateChange(PvpStateCode oldState, PvpStateCode newState) { if (newState == PvpStateCode.Home) { this.RefreshPlayBtn(); } }
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); }
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; }
public PvpStateRecover(PvpStateCode prevState, int queryInterval) : base(PvpStateCode.PvpRecover, PvpStateRecover.GetLink(prevState)) { this._prevState = prevState; this._lostConnectionRecovery = false; this._queryInterval = queryInterval; }
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; }
protected PvpStateBase(PvpStateCode stateCode) { this.StateCode = stateCode; }