48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class FirstBbugPopup : PopupBase
|
|||
|
|
{
|
|||
|
|
[SerializeField] private TMPro.TextMeshProUGUI tmp;
|
|||
|
|
private long resultGold = 0;
|
|||
|
|
public void SetData(bool isPlayer)
|
|||
|
|
{
|
|||
|
|
resultGold = GamePanel.Instance.Stake * 5;
|
|||
|
|
if (isPlayer)
|
|||
|
|
{
|
|||
|
|
tmp.text = $"ù <20><><EFBFBD>̳<CCB3>!\n+{CodeJay.CodeJayUtility.Converter.MoneyToString(resultGold)} <color=yellow>ȹ<><C8B9></color>!";
|
|||
|
|
GameManager.DB.AddGold(resultGold, this.name);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
tmp.text = $"<22><><EFBFBD>밡 ù <20><><EFBFBD>̳<CCB3>!\n{CodeJay.CodeJayUtility.Converter.MoneyToString(resultGold)} <color=#FD9898><3E><><EFBFBD><EFBFBD></color>!";
|
|||
|
|
GameManager.DB.SubGold(resultGold, this.name);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
GamePanel.Instance.UpdateAIGold();
|
|||
|
|
|
|||
|
|
GameManager.Event.InvokeEvent(EEventType.OnSynchronizeGold);
|
|||
|
|
GameManager.Sound.PlaySFX(ESFXType.Open_Popup);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void ConfirmButton()
|
|||
|
|
{
|
|||
|
|
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
|
|||
|
|
GameManager.UI.HideTopPopup();
|
|||
|
|
|
|||
|
|
if (GamePanel.Instance.IsChallengeMode)
|
|||
|
|
{
|
|||
|
|
if (GameManager.DB.AddCurrentChallengeCondition(resultGold))
|
|||
|
|
{
|
|||
|
|
GameManager.UI.ShowNStackPopup<ResultPopup>(EPopupType.ResultPopup).WinWithFirstBbug(resultGold);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (GameManager.DB.AddNormalGameProgress(resultGold))
|
|||
|
|
{
|
|||
|
|
GameManager.UI.ShowNStackPopup<ResultPopup>(EPopupType.ResultPopup).WinWithFirstBbug(resultGold);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|