Animation:num_repeat

Returns how many times this animation plays before stopping.

Usage

animation:num_repeat()

Returns

Name Type Description
repeats number Number of times this animation plays, or nil if it repeats forever.

Examples

local hero = crystal.assets.get("assets/sprites/hero.json");
local walk = spritesheet:animation("walk");
print(walk:num_repeat());

This site uses Just the Docs, a documentation theme for Jekyll.