Make smoke trail palette customisable, add player color trail support to bullets & missiles

This commit is contained in:
reaperrr
2015-03-21 17:26:43 +01:00
parent 9e2da0d2df
commit 8bc31a4ae2
5 changed files with 25 additions and 6 deletions

View File

@@ -20,12 +20,14 @@ namespace OpenRA.Mods.Common.Effects
readonly WPos pos;
readonly CPos cell;
readonly Animation anim;
readonly string palette;
public Smoke(World world, WPos pos, string trail)
public Smoke(World world, WPos pos, string trail, string palette)
{
this.world = world;
this.pos = pos;
this.cell = world.Map.CellContaining(pos);
this.palette = palette;
anim = new Animation(world, trail);
anim.PlayThen("idle",
@@ -39,7 +41,7 @@ namespace OpenRA.Mods.Common.Effects
if (world.FogObscures(cell))
return SpriteRenderable.None;
return anim.Render(pos, wr.Palette("effect"));
return anim.Render(pos, wr.Palette(palette));
}
}
}