Static World Gen and Display for the Overworld #5
5 changed files with 10 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
use comfy::*;
|
||||
use comfy::{draw_circle, draw_line, error, vec2, Vec2, BLUE};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Grid {
|
||||
|
|
|
@ -10,7 +10,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 Grid
|
||||
state.house.grid.draw();
|
||||
|
||||
|
@ -18,6 +18,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.grid);
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use comfy::{
|
||||
draw_circle, draw_rect_outline, draw_sprite, main_camera_mut, texture_id, vec2,
|
||||
EngineContext, IVec2, Vec2, GREEN, RED, WHITE
|
||||
draw_rect_outline, draw_sprite, main_camera_mut, EngineContext, IVec2, Vec2, RED,
|
||||
WHITE
|
||||
};
|
||||
|
||||
use crate::game::ZLayer;
|
|
@ -1,3 +1,6 @@
|
|||
// TODO remove this
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::assets::ASSETS;
|
||||
use comfy::{IVec2, TextureHandle, UVec2};
|
||||
use log::info;
|
||||
|
|
Loading…
Reference in a new issue