コード例 #1
0
    public override void InitUIData()
    {
        base.InitUIData();

        SpriteImage    = selfTransform.FindChild("Good_Image").GetComponent <Image>();
        IsReceiveImage = selfTransform.FindChild("Received").GetComponent <Image>();
        ReceivedText   = selfTransform.FindChild("Received/ReceivedText").GetComponent <Text>();
        NumText        = selfTransform.FindChild("BG_Image/Num").GetComponent <Text>();
        GoName         = selfTransform.FindChild("NameText").GetComponent <Text>();
        ReceiveGo      = selfTransform.FindChild("Received").gameObject;
        star           = transform.FindChild("star").GetComponent <UIHeroStar>();

        //符文
        RuneIcon  = selfTransform.FindChild("RuneIconItem").gameObject;
        mNorBg    = selfTransform.FindChild("RuneIconItem/RuneIconList/bg").GetComponent <Image>();
        mSpecBg   = selfTransform.FindChild("RuneIconItem/RuneIconList/bg1").GetComponent <Image>();
        RuneImage = selfTransform.FindChild("RuneIconItem/RuneIconList/icon").GetComponent <Image>();
        mTypeObjs = new GameObject[4];
        for (int i = 0; i < 4; i++)
        {
            mTypeObjs[i] = transform.FindChild("RuneIconItem/RuneIconList/bg/type" + (i + 1)).gameObject;
        }

        IsReceiveImage.sprite = HaveReceive;
        ReceivedText.text     = GameUtils.getString("sign_content4");
    }
コード例 #2
0
        public void ShowRune(ItemTemplate _temp_rune, bool nativeSize = true)
        {
            //符文
            RuneIcon  = selfTransform.FindChild("RuneIconItem").gameObject;
            mNorBg    = selfTransform.FindChild("RuneIconItem/RuneIconList/bg").GetComponent <Image>();
            mSpecBg   = selfTransform.FindChild("RuneIconItem/RuneIconList/bg1").GetComponent <Image>();
            RuneImage = selfTransform.FindChild("RuneIconItem/RuneIconList/icon").GetComponent <Image>();
            this.star = transform.FindChild("star").GetComponent <UIHeroStar>();
            mTypeObjs = new GameObject[4];
            for (int i = 0; i < 4; i++)
            {
                mTypeObjs[i] = transform.FindChild("RuneIconItem/RuneIconList/bg/type" + (i + 1)).gameObject;
            }

            string _tempIconNam_2 = _temp_rune.getIcon();

            RuneImage.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _tempIconNam_2);
            if (nativeSize)
            {
                RuneImage.SetNativeSize();
            }

            bool isSpecial = RuneModule.IsSpecialRune(_temp_rune);

            SetIsSpecial(isSpecial);
            SetRuneType(_temp_rune.getRune_type());

            this.star.gameObject.SetActive(true);
            int star    = _temp_rune.getRune_quality();
            int maxStar = 5;

            this.star.Set(star, maxStar);
        }
コード例 #3
0
    public override void InitUIData()
    {
        base.InitUIData();
        icon    = transform.FindChild("icon").GetComponent <Image>();
        desc    = transform.FindChild("desc").GetComponent <Text>();
        numText = transform.FindChild("img/numText").GetComponent <Text>();
        star    = transform.FindChild("star").GetComponent <UIHeroStar>();

        //符文
        RuneIcon  = selfTransform.FindChild("RuneIconItem").gameObject;
        mNorBg    = selfTransform.FindChild("RuneIconItem/RuneIconList/bg").GetComponent <Image>();
        mSpecBg   = selfTransform.FindChild("RuneIconItem/RuneIconList/bg1").GetComponent <Image>();
        RuneImage = selfTransform.FindChild("RuneIconItem/RuneIconList/icon").GetComponent <Image>();
        mTypeObjs = new GameObject[4];
        for (int i = 0; i < 4; i++)
        {
            mTypeObjs[i] = transform.FindChild("RuneIconItem/RuneIconList/bg/type" + (i + 1)).gameObject;
        }
    }