Update to Bevy 0.9
This commit is contained in:
@@ -14,7 +14,7 @@ pub struct FruitPlugin;
|
||||
impl Plugin for FruitPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_event::<EatenEvent>()
|
||||
.add_startup_system(spawn_fruit_system.after(snake::SystemLabel::StartUp))
|
||||
.add_startup_system(spawn_fruit_system)
|
||||
.add_system(eat_fruit_system.run_if(tick_triggered))
|
||||
.add_system(debug_eaten_event_system)
|
||||
.add_system(despawn_fruit_system)
|
||||
@@ -53,7 +53,7 @@ fn spawn_fruit_system(mut commands: Commands, coordinate_query: Query<&grid::Coo
|
||||
.expect("Should always be found.");
|
||||
|
||||
commands
|
||||
.spawn_bundle(SpriteBundle {
|
||||
.spawn(SpriteBundle {
|
||||
sprite: Sprite {
|
||||
color: Color::GREEN,
|
||||
custom_size: Some(Vec2::splat(grid::SEGMENT_SIZE) * 0.6),
|
||||
|
||||
Reference in New Issue
Block a user