大爷 1 рік тому
батько
коміт
9a756b76fb

+ 0 - 8
Unity/Assets/Scripts/Codes/HotfixView/Client/Module.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: e2442d257cf316b4fbd095bc092aacd0
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/Resource.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: b47a7b83d8faceb44be118855f8d7bdf
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 20
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/Resource/GameObjectHelper.cs

@@ -1,20 +0,0 @@
-using System;
-using UnityEngine;
-
-namespace ET.Client
-{
-	public static class GameObjectHelper
-	{
-		public static T Get<T>(this GameObject gameObject, string key) where T : class
-		{
-			try
-			{
-				return gameObject.GetComponent<ReferenceCollector>().Get<T>(key);
-			}
-			catch (Exception e)
-			{
-				throw new Exception($"获取{gameObject.name}的ReferenceCollector key失败, key: {key}", e);
-			}
-		}
-	}
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/Resource/GameObjectHelper.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 881672317f491394d973cb9950d5c146
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/UI.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 613ad4094b263944db9f7d45de0a038f
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 38
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/UI/UIComponentSystem.cs

@@ -1,38 +0,0 @@
-using System.Collections.Generic;
-
-namespace ET.Client
-{
-	/// <summary>
-	/// 管理Scene上的UI
-	/// </summary>
-	[FriendOf(typeof(UIComponent))]
-	public static class UIComponentSystem
-	{
-		public static async ETTask<UI> Create(this UIComponent self, string uiType, UILayer uiLayer)
-		{
-			UI ui = await UIEventComponent.Instance.OnCreate(self, uiType, uiLayer);
-			self.UIs.Add(uiType, ui);
-			return ui;
-		}
-
-		public static void Remove(this UIComponent self, string uiType)
-		{
-			if (!self.UIs.TryGetValue(uiType, out UI ui))
-			{
-				return;
-			}
-			
-			UIEventComponent.Instance.OnRemove(self, uiType);
-			
-			self.UIs.Remove(uiType);
-			ui.Dispose();
-		}
-
-		public static UI Get(this UIComponent self, string name)
-		{
-			UI ui = null;
-			self.UIs.TryGetValue(name, out ui);
-			return ui;
-		}
-	}
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/UI/UIComponentSystem.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 719fcba05de90c6429a9b2d9b411916f
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 75
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/UI/UIEventComponentSystem.cs

@@ -1,75 +0,0 @@
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace ET.Client
-{
-	/// <summary>
-	/// 管理所有UI GameObject 以及UI事件
-	/// </summary>
-	[FriendOf(typeof(UIEventComponent))]
-	public static class UIEventComponentSystem
-	{
-		[ObjectSystem]
-		public class UIEventComponentAwakeSystem : AwakeSystem<UIEventComponent>
-		{
-			protected override void Awake(UIEventComponent self)
-			{
-				UIEventComponent.Instance = self;
-			
-				GameObject uiRoot = GameObject.Find("/Global/UI");
-				ReferenceCollector referenceCollector = uiRoot.GetComponent<ReferenceCollector>();
-			
-				self.UILayers.Add((int)UILayer.Hidden, referenceCollector.Get<GameObject>(UILayer.Hidden.ToString()).transform);
-				self.UILayers.Add((int)UILayer.Low, referenceCollector.Get<GameObject>(UILayer.Low.ToString()).transform);
-				self.UILayers.Add((int)UILayer.Mid, referenceCollector.Get<GameObject>(UILayer.Mid.ToString()).transform);
-				self.UILayers.Add((int)UILayer.High, referenceCollector.Get<GameObject>(UILayer.High.ToString()).transform);
-
-				var uiEvents = EventSystem.Instance.GetTypes(typeof (UIEventAttribute));
-				foreach (Type type in uiEvents)
-				{
-					object[] attrs = type.GetCustomAttributes(typeof(UIEventAttribute), false);
-					if (attrs.Length == 0)
-					{
-						continue;
-					}
-
-					UIEventAttribute uiEventAttribute = attrs[0] as UIEventAttribute;
-					AUIEvent aUIEvent = Activator.CreateInstance(type) as AUIEvent;
-					self.UIEvents.Add(uiEventAttribute.UIType, aUIEvent);
-				}
-			}
-		}
-		
-		public static async ETTask<UI> OnCreate(this UIEventComponent self, UIComponent uiComponent, string uiType, UILayer uiLayer)
-		{
-			try
-			{
-				UI ui = await self.UIEvents[uiType].OnCreate(uiComponent, uiLayer);
-				return ui;
-			}
-			catch (Exception e)
-			{
-				throw new Exception($"on create ui error: {uiType}", e);
-			}
-		}
-
-		public static Transform GetLayer(this UIEventComponent self, int layer)
-		{
-			return self.UILayers[layer];
-		}
-		
-		public static void OnRemove(this UIEventComponent self, UIComponent uiComponent, string uiType)
-		{
-			try
-			{
-				self.UIEvents[uiType].OnRemove(uiComponent);
-			}
-			catch (Exception e)
-			{
-				throw new Exception($"on remove ui error: {uiType}", e);
-			}
-			
-		}
-	}
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/HotfixView/Client/Module/UI/UIEventComponentSystem.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: d0756d26f7756204f9b7a99046f5df32
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: