ad entity to shared

This commit is contained in:
griffi-gh 2023-02-14 19:09:27 +01:00
parent 740fa04910
commit dada84e097
2 changed files with 19 additions and 0 deletions

18
kubi-shared/src/entity.rs Normal file
View file

@ -0,0 +1,18 @@
use shipyard::Component;
#[derive(Component)]
pub struct Entity;
#[derive(Component)]
pub struct Health {
pub current: u8,
pub max: u8,
}
impl Health {
fn new(health: u8) -> Self {
Self {
current: health,
max: health
}
}
}

View file

@ -3,3 +3,4 @@ pub mod networking;
pub mod worldgen; pub mod worldgen;
pub mod chunk; pub mod chunk;
pub mod transform; pub mod transform;
pub mod entity;