示例#1
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;
        }
示例#2
0
        //private Asset asset;

        public void Init(InventoryAssetResponse.DemoAppAsset asset)
        {
            //this.asset = asset;
            if (asset != null)
            {
                text.text     = asset.name;
                asset.preview = preview;
            }
            TexturesSaver.QueueForDownload(asset);
        }
示例#3
0
 public void DownloadFile(TypeOfFile typeOfFile)
 {
     switch (typeOfFile)
     {
     case TypeOfFile.Image:
         TempImageClass tempImageClass = new TempImageClass();
         tempImageClass.url                 = url;
         tempImageClass.preview             = image;
         tempImageClass.OnDownloadCompleted = () => { LoadingManager.HideLoadingScreen(); };
         TexturesSaver.QueueForDownload(tempImageClass);
         break;
     }
 }
示例#4
0
 public void Init(InventoryAssetResponse.Inventory inventory, bool isDefault, int amountOfInventories)
 {
     inventoryAssetPair.inventory = inventory;
     inventoryAssetPair.asset     = inventory.asset;
     amountText.text = amountOfInventories <= 1 ? "" : amountOfInventories.ToString();
     if (inventory.asset != null)
     {
         inventory.asset.preview = preview;
     }
     TexturesSaver.QueueForDownload(inventory.asset);
     activeBorder.GetComponent <Image>().color = inActiveColor;
     isDefaultActive = isDefault;
     if (isDefault)
     {
         Activate();
     }
 }
示例#5
0
        public void Init(ILootLockertemData data)
        {
            this.data = data;
            asset     = data as InventoryAssetResponse.DemoAppAsset;
            InventoryAssetResponse.Inventory inventory = data as InventoryAssetResponse.Inventory;
            if (asset == null && inventory != null)
            {
                asset = inventory.asset;
            }

            if (asset != null)
            {
                asset.preview = preview;
            }

            TexturesSaver.QueueForDownload(asset);
            activeBorder.GetComponent <Image>().color = inActiveColor;
            //if (inventory != null)
            //{
            //    activeBorder.SetActive((bool)inventory.rental.is_active);
            //}
        }
示例#6
0
        public static void ShowPopup(PopupData popupData)
        {
            Instance.currentPopup = popupData;
            Instance?.button?.onClick?.RemoveAllListeners();
            Instance?.button?.onClick?.AddListener(() => { popupData?.btnAction(); });
            Instance.normalText.text  = "";
            Instance.headerText.color = Color.black;

            if (popupData.normalText != null)
            {
                foreach (var data in popupData.normalText)
                {
                    Instance.normalText.text += popupData.withKey ? data.Key + " : " + data.Value + "\n" : data.Value + "\n";
                }
            }

            Instance.btnText.text     = popupData.buttonText;
            Instance.headerText.text  = popupData.header;
            Instance.headerText.color = popupData.isError ? Color.red : Color.black;
            Instance.GetComponent <ScreenOpener>()?.Open();
            popupData.preview = Instance.image;
            TexturesSaver.QueueForDownload(popupData);
        }