Table of Contents | ||
|
||
GetCurrentFrameValue | ||
Purpose Returns the current frame value of the animation |
||
Protoype int CSpriteMngr::GetCurrentFrameValue (string str_anim_id = "") |
||
Parameters
|
||
Description This function extract the value of the current animation frame. So if an animation sequence was {8, 3, 6, 1, 5, 9} and the current frame was 4, then the function would return the value of frame 4, which is 5 (remember that the first frame is always 0). 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.
|
||
Use CSpriteMngr sprite; // access loaded animation int i_val = sprite.GetCurrentFrameValue(); // access another animation int i_val2 = sprite.GetCurrentFrameValue("nuther_anim"); |
||
|
||
|