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:
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
buildComplete = !self.HasTrait<Building>(); // always render instantly for units
|
||||
|
||||
overlay = new Animation(rs.GetImage(self));
|
||||
overlay = new Animation(self.World, rs.GetImage(self));
|
||||
overlay.Play(info.Sequence);
|
||||
rs.anims.Add("crane_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay,
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
if (!init.Contains<SkipMakeAnimsInit>())
|
||||
{
|
||||
var overlay = new Animation(rs.GetImage(init.self));
|
||||
var overlay = new Animation(init.world, rs.GetImage(init.self));
|
||||
overlay.PlayThen(info.Sequence, () => buildComplete = false);
|
||||
rs.anims.Add("make_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay, null, () => !buildComplete));
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
buildComplete = !self.HasTrait<Building>(); // always render instantly for units
|
||||
|
||||
overlay = new Animation(rs.GetImage(self));
|
||||
overlay = new Animation(self.World, rs.GetImage(self));
|
||||
overlay.PlayRepeating(info.Sequence);
|
||||
rs.anims.Add("production_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay,
|
||||
|
||||
Reference in New Issue
Block a user