diff options
Diffstat (limited to 'src/shared/minion.rs')
-rw-r--r-- | src/shared/minion.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shared/minion.rs b/src/shared/minion.rs index 5d41f7a..4aa824e 100644 --- a/src/shared/minion.rs +++ b/src/shared/minion.rs @@ -1,5 +1,6 @@ use crate::shared::activation::*; use crate::shared::buffs::*; +use crate::shared::faction::*; use crate::shared::player::*; use crate::shared::shape::*; use crate::shared::stats::*; @@ -19,11 +20,12 @@ pub struct MinionBundle { activation: Activation, shape: Shape, minion: Minion, + faction: Faction, replicate: Replicate, } impl MinionBundle { - pub fn new(id: ClientId, position: Vec2, color: Color) -> Self { + pub fn new(id: ClientId, position: Vec2, faction: Faction) -> Self { let mut replicate = Replicate { replication_group: ReplicationGroup::default().set_priority(10.), ..Default::default() @@ -38,7 +40,7 @@ impl MinionBundle { MinionBundle { id: PlayerId(id), position: PlayerPosition(position), - color: PlayerColor(color), + color: PlayerColor(faction.to_color()), imperative: Imperative::Idle, cooldown: Cooldown::default(), health: Health { @@ -51,6 +53,7 @@ impl MinionBundle { activation: Activation::default(), shape: Shape::minion(), minion: Minion, + faction, replicate, } } |