mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
27 lines
672 B
C#
27 lines
672 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Audio;
|
|
|
|
public class AudioManager : MonoBehaviour
|
|
{
|
|
|
|
public AudioMixer theMixer;
|
|
|
|
void Start()
|
|
{
|
|
if (PlayerPrefs.HasKey("MasterVol"))
|
|
{
|
|
theMixer.SetFloat("MasterVol", PlayerPrefs.GetFloat("MasterVol"));
|
|
}
|
|
if (PlayerPrefs.HasKey("MusicVol"))
|
|
{
|
|
theMixer.SetFloat("MusicVol", PlayerPrefs.GetFloat("MusicVol"));
|
|
}
|
|
if (PlayerPrefs.HasKey("SFXVol"))
|
|
{
|
|
theMixer.SetFloat("SFXVol", PlayerPrefs.GetFloat("SFXVol"));
|
|
}
|
|
}
|
|
}
|