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. }, } } }