Exemple #1
0
 void Awake()
 {
     UIEventListener.Get(NGUIUtils.FindGameObject(gameObject, "addAllBtn")).onClick += OnClickAddAll;
     UIEventListener.Get(NGUIUtils.FindGameObject(gameObject, "addBtn")).onClick    += OnClickAdd;
     UIEventListener.Get(NGUIUtils.FindGameObject(gameObject, "delBtn")).onClick    += OnClickDel;
     UIEventListener.Get(NGUIUtils.FindGameObject(gameObject, "delAllBtn")).onClick += OnClickDelAll;
 }
Exemple #2
0
        void Awake()
        {
            reqLevelTxt  = NGUIUtils.FindUIObject <UILabel>(gameObject, "reqLevelTxt");
            reqMenoryTxt = NGUIUtils.FindUIObject <UILabel>(gameObject, "reqMenoryTxt");
            bigEffect    = NGUIUtils.FindGameObject(gameObject, "BigEffect");
            smallEffect  = NGUIUtils.FindGameObject(gameObject.transform.parent.gameObject, "SmallEffect");

            InitTypeItem();
            InitSkillItem();
            InitReqItem();
            OnClickTypeItem(typeItems[0].gameObject);
            UIEventListener.Get(NGUIUtils.FindGameObject(gameObject, "upgradeBtn")).onClick = OnClickUpgrade;
        }
        void Awake()
        {
            skillNameTxt = NGUIUtils.FindUIObject <UILabel>(gameObject, "skillNameTxt");
            curDescTxt   = NGUIUtils.FindUIObject <UILabel>(gameObject, "curDescTxt");
            nextDescTxt  = NGUIUtils.FindUIObject <UILabel>(gameObject, "nextDescTxt");
            reqLevelTxt  = NGUIUtils.FindUIObject <UILabel>(gameObject, "reqLevelTxt");
            reqMoneyTxt  = NGUIUtils.FindUIObject <UILabel>(gameObject, "reqMoneyTxt");
            proBarSp     = NGUIUtils.FindUIObject <UISprite>(gameObject, "proBarSp");

            bigEffect = NGUIUtils.FindGameObject(gameObject, "BigEffect");

            UIEventListener.Get(NGUIUtils.FindGameObject(gameObject, "upgradeBtn")).onClick += OnUpgradeSkill;

            InitItem();
        }
Exemple #4
0
        protected void Init()
        {
            arrowList.Add("arrow_0_1", NGUIUtils.FindGameObject(gameObject, "arrow_0_1"));
            arrowList.Add("arrow_1_6", NGUIUtils.FindGameObject(gameObject, "arrow_1_6"));
            arrowList.Add("arrow_2_3", NGUIUtils.FindGameObject(gameObject, "arrow_2_3"));
            arrowList.Add("arrow_3_4", NGUIUtils.FindGameObject(gameObject, "arrow_3_4"));
            arrowList.Add("arrow_4_5", NGUIUtils.FindGameObject(gameObject, "arrow_4_5"));
            arrowList.Add("arrow_5_6", NGUIUtils.FindGameObject(gameObject, "arrow_5_6"));
            arrowList.Add("arrow_7_8", NGUIUtils.FindGameObject(gameObject, "arrow_7_8"));
            arrowList.Add("arrow_8_9", NGUIUtils.FindGameObject(gameObject, "arrow_8_9"));
            arrowList.Add("arrow_9_10", NGUIUtils.FindGameObject(gameObject, "arrow_9_10"));
            arrowList.Add("arrow_11_12", NGUIUtils.FindGameObject(gameObject, "arrow_11_12"));
            arrowList.Add("arrow_12_13", NGUIUtils.FindGameObject(gameObject, "arrow_12_13"));
            arrowList.Add("arrow_13_10", NGUIUtils.FindGameObject(gameObject, "arrow_12_10"));

            addBtn        = NGUIUtils.FindUIObject <UIImageButton>(gameObject, "addBtn");
            skillPointTxt = NGUIUtils.FindUIObject <UILabel>(gameObject, "skillPointTxt");

            InitItem();
            UpateItem();
        }
 protected GameObject FindGameObject(string name)
 {
     return(NGUIUtils.FindGameObject(viewGo, name));
 }
 protected T FindUIObject <T>(GameObject parent, string name) where T : Component
 {
     return(NGUIUtils.FindUIObject <T>(parent, name));
 }
 protected T FindUIObject <T>(string name) where T : Component
 {
     return(NGUIUtils.FindUIObject <T>(viewGo, name));
 }