diff options
Diffstat (limited to 'src/shared/health.rs')
-rw-r--r-- | src/shared/health.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/health.rs b/src/shared/health.rs new file mode 100644 index 0000000..f4a288a --- /dev/null +++ b/src/shared/health.rs @@ -0,0 +1,12 @@ +use crate::shared::*; + +#[derive(Component, Message, Serialize, Deserialize, Clone, Copy, Debug, PartialEq)] +pub struct Health(pub f32); + +pub const MAX_HEALTH: f32 = 100.; + +impl Default for Health { + fn default() -> Self { + Health(MAX_HEALTH) + } +} |