Esempio n. 1
0
    public static string getColorName(colorGame color)
    {
        if (color.Equals(colorGame.BLUE))
        {
            return("Blue");
        }
        else if (color.Equals(colorGame.RED))
        {
            return("Red");
        }
        else if (color.Equals(colorGame.YELLOW))
        {
            return("Yellow");
        }
        else if (color.Equals(colorGame.GREEN))
        {
            return("Green");
        }
        else if (color.Equals(colorGame.PURPLE))
        {
            return("Purple");
        }
        else if (color.Equals(colorGame.ORANGE))
        {
            return("Orange");
        }
        else if (color.Equals(colorGame.RED_ORANGE))
        {
            return("RedOrange");
        }
        else if (color.Equals(colorGame.RED_PURPLE))
        {
            return("RedPurple");
        }
        else if (color.Equals(colorGame.YELLOW_GREEN))
        {
            return("YellowGreen");
        }
        else if (color.Equals(colorGame.YELLOW_ORANGE))
        {
            return("YellowOrange");
        }
        else if (color.Equals(colorGame.BLUE_GREEN))
        {
            return("BlueGreen");
        }
        else if (color.Equals(colorGame.BLUE_PURPLE))
        {
            return("BluePurple");
        }

        return("");
    }
Esempio n. 2
0
 public static Color getColor(colorGame cor)
 {
     if (cor == colorGame.RED)
     {
         return(new Color(0.9960f, 0.2157f, 0.1294f, 1));
     }
     else if (cor == colorGame.BLUE)
     {
         return(new Color(0.0078f, 0.2784f, 0.9907f, 1));
     }
     else if (cor == colorGame.YELLOW)
     {
         return(new Color(0.9960f, 0.9960f, 0.2f, 1));
     }
     else if (cor == colorGame.ORANGE)
     {
         return(new Color(0.9843f, 0.6f, 0.0078f, 1));
     }
     else if (cor == colorGame.GREEN)
     {
         return(new Color(0.4f, 0.6902f, 0.1961f, 1));
     }
     else if (cor == colorGame.PURPLE)
     {
         return(new Color(0.5255f, 0.0039f, 0.6863f, 1));
     }
     else if (cor == colorGame.RED_PURPLE)
     {
         return(new Color(0.6549f, 0.0980f, 0.2941f, 1));
     }
     else if (cor == colorGame.RED_ORANGE)
     {
         return(new Color(0.9922f, 0.3255f, 0.0314f, 1));
     }
     else if (cor == colorGame.BLUE_PURPLE)
     {
         return(new Color(0.2941f, 0.0784f, 0.6706f, 1));
     }
     else if (cor == colorGame.YELLOW_ORANGE)
     {
         return(new Color(0.9804f, 0.7372f, 0.0078f, 1));
     }
     else if (cor == colorGame.YELLOW_GREEN)
     {
         return(new Color(0.8157f, 0.9176f, 0.1686f, 1));
     }
     else if (cor == colorGame.BLUE_GREEN)
     {
         return(new Color(0.0118f, 0.5725f, 0.8078f, 1));
     }
     return(new Color(0, 0, 0, 1));
 }