Room Creating: Place Kitchen Furniture #11
1 changed files with 7 additions and 7 deletions
|
@ -42,11 +42,11 @@ pub fn update(state: &mut crate::State, ctx: &mut comfy::EngineContext<'_>) {
|
||||||
let house = state.house_mut();
|
let house = state.house_mut();
|
||||||
house.player.update(&house.grid);
|
house.player.update(&house.grid);
|
||||||
|
|
||||||
if house.player.is_moving_to_right_room(&house.room) {
|
if house.player.is_moving_to_right_room(&house.room) {
|
||||||
house.room = Room::new(ctx);
|
house.room = Room::new(ctx);
|
||||||
house.player.reset_on_room(&house.room, true);
|
house.player.reset_on_room(&house.room, true);
|
||||||
} else if house.player.is_moving_to_left_room(&house.room) {
|
} else if house.player.is_moving_to_left_room(&house.room) {
|
||||||
house.room = Room::new(ctx);
|
house.room = Room::new(ctx);
|
||||||
house.player.reset_on_room(&house.room, false);
|
house.player.reset_on_room(&house.room, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue