monogame-aseprite icon indicating copy to clipboard operation
monogame-aseprite copied to clipboard

Using shared AnimatedSprite for multiple characters

Open mk1024 opened this issue 1 year ago • 1 comments

Hi there, first let me thank you for this wonderful library. Thanks to everyone who keeps this project going!

Scenario Imagine a Lemmings-like scenario where you have multiple instances of the same animation. Since the animation is always the same, a single shared AnimationSprite should be sufficent to draw multiple characters at different positions. So far, this works as expected.

Problem The animation of each character should be time-shifted, so that the animations do not run synchronously. Ideally there would be an offset that just shifts the animation in time. I have tried to forward and rewind the animation for each draw call with Update and IsReversed but nothing worked.

So, I'd like to suggest a feature that supports this use case - or find a workaround :-)

mk1024 avatar Mar 21 '24 09:03 mk1024

Thanks for the suggestion @mk1024, I'll look into this.

I'm currently working on updating the core part of the lib to use the new released AsepriteDotNet, so it may be a few days before I can get to this, but I'll post anyy updates here in this thread

AristurtleDev avatar Mar 21 '24 15:03 AristurtleDev