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:
2025-08-10 18:46:49 -05:00
parent cdd665cc93
commit 3d28d489b0

View File

@@ -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)),