Ejemplo n.º 1
0
        void Initialize()
        {
            //这结构要重新规划

            //fillRect
            RectTransform fillHolderRect = KComponentUtil.NeedChildComponent <RectTransform>(gameObject, "Container_fillArea/Container_fillHolder");

            this.fillRect            = fillHolderRect;
            fillHolderRect.sizeDelta = new Vector2(0, 0);

            //根据进度填充的那张图片
            m_fillImage = KComponentUtil.NeedChildComponent <StateImage>(gameObject, "Container_fillArea/Container_fillHolder/Image_fill");
            if (m_fillImage)
            {
                m_fillImageRect          = m_fillImage.gameObject.GetComponent <RectTransform>();
                m_fillImage.SlicedFilled = m_slicedFilled;
            }

            //handleRect
            GameObject handleGo = KComponentUtil.NeedChild(gameObject, "Container_handleArea/Container_handleHolder");

            if (handleGo != null)
            {
                RectTransform handleHolderRect = handleGo.GetComponent <RectTransform>();
                this.handleRect = handleHolderRect;
            }


            RefreshFillImage(this.value);

            base.onValueChanged.AddListener(onInternalValueChanged);
        }
Ejemplo n.º 2
0
        protected override void __Initialize()
        {
            m_prevImage = GetChildComponent <StateImage>("Image_arrowPrev");
            m_nextImage = GetChildComponent <StateImage>("Image_arrowNext");

            if (m_prevImage)
            {
                m_prevImage.Visible = false;
            }
        }
Ejemplo n.º 3
0
 private void CreateChildren()
 {
     m_spotlightImage         = GetChildComponent <StateImage>("Image_spotlight");
     m_spotlightImage.Visible = false;
 }
Ejemplo n.º 4
0
 protected override void __Initialize()
 {
     m_bar = ComponentUtil.EnsureChildComponent <StateImage>(gameObject, "Image_bar");
 }