Пример #1
0
 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;
     }
 }
Пример #2
0
 void Update()
 {
     if (m_fsm != null)
     {
         m_fsm.blackboard.deltaTime = Time.deltaTime;
         m_fsm.Update();
     }
 }
Пример #3
0
        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);
            }
        }