Exemple #1
0
    static public void load()
    {
        float globalVolume, musicVolume, sfxVolume;
        bool  invertCamX, invertCamY;
        int   particleQuality, playerModel;

        globalVolume    = PlayerPrefs.GetFloat("GlobalVolume", 1.0f);
        musicVolume     = PlayerPrefs.GetFloat("MusicVolume", 0.6f);
        sfxVolume       = PlayerPrefs.GetFloat("SfxVolume", 0.4f);
        invertCamX      = getBool("InvertCamX", false);
        invertCamY      = getBool("InvertCamY", false);
        particleQuality = PlayerPrefs.GetInt("ParticleQuality",
                                             (int)Global.ParticleQuality.High);
        playerModel = PlayerPrefs.GetInt("PlayerModel", 0);

        setGlobalVolume(globalVolume);
        setMusicVolume(musicVolume);
        setSfxVolume(sfxVolume);
        setHorCamInverted(invertCamX);
        setVerCamInverted(invertCamY);
        setParticlesQual((Global.ParticleQuality)particleQuality);
        setPlayerModel(playerModel);

        for (int i = 0; i < 3; i++)
        {
            loadInput(i);
        }
    }
Exemple #2
0
        public static float GetFloat(string key)
        {
            float defaultValue = 0f;

            return(PlayerPrefs.GetFloat(key, defaultValue));
        }