The base class for powerups. More...
#include <Powerup.h>
Public Member Functions | |
bool | Initiate (u8 targetPlayer) |
Initiates this powerup on the target player(s). | |
void | Update () |
Updates the timer and terminates this powerup if its duration has been exceeded. | |
virtual PowerupId | GetPowerupId ()=0 |
The unique PowerupId representing this powerup. | |
virtual GuiImageData * | GetImageData ()=0 |
The image associated with this powerup. | |
virtual string * | GetHelpText ()=0 |
A description of this powerup used in the menu. | |
virtual GuiSound * | GetSound () |
The sound associated with this powerup. | |
Protected Member Functions | |
virtual Powerup * | GetInstance ()=0 |
Returns a new powerup instance. | |
virtual void | StartEffect (u8 player)=0 |
The powerup state change goes here. | |
virtual void | StopEffect (u8 player)=0 |
Reverts the state back to normal. | |
virtual u32 | GetDuration () |
The duration of this powerup, in milliseconds. | |
virtual PowerupTarget | GetTargetType () |
Determines what players are the target of this powerup. | |
Static Protected Member Functions | |
static vector< Powerup * > & | GetVector () |
Returns the global Powerup vector. | |
Friends | |
class | PowerupUtils |
The base class for powerups.
Definition at line 135 of file Powerup.h.
static vector<Powerup *>& Powerup::GetVector | ( | ) | [inline, static, protected] |
bool Powerup::Initiate | ( | u8 | targetPlayer | ) |
Initiates this powerup on the target player(s).
Do not override this function. This function is called automatically whenever a powerup is dropped on a player.
targetPlayer | The target player index. |
Definition at line 44 of file Powerup.cpp.