progresS
This commit is contained in:
@@ -49,7 +49,6 @@ func _process(delta):
|
||||
if Geometry2D.is_point_in_polygon(to_local(get_global_mouse_position()), self.polygon):
|
||||
if is_in == false:
|
||||
is_in = true
|
||||
print("ENTERED0", label)
|
||||
emit_signal("entered", label)
|
||||
else:
|
||||
if is_in == true:
|
||||
@@ -72,7 +71,12 @@ func _get_overlapping_setpieces() -> Array[SetPiece]:
|
||||
func _input(event):
|
||||
if not Engine.is_editor_hint():
|
||||
if Geometry2D.is_point_in_polygon(to_local(get_global_mouse_position()), self.polygon):
|
||||
if event is InputEventMouseButton and event.is_action("interact"):
|
||||
if event is InputEventMouseButton and Input.is_action_just_released("interact"):
|
||||
# Check if a script is running that shouldn't be interrupted
|
||||
var script_builder = get_node_or_null("/root/Node2D/GameScript")
|
||||
if script_builder and script_builder.current_script and not script_builder.current_script.can_interrupt:
|
||||
return # Let the script handle the input
|
||||
|
||||
# Find all overlapping SetPieces and check if this one has highest priority
|
||||
var overlapping = _get_overlapping_setpieces()
|
||||
overlapping.append(self)
|
||||
|
||||
Reference in New Issue
Block a user