広告視聴時、SEがなるのを抑制
This commit is contained in:
parent
8fb3833061
commit
856daae90b
|
|
@ -18,7 +18,7 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
|||
private bool _rewardAdFinish = false;
|
||||
private float _timeScale = 0.0f;
|
||||
|
||||
|
||||
private bool _marketPause;
|
||||
|
||||
void Awake(){
|
||||
#if UNITY_EDITOR
|
||||
|
|
@ -132,6 +132,8 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
|||
private void pauseGame(){
|
||||
SoundManager.Instance.PauseBGM();
|
||||
SoundManager.Instance.StopSE();
|
||||
_marketPause = Market.Instance.IsPause.Value;
|
||||
Market.Instance.IsPause.Value = true;
|
||||
if(Time.timeScale > 0.0f){
|
||||
_timeScale = Time.timeScale;
|
||||
// TimeManager.Instance.Stop();
|
||||
|
|
@ -139,6 +141,11 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
|||
}
|
||||
private void resumeGame(){
|
||||
SoundManager.Instance.ReplayBGM();
|
||||
// キャッシュしていた元の状態に戻す
|
||||
if (Market.Instance.IsPause.Value)
|
||||
{
|
||||
Market.Instance.IsPause.Value = _marketPause;
|
||||
}
|
||||
if(_timeScale > 0.0f){
|
||||
Time.timeScale = _timeScale;
|
||||
// TimeManager.Instance.ChangeTimeScale(_timeScale);
|
||||
|
|
|
|||
Loading…
Reference in New Issue