예제 #1
0
    public void SetState(PlayState state)
    {
        if (currentState != null)
        {
            currentState.Exit();
        }

        currentState = state;

        if (currentState != null)
        {
            currentState.Enter();
        }
    }