2024-11-15 13:09:38 +01:00
|
|
|
extends Node
|
|
|
|
|
|
|
|
var is_conversation_active:bool = false
|
|
|
|
var player:Player = null
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
if not DialogueManager.is_connected("dialogue_ended", InteractionSystem.stop_conversation):
|
|
|
|
DialogueManager.connect("dialogue_ended", InteractionSystem.stop_conversation)
|
|
|
|
|
|
|
|
func start_conversation(resource: DialogueResource) -> void:
|
|
|
|
is_conversation_active = true
|
2024-11-16 20:43:21 +01:00
|
|
|
|
2024-11-15 13:09:38 +01:00
|
|
|
if player:
|
|
|
|
player.is_input_blocked = true
|
|
|
|
|
|
|
|
func stop_conversation(resource: DialogueResource) -> void:
|
|
|
|
is_conversation_active = false
|
|
|
|
|
|
|
|
if player:
|
|
|
|
player.is_input_blocked = false
|