From 05c1eca886220a6d6f276a03ca2204cb22daf95b Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Sun, 29 Dec 2024 11:43:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E7=95=8C=E9=9D=A2=E5=BA=94?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meng_yao/Assets/Prefabs/ui/Beat_ZanTing.prefab | 5 +++-- meng_yao/Assets/Prefabs/ui/Challeng_Evictory.prefab | 1 + meng_yao/Assets/script/A_Fight/Beat_ZanTing.cs | 4 +++- .../script/A_Fight/Challeng_Evictory/Challeng_Evictory.cs | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/meng_yao/Assets/Prefabs/ui/Beat_ZanTing.prefab b/meng_yao/Assets/Prefabs/ui/Beat_ZanTing.prefab index 0e167edd..b355165f 100644 --- a/meng_yao/Assets/Prefabs/ui/Beat_ZanTing.prefab +++ b/meng_yao/Assets/Prefabs/ui/Beat_ZanTing.prefab @@ -850,8 +850,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 462.18054, y: -1051.9258} - m_SizeDelta: {x: 0, y: 0} + m_AnchoredPosition: {x: 462.18054, y: -1101.9258} + m_SizeDelta: {x: 725.2872, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &5361498673185763723 MonoBehaviour: @@ -1398,6 +1398,7 @@ MonoBehaviour: sBtn: {fileID: 0} prefab: {fileID: 8208978137248747371, guid: 1e100c9d59699cc4b88606a86dc03688, type: 3} prefabParent: {fileID: 5361498674124843496} + LoadPrefab: {fileID: 6870665346359048685, guid: 6839835fa4bd9ee4082efffc9eccc703, type: 3} --- !u!1 &5361498673881270029 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/Prefabs/ui/Challeng_Evictory.prefab b/meng_yao/Assets/Prefabs/ui/Challeng_Evictory.prefab index 074874f9..fd1ab927 100644 --- a/meng_yao/Assets/Prefabs/ui/Challeng_Evictory.prefab +++ b/meng_yao/Assets/Prefabs/ui/Challeng_Evictory.prefab @@ -1518,6 +1518,7 @@ MonoBehaviour: ClosureObj: {fileID: 1531406980403464475} Victory: {fileID: 6246231775717365985} failur: {fileID: 714296075271660652} + LoadPrefab: {fileID: 6870665346359048685, guid: 6839835fa4bd9ee4082efffc9eccc703, type: 3} retrunBTN: {fileID: 1611523547142466811} --- !u!1 &1660446482787393010 GameObject: diff --git a/meng_yao/Assets/script/A_Fight/Beat_ZanTing.cs b/meng_yao/Assets/script/A_Fight/Beat_ZanTing.cs index 7b36a96c..e803cce4 100644 --- a/meng_yao/Assets/script/A_Fight/Beat_ZanTing.cs +++ b/meng_yao/Assets/script/A_Fight/Beat_ZanTing.cs @@ -10,6 +10,7 @@ public class Beat_ZanTing:BaseUI public GameObject prefab; public GameObject prefabParent; + public GameObject LoadPrefab; private async void Start() { await DamageStatistics(); @@ -25,7 +26,8 @@ public class Beat_ZanTing:BaseUI RegisterButton(BTNs[1], async() => { gameGlobal.GameRecovery(); await ButtonClickAnimationAsync(BTNs[1].gameObject); - SceneManager.LoadScene(1); + //SceneManager.LoadScene(1); + Instantiate(LoadPrefab, GameObject.Find("Canvas").transform).GetComponent().SceneIndex = 1; }); RegisterButton(BTNs[2], async () => { diff --git a/meng_yao/Assets/script/A_Fight/Challeng_Evictory/Challeng_Evictory.cs b/meng_yao/Assets/script/A_Fight/Challeng_Evictory/Challeng_Evictory.cs index eb071ebb..60118997 100644 --- a/meng_yao/Assets/script/A_Fight/Challeng_Evictory/Challeng_Evictory.cs +++ b/meng_yao/Assets/script/A_Fight/Challeng_Evictory/Challeng_Evictory.cs @@ -8,7 +8,7 @@ public class Challeng_Evictory : Base { public GameObject Victory; public GameObject failur; - + public GameObject LoadPrefab; public Button retrunBTN; private void Awake() @@ -17,7 +17,7 @@ public class Challeng_Evictory : Base Victory.SetActive(false); failur.SetActive(false); retrunBTN.onClick.AddListener(() => { - SceneManager.LoadScene(1); + Instantiate(LoadPrefab, GameObject.Find("Canvas").transform).GetComponent().SceneIndex = 1; }); }