示例#1
0
    private void Update()
    {
        if (!currentState.isStarted)
        {
            currentState.Start();
        }

        SceneState nextState = currentState.GetNextState();

        if (nextState != currentState)
        {
            currentState.Finish();
            currentState = nextState;
        }
    }