// Use this for initialization void Start() { camAdjust = true; instanciatedObjects = new List <GameObject>(); costText = GameObject.FindGameObjectWithTag("CostField"); scrollList = GameObject.FindGameObjectWithTag("Cart").GetComponent <ShopScrollList>(); }
public void Setup(Item currentItem, ShopScrollList currentScrollList) { item = currentItem; ItemName.text = item.ItemName; ItemImage.sprite = item.Icon; PriceText.text = item.ItemPrice.ToString(); scrollList = currentScrollList; }
// Set up Only Field Buy public void Setup(DefaultField currentField, ShopScrollList currentScrollList) { field = currentField; nameLabel.text = "Land"; priceText.text = currentField.cost.ToString() + " Baht."; scrollList = currentScrollList; buttonComponent.onClick.AddListener(HandleClickField); }
public void Setup(Item currentItem, ShopScrollList currScrollList) { item = currentItem; nameLabel.text = item.itemName; priceText.text = "£ " + item.price.ToString(); iconImage.sprite = item.icon; scrollList = currScrollList; //button knows what list it currently belongs to }
public void Setup(Item currentItem, ShopScrollList currentScrollList) { item = currentItem; nameLabel.text = item.itemName; iconImage.sprite = item.icon; priceText.text = item.price.ToString("###.#") + " Lv" + item.numOwned; scrollList = currentScrollList; }
public void Setup(Items currentItem, ShopScrollList currentList) { item = currentItem; nameLabel.text = item.itemName; iconImage.sprite = item.icon; priceText.text = item.price.ToString(); scrollList = currentList; }
public void Setup(Item currentItem, ShopScrollList currentShopScrollList) { item = currentItem; nameLabel.text = item.name; icon.sprite = item.icon; priceLabel.text = item.price.ToString(); scrollList = currentShopScrollList; }
public void Setup(Piatto currentItem, ShopScrollList currentScrollList) { item = currentItem; nameLabel.text = item.Nome; iconImage = item.UrlFoto; priceText.text = ("€ " + item.Prezzo.ToString()); scrollList = currentScrollList; }
public void Setup(Item currentItem, ShopScrollList currentScrollList) { item = currentItem; nameLabel.text = item.itemName; priceLabel.text = item.price.ToString(); iconImage.sprite = item.icon; scrollList = currentScrollList; // so that our button knows to what list it currently belongs to. For interactivity }
public void Setup(Item currentItem, ShopScrollList list) { item = currentItem; scrollList = list; itemName.text = item.itemName; itemPrict.text = item.price.ToString(); itemIcon.sprite = item.icon; }
public void SetUp(SeedPacketItem currentPacket, ShopScrollList currentScrollList) { packet = currentPacket; ItemName.text = packet.Packet_Of; ItemPrice.text = packet.PacketPrice.ToString(); ItemIcon.sprite = packet.PacketGraphic; scrollList = currentScrollList; }
public void Setup(Item currentItem, ShopScrollList currentScrollList) { _item = currentItem; nameLabel.text = _item.itemName; priceLabel.text = _item.price.ToString(); iconImage.sprite = _item.icon; _scrollList = currentScrollList; }
public void Setup(Item currentItem, ShopScrollList currentScrollList) { item = currentItem; nameLabel.text = item.itemName; priceLabel.text = item.price.ToString(); StartCoroutine(GetTexture(item.url, iconImage)); scrollList = currentScrollList; }
private void RemoveItem(Item item, ShopScrollList shopList) { for (int i = shopList.items.Count - 1; i >= 0; --i) { if (shopList.items[i] == item) { shopList.items.RemoveAt(i); } } }
private void RemoveItem(Item itemToRemove, ShopScrollList shopList) { //for (int i = shopList.itemList.Count - 1; i >= 0 ; i--) //{ // if (shopList.itemList[i] == itemToRemove) // shopList.itemList.RemoveAt(i); //} shopList.itemList.RemoveAll(i => i == itemToRemove); }
// Use this for initialization // void Awake () // { // buttonComponent.onClick.AddListener (HandleClick); // } //Set up Field Buy and seed public void Setup(DefaultField currentField, Seed currentItem, ShopScrollList currentScrollList) { item = currentItem; field = currentField; nameLabel.text = item.name; priceText.text = (item.cost + field.cost).ToString() + " Baht."; scrollList = currentScrollList; buttonComponent.onClick.AddListener(HandleClickSeed); Debug.Log(item); }
public void Setup(Item currentItem, ShopScrollList currentScrollist) { item = currentItem; nameLabel.text = item.itemName; iconImage.sprite = item.icon; priceText.text = item.price.ToString() + " $ "; scrollList = currentScrollist; GetComponent <Button>().onClick.AddListener(HandleClick); }
protected void RemoveItem(Item item, ShopScrollList shopList) { for (int i = shopList.ItemList.Count - 1; i >= 0; i--) { if (shopList.ItemList[i] == item) { shopList.ItemList.RemoveAt(i); } } }
private void RemoveItem(ShopScrollItem itemToRemove, ShopScrollList shopList) { for (int i = shopList.itemList.Count - 1; i >= 0; i--) { if (shopList.itemList[i] == itemToRemove) { shopList.itemList.RemoveAt(i); } } }
private void RemoveItem(Building itemToRemove, ShopScrollList shopList) { for (int i = shopList.buildings.Count - 1; i >= 0; i--) { if (shopList.buildings[i] == itemToRemove) { shopList.buildings.RemoveAt(i); } } }
private void RemoveItem(Item itemToRemove, ShopScrollList shopList) { // Don't really got why .Remove() is not enough. for (int i = shopList.itemList.Count - 1; i >= 0; i--) { if (shopList.itemList[i] == itemToRemove) { shopList.itemList.RemoveAt(i); } } }
public void Setup(ShopScrollItem currentItem, ShopScrollList currentScrollList) { item = currentItem; scrollList = currentScrollList; //ui //CGame.Instance.Icon_set_by_item_index(item.item_index, iconImage); //nameLabel.text = item.itemName; //CGame.Instance.Icon_set_by_price_type(item.price_type, priceImage); //priceText.text = item.price_value.ToString(); }
void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } }
public void Setup(Music currentItem, ShopScrollList currentScrollList) { //Set song song = currentItem; //Set song name to Text object nameLabel.text = song.songName; //Set Scroll List scrollList = currentScrollList; }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
public void SetupPanelShopSkillPrefab(ShopSkill currentItem, ShopScrollList shopScrollList) { _shopSkill = currentItem; _shopScrollList = shopScrollList; ShopSkillID = _shopSkill.ShopSkillID; SkillImg.sprite = _shopSkill.SkillImg; BgPriceImg.sprite = _shopSkill.BgPriceImg; SkillDescriptionText.text = _shopSkill.ItemDescription; PriceText.text = $"{_shopSkill.Price}"; AvailableOrNotText.text = _shopSkill.AvailableOrNotText; }
public void Setup(Item item, ShopScrollList scrollList) { uiMgr = UIManager.instance; this.scrollList = scrollList; this.item = item; nameLabel.text = item.name; priceLabel.text = "$ " + item.value.ToString(); //iconImage.sprite = item.icon; button.onClick.AddListener(OnClick); }
//------------------------------------------------------ public void Setup(Item currentItem, ShopScrollList currentScrollList, GameObject tempPainel, int slotIdTemp, ItemOnShop shopTemp) { slotId = slotIdTemp; item = currentItem; nameLabel.text = item.itemName; iconImage.sprite = item.artwork; tempShopPrices = shopTemp; season = currentScrollList.tempData.season; switch (season) { case 0: buyValue = shopTemp.SpringBuy; sellValue = shopTemp.SpringSell; break; case 1: buyValue = shopTemp.SummerBuy; sellValue = shopTemp.SummerSell; break; case 2: buyValue = shopTemp.AutumBuy; sellValue = shopTemp.AutumSell; break; case 3: buyValue = shopTemp.WinterBuy; sellValue = shopTemp.WinterSell; break; default: break; } if (tempPainel.name == "PlayerContentPainel" || tempPainel.name == "SellContent") { priceText.text = "<color=green>" + sellValue.ToString() + "G</color>"; } else { priceText.text = "<color=red>-" + buyValue.ToString() + "G</color>"; } if (tempPainel.name == "ShopContent") { amount.text = ""; } if (tempPainel.name == "CartContent") { nameLabel.text = "x1"; } scrollList = currentScrollList; tempPainelGameObject = tempPainel; }
public void Setup(Item currentItem, ShopScrollList currentScrollList) { // Debug.Log(string.Format("currentItem.itemName: {0}", currentItem.itemName)); item = currentItem; //Debug.Log(string.Format("currentItem.itemName: {0}", item.itemName)); nameLabel.text = currentItem.itemName; priceLabel.text = currentItem.price.ToString(); iconImage.sprite = currentItem.icon; scrollList = currentScrollList; }
public void SetupShopItem(Weapon currentItem, ShopScrollList currentScrollList) { _weapon = currentItem; nameText.text = _weapon.name; dmgText.text = "DMG: " + _weapon.damage; firerateText.text = "FIRERATE: " + _weapon.fireRate; energyConsumText.text = "ENERGY CONSUM.: " + _weapon.energyConsumption; priceLabel.text = _weapon.priceInShop.ToString(); iconImage.sprite = _weapon.icon; _scrollList = currentScrollList; }