25 lines
650 B
C++
25 lines
650 B
C++
#include "scene/DeathScene.hpp"
|
|
|
|
#include "EnergyBarRaygui.hpp"
|
|
#include "scene/GameplayScene.hpp"
|
|
#include "scene/SceneManager.hpp"
|
|
#include "scene/StartMenuScene.hpp"
|
|
|
|
void DeathScene::Update(float) {
|
|
if (IsKeyPressed(KEY_ENTER)) {
|
|
manager.QueueSceneChange<GameplayScene>();
|
|
return;
|
|
}
|
|
|
|
if (IsKeyPressed(KEY_ESCAPE)) {
|
|
manager.QueueSceneChange<StartMenuScene>();
|
|
}
|
|
}
|
|
|
|
void DeathScene::Draw() {
|
|
Scene::Draw();
|
|
// Draw centered death stats using the HUD helper
|
|
// collectedStars is a private member; access via this-> to satisfy older compilers / linters
|
|
DrawDeathStats(this->collectedStars);
|
|
}
|