aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-17 12:48:41 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-17 12:57:55 +0100
commit4f9957fc6b4bdb4c7430f878101b07051b40a2ff (patch)
treefc9f2a4a4b8ef15a12ec10e6331bdc5ab3f2ef01 /src/shared
parent0436c10a90db450bdaf75ac43608e094bd9f0e8f (diff)
feat: abilities
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/imperative.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/shared/imperative.rs b/src/shared/imperative.rs
index d9d727f..256ea1a 100644
--- a/src/shared/imperative.rs
+++ b/src/shared/imperative.rs
@@ -6,5 +6,16 @@ use serde::Serialize;
pub enum Imperative {
Idle,
WalkTo(Vec2),
- Attack(PlayerId),
+ Attack(AttackKey, PlayerId),
+}
+
+#[derive(Resource, Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
+pub enum AttackKey {
+ A,
+ Q,
+ W,
+ E,
+ R,
+ D,
+ F,
}