Esempio n. 1
0
    public void ChangeState(Action newAction)
    {
        _currentState?.End(this);

        CurrentAction = newAction;
        _currentState = _states[newAction];

        _currentState?.Begin(this);
        onChangeAction?.Invoke(this, EventArgs.Empty);
    }