add kcp
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITKit.UX
|
||||
{
|
||||
[SerializeField]
|
||||
public class UXServiceBasedAllowTouch : ICondition
|
||||
{
|
||||
public bool OnCheck() => true;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0012e85e68b0154b9453d6212d3f2bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
@@ -14,7 +15,10 @@ namespace BITKit.UX
|
||||
/// </summary>
|
||||
public class UXService : MonoBehaviour, IUXService
|
||||
{
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
/// <summary>
|
||||
/// 重新初始化,使用<see cref="RuntimeInitializeLoadType.SubsystemRegistration"/>确保在所有子系统注册后执行
|
||||
/// </summary>
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void Initialized()
|
||||
{
|
||||
RegistryQueue.Clear();
|
||||
@@ -76,8 +80,6 @@ namespace BITKit.UX
|
||||
|
||||
[SerializeReference, SubclassSelector] private IUXPanel initialPanel;
|
||||
|
||||
[SerializeField] private TextAsset validTexts;
|
||||
|
||||
private bool initialized;
|
||||
private void Awake()
|
||||
{
|
||||
@@ -105,14 +107,24 @@ namespace BITKit.UX
|
||||
Entry(initialPanel);
|
||||
}
|
||||
|
||||
if (!EntryQueue.TryPop(out var next)) return;
|
||||
if (!EntryQueue.TryPop(out var next) || next is null) return;
|
||||
|
||||
if (Panels.ContainsKey(next.Index) is false) return;
|
||||
|
||||
while (EntryCompletedPanels.TryPop(out var entryCompletedPanel))
|
||||
{
|
||||
entryCompletedPanel?.Exit();
|
||||
}
|
||||
|
||||
next.Entry();
|
||||
try
|
||||
{
|
||||
next.Entry();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogWarning(next.Index);
|
||||
Debug.LogException(e);
|
||||
}
|
||||
|
||||
BITAppForUnity.AllowCursor.SetElements(this, next.AllowCursor);
|
||||
BITInputSystem.AllowInput.SetElements(this, next.AllowInput);
|
||||
@@ -154,7 +166,7 @@ namespace BITKit.UX
|
||||
{
|
||||
if (panelsLabel is null || currentPanelLabel is null) return;
|
||||
panelsLabel.text=string.Join("\n",UXService.Panels);
|
||||
currentPanelLabel.text = string.Join("\n",UXService.EntryCompletedPanels);
|
||||
currentPanelLabel.text = string.Join("\n",UXService.EntryCompletedPanels.Select(x=>x.Index));
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user