Table of Contents

Class AnimationLayerComponent

Namespace
SharpPluginLoader.Core.Components
Assembly
SharpPluginLoader.Core.dll

Represents an instance of the cpAnimationLayer class.

public class AnimationLayerComponent : Component
Inheritance
AnimationLayerComponent
Inherited Members

Constructors

AnimationLayerComponent()

public AnimationLayerComponent()

AnimationLayerComponent(nint)

public AnimationLayerComponent(nint instance)

Parameters

instance nint

Properties

CurrentFrame

The current frame of the animation.

public ref float CurrentFrame { get; }

Property Value

float

MaxFrame

The frame count of the animation.

public ref float MaxFrame { get; }

Property Value

float

Owner

The owner of this animation layer.

public Entity? Owner { get; }

Property Value

Entity

Paused

Gets or sets whether the animation is paused.

public bool Paused { get; set; }

Property Value

bool

Speed

The speed of the animation.

public ref float Speed { get; }

Property Value

float

Methods

DoAnimation(AnimationId, float, float, float, uint)

Forces the animation layer to do the given animation. This will interrupt the current animation.

public void DoAnimation(AnimationId id, float interpolationFrame = 0, float startFrame = 0, float speed = 1, uint attr = 0)

Parameters

id AnimationId

The id of the animation

interpolationFrame float

The amount of frames used to interpolate. 0 will auto-calculate the necessary frames

startFrame float

The starting frame of the animation

speed float

The initial speed of the animation

attr uint

Additional flags

DoAnimationSafe(AnimationId, float, float, float, uint)

Forces the animation layer to do the given animation. This will interrupt the current animation.

public void DoAnimationSafe(AnimationId id, float interpolationFrame = 0, float startFrame = 0, float speed = 1, uint attr = 0)

Parameters

id AnimationId

The id of the animation

interpolationFrame float

The amount of frames used to interpolate. 0 will auto-calculate the necessary frames

startFrame float

The starting frame of the animation

speed float

The initial speed of the animation

attr uint

Additional flags

Remarks

If the owner object of the animation layer this function is called on is an entity, it will instead call the function dedicated to entities. Note that in that case the speed parameter will be ignored.

LockSpeed(float)

Locks the speed of this animation layer.

public void LockSpeed(float speed)

Parameters

speed float

The speed to lock it to

Pause()

Pauses the animation layer.

public void Pause()

RegisterLmt(MotionList, uint)

Registers an LMT to this animation layer.

public void RegisterLmt(MotionList lmt, uint index)

Parameters

lmt MotionList

The lmt to register

index uint

The index to register the lmt in. Must be less than 16

Exceptions

ArgumentOutOfRangeException
InvalidOperationException

Resume()

Resumes the animation layer.

public void Resume()

UnlockSpeed()

Unlocks the speed of this animation layer.

public void UnlockSpeed()