Last Dialogue Finished#
Game Creator / Dialogue / Last Dialogue Finished
Can Read
Cannot Write
Description#
The last Dialogue component that finished playing
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
using VisualScript.Runtime;
namespace GameCreator.Runtime.Dialogue
{
[Get]
[Title("Last Dialogue Finished")]
[Category("Game Creator/Dialogue/Last Dialogue Finished")]
[Description("The last Dialogue component that finished playing")]
[Image(typeof(IconDialogue), ColorTheme.Type.Blue, typeof(BadgeArrowRight))]
[Keywords("Script", "Narration", "Text", "Conversation", "Story", "Lines", "Dialogue")]
[Keywords("Current")]
[Serializable]
public class TypeGameObjectLastDialogueFinished : TypeGameObject
{
public override GameObject Get(Args args)
{
return Dialogue.LastFinished != null ? Dialogue.LastFinished.gameObject : null;
}
public override U Get<U>(Args args)
{
if (typeof(U) == typeof(Dialogue))
{
return Dialogue.LastFinished != null
? Dialogue.LastFinished as U
: null;
}
return base.Get<U>(args);
}
public override string ToString()
{
return "Last Dialogue Finished";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}