pub struct ElevatorShakeParams {
pub iterations: u8,
pub pixel_offset: u8,
}Expand description
Tuning for the elevator rumble: how many up/down iterations and how far the background scrolls each iteration.
Fields§
§iterations: u8Number of shake iterations (each lasts 2 frames).
pixel_offset: u8Background scroll magnitude per iteration, in pixels.
Implementations§
Source§impl ElevatorShakeParams
impl ElevatorShakeParams
Sourcepub const fn total_frames(&self) -> u16
pub const fn total_frames(&self) -> u16
Total frames of the shake (2 frames per iteration).
Trait Implementations§
Source§impl Clone for ElevatorShakeParams
impl Clone for ElevatorShakeParams
Source§fn clone(&self) -> ElevatorShakeParams
fn clone(&self) -> ElevatorShakeParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ElevatorShakeParams
Source§impl Debug for ElevatorShakeParams
impl Debug for ElevatorShakeParams
Source§impl<'de> Deserialize<'de> for ElevatorShakeParams
impl<'de> Deserialize<'de> for ElevatorShakeParams
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 ElevatorShakeParams
Source§impl PartialEq for ElevatorShakeParams
impl PartialEq for ElevatorShakeParams
Source§impl Serialize for ElevatorShakeParams
impl Serialize for ElevatorShakeParams
impl StructuralPartialEq for ElevatorShakeParams
Auto Trait Implementations§
impl Freeze for ElevatorShakeParams
impl RefUnwindSafe for ElevatorShakeParams
impl Send for ElevatorShakeParams
impl Sync for ElevatorShakeParams
impl Unpin for ElevatorShakeParams
impl UnsafeUnpin for ElevatorShakeParams
impl UnwindSafe for ElevatorShakeParams
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