From df071429d97e70e8f0f724ebc477a42600a4bbec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=94=E6=9D=A1=E6=82=9F?= <1838407198@qq.com> Date: Wed, 13 Nov 2024 10:45:46 +0800 Subject: [PATCH 1/2] 1 --- TheStrongestSnail/Assets/Scenes/logo.unity | 2 +- .../AlibabaPuHuiTi-3-55-Regular SDF.asset | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TheStrongestSnail/Assets/Scenes/logo.unity b/TheStrongestSnail/Assets/Scenes/logo.unity index 2f714e2..1acefe6 100644 --- a/TheStrongestSnail/Assets/Scenes/logo.unity +++ b/TheStrongestSnail/Assets/Scenes/logo.unity @@ -4627,7 +4627,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1789203778} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8ee1a43c8ad7f8c41bad48013bf5af49, type: 3} m_Name: diff --git a/TheStrongestSnail/Assets/font_textmeshpro/AlibabaPuHuiTi-3-55-Regular/AlibabaPuHuiTi-3-55-Regular SDF.asset b/TheStrongestSnail/Assets/font_textmeshpro/AlibabaPuHuiTi-3-55-Regular/AlibabaPuHuiTi-3-55-Regular SDF.asset index 471d313..149b176 100644 --- a/TheStrongestSnail/Assets/font_textmeshpro/AlibabaPuHuiTi-3-55-Regular/AlibabaPuHuiTi-3-55-Regular SDF.asset +++ b/TheStrongestSnail/Assets/font_textmeshpro/AlibabaPuHuiTi-3-55-Regular/AlibabaPuHuiTi-3-55-Regular SDF.asset @@ -941,7 +941,7 @@ Material: - _OutlineSoftness: 0 - _OutlineUVSpeedX: 0 - _OutlineUVSpeedY: 0 - - _OutlineWidth: 0.2 + - _OutlineWidth: 0.15 - _PerspectiveFilter: 0.875 - _Reflectivity: 10 - _ScaleRatioA: 0.9677419 From 2c4098fe2eb7f7c86bfe80a62c4c544b3959076f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=94=E6=9D=A1=E6=82=9F?= <1838407198@qq.com> Date: Wed, 13 Nov 2024 12:06:05 +0800 Subject: [PATCH 2/2] add --- TheStrongestSnail/Assets/Scenes/Battle_Royale.unity | 13 +++++++++++++ .../Assets/Scripts/Battle_Royale/HegemonTime.cs | 10 +++++++--- .../Assets/Scripts/Battle_Royale/Test.cs | 9 ++++++++- .../Assets/Scripts/Login/selectGameEscape512.cs | 10 +++++++--- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity b/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity index ba3e8ff..2c69e6e 100644 --- a/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity +++ b/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity @@ -9392,6 +9392,7 @@ GameObject: - component: {fileID: 2127674356} - component: {fileID: 2127674357} - component: {fileID: 2127674358} + - component: {fileID: 2127674359} m_Layer: 5 m_Name: GameObject m_TagString: Untagged @@ -9444,6 +9445,18 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8ee1a43c8ad7f8c41bad48013bf5af49, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &2127674359 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2127674355} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7936430f01cc8343a1e62fc2052a12b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &2135586305 GameObject: m_ObjectHideFlags: 0 diff --git a/TheStrongestSnail/Assets/Scripts/Battle_Royale/HegemonTime.cs b/TheStrongestSnail/Assets/Scripts/Battle_Royale/HegemonTime.cs index dadbf91..3165d38 100644 --- a/TheStrongestSnail/Assets/Scripts/Battle_Royale/HegemonTime.cs +++ b/TheStrongestSnail/Assets/Scripts/Battle_Royale/HegemonTime.cs @@ -8,12 +8,16 @@ public class HegemonTime : MonoBehaviour public static HegemonTime instance; public Text timeText; public int timeNum; + public int carrySeconds; + // Start is called before the first frame update void Start() { instance = this; - timeNum = 10; + timeNum = 60; StartCoroutine(StartGame()); + + } private void Update() @@ -24,11 +28,11 @@ public class HegemonTime : MonoBehaviour { while (timeNum >=0) { - timeText.text = timeNum.ToString(); // 显示整数秒数 + timeText.text = (timeNum-carrySeconds).ToString(); // 显示整数秒数 yield return new WaitForSeconds(1f); // 等待1秒 timeNum -= 1; } - timeNum = 10; + timeNum = 60; Debug.Log("Boos来了"); BossContro.instance.BossMove(); } diff --git a/TheStrongestSnail/Assets/Scripts/Battle_Royale/Test.cs b/TheStrongestSnail/Assets/Scripts/Battle_Royale/Test.cs index 4668bb5..93fad17 100644 --- a/TheStrongestSnail/Assets/Scripts/Battle_Royale/Test.cs +++ b/TheStrongestSnail/Assets/Scripts/Battle_Royale/Test.cs @@ -4,7 +4,9 @@ using UnityEngine; public class Test : MonoBehaviour { + public UpdateUserInfo updateUserInfo; + public int sec; // Start is called before the first frame update void Start() { @@ -21,9 +23,14 @@ public class Test : MonoBehaviour public async void TestButton() { if(Input.GetKey(KeyCode.X)) - { + { + sec = selectGameEscape512.instance.carrySeconds; + Debug.Log("nnnnnnnnnnnnnnnn"+sec); + + await updateUserInfo.UpdateUserInformation(); Debug.Log(updateUserInfo.UpdateUserInformation()); + } } } diff --git a/TheStrongestSnail/Assets/Scripts/Login/selectGameEscape512.cs b/TheStrongestSnail/Assets/Scripts/Login/selectGameEscape512.cs index 379e02f..11c72ff 100644 --- a/TheStrongestSnail/Assets/Scripts/Login/selectGameEscape512.cs +++ b/TheStrongestSnail/Assets/Scripts/Login/selectGameEscape512.cs @@ -7,14 +7,18 @@ using System.Threading.Tasks; public class selectGameEscape512 : MonoBehaviour { - private int gameEscapeId; - + public static selectGameEscape512 instance; + public int gameEscapeId; + public int carrySeconds; // 定义一个事件,当 gameEscapeId 被更新时触发 public static event Action OnGameEscapeIdUpdated; + void Start() { + instance=this; + // 由于除登录注册外的其他方法,都需要登录后返回的token // 因此登录不在此发送请求(同时) // 采用监听和事件回调的方法,只有监听到登录和token返回时,才运行其他方法 @@ -71,7 +75,7 @@ public class selectGameEscape512 : MonoBehaviour { gameEscapeId = response.data.gameEscapeModel.id; //Debug.Log("解析成功,id为: " + gameEscapeId); - + carrySeconds= response.data.carrySeconds; // 触发事件,通知所有订阅者 OnGameEscapeIdUpdated?.Invoke(gameEscapeId); }