private void Start() { currentState = startingState; secondaryStates = currentState.GetAvailableStates(); numberOfChoicesAvailable = secondaryStates.Length; backgroundImageComponent.sprite = currentState.GetBackground(); numberOfDrinks = 0; UpdateStory(); }
public void UpdateStory() { if (!currentState.callsBartender) { textComponent.text = currentState.GetStoryText(); choicesTextComponent.text = currentState.GetChoiceText(); } else if (currentState.callsBartender) { textComponent.text = currentState.GetStoryText(); choicesTextComponent.text = mainChoicesText[numberOfDrinks].GetBarkeepText(); numberOfDrinks += 1; } backgroundImageComponent.sprite = currentState.GetBackground(); }