RandomGFGoStop/Assets/Scripts/UI/Popup/AgreeConditionsPopup.cs

53 lines
1.3 KiB
C#
Raw Normal View History

2025-08-27 21:08:17 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AgreeConditionsPopup : PopupBase
{
public enum EAgreeConditionsPopupType
{
Upload,
Download
}
[SerializeField] private EAgreeConditionsPopupType type = EAgreeConditionsPopupType.Upload;
public void InitAgreeConditionsPopup(EAgreeConditionsPopupType type)
{
this.type = type;
}
public void ClickPrivacyPolicyButton()
{
GameManager.UI.ShowNStackPopup(EPopupType.PrivacyPoilcyPopup);
}
public void ClickCloseButton()
{
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
if (GameManager.UI.IsOpendPopup(EPopupType.AgreeConditionsPopup))
GameManager.UI.HideTopPopup();
}
public void ClickAgreedButton()
{
switch (type)
{
case EAgreeConditionsPopupType.Upload:
GameManager.Account.SignInWithUploadSaveData(true);
break;
case EAgreeConditionsPopupType.Download:
GameManager.Account.SignInWithDownloadSaveData();
break;
}
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
if (GameManager.UI.IsOpendPopup(EPopupType.AgreeConditionsPopup))
{
GameManager.UI.HideTopPopup();
}
}
}