aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared.rs')
-rw-r--r--src/shared.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/shared.rs b/src/shared.rs
index 5d6cbed..146e343 100644
--- a/src/shared.rs
+++ b/src/shared.rs
@@ -1,11 +1,15 @@
use crate::protocol::Replicate;
+use crate::shared::cooldown::*;
use crate::shared::imperative::*;
use bevy::prelude::*;
use lightyear::prelude::*;
use serde::Deserialize;
use serde::Serialize;
+use std::default::Default;
+pub mod cooldown;
pub mod imperative;
+pub mod projectile;
pub const CLIENT_ID: u64 = 0;
pub const KEY: [u8; 32] = [
@@ -21,9 +25,10 @@ pub struct PlayerBundle {
color: PlayerColor,
replicate: Replicate,
imperative: Imperative,
+ cooldown: Cooldown,
}
-#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
+#[derive(Component, Message, Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
pub struct PlayerId(pub ClientId);
#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
@@ -40,6 +45,7 @@ impl PlayerBundle {
color: PlayerColor(color),
replicate: Replicate::default(),
imperative: Imperative::Idle,
+ cooldown: Cooldown::default(),
}
}
}