diff options
Diffstat (limited to 'src/shared/player.rs')
-rw-r--r-- | src/shared/player.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/shared/player.rs b/src/shared/player.rs index 606a3b2..f65851d 100644 --- a/src/shared/player.rs +++ b/src/shared/player.rs @@ -1,9 +1,17 @@ +use crate::protocol::*; use crate::shared::activation::*; use crate::shared::buffs::*; +use crate::shared::champion::*; +use crate::shared::cooldown::*; use crate::shared::faction::*; +use crate::shared::health::*; +use crate::shared::imperative::*; +use crate::shared::name::*; use crate::shared::shape::*; use crate::shared::stats::*; -use crate::shared::*; +use bevy::prelude::*; +use lightyear::prelude::*; +use serde::*; #[derive(Bundle)] pub struct PlayerBundle { @@ -20,11 +28,12 @@ pub struct PlayerBundle { shape: Shape, faction: Faction, player: Player, + name: Name_, replicate: Replicate, } impl PlayerBundle { - pub fn new(id: ClientId, position: Vec2, color: Color) -> Self { + pub fn new(id: ClientId, name: String, position: Vec2, color: Color) -> Self { let mut replicate = Replicate { replication_group: ReplicationGroup::default().set_priority(10.), ..Default::default() @@ -53,6 +62,7 @@ impl PlayerBundle { shape: Shape::player(), faction: Faction::default(), player: Player::default(), + name: Name_(name), replicate, } } |