ok so im pretty sure i understand but its taking a second for it to wrap around my head. so the only way for us to change the state from our adventure script is to make a new variable which consist of what the state script returns when its function is called? ive written in code my understanding if im incorrect plz let me know.
private void manageStates()
{
print(state);
if (Input.GetKeyDown(KeyCode.Alpha1))
{
//A new variable of type array is made by the return function of our state classes array
State[] nextState = state.getNextStates();
//we then are able to use this variable in its array format to choose which state is next
state = nextState[0];
textComponent.text = state.getStateStory();
}
}