Просмотр исходного кода

服务端Controller改名成Hotfix,更容易懂

tanghai 9 лет назад
Родитель
Сommit
f241346a90

+ 1 - 1
Server/App/Program.cs

@@ -12,7 +12,7 @@ namespace App
 			try
 			{
 				Game.EntityEventManager.Register("Model", typeof(Game).Assembly);
-				Game.EntityEventManager.Register("Controller", DllHelper.GetController());
+				Game.EntityEventManager.Register("Hotfix", DllHelper.GetHotfixAssembly());
 
 				Options options = Game.Scene.AddComponent<OptionComponent, string[]>(args).Options;
 				StartConfig startConfig = Game.Scene.AddComponent<StartConfigComponent, string, int>(options.Config, options.AppId).StartConfig;

+ 1 - 1
Server/Controller/Component/RealmGateAddressComponent.cs → Server/Hotfix/Component/RealmGateAddressComponent.cs

@@ -1,6 +1,6 @@
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[EntityEvent(typeof(RealmGateAddressComponent))]
 	public static class RealmGateAddressComponentE

+ 1 - 1
Server/Controller/Message/C2G_LoginGateHandler.cs → Server/Hotfix/Message/C2G_LoginGateHandler.cs

@@ -2,7 +2,7 @@
 using Base;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.Gate)]
 	public class C2G_LoginGateHandler : AMRpcHandler<C2G_LoginGate, G2C_LoginGate>

+ 1 - 1
Server/Controller/Message/C2M_ReloadHandler.cs → Server/Hotfix/Message/C2M_ReloadHandler.cs

@@ -2,7 +2,7 @@
 using Base;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.Manager)]
 	public class C2M_ReloadHandler: AMRpcHandler<C2M_Reload, M2C_Reload>

+ 1 - 1
Server/Controller/Message/C2R_LoginHandler.cs → Server/Hotfix/Message/C2R_LoginHandler.cs

@@ -2,7 +2,7 @@
 using Base;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.Realm)]
 	public class C2R_LoginHandler: AMRpcHandler<C2R_Login, R2C_Login>

+ 1 - 1
Server/Controller/Message/C2R_PingHandler.cs → Server/Hotfix/Message/C2R_PingHandler.cs

@@ -1,7 +1,7 @@
 using System;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.Realm)]
 	public class C2R_PingHandler : AMRpcHandler<C2R_Ping, R2C_Ping>

+ 1 - 1
Server/Controller/Message/G2G_LockReleaseRequestHandler.cs → Server/Hotfix/Message/G2G_LockReleaseRequestHandler.cs

@@ -2,7 +2,7 @@
 using Base;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.Gate)]
 	public class G2G_LockReleaseRequestHandler : AMRpcHandler<G2G_LockReleaseRequest, G2G_LockReleaseResponse>

+ 1 - 1
Server/Controller/Message/G2G_LockRequestHandler.cs → Server/Hotfix/Message/G2G_LockRequestHandler.cs

@@ -2,7 +2,7 @@
 using Base;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.Gate)]
 	public class G2G_LockRequestHandler : AMRpcHandler<G2G_LockRequest, G2G_LockResponse>

+ 2 - 2
Server/Controller/Message/M2A_ReloadHandler.cs → Server/Hotfix/Message/M2A_ReloadHandler.cs

@@ -2,7 +2,7 @@
 using Base;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.AllServer)]
 	public class M2A_ReloadHandler : AMRpcHandler<M2A_Reload, A2M_Reload>
@@ -12,7 +12,7 @@ namespace Controller
 			A2M_Reload response = new A2M_Reload();
 			try
 			{
-				Game.EntityEventManager.Register("Controller", DllHelper.GetController());
+				Game.EntityEventManager.Register("Controller", DllHelper.GetHotfixAssembly());
 				reply(response);
 			}
 			catch (Exception e)

+ 1 - 1
Server/Controller/Message/R2G_GetLoginKeyHandler.cs → Server/Hotfix/Message/R2G_GetLoginKeyHandler.cs

@@ -2,7 +2,7 @@
 using Base;
 using Model;
 
-namespace Controller
+namespace Hotfix
 {
 	[MessageHandler(AppType.Gate)]
 	public class R2G_GetLoginKeyHandler : AMRpcHandler<R2G_GetLoginKey, G2R_GetLoginKey>

+ 0 - 0
Server/Controller/Properties/AssemblyInfo.cs → Server/Hotfix/Properties/AssemblyInfo.cs


+ 2 - 5
Server/Controller/Server.Controller.csproj → Server/Hotfix/Server.Hotfix.csproj

@@ -7,8 +7,8 @@
     <ProjectGuid>{3878BD71-2F75-4EDF-882F-BC708154B1B0}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Controller</RootNamespace>
-    <AssemblyName>Controller</AssemblyName>
+    <RootNamespace>Hotfix</RootNamespace>
+    <AssemblyName>Hotfix</AssemblyName>
     <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
   </PropertyGroup>
@@ -34,9 +34,6 @@
     <Reference Include="System.Core" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="..\..\Unity\Controller\Component\BenchmarkComponentE.cs">
-      <Link>Component\BenchmarkComponentE.cs</Link>
-    </Compile>
     <Compile Include="Component\RealmGateAddressComponent.cs" />
     <Compile Include="Message\C2G_LoginGateHandler.cs" />
     <Compile Include="Message\C2R_PingHandler.cs" />

+ 4 - 4
Server/Model/Helper/DllHelper.cs

@@ -5,13 +5,13 @@ namespace Model
 {
 	public static class DllHelper
 	{
-		public static Assembly GetController()
+		public static Assembly GetHotfixAssembly()
 		{
-			byte[] dllBytes = File.ReadAllBytes("./Controller.dll");
+			byte[] dllBytes = File.ReadAllBytes("./Hotfix.dll");
 #if __MonoCS__
-			byte[] pdbBytes = File.ReadAllBytes("./Controller.dll.mdb");
+			byte[] pdbBytes = File.ReadAllBytes("./Hotfix.dll.mdb");
 #else
-			byte[] pdbBytes = File.ReadAllBytes("./Controller.pdb");
+			byte[] pdbBytes = File.ReadAllBytes("./Hotfix.pdb");
 #endif
 			Assembly assembly = Assembly.Load(dllBytes, pdbBytes);
 			return assembly;

+ 14 - 14
Server/Server.sln

@@ -7,14 +7,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server.Base", "Base\Server.
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server.Model", "Model\Server.Model.csproj", "{820D3488-76B9-4EE8-872A-BE06C2350B20}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server.Controller", "Controller\Server.Controller.csproj", "{3878BD71-2F75-4EDF-882F-BC708154B1B0}"
-EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ThirdParty", "ThirdParty", "{01CCAD69-09B1-42F9-8A39-489268BEE18D}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server.App", "App\Server.App.csproj", "{3F8DC04C-9E05-403F-B6A5-36293EB99937}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ENet", "ThirdParty\ENet\ENet.vcxproj", "{C9992B7C-313E-4C9F-A954-640D01EDFB58}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server.Hotfix", "Hotfix\Server.Hotfix.csproj", "{3878BD71-2F75-4EDF-882F-BC708154B1B0}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -49,18 +49,6 @@ Global
 		{820D3488-76B9-4EE8-872A-BE06C2350B20}.Release|x64.Build.0 = Release|Any CPU
 		{820D3488-76B9-4EE8-872A-BE06C2350B20}.Release|x86.ActiveCfg = Release|Any CPU
 		{820D3488-76B9-4EE8-872A-BE06C2350B20}.Release|x86.Build.0 = Release|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x64.Build.0 = Debug|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x86.Build.0 = Debug|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|Any CPU.Build.0 = Release|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x64.ActiveCfg = Release|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x64.Build.0 = Release|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x86.ActiveCfg = Release|Any CPU
-		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x86.Build.0 = Release|Any CPU
 		{3F8DC04C-9E05-403F-B6A5-36293EB99937}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{3F8DC04C-9E05-403F-B6A5-36293EB99937}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{3F8DC04C-9E05-403F-B6A5-36293EB99937}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -84,6 +72,18 @@ Global
 		{C9992B7C-313E-4C9F-A954-640D01EDFB58}.Release|x64.Build.0 = Release|x64
 		{C9992B7C-313E-4C9F-A954-640D01EDFB58}.Release|x86.ActiveCfg = Release|Win32
 		{C9992B7C-313E-4C9F-A954-640D01EDFB58}.Release|x86.Build.0 = Release|Win32
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x64.Build.0 = Debug|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Debug|x86.Build.0 = Debug|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x64.ActiveCfg = Release|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x64.Build.0 = Release|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x86.ActiveCfg = Release|Any CPU
+		{3878BD71-2F75-4EDF-882F-BC708154B1B0}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 0 - 9
Unity/Assets/Res/UI.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 8b06a970ef104ca4b80bb09e7e1e2e66
-folderAsset: yes
-timeCreated: 1486452416
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Unity/Assets/Scripts/Component/Unit.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: a6777dcb4aea2ef4fb129b4bfd059aa7
-folderAsset: yes
-timeCreated: 1479442397
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 1
Unity/Assets/Scripts/Helper/DllHelper.cs

@@ -5,7 +5,7 @@ namespace Model
 {
 	public static class DllHelper
 	{
-		public static Assembly GetController()
+		public static Assembly GetHotfixAssembly()
 		{
 			GameObject code = (GameObject) Resources.Load("Code");
 			byte[] assBytes = code.Get<TextAsset>("Controller.dll").bytes;

+ 6 - 7
Unity/Unity.csproj

@@ -322,10 +322,6 @@
     <Compile Include="Assets\ILRuntime\Mono.Cecil.Pdb\pdb\Mono.Cecil.Pdb\PdbWriter.cs" />
     <Compile Include="Assets\ILRuntime\Mono.Cecil.Pdb\pdb\Mono.Cecil.Pdb\SymDocumentWriter.cs" />
     <Compile Include="Assets\ILRuntime\Mono.Cecil.Pdb\pdb\Mono.Cecil.Pdb\SymWriter.cs" />
-    <Compile Include="Assets\Scripts\BehaviorTreeNode\Root.cs" />
-    <Compile Include="Assets\Scripts\BehaviorTreeNode\Selector.cs" />
-    <Compile Include="Assets\Scripts\BehaviorTreeNode\Sequence.cs" />
-    <Compile Include="Assets\Scripts\BehaviorTreeNode\True.cs" />
     <Compile Include="Assets\Scripts\BehaviorTree\BTEnv.cs" />
     <Compile Include="Assets\Scripts\BehaviorTree\BTEnvKey.cs" />
     <Compile Include="Assets\Scripts\BehaviorTree\BehaviorNodeConfig.cs" />
@@ -376,7 +372,10 @@
     <Compile Include="Assets\Scripts\BehaviorTree\NodePropAttribute.cs" />
     <Compile Include="Assets\Scripts\BehaviorTree\NodeProto.cs" />
     <Compile Include="Assets\Scripts\BehaviorTree\ValueBase.cs" />
-    <Compile Include="Assets\Scripts\Component\ILRuntimeComponent.cs" />
+    <Compile Include="Assets\Scripts\BehaviorTreeNode\Root.cs" />
+    <Compile Include="Assets\Scripts\BehaviorTreeNode\Selector.cs" />
+    <Compile Include="Assets\Scripts\BehaviorTreeNode\Sequence.cs" />
+    <Compile Include="Assets\Scripts\BehaviorTreeNode\True.cs" />
     <Compile Include="Assets\Scripts\Component\BenchmarkComponent.cs" />
     <Compile Include="Assets\Scripts\Component\ChildrenComponent.cs" />
     <Compile Include="Assets\Scripts\Component\ClientConfigComponent.cs" />
@@ -387,6 +386,7 @@
     <Compile Include="Assets\Scripts\Component\ConfigComponent.cs" />
     <Compile Include="Assets\Scripts\Component\EventComponent.cs" />
     <Compile Include="Assets\Scripts\Component\GameObjectComponent.cs" />
+    <Compile Include="Assets\Scripts\Component\ILRuntimeComponent.cs" />
     <Compile Include="Assets\Scripts\Component\KVComponent.cs" />
     <Compile Include="Assets\Scripts\Component\MessageDispatherComponent.cs" />
     <Compile Include="Assets\Scripts\Component\NetInnerComponent.cs" />
@@ -442,10 +442,10 @@
     <Compile Include="Assets\Scripts\Object\Object.cs" />
     <Compile Include="Assets\Scripts\Other\Define.cs" />
     <Compile Include="Assets\Scripts\Other\GameException.cs" />
+    <Compile Include="Assets\Scripts\Other\ILAdapterAttribute.cs" />
     <Compile Include="Assets\Scripts\Other\IUIFactory.cs" />
     <Compile Include="Assets\Scripts\Other\LayerNames.cs" />
     <Compile Include="Assets\Scripts\Other\Options.cs" />
-    <Compile Include="Assets\Scripts\Other\ILAdapterAttribute.cs" />
     <Compile Include="Assets\Scripts\Other\UIFactoryAttribute.cs" />
     <Compile Include="Assets\Scripts\Other\UIType.cs" />
     <Compile Include="Assets\Scripts\ReferenceCollector.cs" />
@@ -454,7 +454,6 @@
     <None Include="Assets\CSharp vNext Support\AsyncTools\Plugins\AsyncBridge.Net35.xml" />
     <None Include="Assets\CSharp vNext Support\AsyncTools\Plugins\System.Threading.xml" />
   </ItemGroup>
-  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
 </Project>