Simplify MenuPaletteEffect activation.

This commit is contained in:
Paul Chote
2014-05-18 18:04:36 +12:00
parent c674fc2f72
commit 05eb56b1e2
6 changed files with 12 additions and 30 deletions

View File

@@ -1,23 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class ShellmapDesaturationLogic
{
[ObjectCreator.UseCtor]
public ShellmapDesaturationLogic(World world)
{
var paletteEffect = world.WorldActor.TraitOrDefault<MenuPaletteEffect>();
if (paletteEffect != null)
paletteEffect.Fade(MenuPaletteEffect.EffectType.Desaturated);
}
}
}