NPC death

This commit is contained in:
Spencer Killen 2023-01-04 19:25:46 -07:00
parent b54053507a
commit 2f2894e656
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
2 changed files with 4 additions and 3 deletions

View File

@ -67,6 +67,7 @@ func close_dialog():
func player_entered(): func player_entered():
if has_node("npc_common/SignalGenerator"): if has_node("npc_common/SignalGenerator"):
$npc_common.remove_child($npc_common/SignalGenerator) $npc_common.remove_child($npc_common/SignalGenerator)
if is_alive:
create_dialog(initial_dialogic_timeline) create_dialog(initial_dialogic_timeline)
func player_exited(): func player_exited():

View File

@ -22,7 +22,7 @@ func _input(event):
if Input.is_action_just_pressed("ui_cancel"): if Input.is_action_just_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
else: else:
if event is InputEventMouseButton and Input.is_action_just_pressed("ui cancel"): if event is InputEventMouseButton and Input.is_action_just_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
var look_relative = Vector2( var look_relative = Vector2(