Rename crate::events to crate::messages
Bevy 0.17 introduces this idea of "Messages" which mostly replace the previous usage of "Events." The old events still exist, but are meant more for targetted actions -- something happening and immediately triggering a function call on an observer.
This commit is contained in:
10
src/lib.rs
10
src/lib.rs
@@ -3,7 +3,7 @@
|
||||
//! Compile-time configurables can be found in the [`config`] module.
|
||||
|
||||
pub mod config;
|
||||
mod events;
|
||||
mod messages;
|
||||
mod machinery;
|
||||
mod objects;
|
||||
mod physics;
|
||||
@@ -77,10 +77,10 @@ impl Plugin for AsteroidPlugin {
|
||||
)
|
||||
.run_if(in_state(GameState::Playing)),
|
||||
)
|
||||
.add_event::<events::SpawnAsteroid>()
|
||||
.add_event::<events::AsteroidDestroy>()
|
||||
.add_event::<events::ShipDestroy>()
|
||||
.add_event::<events::BulletDestroy>();
|
||||
.add_event::<messages::SpawnAsteroid>()
|
||||
.add_event::<messages::AsteroidDestroy>()
|
||||
.add_event::<messages::ShipDestroy>()
|
||||
.add_event::<messages::BulletDestroy>();
|
||||
app.insert_state(GameState::TitleScreen);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user