Ejemplo n.º 1
0
 public void Die(bool immediate = false)
 {
     AgentController.DestroyAgent(this, immediate);
     if (Animator.IsNotNull())
     {
         Animator.SetDyingState();
         Animator.Visualize(); // TODO: Now call in LockstepManager.LateVisualize ()
     }
 }
 public static void ClearAgents()
 {
     for (int i = GlobalAgents.Length - 1; i >= 0; i--)
     {
         if (GlobalAgentActive[i])
         {
             RTSAgent agent = GlobalAgents[i];
             AgentController.DestroyAgent(agent);
         }
     }
 }
Ejemplo n.º 3
0
 public void Die()
 {
     if (Agent.IsActive)
     {
         if (onDie != null)
         {
             this.onDie(this, this.LastAttacker);
         }
         AgentController.DestroyAgent(Agent);
         if (Agent.Animator.IsNotNull())
         {
             Agent.SetState(AnimState.Dying);
             Agent.Animator.Visualize();
         }
     }
 }