using Godot; using System; public partial class And : Node { [Export] public int CountOfButtons = 2; [Signal] public delegate void ConditionMetEventHandler(); [Signal] public delegate void ConditionNotMetEventHandler(); private int _buttons = 0; public void Increment() { _buttons++; GD.Print($"Increment {_buttons}/{CountOfButtons}"); if (_buttons == CountOfButtons) EmitSignal(SignalName.ConditionMet); } public void Decrement() { _buttons--; GD.Print($"Decrement {_buttons}/{CountOfButtons}"); if (_buttons != CountOfButtons) EmitSignal(SignalName.ConditionNotMet); } }