Apply ecs changes

This commit is contained in:
hodasemi 2025-04-09 15:05:50 +02:00
parent 10f6103016
commit f4663d3d68
2 changed files with 4 additions and 16 deletions

View file

@ -140,7 +140,6 @@ impl Scene {
pub(crate) fn insert_default_updates(world: &mut WorldBuilder) -> Result<()> {
world.add_update(
"animate",
5_500_000,
|commands: &mut Commands, mut query: Query<(&mut Draw, &mut Animation)>| {
let (draw, animation) = &mut *query;
@ -152,7 +151,6 @@ impl Scene {
)?;
world.add_update(
"particle_system",
5_000_000,
|commands: &mut Commands, mut query: Query<&mut ParticleSystem>, scene: &mut Scene| {
let now = commands.now();

View file

@ -251,23 +251,13 @@ impl Game {
impl Game {
pub fn setup_updates(world_builder: &mut WorldBuilder) -> Result<()> {
world_builder.add_update("player_rotation", 200, Self::player_orientation)?;
if !FREE_CAMERA_CONTROL {
world_builder.add_update("camera_position", 1_000, Self::camera_update)?;
world_builder.add_update(1_000, Self::camera_update)?;
}
world_builder.add_update(
"celestial velocity update",
100,
Self::celestial_velocity_update,
)?;
world_builder.add_update(
"celestial buffer update",
110,
Self::celestial_buffer_update,
)?;
world_builder.add_update(100, Self::celestial_velocity_update)?;
world_builder.add_update(200, Self::player_orientation)?;
world_builder.add_update(110, Self::celestial_buffer_update)?;
Ok(())
}