feature/showcase_bugfixing_kathi_partII #16
@@ -13,12 +13,19 @@ public partial class MVPDuck : Node2D
|
|||||||
[Export] private AnimationPlayer _animationPlayer;
|
[Export] private AnimationPlayer _animationPlayer;
|
||||||
[Export] private string _flapAnimationName = "flapFlap";
|
[Export] private string _flapAnimationName = "flapFlap";
|
||||||
|
|
||||||
|
private bool _collected;
|
||||||
|
|
||||||
[Signal] public delegate void DuckCollectedEventHandler();
|
[Signal] public delegate void DuckCollectedEventHandler();
|
||||||
|
|
||||||
public void TransferToTargetAfterDelay()
|
public void TransferToTargetAfterDelay()
|
||||||
{
|
{
|
||||||
MoveAfterDelay();
|
if (!_collected)
|
||||||
PlayAnimation();
|
{
|
||||||
|
MoveAfterDelay();
|
||||||
|
PlayAnimation();
|
||||||
|
_collected = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PlayAnimation()
|
private void PlayAnimation()
|
||||||
|
|||||||
Reference in New Issue
Block a user