コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public UserDataCommonSnapshot()
 {
     User = new User();
     AudioControllerSnapshot = new AudioControllerSnapshot();
 }