광고 제거 및 미션 모두 완료 시 하트 지급
This commit is contained in:
parent
af8c4c88bd
commit
5be903eefd
|
|
@ -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<MissionSuccessPopup>(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue