fix:1、修复bug

This commit is contained in:
2026-07-09 16:10:06 +08:00
parent 8277a8e614
commit c2ad44d755
37 changed files with 66884 additions and 70585 deletions
+21
View File
@@ -1,3 +1,4 @@
using System;
using UnityEngine;
using System.Collections.Generic;
using ChillConnect;
@@ -100,4 +101,24 @@ public class LevelManager : MonoBehaviour
CurrentLevel = JsonUtility.FromJson<LevelConfig>(jsonFile.text);
return CurrentLevel != null;
}
private float lastBackPressTime;
private void Update()
{
#if UNITY_ANDROID && !UNITY_EDITOR
if (!Input.GetKeyDown(KeyCode.Escape)) return;
if (Time.time - lastBackPressTime < 2f)
{
if (!UIManager.Instance.IsExistUI(UIConst.H5UI)) return;
Debug.Log($"gamelogin ui is exist ");
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Close);
}
else
{
lastBackPressTime = Time.time;
}
#endif
}
}