private MyBehaviorTreeState TickChild(IMyBot bot, MyPerTreeBotMemory botTreeMemory, MyBehaviorTreeDecoratorNodeMemory thisMemory) { bot.BotMemory.RememberNode(m_child.MemoryIndex); var state = m_child.Tick(bot, botTreeMemory); thisMemory.NodeState = state; thisMemory.ChildState = state; if (state != MyBehaviorTreeState.RUNNING) { bot.BotMemory.ForgetNode(); } return(state); }
public override MyBehaviorTreeState Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory) { bot.BotMemory.RememberNode(m_child.MemoryIndex); var state = m_child.Tick(bot, botTreeMemory); botTreeMemory.GetNodeMemoryByIndex(MemoryIndex).NodeState = state; if (state != MyBehaviorTreeState.RUNNING) { bot.BotMemory.ForgetNode(); } return(state); }
public override MyBehaviorTreeState Tick(IMyBot bot, MyPerTreeBotMemory botTreeMemory) { bot.BotMemory.RememberNode(m_child.MemoryIndex); if (Sandbox.Engine.Utils.MyDebugDrawSettings.DEBUG_DRAW_BOTS) { // store this old memory bot.LastBotMemory = bot.BotMemory.Clone(); } var state = m_child.Tick(bot, botTreeMemory); botTreeMemory.GetNodeMemoryByIndex(MemoryIndex).NodeState = state; RecordRunningNodeName(bot, state); if (state != MyBehaviorTreeState.RUNNING) { bot.BotMemory.ForgetNode(); } return(state); }
public void Tick(IMyBot bot) { m_root.Tick(bot, bot.BotMemory.CurrentTreeBotMemory); }