#[cfg(feature = "json")]
use serde::{Serialize, Deserialize};
#[derive(Debug, Clone, Default)]
#[cfg_attr(feature = "json", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "json", serde(rename_all(serialize = "snake_case")))]
pub struct Control {
pub raw_input: RawInput,
pub game_input: GameInput
}
#[derive(Debug, Clone, Default)]
#[cfg_attr(feature = "json", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "json", serde(rename_all(serialize = "snake_case")))]
pub struct RawInput {
pub steering: f32,
pub throttle: f32,
pub brake: f32,
pub clutch: f32
}
#[derive(Debug, Clone, Default)]
#[cfg_attr(feature = "json", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "json", serde(rename_all(serialize = "snake_case")))]
pub struct GameInput {
pub steering: f32,
pub throttle: f32,
pub brake: f32,
pub clutch: f32
}