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

@@ -39,12 +39,12 @@ namespace OpenRA.Mods.RA.Effects
anim.Tick();
}
public IEnumerable<Renderable> Render()
public IEnumerable<Renderable> Render(WorldRenderer wr)
{
if (a.IsInWorld)
yield return new Renderable(anim.Image,
a.CenterLocation.ToFloat2() - .5f * anim.Image.size + offset,
PaletteReference.FromName("effect"), (int)a.CenterLocation.Y);
wr.Palette("effect"), (int)a.CenterLocation.Y);
}
}
}