Bullet Class Reference

#include <Bullet.h>

Inheritance diagram for Bullet:

Object List of all members.

Public Member Functions

 Bullet (Person *shooter, int bulletSpeed, int damage=1, int which=0)
virtual Objectcopy ()
virtual void draw ()
virtual void update ()
virtual void collide (Object *o)
int getDamage ()
void setShooter (Person *shooter)

Protected Attributes

Person_shooter
Sprite_sprite
int _xVelocity
int _yVelocity
int _damage
xDirection _xDirection
yDirection _yDirection

Detailed Description

Definition at line 8 of file Bullet.h.


Constructor & Destructor Documentation

Bullet::Bullet Person shooter,
int  bulletSpeed,
int  damage = 1,
int  which = 0
 

Definition at line 13 of file Bullet.cpp.

References Object::_box, Object::_depth, _shooter, Object::_solid, _sprite, Object::_type, _xDirection, _xVelocity, _yDirection, _yVelocity, BULLET, DOWN, Object::getBox(), Sprite::height(), LEFT, Sprite::loadSprite(), MIDDLE, Sprite::setDirection(), UP, and Sprite::width().

Referenced by copy().


Member Function Documentation

void Bullet::collide Object o  )  [virtual]
 

Reimplemented from Object.

Definition at line 152 of file Bullet.cpp.

References _damage, _shooter, BOSS, BULLET, ENEMY, Object::getType(), and PLAYER.

Object * Bullet::copy  )  [virtual]
 

Reimplemented from Object.

Definition at line 123 of file Bullet.cpp.

References Bullet().

void Bullet::draw  )  [virtual]
 

Implements Object.

Definition at line 131 of file Bullet.cpp.

References Object::_box, _sprite, _xDirection, Sprite::draw(), and Sprite::setDirection().

int Bullet::getDamage  )  [inline]
 

Definition at line 16 of file Bullet.h.

References _damage.

void Bullet::setShooter Person shooter  )  [inline]
 

Definition at line 17 of file Bullet.h.

References _shooter.

void Bullet::update  )  [virtual]
 

Reimplemented from Object.

Definition at line 137 of file Bullet.cpp.

References Object::_box, _xVelocity, _yVelocity, CollisionHandler::checkCollision(), Screen::FRAMERATE, Screen::getScreenRect(), Level::instance(), Screen::instance(), CollisionHandler::instance(), glfuncs::intersect(), and Level::scheduleDelete().


Member Data Documentation

int Bullet::_damage [protected]
 

Definition at line 25 of file Bullet.h.

Referenced by collide(), and getDamage().

Person* Bullet::_shooter [protected]
 

Definition at line 20 of file Bullet.h.

Referenced by Bullet(), collide(), and setShooter().

Sprite* Bullet::_sprite [protected]
 

Definition at line 21 of file Bullet.h.

Referenced by Bullet(), and draw().

xDirection Bullet::_xDirection [protected]
 

Definition at line 26 of file Bullet.h.

Referenced by Bullet(), and draw().

int Bullet::_xVelocity [protected]
 

Definition at line 23 of file Bullet.h.

Referenced by Bullet(), and update().

yDirection Bullet::_yDirection [protected]
 

Definition at line 27 of file Bullet.h.

Referenced by Bullet().

int Bullet::_yVelocity [protected]
 

Definition at line 24 of file Bullet.h.

Referenced by Bullet(), and update().


The documentation for this class was generated from the following files:
Generated on Fri May 5 00:20:19 2006 for ProjectX by  doxygen 1.4.6-NO