広告表示中にSEが鳴らない対策追加
This commit is contained in:
parent
4d4c4da244
commit
3a801a580e
|
|
@ -19,6 +19,7 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
|||
private float _timeScale = 0.0f;
|
||||
|
||||
private bool _marketPause;
|
||||
private bool _cacheSeEnabled;
|
||||
|
||||
void Awake(){
|
||||
#if UNITY_EDITOR
|
||||
|
|
@ -132,6 +133,8 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
|||
private void pauseGame(){
|
||||
SoundManager.Instance.PauseBGM();
|
||||
SoundManager.Instance.StopSE();
|
||||
_cacheSeEnabled = SoundManager.Instance.IsEnabled(SoundType.SE);
|
||||
SoundManager.Instance.SaveEnabledSE(false);
|
||||
_marketPause = Market.Instance.IsPause.Value;
|
||||
Market.Instance.IsPause.Value = true;
|
||||
if(Time.timeScale > 0.0f){
|
||||
|
|
@ -141,6 +144,7 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
|||
}
|
||||
private void resumeGame(){
|
||||
SoundManager.Instance.ReplayBGM();
|
||||
SoundManager.Instance.SaveEnabledSE(_cacheSeEnabled);
|
||||
// キャッシュしていた元の状態に戻す
|
||||
if (Market.Instance.IsPause.Value)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue