From 0f85752b1657e7b8024fb2715578712295979b3a Mon Sep 17 00:00:00 2001 From: tom barrett Date: Tue, 27 Aug 2019 03:33:50 -0500 Subject: cargo update and dialogbox now disappears and npc resumes wandering --- src/game.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/game.rs') diff --git a/src/game.rs b/src/game.rs index 2eabcb2..8e86b99 100644 --- a/src/game.rs +++ b/src/game.rs @@ -35,6 +35,11 @@ impl EventHandler for Game { fn update(&mut self, _context: &mut Context) -> GameResult { self.world.update(); self.camera.give_center(self.world.player.get_position()); + + if !self.world.player_in_talking_range() { + self.dialogbox.give_dialogtree(None); + } + self.dialogbox.update(); Ok(()) } -- cgit v1.2.3