AristurtleDev / monogame-aseprite

A Cross Platform C# Library That Adds Support For Aseprite Files in MonoGame Projects.
https://monogameaseprite.net
MIT License
167 stars 15 forks source link

Using shared AnimatedSprite for multiple characters #104

Open mk1024 opened 7 months ago

mk1024 commented 7 months ago

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 :-)

AristurtleDev commented 7 months ago

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