象棋基础
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user