#if HAVE_NODECANVAS using System; using ParadoxNotion.Design; using NodeCanvas.Framework; using Framework.Services; namespace Framework.Dialogue { /// Hides the currently open [Category("Dialogue")] [Icon("Dialogue")] [Description("Hide the dialogue UI")] public class HideDialogueTask : ActionTask { /// /// Called when the instance is first activated to provide it with any /// external services it relies on. /// /// /// Dialogue manager through which the dialogue UI will be displayed /// protected virtual void Inject(IDialogueManager dialogueManager) { this.dialogueManager = dialogueManager; } /// Provides a summary description of what this action does protected override string info { get { return "Hide dialogue"; } } /// Called once when the action is executed protected override void OnExecute() { ServiceInjector.InjectDependencies(this); this.dialogueManager.HideDialogue(); EndAction(); } /// Manages the currently active dialogue UI in the game [NonSerialized] private IDialogueManager dialogueManager; } } // namespace Framework.Dialogue #endif // HAVE_NODECANVAS