Skip to content

Commit

Permalink
Add example in commands ext
Browse files Browse the repository at this point in the history
  • Loading branch information
giusdp committed Jan 16, 2024
1 parent 9e035e0 commit 511c4fa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/builder/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ use super::{build_command::BuildTalkCommand, TalkBuilder};
pub trait TalkCommandsExt<'w, 's> {
/// Spawns a dialogue graph and a parent entity with a [`Talk`] component + the input bundle.
/// Returns a handle of the parent entity.
/// TODO: write example
///
/// # Example
/// ```rust
/// use bevy_talks::prelude::*;
/// use bevy::prelude::*;
///
/// fn setup(mut commands: Commands) {
/// let talk_builder = TalkBuilder::default().say("Hello world!");
/// commands.spawn_talk(talk_builder);
/// }
fn spawn_talk(&mut self, builder: TalkBuilder) -> EntityCommands<'w, 's, '_>;
}

Expand Down

0 comments on commit 511c4fa

Please sign in to comment.