Added room and grid creation
This commit is contained in:
parent
5a4451d6a7
commit
f3e6afc179
3 changed files with 123 additions and 3 deletions
|
@ -1,23 +1,29 @@
|
|||
mod grid;
|
||||
mod player;
|
||||
mod room;
|
||||
|
||||
use grid::Grid;
|
||||
use player::Player;
|
||||
use room::Room;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct HouseState {
|
||||
grid: Grid,
|
||||
room: Room,
|
||||
//grid: Grid,
|
||||
player: Player
|
||||
}
|
||||
|
||||
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
|
||||
//Draw House
|
||||
state.house.room.draw();
|
||||
|
||||
//Draw Grid
|
||||
state.house.grid.draw();
|
||||
//state.house.grid.draw();
|
||||
|
||||
//Draw Player
|
||||
state.house.player.draw();
|
||||
}
|
||||
|
||||
pub fn update(state: &mut crate::State, _engine: &mut comfy::EngineContext) {
|
||||
state.house.player.update(&state.house.grid);
|
||||
state.house.player.update(&state.house.room.grid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue