Change animations to use the proper SequenceProvider

Remove references to the global "Game" and use the SequenceProvider
of the current world/map.
This commit is contained in:
Pavlos Touboulidis
2014-05-11 03:05:47 +03:00
parent 6eabc6adf5
commit b560268495
52 changed files with 132 additions and 117 deletions

View File

@@ -60,7 +60,7 @@ namespace OpenRA.Mods.RA.Widgets
{
if (!clocks.ContainsKey(queue.Trait))
{
clocks.Add(queue.Trait, new Animation("clock"));
clocks.Add(queue.Trait, new Animation(world, "clock"));
}
}
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.RA.Widgets
if (actor == null)
continue;
var icon = new Animation(RenderSimple.GetImage(actor));
var icon = new Animation(world, RenderSimple.GetImage(actor));
icon.Play(actor.Traits.Get<TooltipInfo>().Icon);
var location = new float2(RenderBounds.Location) + new float2(queue.i * (IconWidth + IconSpacing), 0);
WidgetUtils.DrawSHPCentered(icon.Image, location + 0.5f * iconSize, worldRenderer, 0.5f);