extends Area2D # Proprietăți pion var type = "pawn" var color = "white" func _ready(): # Folosim Callable pentru a conecta semnalul connect("input_event", Callable(self, "_on_pion_input_event")) func _on_pion_input_event(viewport, event, shape_idx): if event is InputEventMouseButton and event.pressed: if event.button_index == MOUSE_BUTTON_LEFT: print("Pionul alb a fost click-uit.") get_parent()._on_piece_input_event(viewport, event, shape_idx, self)