Beispiel #1
0
    private static StoredPrefs loadPrefs()
    {
        StoredPrefs newPrefs = new StoredPrefs();

        newPrefs.preferredLanguage = PlayerPrefs.GetString(PreferredLanguageKey, "");
        newPrefs.volumes           = new float[volumeTypeCount];
        for (int i = 0; i < volumeTypeCount; i++)
        {
            newPrefs.volumes[i] = PlayerPrefs.GetFloat(VolumeKeyPrefix + ((VolumeType)i).ToString(), 1f);
        }
        return(newPrefs);
    }
Beispiel #2
0
    private static StoredPrefs loadPrefs()
    {
        //setProgress(1); //Debug purposes;

        StoredPrefs newPrefs = new StoredPrefs();

        newPrefs.preferredLanguage = PlayerPrefs.GetString(PreferredLanguageKey, LocalizationManager.DefaultLanguage);
        newPrefs.volumes           = new float[volumeTypeCount];
        for (int i = 0; i < volumeTypeCount; i++)
        {
            newPrefs.volumes[i] = PlayerPrefs.GetFloat(VolumeKeyPrefix + ((VolumeType)i).ToString(), 1f);
        }
        return(newPrefs);
    }