blunderbuss working

This commit is contained in:
Derek
2024-11-23 16:27:50 -06:00
parent da6ac13cf7
commit 05b8c0d760
22 changed files with 1003 additions and 108 deletions

View File

@@ -22,3 +22,8 @@ func hit(bullet_damage):
number_spawn.damage_amt = bullet_damage * damage
number_spawn.position = global_position + Vector3(0,2,0)
get_tree().get_root().add_child(number_spawn)
func _on_body_entered(body: Node3D) -> void:
if body.is_in_group("pellet"):
hit(body.bullet_damage)
SignalBus.emit_signal("enemy_hit")