Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

RespawnPowerup Class Reference

The RespawnPowerup class waits for the given amount of time. More...

#include <RespawnPowerup.h>

Inheritance diagram for RespawnPowerup:

GameLogic List of all members.

Public Methods

 RespawnPowerup (Powerup *p, float timeToRespawn)
 Constructs a new RespawnPowerup.

virtual ~RespawnPowerup ()
 Cleans up this object.

bool update (float dt)
 Waits to respawn this object's Powerup.


Detailed Description

The RespawnPowerup class waits for the given amount of time.

After the time has passed, the Powerup given to the object is inserted into the game's list of Entities.

The difference between RespawnPowerup and RespawnEntity is this class starts playing the respawn sound before the Powerup reappears (this is because of how the sound is designed), and it also creates particles when the Powerup reappears.

RespawnPowerup is not default-constructable or copyable.


Constructor & Destructor Documentation

RespawnPowerup::RespawnPowerup Powerup   p,
float    timeToRespawn
 

Constructs a new RespawnPowerup.

Adds the passed Powerup p to the Game after timeToRespawn has passed. After p is back into the game, the update method will return true.

RespawnPowerup::~RespawnPowerup   [virtual]
 

Cleans up this object.

If this object is destructed, it does delete the passed in Powerup. This should only happen if the program exits before the respawn event takes place.


Member Function Documentation

bool RespawnPowerup::update float    dt [virtual]
 

Waits to respawn this object's Powerup.

After the Powerup has been added back into the game, update returns true.

Implements GameLogic.


The documentation for this class was generated from the following files:
Generated on Tue Mar 4 02:29:26 2003 for SuperIsoBomb by doxygen1.2.18