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
Fields
currentAnimation
The current animation
[JsonPropertyName("_CurrentAnimation_")]
private Animation currentAnimationField Value
Properties
Animations
Gets or sets the value of the animations
public List<Animation> Animations { get; }Property Value
Sprite
Gets or sets the value of the sprite
internal Sprite Sprite { get; set; }Property Value
Timer
Gets or sets the value of the timer
internal Stopwatch Timer { get; }Property Value
Methods
AddAnimation(Animation)
Adds the animation using the specified animation
public void AddAnimation(Animation animation)Parameters
animationAnimation-
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
nameAnimationstring-
The name animation
ChangeAnimationTo(string, RendererFlips)
Changes the animation to using the specified name animation
public void ChangeAnimationTo(string nameAnimation, RendererFlips flipsTo)Parameters
nameAnimationstring-
The name animation
flipsToRendererFlips-
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()