private void Awake() { _instance = this; priceText = transform.Find("InventoryImage/JiaGeText").GetComponent <Text>(); chuosheButton = transform.Find("InventoryImage/ChuoSheImage").GetComponent <Button>(); equipPopup = GameObject.Find("EquipPopupImage").GetComponent <EquipPopup>(); inventoryPopup = GameObject.Find("InventoryPopupImage").GetComponent <InventoryPopup>(); }
private void Awake() { inventory = transform.Find("BagDetails/InventoryPopup").GetComponent <InventoryPopup>(); equip = transform.Find("BagDetails/EquipPopup").GetComponent <EquipPopup>(); t1 = transform.Find("BagDetails/ToggleGroup/Toggle").GetComponent <Toggle>(); //页数 t2 = transform.Find("BagDetails/ToggleGroup/Toggle1").GetComponent <Toggle>(); sc = transform.Find("BagDetails/bagdetails/ScrInventory/Scrollbar").GetComponent <Scrollbar>(); //滚动 t1.onValueChanged.AddListener(ison); close = transform.Find("BagDetails/Closebtn").GetComponent <Button>(); //关闭 btnsale = transform.Find("BagDetails/btnsale").GetComponent <Button>(); //出售按钮 btnsale.onClick.AddListener(OnSale); pricesale = transform.Find("BagDetails/btnsale/saleprice").GetComponent <Text>(); //出售价格 DisableButton(); }
private void Awake() { _intance = this; equipPopup = transform.Find("EquipPopUP").GetComponent <EquipPopup>(); inventoryPopup = transform.Find("InventoryPopup").GetComponent <InventoryPopup>(); sellBtn = transform.Find("Inventory/Sell").GetComponent <Button>(); closeBtn = transform.Find("ButtonClose").GetComponent <Button>(); sellPriceTxt = transform.Find("Inventory/Price/Value").GetComponent <Text>(); sellBtn.onClick.AddListener(onSell); closeBtn.onClick.AddListener(onClose); disableSellBtn(); }
private void Awake() { btn = transform.GetComponent <Button>(); eq = new EquipPopup(); btn.onClick.AddListener(delegate() { if (it != null) { object[] objectArray = new object[3]; objectArray[0] = it; objectArray[1] = false; objectArray[2] = this; transform.parent.parent.SendMessage("OnInventoryClick", objectArray); } }); }
void Awake() { _instance = this; equipPopup = transform.Find("EquipPopup").GetComponent <EquipPopup>(); inventoryPoup = transform.Find("InventoryPopup").GetComponent <InventoryPopup>(); saleButton = transform.Find("Inventory/ButtonSale").GetComponent <UIButton>(); priceLabel = transform.Find("Inventory/PriceBg/Label").GetComponent <UILabel>(); tween = this.GetComponent <TweenPosition>(); closeKnapsackButton = transform.Find("CloseButton").GetComponent <UIButton>(); DisableButton(); EventDelegate ed = new EventDelegate(this, "OnSale"); saleButton.onClick.Add(ed); EventDelegate ed2 = new EventDelegate(this, "OnKnapsackClose"); closeKnapsackButton.onClick.Add(ed2); }
void Awake() { _Instance = this; tween = this.GetComponent <TweenPosition>(); equipPopup = transform.Find("EquipPopup").GetComponent <EquipPopup>(); inventoryPopup = transform.Find("InventoryPopup").GetComponent <InventoryPopup>(); sellPriceLabel = transform.Find("Inventory/Sell/PriceLabel").GetComponent <UILabel>(); sellBtn = transform.Find("Inventory/SellBtn").GetComponent <UIButton>(); EventDelegate ed = new EventDelegate(this, "OnSellClick"); sellBtn.onClick.Add(ed); DisableSellBtn(); }
void Awake() { equip = transform.Find("EquipPanel/EquipPopup").GetComponent<EquipPopup>(); inventoryPopup = transform.Find("InventoryPanel/inventoryPopup").GetComponent<InventoryPopup>(); priceLabel = transform.Find("Inventory/PriceBg/Label").GetComponent<UILabel>(); sellBtn = transform.Find("Inventory/SellButton").GetComponent<UIButton>(); closeBtn = transform.Find("CloseButton").GetComponent<UIButton>(); knapspackTween = this.GetComponent<TweenPosition>(); //注册点击事件 EventDelegate ed1 = new EventDelegate(this, "On_knapSpack_Close_Click"); closeBtn.onClick.Add(ed1); EventDelegate ed3 = new EventDelegate(this, "On_knapspack_sell_Click"); sellBtn.onClick.Add(ed3); DisenableButton(); }
void Awake() { _instance = this; equipPopup = transform.Find("EquipPopup").GetComponent<EquipPopup>(); inventoryPopup = transform.Find("InventoryPopup").GetComponent<InventoryPopup>(); saleButton = transform.Find("Inventory/ButtonSale").GetComponent<UIButton>(); priceLabel = transform.Find("Inventory/PriceBg/Label").GetComponent<UILabel>(); tween = this.GetComponent<TweenPosition>(); closeKnapsackButton = transform.Find("CloseButton").GetComponent<UIButton>(); DisableButton(); EventDelegate ed = new EventDelegate(this,"OnSale"); saleButton.onClick.Add(ed); EventDelegate ed2 = new EventDelegate(this,"OnKnapsackClose"); closeKnapsackButton.onClick.Add(ed2); }
void Awake() { equip = transform.Find("EquipPanel/EquipPopup").GetComponent <EquipPopup>(); inventoryPopup = transform.Find("InventoryPanel/inventoryPopup").GetComponent <InventoryPopup>(); priceLabel = transform.Find("Inventory/PriceBg/Label").GetComponent <UILabel>(); sellBtn = transform.Find("Inventory/SellButton").GetComponent <UIButton>(); closeBtn = transform.Find("CloseButton").GetComponent <UIButton>(); knapspackTween = this.GetComponent <TweenPosition>(); //注册点击事件 EventDelegate ed1 = new EventDelegate(this, "On_knapSpack_Close_Click"); closeBtn.onClick.Add(ed1); EventDelegate ed3 = new EventDelegate(this, "On_knapspack_sell_Click"); sellBtn.onClick.Add(ed3); DisenableButton(); }
private void Awake() { _equipPopUp = this; equipimg = transform.Find("EquiptInf/EquipBg").GetComponent <Image>(); equipText = transform.Find("EquiptInf/Introduction/EquipText").GetComponent <Text>(); qualityText = transform.Find("EquiptInf/Introduction/QualityText/Text").GetComponent <Text>(); damageText = transform.Find("EquiptInf/Introduction/DamageText/Text").GetComponent <Text>(); hpText = transform.Find("EquiptInf/Introduction/HpText/Text").GetComponent <Text>(); desText = transform.Find("EquiptInf/Introduction/DesText").GetComponent <Text>(); powerText = transform.Find("EquiptInf/Introduction/PowerText/Text").GetComponent <Text>(); levelText = transform.Find("EquiptInf/Introduction/LevelText/Text").GetComponent <Text>(); psText = transform.root.Find("Knapsack/Equipt/Property/ATTACK/PSText").GetComponent <Text>(); btntxt = transform.Find("EquiptInf/equipbtn/Text").GetComponent <Text>(); closebtn = transform.Find("EquiptInf/Close").GetComponent <Button>(); closebtn.onClick.AddListener(close); upgradebtn = transform.Find("EquiptInf/upgradebtn").GetComponent <Button>(); upgradebtn.onClick.AddListener(Upgrade); existBtn = transform.Find("EquiptInf/Exist/ExistBtn").GetComponent <Button>(); existBtn.onClick.AddListener(ExistUI); }
private void Awake() { equipPopup = transform.Find("EquipPopup").GetComponent <EquipPopup>(); _inventoryPopup = transform.Find("InventoryPopup").GetComponent <InventoryPopup>(); }
public override void Awake() { base.Awake(); equipPopup = transform.Find("EquipPopup").GetComponent <EquipPopup>(); inventoryPopup = transform.Find("InventoryPopup").GetComponent <InventoryPopup>(); }