Add target flashing for C4. Closes #4659

This commit is contained in:
ScottNZ
2014-07-10 02:51:15 +12:00
parent 8bce37710b
commit 04cd99cd75
3 changed files with 44 additions and 22 deletions

View File

@@ -18,15 +18,13 @@ namespace OpenRA.Effects
{
Actor target;
Player player;
int remainingTicks = 4;
int remainingTicks;
public FlashTarget(Actor target)
: this(target, null) { }
public FlashTarget(Actor target, Player asPlayer)
public FlashTarget(Actor target, Player asPlayer = null, int ticks = 4)
{
this.target = target;
player = asPlayer;
remainingTicks = ticks;
foreach (var e in target.World.Effects.OfType<FlashTarget>().Where(a => a.target == target).ToArray())
target.World.Remove(e);
}