AnimationLibrary
Container for Animation resources.
Container for Animation resources.
An animation library stores a set of animations accessible through StringName keys, for use with AnimationPlayer nodes.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
AnimationLibraryConstructor
public AnimationLibrary();Properties1
_DataProperty
public Reckfell.Collections.Dictionary _Data { get; set; }Methods7
AddAnimationError
public Error AddAnimation(StringName name, Animation animation);Adds the animation to the library, accessible by the key name.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
animation | Animation | — |
ErrorGetAnimationAnimation
public Animation GetAnimation(StringName name);Returns the Animation with the key name. If the animation does not exist, null is returned and an error is logged.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
AnimationGetAnimationListReckfell.Collections.Array<StringName>
public Reckfell.Collections.Array<StringName> GetAnimationList();Returns the keys for the Animations stored in the library.
Reckfell.Collections.Array<StringName>GetAnimationListSizeint
public int GetAnimationListSize();Returns the key count for the Animations stored in the library.
intHasAnimationbool
public bool HasAnimation(StringName name);Returns true if the library stores an Animation with name as the key.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
boolRemoveAnimationvoid
public void RemoveAnimation(StringName name);Removes the Animation with the key name.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
RenameAnimationvoid
public void RenameAnimation(StringName name, StringName newname);Changes the key of the Animation associated with the key name to newname.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
newname | StringName | — |
Signals and events4
AnimationAddedEvent
public event AnimationLibrary.AnimationAddedEventHandler AnimationAdded;Emitted when an Animation is added, under the key anim_name.
| Name | Type | Default |
|---|---|---|
animName | StringName | — |
AnimationChangedEvent
public event AnimationLibrary.AnimationChangedEventHandler AnimationChanged;Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. anim_name is the key of the animation that was changed.
See also Resource.Changed, which this acts as a relay for.
| Name | Type | Default |
|---|---|---|
animName | StringName | — |
AnimationRemovedEvent
public event AnimationLibrary.AnimationRemovedEventHandler AnimationRemoved;Emitted when an Animation stored with the key anim_name is removed.
| Name | Type | Default |
|---|---|---|
animName | StringName | — |
AnimationRenamedEvent
public event AnimationLibrary.AnimationRenamedEventHandler AnimationRenamed;Emitted when the key for an Animation is changed, from old_name to new_name.
| Name | Type | Default |
|---|---|---|
oldName | StringName | — |
newName | StringName | — |