Add sounds

This commit is contained in:
2026-06-16 15:01:51 +08:00
parent e76e396274
commit a0755a9376
3 changed files with 3 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ coin.x = random.randint(0, 800)
coin.y = random.randint(0, 600) coin.y = random.randint(0, 600)
score = 0 score = 0
timer = 10 timer = 35
def update(): def update():
global score global score
@@ -39,6 +39,8 @@ def update():
coin.x = random.randint(0, 800) coin.x = random.randint(0, 800)
coin.y = random.randint(0, 600) coin.y = random.randint(0, 600)
score += 1 score += 1
sounds.sfx_coin_single1.play()
def draw(): def draw():
if timer <= 0: if timer <= 0: