using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using DG.Tweening; using TMPro; //MD FUCK Everthing //史山,别学 public class mainBTN :main_game { [Header("在父类的基础上添加的")] public Button BTN5; public Button BTN6; public Button BTN7; public Button BTN8; [Header("playerInfo")] public Button BTN9; public Button BTN10; public Button BTN11; [Header("需要一一对应")] public GameObject panel5; public GameObject panel6; public GameObject panel7; public GameObject panel8; [Header("playerInfo")] public GameObject panel9; public GameObject panel10; public GameObject panel11; [Header("下面是本脚本的")] public GameObject mainPanel; private RectTransform mainPanelRect; public GameObject BTN_0; public GameObject BTN_1; public GameObject BTN_2; public GameObject BTN_3; [Header("BTN的父节点")] public GameObject BTNBox; [Header("下面是显示部分")] public Image playerIcon; public Text playerName; public Text playerWoKeNumber; public Text playerWoDanNumber; private float startPosY; private float clickPosY; // Start is called before the first frame update public override void Start() { base.Start(); // 确保mainPanel不为空 if (mainPanel == null) { Debug.LogError("mainPanel is not assigned!"); return; } mainPanelRect = mainPanel.GetComponent(); // 添加按钮点击事件 BTN_0.GetComponent