using System; using CleverCrow.Fluid.BTs.Tasks; namespace Game { public partial class AIObjectBase where T : new() { protected enum ETaskStatus { Success, Failure, Continue } protected void Selector(Action action) { Selector("selector", action); } protected void Selector(string name, Action action) { _builder.Selector(name); action(); _builder.End(); } protected void Sequence(Action action) { Sequence("sequence", action); } protected void Sequence(string name, Action action) { _builder.Sequence(name); action(); _builder.End(); } protected void Do(string name, Func action) { _builder.Do(name, () => (TaskStatus)action()); } protected void Condition(string name, Func action) { _builder.Condition(name, action); } } }