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

Virus Class Reference

Affects a character in some way. More...

#include <Virus.h>

List of all members.

Public Methods

 Virus ()
 Default constructor.

 Virus (char virType, Character *c)
 Constructor.

 Virus (char virType, Character *c, float timeLeft)
 Constructor.

void init (char virType, Character *c, float timeLeft)
 Initialises this object.

virtual ~Virus ()
 Destructor.

bool update (float dt)
 Update the game logic.

int getRedValue () const
 Returns the value of the red channel to use when drawing the character this virus affects.

Virus * getCloneFor (Character *c) const
 Returns a new virus that shares the same properties as this Virus except it is targeted for a different character.

int getVirusType () const
 Returns the type of the virus.


Static Public Methods

void initVars (ConfigFile &f)
 Initializes configurable members for the Virus class.


Detailed Description

Affects a character in some way.

The effects only last for a period of time. Certain powerups contain viruses that are given to a Character. Viruses can also be spread when an infected player collides with the other player. A character can only have one virus at a time.


Constructor & Destructor Documentation

Virus::Virus  
 

Default constructor.

Virus::Virus char    virType,
Character   c
 

Constructor.

Parameters:
virType  type of virus
c  pointer to the character to effect

Virus::Virus char    virType,
Character   c,
float    timeLeft
 

Constructor.

Parameters:
virType  type of virus
c  pointer to the character to effect
timeLeft  time left for virus to live

Virus::~Virus   [virtual]
 

Destructor.


Member Function Documentation

Virus * Virus::getCloneFor Character   c const
 

Returns a new virus that shares the same properties as this Virus except it is targeted for a different character.

Parameters:
c  character to attach to
Returns:
pointer to a cloned virus

int Virus::getRedValue  
 

Returns the value of the red channel to use when drawing the character this virus affects.

Returns:
value of the red channel to use

int Virus::getVirusType  
 

Returns the type of the virus.

Returns:
type of the virus

void Virus::init char    virType,
Character   c,
float    timeLeft
 

Initialises this object.

Parameters:
virType  type of virus
c  pointer to the character to effect
timeLeft  time left for virus to live

void Virus::initVars ConfigFile   f [static]
 

Initializes configurable members for the Virus class.

Parameters:
f  a config file

bool Virus::update float    dt
 

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


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