Files
DefendNJ/Assets/Plugins/DragonLi/Examples/Eventflow/LogEvent.cs
2025-09-04 14:31:28 +08:00

59 lines
1.3 KiB
C#

using DragonLi.EventFlow;
namespace DragonLi.Examples
{
public class LogEvent : EventUnit
{
private string log;
[AsInput("Message", ParameterTpyes.String)]
public void GetLog(object log)
{
this.log = log as string;
}
/// <summary>
/// This will be called when eventflow init
/// </summary>
protected override void OnInit()
{
base.OnInit();
}
/// <summary>
/// This will be called this node exit
/// </summary>
protected override void OnEnd()
{
base.OnEnd();
}
/// <summary>
/// This will be called when this node start to run
/// </summary>
protected override void OnStart()
{
this.LogEditorOnly(log);
}
/// <summary>
/// This will be called when event flow reset
/// </summary>
protected override void OnReset()
{
base.OnReset();
}
/// <summary>
/// This will be called every eventflow update
/// </summary>
/// <returns></returns>
protected override UnitRunningStatus OnUpdate()
{
return base.OnUpdate();
}
}
}