Bladeren bron

修正MessageDispatcherComponent拼写错误

tanghai 7 jaren geleden
bovenliggende
commit
175104ffa6

+ 1 - 1
Server/App/Program.cs

@@ -36,7 +36,7 @@ namespace App
 				Log.Info($"server start........................ {startConfig.AppId} {startConfig.AppType}");
 
 				Game.Scene.AddComponent<OpcodeTypeComponent>();
-				Game.Scene.AddComponent<MessageDispatherComponent>();
+				Game.Scene.AddComponent<MessageDispatcherComponent>();
 
 				// 根据不同的AppType添加不同的组件
 				OuterConfig outerConfig = startConfig.GetComponent<OuterConfig>();

+ 1 - 1
Server/Hotfix/Module/Message/InnerMessageDispatcher.cs

@@ -61,7 +61,7 @@ namespace ETHotfix
 				}
 				default:
 				{
-					Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, new MessageInfo(opcode, message));
+					Game.Scene.GetComponent<MessageDispatcherComponent>().Handle(session, new MessageInfo(opcode, message));
 					break;
 				}
 			}

+ 8 - 8
Server/Hotfix/Module/Message/MessageDispatherComponentSystem.cs

@@ -5,18 +5,18 @@ using ETModel;
 namespace ETHotfix
 {
 	[ObjectSystem]
-	public class MessageDispatherComponentAwakeSystem : AwakeSystem<MessageDispatherComponent>
+	public class MessageDispatcherComponentAwakeSystem : AwakeSystem<MessageDispatcherComponent>
 	{
-		public override void Awake(MessageDispatherComponent self)
+		public override void Awake(MessageDispatcherComponent self)
 		{
 			self.Load();
 		}
 	}
 
 	[ObjectSystem]
-	public class MessageDispatherComponentLoadSystem : LoadSystem<MessageDispatherComponent>
+	public class MessageDispatcherComponentLoadSystem : LoadSystem<MessageDispatcherComponent>
 	{
-		public override void Load(MessageDispatherComponent self)
+		public override void Load(MessageDispatcherComponent self)
 		{
 			self.Load();
 		}
@@ -25,9 +25,9 @@ namespace ETHotfix
 	/// <summary>
 	/// 消息分发组件
 	/// </summary>
-	public static class MessageDispatherComponentEx
+	public static class MessageDispatcherComponentHelper
 	{
-		public static void Load(this MessageDispatherComponent self)
+		public static void Load(this MessageDispatcherComponent self)
 		{
 			self.Handlers.Clear();
 
@@ -67,7 +67,7 @@ namespace ETHotfix
 			}
 		}
 
-		public static void RegisterHandler(this MessageDispatherComponent self, ushort opcode, IMHandler handler)
+		public static void RegisterHandler(this MessageDispatcherComponent self, ushort opcode, IMHandler handler)
 		{
 			if (!self.Handlers.ContainsKey(opcode))
 			{
@@ -76,7 +76,7 @@ namespace ETHotfix
 			self.Handlers[opcode].Add(handler);
 		}
 
-		public static void Handle(this MessageDispatherComponent self, Session session, MessageInfo messageInfo)
+		public static void Handle(this MessageDispatcherComponent self, Session session, MessageInfo messageInfo)
 		{
 			List<IMHandler> actions;
 			if (!self.Handlers.TryGetValue(messageInfo.Opcode, out actions))

+ 1 - 1
Server/Hotfix/Module/Message/OuterMessageDispatcher.cs

@@ -37,7 +37,7 @@ namespace ETHotfix
 					}
 				}
 
-				Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, new MessageInfo(opcode, message));
+				Game.Scene.GetComponent<MessageDispatcherComponent>().Handle(session, new MessageInfo(opcode, message));
 			}
 			catch (Exception e)
 			{

+ 1 - 1
Server/Model/Module/Message/MessageDispatherComponent.cs → Server/Model/Module/Message/MessageDispatcherComponent.cs

@@ -5,7 +5,7 @@ namespace ETModel
 	/// <summary>
 	/// 消息分发组件
 	/// </summary>
-	public class MessageDispatherComponent : Component
+	public class MessageDispatcherComponent : Component
 	{
 		public readonly Dictionary<ushort, List<IMHandler>> Handlers = new Dictionary<ushort, List<IMHandler>>();
 	}

+ 1 - 1
Unity/Assets/Hotfix/Init.cs

@@ -18,7 +18,7 @@ namespace ETHotfix
 				
 				Game.Scene.AddComponent<UIComponent>();
 				Game.Scene.AddComponent<OpcodeTypeComponent>();
-				Game.Scene.AddComponent<MessageDispatherComponent>();
+				Game.Scene.AddComponent<MessageDispatcherComponent>();
 
 				// 加载热更配置
 				ETModel.Game.Scene.GetComponent<ResourcesComponent>().LoadBundle("config.unity3d");

+ 8 - 8
Unity/Assets/Hotfix/Module/Message/MessageDispatherComponent.cs → Unity/Assets/Hotfix/Module/Message/MessageDispatcherComponent.cs

@@ -5,18 +5,18 @@ using ETModel;
 namespace ETHotfix
 {
 	[ObjectSystem]
-	public class MessageDispatherComponentAwakeSystem : AwakeSystem<MessageDispatherComponent>
+	public class MessageDispatcherComponentAwakeSystem : AwakeSystem<MessageDispatcherComponent>
 	{
-		public override void Awake(MessageDispatherComponent self)
+		public override void Awake(MessageDispatcherComponent self)
 		{
 			self.Awake();
 		}
 	}
 
 	[ObjectSystem]
-	public class MessageDispatherComponentLoadSystem : LoadSystem<MessageDispatherComponent>
+	public class MessageDispatcherComponentLoadSystem : LoadSystem<MessageDispatcherComponent>
 	{
-		public override void Load(MessageDispatherComponent self)
+		public override void Load(MessageDispatcherComponent self)
 		{
 			self.Load();
 		}
@@ -25,7 +25,7 @@ namespace ETHotfix
 	/// <summary>
 	/// 消息分发组件
 	/// </summary>
-	public class MessageDispatherComponent : Component
+	public class MessageDispatcherComponent : Component
 	{
 		private readonly Dictionary<ushort, List<IMHandler>> handlers = new Dictionary<ushort, List<IMHandler>>();
 
@@ -38,7 +38,7 @@ namespace ETHotfix
 		{
 			this.handlers.Clear();
 
-			ETModel.MessageDispatherComponent messageDispatherComponent = ETModel.Game.Scene.GetComponent<ETModel.MessageDispatherComponent>();
+			ETModel.MessageDispatcherComponent messageDispatcherComponent = ETModel.Game.Scene.GetComponent<ETModel.MessageDispatcherComponent>();
 			ETModel.OpcodeTypeComponent opcodeTypeComponent = ETModel.Game.Scene.GetComponent<ETModel.OpcodeTypeComponent>();
 
 			List<Type> types = Game.EventSystem.GetTypes();
@@ -66,7 +66,7 @@ namespace ETHotfix
 				}
 
 				// 尝试注册到mono层
-				if (messageDispatherComponent != null && opcodeTypeComponent != null)
+				if (messageDispatcherComponent != null && opcodeTypeComponent != null)
 				{
 					ushort monoOpcode = opcodeTypeComponent.GetOpcode(messageType);
 					if (monoOpcode == 0)
@@ -75,7 +75,7 @@ namespace ETHotfix
 					}
 
 					MessageProxy messageProxy = new MessageProxy(messageType, (session, o) => { iMHandler.Handle(session, o); });
-					messageDispatherComponent.RegisterHandler(monoOpcode, messageProxy);
+					messageDispatcherComponent.RegisterHandler(monoOpcode, messageProxy);
 				}
 			}
 		}

+ 1 - 1
Unity/Assets/Hotfix/Module/Message/MessageDispatherComponent.cs.meta → Unity/Assets/Hotfix/Module/Message/MessageDispatcherComponent.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 468d6431a15c50e42be415ce03d671c1
+guid: 2c5e3350a88eaef468e363ce00f9bd3e
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Unity/Assets/Hotfix/Module/Message/Session.cs

@@ -79,7 +79,7 @@ namespace ETHotfix
 				return;
 			}
 
-			Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, new MessageInfo(opcode, message));
+			Game.Scene.GetComponent<MessageDispatcherComponent>().Handle(session, new MessageInfo(opcode, message));
 		}
 
 		public void Send(IMessage message)

+ 2 - 2
Unity/Assets/Model/ILBinding/ETModel_Entity_Binding.cs

@@ -91,7 +91,7 @@ namespace ILRuntime.Runtime.Generated
                     }
                 }
             }
-            args = new Type[]{typeof(ETModel.MessageDispatherComponent)};
+            args = new Type[]{typeof(ETModel.MessageDispatcherComponent)};
             if (genericMethods.TryGetValue("GetComponent", out lst))
             {
                 foreach(var m in lst)
@@ -270,7 +270,7 @@ namespace ILRuntime.Runtime.Generated
             ETModel.Entity instance_of_this_method = (ETModel.Entity)typeof(ETModel.Entity).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
-            var result_of_this_method = instance_of_this_method.GetComponent<ETModel.MessageDispatherComponent>();
+            var result_of_this_method = instance_of_this_method.GetComponent<ETModel.MessageDispatcherComponent>();
 
             object obj_result_of_this_method = result_of_this_method;
             if(obj_result_of_this_method is CrossBindingAdaptorType)

+ 2 - 2
Unity/Assets/Model/ILBinding/ETModel_MessageDispatherComponent_Binding.cs

@@ -21,7 +21,7 @@ namespace ILRuntime.Runtime.Generated
             BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
             MethodBase method;
             Type[] args;
-            Type type = typeof(ETModel.MessageDispatherComponent);
+            Type type = typeof(ETModel.MessageDispatcherComponent);
             args = new Type[]{typeof(System.UInt16), typeof(ETModel.IMHandler)};
             method = type.GetMethod("RegisterHandler", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, RegisterHandler_0);
@@ -44,7 +44,7 @@ namespace ILRuntime.Runtime.Generated
             System.UInt16 @opcode = (ushort)ptr_of_this_method->Value;
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
-            ETModel.MessageDispatherComponent instance_of_this_method = (ETModel.MessageDispatherComponent)typeof(ETModel.MessageDispatherComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            ETModel.MessageDispatcherComponent instance_of_this_method = (ETModel.MessageDispatcherComponent)typeof(ETModel.MessageDispatcherComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
             instance_of_this_method.RegisterHandler(@opcode, @handler);

+ 1 - 1
Unity/Assets/Model/Init.cs

@@ -39,7 +39,7 @@ namespace ETModel
 				Game.Scene.AddComponent<ConfigComponent>();
 				Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle("config.unity3d");
 				Game.Scene.AddComponent<OpcodeTypeComponent>();
-				Game.Scene.AddComponent<MessageDispatherComponent>();
+				Game.Scene.AddComponent<MessageDispatcherComponent>();
 
 				Game.Hotfix.GotoHotfix();
 

+ 5 - 5
Unity/Assets/Model/Module/Message/MessageDispatherComponent.cs → Unity/Assets/Model/Module/Message/MessageDispatcherComponent.cs

@@ -4,18 +4,18 @@ using System.Collections.Generic;
 namespace ETModel
 {
 	[ObjectSystem]
-	public class MessageDispatherComponentAwakeSystem : AwakeSystem<MessageDispatherComponent>
+	public class MessageDispatcherComponentAwakeSystem : AwakeSystem<MessageDispatcherComponent>
 	{
-		public override void Awake(MessageDispatherComponent t)
+		public override void Awake(MessageDispatcherComponent t)
 		{
 			t.Awake();
 		}
 	}
 
 	[ObjectSystem]
-	public class MessageDispatherComponentLoadSystem : LoadSystem<MessageDispatherComponent>
+	public class MessageDispatcherComponentLoadSystem : LoadSystem<MessageDispatcherComponent>
 	{
-		public override void Load(MessageDispatherComponent self)
+		public override void Load(MessageDispatcherComponent self)
 		{
 			self.Load();
 		}
@@ -24,7 +24,7 @@ namespace ETModel
 	/// <summary>
 	/// 消息分发组件
 	/// </summary>
-	public class MessageDispatherComponent : Component
+	public class MessageDispatcherComponent : Component
 	{
 		private readonly Dictionary<ushort, List<IMHandler>> handlers = new Dictionary<ushort, List<IMHandler>>();
 

+ 11 - 0
Unity/Assets/Model/Module/Message/MessageDispatcherComponent.cs.meta

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

+ 0 - 3
Unity/Assets/Model/Module/Message/MessageDispatherComponent.cs.meta

@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: f6a1591f4b7a4121a01428af98aed2c1
-timeCreated: 1503745497

+ 1 - 1
Unity/Assets/Model/Module/Message/OuterMessageDispatcher.cs

@@ -6,7 +6,7 @@
 		{
 			// 普通消息或者是Rpc请求消息
 			MessageInfo messageInfo = new MessageInfo(opcode, message);
-			Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, messageInfo);
+			Game.Scene.GetComponent<MessageDispatcherComponent>().Handle(session, messageInfo);
 		}
 	}
 }

+ 1 - 1
Unity/Unity.Hotfix.csproj

@@ -101,7 +101,7 @@
     <Compile Include="Assets\Hotfix\Module\Message\HotfixOpcode.cs" />
     <Compile Include="Assets\Hotfix\Module\Message\IMessage.cs" />
     <Compile Include="Assets\Hotfix\Module\Message\IMHandler.cs" />
-    <Compile Include="Assets\Hotfix\Module\Message\MessageDispatherComponent.cs" />
+    <Compile Include="Assets\Hotfix\Module\Message\MessageDispatcherComponent.cs" />
     <Compile Include="Assets\Hotfix\Module\Message\MessagePool.cs" />
     <Compile Include="Assets\Hotfix\Module\Message\OpcodeTypeComponent.cs" />
     <Compile Include="Assets\Hotfix\Module\Message\Session.cs" />

+ 1 - 1
Unity/Unity.Model.csproj

@@ -300,7 +300,7 @@
     <Compile Include="Assets\Model\Module\Message\IMessagePacker.cs" />
     <Compile Include="Assets\Model\Module\Message\IMHandler.cs" />
     <Compile Include="Assets\Model\Module\Message\MessageAttribute.cs" />
-    <Compile Include="Assets\Model\Module\Message\MessageDispatherComponent.cs" />
+    <Compile Include="Assets\Model\Module\Message\MessageDispatcherComponent.cs" />
     <Compile Include="Assets\Model\Module\Message\MessageHandlerAttribute.cs" />
     <Compile Include="Assets\Model\Module\Message\MessageInfo.cs" />
     <Compile Include="Assets\Model\Module\Message\MessagePool.cs" />