Show / Hide Table of Contents

    Interface IAnimation

    Represents an animation. This allows you to configure an animation, and also to query/control animation when it's running.

    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface IAnimation

    Properties

    | Improve this Doc View Source

    Configuration

    Allows configuring the animation.

    Declaration
    IAnimationConfiguration Configuration { get; }
    Property Value
    Type Description
    IAnimationConfiguration

    The configuration.

    | Improve this Doc View Source

    Frames

    The list of animation frames that composes the animation (those will run one after the other).

    Declaration
    IList<IAnimationFrame> Frames { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<IAnimationFrame>

    The frames.

    | Improve this Doc View Source

    Sprite

    Gets the sprite that is currently showing (the current frame's sprite).

    Declaration
    ISprite Sprite { get; }
    Property Value
    Type Description
    ISprite

    The sprite.

    | Improve this Doc View Source

    State

    Allows querying and controlling the current state of the animation.

    Declaration
    IAnimationState State { get; }
    Property Value
    Type Description
    IAnimationState

    The state.

    Methods

    | Improve this Doc View Source

    Clone()

    Copy this animation and get a new animation. This performs a deep clone. This means that once you get a clone, the 2 animations are not attached. You can change a color to one of the sprite in the animation, for example, and this color change will not be applied on the old animation.

    Declaration
    IAnimation Clone()
    Returns
    Type Description
    IAnimation

    The new animation.

    | Improve this Doc View Source

    FlipHorizontally()

    Flips the animation horizontally (from left to right or from right to left). This is applied to all of the animation frames one by one.

    Declaration
    void FlipHorizontally()
    | Improve this Doc View Source

    FlipVertically()

    Flips the animation vertically (from up to down or from down to up). This is applied to all of the animation frames on by one.

    Declaration
    void FlipVertically()
    | Improve this Doc View Source

    NextFrame()

    Moves the animation to the next frame. This is called by the engine to run the animation.

    Declaration
    bool NextFrame()
    Returns
    Type Description
    System.Boolean

    true, if frame was nexted, false otherwise.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX