Beispiel #1
0
        public void ChangeThicknessSizeColor()
        {
            if (currentToolContent == null)
            {
                return;
            }
            if (imagePath != null)
            {
                if (imagePath.Contains("false"))
                {
                    ShapesManager.instance.shapes[ShapesManager.instance.lastSelectedShape].
                    gamePrefab.SetActive(false);
                }
            }
            if (thicknessSizeImages != null)
            {
                Color thicknessSizeColor = currentToolContent.gradientColor.colorKeys[0].color;
                thicknessSizeColor.a = 1;

                foreach (Image img in thicknessSizeImages)
                {
                    img.color = thicknessSizeColor;
                    if (img.gameObject.GetInstanceID() == currentThickness.gameObject.GetInstanceID())
                    {
                        currentThickness.EnableSelection();
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Change the color of the thickness size (circles).
        /// </summary>
        public void ChangeThicknessSizeColor()
        {
            if (currentToolContent == null)
            {
                Debug.Log("currentToolContent is undefined");
                return;
            }

            if (thicknessSizeImages != null)
            {
                Color thicknessSizeColor = currentToolContent.gradientColor.colorKeys[0].color;
                thicknessSizeColor.a = 1;

                foreach (Image img in thicknessSizeImages)
                {
                    img.color = thicknessSizeColor;
                    if (img.gameObject.GetInstanceID() == currentThickness.gameObject.GetInstanceID())
                    {
                        currentThickness.EnableSelection();
                    }
                }
            }
        }