Table of Contents

 
LockSprite
 

Purpose

Locks a sprite to access its animations data

 

Protoype

void CSpriteMngr::LockSprite (string str_sprite_id)
 

Parameters

sprite_id the ID of the sprite to lock
 

Description

This function locks a sprite object. The reason for locking sprite objects is to save a parameter from every animation access function. When you want to extract animation data from a sprite you will most likely use a few animation access functions. Instead of passing the sprite ID into each of them you lock the sprite and then call the functions and the functions know to extract animation data from that sprite internally.

 

Use

CSpriteMngr sprite;
sprite.LockSprite("my_sprite");
 

Prev: LoadSprites