using UnityEngine; using System; using System.Collections; using System.Collections.Generic; namespace Fungus { [CommandInfo("Dialog", "Choose", "Presents a list of options for the player to choose from using a Choose Dialog. " + "Place Option commands after the Choose Option command to specify the player options, and terminate with an End command.")] [AddComponentMenu("")] public class ChooseOption : Command { [Tooltip("Story text to display to prompt player to choose an option")] [TextArea(5,10)] public string chooseText = ""; [Tooltip("Speaking character to use when prompting the player to choose an option")] public Character character; [Tooltip("Choose Dialog object to use to display the player options")] public ChooseDialog chooseDialog; [Tooltip("Portrait that represents speaking character")] public Sprite portrait; [Tooltip("Voiceover audio to play when prompting the player to choose an option")] public AudioClip voiceOverClip; [Tooltip("Time limit for player to choose an option. Set to 0 for no time limit.")] public float timeoutDuration; public override void OnEnter() { if (chooseDialog == null) { if (chooseDialog == null) { // Try to get any ChooseDialog in the scene chooseDialog = GameObject.FindObjectOfType(); } } // Build list of Option commands End endCommand = null; List