When a mushrooms health is less than 1
When a mushrooms health is less than 1
We should play the death animation
We should play the death animation
and destroy the mushroom.
and destroy the mushroom.
However, we should only remove the mushroom
However, we should only remove the mushroom
from the scene once the
from the scene once the
death animation is finished playing.
death animation is finished playing.
Select the AnimatedSprite2D node
Select the AnimatedSprite2D node
Connect the animation finished signal
Connect the animation finished signal
Code it as shown.
Code it as shown.