19 lines
561 B
C#
19 lines
561 B
C#
namespace RebootKit.Engine.AI {
|
|
public class BehaviourTree : BehaviourNode {
|
|
public BehaviourTree(string name) : base(name) {
|
|
}
|
|
|
|
public override Status Process(float dt) {
|
|
while (m_CurrentChild < Children.Count) {
|
|
Status status = Children[m_CurrentChild].Process(dt);
|
|
if (status != Status.Success) {
|
|
return status;
|
|
}
|
|
|
|
m_CurrentChild += 1;
|
|
}
|
|
|
|
return Status.Success;
|
|
}
|
|
}
|
|
} |