using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SoundManager : MonoBehaviour
{
    public static SoundManager instance;

    public AudioClip collect, eject, ejectCat, collectCat, blackHolePop, engine, catFail;
    public AudioSource audioSource, engineSource;

    private void Awake()
    {
        instance = this;
    }

    public void PlayCollect()
    {
        audioSource.clip = collect;
        audioSource.Play();
    }

    public void PlayEject()
    {
        audioSource.clip = eject;
        audioSource.Play();
    }

    public void PlayCollectCat()
    {
        audioSource.clip = collectCat;
        audioSource.Play();
    }

    public void PlayEjectCat()
    {
        audioSource.clip = ejectCat;
        audioSource.Play();
    }

    public void PlayBlackHolePop()
    {
        audioSource.clip = blackHolePop;
        audioSource.Play();
    }

    public void PlayCatFail()
    {
        audioSource.clip = catFail;
        audioSource.Play();
    }

    public void StartEngineSound()
    {
        engineSource.Play();
    }

    public void StopEngineSound()
    {
        engineSource.Stop();
    }
}
