Game over system fix

This commit is contained in:
2022-08-10 22:38:23 +02:00
parent fe5f91966f
commit 10daae1cf6
4 changed files with 86 additions and 75 deletions

21
src/canvas.rs Normal file
View File

@@ -0,0 +1,21 @@
use crate::grid;
use bevy::prelude::*;
pub struct ModPlugin;
impl Plugin for ModPlugin {
fn build(&self, app: &mut App) {
app.add_startup_system(spawn_background);
}
}
fn spawn_background(mut commands: Commands) {
commands.spawn_bundle(SpriteBundle {
sprite: Sprite {
color: Color::DARK_GRAY,
custom_size: Some(Vec2::splat(grid::SEGMENT_SIZE * grid::SIZE as f32)),
..Default::default()
},
..Default::default()
});
}