Initial work on rollback and refactor

This commit is contained in:
2026-08-12 12:27:35 +02:00
parent ad6c1e17ac
commit a21f24b2d9
45 changed files with 1451 additions and 717 deletions
+31
View File
@@ -0,0 +1,31 @@
//! What a physical button means. Device-agnostic: a binding names an
//! [`InputMapAction`], and each device backend (see [`super::keyboard`])
//! decides how to read it.
use bevy::prelude::*;
#[derive(Debug)]
pub enum InputActionState {
JustPressed,
Pressed,
JustReleased,
Released,
}
#[derive(Debug)]
pub enum InputMapAction {
MovementXDir(i32),
MovementYDir(i32),
Jump,
}
#[derive(Debug)]
pub struct KeyboardInputMapElement {
pub key: KeyCode,
pub action: InputMapAction,
}
#[derive(Resource)]
pub struct BaseInputMap {
pub keyboard: Vec<KeyboardInputMapElement>,
}