button sound!

This commit is contained in:
pennyrigate 2023-03-08 12:26:37 -05:00
parent 00558c3e13
commit b548612ecc
4 changed files with 19 additions and 0 deletions

View file

@ -1,6 +1,7 @@
extends "res://objects/environment/switches/switch.gd"
var pressed = false
var sound = load("res://audio/sounds/button.ogg")
func _on_ActivationArea_area_entered(area):
if !pressed:
@ -8,3 +9,4 @@ func _on_ActivationArea_area_entered(area):
activate()
$Sprite.frame = 1
pressed = true
Audio.play_sound(sound,$AudioStreamPlayer)