/*--------------------------------------------------------------------------------------------*/
        public void TreeUpdate()
        {
            HoverItemDataSlider slider = GetComponent <HoverItemDataSlider>();
            Color col = DisplayUtil.HsvToColor(slider.RangeValue, 1, 0.666f);

            UpdateButtonsColor(col);
            UpdateTrackColor(col);
        }
Esempio n. 2
0
        /*--------------------------------------------------------------------------------------------*/
        public void SetColorMode(ColorMode pMode, float pHue = 0)
        {
            vColorMode = pMode;

            Color color = Color.white;

            if (vColorMode == ColorMode.Custom)
            {
                color = DisplayUtil.HsvToColor(pHue, 1, 1);
            }

            for (int i = 0; i < Count; ++i)
            {
                GameObject cube = vCubes[i];

                if (vColorMode == ColorMode.Random)
                {
                    color = cube.GetComponent <DemoCube>().ColorRandom;
                }

                cube.GetComponent <Renderer>().sharedMaterial.color = color;
            }
        }