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); } }
static private bool getBool(string key, bool def) { if (!PlayerPrefs.HasKey(key)) { return(def); } return(PlayerPrefs.GetInt(key) == 1); }
public static bool IsUserLogged() { if (Prefs.HasKey(USER_LOGGED)) { return(Prefs.GetInt(USER_LOGGED) == 1); } return(false); }