광고 제거 및 미션 모두 완료 시 하트 지급

This commit is contained in:
Ino 2025-09-06 07:02:33 +09:00
parent af8c4c88bd
commit 5be903eefd
3 changed files with 40 additions and 29 deletions

View File

@ -1,11 +1,7 @@
using CodeJay.CodeJayUtility; using CodeJay.CodeJayUtility;
using CodeJay.Enum; using CodeJay.Enum;
using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using UnityEngine; using UnityEngine;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
@ -593,6 +589,12 @@ public partial class GamePanel : MonoBehaviour
m_MissionSuccessPopup = Instantiate(Resources.Load<MissionSuccessPopup>(path + "MissionSuccessPopup"), GameManager.UI.PopupCanvasTransform); m_MissionSuccessPopup = Instantiate(Resources.Load<MissionSuccessPopup>(path + "MissionSuccessPopup"), GameManager.UI.PopupCanvasTransform);
} }
m_MissionSuccessPopup.Set(); 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); m_MissionSuccessPopup.Set(randomCards);
AddMultiplyType(EScoreMutiplyType.SubMission); AddMultiplyType(EScoreMutiplyType.SubMission);
if (ShowMainMissionPopup) // 미션 모두 성공
{
GameManager.DB.AddHeart(1, name);
GameManager.DB.SaveDatas();
}
} }
} }

View File

@ -129,15 +129,16 @@ public class MainPanel : MonoBehaviour
{ {
if (GameManager.DB.Gold > 0) if (GameManager.DB.Gold > 0)
{ {
if (GameManager.DB.InterstitialADCount <= 0) //if (GameManager.DB.InterstitialADCount <= 0)
{ //{
GameManager.ADS.OnCompletedInterstitialAd += OnCompletedInterstitialAd; // GameManager.ADS.OnCompletedInterstitialAd += OnCompletedInterstitialAd;
GameManager.ADS.ShowInterstitialAd(); // GameManager.ADS.ShowInterstitialAd();
} //}
else //else
{ //{
GameManager.Event.InvokeEvent(EEventType.OnStartNormalGame); // GameManager.Event.InvokeEvent(EEventType.OnStartNormalGame);
} //}
GameManager.Event.InvokeEvent(EEventType.OnStartNormalGame);
} }
else else
{ {

View File

@ -696,27 +696,29 @@ public class ResultPopup : PopupBase
private bool CheckShowInterstitialAD() private bool CheckShowInterstitialAD()
{ {
if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE) //if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE)
{ //{
if (GameManager.DB.InterstitialADCount <= 0) // if (GameManager.DB.InterstitialADCount <= 0)
{ // {
// 광고 실행하기 // // 광고 실행하기
GameManager.ADS.ShowInterstitialAd(); // GameManager.ADS.ShowInterstitialAd();
return true; // return true;
} // }
} //}
//return false;
return false; return false;
} }
private void OnCompletedRewardedAd(bool isCompleted, string name) private void OnCompletedRewardedAd(bool isCompleted, string name)
{ {
if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE) //if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE)
{ //{
if (GameManager.DB.InterstitialADCount <= 0) // if (GameManager.DB.InterstitialADCount <= 0)
{ // {
GameManager.DB.ResetInterstitialADCount(); // GameManager.DB.ResetInterstitialADCount();
} // }
} //}
if (name == this.name) if (name == this.name)
{ {