Ejemplo n.º 1
0
 //function called when tile is clicked in unit placement phase
 void PlaceUnit()
 {
     if (!openForPlacement)
     {
         GameControlTB.DisplayMessage("Invalid position");
         return;
     }
     if (unit == null)
     {
         if (placementID == UnitControl.GetPlayerUnitsBeingPlaced().factionID)
         {
             UnitControl.PlaceUnitAt(this);
         }
     }
     else if (unit.factionID == UnitControl.GetPlayerUnitsBeingPlaced().factionID)
     {
         UnitControl.RemoveUnit(unit);
     }
 }