59 lines
1.3 KiB
C#
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();
|
|
}
|
|
}
|
|
}
|
|
|
|
|