simple hitpoint mechanic

This commit is contained in:
2025-03-12 23:25:13 +01:00
parent 709c1762bd
commit 8946289ac2
8 changed files with 140 additions and 29 deletions

View File

@@ -108,12 +108,14 @@ impl EnemySpawn {
let head_mesh = asset_server
.load(GltfAssetLabel::Scene(0).from_asset(format!("models/heads/{}.glb", this.head)));
let head = this.head.clone();
world
.commands()
.entity(entity)
.insert((
this_transform,
Name::from("Enemy"),
Name::from(format!("enemy [{}]", head)),
Visibility::default(),
RigidBody::Dynamic,
Collider::capsule(0.4, 2.),