public void Update(float deltaTime) { if (m_ai != null) { m_ai.Update(deltaTime); } if (m_fsm.blackboard != null) { m_fsm.blackboard.deltaTime = deltaTime; } if (m_fsm != null) { m_fsm.Update(); } for (int i = 0; i < m_skills.Length; i++) { if (m_skills[i] != null) { m_skills[i].Update(deltaTime); } } if (m_skill != null && m_skill.Finish) { m_skill = null; } }
void Update() { if (m_fsm != null) { m_fsm.blackboard.deltaTime = Time.deltaTime; m_fsm.Update(); } }
public void Update(GameTime gameTime) { if (controlledUnit == null) { return; } if (AttackTarget != null && AttackTarget.IsDead()) { AttackTarget = null; } fsm.Update(gameTime); if (steering != null) { steering.Steer((float)gameTime.ElapsedGameTime.TotalSeconds); } }