protected override bool CheckState(GeneratorInfo generatorInfo) { return(generatorInfo.IsEnhanced); }
protected override void Invoke(GeneratorInfo generatorInfo) { Sounds.PlayOneShot(SoundName.click); ViewService.Show(ViewType.X2ProfitView); }
protected override bool CheckState(GeneratorInfo generatorInfo) { var service = Services.GetService <IX2ProfitService>(); return(service.HasUsedSlots); }
private double ProfitOfTransport(GeneratorInfo generator, int count) => GeneratorUtils.CalculateProfitOnTime(generator, count, Services.GenerationService.Generators.CreateProfitBoost().WithInvestorBoost().WithPlanetProfitBoost().WithTimeChangeBoost(), 1, Services.GenerationService.Generators.CreateTimeBoost().WithPlanetBoost);
protected override bool CheckState(GeneratorInfo generatorInfo) { var boostsInfo = GetBoostInfo(generatorInfo); return(boostsInfo.Count > 0); }
protected override void Invoke(GeneratorInfo generatorInfo) { ViewService.Show(ViewType.MiniGameView); ViewService.Remove(ViewType.TransportInfoView); }
public void BuyGenerator(GeneratorInfo generator, bool isFree = false) { BuyGenerator(generator, 1, isFree); }
public int GetMaxNumberBuyable(double cash, int countOfUnits, GeneratorInfo generatorInfo) { double buyCoefficient = GeneratorUnitBuyKoefficient(generatorInfo.Data); return((int)Math.Floor(Math.Log(((cash * (buyCoefficient - 1)) / (generatorInfo.Cost * Math.Pow(buyCoefficient, countOfUnits)) + 1), buyCoefficient))); }