Skip to content

Commit 6b367c2

Browse files
committed
esc final version
1 parent 1c63482 commit 6b367c2

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

DroneSimulator/include/modules/droneSimulator.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ class DroneSimulator : public BaseProject {
2929
TextMaker menuTxt;
3030
float gameOver = 0.0f;
3131

32-
33-
bool prevEscPressed = false;
34-
3532
// --- window parameters ---
3633
float Ar; // aspect ratio
3734

DroneSimulator/src/droneSimulator.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,12 +589,11 @@ void DroneSimulator::updateUniformBuffer(uint32_t currentImage)
589589
bool bPressed = glfwGetKey(window, GLFW_KEY_B) == GLFW_PRESS;
590590
bool enterPressed = glfwGetKey(window, GLFW_KEY_ENTER) == GLFW_PRESS;
591591

592-
bool escJustPressed = escPressed && !prevEscPressed;
593592
const float DRONE_SCALE = 0.065f;
594593

595594
// ─── GAME LOGIC (only PLAYING) ────
596595
if (state == AppState::Playing) {
597-
if (escJustPressed) {
596+
if (escPressed) {
598597
// ESC pressed: reset game
599598
menuTxt.removeText(2);
600599
menuTxt.removeText(3);

0 commit comments

Comments
 (0)