Example #1
0
        /*--------------------------------------------------------------------------------------------*/
        public virtual void UpdateSelect(Color pColor, float pAmount)
        {
            Select.SetActive(pAmount > 0 && pColor.a > 0);

            bool isNewAmount = (Math.Abs(pAmount - vPrevSelAmount) > 0.005f);

            if (isNewAmount)
            {
                UpdateMesh(MeshType.Select, SelectMesh, pAmount);
                vPrevSelAmount = pAmount;
            }

            if (pColor != SelectColor || isNewAmount)
            {
                Materials.SetMeshColor(SelectMesh, pColor);
            }

            SelectColor = pColor;
        }
Example #2
0
        /*--------------------------------------------------------------------------------------------*/
        public virtual void UpdateHighlight(Color pColor, float pAmount)
        {
            Highlight.SetActive(pAmount > 0 && pColor.a > 0);

            bool isNewAmount = (Math.Abs(pAmount - vPrevHighAmount) > 0.005f);

            if (isNewAmount)
            {
                UpdateMesh(MeshType.Highlight, HighlightMesh, pAmount);
                vPrevHighAmount = pAmount;
            }

            if (pColor != HighlightColor || isNewAmount)
            {
                Materials.SetMeshColor(HighlightMesh, pColor);
            }

            HighlightColor = pColor;
        }
Example #3
0
        /*--------------------------------------------------------------------------------------------*/
        public void SetDepthHint(int pDepthHint)
        {
            Text text = vTextObj.GetComponent <Text>();

            text.material = Materials.GetTextLayer(text.material, pDepthHint);
        }