extends Node3D

@onready var tawna: CharacterBody3D = $NPC/NPC_Tawna; 
@onready var player: CharacterBody3D = $NPC/NPC_Coco; 

var d = GDRx.on_physics_step().subscribe(attach_target).dispose_with(self)

func _ready() -> void:
  print(get_parent_node_3d())
  tawna.target = player
#
func attach_target(delta: float) -> void:
  var g = get_node("../Level/Player")
  if tawna and g:
    print("l")
    tawna.target = g
    d.dispose()

func _on_area_3d_area_entered(area: Area3D) -> void:
  if area.is_in_group("Player"):
    #get_tree().change_scene_to_packed()
    print("Hit")
    print(area)
