Merge pull request #11112 from reaperrr/improve-LeavesTrails

Add facings support and other controls to LeavesTrails
This commit is contained in:
Oliver Brakmann
2016-05-21 12:36:13 +02:00
2 changed files with 55 additions and 13 deletions

View File

@@ -23,14 +23,14 @@ namespace OpenRA.Effects
readonly bool visibleThroughFog;
readonly bool scaleSizeWithZoom;
public SpriteEffect(WPos pos, World world, string image, string sequence, string palette, bool visibleThroughFog = false, bool scaleSizeWithZoom = false)
public SpriteEffect(WPos pos, World world, string image, string sequence, string palette, bool visibleThroughFog = false, bool scaleSizeWithZoom = false, int facing = 0)
{
this.world = world;
this.pos = pos;
this.palette = palette;
this.scaleSizeWithZoom = scaleSizeWithZoom;
this.visibleThroughFog = visibleThroughFog;
anim = new Animation(world, image);
anim = new Animation(world, image, () => facing);
anim.PlayThen(sequence, () => world.AddFrameEndTask(w => w.Remove(this)));
}