private void HandleClick() { currentPrizeIndex++; //Если все призы уже показаны if (currentPrizeIndex == resourceModels.Count) { //Вернуться в лобби lootboxUiStorage.resourcesRoot.transform.DestroyAllChildren(); lootboxLobbyLoaderController.LoadLobbyScene(); return; } //Если есть ресурсы, которые нужно показать uiSoundsManager.PlayAdding(); ResourceModel resourceModel = resourceModels[currentPrizeIndex]; LootboxEntity entity1 = lootboxContext.CreateEntity(); entity1.AddShowPrize(resourceModel); LootboxEntity entity2 = lootboxContext.CreateEntity(); int itemsLeftCount = resourceModels.Count - currentPrizeIndex - 1; entity2.AddItemsLeft(itemsLeftCount); }