void OnReceivedTexture(ItemTextureCache.ImageStatus statusMsg, Texture2D texture) { UITexture uiTexture = gameObject.GetComponentInChildren<UITexture>(); uiTexture.material = new Material(uiTexture.material.shader); uiTexture.mainTexture = texture; uiTexture.transform.localPosition -= Vector3.forward * 2; }
void OnItemInGrid(PremiumCurrencyBundle item, GameObject obj) { PremiumBundle creditBundle = obj.GetComponent <PremiumBundle>(); creditBundle.Amount = item.CreditAmount.ToString(); creditBundle.Cost = item.Cost.ToString(); if (item.Data.Count > 0) { creditBundle.ProductID = item.Data[0].Value; } //if (item.CreditPlatformIDs.ContainsKey("IOS_Product_ID")) // creditBundle.ProductID = item.CreditPlatformIDs["IOS_Product_ID"].ToString(); creditBundle.BundleID = item.ID.ToString(); creditBundle.PremiumCurrencyName = ""; creditBundle.Description = item.Description; if (!string.IsNullOrEmpty(item.Image)) { ItemTextureCache.GetItemTexture(item.Image, delegate(Texture2D texture) { creditBundle.SetIcon(texture); }); } creditBundle.SetBundleName(item.Name); creditBundle.OnPurchaseRequest = OnPurchaseRequest; }
void OnReceivedItemTexture(ItemTextureCache.ImageStatus statusMsg, Texture2D texture) { if (statusMsg == ItemTextureCache.ImageStatus.Error) IntegrationTest.Pass(gameObject); else IntegrationTest.Fail(gameObject); }
void OnReceivedItemTexture(ItemTextureCache.ImageStatus statusMsg, Texture2D texture) { if (statusMsg == ItemTextureCache.ImageStatus.Web) ItemTextureCache.instance.GetItemTexture("http://www.desicomments.com/dc3/01/209982/209982.gif", OnReceivedImageTextureTwo); else IntegrationTest.Fail(gameObject); }
public virtual void Init(StoreItem item, UnityUIStoreLoader unityStoreLoader) { storeItem = item; storeLoader = unityStoreLoader; ItemTextureCache.GetItemTexture(storeItem.ItemInformation.ImageName, OnReceivedItemTexture); StoreItemText.text = storeItem.ItemInformation.Name; SetPriceDisplay(); }
public void Start() { holdingContainer = this.transform.GetComponentInParent <ItemContainerDisplay>(); itemObject = this.GetComponent <ItemDataComponent>(); SetAmountText(itemObject.itemData.Amount.ToString()); ItemTextureCache.GetItemTexture(itemObject.itemData.Information.ImageName, OnReceivedItemTexture); //SetFrameColor(ItemQuailityColorSelector.GetColorForItem(itemObject.itemData)); }
public void SetupBundleItemDisplay(ItemBundleInfo.BundleItemInformation newBundleItem) { bundleItem = newBundleItem; ItemName.text = bundleItem.Information.Name; itemAmount.text = "Amount: " + bundleItem.Amount; ItemStats.text = ""; ItemTextureCache.GetItemTexture(bundleItem.Information.ImageName, OnReceivedItemTexture); }
private static void GetWolrdCurrencyInfo(List <int> location) { if (!IsGettingWolrdCurrency) { IsGettingWolrdCurrency = true; ItemStoreServices.GetCurrencyInfo(worldCurrencyInfo => { ItemTextureCache.GetItemTexture(worldCurrencyInfo.PremiumCurrencyImage, icon => { PremiumInfo = new CurrencyDetails() { Name = worldCurrencyInfo.PremiumCurrencyName, Icon = icon }; if (RecivedPremiumDetails != null) { RecivedPremiumDetails(PremiumInfo.Name, PremiumInfo.Icon); } }); ItemStoreServices.GetPremiumCurrencyBalance(premiumCurrencyResponse => { PremiumAmount = premiumCurrencyResponse.Amount; if (RecivecdPremiumAmount != null) { RecivecdPremiumAmount(premiumCurrencyResponse.Amount); } }); ItemTextureCache.GetItemTexture(worldCurrencyInfo.StandardCurrencyImage, icon => { StandardInfo = new CurrencyDetails() { Name = worldCurrencyInfo.StandardCurrencyName, Icon = icon }; if (RecivedStandardDetails != null) { RecivedStandardDetails(StandardInfo.Name, StandardInfo.Icon); } }); ItemStoreServices.GetStandardCurrencyBalance(new StandardCurrencyBalanceRequest(StandardCurrencyLoaction), standardCurrencybalance => { StandardAmount = standardCurrencybalance.Total; if (RecivecdStandardAmount != null) { RecivecdStandardAmount(standardCurrencybalance.Total); } }); }); } }
public void SetupUnityUIItemBundle(ItemBundleInfo newItemBundle, UnityUIBundlePurchasing purchasing) { itemBundle = newItemBundle; bundlePurchasing = purchasing; ItemTextureCache.GetItemTexture(itemBundle.Image, OnReceivedItemTexture); StoreItemText.text = itemBundle.Name; Button button = GetComponent <Button>(); button.onClick.AddListener(OnClickedItemBundle); ChangePurchaseButtonDisplay(itemBundle.PremiumPrice, itemBundle.StandardPrice); }
void SetBundleItemToDisplay(int index) { ItemBundleInfo.BundleItemInformation bundleitem = itemBundle.Items[index]; ItemName.text = bundleitem.Information.Name; string formated = ""; //foreach (BundleItemDetails detail in bundleitem.bundleItemDetails) //{ // formated = string.Format("{0}{1}: {2}\n", formated, detail.BundleDetailName, detail.Value.ToString()); //} ItemDetails.text = formated; ItemTextureCache.GetItemTexture(bundleitem.Information.ImageName, OnReceivedItemTexture); }
void OnReceivedItemTexture(ItemTextureCache.ImageStatus statusMsg, Texture2D texture) { if (isFirstCall) { if (statusMsg != ItemTextureCache.ImageStatus.Web) IntegrationTest.Fail(gameObject); isFirstCall = false; } else { if (statusMsg == ItemTextureCache.ImageStatus.Cache) IntegrationTest.Pass(gameObject); else IntegrationTest.Fail(gameObject); } }
void OnReceivedItemTexture(ItemTextureCache.ImageStatus imgStatus, Texture2D texture) { GetComponentInChildren<UITexture>().mainTexture = texture; }
void Start() { instance = this; }