예제 #1
0
 public static void Init()
 {
     IsAdditive             = false;
     TheApplicationLanguage = SystemLanguage.English;
     BgmVolume   = 0.25f;
     SfxVolume   = 0.8f;
     VoiceVolume = 1.0f;
     TheLanguage = "English";
     BgmVolume   = PlayerPrefs.GetFloat("MusicVolume", BgmVolume);
     PlayerPrefs.SetFloat("MusicVolume", BgmVolume);
     OnChangedBgmVolume?.Invoke();
     SfxVolume = PlayerPrefs.GetFloat("SfxVolume", SfxVolume);
     PlayerPrefs.SetFloat("SfxVolume", SfxVolume);
     OnChangedSfxVolume?.Invoke();
     VoiceVolume = PlayerPrefs.GetFloat("VoiceVolume", VoiceVolume);
     PlayerPrefs.SetFloat("VoiceVolume", VoiceVolume);
     OnChangedVoiceVolume?.Invoke();
     TheLanguage = PlayerPrefs.GetString("Language", TheLanguage);
     PlayerPrefs.SetString("Language", TheLanguage);
     TheApplicationLanguage = "Japanese" == TheLanguage ?
                              SystemLanguage.Japanese : SystemLanguage.English;
     OnChangedLanguage?.Invoke();
 }
예제 #2
0
 public void SfxVolumeChanging()
 {
     SfxVolume = sfxSlider.normalizedValue;
     PlayerPrefs.SetFloat("SfxVolume", SfxVolume);
     OnChangedSfxVolume?.Invoke();
 }