enter house (#10)
Some checks failed
Rust / rustfmt (push) Successful in 29s
Rust / clippy (push) Failing after 2m25s
Rust / build (push) Successful in 2m54s

Reviewed-on: #10
Co-authored-by: luckyturtledev <git@lukas1818.de>
Co-committed-by: luckyturtledev <git@lukas1818.de>
This commit is contained in:
luckyturtledev 2024-07-07 11:21:08 +00:00 committed by LuckyTurtleDev
parent 1c897d6712
commit bb37f613ad
5 changed files with 52 additions and 12 deletions

View file

@ -11,13 +11,16 @@ pub struct HouseState {
}
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext<'_>) {
//Draw Grid
state.house.grid.draw();
if let Some(house) = state.house() {
//Draw Grid
house.grid.draw();
//Draw Player
state.house.player.draw();
//Draw Player
house.player.draw();
}
}
pub fn update(state: &mut crate::State, _engine: &mut comfy::EngineContext<'_>) {
state.house.player.update(&state.house.grid);
let house = state.house_mut();
house.player.update(&house.grid);
}