Exemplo n.º 1
0
        public bool CanAffordTrainerPurchase(IResourceInventory i_inventory)
        {
            int  cost     = GetNextTrainerCost();
            bool canTrain = i_inventory.HasEnoughResources(VirtualCurrencies.GOLD, cost);

            return(canTrain);
        }
Exemplo n.º 2
0
 public bool CanAffordUpgrade(IResourceInventory i_inventory)
 {
     foreach (KeyValuePair <string, int> cost in mData.ResourcesToUpgrade)
     {
         int resourceCost = GetUpgradeCostForResource(cost.Key);
         if (i_inventory.HasEnoughResources(cost.Key, resourceCost) == false)
         {
             return(false);
         }
     }
     return(true);
 }