powerfun-unity/Assets/Scripts/UI/Prefab/SettingContoller.cs

47 lines
989 B
C#
Raw Normal View History

using DG.Tweening;
using System.Collections;
2021-04-15 15:58:37 +08:00
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
2021-04-15 15:58:37 +08:00
public class SettingContoller : PFUIPanel
{
// Start is called before the first frame update
Transform exit;
protected override void Awake()
{
exit = transform.Find("Main").Find("Exit");
if (exit != null)
{
//exit.GetComponent<Button>().onClick.AddListener(()=>
//{
// Close();
//});
UIManager.AddEvent(exit.gameObject, EventTriggerType.PointerClick, (e) =>
2021-04-15 15:58:37 +08:00
{
Close();
});
}
}
protected override void Start()
2021-04-15 15:58:37 +08:00
{
}
// Update is called once per frame
void Update()
{
}
public override void Show()
{
var cg = this.GetComponent<CanvasGroup>();
cg.alpha = 0;
base.Show();
cg.DOFade(1f, 0.3f);
}
2021-04-15 15:58:37 +08:00
}