From 511c4fade62312eb55b6d83ae4d8684c3a9cb9af Mon Sep 17 00:00:00 2001 From: Giuseppe De Palma Date: Tue, 16 Jan 2024 20:48:07 +0100 Subject: [PATCH] Add example in commands ext --- src/builder/commands.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/builder/commands.rs b/src/builder/commands.rs index f0f4a1c..3015690 100644 --- a/src/builder/commands.rs +++ b/src/builder/commands.rs @@ -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, '_>; }