Ejemplo n.º 1
0
 protected virtual void Awake()
 {
     nameLbl = transform.Find("Name").GetComponent<UILabel>();
     atkLbl = transform.Find("Attack/AtkValue").GetComponent<UILabel>();
     hpLbl = transform.Find("Hp/HpValue").GetComponent<UILabel>();
     lvlLbl = transform.Find("BG/Level/LevelValue").GetComponent<UILabel>();
     longPress = transform.Find("BG").GetComponent<NGUILongPress>();
     var bindIconTran = Utils.FindChild(transform, "BindIcon");
     if (bindIconTran)
     {
         bindIcon = bindIconTran.GetComponent<UISprite>();
     }
     var iconTran = Utils.FindChild(transform, "Icon");
     if (iconTran)
     {
         icon = iconTran.GetComponent<UISprite>();
     }
     var jobIconTran = Utils.FindChild(transform, "JobIcon");
     if (jobIconTran)
     {
         jobIcon = jobIconTran.GetComponent<UISprite>();
     }
 }
Ejemplo n.º 2
0
 void Awake()
 {
     longPressControl = gameObject.GetComponent<NGUILongPress>();
     if (!longPressControl)
     {
         return;
     }
     longPressControl.OnLongPress = ShowSkillDetail;
     longPressControl.OnLongPressFinish = CloseSkillDetail;
     longPressControl.OnNormalPress = OnHeadClick;
     SkillDetail.SetActive(false);
 }