public new void RunTwoPosition()
 {
     /* OGoal | Player | Ball | AI | AIGoal
      */
     if (AICheckBehaviour.FarFromBall(player, ball))
     {
         if (AICheckBehaviour.CheckIfCloseToOpponent(player, opponent))
         {
             AIMovementBehaviour.LookAt(player, opponent);
             AIBasicBehaviour.UseSword(player);
             AIMovementBehaviour.MoveTowards(player, ball);
         }
         else if (AICheckBehaviour.CheckOpponentsHealth(opponent))
         {
             AIMovementBehaviour.LookAt(player, opponent);
             AIBasicBehaviour.UseGun(player);
             AIMovementBehaviour.MoveTowards(player, ball);
         }
         else
         {
             AIMovementBehaviour.LookAt(player, ball);
             AIBasicBehaviour.UseGun(player);
             AIMovementBehaviour.MoveTowards(player, ball);
         }
     }
     else
     {
         if (AICheckBehaviour.CheckIfBallApproaching(player, ball))
         {
             AIBasicBehaviour.UseShield(player);
         }
         AIGlobalBehaviour.PositionAndShoot(player, ball, goal);
     }
 }
Пример #2
0
 public new void RunTwoPosition()
 {
     /* OGoal | Player | Ball | AI | AIGoal
      */
     if (AICheckBehaviour.FarFromBall(player, ball))
     {
         AIBasicBehaviour.Sprint(player, 1);
         if (aIController.lineOfSight.CheckIfBallSpotted())
         {
             AIMovementBehaviour.LookAt(player, ball);
             AIBasicBehaviour.UseGun(player);
             AIMovementBehaviour.MoveTowards(player, ball);
         }
         else
         {
             AIGlobalBehaviour.PositionAndShoot(player, ball, goal);
         }
     }
     else
     {
         if (AICheckBehaviour.CheckIfBallApproaching(player, ball))
         {
             AIBasicBehaviour.UseShield(player);
         }
         AIGlobalBehaviour.PositionAndShoot(player, ball, goal);
     }
 }
Пример #3
0
 public new void RunTwoPosition()
 {
     /* OGoal | Player | Ball | AI | AIGoal
      */
     if (AICheckBehaviour.FarFromBall(player, ball))
     {
         AIBasicBehaviour.Sprint(player, 1);
         AIGlobalBehaviour.PositionAndShoot(player, ball, goal);
     }
     else
     {
         if (AICheckBehaviour.CheckIfBallApproaching(player, ball))
         {
             AIBasicBehaviour.UseShield(player);
         }
         AIGlobalBehaviour.PositionAndShoot(player, ball, goal);
     }
 }