Show / Hide Table of Contents

    Interface IAnimationState

    Control and query the animation current state.

    Inherited Members
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface IAnimationState : INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    CurrentFrame

    Gets or sets the current animation frame.

    Declaration
    int CurrentFrame { get; set; }
    Property Value
    Type Description
    System.Int32

    The current frame.

    | Improve this Doc View Source

    CurrentLoop

    Gets or sets the current loop.

    Declaration
    int CurrentLoop { get; set; }
    Property Value
    Type Description
    System.Int32

    The current loop.

    | Improve this Doc View Source

    IsPaused

    Gets or sets a value indicating whether this animation is paused.

    Declaration
    bool IsPaused { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if is paused; otherwise, false.

    | Improve this Doc View Source

    OnAnimationCompleted

    Allows to subscribe to a task and await animation completion (note that if the animation is configured to loop forever, the task will never complete).

    Declaration
    TaskCompletionSource<AnimationCompletedEventArgs> OnAnimationCompleted { get; }
    Property Value
    Type Description
    System.Threading.Tasks.TaskCompletionSource<AnimationCompletedEventArgs>

    The on animation completed.

    Examples
    await cHero.SayAsync("Waiting for the animation to complete");
    await state.OnAnimationCompleted.Task;
    await cHero.SayAsync("Done!");
    | Improve this Doc View Source

    RunningBackwards

    Gets or sets a value indicating whether this animation is currently running backwards.

    Declaration
    bool RunningBackwards { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if running backwards; otherwise, false.

    | Improve this Doc View Source

    TimeToNextFrame

    Gets or sets the time to next frame (in game ticks: so 10 when the game is at 60FPS means 1/6 of a second).

    Declaration
    int TimeToNextFrame { get; set; }
    Property Value
    Type Description
    System.Int32

    The time to next frame.

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