public AudioControllerSnapshot CreateSnapshot() { var snapshot = new AudioControllerSnapshot(); snapshot.SoundMute = SoundMute; snapshot.MusicMute = MusicMute; //PlayerPrefs.SetInt(SETTINGS_PLAY_MUSIC_KEY, _musicMute ? 0 : 1); //PlayerPrefs.SetInt(SETTINGS_PLAY_SOUND_KEY, _soundMute ? 0 : 1); snapshot.SoundVolume = SoundVolume; snapshot.MusicVolume = MusicVolume; return(snapshot); }
public bool LoadSnapshot(AudioControllerSnapshot snapshot) { CheckSoundMute(); if (snapshot == null) { return(false); } _soundMute = snapshot.SoundMute; _musicMute = snapshot.MusicMute; _soundVolume = snapshot.SoundVolume; _musicVolume = snapshot.MusicVolume; return(true); }
public UserDataCommonSnapshot() { User = new User(); AudioControllerSnapshot = new AudioControllerSnapshot(); }