Fix: Pass size through to spawned asteroid
I actually have most of the asteroid's destruction handling system done and found this bug. Asteroid *assets* are selected based on the size set in the spawn event, but the `Asteroid` Component itself was left hard-coded to the smallest size.
This commit is contained in:
@@ -117,7 +117,7 @@ pub fn spawn_asteroid(
|
|||||||
};
|
};
|
||||||
|
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
Asteroid(AsteroidSize::Small),
|
Asteroid(spawn.size),
|
||||||
Collider::ball(collider_radius),
|
Collider::ball(collider_radius),
|
||||||
Sensor,
|
Sensor,
|
||||||
Transform::from_translation(spawn.pos.extend(0.0)),
|
Transform::from_translation(spawn.pos.extend(0.0)),
|
||||||
|
|||||||
Reference in New Issue
Block a user