Table of Contents

Class Animator

Namespace
Alis.Core.Ecs.Component.Render
Assembly
Alis.dll

The animator class

public class Animator : AComponent, IComponent<GameObject>, IEnabled, IIdentifier, IRuntime, IBuilder<AnimatorBuilder>

Inheritance

Implements

Inherited Members

Constructors

Animator()

Initializes a new instance of the Alis.Core.Ecs.Component.Render.Animator class

public Animator()

Animator(List<Animation>)

Initializes a new instance of the Alis.Core.Ecs.Component.Render.Animator class

public Animator(List<Animation> animations)

Parameters

animations List<Animation>

The animations

Fields

currentAnimation

The current animation

[JsonPropertyName("_CurrentAnimation_")]
private Animation currentAnimation

Field Value

Animation

Properties

Animations

Gets or sets the value of the animations

public List<Animation> Animations { get; }

Property Value

List<Animation>

Sprite

Gets or sets the value of the sprite

internal Sprite Sprite { get; set; }

Property Value

Sprite

Timer

Gets or sets the value of the timer

internal Stopwatch Timer { get; }

Property Value

Stopwatch

Methods

AddAnimation(Animation)

Adds the animation using the specified animation

public void AddAnimation(Animation animation)

Parameters

animation Animation

The animation

Builder()

Builders this instance

public AnimatorBuilder Builder()

Returns

AnimatorBuilder

The animator builder

ChangeAnimationTo(string)

Changes the animation to using the specified name animation

public void ChangeAnimationTo(string nameAnimation)

Parameters

nameAnimation string

The name animation

ChangeAnimationTo(string, RendererFlips)

Changes the animation to using the specified name animation

public void ChangeAnimationTo(string nameAnimation, RendererFlips flipsTo)

Parameters

nameAnimation string

The name animation

flipsTo RendererFlips

The flip to

GetCurrentAnimation()

Gets the current animation

public Animation GetCurrentAnimation()

Returns

Animation

The animation

OnAwake()

Awakes this instance

public override void OnAwake()

OnExit()

Exits this instance

public override void OnExit()

OnInit()

Inits this instance

public override void OnInit()

OnStart()

Starts this instance

public override void OnStart()

OnUpdate()

Updates this instance

public override void OnUpdate()