void Awake()
 {
     _petEquipPopup = this;
     petEquipBG     = transform.Find("PetEquiptInf/PetEquipBg").GetComponent <Image>();
     petEquipText   = transform.Find("PetEquiptInf/PetIntroduction/PetEquipText").GetComponent <Text>();
     petQualityText = transform.Find("PetEquiptInf/PetIntroduction/PetQualityText/Text").GetComponent <Text>();
     petDamageText  = transform.Find("PetEquiptInf/PetIntroduction/PetDamageText/Text").GetComponent <Text>();
     petHpText      = transform.Find("PetEquiptInf/PetIntroduction/PetHpText/Text").GetComponent <Text>();
     petDesText     = transform.Find("PetEquiptInf/PetIntroduction/PetDesText").GetComponent <Text>();
     petPowerText   = transform.Find("PetEquiptInf/PetIntroduction/PetPowerText/Text").GetComponent <Text>();
     petLevelText   = transform.Find("PetEquiptInf/PetIntroduction/PetLevelText/Text").GetComponent <Text>();
     petEquipbtn    = transform.Find("PetEquiptInf/Petequipbtn").GetComponent <Button>();
     closeBtn       = transform.Find("PetEquiptInf/Close").GetComponent <Button>();
 }
Beispiel #2
0
    private void Awake()
    {
        _petEquipShow = this;
        btn           = transform.GetComponent <Button>();
        eq            = new PetEquipPopup();
        btn.onClick.AddListener(delegate() {
            if (it != null)
            {
                object[] objectArray = new object[1];
                objectArray[0]       = it;


                transform.parent.parent.parent.Find("PetEquipPopup").SendMessage("Show", objectArray);
                transform.parent.parent.parent.Find("PetEquipPopup/PetEquiptInf").gameObject.SetActive(true);
            }
        });
        clothBtn = this.GetComponent <Button>();
    }