Untitled

 avatar
unknown
csharp
2 years ago
237 B
5
Indexable
    public void ChangeState(string stateName)
    {
        if (currentState != null)
        {
            currentState.Exit();
        }

        currentState = stateDictionary[stateName];
        currentState.Enter();
    }
Editor is loading...