Bonus Class Reference
[Game Data]

Basic class for all bonuses. It implements "empty bonus" - doesn't change anything. More...

#include <bonus.h>

Collaboration diagram for Bonus:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Bonus ()
virtual ~Bonus ()
void initByID (int params_ID)
 Initializes Bonus according to its ID in params.
virtual void picked (Tank &t)
virtual double modifyMaxSpeed (double speed)

Protected Attributes

bool mPermanent
 Tells whether the bonus is permanent or time-limited.
TankmInfluencedTank
 Tank that took this bonus. MAY BE NULL!
int mIconIndex
 Icon that will be displayed on player's screen when he has this bonus.

Detailed Description

Basic class for all bonuses. It implements "empty bonus" - doesn't change anything.

This class is probably not needed on client. When created, the class is bound to BonusBox. When some tank takes the Bonus (collides with bonusbox) - the bound is cancelled and BonusBox destroyed. Then the bonus is bound to the tank. If it is permanent bonus, its function is applyied and then destroyed. Otherwise it destroys after the bonus expiration.

Definition at line 17 of file bonus.h.


Constructor & Destructor Documentation

Bonus::Bonus  ) 
 

Definition at line 4 of file bonus.cpp.

Bonus::~Bonus  )  [virtual]
 

Definition at line 9 of file bonus.cpp.


Member Function Documentation

void Bonus::initByID int  params_ID  ) 
 

Initializes Bonus according to its ID in params.

Parameters:
params_ID ID from Params to initialize by.

Definition at line 14 of file bonus.cpp.

Referenced by World::createBonusBox().

virtual double Bonus::modifyMaxSpeed double  speed  )  [inline, virtual]
 

Definition at line 36 of file bonus.h.

virtual void Bonus::picked Tank t  )  [inline, virtual]
 

Definition at line 34 of file bonus.h.

References mInfluencedTank.


Member Data Documentation

int Bonus::mIconIndex [protected]
 

Icon that will be displayed on player's screen when he has this bonus.

Definition at line 47 of file bonus.h.

Tank* Bonus::mInfluencedTank [protected]
 

Tank that took this bonus. MAY BE NULL!

Definition at line 44 of file bonus.h.

Referenced by picked().

bool Bonus::mPermanent [protected]
 

Tells whether the bonus is permanent or time-limited.

Definition at line 41 of file bonus.h.


The documentation for this class was generated from the following files:
Generated on Wed Apr 12 14:12:01 2006 for bjs by  doxygen 1.4.5