diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-10-16 11:08:19 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-10-16 11:08:19 -0400 |
| commit | 5968002fd5704770781e43270a4e3e2a2721df13 (patch) | |
| tree | 8f514974ab908ef761bfde4806ce56d90503414a | |
| parent | dungeon: add more getters and lib fns (diff) | |
| download | DungeonCrawl-5968002fd5704770781e43270a4e3e2a2721df13.tar.gz DungeonCrawl-5968002fd5704770781e43270a4e3e2a2721df13.tar.bz2 DungeonCrawl-5968002fd5704770781e43270a4e3e2a2721df13.zip | |
graphics: stub draw_entity
| -rw-r--r-- | graphics/src/render.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/graphics/src/render.rs b/graphics/src/render.rs index 6a566ce..1164953 100644 --- a/graphics/src/render.rs +++ b/graphics/src/render.rs @@ -1,4 +1,4 @@ -use dungeon::Dungeon; +use dungeon::{Dungeon, Entity}; use raylib::{ color::Color, prelude::{RaylibDraw, RaylibDrawHandle}, @@ -76,7 +76,12 @@ impl<'a> Renderer<'a> { } /// Draw the player sprite - pub fn draw_player(&mut self, _dungeon: &Dungeon) { + pub fn draw_player(&mut self, dungeon: &Dungeon) { + self.draw_entity(dungeon.player()); + } + + /// Draws an entity + pub fn draw_entity(&mut self, _entity: &Entity) { // TODO: } |