public void SetIsMusicPlay(bool _b) { isMusicPlay = _b; LocalSettingData.SetInt(MUSIC_PLAY_KEY, isMusicPlay ? 1 : 0); if (!isMusicPlay) { if (musicSource.isPlaying) { musicSource.Stop(); } } else { if (musicSource.clip != null) { musicSource.Play(); } } }
public void SetIsEffectPlay(bool _b) { isEffectPlay = _b; LocalSettingData.SetInt(EFFECT_PLAY_KEY, isEffectPlay ? 1 : 0); }