Table of Contents

Class NoAnimationManager

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

A No-Animation Manager built off of IAnimationManager.

public class NoAnimationManager : IAnimationManager, IDisposable
Inheritance
NoAnimationManager
Implements
Inherited Members

Constructors

NoAnimationManager()

public NoAnimationManager()

Properties

ActiveAnimationsByAnimCode

Gets the AnimationMetaData for the target action.

public Dictionary<string, AnimationMetaData> ActiveAnimationsByAnimCode { get; }

Property Value

Dictionary<string, AnimationMetaData>

AnimationsDirty

Whether or not the animation is dirty.

public bool AnimationsDirty { get; set; }

Property Value

bool

Animator

The animator for this animation manager

public IAnimator Animator { get; set; }

Property Value

IAnimator

HeadController

The head controller for this manager.

public EntityHeadController HeadController { get; set; }

Property Value

EntityHeadController

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

FromAttributes(ITreeAttribute, string)

Additional attributes applied to the animation

public void FromAttributes(ITreeAttribute tree, string version)

Parameters

tree ITreeAttribute
version string

GetAnimationState(string)

public RunningAnimation GetAnimationState(string anim)

Parameters

anim string

Returns

RunningAnimation

Init(ICoreAPI, Entity)

Initialization call for the animation manager.

public void Init(ICoreAPI api, Entity entity)

Parameters

api ICoreAPI

The core API

entity Entity

The entity being animated.

IsAnimationActive(params string[])

public bool IsAnimationActive(params string[] anims)

Parameters

anims string[]

Returns

bool

OnAnimationStopped(string)

The event fired when the animation is stopped.

public void OnAnimationStopped(string code)

Parameters

code string

The code that the animation stopped with.

OnClientFrame(float)

public void OnClientFrame(float dt)

Parameters

dt float

OnReceivedServerAnimations(int[], int, float[])

The event fired when the client recieves the server animations

public void OnReceivedServerAnimations(int[] activeAnimations, int activeAnimationsCount, float[] activeAnimationSpeeds)

Parameters

activeAnimations int[]

all of active animations

activeAnimationsCount int

the number of the animations

activeAnimationSpeeds float[]

The speed of those animations.

OnServerTick(float)

public void OnServerTick(float dt)

Parameters

dt float

RegisterFrameCallback(AnimFrameCallback)

public void RegisterFrameCallback(AnimFrameCallback trigger)

Parameters

trigger AnimFrameCallback

ResetAnimation(string)

If given animation is running, will set its progress to the first animation frame

public void ResetAnimation(string beginholdAnim)

Parameters

beginholdAnim string

StartAnimation(string)

Starts an animation based on JSON code.

public bool StartAnimation(string configCode)

Parameters

configCode string

The json code.

Returns

bool

StartAnimation(AnimationMetaData)

Starts an animation based on the AnimationMetaData

public bool StartAnimation(AnimationMetaData animdata)

Parameters

animdata AnimationMetaData

Returns

bool

StopAnimation(string)

Stops the animation.

public void StopAnimation(string code)

Parameters

code string

The code to stop the animation on

ToAttributes(ITreeAttribute, bool)

Additional attributes applied from the animation

public void ToAttributes(ITreeAttribute tree, bool forClient)

Parameters

tree ITreeAttribute
forClient bool