pub struct DefaultMove {
pub dx: f64,
pub dy: f64,
pub x_lock: Option<MoveLock>,
pub y_lock: Option<MoveLock>,
}Expand description
Config struct for default movement
Fields§
§dx: f64Units to move in x-axis. Used as multiplier of player/camera movement if x_lock is used
dy: f64Units to move in y-axis. Used as multiplier of player/camera movement if y_lock is used
x_lock: Option<MoveLock>Optional lock on x movement which allows the object to move relative to either the player or the camera
y_lock: Option<MoveLock>Optional lock on y movement which allows the object to move relative to either the player or the camera
Trait Implementations§
Source§impl Clone for DefaultMove
impl Clone for DefaultMove
Source§fn clone(&self) -> DefaultMove
fn clone(&self) -> DefaultMove
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 moreSource§impl Debug for DefaultMove
impl Debug for DefaultMove
Source§impl PartialEq for DefaultMove
impl PartialEq for DefaultMove
Source§fn eq(&self, other: &DefaultMove) -> bool
fn eq(&self, other: &DefaultMove) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DefaultMove
Auto Trait Implementations§
impl Freeze for DefaultMove
impl RefUnwindSafe for DefaultMove
impl Send for DefaultMove
impl Sync for DefaultMove
impl Unpin for DefaultMove
impl UnsafeUnpin for DefaultMove
impl UnwindSafe for DefaultMove
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