Les instruments font du bruit #mauvaiseIdee #stopLeSon #adieuMesOreilles
This commit is contained in:
parent
204848fcf1
commit
f42123d1b2
15 changed files with 157 additions and 14 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue