second key and fence
This commit is contained in:
@@ -37,8 +37,8 @@ fn on_hit(
|
||||
if hp.0 <= 0 {
|
||||
commands.entity(trigger.entity()).despawn_recursive();
|
||||
|
||||
if enemy.has_key {
|
||||
commands.trigger(KeySpawn(transform.translation));
|
||||
if !enemy.key.is_empty() {
|
||||
commands.trigger(KeySpawn(transform.translation, enemy.key.clone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user