This commit is contained in:
GL 2024-11-13 12:07:15 +08:00
commit 7b466a0987
5 changed files with 24 additions and 9 deletions

View File

@ -4627,7 +4627,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1789203778} m_GameObject: {fileID: 1789203778}
m_Enabled: 0 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8ee1a43c8ad7f8c41bad48013bf5af49, type: 3} m_Script: {fileID: 11500000, guid: 8ee1a43c8ad7f8c41bad48013bf5af49, type: 3}
m_Name: m_Name:

View File

@ -8,12 +8,16 @@ public class HegemonTime : MonoBehaviour
public static HegemonTime instance; public static HegemonTime instance;
public Text timeText; public Text timeText;
public int timeNum; public int timeNum;
public int carrySeconds;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
instance = this; instance = this;
timeNum = 10; timeNum = 60;
StartCoroutine(StartGame()); StartCoroutine(StartGame());
} }
private void Update() private void Update()
@ -24,11 +28,11 @@ public class HegemonTime : MonoBehaviour
{ {
while (timeNum >=0) while (timeNum >=0)
{ {
timeText.text = timeNum.ToString(); // 显示整数秒数 timeText.text = (timeNum-carrySeconds).ToString(); // 显示整数秒数
yield return new WaitForSeconds(1f); // µÈ´ý1Ãë yield return new WaitForSeconds(1f); // µÈ´ý1Ãë
timeNum -= 1; timeNum -= 1;
} }
timeNum = 10; timeNum = 60;
Debug.Log("BoosÀ´ÁË"); Debug.Log("BoosÀ´ÁË");
BossContro.instance.BossMove(); BossContro.instance.BossMove();
} }

View File

@ -4,7 +4,9 @@ using UnityEngine;
public class Test : MonoBehaviour public class Test : MonoBehaviour
{ {
public UpdateUserInfo updateUserInfo; public UpdateUserInfo updateUserInfo;
public int sec;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
@ -21,9 +23,14 @@ public class Test : MonoBehaviour
public async void TestButton() public async void TestButton()
{ {
if(Input.GetKey(KeyCode.X)) if(Input.GetKey(KeyCode.X))
{ {
sec = selectGameEscape512.instance.carrySeconds;
Debug.Log("nnnnnnnnnnnnnnnn"+sec);
await updateUserInfo.UpdateUserInformation(); await updateUserInfo.UpdateUserInformation();
Debug.Log(updateUserInfo.UpdateUserInformation()); Debug.Log(updateUserInfo.UpdateUserInformation());
} }
} }
} }

View File

@ -7,14 +7,18 @@ using System.Threading.Tasks;
public class selectGameEscape512 : MonoBehaviour public class selectGameEscape512 : MonoBehaviour
{ {
private int gameEscapeId; public static selectGameEscape512 instance;
public int gameEscapeId;
public int carrySeconds;
// 定义一个事件,当 gameEscapeId 被更新时触发 // 定义一个事件,当 gameEscapeId 被更新时触发
public static event Action<int> OnGameEscapeIdUpdated; public static event Action<int> OnGameEscapeIdUpdated;
void Start() void Start()
{ {
instance=this;
// 由于除登录注册外的其他方法都需要登录后返回的token // 由于除登录注册外的其他方法都需要登录后返回的token
// 因此登录不在此发送请求(同时) // 因此登录不在此发送请求(同时)
// 采用监听和事件回调的方法只有监听到登录和token返回时才运行其他方法 // 采用监听和事件回调的方法只有监听到登录和token返回时才运行其他方法
@ -71,7 +75,7 @@ public class selectGameEscape512 : MonoBehaviour
{ {
gameEscapeId = response.data.gameEscapeModel.id; gameEscapeId = response.data.gameEscapeModel.id;
//Debug.Log("解析成功id为: " + gameEscapeId); //Debug.Log("解析成功id为: " + gameEscapeId);
carrySeconds= response.data.carrySeconds;
// 触发事件,通知所有订阅者 // 触发事件,通知所有订阅者
OnGameEscapeIdUpdated?.Invoke(gameEscapeId); OnGameEscapeIdUpdated?.Invoke(gameEscapeId);
} }

View File

@ -941,7 +941,7 @@ Material:
- _OutlineSoftness: 0 - _OutlineSoftness: 0
- _OutlineUVSpeedX: 0 - _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0 - _OutlineUVSpeedY: 0
- _OutlineWidth: 0.2 - _OutlineWidth: 0.15
- _PerspectiveFilter: 0.875 - _PerspectiveFilter: 0.875
- _Reflectivity: 10 - _Reflectivity: 10
- _ScaleRatioA: 0.9677419 - _ScaleRatioA: 0.9677419