Пример #1
0
 public bool HasEnoughResourcesToOperate()
 {
     //returns true when this cycle has enough resources to operate.
     foreach (ResourceTypes resourceType in System.Enum.GetValues(typeof(ResourceTypes)))
     {
         float amount = GetAmountForThisInterval(resourceType);
         if (amount >= 0)
         {
             continue;
         }
         if (!ResourceController.ColonyHasAtLeastThisMuch(resourceType, Mathf.Abs(amount)))
         {
             return(false);
         }
     }
     return(true);
 }