Fixed a bug where bottle in magical closet room 9 had wrong interaction position.

This commit is contained in:
Julian Murgia
2021-02-26 21:31:50 +01:00
parent f743d1089c
commit b8f668df0a
25 changed files with 298 additions and 350 deletions

View File

@@ -6,6 +6,8 @@ This script is out of Escoria's scope. It controls the UI reaction to an
UI event (eg right click) to change the cursor accordingly.
"""
var selected_action
func _ready():
for but in $actions.get_children():
but.connect("pressed", self, "_on_action_selected", [but.name])
@@ -20,3 +22,10 @@ func _on_action_selected(action : String):
func unselect_actions():
for but in $actions.get_children():
but.set_pressed(false)
func set_by_name(action_name : String):
selected_action = action_name
for but in $actions.get_children():
but.set_pressed(but.get_name() == action_name)