#include <RespawnPowerup.h>
Inheritance diagram for RespawnPowerup:
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. |
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.
|
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. |
|
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. |
|
Waits to respawn this object's Powerup. After the Powerup has been added back into the game, update returns true. Implements GameLogic. |