Refactor animation classes.

Specify pause function in constructors of Animation if required, and remove the unused pause function from AnimationWithOffset.

Cleanup Animation.cs and reduce code duplication.
This commit is contained in:
RoosterDragon
2015-10-14 22:33:14 +01:00
parent af4667fc68
commit 082ea6ba73
15 changed files with 67 additions and 71 deletions

View File

@@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Traits
rotorAnim.PlayRepeating(info.Sequence);
rs.Add(new AnimationWithOffset(rotorAnim,
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
null, () => false, p => ZOffsetFromCenter(self, p, 1)));
null, p => ZOffsetFromCenter(self, p, 1)));
}
public void Tick(Actor self)