pub struct InputCommand {
pub tick: u64,
pub move_x: f32,
pub move_y: f32,
pub actions: u32,
}Expand description
Aggregated user input for a single simulation tick.
Fields§
§tick: u64The client-side tick this input was generated at.
move_x: f32Movement X [-1.0, 1.0]
move_y: f32Movement Y [-1.0, 1.0]
actions: u32Bitmask for actions (M1028 bits: 1=Primary, 2=Secondary, 4=Interact).
Implementations§
Source§impl InputCommand
impl InputCommand
Trait Implementations§
Source§impl Clone for InputCommand
impl Clone for InputCommand
Source§fn clone(&self) -> InputCommand
fn clone(&self) -> InputCommand
Returns a duplicate of the value. Read more
1.0.0 · 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 InputCommand
impl Debug for InputCommand
Source§impl<'de> Deserialize<'de> for InputCommand
impl<'de> Deserialize<'de> for InputCommand
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
Source§impl Serialize for InputCommand
impl Serialize for InputCommand
impl Copy for InputCommand
Auto Trait Implementations§
impl Freeze for InputCommand
impl RefUnwindSafe for InputCommand
impl Send for InputCommand
impl Sync for InputCommand
impl Unpin for InputCommand
impl UnsafeUnpin for InputCommand
impl UnwindSafe for InputCommand
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