pub enum Motion {
Stationary {
x: i32,
},
Pace {
x_min: i32,
x_max: i32,
period_ms: u64,
},
Fly {
x_min: i32,
x_max: i32,
period_ms: u64,
lift: i32,
bob: i32,
bob_ms: u64,
},
}Expand description
How the character moves over time.
Variants§
Stationary
Fixed spot (left edge x).
Pace
Walks back and forth between two left-edge positions; one round trip per period.
Fly
Flies back and forth like Pace, lift pixels above the ground,
bobbing bob pixels up and down once every bob_ms.
Trait Implementations§
impl Copy for Motion
Source§impl<'de> Deserialize<'de> for Motion
impl<'de> Deserialize<'de> for Motion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Motion
impl StructuralPartialEq for Motion
Auto Trait Implementations§
impl Forget for Motion
impl Freeze for Motion
impl Move for Motion
impl RefUnwindSafe for Motion
impl Send for Motion
impl Sync for Motion
impl Unpin for Motion
impl UnsafeUnpin for Motion
impl UnwindSafe for Motion
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