Exemple #1
0
        /// <summary>
        /// Returns the gaem color corresponding to the procided color enum. Returns null if invalid color enum provided.
        /// </summary>
        /// <param name="scheme"></param>
        /// <param name="color"></param>
        /// <returns></returns>
        public static GameColor GetGameColor(this GameColorScheme scheme, ESchemeColor color)
        {
            switch (color)
            {
            case ESchemeColor.Alternative: return(scheme.Alternative);

            case ESchemeColor.Background: return(scheme.Background);

            case ESchemeColor.Primary: return(scheme.Primary);

            case ESchemeColor.Secondary: return(scheme.Secondary);

            case ESchemeColor.Neutral: return(scheme.Neutral);
            }

            return(null);
        }