Skip to content

Commit

Permalink
Updated examples for 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackPhlox committed Sep 17, 2023
1 parent 469fe14 commit 5115929
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions examples/multiple_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
App::new()
.insert_resource(Msaa::default())
.add_plugins(DefaultPlugins)
.add_plugin(ConfigCam)
.add_plugins(ConfigCam)
.add_rig_component(T1)
.add_dolly_component(MainCamera)
/*.insert_resource(MovementSettings {
Expand All @@ -20,7 +20,7 @@ fn main() {
player_asset: "models/craft_speederA.glb#Scene0",
..Default::default()
})*/
.add_startup_system(setup)
.add_systems(Startup, setup)
//.add_system(set_closest_target)
.run();
}
Expand Down
19 changes: 12 additions & 7 deletions examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ use config_cam_derive::DriverMarker;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(WireframePlugin)
.add_plugin(ConfigCam)
.add_startup_system(setup)
.add_system(rotator_system)
.add_system(add_target_system)
.add_system(remove_target_system)
.add_system(switch_camera)
.add_plugins(WireframePlugin)
.add_plugins(ConfigCam)
.add_systems(Startup, setup)
.add_systems(
Update,
(
rotator_system,
add_target_system,
remove_target_system,
switch_camera,
),
)
.run();
}

Expand Down
6 changes: 3 additions & 3 deletions examples/yp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ pub use std::any::TypeId;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(ConfigCam)
.add_plugins(ConfigCam)
.add_dolly_component(YP)
.insert_resource(Drivers::new(
driver_vec![CCOrbit, CCFpv, YP],
type_vec![MainCamera],
))
.add_startup_system(setup)
.add_system(update_yaw_driver)
.add_systems(Startup, setup)
.add_systems(Update, update_yaw_driver)
.run();
}

Expand Down

0 comments on commit 5115929

Please sign in to comment.