cabel-movement (#3)
Cable Movemnt is finished. grid is hard coded Reviewed-on: #3 Co-authored-by: Glaeder <niklas@vousten.dev> Co-committed-by: Glaeder <niklas@vousten.dev>
This commit is contained in:
parent
576b21d8b9
commit
5a4451d6a7
9 changed files with 377 additions and 25 deletions
23
src/activities/house/mod.rs
Normal file
23
src/activities/house/mod.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
mod grid;
|
||||
mod player;
|
||||
|
||||
use grid::Grid;
|
||||
use player::Player;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct HouseState {
|
||||
grid: Grid,
|
||||
player: Player
|
||||
}
|
||||
|
||||
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
|
||||
//Draw Grid
|
||||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue