Esempio n. 1
0
 // disables cannon usability if another cannon kills the controling units
 static void DeactivateCannonByCannon(Player p)
 {
     foreach (Cannon c in p.Can)
     {
         if (c.Manned && !c.Moved)
         {
             CannonMaster.SetCannon(c);
         }
     }
 }
Esempio n. 2
0
 // enable cannon is a legal conditions met when a unit moves near it
 static void ActivateCannonByMove(Player p)
 {
     foreach (Cannon c in p.Can)
     {
         if (!c.manned)
         {
             CannonMaster.SetCannon(c);
         }
     }
 }
Esempio n. 3
0
 public void ResetMovable()
 {
     foreach (Unit u in Inf)
     {
         u.Moved = false;
     }
     foreach (Unit u in Cav)
     {
         u.Moved = false;
     }
     foreach (Cannon c in Can)
     {
         CannonMaster.SetCannon(c);
     }
 }