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

Powerup Class Reference

Modifies Character's properties when they collide. More...

#include <Powerup.h>

Inheritance diagram for Powerup:

Entity Drawable List of all members.

Public Methods

 Powerup (const Rect &initPos, float height, char powType)
 Constructor.

virtual ~Powerup ()
 Destructor.

virtual bool update (float dt)
 Update the game logic.

virtual void draw (const Point &anchor)
 Draw the powerup.

void affectCharacter (Character *c)
 Affects a Character with this powerup's properties.

virtual float getHeight () const
 Returns the height of the powerup on the map.

char getPowerupType () const
 Returns the type of powerup.


Static Public Methods

void initVars (ConfigFile &f)
 Initializes the respawn time from the given ConfigFile.


Detailed Description

Modifies Character's properties when they collide.

Powerup is not defaultly-constructable or copyable.


Constructor & Destructor Documentation

Powerup::Powerup const Rect   initPos,
float    height,
char    powType
 

Constructor.

Parameters:
initPos  initial position on the map
initHeight  the height of this powerup on the map. Should match result of getRectHeight( initPos ) from Map.
powType  type of powerup

Powerup::~Powerup   [virtual]
 

Destructor.


Member Function Documentation

void Powerup::affectCharacter Character   c
 

Affects a Character with this powerup's properties.

Parameters:
c  character to affect

void Powerup::draw const Point   anchor [virtual]
 

Draw the powerup.

Parameters:
anchor  where to attach

Implements Entity.

float Powerup::getHeight   [virtual]
 

Returns the height of the powerup on the map.

Returns:
the height of the powerup on the map

Reimplemented from Drawable.

char Powerup::getPowerupType  
 

Returns the type of powerup.

void Powerup::initVars ConfigFile   f [static]
 

Initializes the respawn time from the given ConfigFile.

bool Powerup::update float    dt [virtual]
 

Update the game logic.

Parameters:
dt  the amount of time since the last frame
Returns:
true if this entity should be removed from the game

Implements Entity.


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