Skip to content

Commit

Permalink
Light docs pass
Browse files Browse the repository at this point in the history
  • Loading branch information
sixfold-origami committed Apr 15, 2024
1 parent 3f158fa commit 6a4c089
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/raw_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct Item {

/// The raw format for [`Item`] data.
///
/// This is used inside of [`RawManifest`] to be saved/loaded to disk as an [`Asset`].
/// This is used inside of [`RawItemManifest`] to be saved/loaded to disk as an [`Asset`].
/// The only difference in this case is that the `sprite` field has been changed from a loaded [`Handle<Image>`] to a [`PathBuf`].
/// This [`PathBuf`] references the actual sprite path in our assets folder,
/// but other identifiers could be used for more complex asset loading strategies.
Expand Down Expand Up @@ -130,6 +130,7 @@ impl Manifest for ItemManifest {

fn main() {
App::new()
// This example is TUI only, but the default plugins are used because they contain a bunch of asset loading stuff we need.
.add_plugins(DefaultPlugins)
// This is our simple state, used to navigate the asset loading process.
.init_state::<SimpleAssetState>()
Expand Down
4 changes: 3 additions & 1 deletion examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//! This example demonstrates the simplest use of the `leafwing_manifest` crate.
//!
//! In this example, the manifest and raw manifest are the same type, and the data is read directly from the serialized format on disk into the [`ItemManifest`] resource.
//!
//! This pattern is great for simple prototyping and small projects, but can be quickly outgrown as the project's needs scale.
//! See the other examples for more advanced use cases!
//! The `raw_manifest.rs` example is a good next step that builds upon this example.
use bevy::{app::AppExit, log::LogPlugin, prelude::*, utils::HashMap};
use leafwing_manifest::{
Expand Down Expand Up @@ -69,7 +71,7 @@ fn main() {
App::new()
// leafwing_manifest requires `AssetPlugin` to function
// This is included in `DefaultPlugins`, but this example is very small, so it only uses the `MinimalPlugins`
.add_plugins((MinimalPlugins, LogPlugin::default(), AssetPlugin::default()))
.add_plugins((MinimalPlugins, AssetPlugin::default(), LogPlugin::default()))
// This is our simple state, used to navigate the asset loading process.
.init_state::<SimpleAssetState>()
// Coordinates asset loading and state transitions.
Expand Down

0 comments on commit 6a4c089

Please sign in to comment.