Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Granade Class Reference

#include <Granade.h>

List of all members.

Public Member Functions

 Granade ()
virtual ~Granade ()
void create (Vec3 p, Vec3 v, float l, float s=1.0f)
bool update (float dTime, ObjLevel *lvl)
Vec3 getPos ()
float getStrength ()
bool isAlive ()
void setPlayerID (int id)
int getPlayerID ()

Protected Attributes

Vec3 m_position
Vec3 m_prevPosition
Vec3 m_velocity
float m_life
float m_strength
int playerID


Detailed Description

Granade.h

Author: Petter Alstermark, petter@alstermark.com

Definition at line 14 of file Granade.h.


Constructor & Destructor Documentation

Granade::Granade  ) 
 

Granade.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 12 of file Granade.cpp.

References m_life.

Granade::~Granade  )  [virtual]
 

Definition at line 19 of file Granade.cpp.


Member Function Documentation

void Granade::create Vec3  p,
Vec3  v,
float  l,
float  s = 1.0f
 

Definition at line 25 of file Granade.cpp.

References m_life, m_position, m_strength, and m_velocity.

Referenced by Play::throwGrenade().

int Granade::getPlayerID  )  [inline]
 

Definition at line 26 of file Granade.h.

Vec3 Granade::getPos  )  [inline]
 

Definition at line 22 of file Granade.h.

References m_position.

Referenced by Play::drawGrenades().

float Granade::getStrength  )  [inline]
 

Definition at line 23 of file Granade.h.

References m_strength.

bool Granade::isAlive  )  [inline]
 

Definition at line 24 of file Granade.h.

References m_life.

void Granade::setPlayerID int  id  )  [inline]
 

Definition at line 25 of file Granade.h.

References playerID.

Referenced by Play::throwGrenade().

bool Granade::update float  dTime,
ObjLevel lvl
 

Definition at line 36 of file Granade.cpp.

References ObjLevel::collission(), GRAVITY, ObjLevel::isWall(), ObjLevel::isWater(), m_life, m_position, m_prevPosition, m_velocity, Vec3::x, Vec3::y, and Vec3::z.

Here is the call graph for this function:


Member Data Documentation

float Granade::m_life [protected]
 

Definition at line 32 of file Granade.h.

Referenced by create(), Granade(), isAlive(), and update().

Vec3 Granade::m_position [protected]
 

Definition at line 26 of file Granade.h.

Referenced by create(), getPos(), and update().

Vec3 Granade::m_prevPosition [protected]
 

Definition at line 30 of file Granade.h.

Referenced by update().

float Granade::m_strength [protected]
 

Definition at line 33 of file Granade.h.

Referenced by create(), and getStrength().

Vec3 Granade::m_velocity [protected]
 

Definition at line 31 of file Granade.h.

Referenced by create(), and update().

int Granade::playerID [protected]
 

Definition at line 34 of file Granade.h.

Referenced by setPlayerID().


Generated on Sun Jun 5 15:49:47 2005 for Defacto by  doxygen 1.4.3