private void ManageState() { var nextStates = currentState.GetNextStates(); if (Input.GetKeyDown(KeyCode.Alpha1)) { currentState = nextStates[0]; errorComponent.text = null; } else if (Input.GetKeyDown(KeyCode.Alpha2)) { currentState = nextStates[1]; errorComponent.text = null; } else if (Input.anyKeyDown) { errorComponent.text = ("PLEASE SELECT A VALID OPTION !"); Debug.Log("from else part"); } textComponent.text = currentState.GetStateStory(); }