Make WithSpriteBody.PlayCustomAnimation resume loop of Sequence

...after it finished playing.
This commit is contained in:
reaperrr
2017-07-28 15:07:19 +02:00
committed by abcdefg30
parent 90a4fe7ca1
commit 0103b7ca87
8 changed files with 9 additions and 10 deletions

View File

@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Traits.Render
{
DefaultAnimation.PlayThen(NormalizeSequence(self, name), () =>
{
DefaultAnimation.Play(NormalizeSequence(self, Info.Sequence));
CancelCustomAnimation(self);
if (after != null)
after();
});
@@ -109,7 +109,7 @@ namespace OpenRA.Mods.Common.Traits.Render
{
DefaultAnimation.PlayBackwardsThen(NormalizeSequence(self, name), () =>
{
DefaultAnimation.PlayRepeating(NormalizeSequence(self, Info.Sequence));
CancelCustomAnimation(self);
if (after != null)
after();
});