mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 02:47:12 +08:00
23 lines
555 B
C#
23 lines
555 B
C#
|
|
using Data;
|
||
|
|
|
||
|
|
namespace AI
|
||
|
|
{
|
||
|
|
public class JobNode_Idle:LeafNodeBase
|
||
|
|
{
|
||
|
|
protected override Status ExecuteLeafLogic()
|
||
|
|
{
|
||
|
|
return RemainingFrames == 0 ? Status.Success : Status.Running;
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void Init(BehaviorTreeDef def, Entity.Entity selfEntity)
|
||
|
|
{
|
||
|
|
base.Init(def, selfEntity);
|
||
|
|
if (string.IsNullOrEmpty(def.value)) return;
|
||
|
|
if (int.TryParse(def.value, out var result))
|
||
|
|
{
|
||
|
|
TimeoutFrames=result;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|