Static World Gen and Display for the Overworld #5

Merged
msrd0 merged 21 commits from overworld-house-gen into main 2024-07-06 20:23:25 +00:00
5 changed files with 10 additions and 7 deletions
Showing only changes of commit 9231a8b37e - Show all commits

View file

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

View file

@ -10,7 +10,7 @@ pub struct HouseState {
player: Player player: Player
} }
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) { pub fn draw(state: &crate::State, _engine: &comfy::EngineContext<'_>) {
//Draw Grid //Draw Grid
state.house.grid.draw(); state.house.grid.draw();
@ -18,6 +18,6 @@ pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
state.house.player.draw(); 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.grid); state.house.player.update(&state.house.grid);
} }

View file

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

View file

@ -1,6 +1,6 @@
use comfy::{ use comfy::{
draw_circle, draw_rect_outline, draw_sprite, main_camera_mut, texture_id, vec2, draw_rect_outline, draw_sprite, main_camera_mut, EngineContext, IVec2, Vec2, RED,
EngineContext, IVec2, Vec2, GREEN, RED, WHITE WHITE
}; };
use crate::game::ZLayer; use crate::game::ZLayer;

View file

@ -1,3 +1,6 @@
// TODO remove this
#![allow(dead_code)]
use crate::assets::ASSETS; use crate::assets::ASSETS;
use comfy::{IVec2, TextureHandle, UVec2}; use comfy::{IVec2, TextureHandle, UVec2};
use log::info; use log::info;