aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol.rs')
-rw-r--r--src/protocol.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/protocol.rs b/src/protocol.rs
index f75cfab..bdc2098 100644
--- a/src/protocol.rs
+++ b/src/protocol.rs
@@ -7,12 +7,12 @@ use crate::shared::faction::*;
use crate::shared::health::*;
use crate::shared::health_event::*;
use crate::shared::imperative::*;
+use crate::shared::name::*;
use crate::shared::player::*;
use crate::shared::projectile::*;
use crate::shared::shape::*;
use crate::shared::stats::*;
use crate::shared::tower::*;
-use bevy::prelude::*;
use lightyear::prelude::*;
use serde::Deserialize;
use serde::Serialize;
@@ -24,18 +24,18 @@ pub enum Inputs {
impl UserAction for Inputs {}
#[derive(Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
-pub struct SelectChampion(pub Champion);
-
-#[derive(Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
-pub struct SelectFaction(pub Faction);
+pub struct Spawn {
+ pub champion: Champion,
+ pub faction: Faction,
+ pub name: String,
+}
#[derive(Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct HealthChanged(pub HealthEvent);
#[message_protocol(protocol = "MyProtocol")]
pub enum Messages {
- SelectChampion(SelectChampion),
- SelectFaction(SelectFaction),
+ Spawn(Spawn),
HealthChanged(HealthChanged),
Imperative(Imperative),
Activation(Activation),
@@ -57,6 +57,7 @@ pub enum Components {
Shape(Shape),
Tower(Tower),
Faction(Faction),
+ Name(Name_),
}
#[derive(Channel)]