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 402 of file SpriteEngine.h.


Constructor & Destructor Documentation

SpriteGroup::SpriteGroup ( int maxSprites ) [inline]
 

Create the SpriteGroup.

The group may contain up to maxSprites Sprites.

Parameters:
maxSprites   the maximum number of managed sprites

Definition at line 411 of file SpriteEngine.h.

SpriteGroup::~SpriteGroup ( ) [inline]
 

Destroy the SpriteGroup and deallocate all used resources.

Definition at line 431 of file SpriteEngine.h.


Member Function Documentation

void SpriteGroup::addSprite ( Sprite & sprite ) [inline]
 

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 447 of file SpriteEngine.h.

void SpriteGroup::draw ( RectangleType * bounds ) [inline]
 

Draw all the sprites in the group.

Definition at line 472 of file SpriteEngine.h.

Referenced by DemoActionEngine::draw().


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