Bugfixes, added sound to portal and enemy in JSON

This commit is contained in:
2016-06-21 13:51:16 +02:00
parent 7c4805d899
commit 8700aa90af
18 changed files with 98 additions and 22 deletions
+4 -5
View File
@@ -17,8 +17,6 @@ int CrystalPoint::height = 0;
SoundSystem CrystalPoint::sound_system;
bool state = false;
void CrystalPoint::init()
{
player = Player::getInstance();
@@ -51,9 +49,9 @@ void CrystalPoint::draw()
worldhandler->draw();
if(!state)
menu->draw();
glutSwapBuffers();
}
@@ -64,14 +62,15 @@ void CrystalPoint::update()
float deltaTime = frameTime - lastFrameTime;
lastFrameTime = frameTime;
if (keyboardState.keys[27] && !prevKeyboardState.keys[27])
state = !state;
if (state)
{
if (keyboardState.special[GLUT_KEY_LEFT] && !prevKeyboardState.special[GLUT_KEY_LEFT])
worldhandler->PreviousWorld();
if (keyboardState.special[GLUT_KEY_RIGHT] && !prevKeyboardState.special[GLUT_KEY_RIGHT])
worldhandler->NextWorld();
if (keyboardState.keys[27])
state = false;
Player* player = Player::getInstance();