private void manageStates() { stateArray = currentState.getStateArray(); if (Input.GetKeyDown(KeyCode.Alpha1)) { currentState = stateArray[0]; } else if (Input.GetKeyDown(KeyCode.Alpha2)) { currentState = stateArray[1]; } textfield.text = currentState.getStateText(); }
void Start() { currentState = startingstate; textfield.text = currentState.getStateText(); stateArray = currentState.getStateArray(); }