コード例 #1
0
        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;
        }
コード例 #2
0
 public virtual void ChangeState <T>() where T : StateEUE
 {
     CurrentState = GetState <T>();
     stateName    = CurrentState.stateName;
 }