private void StartBattleSequence() { //if all dialog is done go to next stage if (SBStextIndex > 7) { stage++; return; } //turn on text ui Text.enabled = true; TextBox.enabled = true; CharacterTalking.enabled = true; if (!TextTyper.IsTyping) { //increase dialog index SBStextIndex++; //makes sure dialog is within dialog index range if (SBSDialog.Length < SBStextIndex) { return; } //type dialog TextTyper.DisplayText(SBSDialog[SBStextIndex - 1]); } }