26 lines
656 B
GDScript
26 lines
656 B
GDScript
extends Node3D
|
|
|
|
|
|
var owner_placeholder: CharacterBody3D = null
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
print("ready")
|
|
owner_placeholder = _get_owner()
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|
|
|
|
|
|
func _on_head_collision_body_part_hit(dam: Variant) -> void:
|
|
print("head is hit" + str(dam))
|
|
#owner_placeholder.take_damage(dam)
|
|
pass # Replace with function body.
|
|
|
|
func _get_owner() -> CharacterBody3D:
|
|
var owner_placeholder := find_parent("CharacterPlaceholder")
|
|
return owner_placeholder
|
|
|