Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class GUIManager : MonoBehaviour {
- public GameObject MainMenu;
- public GameObject OptionsMenu;
- public GameObject Options;
- public GameObject Gameplay;
- public AudioControl audioControl;
- public void Start()
- {
- float existingMaster = PlayerPrefs.GetFloat(audioControl.MasterVolume, 1f);
- float existingMusic = PlayerPrefs.GetFloat(audioControl.MusicVolume, 1f);
- float existingSFX = PlayerPrefs.GetFloat(audioControl.SFXVolume, 1f);
- audioControl.SetMasterLevel(existingMaster);
- audioControl.SetMusicLevel(existingMusic);
- audioControl.SetSfxLevel(existingSFX);
- }
- public void MainToOptions()
- {
- MainMenu.CrossFade(OptionsMenu);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement