Merge branch 'main' into room-creation

This commit is contained in:
Glaeder 2024-07-07 00:04:54 +02:00
commit c8e21d544a
20 changed files with 1214 additions and 21 deletions

View file

@ -1,4 +1,4 @@
use comfy::*;
use comfy::{draw_circle, draw_line, error, vec2, Vec2, BLUE};
#[derive(Debug)]
pub struct Grid {

View file

@ -13,7 +13,7 @@ pub struct HouseState {
player: Player
}
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext<'_>) {
//Draw House
state.house.room.draw();
@ -24,6 +24,6 @@ pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
state.house.player.draw();
}
pub fn update(state: &mut crate::State, _engine: &mut comfy::EngineContext) {
pub fn update(state: &mut crate::State, _engine: &mut comfy::EngineContext<'_>) {
state.house.player.update(&state.house.room.grid);
}

View file

@ -1,6 +1,6 @@
use comfy::*;
use super::Grid;
use comfy::{delta, draw_circle, is_key_down, vec2, KeyCode, Vec2, RED};
use std::collections::HashSet;
#[derive(Debug)]
pub struct Player {