Add facing support to Smoke effect
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenRA.Effects;
|
using OpenRA.Effects;
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
@@ -23,12 +24,15 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
readonly string palette;
|
readonly string palette;
|
||||||
|
|
||||||
public Smoke(World world, WPos pos, string trail, string palette, string sequence)
|
public Smoke(World world, WPos pos, string trail, string palette, string sequence)
|
||||||
|
: this(world, pos, () => 0, trail, palette, sequence) { }
|
||||||
|
|
||||||
|
public Smoke(World world, WPos pos, Func<int> facingFunc, string trail, string palette, string sequence)
|
||||||
{
|
{
|
||||||
this.world = world;
|
this.world = world;
|
||||||
this.pos = pos;
|
this.pos = pos;
|
||||||
this.palette = palette;
|
this.palette = palette;
|
||||||
|
|
||||||
anim = new Animation(world, trail);
|
anim = new Animation(world, trail, facingFunc);
|
||||||
anim.PlayThen(sequence,
|
anim.PlayThen(sequence,
|
||||||
() => world.AddFrameEndTask(w => w.Remove(this)));
|
() => world.AddFrameEndTask(w => w.Remove(this)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user