Spritesheet:animation
Retrieves an animation by name.
Usage
spritesheet:animation(name)
Arguments
| Name | Type | Description |
|---|---|---|
name | string | Name of the animation to retrieve. |
Returns
| Name | Type | Description |
|---|---|---|
animation | Animation | Animation with the specified name (or nil). |
Examples
local spritesheet = crystal.assets.get("assets/sprites/hero.json");
local walk = spritesheet:animation("walk");