Les instruments font du bruit #mauvaiseIdee #stopLeSon #adieuMesOreilles

This commit is contained in:
E213872U 2025-01-25 05:09:47 +01:00
parent 204848fcf1
commit f42123d1b2
15 changed files with 157 additions and 14 deletions

View file

@ -3,6 +3,18 @@ extends Area2D
var timer = 0.0
var cooldown = 0.3
@onready var audio = $effet
var sound_list = [
preload("res://ressources/sons/lyre-1.mp3"),
preload("res://ressources/sons/lyre-2.mp3"),
preload("res://ressources/sons/lyre-3.mp3"),
]
func _ready() :
var index = randi() % 3
audio.stream = sound_list[index]
audio.play()
func _process(delta: float) -> void:
timer += delta
if timer >= cooldown: