Пример #1
0
    //Set Next State
    public void SetNextState(GameEnums.FSMInteractionEnum requestedAction)
    {
        if(!lockedByInteraction)
        {
            FSMState state;

            
            if (_dictionaryEnumToState.TryGetValue(requestedAction, out state))
            {
                if ( _currentState is FSMState_ActivateItem)
                {
                    return;
                }
               
                if (state != _currentState)
                {
                    _nextState = state;
                    _requestChangeState = true;
                }
            }
        }
    }
Пример #2
0
 //Constructor
 public FSMState(FSMController FSMControllerRef, GameEnums.FSMInteractionEnum interactionType)
 {
     this.FSMControllerRef = FSMControllerRef;
     this.interactionType  = interactionType;
 }