Hi!
Godot 3.5 RC8
I have an autoloaded Events.gd class
extends Node
signal click_cell(value)
In Cell.gd class I work with this signal
extends Area2D
func _ready():
Events.connect("click_cell", self, "clickCell")
func _on_Cell_input_event(_viewport, event, _shape_idx):
if InputEventMouseButton and event.is_pressed() and event.button_index == BUTTON_LEFT:
Events.emit_signal("click_cell", [self])
func clickCell(arr):
print(arr[0])
But when I click on an object, instead of one response, I get four!
@Cell@3:[Area2D:1386]
@Cell@3:[Area2D:1386]
@Cell@3:[Area2D:1386]
@Cell@3:[Area2D:1386]
The logic of work is such that it is necessary to catch the click_cell signal
How to fix this, I do not understand and ask for your help.
Thank you!