mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-10 01:28:41 -06:00
19 lines
257 B
Rust
19 lines
257 B
Rust
use shipyard::Component;
|
|
|
|
#[derive(Component)]
|
|
pub struct Entity;
|
|
|
|
#[derive(Component)]
|
|
pub struct Health {
|
|
pub current: u8,
|
|
pub max: u8,
|
|
}
|
|
impl Health {
|
|
pub fn new(health: u8) -> Self {
|
|
Self {
|
|
current: health,
|
|
max: health
|
|
}
|
|
}
|
|
}
|