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(); } } }