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++; if (_buttons == CountOfButtons) EmitSignal(SignalName.ConditionNotMet); } public void Decrement() { _buttons--; if (_buttons != CountOfButtons) EmitSignal(SignalName.ConditionNotMet); } }