mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 16:28:42 -06:00
ad entity to shared
This commit is contained in:
parent
740fa04910
commit
dada84e097
18
kubi-shared/src/entity.rs
Normal file
18
kubi-shared/src/entity.rs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue