象棋基础

This commit is contained in:
2026-02-26 11:05:56 +08:00
parent e68fd61b86
commit 3dd5a9bf4e
57 changed files with 18347 additions and 516 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ using UnityEngine.ResourceManagement.AsyncOperations;
/// </summary>
public class SubUIManager
{
public UIBase subUIBaseParent;
public UIBase parentUIBase;
private readonly Transform parent;
private readonly Dictionary<UIPanel, SubUIBase> panels = new Dictionary<UIPanel, SubUIBase>();
private readonly Dictionary<UIPanel, string> addressMap = new Dictionary<UIPanel, string>();
@@ -17,9 +17,10 @@ public class SubUIManager
{
return panels.TryGetValue(type, out var panel) ? panel as T : null;
}
public SubUIManager(Transform parent, UIPanelAddressConfig uIPanelAddressConfig)
public SubUIManager(Transform parent, UIPanelAddressConfig uIPanelAddressConfig,UIBase parentUIBase)
{
this.parent = parent;
this.parentUIBase = parentUIBase;
foreach (var entry in uIPanelAddressConfig.panels)
{
if (!addressMap.ContainsKey(entry.type))
@@ -37,7 +38,6 @@ public class SubUIManager
if (addressMap.ContainsKey(type)) {
UIBase uIBase = await LoadAndShowAsync(type, addressMap[type], args);
subUIBaseParent = uIBase;
}
else