mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-03 12:02:28 +08:00
rename Model folder
This commit is contained in:
27
src/UI/Models/UIModel.cs
Normal file
27
src/UI/Models/UIModel.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityExplorer.UI.Models
|
||||
{
|
||||
public abstract class UIModel
|
||||
{
|
||||
public abstract GameObject UIRoot { get; }
|
||||
|
||||
public bool Visible
|
||||
{
|
||||
get => UIRoot && UIRoot.activeInHierarchy;
|
||||
set { if (UIRoot) UIRoot.SetActive(value); }
|
||||
}
|
||||
|
||||
public abstract void ConstructUI(GameObject parent);
|
||||
|
||||
public virtual void Destroy()
|
||||
{
|
||||
if (UIRoot)
|
||||
GameObject.Destroy(UIRoot);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user