Tap the example to play it again, with sound.
When the player collects a coin, make it fly in an arc to the score with a trail, pulse the score, and play a bright coin sound.
View code
game.animateTrail(coin, { durationMs: 400 });
game.animateArc(coin, score.x, score.y, 120, 400, () => {
game.destroySprite(coin);
game.animatePulse(score, 1.3, 200);
game.playSound("pickup");
});