Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes

Grenade Class Reference

#include <Grenade.h>

Inheritance diagram for Grenade:
GModel GGraphicsObject GObject

List of all members.

Public Member Functions

 Grenade (void)
 Total time until grenade explodes.
 ~Grenade (void)
 standard constructor
int Detonate (void)
 standard destructor
void SetBlastRadius (double _n)
 detonate grenade, kill all enemies in the blast radius
double GetBlastRadius (void)
 set the grenades blast radius
void SetNoFragments (int _n)
 get the grenades blast radius
int GetNoFragments (void)
 set number of fragments to be released at the detonation
void SetCreationTime (double _t)
 get number of fragments to be released at the detonation
double GetCreationTime (void)
 set the grenades creation time
void SetLifeTime (double _n)
 get the grenades creation time
double GetLifeTIme (void)
 set the grenades life time
virtual int Draw (double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS)
 get the grenades life time
virtual int Update (double time, double dtime, int FLAGS)
 draw the grenade

Static Public Member Functions

static int InitGrenades (int FLAGS)
 update grenade and detonate if lifetime has expired

Protected Attributes

double BlastRadius
 indicates if grenade-VBOs have been initialized yet
int NoFragments
 Area of effect.
double CreationTime
 Number of fragments to be released at explosion.
double LifeTime
 Timestamp of creation.

Static Protected Attributes

static GAnimatedMeshGrenadeMesh = NULL
static GSkeletonGrenadeSkeleton = NULL
 use a static grenade mesh as it's not going to change with new instances
static bool VBOInitialized = false
 use a static defaults skeleton and vertex mapping as it's not going to change with new instances

Constructor & Destructor Documentation

Grenade::Grenade ( void   ) 

Total time until grenade explodes.

Grenade::~Grenade ( void   ) 

standard constructor


Member Function Documentation

int Grenade::Detonate ( void   ) 

standard destructor

int Grenade::Draw ( double  time,
double  dtime,
GMatrix16 viewmatrix,
GMatrix16 worldmatrix,
int  FLAGS 
) [virtual]

get the grenades life time

Reimplemented from GModel.

double Grenade::GetBlastRadius ( void   ) 

set the grenades blast radius

double Grenade::GetCreationTime ( void   ) 

set the grenades creation time

double Grenade::GetLifeTIme ( void   ) 

set the grenades life time

int Grenade::GetNoFragments ( void   ) 

set number of fragments to be released at the detonation

int Grenade::InitGrenades ( int  FLAGS  )  [static]

update grenade and detonate if lifetime has expired

void Grenade::SetBlastRadius ( double  _n  ) 

detonate grenade, kill all enemies in the blast radius

void Grenade::SetCreationTime ( double  _t  ) 

get number of fragments to be released at the detonation

void Grenade::SetLifeTime ( double  _n  ) 

get the grenades creation time

void Grenade::SetNoFragments ( int  _n  ) 

get the grenades blast radius

int Grenade::Update ( double  time,
double  dtime,
int  FLAGS 
) [virtual]

draw the grenade


Member Data Documentation

double Grenade::BlastRadius [protected]

indicates if grenade-VBOs have been initialized yet

double Grenade::CreationTime [protected]

Number of fragments to be released at explosion.

GAnimatedMesh * Grenade::GrenadeMesh = NULL [static, protected]
GSkeleton * Grenade::GrenadeSkeleton = NULL [static, protected]

use a static grenade mesh as it's not going to change with new instances

double Grenade::LifeTime [protected]

Timestamp of creation.

int Grenade::NoFragments [protected]

Area of effect.

bool Grenade::VBOInitialized = false [static, protected]

use a static defaults skeleton and vertex mapping as it's not going to change with new instances


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines