public void Initialize(GameObject actor, Sequence.SequenceChoice[] decisions, BubbleEndCallback callback) { this.decisions = decisions; this.callback = callback; nameText.text = actor.gameObject.name; RefreshDecisions(); base.Initialize(actor, -1); }
public void Initialize(GameObject actor, string line, int wordTime, BubbleEndCallback callback) { // Determine how long the bubble should last for float maxAge = wordTime * line.Split(new string[] { " " }, System.StringSplitOptions.RemoveEmptyEntries).Length / 1000.0f; // Set up the line of dialog this.line = line; dialogText.text = this.line; nameText.text = actor.gameObject.name; this.callback = callback; base.Initialize(actor, maxAge); }