|
|
@ -9,12 +9,17 @@ void Game::draw(QPixmap &output) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Game::update(float dTime) { |
|
|
|
void Game::update(float dTime) { |
|
|
|
|
|
|
|
eTime += dTime; |
|
|
|
player.update(dTime); |
|
|
|
player.update(dTime); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Game::Game() { |
|
|
|
Game::Game() { |
|
|
|
|
|
|
|
for (auto & spectator : spectators){ |
|
|
|
|
|
|
|
Game::eventQueue->registerListener(&spectator); |
|
|
|
|
|
|
|
} |
|
|
|
InputWindow::inputQueue->registerListener(&player); |
|
|
|
InputWindow::inputQueue->registerListener(&player); |
|
|
|
|
|
|
|
instance = this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
GameQueue * Game::eventQueue = new GameQueue; |
|
|
|
GameQueue * Game::eventQueue = new GameQueue; |
|
|
|
|
|
|
|
Game * Game::instance = nullptr; |
|
|
|