using System;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
public class FavoritePanelUI : MonoBehaviour
|
{
|
// Start is called before the first frame update
|
void Start()
|
{
|
transform.Find("YesBtn").GetComponent<Button>().onClick.AddListener(OnClickYesBtn);
|
transform.Find("NoBtn").GetComponent<Button>().onClick.AddListener(OnClickNoBtn);
|
|
}
|
|
private Action myAC;
|
public void SetAC(Action ac)
|
{
|
myAC = ac;
|
}
|
|
private void OnClickYesBtn()
|
{
|
TDAA_SDKManager.Ins.OnClickPVPBtn();
|
Close();
|
}
|
private void OnClickNoBtn()
|
{
|
Close();
|
}
|
|
private void Close()
|
{
|
PlayerPrefs.SetInt("GemBattleFavorite", 1);
|
if(myAC!=null){
|
myAC();
|
}
|
Destroy(gameObject);
|
}
|
|
|
|
}
|