Bevy 0.16 upgrade (#24)

This commit is contained in:
extrawurst
2025-04-29 00:14:25 +02:00
committed by GitHub
parent b4bfa53df4
commit 11568d57ed
40 changed files with 932 additions and 699 deletions

View File

@@ -67,7 +67,7 @@ fn on_explosion(
};
for entity in intersections.iter() {
if let Some(mut e) = commands.get_entity(*entity) {
if let Ok(mut e) = commands.get_entity(*entity) {
e.trigger(Hit {
damage: explosion.damage,
});
@@ -135,6 +135,7 @@ fn on_trigger_thrown(
LayerMask(state.target_layer.to_bits() | GameLayer::Level.to_bits()),
),
RigidBody::Dynamic,
CollisionEventsEnabled,
Mass(0.01),
LinearVelocity(vel),
Visibility::default(),
@@ -171,7 +172,7 @@ fn shot_collision(
continue;
};
commands.entity(shot_entity).despawn_recursive();
commands.entity(shot_entity).despawn();
commands.trigger(PlaySound::ThrowHit);