summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-20 10:07:41 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-20 10:07:41 -0500
commit65b69d06200d7757bb7f9f9ae3645a7366d08826 (patch)
treeeb5897af68d7a3a103a5b318b01c2c1d56da44c4 /game
parentdungeon: inventory usage (diff)
downloadDungeonCrawl-65b69d06200d7757bb7f9f9ae3645a7366d08826.tar.gz
DungeonCrawl-65b69d06200d7757bb7f9f9ae3645a7366d08826.tar.bz2
DungeonCrawl-65b69d06200d7757bb7f9f9ae3645a7366d08826.zip
dungeon: entity death
Diffstat (limited to 'game')
-rw-r--r--game/src/lib.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/game/src/lib.rs b/game/src/lib.rs
index f123326..b6d2fa4 100644
--- a/game/src/lib.rs
+++ b/game/src/lib.rs
@@ -88,9 +88,7 @@ impl Game {
self.window.toggle_debug();
}
if self.window.is_key_pressed(Key::F4) {
- self.dungeon
- .msg
- .set_message("Lorem ipsum dolor sit amet consectetur adipiscing elit");
+ self.dungeon.player.entity.health = 0;
}
// Update game state
@@ -99,7 +97,9 @@ impl Game {
.dungeon
.update(inputs, self.window.delta_time().as_secs_f32());
match result {
- UpdateResult::EntityMovement => {}
+ UpdateResult::Default(_action) => {
+ // TODO: make noises for player actions
+ }
UpdateResult::NextFloor => {
// TODO: stairs audio
}
@@ -108,6 +108,10 @@ impl Game {
self.window.audio().speak.play();
}
}
+ UpdateResult::GameOver => {
+ // TODO: player game over music, very sad
+ }
+ UpdateResult::Nothing => {}
}
// Draw a single frame