2024-07-06 17:18:28 +02:00
|
|
|
use comfy::{draw_circle, vec2, EngineContext, GREEN};
|
2024-07-06 13:33:58 +02:00
|
|
|
|
2024-07-06 17:19:44 +02:00
|
|
|
use crate::game::ZLayer;
|
|
|
|
|
2024-07-06 13:57:47 +02:00
|
|
|
pub mod worldgen;
|
|
|
|
|
2024-07-06 17:19:44 +02:00
|
|
|
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
|
2024-07-06 13:33:58 +02:00
|
|
|
draw_circle(vec2(0.0, 0.0), 0.5, GREEN, 0);
|
2024-07-06 17:19:44 +02:00
|
|
|
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
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2024-07-06 13:33:58 +02:00
|
|
|
}
|
|
|
|
|
2024-07-06 17:18:28 +02:00
|
|
|
pub fn update(_state: &mut crate::State, _engine: &mut EngineContext<'_>) {}
|