diff --git a/TheStrongestSnail/Assets/Scenes/Scene_main.unity b/TheStrongestSnail/Assets/Scenes/Scene_main.unity index 97fc985..81fc041 100644 --- a/TheStrongestSnail/Assets/Scenes/Scene_main.unity +++ b/TheStrongestSnail/Assets/Scenes/Scene_main.unity @@ -2585,6 +2585,25 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fa9fccadda7b7ac43b24c43fa954dcce, type: 3} m_Name: m_EditorClassIdentifier: + retbutton: {fileID: 0} + ClosureObj: {fileID: 0} + canvas: {fileID: 0} + BTN1: {fileID: 265683442} + BTN2: {fileID: 11612200} + BTN3: {fileID: 888752578} + BTN4: {fileID: 2016989869} + panel1: {fileID: 0} + panel2: {fileID: 0} + panel3: {fileID: 0} + panel4: {fileID: 0} + BTN5: {fileID: 625117603} + BTN6: {fileID: 1310545176} + BTN7: {fileID: 1901054682} + BTN8: {fileID: 476418689} + panel5: {fileID: 0} + panel6: {fileID: 0} + panel7: {fileID: 0} + panel8: {fileID: 0} mainPanel: {fileID: 1769459763} BTN_0: {fileID: 1906759230} BTN_1: {fileID: 934652041} diff --git a/TheStrongestSnail/Assets/Scripts/Scene_main/mainBTN.cs b/TheStrongestSnail/Assets/Scripts/Scene_main/mainBTN.cs index dc6fb48..f799d4b 100644 --- a/TheStrongestSnail/Assets/Scripts/Scene_main/mainBTN.cs +++ b/TheStrongestSnail/Assets/Scripts/Scene_main/mainBTN.cs @@ -6,8 +6,20 @@ using DG.Tweening; //MD FUCK Everthing //史山,别学 -public class mainBTN : MonoBehaviour +public class mainBTN :main_game { + [Header("在父类的基础上添加的")] + public Button BTN5; + public Button BTN6; + public Button BTN7; + public Button BTN8; + [Header("需要一一对应")] + public GameObject panel5; + public GameObject panel6; + public GameObject panel7; + public GameObject panel8; + + [Header("下面是本脚本的")] public GameObject mainPanel; private RectTransform mainPanelRect; @@ -20,9 +32,15 @@ public class mainBTN : MonoBehaviour public GameObject BTN_1_1; public GameObject BTN_2_2; public GameObject BTN_3_3; + + + + // Start is called before the first frame update - void Start() + public override void Start() { + base.Start(); + // 确保mainPanel不为空 if (mainPanel == null) { @@ -37,6 +55,21 @@ public class mainBTN : MonoBehaviour BTN_1.GetComponent