aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/ability.rs10
-rw-r--r--src/shared/buffs.rs10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/shared/ability.rs b/src/shared/ability.rs
index 2cd44c4..d88b63b 100644
--- a/src/shared/ability.rs
+++ b/src/shared/ability.rs
@@ -109,8 +109,8 @@ fn focus_activation(focus: Focus) -> ActivatedAbilityActivation {
let Ok(mut buffs) = buffses.get_mut(*entity_id) else {
return;
};
- buffs.haste = Some(Timer::from_seconds(focus.duration, TimerMode::Once));
- buffs.speed = Some(Timer::from_seconds(focus.duration, TimerMode::Once));
+ buffs.haste = Some(focus.duration);
+ buffs.speed = Some(focus.duration);
},
)
});
@@ -128,7 +128,7 @@ fn haste_activation(haste: Haste) -> ActivatedAbilityActivation {
let Ok(mut buffs) = buffses.get_mut(*entity_id) else {
return;
};
- buffs.haste = Some(Timer::from_seconds(haste.duration, TimerMode::Once));
+ buffs.haste = Some(haste.duration);
},
)
});
@@ -152,7 +152,7 @@ fn shield_activation(shield: Shield) -> ActivatedAbilityActivation {
return;
};
health.shield = health.shield + shield.blocked_damage;
- buffs.shield = Some(Timer::from_seconds(shield.duration, TimerMode::Once));
+ buffs.shield = Some(shield.duration);
},
)
});
@@ -170,7 +170,7 @@ fn speed_activation(speed: Speed) -> ActivatedAbilityActivation {
let Ok(mut buffs) = buffses.get_mut(*entity_id) else {
return;
};
- buffs.speed = Some(Timer::from_seconds(speed.duration, TimerMode::Once));
+ buffs.speed = Some(speed.duration);
},
)
});
diff --git a/src/shared/buffs.rs b/src/shared/buffs.rs
index 6b518a5..868f3a3 100644
--- a/src/shared/buffs.rs
+++ b/src/shared/buffs.rs
@@ -1,9 +1,9 @@
use crate::shared::*;
-#[derive(Clone, Component, Default, Debug)]
+#[derive(Clone, Message, Component, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Buffs {
- pub haste: Option<Timer>,
- pub shield: Option<Timer>,
- pub slow: Option<Timer>,
- pub speed: Option<Timer>,
+ pub haste: Option<f32>,
+ pub shield: Option<f32>,
+ pub slow: Option<f32>,
+ pub speed: Option<f32>,
}