From 220d5c8aa8418d37ee9027c817d27b3e50380b81 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 14 Nov 2025 21:48:24 -0500 Subject: graphics: new textures! --- dungeon/src/entity.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dungeon/src') diff --git a/dungeon/src/entity.rs b/dungeon/src/entity.rs index 592c1ee..f56f8dd 100644 --- a/dungeon/src/entity.rs +++ b/dungeon/src/entity.rs @@ -323,6 +323,11 @@ impl Entity { next_move = *last; } } + + /// Returns the position in front of the entity + pub const fn in_front(&self) -> Option { + self.pos.step(self.dir) + } } /// The `Player` type represents the main player entity -- cgit v1.2.3-freya