summaryrefslogtreecommitdiff
path: root/src/components/mod.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-28 12:40:52 +0100
committertroido <troido@protonmail.com>2020-02-28 12:40:52 +0100
commit40e4e9e7a7e2c59a5659d8d4bd2ecfafed967299 (patch)
treefa2c2bb9b293781a871ca64915b5c0149e36fd6c /src/components/mod.rs
parent481e03e04b055cebaf230b3a3cdce3446418c68c (diff)
added cooldowns for moving and fighting
Diffstat (limited to 'src/components/mod.rs')
-rw-r--r--src/components/mod.rs18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/components/mod.rs b/src/components/mod.rs
index e65bcc6..3b0167d 100644
--- a/src/components/mod.rs
+++ b/src/components/mod.rs
@@ -50,7 +50,14 @@ impl Component for Visible {
}
#[derive(Component, Debug)]
-pub struct Controller(pub Control);
+pub struct Controller {
+ pub control: Control
+}
+
+#[derive(Default, Component, Debug, Clone)]
+pub struct Movable {
+ pub cooldown: i64
+}
#[derive(Default, Component, Debug, Clone)]
#[storage(NullStorage)]
@@ -151,7 +158,8 @@ pub struct Trap {
#[derive(Component, Debug, Clone)]
#[storage(HashMapStorage)]
pub struct Fighter {
- pub attack: Attack
+ pub attack: Attack,
+ pub cooldown: i64
}
#[derive(Component, Debug, Clone)]
@@ -170,4 +178,10 @@ pub struct Volatile {
pub end_time: Option<i64>
}
+#[derive(Component, Debug, Clone)]
+#[storage(HashMapStorage)]
+pub struct ControlCooldown {
+ pub amount: i64
+}
+