Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

SpriteGroup Class Reference

SpriteGroup assists in the management of a collection of sprites. More...

#include <SpriteEngine.h>

Collaboration diagram for SpriteGroup:

Collaboration graph

[legend]
List of all members.

Public Methods

 SpriteGroup (int maxSprites)
 Create the SpriteGroup. More...

 ~SpriteGroup ()
 Destroy the SpriteGroup and deallocate all used resources. More...

void addSprite (Sprite& sprite)
 Add a sprite to the group. More...

void draw (RectangleType *bounds)
 Draw all the sprites in the group. More...


Detailed Description

SpriteGroup assists in the management of a collection of sprites.

Definition at line 274 of file SpriteEngine.h.


Constructor & Destructor Documentation

SpriteGroup::SpriteGroup ( int maxSprites )
 

Create the SpriteGroup.

The group may contain up to maxSprites Sprites.

Parameters:
maxSprites   the maximum number of managed sprites

Definition at line 374 of file SpriteEngine.cpp.

SpriteGroup::~SpriteGroup ( )
 

Destroy the SpriteGroup and deallocate all used resources.

Definition at line 391 of file SpriteEngine.cpp.


Member Function Documentation

void SpriteGroup::addSprite ( Sprite & sprite )
 

Add a sprite to the group.

Parameters:
sprite   a reference to the sprite. Ownership of the sprite will remain with the caller, i.e. SpriteGroup will not destroy the sprite when the group is destroyed.

Definition at line 400 of file SpriteEngine.cpp.

void SpriteGroup::draw ( RectangleType * bounds )
 

Draw all the sprites in the group.

Definition at line 422 of file SpriteEngine.cpp.

Referenced by DemoActionEngine::draw().


The documentation for this class was generated from the following files:
Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 17 Dec 2000