Exemple #1
0
    void Start()
    {
        Image image     = GetComponent <Image>();
        Color invisible = new Color(0, 0, 0, 0);

        switch (ColorSetter.selected)
        {
        case ColorSetter.NumOptions.COOL: chosenColor = Color.cyan; break;

        case ColorSetter.NumOptions.WARM: chosenColor = Color.red; break;

        case ColorSetter.NumOptions.DARK: chosenColor = Color.grey; break;

        case ColorSetter.NumOptions.LIGHT: chosenColor = Color.white; break;

        case ColorSetter.NumOptions.FABULOUS: chosenColor = Color.magenta; break;

        case ColorSetter.NumOptions.RANDOM: chosenColor = ColorRandomizer.RandomLight(); break;

        case ColorSetter.NumOptions.CLASSICBLACK: chosenColor = invisible; break;

        case ColorSetter.NumOptions.CLASSICWHITE: chosenColor = Color.black; break;

        default: chosenColor = Color.white; break;
        }
        image.color = chosenColor;
    }
Exemple #2
0
    Color ColorScheme()
    {
        switch (ColorSetter.selected)
        {
        case ColorSetter.NumOptions.COOL: return(ColorRandomizer.RandomCold());

        case ColorSetter.NumOptions.WARM: return(ColorRandomizer.RandomWarm());

        case ColorSetter.NumOptions.FABULOUS: return(ColorRandomizer.RandomFabulous());

        case ColorSetter.NumOptions.LIGHT: return(ColorRandomizer.RandomLight());

        case ColorSetter.NumOptions.DARK: return(ColorRandomizer.RandomDark());

        case ColorSetter.NumOptions.RANDOM: return(Random.ColorHSV());

        case ColorSetter.NumOptions.CLASSICBLACK: return(Color.black);

        case ColorSetter.NumOptions.CLASSICWHITE: return(ColorRandomizer.RandomGreyScale());

        default: return(Random.ColorHSV());
        }
    }