summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/Cargo.toml3
-rw-r--r--game/src/main.rs5
2 files changed, 6 insertions, 2 deletions
diff --git a/game/Cargo.toml b/game/Cargo.toml
index 2cfa795..2792e83 100644
--- a/game/Cargo.toml
+++ b/game/Cargo.toml
@@ -15,7 +15,6 @@ graphics.workspace = true
workspace = true
[features]
-default = ["debug"]
-debug = ["graphics/debug"]
+default = []
wayland = ["graphics/wayland"]
sdl = ["graphics/sdl"]
diff --git a/game/src/main.rs b/game/src/main.rs
index 1c76abc..ae92e12 100644
--- a/game/src/main.rs
+++ b/game/src/main.rs
@@ -11,6 +11,11 @@ fn main() -> Result<()> {
while window.is_open() {
// TODO update game state
+ // Handle keyboard input
+ if window.is_key_pressed(KeyCode::KEY_F3) {
+ window.toggle_debug();
+ }
+
for enemy in dungeon.enemies.iter_mut() {
enemy.handle_movement(
dungeon.player.entity.pos,