🐛 fixed ducks counting bug

This commit is contained in:
2025-09-27 17:38:23 +02:00
parent 936983e14f
commit d6a2b586e4
+7
View File
@@ -13,12 +13,19 @@ public partial class MVPDuck : Node2D
[Export] private AnimationPlayer _animationPlayer;
[Export] private string _flapAnimationName = "flapFlap";
private bool _collected;
[Signal] public delegate void DuckCollectedEventHandler();
public void TransferToTargetAfterDelay()
{
if (!_collected)
{
MoveAfterDelay();
PlayAnimation();
_collected = true;
}
}
private void PlayAnimation()