Пример #1
0
        public void ShowRewards(AppDemoLootLockerRequests.Item item, AppDemoLootLockerRequests.Group group, AppDemoLootLockerRequests.Collectable collectable)
        {
            if (item.collected)
            {
                for (int i = 0; i < item.rewards.Length; i++)
                {
                    PopupSystem.ShowScheduledPopup(item.rewards[i]);
                }
            }

            if (group.completion_percentage >= 100)
            {
                for (int i = 0; i < group.rewards.Length; i++)
                {
                    PopupSystem.ShowScheduledPopup(group.rewards[i]);
                }
            }

            if (collectable.completion_percentage >= 100)
            {
                for (int i = 0; i < collectable.rewards.Length; i++)
                {
                    PopupSystem.ShowScheduledPopup(collectable.rewards[i]);
                }
            }
        }
Пример #2
0
 public void Init(string collectableName, AppDemoLootLockerRequests.Item item)
 {
     itemToCollect = collectableName;
     string[] names = itemToCollect.Split('.');
     groupName = names[1];
     itemName  = names[2];
     UpdateButtonAppearance(item);
 }
Пример #3
0
        private void UpdateButtonAppearance(AppDemoLootLockerRequests.Item item)
        {
            this.item = item;
            string sub = item.collected ? "_Active" : "_Inactive";

            item.url     = groupName + sub;
            item.preview = image;
            TexturesSaver.QueueForDownload(item);
            button.interactable = !item.collected;
        }