2024-12-10 09:14:54 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
public class DownPanel : Base
|
|
|
|
{
|
|
|
|
public List<Button> btns = new List<Button>();
|
2024-12-13 05:40:51 +08:00
|
|
|
public List<GameObject> PanelList=new List<GameObject>();
|
|
|
|
|
|
|
|
public GameObject canvse;
|
2024-12-28 16:24:08 +08:00
|
|
|
|
|
|
|
public StaminaBar _staminaBar;
|
2024-12-10 09:14:54 +08:00
|
|
|
// Start is called before the first frame update
|
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
btns[0].onClick.AddListener(async() => {
|
2024-12-29 23:34:20 +08:00
|
|
|
btns[0].enabled = false;
|
|
|
|
Invoke("RecoverBtn",2f);
|
2024-12-10 09:14:54 +08:00
|
|
|
await ButtonClickAnimationAsync(btns[0].gameObject);
|
2024-12-28 16:24:08 +08:00
|
|
|
GameObject.Instantiate(PanelList[0], canvse.transform).GetComponent<Battle_Selection>()._staminaBar=this._staminaBar;
|
2024-12-29 23:34:20 +08:00
|
|
|
|
2024-12-10 09:14:54 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-12-29 23:34:20 +08:00
|
|
|
void RecoverBtn()
|
|
|
|
{
|
|
|
|
btns[0].enabled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-12-10 09:14:54 +08:00
|
|
|
}
|