Browse Source

【优化】服务器目录结构

johnclot69 1 year ago
parent
commit
7479fc7285

+ 1 - 0
DotNet/Model/Module/Actor/AMActorHandler.cs → DotNet/Hotfix/Module/Actor/AMActorHandler.cs

@@ -2,6 +2,7 @@
 
 namespace ET.Server
 {
+    [EnableClass]
     public abstract class AMActorHandler<E, Message>: IMActorHandler where E : Entity where Message : class, IActorMessage
     {
         protected abstract ETTask Run(E entity, Message message);

+ 1 - 0
DotNet/Model/Module/Actor/AMActorRpcHandler.cs → DotNet/Hotfix/Module/Actor/AMActorRpcHandler.cs

@@ -2,6 +2,7 @@
 
 namespace ET.Server
 {
+    [EnableClass]
     public abstract class AMActorRpcHandler<E, Request, Response>: IMActorHandler where E : Entity where Request : class, IActorRequest where Response : class, IActorResponse
     {
         protected abstract ETTask Run(E unit, Request request, Response response, Action reply);

+ 1 - 0
DotNet/Model/Module/ActorLocation/AMActorLocationHandler.cs → DotNet/Hotfix/Module/ActorLocation/AMActorLocationHandler.cs

@@ -2,6 +2,7 @@
 
 namespace ET.Server
 {
+    [EnableClass]
     public abstract class AMActorLocationHandler<E, Message>: IMActorHandler where E : Entity where Message : class, IActorLocationMessage
     {
         protected abstract ETTask Run(E entity, Message message);

+ 1 - 0
DotNet/Model/Module/ActorLocation/AMActorLocationRpcHandler.cs → DotNet/Hotfix/Module/ActorLocation/AMActorLocationRpcHandler.cs

@@ -2,6 +2,7 @@
 
 namespace ET.Server
 {
+    [EnableClass]
     public abstract class AMActorLocationRpcHandler<E, Request, Response>: IMActorHandler where E : Entity where Request : class, IActorLocationRequest where Response : class, IActorLocationResponse
     {
         protected abstract ETTask Run(E unit, Request request, Response response, Action reply);

+ 0 - 0
DotNet/Hotfix/Module/Session/NetInnerComponentOnReadEvent.cs → DotNet/Hotfix/Session/NetInnerComponentOnReadEvent.cs


+ 0 - 0
DotNet/Hotfix/Module/Session/NetServerComponentOnReadEvent.cs → DotNet/Hotfix/Session/NetServerComponentOnReadEvent.cs


+ 22 - 10
Unity/Assets/Scripts/Codes/Model/Share/Entry.cs

@@ -2,37 +2,49 @@
 {
     namespace EventType
     {
-        public struct EntryLoadCfg { }
-        public struct EntryEvent1 { }   
-        public struct EntryEvent2 { } 
-        public struct EntryEvent3 { } 
+        public struct EntryLoadCfg
+        {
+        }
+
+        public struct EntryEvent1
+        {
+        }
+
+        public struct EntryEvent2
+        {
+        }
+
+        public struct EntryEvent3
+        {
+        }
     }
-    
+
     public static class Entry
     {
         public static void Init()
         {
         }
-        
+
         public static void Start()
         {
             StartAsync().Coroutine();
         }
-        
+
         private static async ETTask StartAsync()
         {
             Log.Debug("Entry start");
             WinPeriod.Init();
-            
+
             MongoHelper.Init();
             ProtobufHelper.Init();
-            
+
             Game.AddSingleton<NetServices>();
             Game.AddSingleton<Root>();
             await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryLoadCfg());
+
             await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent1());
             await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent2());
             await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent3());
         }
     }
-}
+}