This class represent a Game session
This class represent a Game session. It contain all the data needed during the game play, active game objects, score, lives and so on. Version History
- 0.1 First Release.
- 0.1s Modified Shoot to manage multiple shots .
- 0.3 Added collision detection between ship and asteroids, \Ref(AstShipCollision), and between bullets and Asteroids, BulletAstCollision. Modified Update to manage the effect of the various collisions (death of the player, explosion and splitting of the asteroid).
- 0.3s Added PauseFlag and implemented Pause()
- 0.4 Subclassed from GameSection, bring in all the callbacks and the opengl intialization. Now at startup there is a fixed number of Large Asteroids, and all the smaller pieces are created (timeconsuming operation) at startup instead of at running time (in the previous version game stopped when there were many explosions)
- 0.4s added starred background
- 0.5 Added (at last!) score, lives, refill of asteroid and no more start inside an asteroid. Audio effects are started here in function Shoot, AstShipCollision and BulletAstCollision..
list<Bullet *> ActiveBullet
list<Ast*> ActiveAst
list<GameObj *> ActiveObj
Stars SB
Ship* S
void Update(int dt)
int Draw()
void Clip(Point3f &p)
void Shoot()
void Key(unsigned char key)
void SKey(int key)
void Init(int _score=0, int _lives=3)
void Pause()
void End()
int SpaceSize
void AstShipCollision(Ast *a)
void BulletAstCollision(Bullet *b)
int deadpause
int endlevelpause
bool PauseFlag
Alphabetic index HTML hierarchy of classes or Java