Rename "event" module to be plural "events.rs"

This commit is contained in:
2025-08-11 19:14:15 -05:00
parent 804186ea2f
commit 571b910945
4 changed files with 15 additions and 15 deletions

21
src/events.rs Normal file
View File

@@ -0,0 +1,21 @@
use bevy::prelude::*;
/// Signals that the player's ship has been destroyed.
/// Used when the player collides with an asteroid.
#[derive(Event)]
pub(crate) struct ShipDestroy;
/// Signals that a particular asteroid has been destroyed.
/// Used to split (or vanish) an asteroid when a bullet strikes it.
#[derive(Event)]
pub(crate) struct AsteroidDestroy(pub Entity);
// TODO: BulletDestroy
// Which depends on the still-pending Bullet component creation.
/// Signals that a particular bullet has been destroyed.
/// Used to despawn the bullet after it strikes an Asteroid.
///
/// TODO: Maybe use it for lifetime expiration (which is also a TODO item).
#[derive(Event)]
pub(crate) struct BulletDestroy(pub Entity);