Compare commits
1 commit
589a2d1b65
...
0f067483d1
Author | SHA1 | Date | |
---|---|---|---|
0f067483d1 |
2 changed files with 16 additions and 4 deletions
|
@ -140,6 +140,7 @@ 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;
|
||||
|
@ -151,6 +152,7 @@ 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();
|
||||
|
|
|
@ -251,13 +251,23 @@ 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(1_000, Self::camera_update)?;
|
||||
world_builder.add_update("camera_position", 1_000, Self::camera_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)?;
|
||||
world_builder.add_update(
|
||||
"celestial velocity update",
|
||||
100,
|
||||
Self::celestial_velocity_update,
|
||||
)?;
|
||||
|
||||
world_builder.add_update(
|
||||
"celestial buffer update",
|
||||
110,
|
||||
Self::celestial_buffer_update,
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue