19 lines
306 B
GDScript
19 lines
306 B
GDScript
extends Node3D
|
|
|
|
|
|
func _on_area_3d_body_entered(body):
|
|
if visible && body.is_in_group("player"):
|
|
Globals.task = 2
|
|
if Globals.huntMode != 1:
|
|
Globals.huntMode = 0
|
|
|
|
func _process(_delta):
|
|
visible = Globals.task == 1
|
|
|
|
|
|
func _on_visibility_changed():
|
|
if visible:
|
|
$heart.play()
|
|
else:
|
|
$heart.stop()
|