diff --git a/Assets/Scripts/UI/GamePanel/GamePanel_Extension.cs b/Assets/Scripts/UI/GamePanel/GamePanel_Extension.cs index 8ed67c5..b9427d5 100644 --- a/Assets/Scripts/UI/GamePanel/GamePanel_Extension.cs +++ b/Assets/Scripts/UI/GamePanel/GamePanel_Extension.cs @@ -1,11 +1,7 @@ using CodeJay.CodeJayUtility; using CodeJay.Enum; -using System; -using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Reflection; -using System.Runtime.InteropServices; using UnityEngine; using Random = UnityEngine.Random; @@ -593,6 +589,12 @@ public partial class GamePanel : MonoBehaviour m_MissionSuccessPopup = Instantiate(Resources.Load(path + "MissionSuccessPopup"), GameManager.UI.PopupCanvasTransform); } m_MissionSuccessPopup.Set(); + + if (ShowSubMissionPopup) // 미션 모두 성공 + { + GameManager.DB.AddHeart(1, name); + GameManager.DB.SaveDatas(); + } } } // 서브 미션 체크 @@ -714,6 +716,12 @@ public partial class GamePanel : MonoBehaviour m_MissionSuccessPopup.Set(randomCards); AddMultiplyType(EScoreMutiplyType.SubMission); + + if (ShowMainMissionPopup) // 미션 모두 성공 + { + GameManager.DB.AddHeart(1, name); + GameManager.DB.SaveDatas(); + } } } diff --git a/Assets/Scripts/UI/MainPanel.cs b/Assets/Scripts/UI/MainPanel.cs index b153904..d6532ed 100644 --- a/Assets/Scripts/UI/MainPanel.cs +++ b/Assets/Scripts/UI/MainPanel.cs @@ -129,15 +129,16 @@ public class MainPanel : MonoBehaviour { if (GameManager.DB.Gold > 0) { - if (GameManager.DB.InterstitialADCount <= 0) - { - GameManager.ADS.OnCompletedInterstitialAd += OnCompletedInterstitialAd; - GameManager.ADS.ShowInterstitialAd(); - } - else - { - GameManager.Event.InvokeEvent(EEventType.OnStartNormalGame); - } + //if (GameManager.DB.InterstitialADCount <= 0) + //{ + // GameManager.ADS.OnCompletedInterstitialAd += OnCompletedInterstitialAd; + // GameManager.ADS.ShowInterstitialAd(); + //} + //else + //{ + // GameManager.Event.InvokeEvent(EEventType.OnStartNormalGame); + //} + GameManager.Event.InvokeEvent(EEventType.OnStartNormalGame); } else { diff --git a/Assets/Scripts/UI/Popup/ResultPopup.cs b/Assets/Scripts/UI/Popup/ResultPopup.cs index cb83b6c..250434a 100644 --- a/Assets/Scripts/UI/Popup/ResultPopup.cs +++ b/Assets/Scripts/UI/Popup/ResultPopup.cs @@ -696,27 +696,29 @@ public class ResultPopup : PopupBase private bool CheckShowInterstitialAD() { - if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE) - { - if (GameManager.DB.InterstitialADCount <= 0) - { - // 광고 실행하기 - GameManager.ADS.ShowInterstitialAd(); - return true; - } - } + //if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE) + //{ + // if (GameManager.DB.InterstitialADCount <= 0) + // { + // // 광고 실행하기 + // GameManager.ADS.ShowInterstitialAd(); + // return true; + // } + //} + //return false; + return false; } private void OnCompletedRewardedAd(bool isCompleted, string name) { - if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE) - { - if (GameManager.DB.InterstitialADCount <= 0) - { - GameManager.DB.ResetInterstitialADCount(); - } - } + //if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE) + //{ + // if (GameManager.DB.InterstitialADCount <= 0) + // { + // GameManager.DB.ResetInterstitialADCount(); + // } + //} if (name == this.name) {