示例#1
0
    private void manageState()
    {
        var nextStates = state.GetNextStates();

        for (int i = 0; i < nextStates.Length; i++)
        {
            if (Input.GetKeyDown(KeyCode.Alpha1 + i))
            {
                state = nextStates[i];
            }
        }

        textComponent.text = state.GetStateStory();
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     state = startingState;
     textComponent.text = state.GetStateStory();
 }