//  public bool muted { get { return allMuted <= 0;  } set { } }
        private void Awake()
        {
            canChangeMusicNow = true;
            instance          = instance ?? this;
            DontDestroyOnLoad(gameObject);
            soundVolume = HelpSaveLoad.GetValue(ConstsLibrary.soundEffectVolumePrefs, 1f);
            musicVolume = HelpSaveLoad.GetValue(ConstsLibrary.musicVolumePrefs, 1f);
            allMuted    = HelpSaveLoad.GetValue(ConstsLibrary.mutedPrefs, 0);

            foreach (var item in soundSettings)
            {
                item.source          = gameObject.AddComponent <AudioSource>();
                item.source.volume   = soundVolume * item.volumeDecreaser;
                item.source.clip     = item.audioClip;
                item.source.priority = item.priority;
                item.source.loop     = item.loop;
            }
            foreach (var item in musicSettings)
            {
                item.source          = gameObject.AddComponent <AudioSource>();
                item.source.volume   = musicVolume * item.volumeDecreaser;
                item.source.clip     = item.audioClip;
                item.source.priority = item.priority;
                item.source.loop     = item.loop;
            }
            if (allMuted == 1)
            {
                MuteAll(true);
            }
            else
            {
                MuteAll(false);
            }
        }
 void Start()
 {
     isMutedToggle.isOn  = HelpSaveLoad.GetValue(ConstsLibrary.mutedPrefs, 0) == 1;
     musicSlider.value   = HelpSaveLoad.GetValue(ConstsLibrary.musicVolumePrefs, 1f);
     effectsSlider.value = HelpSaveLoad.GetValue(ConstsLibrary.soundEffectVolumePrefs, 1f);
 }