Table of Contents | ||||
|
||||
RenderSprites | ||||
Purpose Renders all the currently visible sprites and updates all the currently playing sprites |
||||
Protoype void CSpriteMngr::RenderSprites (bool b_map = true, batch br_sprites = batch()) |
||||
Parameters
|
||||
Description This function draws any visible sprites on the screen and updates active (playing) sprites to their next frame of animation. If there is no map loaded with the tile engine then you would pass in FALSE for b_map. This will assign the screen size as the current render viewport, any visible sprite objects that are off the screen will not be rendered. If a map is loaded then pass in TRUE for b_map. This will assign the map size as the current render viewport, which acts the same as described before. Batch Rendering By default the render function renders all visible sprites in the manager. If you want the function to only render a select few sprites, then you would pass in a batch render list, which is an STL list container class,
|
||||
Use CSpriteMngr sprite; // render all sprites, no map sprite.RenderSprites(); // render select sprites, map batch bl_render; bl_render.push_back("sprite1"); bl_render.push_back("sprite2"); bl_render.push_back("sprite3"); sprite.RenderSprites(true, bl_render); |
||||
|
||||
|