Example #1
0
    public void ColorBtnPressed()
    {
        colorPressed = !colorPressed;

        if (colorPressed)
        {
            Color c = UtilsClass.ToColor("#2699FB");
            colorBtn.GetComponent <Image>().color = c;
            colorBtn.transform.GetChild(0).GetComponentInChildren <Image>().color = new Color(255, 255, 255, 255);

            UtilsClass.ChangeStructureToColored(
                stParent,
                redColor,
                blueColor,
                ringColor
                );
        }
        else
        {
            colorBtn.GetComponent <Image>().color = new Color(255, 255, 255, 255);
            Color c = UtilsClass.ToColor("#464A53");
            colorBtn.transform.GetChild(0).GetComponentInChildren <Image>().color = c;

            UtilsClass.RemoveStructureColor(
                stParent,
                whiteColor
                );
        }
    }