update to bevy 0.18

This commit is contained in:
2026-02-26 15:57:42 -05:00
parent 94b85c9cf7
commit e8735b83b3
35 changed files with 3143 additions and 3277 deletions

View File

@@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = "0.16.0"
serde = { version = "1.0.204", features = ["derive"] }
bevy = "0.18.0"
serde = { version = "1.0.228", features = ["derive"] }
world_generation = { path = "../../engine/world_generation" }

View File

@@ -34,7 +34,7 @@ fn despawn_at(mut commands: Commands, time: Res<Time>, entities: Query<(Entity,
fn despawn_after(mut commands: Commands, mut entities: Query<(&mut DespawnAfter, Entity)>, time: Res<Time>) {
for (mut after, entity) in &mut entities.iter_mut() {
after.0.tick(time.delta());
if after.0.finished() {
if after.0.is_finished() {
commands.entity(entity).despawn();
}
}

View File

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

View File

@@ -9,9 +9,9 @@ pub mod resources;
pub mod sets;
pub mod states;
pub mod tags;
pub mod prefab_defination;
pub mod component_defination;
pub mod animation_plugin;
// pub mod prefab_defination;
// pub mod animation_plugin;
// pub mod component_defination;
#[derive(Debug, Serialize, Deserialize)]
pub enum Tier {