mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-27 03:44:54 +00:00
28 lines
783 B
C#
28 lines
783 B
C#
|
using UnityEditor;
|
|||
|
using BehaviorTreeSlayer;
|
|||
|
namespace BehaviorTreeSlayerEditor
|
|||
|
{
|
|||
|
public class SlayerAction : ActionNode
|
|||
|
{ /// <summary>
|
|||
|
/// I don't know how to regist a method in the static domain elegant. That's all I can do
|
|||
|
/// </summary>
|
|||
|
[System.Xml.Serialization.XmlIgnore]
|
|||
|
static int dm = Init();
|
|||
|
|
|||
|
[OutField]
|
|||
|
public DragonSlayer MySlayer = new DragonSlayer();
|
|||
|
public override TaskResult Tick(double dt, object args = null)
|
|||
|
{
|
|||
|
UnityEngine.Debug.Log(MySlayer?.ToString());
|
|||
|
return base.Tick(dt, args);
|
|||
|
}
|
|||
|
|
|||
|
private static int Init()
|
|||
|
{
|
|||
|
SlayerUtils.RegistCustomParser<DragonSlayer>(DragonSlayer.Parser);
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|