Пример #1
0
        public static LevelColor FromTheme(LevelTheme levelTheme)
        {
            LevelColor level;

            switch (levelTheme)
            {
            case LevelTheme.Default:
                level = new LevelColor();
                break;

            case LevelTheme.Rust:
                level = new LevelColor
                {
                    Color1     = Coral,
                    Color2     = Sienna,
                    ColorMixed = Brown
                };
                break;

            case LevelTheme.Winter:
                level = new LevelColor
                {
                    Color1     = CornflowerBlue,
                    Color2     = SpringGreen,
                    ColorMixed = HotPink
                };
                break;

            case LevelTheme.Mixed:
                level = new LevelColor(Yellow, DodgerBlue);
                break;

            default:
                level = new LevelColor();
                break;
            }

            return(level);
        }
Пример #2
0
 void Start()
 {
     _levelColor = ColorFactory.FromTheme(LevelTheme);
 }