mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-19 23:37:13 +08:00
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/60
19 lines
514 B
C#
19 lines
514 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;
|
|
}
|
|
}
|
|
} |