Move effects to WorldRenderer palette lookup.

This commit is contained in:
Paul Chote
2013-02-24 11:32:32 +13:00
parent 95871e6cc1
commit 885eec7444
24 changed files with 45 additions and 43 deletions

View File

@@ -74,11 +74,11 @@ namespace OpenRA.Mods.RA.Effects
world.AddFrameEndTask(w => w.Remove(this));
}
public IEnumerable<Renderable> Render()
public IEnumerable<Renderable> Render(WorldRenderer wr)
{
if (explosion != null)
yield return new Renderable(explosion.Image, args.dest.ToFloat2() - .5f * explosion.Image.size,
PaletteReference.FromName("effect"), (int)args.dest.Y);
wr.Palette("effect"), (int)args.dest.Y);
if (ticks >= info.BeamDuration)
yield break;