Преглед изворни кода

增加了动态加载逻辑模块的功能,可以支持reload了

tanghai пре 12 година
родитељ
комит
b9650abb71
33 измењених фајлова са 394 додато и 75 уклоњено
  1. 12 0
      CSharp/App/Editor/Editor.csproj
  2. 8 10
      CSharp/App/Infrastructure/AutoPopulateExportedViewsBehavior.cs
  3. 8 0
      CSharp/App/Modules/WCFClient/WCFClient.csproj
  4. 4 3
      CSharp/App/Modules/WCFClient/WCFClientView.xaml
  5. 48 31
      CSharp/CSharp.sln
  6. 5 5
      CSharp/Game/BehaviorTree/BehaviorTree.csproj
  7. 1 1
      CSharp/Game/BehaviorTree/BlackBoard.cs
  8. 4 4
      CSharp/Game/BehaviorTreeTest/BehaviorTreeTest.csproj
  9. 14 0
      CSharp/Game/Handler/ChatHandler.cs
  10. 42 0
      CSharp/Game/Handler/Dispatcher.cs
  11. 64 0
      CSharp/Game/Handler/Handler.csproj
  12. 36 0
      CSharp/Game/Handler/Properties/AssemblyInfo.cs
  13. 1 2
      CSharp/Game/World/AllConfigManager.cs
  14. 1 1
      CSharp/Game/World/Buff.cs
  15. 1 1
      CSharp/Game/World/BuffManager.cs
  16. 1 1
      CSharp/Game/World/ConfigManager.cs
  17. 26 0
      CSharp/Game/World/HandlerAttribute.cs
  18. 1 1
      CSharp/Game/World/IConfigInitialize.cs
  19. 8 0
      CSharp/Game/World/IDispatcher.cs
  20. 7 0
      CSharp/Game/World/IHandle.cs
  21. 1 1
      CSharp/Game/World/IType.cs
  22. 7 0
      CSharp/Game/World/MessageEnv.cs
  23. 1 1
      CSharp/Game/World/Object.cs
  24. 0 0
      CSharp/Game/World/Packages.config
  25. 0 0
      CSharp/Game/World/Properties/AssemblyInfo.cs
  26. 49 0
      CSharp/Game/World/World.cs
  27. 11 2
      CSharp/Game/World/World.csproj
  28. 2 5
      CSharp/Game/WorldTest/BuffManagerTest.cs
  29. 1 1
      CSharp/Game/WorldTest/ObjectTest.cs
  30. 0 0
      CSharp/Game/WorldTest/Properties/AssemblyInfo.cs
  31. 24 0
      CSharp/Game/WorldTest/WorldTest.cs
  32. 6 5
      CSharp/Game/WorldTest/WorldTest.csproj
  33. 0 0
      CSharp/Game/WorldTest/packages.config

+ 12 - 0
CSharp/App/Editor/Editor.csproj

@@ -66,11 +66,23 @@
     </Reference>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.Composition" />
     <Reference Include="System.ComponentModel.Composition" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.ServiceModel" />
     <Reference Include="System.Xml" />
     <Reference Include="System.Xml" />
     <Reference Include="System.Core" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xaml">
     <Reference Include="System.Xaml">
       <RequiredTargetFramework>4.0</RequiredTargetFramework>
       <RequiredTargetFramework>4.0</RequiredTargetFramework>
     </Reference>
     </Reference>
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="Telerik.Windows.Controls, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Controls.Chart, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Controls.DataVisualization, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Controls.Navigation, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Data, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="UIAutomationProvider" />
+    <Reference Include="UIAutomationTypes" />
     <Reference Include="WindowsBase" />
     <Reference Include="WindowsBase" />
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationFramework" />
     <Reference Include="PresentationFramework" />

+ 8 - 10
CSharp/App/Infrastructure/AutoPopulateExportedViewsBehavior.cs

@@ -27,15 +27,11 @@ namespace Infrastructure
 		[ImportMany(AllowRecomposition = true)]
 		[ImportMany(AllowRecomposition = true)]
 		public Lazy<object, IViewRegionRegistration>[] RegisteredViews { get; set; }
 		public Lazy<object, IViewRegionRegistration>[] RegisteredViews { get; set; }
 
 
-		#region IPartImportsSatisfiedNotification Members
-
 		public void OnImportsSatisfied()
 		public void OnImportsSatisfied()
 		{
 		{
 			this.AddRegisteredViews();
 			this.AddRegisteredViews();
 		}
 		}
 
 
-		#endregion
-
 		protected override void OnAttach()
 		protected override void OnAttach()
 		{
 		{
 			this.AddRegisteredViews();
 			this.AddRegisteredViews();
@@ -50,14 +46,16 @@ namespace Infrastructure
 
 
 			foreach (var viewEntry in this.RegisteredViews)
 			foreach (var viewEntry in this.RegisteredViews)
 			{
 			{
-				if (viewEntry.Metadata.RegionName == this.Region.Name)
+				if (viewEntry.Metadata.RegionName != this.Region.Name)
 				{
 				{
-					object view = viewEntry.Value;
+					continue;
+				}
 
 
-					if (!this.Region.Views.Contains(view))
-					{
-						this.Region.Add(view);
-					}
+				object view = viewEntry.Value;
+
+				if (!this.Region.Views.Contains(view))
+				{
+					this.Region.Add(view);
 				}
 				}
 			}
 			}
 		}
 		}

+ 8 - 0
CSharp/App/Modules/WCFClient/WCFClient.csproj

@@ -51,6 +51,7 @@
     </Reference>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.Composition" />
     <Reference Include="System.ComponentModel.Composition" />
+    <Reference Include="System.Configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Data" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.ServiceModel" />
     <Reference Include="System.ServiceModel" />
@@ -65,6 +66,13 @@
     <Reference Include="System.Xaml">
     <Reference Include="System.Xaml">
       <RequiredTargetFramework>4.0</RequiredTargetFramework>
       <RequiredTargetFramework>4.0</RequiredTargetFramework>
     </Reference>
     </Reference>
+    <Reference Include="Telerik.Windows.Controls, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Controls.Chart, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Controls.DataVisualization, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Controls.Navigation, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="Telerik.Windows.Data, Version=2013.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
+    <Reference Include="UIAutomationProvider" />
+    <Reference Include="UIAutomationTypes" />
     <Reference Include="WindowsBase" />
     <Reference Include="WindowsBase" />
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationFramework" />
     <Reference Include="PresentationFramework" />

+ 4 - 3
CSharp/App/Modules/WCFClient/WCFClientView.xaml

@@ -1,11 +1,12 @@
-<UserControl x:Class="Modules.WCFClient.WCFClientView"
+<UserControl
 		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
 		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
 		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
 		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+		xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="Modules.WCFClient.WCFClientView" 
 		mc:Ignorable="d" 
 		mc:Ignorable="d" 
 		d:DesignHeight="300" d:DesignWidth="300">
 		d:DesignHeight="300" d:DesignWidth="300">
-    <Grid>
-		<Button Content="Button" HorizontalAlignment="Left" Margin="108,118,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
+	<Grid>
+		<Button Content="Button" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
 	</Grid>
 	</Grid>
 </UserControl>
 </UserControl>

+ 48 - 31
CSharp/CSharp.sln

@@ -1,6 +1,8 @@
 
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}"
 EndProject
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{EAEF8202-B3F6-4F9B-9EFD-41C374433612}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{EAEF8202-B3F6-4F9B-9EFD-41C374433612}"
@@ -50,14 +52,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFClient", "App\Modules\WC
 EndProject
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Game", "Game", "{D0CC1FF4-2747-4278-A51F-BE9AA959175B}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Game", "Game", "{D0CC1FF4-2747-4278-A51F-BE9AA959175B}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Component", "Game\Component\Component.csproj", "{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentTest", "Game\ComponentTest\ComponentTest.csproj", "{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BehaviorTree", "Game\BehaviorTree\BehaviorTree.csproj", "{C4E7A34A-095C-4983-AB63-FC2D20CD6824}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BehaviorTree", "Game\BehaviorTree\BehaviorTree.csproj", "{C4E7A34A-095C-4983-AB63-FC2D20CD6824}"
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BehaviorTreeTest", "Game\BehaviorTreeTest\BehaviorTreeTest.csproj", "{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BehaviorTreeTest", "Game\BehaviorTreeTest\BehaviorTreeTest.csproj", "{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}"
 EndProject
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Handler", "Game\Handler\Handler.csproj", "{CB5BCF0A-4741-477A-94C6-49ECA782555F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "World", "Game\World\World.csproj", "{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorldTest", "Game\WorldTest\WorldTest.csproj", "{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}"
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -266,30 +270,6 @@ Global
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Win32.ActiveCfg = Release|Any CPU
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Win32.ActiveCfg = Release|Any CPU
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|x86.ActiveCfg = Release|Any CPU
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|x86.ActiveCfg = Release|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Win32.ActiveCfg = Debug|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Any CPU.Build.0 = Release|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Win32.ActiveCfg = Release|Any CPU
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|x86.ActiveCfg = Release|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Win32.ActiveCfg = Debug|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Any CPU.Build.0 = Release|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Mixed Platforms.Build.0 = Release|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Win32.ActiveCfg = Release|Any CPU
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|x86.ActiveCfg = Release|Any CPU
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -314,6 +294,42 @@ Global
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}.Release|Win32.ActiveCfg = Release|Any CPU
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}.Release|Win32.ActiveCfg = Release|Any CPU
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}.Release|x86.ActiveCfg = Release|Any CPU
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236}.Release|x86.ActiveCfg = Release|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Release|Win32.ActiveCfg = Release|Any CPU
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F}.Release|x86.ActiveCfg = Release|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Any CPU.Build.0 = Release|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|Win32.ActiveCfg = Release|Any CPU
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}.Release|x86.ActiveCfg = Release|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|Win32.ActiveCfg = Release|Any CPU
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE
@@ -336,9 +352,10 @@ Global
 		{5AA48F9A-455D-4CD8-A605-A3AC38283E60} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
 		{5AA48F9A-455D-4CD8-A605-A3AC38283E60} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
 		{B07D70E7-F902-4F67-A486-B7AF27D6B813} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
 		{87537C92-B2C7-4E46-A6FB-02B73215C100} = {FD5F443E-CBEE-443E-821D-C47C86E09534}
 		{87537C92-B2C7-4E46-A6FB-02B73215C100} = {FD5F443E-CBEE-443E-821D-C47C86E09534}
-		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
-		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
 		{C4E7A34A-095C-4983-AB63-FC2D20CD6824} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
 		{DD6F4735-E8E2-4F10-AE2B-434AB3A40236} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
+		{CB5BCF0A-4741-477A-94C6-49ECA782555F} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
+		{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
+		{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67} = {D0CC1FF4-2747-4278-A51F-BE9AA959175B}
 	EndGlobalSection
 	EndGlobalSection
 EndGlobal
 EndGlobal

+ 5 - 5
CSharp/Game/BehaviorTree/BehaviorTree.csproj

@@ -60,13 +60,13 @@
     <Compile Include="Sequence.cs" />
     <Compile Include="Sequence.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\Component\Component.csproj">
-      <Project>{cbedbe33-a883-4bfa-ae0a-8b3573f09bd0}</Project>
-      <Name>Component</Name>
-    </ProjectReference>
+    <None Include="Packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="Packages.config" />
+    <ProjectReference Include="..\World\World.csproj">
+      <Project>{cbedbe33-a883-4bfa-ae0a-8b3573f09bd0}</Project>
+      <Name>World</Name>
+    </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />

+ 1 - 1
CSharp/Game/BehaviorTree/BlackBoard.cs

@@ -1,4 +1,4 @@
-using Component;
+using World;
 
 
 namespace BehaviorTree
 namespace BehaviorTree
 {
 {

+ 4 - 4
CSharp/Game/BehaviorTreeTest/BehaviorTreeTest.csproj

@@ -61,11 +61,11 @@
     </ProjectReference>
     </ProjectReference>
     <ProjectReference Include="..\BehaviorTree\BehaviorTree.csproj">
     <ProjectReference Include="..\BehaviorTree\BehaviorTree.csproj">
       <Project>{c4e7a34a-095c-4983-ab63-fc2d20cd6824}</Project>
       <Project>{c4e7a34a-095c-4983-ab63-fc2d20cd6824}</Project>
-      <Name>BehaviorTree %28Game\BehaviorTree%29</Name>
+      <Name>BehaviorTree</Name>
     </ProjectReference>
     </ProjectReference>
-    <ProjectReference Include="..\Component\Component.csproj">
-      <Project>{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}</Project>
-      <Name>Component</Name>
+    <ProjectReference Include="..\World\World.csproj">
+      <Project>{cbedbe33-a883-4bfa-ae0a-8b3573f09bd0}</Project>
+      <Name>World</Name>
     </ProjectReference>
     </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <Choose>
   <Choose>

+ 14 - 0
CSharp/Game/Handler/ChatHandler.cs

@@ -0,0 +1,14 @@
+using Log;
+using World;
+
+namespace Handler
+{
+	[HandlerAttribute(1)]
+	class ChatHandler: IHandle
+	{
+		public void Handle(MessageEnv messageEnv, byte[] content)
+		{
+			Logger.Debug("111111111111111111111111");
+		}
+	}
+}

+ 42 - 0
CSharp/Game/Handler/Dispatcher.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using World;
+
+namespace Handler
+{
+	public class Dispatcher : IDispatcher
+    {
+	    private readonly Dictionary<short, IHandle> handlers = new Dictionary<short, IHandle>();
+
+		public Dispatcher()
+		{
+			Type[] types = typeof (Dispatcher).Assembly.GetTypes();
+			foreach (var type in types)
+			{
+				object[] attrs = type.GetCustomAttributes(typeof(HandlerAttribute), false);
+				if (attrs.Length == 0)
+				{
+					continue;
+				}
+				var handler = (IHandle)Activator.CreateInstance(type);
+				short opcode = ((HandlerAttribute)attrs[0]).Opcode;
+				if (handlers.ContainsKey(opcode))
+				{
+					throw new Exception(string.Format("same opcode {0}", opcode));
+				}
+				handlers[opcode] = handler;
+			}
+		}
+
+	    public void Dispatch(MessageEnv messageEnv, short opcode, byte[] content)
+	    {
+		    IHandle handler = null;
+			if (!handlers.TryGetValue(opcode, out handler))
+			{
+				throw new Exception(string.Format("not found handler opcode {0}", opcode));
+			}
+
+			handler.Handle(messageEnv, content);
+	    }
+	}
+}

+ 64 - 0
CSharp/Game/Handler/Handler.csproj

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{CB5BCF0A-4741-477A-94C6-49ECA782555F}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Handler</RootNamespace>
+    <AssemblyName>Handler</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\Bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ChatHandler.cs" />
+    <Compile Include="Dispatcher.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Platform\Log\Log.csproj">
+      <Project>{72e16572-fc1f-4a9e-bc96-035417239298}</Project>
+      <Name>Log</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\World\World.csproj">
+      <Project>{cbedbe33-a883-4bfa-ae0a-8b3573f09bd0}</Project>
+      <Name>World</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 36 - 0
CSharp/Game/Handler/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的常规信息通过以下
+// 特性集控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Logic")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Logic")]
+[assembly: AssemblyCopyright("Copyright ©  2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 使此程序集中的类型
+// 对 COM 组件不可见。  如果需要从 COM 访问此程序集中的类型,
+// 则将该类型上的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("f6d7a707-2a9f-4eac-9776-f3c56e4cd55a")]
+
+// 程序集的版本信息由下面四个值组成: 
+//
+//      主版本
+//      次版本 
+//      生成号
+//      修订号
+//
+// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”: 
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 1 - 2
CSharp/Game/Component/AllConfigManager.cs → CSharp/Game/World/AllConfigManager.cs

@@ -1,9 +1,8 @@
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.ComponentModel;
 using System.IO;
 using System.IO;
-using System.Reflection;
 
 
-namespace Component
+namespace World
 {
 {
 	public class AllConfigManager
 	public class AllConfigManager
 	{
 	{

+ 1 - 1
CSharp/Game/Component/Buff.cs → CSharp/Game/World/Buff.cs

@@ -1,5 +1,5 @@
 
 
-namespace Component
+namespace World
 {
 {
 	public class Buff: Object
 	public class Buff: Object
 	{
 	{

+ 1 - 1
CSharp/Game/Component/BuffManager.cs → CSharp/Game/World/BuffManager.cs

@@ -3,7 +3,7 @@ using System.ComponentModel;
 using MongoDB.Bson;
 using MongoDB.Bson;
 using MongoDB.Bson.Serialization.Attributes;
 using MongoDB.Bson.Serialization.Attributes;
 
 
-namespace Component
+namespace World
 {
 {
 	public class BuffManager: ISupportInitialize
 	public class BuffManager: ISupportInitialize
 	{
 	{

+ 1 - 1
CSharp/Game/Component/ConfigManager.cs → CSharp/Game/World/ConfigManager.cs

@@ -3,7 +3,7 @@ using System.ComponentModel;
 using System.IO;
 using System.IO;
 using Helper;
 using Helper;
 
 
-namespace Component
+namespace World
 {
 {
 	public class ConfigManager<T> : ISupportInitialize, IConfigInitialize where T : IType
 	public class ConfigManager<T> : ISupportInitialize, IConfigInitialize where T : IType
 	{
 	{

+ 26 - 0
CSharp/Game/World/HandlerAttribute.cs

@@ -0,0 +1,26 @@
+using System;
+
+namespace Handler
+{
+	[AttributeUsage(AttributeTargets.Class)]
+	public class HandlerAttribute : Attribute
+	{
+		private short opcode;
+		public HandlerAttribute(short opcode)
+		{
+			this.opcode = opcode;
+		}
+
+		public short Opcode
+		{
+			get
+			{
+				return this.opcode;
+			}
+			set
+			{
+				this.opcode = value;
+			}
+		}
+	}
+}

+ 1 - 1
CSharp/Game/Component/IConfigInitialize.cs → CSharp/Game/World/IConfigInitialize.cs

@@ -1,5 +1,5 @@
 
 
-namespace Component
+namespace World
 {
 {
 	public interface IConfigInitialize
 	public interface IConfigInitialize
 	{
 	{

+ 8 - 0
CSharp/Game/World/IDispatcher.cs

@@ -0,0 +1,8 @@
+
+namespace World
+{
+	public interface IDispatcher
+	{
+		void Dispatch(MessageEnv messageEnv, short opcode, byte[] content);
+	}
+}

+ 7 - 0
CSharp/Game/World/IHandle.cs

@@ -0,0 +1,7 @@
+namespace World
+{
+	public interface IHandle
+	{
+		void Handle(MessageEnv messageEnv, byte[] content);
+	}
+}

+ 1 - 1
CSharp/Game/Component/IType.cs → CSharp/Game/World/IType.cs

@@ -1,4 +1,4 @@
-namespace Component
+namespace World
 {
 {
 	public interface IType
 	public interface IType
 	{
 	{

+ 7 - 0
CSharp/Game/World/MessageEnv.cs

@@ -0,0 +1,7 @@
+
+namespace World
+{
+	public class MessageEnv: Object
+	{
+	}
+}

+ 1 - 1
CSharp/Game/Component/Object.cs → CSharp/Game/World/Object.cs

@@ -1,7 +1,7 @@
 using System.Collections.Generic;
 using System.Collections.Generic;
 using MongoDB.Bson;
 using MongoDB.Bson;
 
 
-namespace Component
+namespace World
 {
 {
 	public class Object
 	public class Object
 	{
 	{

+ 0 - 0
CSharp/Game/Component/Packages.config → CSharp/Game/World/Packages.config


+ 0 - 0
CSharp/Game/Component/Properties/AssemblyInfo.cs → CSharp/Game/World/Properties/AssemblyInfo.cs


+ 49 - 0
CSharp/Game/World/World.cs

@@ -0,0 +1,49 @@
+using System;
+using System.IO;
+using Helper;
+
+namespace World
+{
+	public class World
+	{
+		private static readonly World instance = new World();
+
+		private IDispatcher dispatcher;
+
+		private World()
+		{
+			this.Load();
+		}
+
+		private void Load()
+		{
+			string dllPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Handler.dll");
+			if (!File.Exists(dllPath))
+			{
+				throw new Exception("not found handler dll!");
+			}
+			var assembly = LoaderHelper.Load(dllPath);
+			this.dispatcher = (IDispatcher)assembly.CreateInstance("Handler.Dispatcher");
+		}
+
+		public static World Instance
+		{
+			get
+			{
+				return instance;
+			}
+		}
+
+		public void Reload()
+		{
+			this.Load();
+		}
+
+		public void Dispatcher(short opcode, byte[] content)
+		{
+			var messageEnv = new MessageEnv();
+			messageEnv["world"] = this;
+			this.dispatcher.Dispatch(messageEnv, opcode, content);
+		}
+	}
+}

+ 11 - 2
CSharp/Game/Component/Component.csproj → CSharp/Game/World/World.csproj

@@ -7,8 +7,8 @@
     <ProjectGuid>{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}</ProjectGuid>
     <ProjectGuid>{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}</ProjectGuid>
     <OutputType>Library</OutputType>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Component</RootNamespace>
-    <AssemblyName>Component</AssemblyName>
+    <RootNamespace>World</RootNamespace>
+    <AssemblyName>World</AssemblyName>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
@@ -54,16 +54,25 @@
     <Compile Include="Buff.cs" />
     <Compile Include="Buff.cs" />
     <Compile Include="BuffManager.cs" />
     <Compile Include="BuffManager.cs" />
     <Compile Include="ConfigManager.cs" />
     <Compile Include="ConfigManager.cs" />
+    <Compile Include="HandlerAttribute.cs" />
     <Compile Include="IConfigInitialize.cs" />
     <Compile Include="IConfigInitialize.cs" />
+    <Compile Include="IDispatcher.cs" />
+    <Compile Include="IHandle.cs" />
     <Compile Include="IType.cs" />
     <Compile Include="IType.cs" />
+    <Compile Include="MessageEnv.cs" />
     <Compile Include="Object.cs" />
     <Compile Include="Object.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="World.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Platform\Helper\Helper.csproj">
     <ProjectReference Include="..\..\Platform\Helper\Helper.csproj">
       <Project>{24233cd5-a5df-484b-a482-b79cb7a0d9cb}</Project>
       <Project>{24233cd5-a5df-484b-a482-b79cb7a0d9cb}</Project>
       <Name>Helper</Name>
       <Name>Helper</Name>
     </ProjectReference>
     </ProjectReference>
+    <ProjectReference Include="..\..\Platform\Log\Log.csproj">
+      <Project>{72e16572-fc1f-4a9e-bc96-035417239298}</Project>
+      <Name>Log</Name>
+    </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="Packages.config" />
     <None Include="Packages.config" />

+ 2 - 5
CSharp/Game/ComponentTest/BuffManagerTest.cs → CSharp/Game/WorldTest/BuffManagerTest.cs

@@ -1,11 +1,8 @@
-using Component;
+using World;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 
-namespace ComponentTest
+namespace WorldTest
 {
 {
-	/// <summary>
-	/// BuffManagerTest
-	/// </summary>
 	[TestClass]
 	[TestClass]
 	public class BuffManagerTest
 	public class BuffManagerTest
 	{
 	{

+ 1 - 1
CSharp/Game/ComponentTest/ObjectTest.cs → CSharp/Game/WorldTest/ObjectTest.cs

@@ -1,7 +1,7 @@
 using System;
 using System;
 using Helper;
 using Helper;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Object = Component.Object;
+using Object = World.Object;
 
 
 namespace ObjectTest
 namespace ObjectTest
 {
 {

+ 0 - 0
CSharp/Game/ComponentTest/Properties/AssemblyInfo.cs → CSharp/Game/WorldTest/Properties/AssemblyInfo.cs


+ 24 - 0
CSharp/Game/WorldTest/WorldTest.cs

@@ -0,0 +1,24 @@
+using System.Threading;
+using Helper;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace WorldTest
+{
+	[TestClass]
+	public class WorldTest
+	{
+		[TestMethod]
+		public void TestReload()
+		{
+			var world = World.World.Instance;
+			world.Dispatcher(1, "tanghai".ToByteArray());
+			int count = 10;
+			while (--count != 0)
+			{
+				world.Dispatcher(1, "tanghai".ToByteArray());
+				Thread.Sleep(10000);
+				world.Reload();
+			}
+		}
+	}
+}

+ 6 - 5
CSharp/Game/ComponentTest/ComponentTest.csproj → CSharp/Game/WorldTest/WorldTest.csproj

@@ -6,8 +6,8 @@
     <ProjectGuid>{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}</ProjectGuid>
     <ProjectGuid>{F2BEB8B2-0D9B-4CD9-A4BD-AE8E00903A67}</ProjectGuid>
     <OutputType>Library</OutputType>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>ComponentTest</RootNamespace>
-    <AssemblyName>ComponentTest</AssemblyName>
+    <RootNamespace>WorldTest</RootNamespace>
+    <AssemblyName>WorldTest</AssemblyName>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -63,6 +63,7 @@
     <Compile Include="BuffManagerTest.cs" />
     <Compile Include="BuffManagerTest.cs" />
     <Compile Include="ObjectTest.cs" />
     <Compile Include="ObjectTest.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="WorldTest.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Platform\Helper\Helper.csproj">
     <ProjectReference Include="..\..\Platform\Helper\Helper.csproj">
@@ -73,9 +74,9 @@
       <Project>{72e16572-fc1f-4a9e-bc96-035417239298}</Project>
       <Project>{72e16572-fc1f-4a9e-bc96-035417239298}</Project>
       <Name>Log</Name>
       <Name>Log</Name>
     </ProjectReference>
     </ProjectReference>
-    <ProjectReference Include="..\Component\Component.csproj">
-      <Project>{CBEDBE33-A883-4BFA-AE0A-8B3573F09BD0}</Project>
-      <Name>Component</Name>
+    <ProjectReference Include="..\World\World.csproj">
+      <Project>{cbedbe33-a883-4bfa-ae0a-8b3573f09bd0}</Project>
+      <Name>World</Name>
     </ProjectReference>
     </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>

+ 0 - 0
CSharp/Game/ComponentTest/Packages.config → CSharp/Game/WorldTest/packages.config