This commit is contained in:
GL 2024-11-13 23:15:46 +08:00
parent 5c5ef898f8
commit 107ebcde62
5 changed files with 16 additions and 6 deletions

View File

@ -1966,6 +1966,7 @@ MonoBehaviour:
timeText: {fileID: 1632850612} timeText: {fileID: 1632850612}
timeNum: 0 timeNum: 0
carrySeconds: 0 carrySeconds: 0
InfoObject: {fileID: 2127674355}
--- !u!1 &270479495 --- !u!1 &270479495
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10441,12 +10442,12 @@ GameObject:
- component: {fileID: 2127674359} - component: {fileID: 2127674359}
- component: {fileID: 2127674360} - component: {fileID: 2127674360}
m_Layer: 5 m_Layer: 5
m_Name: GameObject m_Name: InfoObject
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &2127674356 --- !u!224 &2127674356
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10479,6 +10480,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 48ec9b444797b3d4d93d6d2c1bb4299b, type: 3} m_Script: {fileID: 11500000, guid: 48ec9b444797b3d4d93d6d2c1bb4299b, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
token:
updateUserInfo: {fileID: 0} updateUserInfo: {fileID: 0}
sec: 0 sec: 0
--- !u!114 &2127674358 --- !u!114 &2127674358

View File

@ -8,7 +8,7 @@ public class EggNum : MonoBehaviour
public Text eggNumText; public Text eggNumText;
public static EggNum instance; public static EggNum instance;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Awake()
{ {
instance = this; instance = this;

View File

@ -9,7 +9,7 @@ public class HegemonTime : MonoBehaviour
public Text timeText; public Text timeText;
public int timeNum; public int timeNum;
public int carrySeconds; public int carrySeconds;
public GameObject InfoObject;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
@ -22,6 +22,7 @@ public class HegemonTime : MonoBehaviour
private void Update() private void Update()
{ {
Debug.Log("carrySeconds:" + InfoObject.GetComponent<selectGameEscape512>().carrySeconds);
} }
public IEnumerator StartGame() public IEnumerator StartGame()

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityEngine.Networking; using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using static LoginAndGetToken; using static LoginAndGetToken;
@ -74,6 +75,10 @@ public class logoPanel : MonoBehaviour
{ {
string registerResponse = webRequest.downloadHandler.text; string registerResponse = webRequest.downloadHandler.text;
Debug.Log("Register Response: " + registerResponse); Debug.Log("Register Response: " + registerResponse);
SceneManager.LoadScene(1);
// 可在此处解析注册响应并进行后续处理 // 可在此处解析注册响应并进行后续处理
// 比如解析返回的token并触发事件 // 比如解析返回的token并触发事件
} }

View File

@ -135,10 +135,12 @@ using System.Threading.Tasks;
public class selectGameEscape512 : MonoBehaviour public class selectGameEscape512 : MonoBehaviour
{ {
public static selectGameEscape512 instance;
public int gameEscapeId; public int gameEscapeId;
public int carrySeconds; public int carrySeconds;
// 定义一个事件,当 gameEscapeId 被更新时触发 // 定义一个事件,当 gameEscapeId 被更新时触发
public static event Action<int> OnGameEscapeIdUpdated; public static event Action<int> OnGameEscapeIdUpdated;
@ -146,7 +148,7 @@ public class selectGameEscape512 : MonoBehaviour
void Start() void Start()
{ {
instance = this;
// 监听登录获取 token // 监听登录获取 token
LoginAndGetToken.OnTokenReceived += HandleTokenReceived; LoginAndGetToken.OnTokenReceived += HandleTokenReceived;