fix:1、修复bug
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user