Definition at line 294 of file SpriteEngine.h.
Public Member Functions | |
SpriteGroup (UInt16 numSprites) SEC_RAZOR_INIT | |
Create a SpriteGroup. | |
~SpriteGroup () SEC_RAZOR_INIT | |
Destroy the SpriteGroup and deallocate all used resources. | |
void | createSprite (UInt16 spriteIdx, const AnimFrames *animFrames, Boolean visible=true, Boolean saveBackground=false) SEC_RAZOR_INIT |
Create an animated sprite with the specified AnimFrames. | |
void | createSprites (const AnimFrames *animFrames, Boolean visible=true, Boolean saveBackground=false) SEC_RAZOR_INIT |
Create a group of identical animated sprites with the specified AnimFrames. | |
void | draw (RectangleType *bounds=NULL) SEC_RAZOR |
Draw all the sprites in the group. | |
void | restoreBackground () const SEC_RAZOR |
Restore the background of all sprites in the group. | |
State management (visibility, position, etc.) | |
void | show (UInt16 spriteIdx) |
Show the sprite during subsequent draws. | |
void | hide (UInt16 spriteIdx) |
Hide the sprite during subsequent draws. | |
Boolean | setVisibility (UInt16 spriteIdx, Boolean visible) |
Set the visibility of the sprite through a flag. | |
Boolean | isVisible (UInt16 spriteIdx) const |
Will the sprite be drawn during subsequent draws? | |
void | setFrame (UInt16 spriteIdx, UInt16 frameIndex) |
Set the displayed frame of the Sprite. | |
void | move (UInt16 spriteIdx, Coord x, Coord y) |
Move the sprite (i.e. |
|
Create a SpriteGroup.
|
|
Destroy the SpriteGroup and deallocate all used resources.
|
|
Create an animated sprite with the specified AnimFrames. Ownership of the AnimFrames object is NOT transferred to the Sprite. It will not automatically be destroyed when the Sprite is destroyed.
|
|
Create a group of identical animated sprites with the specified AnimFrames. All Sprites in the SpriteGroup will be set to the specified properties. Ownership of the AnimFrames object is NOT transferred to the Sprite. It will not automatically be destroyed when the Sprite is destroyed.
|
|
Show the sprite during subsequent draws.
|
|
Hide the sprite during subsequent draws.
|
|
Set the visibility of the sprite through a flag.
|
|
Will the sprite be drawn during subsequent draws?
|
|
Set the displayed frame of the Sprite.
|
|
Move the sprite (i.e. its hotspot) to the specified coordinates. |
|
Draw all the sprites in the group.
|
|
Restore the background of all sprites in the group.
|