Example #1
0
        private void PredictNewPurchase(int quantityToPurchase, bool blocking)
        {
            ShardShopController shardShopController = Service.ShardShopController;

            if (this.predictedData.Purchases[this.vto.SlotIndex].ContainsKey("Temp"))
            {
                Dictionary <string, int> dictionary;
                (dictionary = this.predictedData.Purchases[this.vto.SlotIndex])["Temp"] = dictionary["Temp"] + quantityToPurchase;
            }
            else
            {
                this.predictedData.Purchases[this.vto.SlotIndex].Add("Temp", quantityToPurchase);
            }
            CurrentPlayer   currentPlayer   = Service.CurrentPlayer;
            ShardShopViewTO shardShopViewTO = shardShopController.GenerateViewTO(this.vto.SlotIndex, currentPlayer, this.predictedData);

            shardShopViewTO.UpgradeShardsEarned += quantityToPurchase;
            this.quantityFloatingCounter.Text    = this.vto.RemainingShardsForSale.ToString();
            this.modalAnimator.SetBool("BuyFragment", true);
            this.Render(shardShopViewTO, true);
            if (blocking)
            {
                ProcessingScreen.Show();
            }
            else
            {
                this.ShowPurchaseFlourishAnimation();
            }
        }
Example #2
0
        public override void Start()
        {
            Service.EventManager.SendEvent(EventId.InitializeGeneralSystemsStart, null);
            new WorldTransitioner();
            new VictoryConditionController();
            new DefensiveBattleController();
            new RaidDefenseController();
            new CombatTriggerManager();
            new TrapViewController();
            new TrapController();
            new StunController();
            new BattleController();
            new BattleRecordController();
            new BattlePlaybackController();
            new PostBattleRepairController();
            new ShooterController();
            new TargetingController();
            new TurretAttackController();
            new TroopAttackController();
            new BuffController();
            new TroopAbilityController();
            new ArmoryController();
            new DeployableShardUnlockController();
            new FXManager();
            new AnimationEventManager();
            new StarportDecalManager();
            if (!HardwareProfile.IsLowEndDevice())
            {
                new TerrainBlendController();
            }
            new BuildingTooltipController();
            new CurrencyEffects();
            new CurrencyController();
            new StorageEffects();
            new AnimController();
            new UnlockController();
            new RewardManager();
            new CampaignController();
            new TournamentController();
            new PvpManager();
            new NeighborVisitManager();
            new TransportController();
            new ShuttleController();
            new ShieldEffects();
            new ShieldController();
            new MobilizationEffectsManager();
            new SocialPushNotificationController();
            new FactionIconUpgradeController();
            new TroopDonationTrackController();
            new LimitedEditionItemController();
            new StickerController();
            Service.NotificationController.Init();
            Service.EventManager.SendEvent(EventId.InitializeGeneralSystemsEnd, null);
            new TargetedBundleController();
            ShardShopController shardShopController = new ShardShopController();

            shardShopController.GetOffering(new Action(this.OnShardShopOfferingReceived), false);
            HolonetController holonetController = new HolonetController();

            holonetController.PrepareContent(new HolonetController.HolonetPreparedDelegate(this.OnHolonetPrepared));
            new InventoryCrateRewardController();
            new ObjectiveManager();
            new ObjectiveController();
            if (GameConstants.ALLOW_SUMMON)
            {
                new SummonController();
            }
        }