GetSpriteStateSize
From OxeyeWiki
video.getSpriteStateSize(spriteId) | ||
Fetches the width and height of a sprite state. Currently this method will always return the size of the first frame of the animation, in case the animation has several frames. | ||
Parameter | Expected Type | Description |
spriteId | An integer | The ID of the sprite state. This id IS retrieved when calling createSpriteState. |
Returns | ||
Returns two values, width and height, or nil in case the sprite state doesn't exist. |
Example
local w,h = video.getSpriteStateSize(sprite)