Table of Contents

 
SetFrameDelay
 

Purpose

Sets the new delay between frames

 

Protoype

void CSpriteMngr::SetFrameDelay (int i_delay, string str_anim_id = "")
 

Parameters

delay the new frame delay in milliseconds
anim_id the ID of the animation to modify
 

Description

This function sets a new frame delay for the designated animation passed in via str_anim_id. If there is already an animation loaded with LoadAnimation(), then you can set the value for that animation without having to specify it. The new delay must be in milliseconds and is passed in for i_delay.

NOTE: There must be a locked sprite object in order for this function to work

 

Use

CSpriteMngr sprite;
// access loaded animation
sprite.SetFrameDelay(500);
// access another animation
sprite.SetFrameDelay(500, "nuther_anim");
 

Prev: SetDirection