Răsfoiți Sursa

去掉EventType的命名空间,不太方便

tanghai 2 ani în urmă
părinte
comite
1dab41aea8
51 a modificat fișierele cu 180 adăugiri și 201 ștergeri
  1. 1 1
      Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Login/EnterMapHelper.cs
  2. 1 1
      Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Scene/CurrentSceneFactory.cs
  3. 2 2
      Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Scene/SceneChangeHelper.cs
  4. 1 1
      Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Unit/UnitFactory.cs
  5. 1 1
      Unity/Assets/Scripts/Hotfix/Client/Demo/NetClient/LoginHelper.cs
  6. 6 6
      Unity/Assets/Scripts/Hotfix/Client/LockStep/LSSceneChangeHelper.cs
  7. 2 2
      Unity/Assets/Scripts/Hotfix/Server/Demo/EntryEvent2_InitServer.cs
  8. 2 2
      Unity/Assets/Scripts/Hotfix/Server/Demo/Map/AOI/ChangePosition_NotifyAOI.cs
  9. 2 2
      Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Unit/UnitEnterSightRange_NotifyClient.cs
  10. 2 2
      Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Unit/UnitLeaveSightRange_NotifyClient.cs
  11. 1 1
      Unity/Assets/Scripts/Hotfix/Server/Demo/Robot/FiberInit_Robot.cs
  12. 2 2
      Unity/Assets/Scripts/Hotfix/Server/Module/AOI/AOIEntitySystem.cs
  13. 1 1
      Unity/Assets/Scripts/Hotfix/Server/Module/Message/MessageSenderSystem.cs
  14. 2 2
      Unity/Assets/Scripts/Hotfix/Share/Demo/EntryEvent1_InitShare.cs
  15. 3 3
      Unity/Assets/Scripts/Hotfix/Share/FiberInit_Main.cs
  16. 2 2
      Unity/Assets/Scripts/Hotfix/Share/Module/Move/MoveComponentSystem.cs
  17. 2 2
      Unity/Assets/Scripts/Hotfix/Share/Module/Numeric/NumericChangeEvent_NotifyWatcher.cs
  18. 1 1
      Unity/Assets/Scripts/Hotfix/Share/Module/Numeric/NumericWatcher_Hp_ShowUI.cs
  19. 3 3
      Unity/Assets/Scripts/HotfixView/Client/Demo/EntryEvent3_InitClient.cs
  20. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/Scene/AfterCreateClientScene_AddComponent.cs
  21. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/Scene/AfterCreateCurrentScene_AddComponent.cs
  22. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/Scene/SceneChangeStart_AddComponent.cs
  23. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UIHelp/SceneChangeFinishEvent_CreateUIHelp.cs
  24. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UILobby/LoginFinish_CreateLobbyUI.cs
  25. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs
  26. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UILogin/LoginFinish_RemoveLoginUI.cs
  27. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/Unit/AfterUnitCreate_CreateUnitView.cs
  28. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/Unit/ChangePosition_SyncGameObjectPos.cs
  29. 2 2
      Unity/Assets/Scripts/HotfixView/Client/Demo/Unit/ChangeRotation_SyncGameObjectRotation.cs
  30. 2 2
      Unity/Assets/Scripts/HotfixView/Client/LockStep/LSSceneChangeStart_AddComponent.cs
  31. 2 2
      Unity/Assets/Scripts/HotfixView/Client/LockStep/LSSceneInitFinish_Finish.cs
  32. 2 2
      Unity/Assets/Scripts/HotfixView/Client/LockStep/Scene/AfterCreateClientScene_LSAddComponent.cs
  33. 2 2
      Unity/Assets/Scripts/HotfixView/Client/LockStep/UI/UILSLobby/LoginFinish_CreateUILSLobby.cs
  34. 2 2
      Unity/Assets/Scripts/HotfixView/Client/LockStep/UI/UILSLogin/AppStartInitFinish_CreateUILSLogin.cs
  35. 2 2
      Unity/Assets/Scripts/HotfixView/Client/LockStep/UI/UILSLogin/LoginFinish_RemoveLoginUI.cs
  36. 31 31
      Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/AOTGenericReferences.cs
  37. 1 1
      Unity/Assets/Scripts/Model/Client/Demo/NetClient/A2NetClient_Message.cs
  38. 7 10
      Unity/Assets/Scripts/Model/Client/LockStep/EventType.cs
  39. 1 1
      Unity/Assets/Scripts/Model/Client/LockStep/WaitType.cs
  40. 1 1
      Unity/Assets/Scripts/Model/Server/Demo/Robot/Case/RobotCase_SecondCase.cs
  41. 8 11
      Unity/Assets/Scripts/Model/Server/Module/AOI/AOIEventType.cs
  42. 1 1
      Unity/Assets/Scripts/Model/Server/Module/Message/MessageSender.cs
  43. 1 1
      Unity/Assets/Scripts/Model/Server/Module/NetInner/A2NetInner_Message.cs
  44. 28 31
      Unity/Assets/Scripts/Model/Share/Demo/EventType.cs
  45. 9 12
      Unity/Assets/Scripts/Model/Share/Entry.cs
  46. 6 9
      Unity/Assets/Scripts/Model/Share/Module/Move/MoveEventType.cs
  47. 1 1
      Unity/Assets/Scripts/Model/Share/Module/Numeric/INumericWatcher.cs
  48. 6 9
      Unity/Assets/Scripts/Model/Share/Module/Numeric/NumericComponent.cs
  49. 1 1
      Unity/Assets/Scripts/Model/Share/Module/Numeric/NumericWatcherComponent.cs
  50. 2 2
      Unity/Assets/Scripts/Model/Share/Module/Unit/Unit.cs
  51. 7 10
      Unity/Assets/Scripts/Model/Share/Module/Unit/UnitEventType.cs

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Login/EnterMapHelper.cs

@@ -14,7 +14,7 @@ namespace ET.Client
                 // 等待场景切换完成
                 await root.GetComponent<ObjectWait>().Wait<Wait_SceneChangeFinish>();
                 
-                EventSystem.Instance.Publish(root, new EventType.EnterMapFinish());
+                EventSystem.Instance.Publish(root, new EnterMapFinish());
             }
             catch (Exception e)
             {

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Scene/CurrentSceneFactory.cs

@@ -7,7 +7,7 @@ namespace ET.Client
             Scene currentScene = EntitySceneFactory.CreateScene(currentScenesComponent, id, IdGenerater.Instance.GenerateInstanceId(), SceneType.Current, name);
             currentScenesComponent.Scene = currentScene;
             
-            EventSystem.Instance.Publish(currentScene, new EventType.AfterCreateCurrentScene());
+            EventSystem.Instance.Publish(currentScene, new AfterCreateCurrentScene());
             return currentScene;
         }
     }

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Scene/SceneChangeHelper.cs

@@ -13,7 +13,7 @@
             UnitComponent unitComponent = currentScene.AddComponent<UnitComponent>();
          
             // 可以订阅这个事件中创建Loading界面
-            EventSystem.Instance.Publish(root, new EventType.SceneChangeStart());
+            EventSystem.Instance.Publish(root, new SceneChangeStart());
             // 等待CreateMyUnit的消息
             Wait_CreateMyUnit waitCreateMyUnit = await root.GetComponent<ObjectWait>().Wait<Wait_CreateMyUnit>();
             M2C_CreateMyUnit m2CCreateMyUnit = waitCreateMyUnit.Message;
@@ -21,7 +21,7 @@
             unitComponent.Add(unit);
             root.RemoveComponent<AIComponent>();
             
-            EventSystem.Instance.Publish(currentScene, new EventType.SceneChangeFinish());
+            EventSystem.Instance.Publish(currentScene, new SceneChangeFinish());
             // 通知等待场景切换的协程
             root.GetComponent<ObjectWait>().Notify(new Wait_SceneChangeFinish());
         }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Unit/UnitFactory.cs

@@ -34,7 +34,7 @@ namespace ET.Client
 
 	        unit.AddComponent<XunLuoPathComponent>();
 	        
-	        EventSystem.Instance.Publish(unit.Scene(), new EventType.AfterUnitCreate() {Unit = unit});
+	        EventSystem.Instance.Publish(unit.Scene(), new AfterUnitCreate() {Unit = unit});
             return unit;
         }
     }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/Demo/NetClient/LoginHelper.cs

@@ -11,7 +11,7 @@ namespace ET.Client
 
             root.GetComponent<PlayerComponent>().MyId = playerId;
             
-            await EventSystem.Instance.PublishAsync(root, new EventType.LoginFinish());
+            await EventSystem.Instance.PublishAsync(root, new LoginFinish());
         }
     }
 }

+ 6 - 6
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSSceneChangeHelper.cs

@@ -12,7 +12,7 @@ namespace ET.Client
             room.Name = sceneName;
 
             // 等待表现层订阅的事件完成
-            await EventSystem.Instance.PublishAsync(root, new EventType.LSSceneChangeStart() {Room = room});
+            await EventSystem.Instance.PublishAsync(root, new LSSceneChangeStart() {Room = room});
 
             root.GetComponent<ClientSenderCompnent>().Send(new C2Room_ChangeSceneFinish());
             
@@ -25,7 +25,7 @@ namespace ET.Client
             room.AddComponent<LSClientUpdater>();
 
             // 这个事件中可以订阅取消loading
-            EventSystem.Instance.Publish(root, new EventType.LSSceneInitFinish());
+            EventSystem.Instance.Publish(root, new LSSceneInitFinish());
         }
         
         // 场景切换协程
@@ -41,12 +41,12 @@ namespace ET.Client
             room.Init(replay.UnitInfos, TimeInfo.Instance.ServerFrameTime());
             
             // 等待表现层订阅的事件完成
-            await EventSystem.Instance.PublishAsync(root, new EventType.LSSceneChangeStart() {Room = room});
+            await EventSystem.Instance.PublishAsync(root, new LSSceneChangeStart() {Room = room});
             
 
             room.AddComponent<LSReplayUpdater>();
             // 这个事件中可以订阅取消loading
-            EventSystem.Instance.Publish(root, new EventType.LSSceneInitFinish());
+            EventSystem.Instance.Publish(root, new LSSceneInitFinish());
         }
         
         // 场景切换协程
@@ -61,12 +61,12 @@ namespace ET.Client
             room.Init(message.UnitInfos, message.StartTime, message.Frame);
             
             // 等待表现层订阅的事件完成
-            await EventSystem.Instance.PublishAsync(root, new EventType.LSSceneChangeStart() {Room = room});
+            await EventSystem.Instance.PublishAsync(root, new LSSceneChangeStart() {Room = room});
 
 
             room.AddComponent<LSClientUpdater>();
             // 这个事件中可以订阅取消loading
-            EventSystem.Instance.Publish(root, new EventType.LSSceneInitFinish());
+            EventSystem.Instance.Publish(root, new LSSceneInitFinish());
         }
     }
 }

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Server/Demo/EntryEvent2_InitServer.cs

@@ -4,9 +4,9 @@ using System.Net;
 namespace ET.Server
 {
     [Event(SceneType.Main)]
-    public class EntryEvent2_InitServer: AEvent<Scene, ET.EventType.EntryEvent2>
+    public class EntryEvent2_InitServer: AEvent<Scene, EntryEvent2>
     {
-        protected override async ETTask Run(Scene root, ET.EventType.EntryEvent2 args)
+        protected override async ETTask Run(Scene root, EntryEvent2 args)
         {
             switch (Options.Instance.AppType)
             {

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Server/Demo/Map/AOI/ChangePosition_NotifyAOI.cs

@@ -3,9 +3,9 @@
 namespace ET.Server
 {
     [Event(SceneType.Map)]
-    public class ChangePosition_NotifyAOI: AEvent<Scene, ET.EventType.ChangePosition>
+    public class ChangePosition_NotifyAOI: AEvent<Scene, ChangePosition>
     {
-        protected override async ETTask Run(Scene scene, ET.EventType.ChangePosition args)
+        protected override async ETTask Run(Scene scene, ChangePosition args)
         {
             Unit unit = args.Unit;
             float3 oldPos = args.OldPos;

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Unit/UnitEnterSightRange_NotifyClient.cs

@@ -2,9 +2,9 @@
 {
     // 进入视野通知
     [Event(SceneType.Map)]
-    public class UnitEnterSightRange_NotifyClient: AEvent<Scene, EventType.UnitEnterSightRange>
+    public class UnitEnterSightRange_NotifyClient: AEvent<Scene, UnitEnterSightRange>
     {
-        protected override async ETTask Run(Scene scene, EventType.UnitEnterSightRange args)
+        protected override async ETTask Run(Scene scene, UnitEnterSightRange args)
         {
             AOIEntity a = args.A;
             AOIEntity b = args.B;

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Server/Demo/Map/Unit/UnitLeaveSightRange_NotifyClient.cs

@@ -2,9 +2,9 @@
 {
     // 离开视野
     [Event(SceneType.Map)]
-    public class UnitLeaveSightRange_NotifyClient: AEvent<Scene, EventType.UnitLeaveSightRange>
+    public class UnitLeaveSightRange_NotifyClient: AEvent<Scene, UnitLeaveSightRange>
     {
-        protected override async ETTask Run(Scene scene, EventType.UnitLeaveSightRange args)
+        protected override async ETTask Run(Scene scene, UnitLeaveSightRange args)
         {
             await ETTask.CompletedTask;
             AOIEntity a = args.A;

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Demo/Robot/FiberInit_Robot.cs

@@ -16,7 +16,7 @@
             
             root.SceneType = SceneType.Demo;
 
-            await EventSystem.Instance.PublishAsync(root, new EventType.AppStartInitFinish());
+            await EventSystem.Instance.PublishAsync(root, new AppStartInitFinish());
             
             await LoginHelper.Login(root, root.Name, "");
             

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Server/Module/AOI/AOIEntitySystem.cs

@@ -134,7 +134,7 @@ namespace ET.Server
                     enter.BeSeeUnits.Add(self.Id, self);
                 }
             }
-            EventSystem.Instance.Publish(self.Scene(), new EventType.UnitEnterSightRange() { A = self, B = enter });
+            EventSystem.Instance.Publish(self.Scene(), new UnitEnterSightRange() { A = self, B = enter });
         }
 
         // leave离开self视野
@@ -162,7 +162,7 @@ namespace ET.Server
                 leave.BeSeePlayers.Remove(self.Id);
             }
 
-            EventSystem.Instance.Publish(self.Scene(), new EventType.UnitLeaveSightRange { A = self, B = leave });
+            EventSystem.Instance.Publish(self.Scene(), new UnitLeaveSightRange { A = self, B = leave });
         }
 
         /// <summary>

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Module/Message/MessageSenderSystem.cs

@@ -2,7 +2,7 @@
 using System.Collections.Generic;
 using System.IO;
 
-namespace ET
+namespace ET.Server
 {
     [FriendOf(typeof(MessageSender))]
     public static partial class MessageSenderSystem

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Share/Demo/EntryEvent1_InitShare.cs

@@ -1,9 +1,9 @@
 namespace ET
 {
     [Event(SceneType.Main)]
-    public class EntryEvent1_InitShare: AEvent<Scene, EventType.EntryEvent1>
+    public class EntryEvent1_InitShare: AEvent<Scene, EntryEvent1>
     {
-        protected override async ETTask Run(Scene root, EventType.EntryEvent1 args)
+        protected override async ETTask Run(Scene root, EntryEvent1 args)
         {
             await World.Instance.AddSingleton<ConfigLoader>().LoadAsync();
             root.AddComponent<TimerComponent>();

+ 3 - 3
Unity/Assets/Scripts/Hotfix/Share/FiberInit_Main.cs

@@ -7,9 +7,9 @@
         {
             Scene root = fiberInit.Fiber.Root;
            
-            await EventSystem.Instance.PublishAsync(root, new EventType.EntryEvent1());
-            await EventSystem.Instance.PublishAsync(root, new EventType.EntryEvent2());
-            await EventSystem.Instance.PublishAsync(root, new EventType.EntryEvent3());
+            await EventSystem.Instance.PublishAsync(root, new EntryEvent1());
+            await EventSystem.Instance.PublishAsync(root, new EntryEvent2());
+            await EventSystem.Instance.PublishAsync(root, new EntryEvent3());
         }
     }
 }

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Share/Module/Move/MoveComponentSystem.cs

@@ -92,7 +92,7 @@ namespace ET
             self.Speed = speed;
             self.tcs = ETTask<bool>.Create(true);
 
-            EventSystem.Instance.Publish(self.Scene(), new EventType.MoveStart() {Unit = self.GetParent<Unit>()});
+            EventSystem.Instance.Publish(self.Scene(), new MoveStart() {Unit = self.GetParent<Unit>()});
             
             self.StartMove();
             
@@ -100,7 +100,7 @@ namespace ET
 
             if (moveRet)
             {
-                EventSystem.Instance.Publish(self.Scene(), new EventType.MoveStop() {Unit = self.GetParent<Unit>()});
+                EventSystem.Instance.Publish(self.Scene(), new MoveStop() {Unit = self.GetParent<Unit>()});
             }
             return moveRet;
         }

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Share/Module/Numeric/NumericChangeEvent_NotifyWatcher.cs

@@ -2,9 +2,9 @@
 {
 	// 分发数值监听
 	[Event(SceneType.All)]  // 服务端Map需要分发, 客户端CurrentScene也要分发
-	public class NumericChangeEvent_NotifyWatcher: AEvent<Scene, EventType.NumbericChange>
+	public class NumericChangeEvent_NotifyWatcher: AEvent<Scene, NumbericChange>
 	{
-		protected override async ETTask Run(Scene scene, EventType.NumbericChange args)
+		protected override async ETTask Run(Scene scene, NumbericChange args)
 		{
 			NumericWatcherComponent.Instance.Run(args.Unit, args);
 			await ETTask.CompletedTask;

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Share/Module/Numeric/NumericWatcher_Hp_ShowUI.cs

@@ -6,7 +6,7 @@
 	[NumericWatcher(SceneType.Current, NumericType.Hp)]
 	public class NumericWatcher_Hp_ShowUI : INumericWatcher
 	{
-		public void Run(Unit unit, EventType.NumbericChange args)
+		public void Run(Unit unit, NumbericChange args)
 		{
 		}
 	}

+ 3 - 3
Unity/Assets/Scripts/HotfixView/Client/Demo/EntryEvent3_InitClient.cs

@@ -4,9 +4,9 @@ using System.IO;
 namespace ET.Client
 {
     [Event(SceneType.Main)]
-    public class EntryEvent3_InitClient: AEvent<Scene, EventType.EntryEvent3>
+    public class EntryEvent3_InitClient: AEvent<Scene, EntryEvent3>
     {
-        protected override async ETTask Run(Scene root, EventType.EntryEvent3 args)
+        protected override async ETTask Run(Scene root, EntryEvent3 args)
         {
             GlobalComponent globalComponent = root.AddComponent<GlobalComponent>();
             root.AddComponent<UIGlobalComponent>();
@@ -22,7 +22,7 @@ namespace ET.Client
             SceneType sceneType = EnumHelper.FromString<SceneType>(globalComponent.GlobalConfig.AppType.ToString());
             root.SceneType = sceneType;
             
-            await EventSystem.Instance.PublishAsync(root, new EventType.AppStartInitFinish());
+            await EventSystem.Instance.PublishAsync(root, new AppStartInitFinish());
         }
     }
 }

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/Scene/AfterCreateClientScene_AddComponent.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
     [Event(SceneType.Demo)]
-    public class AfterCreateClientScene_AddComponent: AEvent<Scene, EventType.AfterCreateClientScene>
+    public class AfterCreateClientScene_AddComponent: AEvent<Scene, AfterCreateClientScene>
     {
-        protected override async ETTask Run(Scene scene, EventType.AfterCreateClientScene args)
+        protected override async ETTask Run(Scene scene, AfterCreateClientScene args)
         {
             scene.AddComponent<UIComponent>();
             scene.AddComponent<ResourcesLoaderComponent>();

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/Scene/AfterCreateCurrentScene_AddComponent.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
     [Event(SceneType.Current)]
-    public class AfterCreateCurrentScene_AddComponent: AEvent<Scene, EventType.AfterCreateCurrentScene>
+    public class AfterCreateCurrentScene_AddComponent: AEvent<Scene, AfterCreateCurrentScene>
     {
-        protected override async ETTask Run(Scene scene, EventType.AfterCreateCurrentScene args)
+        protected override async ETTask Run(Scene scene, AfterCreateCurrentScene args)
         {
             scene.AddComponent<UIComponent>();
             scene.AddComponent<ResourcesLoaderComponent>();

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/Scene/SceneChangeStart_AddComponent.cs

@@ -4,9 +4,9 @@ using UnityEngine.SceneManagement;
 namespace ET.Client
 {
     [Event(SceneType.Demo)]
-    public class SceneChangeStart_AddComponent: AEvent<Scene, EventType.SceneChangeStart>
+    public class SceneChangeStart_AddComponent: AEvent<Scene, SceneChangeStart>
     {
-        protected override async ETTask Run(Scene root, EventType.SceneChangeStart args)
+        protected override async ETTask Run(Scene root, SceneChangeStart args)
         {
             try
             {

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UIHelp/SceneChangeFinishEvent_CreateUIHelp.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
     [Event(SceneType.Current)]
-    public class SceneChangeFinishEvent_CreateUIHelp : AEvent<Scene, EventType.SceneChangeFinish>
+    public class SceneChangeFinishEvent_CreateUIHelp : AEvent<Scene, SceneChangeFinish>
     {
-        protected override async ETTask Run(Scene scene, EventType.SceneChangeFinish args)
+        protected override async ETTask Run(Scene scene, SceneChangeFinish args)
         {
             await UIHelper.Create(scene, UIType.UIHelp, UILayer.Mid);
         }

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UILobby/LoginFinish_CreateLobbyUI.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
 	[Event(SceneType.Demo)]
-	public class LoginFinish_CreateLobbyUI: AEvent<Scene, EventType.LoginFinish>
+	public class LoginFinish_CreateLobbyUI: AEvent<Scene, LoginFinish>
 	{
-		protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
+		protected override async ETTask Run(Scene scene, LoginFinish args)
 		{
 			await UIHelper.Create(scene, UIType.UILobby, UILayer.Mid);
 		}

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
 	[Event(SceneType.Demo)]
-	public class AppStartInitFinish_CreateLoginUI: AEvent<Scene, EventType.AppStartInitFinish>
+	public class AppStartInitFinish_CreateLoginUI: AEvent<Scene, AppStartInitFinish>
 	{
-		protected override async ETTask Run(Scene root, EventType.AppStartInitFinish args)
+		protected override async ETTask Run(Scene root, AppStartInitFinish args)
 		{
 			await UIHelper.Create(root, UIType.UILogin, UILayer.Mid);
 		}

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/UI/UILogin/LoginFinish_RemoveLoginUI.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
 	[Event(SceneType.Demo)]
-	public class LoginFinish_RemoveLoginUI: AEvent<Scene, EventType.LoginFinish>
+	public class LoginFinish_RemoveLoginUI: AEvent<Scene, LoginFinish>
 	{
-		protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
+		protected override async ETTask Run(Scene scene, LoginFinish args)
 		{
 			await UIHelper.Remove(scene, UIType.UILogin);
 		}

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/Unit/AfterUnitCreate_CreateUnitView.cs

@@ -3,9 +3,9 @@
 namespace ET.Client
 {
     [Event(SceneType.Current)]
-    public class AfterUnitCreate_CreateUnitView: AEvent<Scene, EventType.AfterUnitCreate>
+    public class AfterUnitCreate_CreateUnitView: AEvent<Scene, AfterUnitCreate>
     {
-        protected override async ETTask Run(Scene scene, EventType.AfterUnitCreate args)
+        protected override async ETTask Run(Scene scene, AfterUnitCreate args)
         {
             Unit unit = args.Unit;
             // Unit View层

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/Unit/ChangePosition_SyncGameObjectPos.cs

@@ -3,9 +3,9 @@
 namespace ET.Client
 {
     [Event(SceneType.Current)]
-    public class ChangePosition_SyncGameObjectPos: AEvent<Scene, EventType.ChangePosition>
+    public class ChangePosition_SyncGameObjectPos: AEvent<Scene, ChangePosition>
     {
-        protected override async ETTask Run(Scene scene, EventType.ChangePosition args)
+        protected override async ETTask Run(Scene scene, ChangePosition args)
         {
             Unit unit = args.Unit;
             GameObjectComponent gameObjectComponent = unit.GetComponent<GameObjectComponent>();

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/Demo/Unit/ChangeRotation_SyncGameObjectRotation.cs

@@ -3,9 +3,9 @@ using UnityEngine;
 namespace ET.Client
 {
     [Event(SceneType.Current)]
-    public class ChangeRotation_SyncGameObjectRotation: AEvent<Scene, EventType.ChangeRotation>
+    public class ChangeRotation_SyncGameObjectRotation: AEvent<Scene, ChangeRotation>
     {
-        protected override async ETTask Run(Scene scene, EventType.ChangeRotation args)
+        protected override async ETTask Run(Scene scene, ChangeRotation args)
         {
             Unit unit = args.Unit;
             GameObjectComponent gameObjectComponent = unit.GetComponent<GameObjectComponent>();

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/LockStep/LSSceneChangeStart_AddComponent.cs

@@ -3,9 +3,9 @@ using UnityEngine.SceneManagement;
 namespace ET.Client
 {
     [Event(SceneType.LockStep)]
-    public class LSSceneChangeStart_AddComponent: AEvent<Scene, EventType.LSSceneChangeStart>
+    public class LSSceneChangeStart_AddComponent: AEvent<Scene, LSSceneChangeStart>
     {
-        protected override async ETTask Run(Scene clientScene, EventType.LSSceneChangeStart args)
+        protected override async ETTask Run(Scene clientScene, LSSceneChangeStart args)
         {
             Room room = clientScene.GetComponent<Room>();
             room.AddComponent<ResourcesLoaderComponent>();

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/LockStep/LSSceneInitFinish_Finish.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
     [Event(SceneType.LockStep)]
-    public class LSSceneInitFinish_Finish: AEvent<Scene, EventType.LSSceneInitFinish>
+    public class LSSceneInitFinish_Finish: AEvent<Scene, LSSceneInitFinish>
     {
-        protected override async ETTask Run(Scene clientScene, EventType.LSSceneInitFinish args)
+        protected override async ETTask Run(Scene clientScene, LSSceneInitFinish args)
         {
             Room room = clientScene.GetComponent<Room>();
             

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/LockStep/Scene/AfterCreateClientScene_LSAddComponent.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
     [Event(SceneType.LockStep)]
-    public class AfterCreateClientScene_LSAddComponent: AEvent<Scene, EventType.AfterCreateClientScene>
+    public class AfterCreateClientScene_LSAddComponent: AEvent<Scene, AfterCreateClientScene>
     {
-        protected override async ETTask Run(Scene scene, EventType.AfterCreateClientScene args)
+        protected override async ETTask Run(Scene scene, AfterCreateClientScene args)
         {
             scene.AddComponent<UIComponent>();
             scene.AddComponent<ResourcesLoaderComponent>();

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/LockStep/UI/UILSLobby/LoginFinish_CreateUILSLobby.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
 	[Event(SceneType.LockStep)]
-	public class LoginFinish_CreateUILSLobby: AEvent<Scene, EventType.LoginFinish>
+	public class LoginFinish_CreateUILSLobby: AEvent<Scene, LoginFinish>
 	{
-		protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
+		protected override async ETTask Run(Scene scene, LoginFinish args)
 		{
 			await UIHelper.Create(scene, UIType.UILSLobby, UILayer.Mid);
 		}

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/LockStep/UI/UILSLogin/AppStartInitFinish_CreateUILSLogin.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
 	[Event(SceneType.LockStep)]
-	public class AppStartInitFinish_CreateUILSLogin: AEvent<Scene, EventType.AppStartInitFinish>
+	public class AppStartInitFinish_CreateUILSLogin: AEvent<Scene, AppStartInitFinish>
 	{
-		protected override async ETTask Run(Scene root, EventType.AppStartInitFinish args)
+		protected override async ETTask Run(Scene root, AppStartInitFinish args)
 		{
 			await UIHelper.Create(root, UIType.UILSLogin, UILayer.Mid);
 		}

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/LockStep/UI/UILSLogin/LoginFinish_RemoveLoginUI.cs

@@ -1,9 +1,9 @@
 namespace ET.Client
 {
 	[Event(SceneType.LockStep)]
-	public class LoginFinish_RemoveUILSLogin: AEvent<Scene, EventType.LoginFinish>
+	public class LoginFinish_RemoveUILSLogin: AEvent<Scene, LoginFinish>
 	{
-		protected override async ETTask Run(Scene scene, EventType.LoginFinish args)
+		protected override async ETTask Run(Scene scene, LoginFinish args)
 		{
 			await UIHelper.Remove(scene, UIType.UILSLogin);
 		}

+ 31 - 31
Unity/Assets/Scripts/Loader/Plugins/HybridCLR/Generated/AOTGenericReferences.cs

@@ -21,20 +21,20 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
 	// }} 
 
 	// {{ AOT generic types
-	// ET.AEvent<object,ET.EventType.AfterCreateClientScene>
-	// ET.AEvent<object,ET.EventType.AfterCreateCurrentScene>
-	// ET.AEvent<object,ET.EventType.AfterUnitCreate>
-	// ET.AEvent<object,ET.EventType.AppStartInitFinish>
-	// ET.AEvent<object,ET.EventType.ChangePosition>
-	// ET.AEvent<object,ET.EventType.ChangeRotation>
-	// ET.AEvent<object,ET.EventType.EntryEvent1>
-	// ET.AEvent<object,ET.EventType.EntryEvent3>
-	// ET.AEvent<object,ET.EventType.LSSceneChangeStart>
-	// ET.AEvent<object,ET.EventType.LSSceneInitFinish>
-	// ET.AEvent<object,ET.EventType.LoginFinish>
-	// ET.AEvent<object,ET.EventType.NumbericChange>
-	// ET.AEvent<object,ET.EventType.SceneChangeFinish>
-	// ET.AEvent<object,ET.EventType.SceneChangeStart>
+	// ET.AEvent<object,AfterCreateClientScene>
+	// ET.AEvent<object,AfterCreateCurrentScene>
+	// ET.AEvent<object,AfterUnitCreate>
+	// ET.AEvent<object,AppStartInitFinish>
+	// ET.AEvent<object,ChangePosition>
+	// ET.AEvent<object,ChangeRotation>
+	// ET.AEvent<object,EntryEvent1>
+	// ET.AEvent<object,EntryEvent3>
+	// ET.AEvent<object,LSSceneChangeStart>
+	// ET.AEvent<object,LSSceneInitFinish>
+	// ET.AEvent<object,LoginFinish>
+	// ET.AEvent<object,NumbericChange>
+	// ET.AEvent<object,SceneChangeFinish>
+	// ET.AEvent<object,SceneChangeStart>
 	// ET.AInvokeHandler<ET.FiberInit,object>
 	// ET.AInvokeHandler<ET.MailBoxInvoker>
 	// ET.ATimer<object>
@@ -184,23 +184,23 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
 		// object ET.Entity.GetParent<object>()
 		// System.Void ET.Entity.RemoveComponent<object>()
 		// ET.SceneType ET.EnumHelper.FromString<ET.SceneType>(string)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.AfterCreateCurrentScene>(object,ET.EventType.AfterCreateCurrentScene)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.AfterUnitCreate>(object,ET.EventType.AfterUnitCreate)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.ChangePosition>(object,ET.EventType.ChangePosition)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.ChangeRotation>(object,ET.EventType.ChangeRotation)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.EnterMapFinish>(object,ET.EventType.EnterMapFinish)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.LSSceneInitFinish>(object,ET.EventType.LSSceneInitFinish)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.MoveStart>(object,ET.EventType.MoveStart)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.MoveStop>(object,ET.EventType.MoveStop)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.NumbericChange>(object,ET.EventType.NumbericChange)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.SceneChangeFinish>(object,ET.EventType.SceneChangeFinish)
-		// System.Void ET.EventSystem.Publish<object,ET.EventType.SceneChangeStart>(object,ET.EventType.SceneChangeStart)
-		// ET.ETTask ET.EventSystem.PublishAsync<object,ET.EventType.AppStartInitFinish>(object,ET.EventType.AppStartInitFinish)
-		// ET.ETTask ET.EventSystem.PublishAsync<object,ET.EventType.EntryEvent1>(object,ET.EventType.EntryEvent1)
-		// ET.ETTask ET.EventSystem.PublishAsync<object,ET.EventType.EntryEvent2>(object,ET.EventType.EntryEvent2)
-		// ET.ETTask ET.EventSystem.PublishAsync<object,ET.EventType.EntryEvent3>(object,ET.EventType.EntryEvent3)
-		// ET.ETTask ET.EventSystem.PublishAsync<object,ET.EventType.LSSceneChangeStart>(object,ET.EventType.LSSceneChangeStart)
-		// ET.ETTask ET.EventSystem.PublishAsync<object,ET.EventType.LoginFinish>(object,ET.EventType.LoginFinish)
+		// System.Void ET.EventSystem.Publish<object,AfterCreateCurrentScene>(object,AfterCreateCurrentScene)
+		// System.Void ET.EventSystem.Publish<object,AfterUnitCreate>(object,AfterUnitCreate)
+		// System.Void ET.EventSystem.Publish<object,ChangePosition>(object,ChangePosition)
+		// System.Void ET.EventSystem.Publish<object,ChangeRotation>(object,ChangeRotation)
+		// System.Void ET.EventSystem.Publish<object,EnterMapFinish>(object,EnterMapFinish)
+		// System.Void ET.EventSystem.Publish<object,LSSceneInitFinish>(object,LSSceneInitFinish)
+		// System.Void ET.EventSystem.Publish<object,MoveStart>(object,MoveStart)
+		// System.Void ET.EventSystem.Publish<object,MoveStop>(object,MoveStop)
+		// System.Void ET.EventSystem.Publish<object,NumbericChange>(object,NumbericChange)
+		// System.Void ET.EventSystem.Publish<object,SceneChangeFinish>(object,SceneChangeFinish)
+		// System.Void ET.EventSystem.Publish<object,SceneChangeStart>(object,SceneChangeStart)
+		// ET.ETTask ET.EventSystem.PublishAsync<object,AppStartInitFinish>(object,AppStartInitFinish)
+		// ET.ETTask ET.EventSystem.PublishAsync<object,EntryEvent1>(object,EntryEvent1)
+		// ET.ETTask ET.EventSystem.PublishAsync<object,EntryEvent2>(object,EntryEvent2)
+		// ET.ETTask ET.EventSystem.PublishAsync<object,EntryEvent3>(object,EntryEvent3)
+		// ET.ETTask ET.EventSystem.PublishAsync<object,LSSceneChangeStart>(object,LSSceneChangeStart)
+		// ET.ETTask ET.EventSystem.PublishAsync<object,LoginFinish>(object,LoginFinish)
 		// object ET.MongoHelper.FromJson<object>(string)
 		// System.Void ET.MongoHelper.RegisterStruct<ET.LSInput>()
 		// System.Void ET.ObjectHelper.Swap<object>(object&,object&)

+ 1 - 1
Unity/Assets/Scripts/Model/Client/Demo/NetClient/A2NetClient_Message.cs

@@ -1,4 +1,4 @@
-namespace ET
+namespace ET.Client
 {
     [Message]
     public class A2NetClient_Message: MessageObject, IMessage

+ 7 - 10
Unity/Assets/Scripts/Model/Client/LockStep/EventType.cs

@@ -1,14 +1,11 @@
-namespace ET
+namespace ET.Client
 {
-    namespace EventType
+    public struct LSSceneChangeStart
+    {
+        public Room Room;
+    }
+    
+    public struct LSSceneInitFinish
     {
-        public struct LSSceneChangeStart
-        {
-            public Room Room;
-        }
-        
-        public struct LSSceneInitFinish
-        {
-        }
     }
 }

+ 1 - 1
Unity/Assets/Scripts/Model/Client/LockStep/WaitType.cs

@@ -1,4 +1,4 @@
-namespace ET
+namespace ET.Client
 {
     namespace WaitType
     {

+ 1 - 1
Unity/Assets/Scripts/Model/Server/Demo/Robot/Case/RobotCase_SecondCase.cs

@@ -1,4 +1,4 @@
-namespace ET
+namespace ET.Server
 {
     public struct RobotCase_SecondCaseWait: IWaitType
     {

+ 8 - 11
Unity/Assets/Scripts/Model/Server/Module/AOI/AOIEventType.cs

@@ -1,17 +1,14 @@
 namespace ET.Server
 {
-	namespace EventType
+	public struct UnitEnterSightRange
 	{
-		public struct UnitEnterSightRange
-		{
-			public AOIEntity A;
-			public AOIEntity B;
-		}
+		public AOIEntity A;
+		public AOIEntity B;
+	}
 
-		public struct UnitLeaveSightRange
-		{
-			public AOIEntity A;
-			public AOIEntity B;
-		}
+	public struct UnitLeaveSightRange
+	{
+		public AOIEntity A;
+		public AOIEntity B;
 	}
 }

+ 1 - 1
Unity/Assets/Scripts/Model/Server/Module/Message/MessageSender.cs

@@ -1,6 +1,6 @@
 using System.Collections.Generic;
 
-namespace ET
+namespace ET.Server
 {
     [ComponentOf(typeof(Scene))]
     public class MessageSender: Entity, IAwake, IDestroy

+ 1 - 1
Unity/Assets/Scripts/Model/Server/Module/NetInner/A2NetInner_Message.cs

@@ -1,6 +1,6 @@
 using MemoryPack;
 
-namespace ET
+namespace ET.Server
 {
     [Message(1)]
     public class A2NetInner_Message: MessageObject, IMessage

+ 28 - 31
Unity/Assets/Scripts/Model/Share/Demo/EventType.cs

@@ -1,38 +1,35 @@
-namespace ET
+namespace ET.Client
 {
-    namespace EventType
-    {
-        public struct SceneChangeStart
-        {
-        }
-        
-        public struct SceneChangeFinish
-        {
-        }
-        
-        public struct AfterCreateClientScene
-        {
-        }
-        
-        public struct AfterCreateCurrentScene
-        {
-        }
+    public struct SceneChangeStart
+    {
+    }
+    
+    public struct SceneChangeFinish
+    {
+    }
+    
+    public struct AfterCreateClientScene
+    {
+    }
+    
+    public struct AfterCreateCurrentScene
+    {
+    }
 
-        public struct AppStartInitFinish
-        {
-        }
+    public struct AppStartInitFinish
+    {
+    }
 
-        public struct LoginFinish
-        {
-        }
+    public struct LoginFinish
+    {
+    }
 
-        public struct EnterMapFinish
-        {
-        }
+    public struct EnterMapFinish
+    {
+    }
 
-        public struct AfterUnitCreate
-        {
-            public Unit Unit;
-        }
+    public struct AfterUnitCreate
+    {
+        public Unit Unit;
     }
 }

+ 9 - 12
Unity/Assets/Scripts/Model/Share/Entry.cs

@@ -1,18 +1,15 @@
 namespace ET
 {
-    namespace EventType
+    public struct EntryEvent1
+    {
+    }   
+    
+    public struct EntryEvent2
+    {
+    } 
+    
+    public struct EntryEvent3
     {
-        public struct EntryEvent1
-        {
-        }   
-        
-        public struct EntryEvent2
-        {
-        } 
-        
-        public struct EntryEvent3
-        {
-        } 
     }
     
     public static class Entry

+ 6 - 9
Unity/Assets/Scripts/Model/Share/Module/Move/MoveEventType.cs

@@ -1,15 +1,12 @@
 namespace ET
 {
-    namespace EventType
+    public struct MoveStart
     {
-        public struct MoveStart
-        {
-            public Unit Unit;
-        }
+        public Unit Unit;
+    }
 
-        public struct MoveStop
-        {
-            public Unit Unit;
-        }
+    public struct MoveStop
+    {
+        public Unit Unit;
     }
 }

+ 1 - 1
Unity/Assets/Scripts/Model/Share/Module/Numeric/INumericWatcher.cs

@@ -2,6 +2,6 @@
 {
 	public interface INumericWatcher
 	{
-		void Run(Unit unit, EventType.NumbericChange args);
+		void Run(Unit unit, NumbericChange args);
 	}
 }

+ 6 - 9
Unity/Assets/Scripts/Model/Share/Module/Numeric/NumericComponent.cs

@@ -61,7 +61,7 @@ namespace ET
             if (isPublicEvent)
             {
                 EventSystem.Instance.Publish(self.Scene(),
-                    new EventType.NumbericChange() { Unit = self.GetParent<Unit>(), New = value, Old = oldValue, NumericType = numericType });
+                    new NumbericChange() { Unit = self.GetParent<Unit>(), New = value, Old = oldValue, NumericType = numericType });
             }
         }
 
@@ -89,15 +89,12 @@ namespace ET
         }
     }
     
-    namespace EventType
+    public struct NumbericChange
     {
-        public struct NumbericChange
-        {
-            public Unit Unit;
-            public int NumericType;
-            public long Old;
-            public long New;
-        }
+        public Unit Unit;
+        public int NumericType;
+        public long Old;
+        public long New;
     }
 
     [ComponentOf(typeof (Unit))]

+ 1 - 1
Unity/Assets/Scripts/Model/Share/Module/Numeric/NumericWatcherComponent.cs

@@ -44,7 +44,7 @@ namespace ET
             }
         }
         
-        public void Run(Unit unit, EventType.NumbericChange args)
+        public void Run(Unit unit, NumbericChange args)
         {
             List<NumericWatcherInfo> list;
             if (!this.allWatchers.TryGetValue(args.NumericType, out list))

+ 2 - 2
Unity/Assets/Scripts/Model/Share/Module/Unit/Unit.cs

@@ -26,7 +26,7 @@ namespace ET
             {
                 float3 oldPos = this.position;
                 this.position = value;
-                EventSystem.Instance.Publish(this.Scene(), new EventType.ChangePosition() { Unit = this, OldPos = oldPos });
+                EventSystem.Instance.Publish(this.Scene(), new ChangePosition() { Unit = this, OldPos = oldPos });
             }
         }
 
@@ -47,7 +47,7 @@ namespace ET
             set
             {
                 this.rotation = value;
-                EventSystem.Instance.Publish(this.Scene(), new EventType.ChangeRotation() { Unit = this });
+                EventSystem.Instance.Publish(this.Scene(), new ChangeRotation() { Unit = this });
             }
         }
 

+ 7 - 10
Unity/Assets/Scripts/Model/Share/Module/Unit/UnitEventType.cs

@@ -2,17 +2,14 @@
 
 namespace ET
 {
-    namespace EventType
+    public struct ChangePosition
     {
-        public struct ChangePosition
-        {
-            public Unit Unit;
-            public float3 OldPos;
-        }
+        public Unit Unit;
+        public float3 OldPos;
+    }
 
-        public struct ChangeRotation
-        {
-            public Unit Unit;
-        }
+    public struct ChangeRotation
+    {
+        public Unit Unit;
     }
 }