forked from StrafesNET/strafe-client
InputState
This commit is contained in:
parent
c7da64cc64
commit
5174b13ba0
12
src/body.rs
12
src/body.rs
@ -39,6 +39,18 @@ enum InputInstruction {
|
||||
Jump(bool),
|
||||
}
|
||||
|
||||
struct InputState {
|
||||
controls: u32,
|
||||
mouse_interpolation: MouseInterpolation,
|
||||
time: TIME,
|
||||
}
|
||||
|
||||
impl InputState {
|
||||
pub fn get_control(&self,control:u32) -> bool {
|
||||
self.controls&control!=0
|
||||
}
|
||||
}
|
||||
|
||||
pub struct MouseInterpolationState {
|
||||
interpolation: MouseInterpolation,
|
||||
time0: TIME,
|
||||
|
Loading…
Reference in New Issue
Block a user