22 lines
595 B
GDScript
22 lines
595 B
GDScript
extends CharacterBody3D
|
|
|
|
@onready var player_ray: RayCast3D = get_tree().get_first_node_in_group("player_ray")
|
|
var dialogue = load("res://dialogue/mariana_test.dialogue")
|
|
|
|
var mood: float = 5
|
|
|
|
func _physics_process(_delta: float) -> void:
|
|
if has_node("InteractLabel"):
|
|
if player_ray.is_colliding() and player_ray.get_collider() == $".":
|
|
$InteractLabel.show()
|
|
else:
|
|
$InteractLabel.hide()
|
|
|
|
func interact():
|
|
if Global.dialogue_wait == false:
|
|
DialogueManager.show_dialogue_balloon(dialogue, "start")
|
|
|
|
func affinity(mood_swing):
|
|
mood += mood_swing
|
|
print("mariana mood: " + str(mood))
|