예제 #1
0
 public void HireRookie() //function to hire rookie
 {
     if (Rookie.Hire(player, maxRookie))
     {
         rookie    += 1;
         maxRookie -= 1;
         if (!player.AI)
         {
             ui.showInfoArmy();
         }
     }
 }
예제 #2
0
 public void ConfirmCrusade(int r, int s, int i, int c) //function to start crusade
 {
     if (r != 0 || s != 0 || i != 0 || c != 0)
     {
         rookie         = r;
         shooter        = s;
         infantry       = i;
         cavalry        = c;
         Army.rookie   -= rookie;
         Army.shooter  -= shooter;
         Army.infantry -= infantry;
         Army.cavalry  -= cavalry;
         if (rookie != 0)
         {
             moveSpeed = 1;
         }
         else if (infantry != 0)
         {
             moveSpeed = 1;
         }
         else if (shooter != 0)
         {
             moveSpeed = 3;
         }
         else if (cavalry != 0)
         {
             moveSpeed = 3;
         }
         Crusade    = true;
         movePoints = moveSpeed;
         CrusadeSquad.SetActive(true);
         if (!player.AI)
         {
             ui.showInfoArmy();
             ui.showInfoCrusade();
         }
     }
 }