usesuper::axis_state::AxisState;/// Struct that represents a joystick with its X and Y states.
#[derive(Clone, Copy, Debug)]pubstructJoystick{pubx: AxisState,
puby: AxisState
}implDefault forJoystick{/// Returns a default joystick with zeroed X and Y states.
fndefault()->Self{Self{
x:AxisState::default(),
y:AxisState::default(),}}}