class Bullet: public GameObj

This class represent a bullet fired by a ship

Inheritance:


Public Fields

[more]int ttl
Time To Live (expressed in msec)

Public Methods

[more] Bullet()
Minimal Constructor
[more] Bullet(const Point3f &_p, const float _angle)
Constructor with given position and direction
[more] Bullet(const Point3f &_p, const float _angle, const Point3f &_v)
Constructur with given position and direction and velocity
[more]void Draw()
This function draw a single bullet
[more]void Update(int t)
It must update and check the remaining Time To Live (TTL) of the bullet and disactivating it if necessary

Inherited from GameObj:

Public Fields

oPoint3f p
oPoint3f axis
ofloat angle
oPoint3f v
ofloat av
obool active
oSphere3f B

Public Methods

oPoint3f VDir()
obool Collide(GameObj *o)
ovoid DrawBound()

Documentation

This class represent a bullet fired by a ship. Please note the specialized draw and update function and the TTL member
o Bullet()
Minimal Constructor

o Bullet(const Point3f &_p, const float _angle)
Constructor with given position and direction

o Bullet(const Point3f &_p, const float _angle, const Point3f &_v)
Constructur with given position and direction and velocity

oint ttl
Time To Live (expressed in msec). Time that the object has before it disappear. Once the ttl become <= 0 the bulled become not active and GameSession will remove it from the Active Bullet list

ovoid Draw()
This function draw a single bullet. This is the simple bullet (just a short line shading from cyan to dark blue).

ovoid Update(int t)
It must update and check the remaining Time To Live (TTL) of the bullet and disactivating it if necessary.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.