simple hitpoint mechanic
This commit is contained in:
@@ -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.),
|
||||
|
||||
Reference in New Issue
Block a user