Buildings Processing

Tile/Chunk updates events
This commit is contained in:
2024-08-03 18:48:47 -04:00
parent 59090fd3fb
commit bde25435ec
18 changed files with 318 additions and 52 deletions

View File

@@ -8,6 +8,7 @@ edition = "2021"
[dependencies]
bevy = "0.14.0"
serde = { version = "1.0.204", features = ["derive"] }
world_generation = { path = "../../engine/world_generation" }
[features]

13
game/shared/src/events.rs Normal file
View File

@@ -0,0 +1,13 @@
use bevy::prelude::*;
use world_generation::hex_utils::*;
#[derive(Event)]
pub enum TileModifiedEvent {
HeightChanged(HexCoord, f32),
TypeChanged(HexCoord, usize),
}
#[derive(Event)]
pub struct ChunkModifiedEvent {
pub index: usize,
}

View File

@@ -3,3 +3,4 @@ pub mod despawn;
pub mod resource;
pub mod states;
pub mod tags;
pub mod events;