Mediepals/Assets/Scripts/Menu/PlaySounds.cs
Gerard Gascón 102013b228 init
2025-04-24 14:30:07 +02:00

26 lines
555 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlaySounds : MonoBehaviour{
[SerializeField] bool playIntro = true;
void Start(){
if (playIntro){
AudioManager.instance.Play("Intro");
}
}
public void PlayMusic(string name){
AudioManager.instance.Play(name);
}
public void StopMusic(string name){
AudioManager.instance.Play(name);
}
public void PlayOneShot(string name){
AudioManager.instance.PlayOneShot(name);
}
}