void UpdateDisplay() { yourBox.Deactivate(); theirBox.Deactivate(); if (sequenceIndex >= sequence.dialogue.Length) { yourBox.Deactivate(); theirBox.Deactivate(); manager.EndDialogue(sequence.storySequence); gameObject.SetActive(false); return; } DialogueSequence.Dialogue current = sequence.dialogue[sequenceIndex]; DialogueSequence.Character character = sequence.GetCharacter(current.characterIndex); DialogueDisplay box = character.flipSide ? theirBox : yourBox; box.Show(current.character, current.text, character.characterSprite); if (character.gameObject && current.target) { movement mv = character.gameObject.GetComponent <movement>(); if (mv) { mv.SetTarget(current.target, false); } } }