diff options
Diffstat (limited to 'src/shared/player.rs')
-rw-r--r-- | src/shared/player.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/shared/player.rs b/src/shared/player.rs index a886499..4f571d8 100644 --- a/src/shared/player.rs +++ b/src/shared/player.rs @@ -1,3 +1,6 @@ +use crate::shared::activation::*; +use crate::shared::buffs::*; +use crate::shared::stats::*; use crate::shared::*; #[derive(Bundle)] @@ -9,6 +12,9 @@ pub struct PlayerBundle { cooldown: Cooldown, health: Health, champion: Champion, + effective_stats: EffectiveStats, + buffs: Buffs, + activation: Activation, replicate: Replicate, } @@ -20,8 +26,10 @@ impl PlayerBundle { }; replicate.enable_replicate_once::<PlayerId>(); replicate.enable_replicate_once::<PlayerColor>(); - replicate.target::<Cooldown>(NetworkTarget::Single(id)); replicate.target::<Champion>(NetworkTarget::Single(id)); + replicate.target::<Cooldown>(NetworkTarget::Single(id)); + replicate.target::<EffectiveStats>(NetworkTarget::Single(id)); + let champion = Champion::default(); PlayerBundle { id: PlayerId(id), position: PlayerPosition(position), @@ -29,7 +37,10 @@ impl PlayerBundle { imperative: Imperative::Idle, cooldown: Cooldown::default(), health: Health::default(), - champion: Champion::default(), + champion, + effective_stats: EffectiveStats(BaseStats::from_champion(champion).0), + buffs: Buffs::default(), + activation: Activation::default(), replicate, } } |