diff options
Diffstat (limited to 'src/actor/events.rs')
-rw-r--r-- | src/actor/events.rs | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/actor/events.rs b/src/actor/events.rs deleted file mode 100644 index e24e7f3..0000000 --- a/src/actor/events.rs +++ /dev/null @@ -1,72 +0,0 @@ -//! Actor-related events - -use bevy::prelude::*; -use yarnspinner::{core::LineId, runtime::{Command, DialogueOption, Line, OptionId}}; - -/// Event called by user to progress dialogue -#[derive(Debug, Event)] -pub enum ContinueDialogueEvent { - /// Continue to next line of dialogue for given actor entity - Continue(Entity), - /// Submit option selection to given actor entity - SelectedOption { - /// Target actor entity - actor: Entity, - /// Selected option ID - option: OptionId - }, -} - -/// Event called by plugin in response to a corresponding yarnspinner dialogue events -/// -/// The user should catch these events to update UI, and never call it directly. -#[derive(Event)] -pub enum DialogueEvent { - /// Recieved new line of dialogue - Line { - /// Actor entity - actor: Entity, - /// Line of dialogue received - line: Line, - }, - /// Dialogue complete - DialogueComplete { - /// Actor entity - actor: Entity, - }, - /// Encountered an option selection - Options { - /// Actor entity - actor: Entity, - /// Options to select from - options: Vec<DialogueOption>, - }, - /// Triggered a yarnspinner command - Command { - /// Actor entity - actor: Entity, - /// Triggered command - command: Command, - }, - /// Node started - NodeStart { - /// Actor entity - actor: Entity, - /// Name of started node - name: String, - }, - /// Node complete - NodeComplete { - /// Actor entity - actor: Entity, - /// Name of completed node - name: String, - }, - /// Received line hints - LineHints { - /// Actor entity - actor: Entity, - /// Lines affected - lines: Vec<LineId>, - }, -} |