killapp/Assets/Scripts/UI/Pages/Login/SubPages/PrivacyTipPanel.cs
2026-04-16 14:57:19 +08:00

36 lines
1.0 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Kill.UI.Pages;
using UnityEngine;
using UnityEngine.UI;
public class PrivacyTipPanel : MonoBehaviour
{
public Button showPrivacyAgreementBtn;
public Button closeBtn;
public Button agreeAndContinueBtn;
public void Init(Action onAgreementClick)
{
if (showPrivacyAgreementBtn != null)
{
showPrivacyAgreementBtn.onClick.RemoveAllListeners();
showPrivacyAgreementBtn.onClick.AddListener(() => LoginPageCtrl.Instance.ShowPrivacyAgreementPlane());
}
if (closeBtn != null)
{
closeBtn.onClick.RemoveAllListeners();
closeBtn.onClick.AddListener(() => gameObject.SetActive(false));
}
if (agreeAndContinueBtn != null)
{
agreeAndContinueBtn.onClick.RemoveAllListeners();
agreeAndContinueBtn.onClick.AddListener(() =>{
onAgreementClick?.Invoke();
gameObject.SetActive(false);
});
}
}
}