00001 #include "endgameGS.h"
00002 #include <iostream>
00003
00004 #include "textures.h"
00005 #include "ActiveGS.h"
00006 #include "Music.h"
00007
00008 static GameState *thisGS;
00009 void exitGame()
00010 {
00011 exit(0);
00012 }
00013 void EndGameGS::init() {
00014 fire = new Fire(TEXTURE_PARTICLE);
00015 thisGS = this;
00016
00017 InputSetKeyDown(27,exitGame);
00018
00019 callback = new EndGameGSback(this);
00020 client->setGameCallback(callback);
00021
00022
00023 glutPostRedisplay();
00024 playMusic(1);
00025
00026
00027 }
00028
00029 void EndGameGS::startGame() {
00030
00031 setGameState(new ActiveGS(client));
00032 }
00033
00034 void EndGameGS::exit() {
00035
00036 }
00037
00038 void EndGameGS::update() {
00039
00040 }
00041
00042 void EndGameGS::display() {
00043
00044 glPushMatrix();
00045
00046 glLoadIdentity();
00047 fire->draw();
00048 glPopMatrix();
00049
00050 scoreMenu->render();
00051
00052 glColor3f(1,0,0);
00053 char * string = "GAME OVER";
00054 glRasterPos2f(500, 500);
00055 for(int i = 0; i < 10; i++) {
00056 glutBitmapCharacter(GLUT_BITMAP_9_BY_15, string[i]);
00057 }
00058 glutSwapBuffers();
00059
00060
00061 }
00062
00063