protected new void Start() { maxPos = Screens.Count - 1; lastPos = 5; // Update Pips UpdatePips(); // Update Display UpdateDisplay(); // Load Data Data = SaveManager.LoadArcadeSettings(); MusicVolume = Data.CabinetMusicVolume; SFXVolume = Data.CabinetSFXVolume; AudioOptions[0].GetComponent <Slider>().value = MusicVolume; AudioOptions[1].GetComponent <Slider>().value = SFXVolume; Mixer.SetFloat("MusicVolume", MusicVolume); Mixer.SetFloat("SFXVolume", SFXVolume); inputReady = true; base.Start(); }
/// <summary> /// Sets up the audio source reference and the playerID /// </summary> private void Setup() { playerID = GameObject.FindGameObjectsWithTag(tagString).Length; audioSource = GetComponent <AudioSource>(); DontDestroyOnLoad(this); ArcadeData data = SaveManager.LoadArcadeSettings(); Mixer.SetFloat("MusicVolume", data.CabinetMusicVolume); }
private void Start() { setupID = FindObjectsOfType <MicroArcadeSetup>().Length; DontDestroyOnLoad(this); RemoveDuplicates(); if (!hasLoadedSettings) { ArcadeData arcadeSettings = SaveManager.LoadArcadeSettings(); cabinetMixer.SetFloat("MusicVolume", arcadeSettings.CabinetMusicVolume); cabinetMixer.SetFloat("SFXVolume", arcadeSettings.CabinetSFXVolume); hasLoadedSettings = true; SaveManager.SaveOnlineLeaderboardsPath(new ArcadeOnlinePaths()); } }
//Need to Save Worlds // Start is called before the first frame update public void Awake() { instance = this; path = Application.persistentDataPath + "/" + filename; ReadData(); }