From 40e4e9e7a7e2c59a5659d8d4bd2ecfafed967299 Mon Sep 17 00:00:00 2001 From: troido Date: Fri, 28 Feb 2020 12:40:52 +0100 Subject: added cooldowns for moving and fighting --- src/components/mod.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/components/mod.rs') 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 } +#[derive(Component, Debug, Clone)] +#[storage(HashMapStorage)] +pub struct ControlCooldown { + pub amount: i64 +} + -- cgit