draw overworld
This commit is contained in:
parent
427c71c20f
commit
284163b428
4 changed files with 46 additions and 4 deletions
|
@ -1,9 +1,23 @@
|
|||
use comfy::{draw_circle, vec2, EngineContext, GREEN};
|
||||
|
||||
use crate::game::ZLayer;
|
||||
|
||||
pub mod worldgen;
|
||||
|
||||
pub fn draw(_state: &crate::State, _engine: &EngineContext<'_>) {
|
||||
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
|
||||
draw_circle(vec2(0.0, 0.0), 0.5, GREEN, 0);
|
||||
for (coords, tile) in state.overworld.iter_tiles() {
|
||||
for (i, texture) in tile.textures.iter().rev().enumerate() {
|
||||
let i = i as i32;
|
||||
draw_sprite(
|
||||
*texture,
|
||||
coords.as_vec2(),
|
||||
Default::default(),
|
||||
ZLayer::MapMax - i,
|
||||
Vec2::ONE
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update(_state: &mut crate::State, _engine: &mut EngineContext<'_>) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue