first commit
This commit is contained in:
18
heart.gd
Normal file
18
heart.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user