2025-08-30 03:09:13 +00:00
|
|
|
|
using BansheeGz.BGDatabase;
|
2025-08-27 21:08:17 +00:00
|
|
|
|
using CodeJay.Enum;
|
|
|
|
|
|
using DG.Tweening;
|
2025-08-30 03:09:13 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using TMPro;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.UI;
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
public class ResultPopup : PopupBase
|
|
|
|
|
|
{
|
2025-08-30 06:48:52 +00:00
|
|
|
|
public ResultxList m_ResultxList;
|
2025-08-30 03:09:13 +00:00
|
|
|
|
public GameObject[] gos_bankrupt; // 0 상대 파산, 1 내가 파산
|
|
|
|
|
|
public GameObject[] gos_result; // 0 승리, 1 패배
|
|
|
|
|
|
public TextMeshProUGUI t_Cal;
|
|
|
|
|
|
[SerializeField] private TextMeshProUGUI GoldTMP;
|
|
|
|
|
|
public TextMeshProUGUI t_enemygold, t_mygold;
|
|
|
|
|
|
|
2025-08-30 07:00:39 +00:00
|
|
|
|
public GameObject go_milgiad;
|
|
|
|
|
|
[SerializeField] private TextMeshProUGUI ButtonlabelTMP; // 밀기 버튼
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
2025-08-30 21:36:37 +00:00
|
|
|
|
[SerializeField] private GameObject[] NormalGameObjects; // 0 다음게임, 1 밀기
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
private CanvasGroup canvasGroup;
|
|
|
|
|
|
|
|
|
|
|
|
private bool _appliedButtonEffect = false;
|
|
|
|
|
|
private bool _gameResult = false;
|
|
|
|
|
|
private long _resultTotalGold = 0;
|
|
|
|
|
|
private bool _isDetail = false;
|
2025-08-30 03:09:13 +00:00
|
|
|
|
List<ResultxInfoData> list_xinfo = new List<ResultxInfoData>
|
|
|
|
|
|
{
|
2025-08-30 21:09:29 +00:00
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.Go, name = "고" },
|
2025-08-30 03:09:13 +00:00
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.Gobak, name = "고박" },
|
2025-09-03 03:33:00 +00:00
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.MeongTeonguri, name = "멍따" },
|
2025-08-30 03:09:13 +00:00
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.Peebak, name = "피박" },
|
|
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.Gwhangbak, name = "광박" },
|
|
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.Shake, name = "흔듦" },
|
|
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.Nagari, name = "나가리" },
|
2025-08-30 21:09:29 +00:00
|
|
|
|
new ResultxInfoData{ type = EScoreMutiplyType.ClickedFromResultPopup, name = "밀기" },
|
2025-08-30 03:09:13 +00:00
|
|
|
|
};
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
2025-08-30 21:09:29 +00:00
|
|
|
|
long enemyBeforeGold;
|
|
|
|
|
|
long myBeforeGold;
|
|
|
|
|
|
|
2025-08-27 21:08:17 +00:00
|
|
|
|
protected override void Awake()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Awake();
|
|
|
|
|
|
canvasGroup = this.GetComponent<CanvasGroup>();
|
|
|
|
|
|
|
|
|
|
|
|
if (GameManager.Instance != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Event.RegistEvent(EEventType.MoveToStore_Heart_DuringGame, this.MoveToStore_Heart_DuringGameCallback);
|
|
|
|
|
|
GameManager.Event.RegistEvent(EEventType.OnReturnToGameFromStore, this.OnReturnToGameFromStoreCallback);
|
|
|
|
|
|
|
|
|
|
|
|
GameManager.ADS.OnCompletedInterstitialAd += OnCompletedInterstitialAd;
|
|
|
|
|
|
GameManager.ADS.OnCompletedRewardedAd += OnCompletedRewardedAd;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnDestroy()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GameManager.Instance != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Event.RemoveEvent(EEventType.MoveToStore_Heart_DuringGame, this.MoveToStore_Heart_DuringGameCallback);
|
|
|
|
|
|
GameManager.Event.RemoveEvent(EEventType.OnReturnToGameFromStore, this.OnReturnToGameFromStoreCallback);
|
|
|
|
|
|
|
|
|
|
|
|
GameManager.ADS.OnCompletedInterstitialAd -= OnCompletedInterstitialAd;
|
|
|
|
|
|
GameManager.ADS.OnCompletedRewardedAd -= OnCompletedRewardedAd;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void MoveToStore_Heart_DuringGameCallback()
|
|
|
|
|
|
{
|
|
|
|
|
|
canvasGroup.alpha = 0;
|
|
|
|
|
|
canvasGroup.blocksRaycasts = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnReturnToGameFromStoreCallback()
|
|
|
|
|
|
{
|
|
|
|
|
|
canvasGroup.alpha = 1;
|
|
|
|
|
|
canvasGroup.blocksRaycasts = true;
|
|
|
|
|
|
canvasGroup.blocksRaycasts = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void SetData(bool gameResult, int fixedScore = 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
_gameResult = gameResult;
|
2025-08-30 03:09:13 +00:00
|
|
|
|
DSUtil.InActivateGameObjects(gos_bankrupt);
|
2025-08-30 21:36:37 +00:00
|
|
|
|
DSUtil.InActivateGameObjects(gos_result, _gameResult ? 0 : 1);
|
|
|
|
|
|
|
2025-08-27 21:08:17 +00:00
|
|
|
|
GoldTMP.enabled = true;
|
2025-08-30 06:48:52 +00:00
|
|
|
|
|
2025-09-10 06:27:02 +00:00
|
|
|
|
ButtonlabelTMP.text = _gameResult ? "밀기<material=NotoSansKR-Regular - BoldOutline 2><color=#ffd544> (2배)</color></material>\r\n<size=35>이번 판 무효" : "밀기<material=NotoSansKR-Regular - BoldOutline 2><color=#ffd544> (4배)</color></material>\r\n<size=35>이번 판 무효";
|
|
|
|
|
|
ButtonlabelTMP.rectTransform.anchoredPosition = _gameResult ? new Vector2(0f, 8f) : new Vector2(19f, 8f);
|
2025-08-30 06:48:52 +00:00
|
|
|
|
list_xinfo.ForEach(f => f.mul = 0); // 초기화
|
2025-08-30 07:00:39 +00:00
|
|
|
|
go_milgiad.SetActive(false);
|
2025-08-30 21:09:29 +00:00
|
|
|
|
enemyBeforeGold = GameManager.DB.GetRemainigNormalGameAIGold();
|
|
|
|
|
|
myBeforeGold = GameManager.DB.Gold;
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
if (gameResult)
|
2025-08-30 06:48:52 +00:00
|
|
|
|
{ // win
|
2025-08-27 21:08:17 +00:00
|
|
|
|
if (fixedScore <= 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int score = GamePanel.Instance.GetTotalScore(true, false);
|
|
|
|
|
|
int goNumer = GamePanel.Instance.Player_Go;
|
|
|
|
|
|
string str = $"{score}점";
|
|
|
|
|
|
int multiply = 0;
|
2025-09-04 23:20:04 +00:00
|
|
|
|
int mission_mul = 0;
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
if (goNumer == 1)
|
|
|
|
|
|
{
|
2025-09-04 23:20:04 +00:00
|
|
|
|
str += " + 1고(1점)";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
score += 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (goNumer == 2)
|
|
|
|
|
|
{
|
2025-09-04 23:20:04 +00:00
|
|
|
|
str += " + 2고(2점)";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
score += 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (goNumer >= 3)
|
|
|
|
|
|
{
|
2025-08-30 21:09:29 +00:00
|
|
|
|
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.Go);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var multipleType = GamePanel.Instance.GetAndUpdateScoreMultiplyType(gameResult);
|
|
|
|
|
|
|
|
|
|
|
|
if (multipleType != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
for (int i = 0; i < multipleType.Count; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (multiply <= 0)
|
|
|
|
|
|
multiply = 1;
|
|
|
|
|
|
|
2025-08-30 06:48:52 +00:00
|
|
|
|
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
if (multipleType[i] == EScoreMutiplyType.Shake)
|
2025-08-30 06:48:52 +00:00
|
|
|
|
val *= GamePanel.Instance.Player_Bell;
|
2025-08-30 21:09:29 +00:00
|
|
|
|
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
|
|
|
|
|
|
val *= GamePanel.Instance.Player_Milgi;
|
|
|
|
|
|
else if (multipleType[i] == EScoreMutiplyType.Go)
|
|
|
|
|
|
val *= goNumer - 2;
|
2025-09-04 23:20:04 +00:00
|
|
|
|
|
|
|
|
|
|
if (multipleType[i] == EScoreMutiplyType.MainMission || multipleType[i] == EScoreMutiplyType.SubMission)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (mission_mul == 0) mission_mul = val;
|
|
|
|
|
|
else mission_mul *= val;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
multiply *= val;
|
|
|
|
|
|
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
|
|
|
|
|
}
|
2025-08-27 21:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-04 23:20:04 +00:00
|
|
|
|
if (multiply > 0 && mission_mul > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
t_Cal.text = str + $" x {multiply}배\nx {mission_mul}배(미션) = 총 {score * multiply * mission_mul}점\n";
|
|
|
|
|
|
_resultTotalGold = score * multiply * mission_mul * GamePanel.Instance.Stake;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (multiply > 0)
|
2025-08-27 21:08:17 +00:00
|
|
|
|
{
|
2025-08-30 21:09:29 +00:00
|
|
|
|
t_Cal.text = str + $" x {multiply}배\n= 총 {score * multiply}점\n";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
_resultTotalGold = score * multiply * GamePanel.Instance.Stake;
|
|
|
|
|
|
}
|
2025-09-04 23:20:04 +00:00
|
|
|
|
else if (mission_mul > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
t_Cal.text = str + $" x {mission_mul}배(미션)\n= 총 {score * mission_mul}점\n";
|
|
|
|
|
|
_resultTotalGold = score * mission_mul * GamePanel.Instance.Stake;
|
|
|
|
|
|
}
|
2025-08-27 21:08:17 +00:00
|
|
|
|
else
|
|
|
|
|
|
{
|
2025-08-30 06:48:52 +00:00
|
|
|
|
t_Cal.text = str + $" \n= 총 {score}점\n";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
_resultTotalGold = score * GamePanel.Instance.Stake;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
2025-09-10 22:30:14 +00:00
|
|
|
|
{ // 총통으로 승리 시
|
|
|
|
|
|
int multiply = 1;
|
|
|
|
|
|
var multipleType = GamePanel.Instance.GetAndUpdateScoreMultiplyType(gameResult);
|
|
|
|
|
|
|
|
|
|
|
|
if (multipleType != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
for (int i = 0; i < multipleType.Count; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
|
|
|
|
|
|
multiply *= val;
|
|
|
|
|
|
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_resultTotalGold = GamePanel.Instance.Stake * fixedScore * multiply;
|
2025-08-30 06:48:52 +00:00
|
|
|
|
t_Cal.text = $"{fixedScore}점 \n= 총 {fixedScore}점\n";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-30 03:09:13 +00:00
|
|
|
|
t_Cal.text += $"x {GamePanel.Instance.Stake}냥";
|
|
|
|
|
|
|
2025-08-27 21:08:17 +00:00
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
2025-08-29 13:01:17 +00:00
|
|
|
|
long reamainingAIMoney = GameManager.DB.GetReaminingTargetCondition(true);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
2025-08-29 13:01:17 +00:00
|
|
|
|
if (GameManager.DB.AddCurrentChallengeCondition(_resultTotalGold, true))
|
2025-08-27 21:08:17 +00:00
|
|
|
|
{
|
|
|
|
|
|
_resultTotalGold = reamainingAIMoney;
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win_2);
|
2025-08-30 03:09:13 +00:00
|
|
|
|
DSUtil.InActivateGameObjects(gos_bankrupt, 0);
|
|
|
|
|
|
gos_bankrupt[0].GetComponent<RectTransform>().DOScale(1f, 1f).From(3f).SetEase(Ease.InExpo);
|
|
|
|
|
|
gos_bankrupt[0].GetComponent<Image>().DOFade(1f, 1f).From(0f).SetEase(Ease.InExpo);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win);
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
long reamainingAIMoney = GameManager.DB.GetRemainigNormalGameAIGold();
|
|
|
|
|
|
|
|
|
|
|
|
if (GameManager.DB.AddNormalGameProgress(_resultTotalGold))
|
|
|
|
|
|
{
|
|
|
|
|
|
_resultTotalGold = reamainingAIMoney;
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win_2);
|
2025-08-30 03:09:13 +00:00
|
|
|
|
DSUtil.InActivateGameObjects(gos_bankrupt, 0);
|
|
|
|
|
|
gos_bankrupt[0].GetComponent<RectTransform>().DOScale(1f, 1f).From(3f).SetEase(Ease.InExpo);
|
|
|
|
|
|
gos_bankrupt[0].GetComponent<Image>().DOFade(1f, 1f).From(0f).SetEase(Ease.InExpo);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(false);
|
|
|
|
|
|
|
|
|
|
|
|
GameManager.DB.AddHeart(1, this.name);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win);
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-10 06:13:53 +00:00
|
|
|
|
GoldTMP.text = "+" + CodeJay.CodeJayUtility.Converter.MoneyToString_withOutline(_resultTotalGold);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
GameManager.DB.AddGold(_resultTotalGold, this.name);
|
|
|
|
|
|
|
|
|
|
|
|
//ForcedMoveButtonGO.SetActive(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
2025-08-30 06:48:52 +00:00
|
|
|
|
{ // lose
|
2025-08-30 07:00:39 +00:00
|
|
|
|
go_milgiad.SetActive(true);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Lose);
|
|
|
|
|
|
|
|
|
|
|
|
if (fixedScore <= 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int score = GamePanel.Instance.GetTotalScore(false, false);
|
|
|
|
|
|
int goNumer = GamePanel.Instance.AI_Go;
|
|
|
|
|
|
int multiply = 0;
|
|
|
|
|
|
string str = $"{score}점";
|
|
|
|
|
|
|
|
|
|
|
|
if (goNumer == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
str += " + 1고(1점) ";
|
|
|
|
|
|
score += 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (goNumer == 2)
|
|
|
|
|
|
{
|
|
|
|
|
|
str += " + 2고(2점) ";
|
|
|
|
|
|
score += 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (goNumer >= 3)
|
|
|
|
|
|
{
|
2025-08-30 21:09:29 +00:00
|
|
|
|
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.Go);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var multipleType = GamePanel.Instance.GetAndUpdateScoreMultiplyType(gameResult);
|
|
|
|
|
|
|
|
|
|
|
|
if (multipleType != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
for (int i = 0; i < multipleType.Count; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (multiply <= 0)
|
|
|
|
|
|
multiply = 1;
|
|
|
|
|
|
|
2025-08-30 06:48:52 +00:00
|
|
|
|
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
if (multipleType[i] == EScoreMutiplyType.Shake)
|
2025-09-04 23:20:04 +00:00
|
|
|
|
val *= GamePanel.Instance.AI_Bell;
|
2025-08-30 21:09:29 +00:00
|
|
|
|
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
|
|
|
|
|
|
val *= GamePanel.Instance.Player_Milgi;
|
|
|
|
|
|
else if (multipleType[i] == EScoreMutiplyType.Go)
|
|
|
|
|
|
val *= goNumer - 2;
|
2025-08-30 06:48:52 +00:00
|
|
|
|
multiply *= val;
|
2025-09-04 23:20:04 +00:00
|
|
|
|
|
|
|
|
|
|
if (multipleType[i] == EScoreMutiplyType.MainMission || multipleType[i] == EScoreMutiplyType.SubMission) { }
|
|
|
|
|
|
else list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
2025-08-27 21:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (multiply > 0)
|
|
|
|
|
|
{
|
2025-09-01 07:07:58 +00:00
|
|
|
|
t_Cal.text = str + $" x {multiply}배\n= 총 {score * multiply}점\n";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
_resultTotalGold = score * multiply * GamePanel.Instance.Stake;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2025-09-01 07:07:58 +00:00
|
|
|
|
t_Cal.text = str + $"\n= 총 {score}점\n";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
_resultTotalGold = score * GamePanel.Instance.Stake;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
_resultTotalGold = GamePanel.Instance.Stake * fixedScore;
|
2025-09-01 07:07:58 +00:00
|
|
|
|
t_Cal.text = $"{fixedScore}점\n= 총 {fixedScore}점\n";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-31 21:07:59 +00:00
|
|
|
|
t_Cal.text += $"x {GamePanel.Instance.Stake}냥";
|
|
|
|
|
|
|
2025-09-10 06:13:53 +00:00
|
|
|
|
GoldTMP.text = "-" + CodeJay.CodeJayUtility.Converter.MoneyToString_withOutline(_resultTotalGold);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
GameManager.DB.SubGold(_resultTotalGold, this.name);
|
|
|
|
|
|
GameManager.DB.AddGoldToAI(GamePanel.Instance.IsChallengeMode, _resultTotalGold);
|
|
|
|
|
|
|
|
|
|
|
|
if (GameManager.DB.Gold <= 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.ReserveSFX(ESFXType.Stamp, 0.6f);
|
2025-08-30 03:09:13 +00:00
|
|
|
|
DSUtil.InActivateGameObjects(gos_bankrupt, 1);
|
|
|
|
|
|
gos_bankrupt[1].GetComponent<RectTransform>().DOScale(1f, 1f).From(3f).SetEase(Ease.InExpo);
|
|
|
|
|
|
gos_bankrupt[1].GetComponent<Image>().DOFade(1f, 1f).From(0f).SetEase(Ease.InExpo);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-30 06:48:52 +00:00
|
|
|
|
m_ResultxList.Set(list_xinfo);
|
|
|
|
|
|
t_enemygold.text = gos_bankrupt[0].activeSelf ? "0냥" : CodeJay.CodeJayUtility.Converter.MoneyToString(GameManager.DB.GetRemainigNormalGameAIGold());
|
2025-08-30 03:09:13 +00:00
|
|
|
|
t_mygold.text = CodeJay.CodeJayUtility.Converter.MoneyToString(GameManager.DB.Gold);
|
2025-09-10 08:41:08 +00:00
|
|
|
|
if (GamePanel.Instance.Player_Milgi > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
GamePanel.Instance.Player_Milgi = 0;
|
|
|
|
|
|
NormalGameObjects[1].SetActive(false);
|
|
|
|
|
|
}
|
2025-08-30 03:09:13 +00:00
|
|
|
|
|
2025-08-27 21:08:17 +00:00
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnSynchronizeGold);
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnGameEnd);
|
|
|
|
|
|
GameManager.DB.SaveDatas();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void WinWithFirstBbug(long resultGold)
|
|
|
|
|
|
{
|
2025-08-30 21:09:29 +00:00
|
|
|
|
_gameResult = true;
|
|
|
|
|
|
ButtonlabelTMP.text = _gameResult ? "밀기 4배\n<size=35>이번 판 무효" : "밀기 2배\n<size=35>이번 판 무효";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
GoldTMP.enabled = true;
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win);
|
|
|
|
|
|
|
2025-08-30 03:09:13 +00:00
|
|
|
|
DSUtil.InActivateGameObjects(gos_result, 0);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
2025-08-30 21:09:29 +00:00
|
|
|
|
list_xinfo.ForEach(f => f.mul = 0); // 초기화
|
|
|
|
|
|
var multipleType = GamePanel.Instance.GetAndUpdateScoreMultiplyType(_gameResult);
|
|
|
|
|
|
int multiply = 0;
|
|
|
|
|
|
if (multipleType != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
for (int i = 0; i < multipleType.Count; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (multiply <= 0)
|
|
|
|
|
|
multiply = 1;
|
|
|
|
|
|
|
|
|
|
|
|
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
|
|
|
|
|
|
if (multipleType[i] == EScoreMutiplyType.Shake)
|
|
|
|
|
|
val *= GamePanel.Instance.Player_Bell;
|
|
|
|
|
|
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
|
|
|
|
|
|
val *= GamePanel.Instance.Player_Milgi;
|
|
|
|
|
|
multiply *= val;
|
|
|
|
|
|
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
go_milgiad.SetActive(false);
|
|
|
|
|
|
var lastPoint = 7 * (multiply > 1 ? multiply : 1);
|
|
|
|
|
|
_resultTotalGold = resultGold * (multiply > 1 ? multiply : 1);
|
|
|
|
|
|
|
|
|
|
|
|
if (multiply > 1)
|
|
|
|
|
|
t_Cal.text = $"7점 x {multiply}배\n= 총 {lastPoint}점\nx {GamePanel.Instance.Stake}냥";
|
|
|
|
|
|
else
|
|
|
|
|
|
t_Cal.text = $"{lastPoint}점\n= 총 {lastPoint}점\nx {GamePanel.Instance.Stake}냥";
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
2025-09-10 06:13:53 +00:00
|
|
|
|
GoldTMP.text = "+" + CodeJay.CodeJayUtility.Converter.MoneyToString_withOutline(_resultTotalGold);
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
2025-08-29 13:01:17 +00:00
|
|
|
|
if (GameManager.DB.AddCurrentChallengeCondition(_resultTotalGold, true))
|
2025-08-27 21:08:17 +00:00
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win_2);
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win);
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GameManager.DB.AddNormalGameProgress(_resultTotalGold))
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win_2);
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Win);
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < NormalGameObjects.Length; i++)
|
|
|
|
|
|
NormalGameObjects[i].SetActive(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-30 21:09:29 +00:00
|
|
|
|
m_ResultxList.Set(list_xinfo);
|
|
|
|
|
|
DSUtil.InActivateGameObjects(gos_bankrupt, 0);
|
|
|
|
|
|
gos_bankrupt[0].GetComponent<RectTransform>().DOScale(1f, 1f).From(3f).SetEase(Ease.InExpo);
|
|
|
|
|
|
gos_bankrupt[0].GetComponent<Image>().DOFade(1f, 1f).From(0f).SetEase(Ease.InExpo);
|
|
|
|
|
|
t_enemygold.text = "0냥";
|
|
|
|
|
|
t_mygold.text = CodeJay.CodeJayUtility.Converter.MoneyToString(GameManager.DB.Gold);
|
2025-09-10 08:41:08 +00:00
|
|
|
|
if (GamePanel.Instance.Player_Milgi > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
GamePanel.Instance.Player_Milgi = 0;
|
|
|
|
|
|
NormalGameObjects[1].SetActive(false);
|
|
|
|
|
|
}
|
2025-08-30 21:09:29 +00:00
|
|
|
|
|
2025-08-27 21:08:17 +00:00
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnSynchronizeGold);
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnGameEnd);
|
|
|
|
|
|
GameManager.DB.SaveDatas();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-30 21:09:29 +00:00
|
|
|
|
public void ClickShop()
|
|
|
|
|
|
{
|
2025-08-31 21:07:59 +00:00
|
|
|
|
GamePanel.Instance.Player_Milgi = 0;
|
2025-08-30 21:09:29 +00:00
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
2025-09-01 07:07:58 +00:00
|
|
|
|
CanvasControl.Ins.Go_Shop();
|
2025-08-30 21:09:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ClickMilgi()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!_gameResult)
|
|
|
|
|
|
GameManager.ADS.ShowInterstitialAd(Set_Milgi);
|
|
|
|
|
|
else
|
|
|
|
|
|
Set_Milgi();
|
|
|
|
|
|
}
|
|
|
|
|
|
void Set_Milgi()
|
|
|
|
|
|
{
|
|
|
|
|
|
var curgold = GameManager.DB.GetRemainigNormalGameAIGold();
|
|
|
|
|
|
GameManager.DB.AddGoldToAI(false, _gameResult ? enemyBeforeGold - curgold : curgold - enemyBeforeGold);
|
|
|
|
|
|
var mygold = GameManager.DB.Gold;
|
|
|
|
|
|
GameManager.DB.AddGold(_gameResult ? -(mygold - myBeforeGold) : -(myBeforeGold - mygold), name);
|
|
|
|
|
|
GameManager.DB.SaveDatas();
|
|
|
|
|
|
|
|
|
|
|
|
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.ClickedFromResultPopup);
|
|
|
|
|
|
GamePanel.Instance.Player_Milgi = _gameResult ? 1 : 2;
|
|
|
|
|
|
ClickNextGame();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-27 21:08:17 +00:00
|
|
|
|
public void ClickHome()
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnReturnToHunting);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnReturnToHome);
|
|
|
|
|
|
}
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
2025-08-30 21:09:29 +00:00
|
|
|
|
GamePanel.Instance.Player_Milgi = 0;
|
2025-09-01 07:07:58 +00:00
|
|
|
|
CanvasControl.Ins.Go_Main();
|
2025-08-27 21:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ClickNext()
|
|
|
|
|
|
{
|
2025-08-30 21:09:29 +00:00
|
|
|
|
GamePanel.Instance.Player_Milgi = 0;
|
2025-08-27 21:08:17 +00:00
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
|
|
|
|
|
BGId huntingDataID = GameManager.BGDatabase.GetLastUnolockHuntingDataID();
|
|
|
|
|
|
BGId huntingListDataID = GameManager.BGDatabase.GetLastUnolockHuntingListDataID();
|
|
|
|
|
|
if (huntingDataID != BGId.Empty && huntingListDataID != BGId.Empty)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnReturnToHunting);
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnClickFullView, huntingDataID, huntingListDataID);
|
|
|
|
|
|
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*if (GameManager.DB.Heart > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.DB.SubHeart(1);
|
|
|
|
|
|
GameManager.DB.SaveDatas();
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
GamePanel.Instance.StartNextGame();
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.UI.ShowNStackPopup(EPopupType.HeartChargePopup);
|
|
|
|
|
|
}*/
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
GamePanel.Instance.StartNextGame();
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ClickNextGame()
|
|
|
|
|
|
{
|
|
|
|
|
|
// Show Ad
|
|
|
|
|
|
if (CheckShowInterstitialAD())
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GameManager.DB.Heart > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.DB.SubHeart(1, this.name);
|
|
|
|
|
|
GameManager.DB.SaveDatas();
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
GamePanel.Instance.StartNextGame();
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.UI.ShowNStackPopup(EPopupType.HeartChargePopup);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
GamePanel.Instance.StartNextGame();
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ClickHeart()
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
|
|
|
|
|
|
if (_appliedButtonEffect)
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
// 두배
|
|
|
|
|
|
if (_gameResult)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GameManager.DB.Heart > 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
_appliedButtonEffect = true;
|
|
|
|
|
|
GameManager.DB.SubHeart(1, this.name);
|
|
|
|
|
|
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.ClickedFromResultPopup);
|
|
|
|
|
|
|
|
|
|
|
|
this.ClickNextGame();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.UI.ShowNStackPopup(EPopupType.DoubleHeartWarningPopup);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GameManager.DB.Heart > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
_appliedButtonEffect = true;
|
|
|
|
|
|
GameManager.DB.SubHeart(1, this.name);
|
|
|
|
|
|
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.ClickedFromResultPopup);
|
|
|
|
|
|
|
|
|
|
|
|
this.ClickNextGame();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.UI.ShowNStackPopup(EPopupType.HeartChargePopup);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else // 무효
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GameManager.DB.Heart > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.DB.AddGold(_resultTotalGold, this.name);
|
|
|
|
|
|
GameManager.DB.SubHeart(1, this.name);
|
|
|
|
|
|
_appliedButtonEffect = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.UI.ShowNStackPopup(EPopupType.HeartChargePopup);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ClickAdButton()
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
|
|
|
|
|
|
if (_appliedButtonEffect)
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GameManager.DB.Heart <= 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.UI.ShowNStackPopup(EPopupType.HeartChargePopup);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.ADS.ShowResultRewardedAd(this.name);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.ADS.ShowResultRewardedAd(this.name);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void AdCallback(bool result)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (result)
|
|
|
|
|
|
{
|
|
|
|
|
|
_appliedButtonEffect = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (_gameResult)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.DB.SubHeart(1, this.name);
|
|
|
|
|
|
GameManager.DB.SaveDatas();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.ClickedFromResultPopup);
|
|
|
|
|
|
|
|
|
|
|
|
GamePanel.Instance.StartNextGame();
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.DB.AddGold(_resultTotalGold, this.name);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void DetailToggle()
|
|
|
|
|
|
{
|
|
|
|
|
|
_isDetail = !_isDetail;
|
|
|
|
|
|
|
|
|
|
|
|
if (_isDetail)
|
|
|
|
|
|
{
|
|
|
|
|
|
GoldTMP.enabled = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GoldTMP.enabled = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ClickNextLevel()
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
|
|
|
|
|
|
// Show Ad
|
|
|
|
|
|
if (CheckShowInterstitialAD())
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// <20>ӽ÷<D3BD> <20>ٷ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
this.ClickNextLevelCallback(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void ClickNextLevelCallback(bool result)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (result)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.ClickNext();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ClickForcedMoveToHome()
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnReturnToHunting);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.Event.InvokeEvent(EEventType.OnReturnToHome);
|
|
|
|
|
|
}
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool CheckShowInterstitialAD()
|
|
|
|
|
|
{
|
2025-09-05 22:02:33 +00:00
|
|
|
|
//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;
|
|
|
|
|
|
|
2025-08-27 21:08:17 +00:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnCompletedRewardedAd(bool isCompleted, string name)
|
|
|
|
|
|
{
|
2025-09-05 22:02:33 +00:00
|
|
|
|
//if (GamePanel.Instance.IsChallengeMode == false && GameManager.DB.InterstitialADCount <= CodeJay.Defines.Constants.INTERSTITIAL_AD_CYCLE)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// if (GameManager.DB.InterstitialADCount <= 0)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// GameManager.DB.ResetInterstitialADCount();
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
2025-08-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
if (name == this.name)
|
|
|
|
|
|
{
|
|
|
|
|
|
AdCallback(isCompleted);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnCompletedInterstitialAd(bool isCompleted)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(isCompleted == true || GameManager.DB.IsRemoveADS == true)
|
|
|
|
|
|
{
|
|
|
|
|
|
GameManager.DB.ResetInterstitialADCount();
|
|
|
|
|
|
|
|
|
|
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|
|
|
|
|
GamePanel.Instance.StartNextGame();
|
|
|
|
|
|
GameManager.UI.HideTopPopup();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-08-30 03:09:13 +00:00
|
|
|
|
|
|
|
|
|
|
public class ResultxInfoData
|
|
|
|
|
|
{
|
|
|
|
|
|
public EScoreMutiplyType type;
|
|
|
|
|
|
public string name;
|
|
|
|
|
|
public int mul = 0;
|
|
|
|
|
|
}
|