public BehaviourTreeBuilder Do(string name, Func<TimeData, BehaviourTreeStatus> fn)
{
if (parentNodeStack.Count <= 0)
{
throw new ApplicationException("Can't create an unnested ActionNode, it must be a leaf node.");
}
var actionNode = new ActionNode(name, fn);
parentNodeStack.Peek().AddChild(actionNode);
return this;
}