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 }; }
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; } }
public void AddScience(Resource.CurrencyItem newScience) { _production[newScience.Currency] += newScience.Amount; }
public void AddProduction(Resource.CurrencyItem newProduction) { _production[newProduction.Currency] += newProduction.Amount; }
public void EarnTempProduction(Resource.CurrencyItem newProduction) { _tempProduction[newProduction.Currency] += newProduction.Amount; }
public WonderCardData(string id, string name, Resource.CurrencyItem startCurrencyItem) : base(id, name) { StartCurrencyEffect = startCurrencyItem; _completedSteps = 0; }
public void RemoveNoTradeProduction(Resource.CurrencyItem newProduction) { _noTradeProduction.Storage[newProduction.Currency] -= newProduction.Amount; }
public void EarnNoTradeProduction(Resource.CurrencyItem newProduction) { _noTradeProduction.Storage[newProduction.Currency] += newProduction.Amount; }
public void SpendProduction(Resource.CurrencyItem newProduction) { _production.Storage[newProduction.Currency] -= newProduction.Amount; }