protected virtual void Transition(StateEUE value) { if (_currentState == value || _inTransition) { return; } _inTransition = true; if (_currentState != null) { _currentState.Exit(); } _currentState = value; if (_currentState != null) { _currentState.Enter(); } _inTransition = false; }
public virtual void ChangeState <T>() where T : StateEUE { CurrentState = GetState <T>(); stateName = CurrentState.stateName; }