예제 #1
0
 protected override void InitItem()
 {
     serverName        = this.GetComponentInChildren <GUISingleLabel>();
     serverState       = this.GetComponentInChildren <GUISingleSprite>();
     serverBtn         = this.GetComponentInChildren <GUISingleButton>();
     serverBtn.onClick = OnClick;
 }
예제 #2
0
 protected override void Init()
 {
     base.Init();
     resultShowObj   = transform.Find("ResultShow").gameObject;
     multList        = transform.Find("ResultShow/ScrollView/MultList").GetComponent <GUISingleMultList>();
     view            = transform.Find("ResultShow/ScrollView");
     scrollBar       = transform.Find("ResultShow/ScrollBar").GetComponent <UIScrollBar>();
     useEffect       = transform.Find("EffectPanel/UI_DianJinShou_01");
     towBaojiEffect  = transform.Find("EffectPanel/UI_DianJinShou_BJx2");
     fiveBaojiEffect = transform.Find("EffectPanel/UI_DianJinShou_BJx5");
     tenBaojiEffect  = transform.Find("EffectPanel/UI_DianJinShou_BJx10");
     useEffect.gameObject.SetActive(false);
     towBaojiEffect.gameObject.SetActive(false);
     fiveBaojiEffect.gameObject.SetActive(false);
     tenBaojiEffect.gameObject.SetActive(false);
     maskObj            = transform.Find("Mask").gameObject;
     backBtn            = transform.Find("BackBtn").GetComponent <GUISingleButton>();
     oneUseBtn          = transform.Find("OneUseBtn").GetComponent <GUISingleButton>();
     moreUseBtn         = transform.Find("MoreUseBtn").GetComponent <GUISingleButton>();
     des                = transform.Find("Des").GetComponent <GUISingleLabel>();
     useCount           = transform.Find("UseCount").GetComponent <GUISingleLabel>();
     jewelCountTxt      = transform.Find("JewelCountTxt").GetComponent <GUISingleLabel>();
     goldCountTxt       = transform.Find("GoldCountTxt").GetComponent <GUISingleLabel>();
     backBtn.onClick    = OnCancleClick;
     oneUseBtn.onClick  = OnOneUseBtnClick;
     moreUseBtn.onClick = OnMoreUseBtnClick;
     UIEventListener.Get(maskObj).onClick += OnCloseClick;
     //multList.ScrollView = view;
     //goldHandTimes = playerData.GetInstance().goldHand.maxcount - playerData.GetInstance().goldHand.curcount;//连接服务器后 这个需要注销
 }
예제 #3
0
 /// <summary>
 /// item初始化函数
 /// </summary>
 protected override void InitItem()
 {
     //初始化
     icon     = transform.Find("Icon").GetComponent <UISprite>();
     nameTxt  = transform.Find("NameTxt").GetComponent <GUISingleLabel>();
     label    = transform.Find("Label").GetComponent <GUISingleLabel>();
     countTxt = transform.Find("CountTxt").GetComponent <GUISingleLabel>();
 }
예제 #4
0
 /// <summary>
 /// item初始化函数
 /// </summary>
 protected override void InitItem()
 {
     label     = this.GetComponentInChildren <GUISingleLabel>();
     button    = this.GetComponentInChildren <GUISingleButton>();
     highlight = this.GetComponentInChildren <GUISingleSprite>();
     highlight.gameObject.SetActive(false);
     button.onClick = OnSelectServer;
 }
예제 #5
0
    private void GetHeroArr()
    {
        string name           = "";
        string currentattrstr = "";
        string nextlvattrstr  = "";

        playerData.GetInstance().selectHeroDetail.RefreshAttr();
        float[]  itemarr     = playerData.GetInstance().selectHeroDetail.charAttrs;
        HeroData myHd        = playerData.GetInstance().selectHeroDetail;
        HeroData nextGradeHd = new HeroData(myHd.id, myHd.lvl, myHd.grade + 1, myHd.star);

        nextGradeHd.equipSite = myHd.equipSite;
        nextGradeHd.RefreshAttr();
        float[] nextgradearr = nextGradeHd.charAttrs;
        for (int i = 0; i < itemarr.Length; i++)
        {
            if (itemarr[i] > 0)
            {
                name           += propertyname[i] + "\n";
                currentattrstr += ((int)itemarr[i]).ToString() + "\n";
                nextlvattrstr  += ((int)nextgradearr[i]).ToString() + "\n";
            }
        }
        nextGradeHd   = null;
        heroPreView   = transform.Find("HeroPreview").GetComponent <UIScrollView>();
        attrName      = transform.Find("HeroPreview/AttrName").GetComponent <GUISingleLabel>();
        attrValue     = transform.Find("HeroPreview/AttrValue").GetComponent <GUISingleLabel>();
        nextAttrValue = transform.Find("HeroPreview/NextAttrValue").GetComponent <GUISingleLabel>();
        if (attrName != null)
        {
            attrName.text = name;
            UIWidget widget = attrName.GetComponent <UIWidget>();
            if (widget != null)
            {
                bool vis = widget.isVisible;

                if (!vis)
                {
                    this.gameObject.SetActive(true);
                }

                this.gameObject.SetActive(vis);
            }
            NGUITools.AddWidgetCollider(attrName.gameObject, true);
        }
        if (attrValue != null)
        {
            attrValue.text = currentattrstr;
        }
        if (nextAttrValue != null)
        {
            nextAttrValue.text = nextlvattrstr;
        }
        if (heroPreView != null)
        {
            heroPreView.ResetPosition();
        }
    }
예제 #6
0
 protected override void InitItem()
 {
     itemicon     = transform.Find("Itemicon").GetComponent <GUISingleSprite>();
     qualityframe = transform.Find("Qualityframe").GetComponent <GUISingleSprite>();
     itemcount    = transform.Find("Itemcount").GetComponent <GUISingleLabel>();
     debris       = transform.Find("Debris");
     //UIEventListener.Get(itemicon.gameObject).onPress = OnPress;
     //UIEventListener.Get(itemicon.gameObject).onClick = OnClick;
 }
예제 #7
0
 protected override void InitItem()
 {
     itemicon     = transform.Find("Itemicon").GetComponent <GUISingleSprite>();
     qualityframe = transform.Find("Qualityframe").GetComponent <GUISingleSprite>();
     itemcount    = transform.Find("Itemcount").GetComponent <GUISingleLabel>();
     effect       = transform.Find("Effect").GetComponent <PlayEffect>();
     debris       = transform.Find("Debris");
     ziEffect     = transform.Find("UI_HDJL_01");
     chengEffect  = transform.Find("UI_HDJL_02");
 }
예제 #8
0
 protected override void Init()
 {
     base.Init();
     // btn = transform.Find("Empty/Btn").GetComponent<GUISingleButton>();
     newMailCount = transform.Find("NewMailCount").GetComponent <GUISingleLabel>();
     // mailSprite = transform.Find("MailSprite").GetComponent<UISprite>();
     newMailHint = transform.Find("NewMailHint").GetComponent <UISprite>();
     //   btn.onClick = OnBtnClick;
     playerData.GetInstance().NewMailHint += SetNewMailHint;
 }
예제 #9
0
 protected override void InitItem()
 {
     sprite        = transform.GetComponent <UISprite>();
     icon          = transform.Find("Icon").GetComponent <GUISingleButton>();
     count         = transform.Find("Count").GetComponent <GUISingleLabel>();
     getMask       = transform.Find("GetMask").GetComponent <UISprite>();
     xuanZhongIcon = transform.Find("XuanZhongIcon");
     debris        = transform.Find("Debris");
     if (index == 0)
     {
         transform.gameObject.SetActive(true);
     }
     icon.onClick = OnIconClick;
 }
예제 #10
0
 protected override void InitItem()
 {
     sprite        = transform.GetComponent <UISprite>();
     Sign_inListOK = transform.Find("Sign_inListOK").GetComponent <UISprite>();
     OK            = transform.Find("OK").GetComponent <UISprite>();
     VIP           = transform.Find("VIP").GetComponent <UISprite>();
     count         = transform.Find("Count").GetComponent <GUISingleLabel>();
     xuanZhongIcon = transform.Find("XuanZhongIcon");
     time          = TimeManager.Instance.ConvertIntDateTime(Auxiliary.GetNowTime());
     if (index == 0)
     {
         transform.gameObject.SetActive(true);
     }
     icon.onClick = OnIconClick;
 }
예제 #11
0
파일: UIMoney.cs 프로젝트: moto2002/moba
    //private GameObject vitalityObj;
    protected override void Init()
    {
        energyTxt         = transform.Find("EnergyTxt").GetComponent <GUISingleLabel>();
        goldBtn.onClick   = OnGlogClick;
        jewelBtn.onClick  = OnJewelClick;
        energyBtn.onClick = OnEnergyClick;
        //vitalityBtn.onClick = OnVitalityClick;
        energyObj = transform.Find("EnergyDesBtn").gameObject;
        //vitalityObj = transform.Find("VitalityDesBtn").gameObject;
        UIEventListener.Get(energyObj).onPress = OnEnergyPress;
        //UIEventListener.Get(vitalityObj).onPress = OnVitalityPress;
        instance = this;

        playerData.GetInstance().ChangeMoneyEvent         += UpdateMoney;
        playerData.GetInstance().ChangeActionPoint        += UpdateActionPoint;
        playerData.GetInstance().ChangeActionPointCeiling += UpdateActionPointCeiling;
    }
예제 #12
0
파일: CommonItem.cs 프로젝트: moto2002/moba
 protected override void InitItem()
 {
     itemicon     = transform.Find("itemicon").GetComponent <GUISingleSprite>();
     qualityframe = transform.Find("qualityframe").GetComponent <GUISingleSprite>();
     itemcount    = transform.Find("itemcount").GetComponent <GUISingleLabel>();
 }