Bevy 0.16 upgrade (#24)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user