Exemple #1
0
        public void CloseWindow()
        {
            var thisDrawer = WindowDrawers.FirstOrDefault(w => w.Window == this);

            if (thisDrawer != null)
            {
                thisDrawer.Window = null;
            }
            Visible = false;
        }
Exemple #2
0
        public void OpenWindow()
        {
            if (WindowDrawers.Any(w => w.Window == this))
            {
                return;
            }
            var windowDrawer = WindowDrawers.FirstOrDefault(w => w.Window == null) ?? GameObject.AddComponent <WindowDrawer>();

            windowDrawer.Window = this;
            Visible             = true;
        }