void Awake() { if (instance == null) { instance = this; } // PlayerPrefs.DeleteAll (); if (GetTimesPLayed() == 0 && GetTotalCoins() == 0) { //SetTotalCoins(25); SetheavySelectIndex(0); //0,1 SetpistolSelectIndex(0); //0,1,2,3 SetexHeavySelectIndex(1); //0=off,1=active setMusicSensitivity(1f); setInput(2); } }
void Start() { pPms = preferenceManager.GetComponent <playerPreferenceManagerScript> (); musicSlider.GetComponent <Slider> ().value = pPms.getMusicSensitivity(); SetvolumeOfAudioSources(pPms.getMusicSensitivity()); }
void Awake() { pPms = playerPreference.GetComponent <playerPreferenceManagerScript> (); GetComponent <AudioSource> ().volume = pPms.getMusicSensitivity(); }