NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Layer.cs

64 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.Collections.Generic;
using Obfuz;
using UnityEngine;
public partial class UIManager
{
/// <summary>
/// 动静分离Canvas分层
/// </summary>
[ObfuzIgnore]
public enum ECanvasRoot
{
Dynamic0,
Static1,
Dynamic2,
Static3,
Dynamic4,
Static5,
}
private LinkedList<UIWindow> _GetLayerWindowList(UIWindowLayer layer)
{
LinkedList<UIWindow> windowsL = new LinkedList<UIWindow>();
foreach (var windowData in _layerList)
{
if (windowData.Key == (int)layer)
{
windowsL = windowData.Value;
break;
}
}
return windowsL;
}
private bool _CheckIsLayerListEmpty(UIWindowLayer enumType)
{
var normalWindowList = _GetLayerWindowList(enumType);
if (normalWindowList.Count > 0)
{
return false;
}
return true;
}
public bool CheckIsLayerListEmpty(UIWindowLayer enumType)
{
return _CheckIsLayerListEmpty(enumType);
}
public UIWindow GetTopWindowInLayer(UIWindowLayer windowType)
{
if (_layerList.TryGetValue((int)windowType, out var windowList))
{
if (windowList.Count > 0)
{
UIWindow window = windowList.Last.Value;
return window;
}
}
return null;
}
}