Cute_demon_attacks/meng_yao/Assets/script/A_Fight/charainfoPanel.cs
2024-12-12 17:05:28 +08:00

35 lines
794 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
using System.Threading.Tasks;
using DG.Tweening;
public class charainfoPanel : Base
{
[Header("以上是父类的,以下是自己的:动画面板")]public GameObject _panel;
[Header("关闭按钮")] public Button closeBtn;
[Header("关闭的面板")] public GameObject _closePanel;
public virtual void Start()
{
//await PanelminTobig(_panel);
PanelminTobig(_panel);
closeBtn.onClick.AddListener(() => {
Destroy(_closePanel);
});
}
public virtual void PanelminTobig(GameObject _panel)
{
_panel.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
_panel.transform.DOScale(1f, 0.5f);
}
}