Example #1
0
 void AggroWander()
 {
     if (control.playerIsInRange() == false)
     {
         control.Wander();
         if (control.CanMove(data.forwardSpeed) == false)
         {
             control.Avoid();
         }
     }
     else
     {
         ChangeState(AIState.Attack);
     }
 }
Example #2
0
 void GuardWander()
 {
     if (control.playerIsInRange() == false)
     {
         control.Wander();
         if (control.CanMove(data.forwardSpeed) == false)
         {
             control.Avoid();
         }
     }
     if (data.tankCurrentLife <= (data.tankMaxLife / 3))
     {
         ChangeState(AIState.Rest);
     }
     else
     {
         ChangeState(AIState.Attack);
     }
 }