Procházet zdrojové kódy

修复导表 导proto错误

tanghai před 2 roky
rodič
revize
e6d3730516

+ 4 - 3
Share/Tool/Init.cs

@@ -28,13 +28,14 @@ namespace ET.Server
                 Game.AddSingleton<Logger>().ILog = new NLogger(Options.Instance.AppType.ToString(), Options.Instance.Process, "../Config/NLog/NLog.config");
                 Game.AddSingleton<ObjectPool>();
                 Game.AddSingleton<IdGenerater>();
-                Game.AddSingleton<EventSystem>();
-                Game.AddSingleton<Root>();
                 
                 ETTask.ExceptionHandler += Log.Error;
-
+                
+                Game.AddSingleton<EventSystem>();
                 Dictionary<string, Type> types = AssemblyHelper.GetAssemblyTypes(typeof (Game).Assembly);
                 EventSystem.Instance.Add(types);
+                
+                Game.AddSingleton<Root>();
 
                 MongoHelper.Init();
                 ProtobufHelper.Init();

+ 12 - 0
Unity/Assets/Config/Proto/OuterMessage_C_10001.proto

@@ -210,6 +210,18 @@ message M2C_TestRobotCase // IActorLocationResponse
 	int32 N = 4;
 }
 
+message C2M_TestRobotCase2 // IActorLocationMessage
+{
+	int32 RpcId = 1;
+	int32 N = 2;
+}
+
+message M2C_TestRobotCase2 // IActorLocationMessage
+{
+	int32 RpcId = 1;
+	int32 N = 2;
+}
+
 //ResponseType M2C_TransferMap
 message C2M_TransferMap // IActorLocationRequest
 {

+ 1 - 1
Unity/Assets/Scripts/Core/Module/EventSystem/EventSystem.cs

@@ -77,7 +77,7 @@ namespace ET
         
         private Dictionary<Type, Dictionary<int, object>> allInvokes = new(); 
 
-        private TypeSystems typeSystems = new();
+        private TypeSystems typeSystems;
 
         private readonly Queue<long>[] queues = new Queue<long>[(int)InstanceQueueIndex.Max];