add tower selection UI, cancellable actions, and pause UI
This commit is contained in:
parent
138a524abd
commit
918b4884b2
18 changed files with 468 additions and 23 deletions
|
|
@ -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),
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue