mirror of
https://github.com/seemueller-io/yachtpit.git
synced 2025-09-08 22:46:45 +00:00
Modularized existing vessel systems into separate modules (AIS, GPS, Radar) and restructured the project for improved maintainability. Updated references and documentation accordingly.
This commit is contained in:
1
crates/systems/src/world/mod.rs
Normal file
1
crates/systems/src/world/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod player;
|
26
crates/systems/src/world/player.rs
Normal file
26
crates/systems/src/world/player.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use bevy::prelude::*;
|
||||
use components::{setup_instrument_cluster, VesselData, update_vessel_data, update_instrument_displays};
|
||||
use crate::vessel::vessel_systems::{create_vessel_systems, VesselSystem};
|
||||
|
||||
pub struct PlayerPlugin;
|
||||
|
||||
/// bind domain to bevy
|
||||
impl Plugin for PlayerPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.init_resource::<VesselData>()
|
||||
.add_systems(
|
||||
Update,
|
||||
(update_vessel_data, update_instrument_displays)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Setup function called by the main app
|
||||
pub fn setup_instrument_cluster_system() -> impl Fn(Commands) {
|
||||
setup_instrument_cluster
|
||||
}
|
||||
|
||||
/// Initialize vessel systems - returns the systems for registration
|
||||
pub fn get_vessel_systems() -> Vec<Box<dyn VesselSystem>> {
|
||||
create_vessel_systems()
|
||||
}
|
Reference in New Issue
Block a user