public void ExecutionResult(IBehaviourTreeNode <int, int> node, BehaviourTreeState expectedState) { var invert = new SucceederNode <int, int>(); invert.Decorate(node); var func = invert.Compile(); var state = func(0, 0); Assert.Equal(expectedState, state); }
public void VerifyExecution(IEnumerable <IBehaviourTreeNode <int, int> > nodes, BehaviourTreeState expectedState) { var selectNode = new RandomSelectNode <int, int>("test"); foreach (var node in nodes) { selectNode.AddNode(node, 1); } var func = selectNode.Compile(); var state = func(0, 0); Assert.Equal(expectedState, state); }
public void LogExecutedAction(string actionName, T1 tick, BehaviourTreeState nodeState) { _log.Add("executed [" + actionName + "]"); }
public void Run(ref T agent, ref BehaviourTreeState state) { root.Run(ref agent, state.NodeStates); }
public void Execution(IEnumerable <IBehaviourTreeNode <int, int> > nodes, int successCount, int failureCount, BehaviourTreeState expectedState) { var parallelNode = new ParallelNode <int, int>("test", successCount, failureCount); foreach (var node in nodes) { parallelNode.AddNode(node); } var func = parallelNode.Compile(); Assert.Equal(expectedState, func(1, 1)); }