Add wrappers for RenderSprites anims dictionary.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
overlay = new Animation(self.World, rs.GetImage(self));
|
||||
overlay.Play(info.Sequence);
|
||||
rs.anims.Add("crane_overlay_{0}".F(info.Sequence),
|
||||
rs.Add("crane_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay,
|
||||
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
|
||||
() => !buildComplete));
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
{
|
||||
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),
|
||||
rs.Add("make_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay, null, () => !buildComplete));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
overlay = new Animation(self.World, rs.GetImage(self));
|
||||
overlay.Play(info.Sequence);
|
||||
rs.anims.Add("delivery_overlay_{0}".F(info.Sequence),
|
||||
rs.Add("delivery_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay,
|
||||
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
|
||||
() => !buildComplete));
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
overlay = new Animation(self.World, rs.GetImage(self));
|
||||
overlay.Play(info.Sequence);
|
||||
rs.anims.Add("docking_overlay_{0}".F(info.Sequence),
|
||||
rs.Add("docking_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay,
|
||||
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
|
||||
() => !buildComplete));
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
overlay = new Animation(self.World, rs.GetImage(self));
|
||||
overlay.PlayRepeating(info.Sequence);
|
||||
rs.anims.Add("production_overlay_{0}".F(info.Sequence),
|
||||
rs.Add("production_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay,
|
||||
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
|
||||
() => !IsProducing || !buildComplete));
|
||||
|
||||
Reference in New Issue
Block a user