Example #1
0
        public bool HasEnoughCurrency(Resource.CurrencyItem currencyItem)
        {
            var requiredCurrencyType   = currencyItem.Currency;
            var requiredCurrencyAmount = currencyItem.Amount;
            var currencyAmount         = requiredCurrencyType == Resource.CurrencyProducts.MONEY
                ? GetMoney()
                : GetSelfProduction(requiredCurrencyType);

            return(currencyAmount >= requiredCurrencyAmount);
        }
 public SpecialWonderCard(
     string id,
     string name,
     Resource.CurrencyItem startCurrencyItem,
     StepBuildWithEffect <TEffect1> stepBuild1,
     StepBuildWithEffect <TEffect2> stepBuild2,
     StepBuildWithEffect <TEffect3> stepBuild3)
     : base(id, name, startCurrencyItem)
 {
     StepBuilds = new StepBuild[] { stepBuild1, stepBuild2, stepBuild3 };
 }
Example #3
0
        public void Buy(Resource.CurrencyItem currencyItem)
        {
            var requiredCurrencyType   = currencyItem.Currency;
            var requiredCurrencyAmount = currencyItem.Amount;

            if (requiredCurrencyType == Resource.CurrencyProducts.MONEY)
            {
                _money.Decrease(requiredCurrencyAmount);
            }
            else
            {
                _production.Storage[requiredCurrencyType] -= requiredCurrencyAmount;
            }
        }
Example #4
0
 public void AddScience(Resource.CurrencyItem newScience)
 {
     _production[newScience.Currency] += newScience.Amount;
 }
Example #5
0
 public void AddProduction(Resource.CurrencyItem newProduction)
 {
     _production[newProduction.Currency] += newProduction.Amount;
 }
Example #6
0
 public void EarnTempProduction(Resource.CurrencyItem newProduction)
 {
     _tempProduction[newProduction.Currency] += newProduction.Amount;
 }
Example #7
0
 public WonderCardData(string id, string name, Resource.CurrencyItem startCurrencyItem) : base(id, name)
 {
     StartCurrencyEffect = startCurrencyItem;
     _completedSteps     = 0;
 }
Example #8
0
 public void RemoveNoTradeProduction(Resource.CurrencyItem newProduction)
 {
     _noTradeProduction.Storage[newProduction.Currency] -= newProduction.Amount;
 }
Example #9
0
 public void EarnNoTradeProduction(Resource.CurrencyItem newProduction)
 {
     _noTradeProduction.Storage[newProduction.Currency] += newProduction.Amount;
 }
Example #10
0
 public void SpendProduction(Resource.CurrencyItem newProduction)
 {
     _production.Storage[newProduction.Currency] -= newProduction.Amount;
 }