2025-02-01 17:03:00 +00:00
|
|
|
extends PhysicalBone3D
|
2025-01-26 09:59:59 +00:00
|
|
|
|
2025-02-01 17:03:00 +00:00
|
|
|
@export var damage_multiplexer: float = 1.0
|
2025-01-26 09:59:59 +00:00
|
|
|
|
2025-01-28 09:51:45 +00:00
|
|
|
signal body_part_hit(damage: int)
|
2025-01-26 09:59:59 +00:00
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready() -> void:
|
|
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta: float) -> void:
|
|
|
|
pass
|
|
|
|
|
2025-01-28 09:51:45 +00:00
|
|
|
func hit(base_damage: int):
|
2025-02-01 17:03:00 +00:00
|
|
|
print("HEAD")
|
2025-01-28 09:51:45 +00:00
|
|
|
var final_damage = round(base_damage * damage_multiplexer)
|
2025-02-01 17:03:00 +00:00
|
|
|
$"../../../../.."._hit_detected(final_damage)
|