lotus_engine 0.3.3

Lotus is a game engine with the main focus of being easy-to-use and straight forward on developing 2D games.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::axis_state::AxisState;

/// Struct that represents a joystick with its X and Y states.
#[derive(Clone, Copy, Debug)]
pub struct Joystick {
    pub x: AxisState,
    pub y: AxisState
}

impl Default for Joystick {
    /// Returns a default joystick with zeroed X and Y states.
    fn default() -> Self {
        Self {
            x: AxisState::default(),
            y: AxisState::default(),
        }
    }
}