add tower selection UI, cancellable actions, and pause UI

This commit is contained in:
Jim 2025-08-31 12:08:44 -04:00
parent 138a524abd
commit 918b4884b2
Signed by: jim
GPG key ID: 3D7D94BA53088BF4
18 changed files with 468 additions and 23 deletions

View file

@ -14,6 +14,8 @@ pub enum InputAction {
CameraPanEnable,
CameraOrbitEnable,
PlaceTower,
MultiPlaceTower,
Cancel,
}
impl Default for InputMap {
@ -43,6 +45,11 @@ impl Default for InputMap {
InputMethod::MouseButton(MouseButton::Right),
InputAction::PlaceTower,
),
(
InputMethod::KeyCode(KeyCode::ShiftLeft),
InputAction::MultiPlaceTower,
),
(InputMethod::KeyCode(KeyCode::Escape), InputAction::Cancel),
])
}
}

View file

@ -34,6 +34,9 @@ impl Plugin for InputPlugin {
}
}
#[derive(Component)]
pub struct Cancellable;
#[derive(Hash, Clone, Copy, Debug, Reflect, PartialEq, Eq, Serialize, Deserialize)]
pub enum InputMethod {
Unbound,