瀏覽代碼

修复一个消息分发到IL层的bug

tanghai 8 年之前
父節點
當前提交
553aae8635
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Unity/Assets/Scripts/Component/MessageDispatherComponent.cs

+ 2 - 2
Unity/Assets/Scripts/Component/MessageDispatherComponent.cs

@@ -40,7 +40,7 @@ namespace Model
 		{
 		{
 			appDomain = Init.Instance.AppDomain;
 			appDomain = Init.Instance.AppDomain;
 			this.instance = this.appDomain.Instantiate(type.FullName);
 			this.instance = this.appDomain.Instantiate(type.FullName);
-			this.method = this.instance.Type.GetMethod(methodName);
+			this.method = this.instance.Type.GetMethod(methodName, 2);
 			int n = this.method.ParameterCount;
 			int n = this.method.ParameterCount;
 			this.param = new object[n];
 			this.param = new object[n];
 		}
 		}
@@ -113,7 +113,7 @@ namespace Model
 				}
 				}
 				MessageHandlerAttribute messageHandlerAttribute = (MessageHandlerAttribute)attrs[0];
 				MessageHandlerAttribute messageHandlerAttribute = (MessageHandlerAttribute)attrs[0];
 #if ILRuntime
 #if ILRuntime
-				IMessageMethod iMessageMethod = new IMessageILMethod(type, "Run");
+				IMessageMethod iMessageMethod = new IMessageILMethod(type, "Handle");
 #else
 #else
 				IMHandler iMHandler = (IMHandler)Activator.CreateInstance(type);
 				IMHandler iMHandler = (IMHandler)Activator.CreateInstance(type);
 				IMessageMethod iMessageMethod = new IMessageMonoMethod(iMHandler);
 				IMessageMethod iMessageMethod = new IMessageMonoMethod(iMHandler);