pub struct CutsceneLibrary {
pub active: Option<TimelinePlayer>,
/* private fields */
}Expand description
Manages a collection of named timelines.
Fields§
§active: Option<TimelinePlayer>Implementations§
Source§impl CutsceneLibrary
impl CutsceneLibrary
pub fn new() -> Self
pub fn register(&mut self, timeline: Timeline)
Sourcepub fn play(&mut self, name: &str) -> bool
pub fn play(&mut self, name: &str) -> bool
Start playing a named cutscene. Returns false if not found.
Sourcepub fn tick(&mut self, dt: f32) -> Vec<TimelineAction>
pub fn tick(&mut self, dt: f32) -> Vec<TimelineAction>
Tick the active player, returning fired actions.
pub fn is_playing(&self) -> bool
pub fn names(&self) -> Vec<&str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CutsceneLibrary
impl !RefUnwindSafe for CutsceneLibrary
impl Send for CutsceneLibrary
impl !Sync for CutsceneLibrary
impl Unpin for CutsceneLibrary
impl UnsafeUnpin for CutsceneLibrary
impl !UnwindSafe for CutsceneLibrary
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