Ejemplo n.º 1
0
        public HUDDifficultyButton(int depth, FractionDifficulty diff, HUDDifficultyButtonMode mode, Action a)
        {
            Depth      = depth;
            difficulty = diff;

            icon   = FractionDifficultyHelper.GetIcon(diff);
            action = a;

            switch (mode)
            {
            case HUDDifficultyButtonMode.DEACTIVATED:
                BackgroundColor = FlatColors.ButtonHUD;
                ForegroundColor = FlatColors.BackgroundHUD;
                break;

            case HUDDifficultyButtonMode.UNLOCKANIMATION:
                BackgroundColor = FlatColors.ButtonHUD;
                ForegroundColor = FlatColors.SunFlower;
                AddOperation(new HUDDifficultyButtonGainOperation());
                AddOperation(new HUDDifficultyButtonBlinkingIconOperation());
                break;

            case HUDDifficultyButtonMode.ACTIVATED:
                BackgroundColor = FlatColors.BackgroundHUD2;
                ForegroundColor = FlatColors.SunFlower;
                AddOperation(new HUDDifficultyButtonBlinkingIconOperation());
                break;

            default:
                SAMLog.Error("HDB::EnumSwitch_CTR", "value: " + mode);
                break;
            }
        }
Ejemplo n.º 2
0
		public HUDDifficultyButton(int depth, FractionDifficulty diff, HUDDifficultyButtonMode mode)
		{
			Depth = depth;
			difficulty = diff;

			icon = FractionDifficultyHelper.GetIcon(diff);

			switch (mode)
			{
				case HUDDifficultyButtonMode.DEACTIVATED:
					BackgroundColor = FlatColors.ButtonHUD;
					ForegroundColor = FlatColors.BackgroundHUD;
					break;
				case HUDDifficultyButtonMode.UNLOCKANIMATION:
					BackgroundColor = FlatColors.ButtonHUD;
					ForegroundColor = GDColors.GetColorForDifficulty(diff);
					AddHUDOperation(new HUDDifficultyButtonGainOperation());
					AddHUDOperation(new HUDBlinkingDifficultyButtonIconOperation());
					break;
				case HUDDifficultyButtonMode.ACTIVATED:
					BackgroundColor = FlatColors.BackgroundHUD2;
					ForegroundColor = GDColors.GetColorForDifficulty(diff);
					AddHUDOperation(new HUDBlinkingDifficultyButtonIconOperation());
					break;
			}
		}