base class for players, monsters, npc's, etc. More...
#include <Creature.h>
Public Member Functions | |
Creature (void) | |
standard constructor | |
~Creature (void) | |
standard destructor | |
void | SetMaxHits (int) |
set maximum number of hitpoints for creature | |
int | GetMaxHits (void) |
get maximum number of hitpoints for creature | |
int | GetCurrentHits (void) |
get number of current hitpoints | |
void | SetHits (int _n) |
Set number of current hit points. | |
int | SetGun (Gun *GunModel, GBone *AttachTo=NULL) |
Assign the creature a Gun. | |
Gun * | GetGun (void) |
obtain pointer to assigned gun (if any) | |
virtual int | setPosition (GVec4f v) |
set x,y,z position | |
int | DropGun (void) |
unassign gun. NOTE: gun will be dropped in place and will remain an active scene object | |
virtual int | RebuildMatrix (void) |
rebuild worldspace matrix | |
virtual int | setRotation (GVec4f v) |
set new rotation for creature, assigned gun and crosshair | |
virtual int | FireGun (double time, double dtime, int FLAGS) |
fire assigned gun and spawn new instances of class | |
virtual Crosshair * | GetCrosshair (void) |
obtain pointer to assigned crosshair (if any) | |
virtual int | Damage (int) |
deal damage to a creature | |
virtual int | Update (double time, double dtime) |
Update creature. | |
Protected Attributes | |
int | MaxHitPoints |
Max. possible life. | |
int | CurrentHitPoints |
Life at the moment. | |
Gun * | EquippedGun |
Pointer to Gun (if any). | |
Crosshair * | mCrosshair |
Pointer to Crosshair. |
base class for players, monsters, npc's, etc.
Creature::Creature | ( | void | ) |
standard constructor
Creature::~Creature | ( | void | ) |
standard destructor
int Creature::Damage | ( | int | i | ) | [virtual] |
deal damage to a creature
Reimplemented in Player.
int Creature::DropGun | ( | void | ) |
unassign gun. NOTE: gun will be dropped in place and will remain an active scene object
int Creature::FireGun | ( | double | time, | |
double | dtime, | |||
int | FLAGS | |||
) | [virtual] |
fire assigned gun and spawn new instances of class
Reimplemented in Monster.
Crosshair * Creature::GetCrosshair | ( | void | ) | [virtual] |
int Creature::GetCurrentHits | ( | void | ) |
get number of current hitpoints
Gun * Creature::GetGun | ( | void | ) |
obtain pointer to assigned gun (if any)
int Creature::GetMaxHits | ( | void | ) |
get maximum number of hitpoints for creature
int Creature::RebuildMatrix | ( | void | ) | [virtual] |
rebuild worldspace matrix
Reimplemented from GModel.
void Creature::SetHits | ( | int | _n | ) |
Set number of current hit points.
void Creature::SetMaxHits | ( | int | n | ) |
set maximum number of hitpoints for creature
int Creature::setRotation | ( | GVec4f | v | ) | [virtual] |
set new rotation for creature, assigned gun and crosshair
Reimplemented from GModel.
int Creature::Update | ( | double | time, | |
double | dtime | |||
) | [virtual] |
int Creature::CurrentHitPoints [protected] |
Life at the moment.
Gun* Creature::EquippedGun [protected] |
Pointer to Gun (if any).
int Creature::MaxHitPoints [protected] |
Max. possible life.
Crosshair* Creature::mCrosshair [protected] |
Pointer to Crosshair.