pub struct MovieSprite {
pub inner: Sprite,
pub symbol: MovieSymbol,
pub speed: AnimatedFloat,
pub paused: bool,
/* private fields */
}
Expand description
An instanced Flump animation.
Fields
inner: Sprite
symbol: MovieSymbol
The symbol this sprite displays.
speed: AnimatedFloat
The playback speed multiplier of this movie, defaults to 1.0. Higher values will play faster.
This does not affect the speed of nested child movies, use SpeedAdjuster
if you need
that.
paused: bool
Whether this movie is currently paused.
Implementations
sourceimpl MovieSprite
impl MovieSprite
pub const PAUSED: u32 = 256u32
pub const SKIP_NEXT: u32 = 512u32
pub const NEXT_FLAG: u32 = 1_024u32
pub fn new(symbol: MovieSymbol) -> Self
sourcepub fn layer(&self, name: String, required: bool) -> Option<Entity>
pub fn layer(&self, name: String, required: bool) -> Option<Entity>
Retrieves a named layer from this movie. Children can be added to the returned entity to add sprites that move with the layer, which for example, can be used to add equipment sprites to an avatar. @param required If true and the layer is not found, an error is thrown.
pub fn on_added(&self)
pub fn on_removed(&mut self)
pub fn on_update(&mut self, dt: f32)
pub fn goto(&mut self, frame: usize)
pub fn position(&self) -> f32
pub fn set_position(&mut self, position: f32)
pub fn paused(&self) -> bool
pub fn set_paused(&mut self, paused: bool)
pub fn looped(&mut self) -> Option<Signal0>
pub fn set_pixel_snapping(&mut self, pixel_snapping: bool)
Trait Implementations
sourceimpl AsRef<Sprite> for MovieSprite
impl AsRef<Sprite> for MovieSprite
sourceimpl Clone for MovieSprite
impl Clone for MovieSprite
sourcefn clone(&self) -> MovieSprite
fn clone(&self) -> MovieSprite
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MovieSprite
impl Debug for MovieSprite
sourceimpl Default for MovieSprite
impl Default for MovieSprite
sourcefn default() -> MovieSprite
fn default() -> MovieSprite
Returns the “default value” for a type. Read more
sourceimpl Display for MovieSprite
impl Display for MovieSprite
sourceimpl EntityManager<MovieSprite> for Entity
impl EntityManager<MovieSprite> for Entity
fn get(&self) -> Option<MovieSprite>
sourceimpl PartialEq<MovieSprite> for MovieSprite
impl PartialEq<MovieSprite> for MovieSprite
sourceimpl PartialOrd<MovieSprite> for MovieSprite
impl PartialOrd<MovieSprite> for MovieSprite
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Symbol<MovieSprite> for MovieSymbol
impl Symbol<MovieSprite> for MovieSymbol
sourcefn create_sprite(&self) -> MovieSprite
fn create_sprite(&self) -> MovieSprite
Instantiate a sprite that displays this symbol.
Auto Trait Implementations
impl !RefUnwindSafe for MovieSprite
impl !Send for MovieSprite
impl !Sync for MovieSprite
impl Unpin for MovieSprite
impl !UnwindSafe for MovieSprite
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
fn clamped(self, min: T, max: T) -> T
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.