Table of Contents

 
IsPlaying
 

Purpose

Determines whether or not the animation is currently playing

 

Protoype

bool CSpriteMngr::IsPlaying (string str_anim_id = "")
 

Parameters

anim_id the ID of the animation to test
 

Description

This function determines whether the animation passed in via str_anim_id is currently playing. The function returns a boolean value of either TRUE or FALSE depending on the outcome of the test. If there is already an animation loaded with LoadAnimation(), then you can extract the value from that animation without having to specify it. However if there is no loaded animation or you want to access an animation not loaded, then you must pass in its ID for str_anim_id.

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

 
Use
CSpriteMngr sprite;
if (sprite.IsPlaying("my_anim"))
    // animation is playing
 

Prev: IsLocked