diff --git a/kubi-shared/src/entity.rs b/kubi-shared/src/entity.rs new file mode 100644 index 0000000..bf2f183 --- /dev/null +++ b/kubi-shared/src/entity.rs @@ -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 + } + } +} diff --git a/kubi-shared/src/lib.rs b/kubi-shared/src/lib.rs index 13cb165..3817e6f 100644 --- a/kubi-shared/src/lib.rs +++ b/kubi-shared/src/lib.rs @@ -3,3 +3,4 @@ pub mod networking; pub mod worldgen; pub mod chunk; pub mod transform; +pub mod entity;