Inheritance: Model.Entity
示例#1
0
文件: UI.cs 项目: egametang/Egametang
		public UI(Scene scene, UIType uiType, UI parent, GameObject gameObject) : base(EntityType.UI)
		{
			this.Scene = scene;
			this.UIType = uiType;

			gameObject.transform.SetParent(parent?.GameObject.transform);
			this.GameObject = gameObject;
			this.AddComponent<ChildrenComponent<UI>>();
		}
示例#2
0
        public UI Create(Scene scene, UIType type, UI parent)
        {
            GameObject mainPrefab = Resources.Load<GameObject>("UI/LoginPanel");
            mainPrefab = Object.Instantiate(mainPrefab);
			mainPrefab.layer = LayerMask.NameToLayer(LayerNames.UI);

			UI ui = new UI(scene, type, parent, mainPrefab);
			parent.AddChild(ui);
            
            return ui;
        }
示例#3
0
		public static void CloseScene()
		{
			scene.Dispose();
			scene = null;
		}
示例#4
0
文件: Game.cs 项目: vieyahn/Egametang
		public static void CloseScene()
		{
			scene.Dispose();
			scene = null;
		}