playAnimation

Script::playAnimation

Plays an Animation on an Entity.

Declaration

void playAnimation(Entity entity, uint32_t animationIndex, bool looping = false);

Parameters

Name

Type

Description

entity

Entity

The Entity to play the Animation of. It must have a Renderable Component.

animationIndex

uint32_t

The animation to play, indexed on entity's Renderable’s model’s Animation list.

looping

bool

Whether the animation is looping or not.

Returns

None.

Notes

If another Animation of entity is being played, it is getting replaced by the new one.

If the Animation is already playing or is paused, it will start over.