using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class failurePanel : MonoBehaviour { [Header("关闭的面板")] public GameObject panel; [Header("closeBTN")] public Button close; [Header("伤害统计")] public GameObject shanghai; [Header("脚本")] public shanghai shanghaiJiaobeng; // Start is called before the first frame update private void Awake() { //shanghaiJiaobeng = shanghai.GetComponent(); } void Start() { close.onClick.AddListener(() => { Destroy(panel.gameObject); }); } public void SetShangHaiItem(Sprite _sprite, string shanghai, string number) { shanghaiJiaobeng.initInfo(_sprite, shanghai, number); } }