Move SpawnAsteroid event into events.rs
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use bevy::prelude::*;
|
||||
|
||||
use crate::asteroids::AsteroidSize;
|
||||
|
||||
/// Signals that the player's ship has been destroyed.
|
||||
/// Used when the player collides with an asteroid.
|
||||
#[derive(Event)]
|
||||
@@ -10,6 +12,13 @@ pub(crate) struct ShipDestroy;
|
||||
#[derive(Event)]
|
||||
pub(crate) struct AsteroidDestroy(pub Entity);
|
||||
|
||||
#[derive(Event)]
|
||||
pub struct SpawnAsteroid {
|
||||
pub pos: Vec2,
|
||||
pub vel: Vec2,
|
||||
pub size: AsteroidSize,
|
||||
}
|
||||
|
||||
// TODO: BulletDestroy
|
||||
// Which depends on the still-pending Bullet component creation.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user