pub struct DialoguePlayer {Show 17 fields
pub tree: DialogueTree,
pub current_node_id: Option<u64>,
pub history: Vec<HistoryEntry>,
pub scope: VariableScope,
pub state: PlayerState,
pub pending_events: VecDeque<GameEvent>,
pub current_time: f32,
pub choice_timeout_remaining: Option<f32>,
pub watch_variables: Vec<WatchVariable>,
pub playback_speed: f32,
pub auto_advance: bool,
pub locale: String,
pub loc_table: LocalizationTable,
pub portrait_library: PortraitLibrary,
pub jump_return_stack: Vec<(String, u64)>,
pub step_count: usize,
pub max_steps: usize,
}Fields§
§tree: DialogueTree§current_node_id: Option<u64>§history: Vec<HistoryEntry>§scope: VariableScope§state: PlayerState§pending_events: VecDeque<GameEvent>§current_time: f32§choice_timeout_remaining: Option<f32>§watch_variables: Vec<WatchVariable>§playback_speed: f32§auto_advance: bool§locale: String§loc_table: LocalizationTable§portrait_library: PortraitLibrary§jump_return_stack: Vec<(String, u64)>§step_count: usize§max_steps: usizeImplementations§
Source§impl DialoguePlayer
impl DialoguePlayer
pub fn new(tree: DialogueTree) -> Self
pub fn start(&mut self) -> PlayResult
pub fn step(&mut self, choice: Option<usize>) -> PlayResult
pub fn update_timer(&mut self, delta: f32) -> PlayResult
pub fn restart(&mut self) -> PlayResult
pub fn get_history_display(&self) -> Vec<String>
pub fn add_watch(&mut self, name: &str, scope: ScopeType)
pub fn remove_watch(&mut self, name: &str)
pub fn get_pending_events(&mut self) -> Vec<GameEvent>
pub fn simulate_condition(&self, expr: &ConditionExpression) -> bool
Trait Implementations§
Source§impl Clone for DialoguePlayer
impl Clone for DialoguePlayer
Auto Trait Implementations§
impl Freeze for DialoguePlayer
impl RefUnwindSafe for DialoguePlayer
impl Send for DialoguePlayer
impl Sync for DialoguePlayer
impl Unpin for DialoguePlayer
impl UnsafeUnpin for DialoguePlayer
impl UnwindSafe for DialoguePlayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.