feat: sounds effects (click on button, win and death) (#67)

This commit is contained in:
2025-05-16 19:27:38 +02:00
committed by GitHub
parent 2c7a420f90
commit 0b32ce7036
28 changed files with 1265 additions and 63 deletions

View File

@ -1,7 +1,9 @@
using System.IO;
using UnityEngine;
public class LevelPreviousButton : MonoBehaviour
{
public AudioSource sfxSource;
public LevelsLoader levelsLoader;
public void Start()
@ -20,5 +22,7 @@ public class LevelPreviousButton : MonoBehaviour
public void PreviousLevel()
{
levelsLoader.PreviousLevel();
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
sfxSource.Play();
}
}