Bevy 0.16 upgrade (#24)
This commit is contained in:
@@ -38,6 +38,7 @@ fn on_spawn_key(trigger: Trigger<KeySpawn>, mut commands: Commands, assets: Res<
|
||||
ExternalImpulse::new(spawn_dir * 180.).with_persistence(false),
|
||||
LockedAxes::ROTATION_LOCKED,
|
||||
RigidBody::Dynamic,
|
||||
CollisionEventsEnabled,
|
||||
Restitution::new(0.6),
|
||||
))
|
||||
.with_child((
|
||||
@@ -66,6 +67,6 @@ fn collect_key(
|
||||
|
||||
commands.trigger(PlaySound::KeyCollect);
|
||||
commands.trigger(KeyCollected(key.0.clone()));
|
||||
commands.entity(collectable).despawn_recursive();
|
||||
commands.entity(collectable).despawn();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user