Пример #1
0
    public void SetNewColor(Color NewColor)
    {
        TheColor = NewColor;
        uiControler.colorChanged(TheColor);
        float h, s, v;

        Color.RGBToHSV(TheColor, out h, out s, out v);
        CircleColor = Color.HSVToRGB(h, 1, 1);
        ChangeTriangleColor(CircleColor);
        PointerMain.transform.localEulerAngles = Vector3.back * (h * 360f);
        CurBary.y   = 1f - v;
        CurBary.x   = v * s;
        CurBary.z   = 1f - CurBary.y - CurBary.x;
        CurLocalPos = RPoints[0] * CurBary.x + RPoints[1] * CurBary.y + RPoints[2] * CurBary.z;
        PointerColor.transform.localPosition = CurLocalPos;
    }