wip: Start migration to bevy 0.14

This commit is contained in:
2024-10-20 13:39:02 +02:00
parent d6f900a3e4
commit 91dbf577bd
6 changed files with 1402 additions and 881 deletions

2263
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,15 +4,15 @@ version = "0.1.0"
edition = "2021"
[dependencies]
itertools = "0.12.1"
itertools = "0.13.0"
rand = "0.8.5"
bevy_editor_pls = { git = "https://github.com/jakobhellermann/bevy_editor_pls" }
bevy_tweening = "0.10.0"
leafwing-input-manager = "0.13.3"
bevy_asset_loader = "0.20.0"
bevy_tweening = "0.11.0"
leafwing-input-manager = "0.15.1"
bevy_asset_loader = "0.21.0"
[dependencies.bevy]
version = "0.13"
version = "0.14"
features = ["wayland", "wav"]
# [profile.dev.package."*"]

View File

@@ -31,7 +31,7 @@ impl Plugin for CanvasPlugin {
}
}
const CANVAS_COLOR: Color = Color::rgb(0.05, 0.05, 0.05);
const CANVAS_COLOR: Color = Color::srgb(0.05, 0.05, 0.05);
#[derive(AsBindGroup, TypePath, Asset, Clone)]
struct CanvasMaterial {

View File

@@ -58,7 +58,7 @@ fn spawn_fruit_system(mut commands: Commands, coordinate_query: Query<&grid::Coo
commands
.spawn(SpriteBundle {
sprite: Sprite {
color: Color::GREEN,
color: Srgba::GREEN.into(),
custom_size: Some(Vec2::splat(grid::SEGMENT_SIZE) * 0.6),
..Default::default()
},

View File

@@ -104,7 +104,7 @@ fn main() {
#[cfg(debug_assertions)]
{
app.add_plugins(EditorPlugin::new())
.add_systems(Update, (bevy::window::close_on_esc, pause_system));
.add_systems(Update, pause_system);
}
app.run();

View File

@@ -123,13 +123,13 @@ fn create_snake_segment(
grid_position: grid::Coordinate,
segment_number: u32,
) -> Entity {
let mut color = Color::RED;
let mut color = Srgba::RED;
color *= 0.99f32.powi(segment_number as _);
commands
.spawn(SpriteBundle {
sprite: Sprite {
color,
color: color.into(),
custom_size: Some(Vec2::splat(grid::SEGMENT_SIZE) * 0.9),
..Default::default()
},