public override void OnUpdate(MyStateMachine stateMachine) { Debug.Assert(stateMachine is MyAnimationStateMachine, "Animation machine nodes must be inside animation state machine."); MyAnimationStateMachine animStateMachine = stateMachine as MyAnimationStateMachine; if (m_rootAnimationNode != null) { m_rootAnimationNode.Update(ref animStateMachine.CurrentUpdateData); } }
public override void OnUpdate(MyStateMachine stateMachine) { MyAnimationStateMachine animStateMachine = stateMachine as MyAnimationStateMachine; if (animStateMachine == null) { Debug.Fail("Animation machine nodes must be inside animation state machine."); return; } if (m_rootAnimationNode != null) { animStateMachine.CurrentUpdateData.AddVisitedTreeNodesPathPoint(1); m_rootAnimationNode.Update(ref animStateMachine.CurrentUpdateData); } else { animStateMachine.CurrentUpdateData.BonesResult = animStateMachine.CurrentUpdateData.Controller.ResultBonesPool.Alloc(); } animStateMachine.CurrentUpdateData.AddVisitedTreeNodesPathPoint(0); }