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(); }
// Start is called before the first frame update void Start() { state = startingState; textComponent.text = state.GetStateStory(); }