summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/src/main.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/game/src/main.rs b/game/src/main.rs
index f26ece4..919e22c 100644
--- a/game/src/main.rs
+++ b/game/src/main.rs
@@ -11,11 +11,12 @@ fn main() -> Result<()> {
while window.is_open() {
// TODO update game state
- // Enemy Tick
for enemy in dungeon.enemies.iter_mut() {
- enemy
- .entity
- .move_by_dir(Direction::West, window.delta_time());
+ enemy.handle_movement(
+ dungeon.player.entity.pos,
+ window.delta_time(),
+ dungeon.floor.tiles_mut(),
+ );
}
// Draw a single frame