varollo.asepriteimporter.mg.asepriteanimator - Varollo/aseprite-importer GitHub Wiki

< Back


AsepriteAnimator

Namespace: Varollo.AsepriteImporter.MG

Handles all AsepriteAnimation on a

public class AsepriteAnimator

Inheritance ObjectAsepriteAnimator

Constructors

AsepriteAnimator(IAnimationCounter, AsepriteSheet)

Initializes a AsepriteAnimator for a using a IAnimationCounter

public AsepriteAnimator(IAnimationCounter counter, AsepriteSheet sheet)

Parameters

counter IAnimationCounter
Object responsible for increasing animation frame. Such as DrawTimeCounter.

sheet AsepriteSheet
Sprite sheet deserialized using

Methods

GetAnimation(String)

Retrieves an animation by or .

public AsepriteAnimation GetAnimation(string name)

Parameters

name String
Name or tag key for the animation.

Returns

AsepriteAnimation
Found animation of given name key.

Exceptions

ArgumentException
Thrown when no animation is found with that name key.

GetFrame(String)

Retrieves the current frame () for an animation using the or .

public Rectangle GetFrame(string name)

Parameters

name String
Name or tag key for the animation.

Returns

Rectangle
Rectangle corresponding to the of the current frame of animation.


< Back

⚠️ **GitHub.com Fallback** ⚠️