Skip to content

GetFrame

Description

Retrieves a specific SpriteFrame from a SpriteAnimation.

Parameters

aniFrames

The SpriteAnimation to use frames from.

listID

The index of the animation in the animation list to use frames from. In C++, this value is retrieved from Animator.animationID.

frameID

The index of the frame to get. In C++, this value is retrieved from Animator.frameID.

Return Value

Returns a pointer to the retrieved SpriteFrame. The return value will be NULL if an error occured.

Syntax

RSDK.GetFrame(uint16 aniFrames, uint16 listID, int32 frameID);
Animator.GetFrame(SpriteAnimation aniFrames);

Example

SpriteFrame *frame = RSDK.GetFrame(MyObject->aniFrames, 1, 0);
SpriteFrame *frame = this->animator.GetFrame(sVars->aniFrames);