예제 #1
0
 protected override bool CheckState(GeneratorInfo generatorInfo)
 {
     return(generatorInfo.IsEnhanced);
 }
예제 #2
0
 protected override void Invoke(GeneratorInfo generatorInfo)
 {
     Sounds.PlayOneShot(SoundName.click);
     ViewService.Show(ViewType.X2ProfitView);
 }
예제 #3
0
        protected override bool CheckState(GeneratorInfo generatorInfo)
        {
            var service = Services.GetService <IX2ProfitService>();

            return(service.HasUsedSlots);
        }
예제 #4
0
 private double ProfitOfTransport(GeneratorInfo generator, int count)
 => GeneratorUtils.CalculateProfitOnTime(generator, count,
                                         Services.GenerationService.Generators.CreateProfitBoost().WithInvestorBoost().WithPlanetProfitBoost().WithTimeChangeBoost(), 1,
                                         Services.GenerationService.Generators.CreateTimeBoost().WithPlanetBoost);
예제 #5
0
        protected override bool CheckState(GeneratorInfo generatorInfo)
        {
            var boostsInfo = GetBoostInfo(generatorInfo);

            return(boostsInfo.Count > 0);
        }
예제 #6
0
 protected override void Invoke(GeneratorInfo generatorInfo)
 {
     ViewService.Show(ViewType.MiniGameView);
     ViewService.Remove(ViewType.TransportInfoView);
 }
예제 #7
0
 public void BuyGenerator(GeneratorInfo generator, bool isFree = false)
 {
     BuyGenerator(generator, 1, isFree);
 }
예제 #8
0
        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)));
        }