class Exp: public GameObj

This class represent an explosion

Inheritance:


Public Fields

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

Public Methods

[more] Exp()
Minimal Constructor
[more]void Draw()
It draw a simple disk
[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 an explosion. Version History
  • 0.1 First Release (e.g. written only the defs without implementing or using it...)
  • 0.3 First concretely working release
Note that this class is very similar to bullet (same ttl). Probably in next versions we will subclass Exp and Bullet from a intermediate Timed class.
o Exp()
Minimal Constructor

oint ttl
Time To Live (expressed in msec). Same of the bullet...

ovoid Draw()
It draw a simple disk. The disk is drawn with a triangular fan transparent in the center and yellow on the border. Note that to draw with transparency we have to enable the blending. We have choosen to enable the blending only here for performance reasons. To avoid that other objects cover an explosions we disable the depth test and draw the explosion (that are contained in the generic ActiveObj list of the GameSession) as the last objects.

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


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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