19 lines
488 B
C#
19 lines
488 B
C#
using RebootKit.Engine.Simulation;
|
|
|
|
namespace RebootKit.Engine.AI {
|
|
public class Leaf : BehaviourNode {
|
|
readonly IStrategy m_Strategy;
|
|
|
|
public Leaf(string name, IStrategy strategy) : base(name) {
|
|
m_Strategy = strategy;
|
|
}
|
|
|
|
public override Status Process(Actor target, float dt) {
|
|
return m_Strategy.Process(target, dt);
|
|
}
|
|
|
|
public override void Reset() {
|
|
m_Strategy.Reset();
|
|
}
|
|
}
|
|
} |