mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-25 05:08:21 -06:00
ad entity to shared
This commit is contained in:
parent
4a7c985ba1
commit
d583673081
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 chunk;
|
||||
pub mod transform;
|
||||
pub mod entity;
|
||||
|
|
Loading…
Reference in a new issue