Ejemplo n.º 1
0
        public void ShowOneResource(PurchaseModel purchaseModel)
        {
            DisableLobbyUi();
            SceneManager.LoadScene("2dLootboxScene", LoadSceneMode.Additive);
            SceneManager.sceneUnloaded += OneResourceSceneClosed;
            ResourcesAccrualStorage.Instance.Clear();
            var resourceModel = new ResourceModelMapper().Map(purchaseModel);

            ResourcesAccrualStorage.Instance.SetResourcesModels(new List <ResourceModel>()
            {
                resourceModel
            });
            ResourcesAccrualStorage.Instance.SetNoLootboxNeeded();
            lobbyEcsController.ClosePurchaseConfirmationWindow();
            lobbyEcsController.CloseShopLayer();

            cts?.Cancel();
            cts = new CancellationTokenSource();
            lobbyModelDownloadingTask = new LobbyModelLoader().Load(cts.Token);
        }