Crates.io | bevy_health_system |
lib.rs | bevy_health_system |
version | 0.2.0 |
source | src |
created_at | 2023-05-23 13:25:59.76806 |
updated_at | 2023-08-02 02:40:22.382924 |
description | A quick and easy way to add a health system to any entity of your bevy game |
homepage | |
repository | https://github.com/thaiminh2022/bevy_health_system |
max_upload_size | |
id | 872018 |
size | 22,158 |
Bevy | bevy_health_system |
---|---|
0.11 | 0.2.0 |
0.10 | 0.1.1 |
An easy way to add a health system to your bevy's entity. NOTICE: This package is not entirely depend on bevy, the only "bevy thing" this package use is the Component struct. This is described in: NO BEVY section.
HealthSystem
struct.HealthSystem
struct just like any component for your entity.use bevy::prelude::*
use bevy_health_system::HealthSystem
fn spawn_player(mut commands: Commands) {
commands.spawn(HealthSystem::new(100.0));
}
This package is not entirely depend on bevy, the only "bevy thing" this package use is the Component struct.
use bevy::prelude::Component;
If you want to use this package independently with bevy, here's what to do.
I'm too lazy to add examples, check the docs. Should be easy to implement to your projects.
MIT