pub struct Controls {
pub forward: bool,
pub back: bool,
pub left: bool,
pub right: bool,
pub jump: bool,
pub sneak: bool,
pub sprint: bool,
}Expand description
Movement keys held for the next movement step (the keyboard state in vanilla).
Fields§
§forward: boolWalk forward (W).
back: boolWalk backward (S).
left: boolStrafe left (A).
right: boolStrafe right (D).
jump: boolJump (space).
sneak: boolSneak (shift).
sprint: boolSprint key (ctrl).
Implementations§
Trait Implementations§
impl Copy for Controls
impl Eq for Controls
impl StructuralPartialEq for Controls
Auto Trait Implementations§
impl Freeze for Controls
impl RefUnwindSafe for Controls
impl Send for Controls
impl Sync for Controls
impl Unpin for Controls
impl UnsafeUnpin for Controls
impl UnwindSafe for Controls
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