monogame-aseprite
monogame-aseprite copied to clipboard
Make it possible to edit animations
Make it possible to edit animations, especially the IsOneShot parameter would be useful to edit. Currently I made a workaround where I duplicate an animation like this:
if (treeAnim.Animations.TryGetValue("anim", out Animation anim))
{
anim.IsOneShot = false;
anim.Name = "anim2";
treeAnim.AddAnimation(anim);
}
treeAnim.Play("anim2");
Or is there a way to set oneshot animations from aseprite that I am not aware of?
Edit: I found your solution in #20, but I think it would still be useful to edit, delete or replace animations
The possibility of modulating the frame durations by some dynamic factor would also be useful.
Use case => modulate a "walk" animation by a velocity component (faster when faster).
With the new version of MonoGame.Aseprite
it's now possible to create custom cycles for animations in the SpriteSheet
, even after import of the AsepriteFile.
However, it is still not possible to add additional frames or change durations once the animation tag is created at runtime. This is something that I can look into more easily with the way the library is structured now after the update, so adding this to a feature request
@fossegutten Starting with Version 5.0.0, when using (minimum) Aserpite 1.3-rc1, tags now have a "Repeat" property which can be set to specify that the animation should only play once.
@VidarErmesjo Starting with Version 5.0.0, AnimatedSprite.Speed
property has been added which can be used to modulate the speed of animation.