Ejemplo n.º 1
0
 public void heal(AgentV2 aAgent)
 {
     if (aAgent.getHP() >= AgentV2.HEALTH_LOW_LIMIT)
     {
         aAgent.changeState(AgentV2.Health_STATE);
     }
     else if (aAgent.getHP() >= AgentV2.INJURED_LOW_LIMIT)
     {
         aAgent.changeState(AgentV2.Injured_STATE);
     }
 }
Ejemplo n.º 2
0
 public void hitted(AgentV2 aAgent)
 {
     if (aAgent.getHP() == AgentV2.DEAD_LOW_LIMIT)
     {
         aAgent.changeState(AgentV2.Dead_STATE);
     }
 }
Ejemplo n.º 3
0
 public void hitted(AgentV2 aAgent)
 {
     if (aAgent.getHP() < AgentV2.DYING_LOW_LIMIT)
     {
         //aAgent.changeState(new Dead());
         aAgent.changeState(AgentV2.Dead_STATE);
     }
     else if (aAgent.getHP() < AgentV2.INJURED_LOW_LIMIT)
     {
         aAgent.changeState(AgentV2.Dying_STATE);
     }
     else if (aAgent.getHP() < AgentV2.HEALTH_LOW_LIMIT)
     {
         //aAgent.changeState(new Injured());
         aAgent.changeState(AgentV2.Injured_STATE);
     }
 }
Ejemplo n.º 4
0
 public void heal(AgentV2 aAgent)
 {
     // resurrection
     if (aAgent.getHP() >= AgentV2.HEALTH_LOW_LIMIT)
     {
         //aAgent.changeState(new Health());
         aAgent.changeState(AgentV2.Health_STATE);
     }
     else if (aAgent.getHP() >= AgentV2.INJURED_LOW_LIMIT)
     {
         //aAgent.changeState(new Injured());
         aAgent.changeState(AgentV2.Injured_STATE);
     }
     else if (aAgent.getHP() >= AgentV2.DYING_LOW_LIMIT)
     {
         aAgent.changeState(AgentV2.Dying_STATE);
     }
 }