35 lines
818 B
C#
35 lines
818 B
C#
|
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);
|
||
|
}
|
||
|
}
|