using NEG.UI.Window; using UnityEngine; namespace NEG.UI.WindowSlot { public class SingleWindowSlot : MonoWindowSlot { public IWindow CurrentWindow { get => currentWindow; set { currentWindow?.Close(); currentWindow = value; currentWindow?.Open(this); } } private IWindow currentWindow; public override void AttachWindow(IWindow window) => CurrentWindow = window; public override void DetachWindow(IWindow window) => CurrentWindow = null; public override void CloseAllWindows() => CurrentWindow = null; } }