예제 #1
0
        private void Start()
        {
            contexts = Contexts.sharedInstance;
            canvasClickHandlerSystem = new CanvasClickHandlerSystem(contexts, lobbyLoaderController,
                                                                    UiSoundsManager.Instance(), lootboxUiStorage);

            SystemsContainer systemsContainer = new SystemsContainer()
                                                .Add(new LootboxSpawnSystem(contexts.lootbox, lootboxUiStorage.lootboxPrefab,
                                                                            lootboxUiStorage.resourcesRoot.transform))
                                                .Add(new LootboxOpeningSystem(contexts.lootbox, lootboxUiStorage.resourcesRoot.transform, this))
                                                .Add(canvasClickHandlerSystem)
                                                .Add(new ShowPrizeSystem(contexts, particlesColorUpdater, lootboxUiStorage))
                                                .Add(new ItemsLeftChangedSystem(contexts, lootboxUiStorage))
                                                .Add(new ItemsLeftDisablingSystem(contexts, lootboxUiStorage))
                                                .Add(new ResourcesInitializeSystem(lootboxUiStorage))
            ;

            systems = systemsContainer.GetSystems();
            systems.Initialize();
        }