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

@@ -21,8 +21,8 @@ namespace OpenRA.Mods.RA.Effects
readonly WPos position;
readonly string palettePrefix;
readonly string posterPalette;
readonly Animation arrow = new Animation("beacon");
readonly Animation circles = new Animation("beacon");
readonly Animation arrow;
readonly Animation circles;
readonly Animation poster;
static readonly int maxArrowHeight = 512;
int arrowHeight = maxArrowHeight;
@@ -35,12 +35,15 @@ namespace OpenRA.Mods.RA.Effects
this.palettePrefix = palettePrefix;
this.posterPalette = posterPalette;
arrow = new Animation(owner.World, "beacon");
circles = new Animation(owner.World, "beacon");
arrow.Play("arrow");
circles.Play("circles");
if (posterType != null)
{
poster = new Animation("beacon");
poster = new Animation(owner.World, "beacon");
poster.Play(posterType);
}