광고 제거 및 미션 모두 완료 시 하트 지급
This commit is contained in:
parent
af8c4c88bd
commit
5be903eefd
|
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,16 +129,17 @@ 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
|
||||||
{
|
{
|
||||||
GameManager.UI.ShowNStackPopup(EPopupType.GoldChargePopup);
|
GameManager.UI.ShowNStackPopup(EPopupType.GoldChargePopup);
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue