Seascape/Assets/AudioManager.cs

35 lines
818 B
C#
Raw Permalink Normal View History

2025-03-19 10:28:26 +01:00
using UnityEngine;
public class AudioManager : MonoBehaviour
{
[Header("Audio Source")]
[SerializeField] AudioSource m_Source;
[SerializeField] AudioSource SFXSource;
[Header("Audio Clip")]
public AudioClip backgroundGameScene;
public AudioClip backgroundMenu;
public AudioClip backgroundMainMenu;
public AudioClip ButtonClick;
public AudioClip NetzSpawn;
public AudioClip NetzDestroy;
public AudioClip SharkDeath;
public AudioClip SharkCaught;
public AudioClip GameOver;
public AudioClip EnemyApproach;
public AudioClip Wave;
public AudioClip Fisch;
public void Start()
{
m_Source.clip = backgroundGameScene;
m_Source.Play();
}
public void PlaySFX(AudioClip clip)
{
SFXSource.PlayOneShot(clip);
}
}