Skip to content

Commit

Permalink
Merge pull request #31 from Leafwing-Studios/on_enter
Browse files Browse the repository at this point in the history
Use OnEnter schedules correctly
  • Loading branch information
sixfold-origami authored Apr 17, 2024
2 parents 01be07f + b786f97 commit 1babc70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions examples/raw_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ fn main() {
.add_plugins(ManifestPlugin::<SimpleAssetState>::default())
// Registers our item manifest, triggering it to be loaded.
.register_manifest::<ItemManifest>("raw_items.ron")
.add_systems(
Update,
list_available_items.run_if(in_state(SimpleAssetState::Ready)),
)
.add_systems(OnEnter(SimpleAssetState::Ready), list_available_items)
.run();
}

Expand Down
5 changes: 1 addition & 4 deletions examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ fn main() {
.add_plugins(ManifestPlugin::<SimpleAssetState>::default())
// Registers our item manifest, triggering it to be loaded.
.register_manifest::<ItemManifest>("items.ron")
.add_systems(
Update,
list_available_items.run_if(in_state(SimpleAssetState::Ready)),
)
.add_systems(OnEnter(SimpleAssetState::Ready), list_available_items)
.run();
}

Expand Down

0 comments on commit 1babc70

Please sign in to comment.