forked from StrafesNET/strafe-client
InputState
This commit is contained in:
parent
dcfbee8de1
commit
b070b9706f
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