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

Make it possible to edit animations

Open fossegutten opened this issue 3 years ago • 1 comments

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

fossegutten avatar Mar 13 '21 21:03 fossegutten

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

VidarErmesjo avatar Jan 22 '22 02:01 VidarErmesjo

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

AristurtleDev avatar Feb 21 '23 21:02 AristurtleDev

@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.

AristurtleDev avatar Mar 07 '23 00:03 AristurtleDev

@VidarErmesjo Starting with Version 5.0.0, AnimatedSprite.Speed property has been added which can be used to modulate the speed of animation.

AristurtleDev avatar Mar 07 '23 00:03 AristurtleDev