diff options
Diffstat (limited to 'src/shared/stats.rs')
-rw-r--r-- | src/shared/stats.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/shared/stats.rs b/src/shared/stats.rs new file mode 100644 index 0000000..278a19f --- /dev/null +++ b/src/shared/stats.rs @@ -0,0 +1,16 @@ +use crate::shared::champion::*; +use crate::shared::*; + +#[derive(Component, Message, Clone, Serialize, Deserialize, PartialEq)] +pub struct Stats { + pub attack_range: f32, +} + +impl Stats { + pub fn from_champion(champion: Champion) -> Self { + match champion { + Champion::Meele => Stats { attack_range: 35. }, + Champion::Ranged => Stats { attack_range: 60. }, + } + } +} |