pub struct Player { /* private fields */ }Expand description
Plays one saved scene, one frame at a time.
Implementations§
Source§impl Player
impl Player
Sourcepub fn new(pkg: Arc<ScenePackage>, theme: Theme, buddy: bool) -> Option<Player>
pub fn new(pkg: Arc<ScenePackage>, theme: Theme, buddy: bool) -> Option<Player>
None if the scene has no such theme.
pub fn size(&self) -> (u32, u32)
Sourcepub fn image(&self) -> &IndexedImage
pub fn image(&self) -> &IndexedImage
The current frame as palette indices.
Sourcepub fn now_ms(&self) -> u64
pub fn now_ms(&self) -> u64
Scene time now: the hero time plus the time since playback started. A pause only stops drawing; the next frame shows the time it is.
Sourcepub fn advance(&mut self, t_ms: u64) -> Vec<PixelRect>
pub fn advance(&mut self, t_ms: u64) -> Vec<PixelRect>
Moves to t_ms; returns the rectangles that changed.
Auto Trait Implementations§
impl Forget for Player
impl Freeze for Player
impl Move for Player
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnsafeUnpin for Player
impl UnwindSafe for Player
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