Пример #1
0
    private void CoinBodyEntered(object body)
    {
        if (body.GetType().Name == "Orange")
        {
            animationPlayer.Play("CoinBounce");
            coinCollision.QueueFree();
            audioPlayer.Play();
            timer.Start();

            EmitSignal("CoinCollected");
        }
    }
Пример #2
0
 public void Hit()
 {
     if (hasExploded)
     {
         return;
     }
     hasExploded = true;
     animation.Play("Explode");
     audio.Play();
     sprite.QueueFree();
     collisionShape.QueueFree();
     timer.Start();
 }