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

增加配置文件组件ConfigComponent,自动加载管理配置文件,可以根据AppType加载不同的配置文件

tanghai 9 лет назад
Родитель
Сommit
30c4a2d7c6
30 измененных файлов с 237 добавлено и 151 удалено
  1. 1 2
      Server/App/Program.cs
  2. 0 12
      Server/Base/Server.Base.csproj
  3. 22 0
      Server/Model/Config/ConfigHelper.cs
  4. 22 3
      Server/Model/Server.Model.csproj
  5. 0 9
      Unity/Assets/Plugins/Base/Config/ConfigAttribute.cs
  6. 94 0
      Unity/Assets/Scripts/Component/ConfigComponent.cs
  7. 2 2
      Unity/Assets/Scripts/Component/ConfigComponent.cs.meta
  8. 0 38
      Unity/Assets/Scripts/Component/GlobalConfigComponent.cs
  9. 5 14
      Unity/Assets/Scripts/Config/ACategory.cs
  10. 0 0
      Unity/Assets/Scripts/Config/ACategory.cs.meta
  11. 1 1
      Unity/Assets/Scripts/Config/AConfig.cs
  12. 0 0
      Unity/Assets/Scripts/Config/AConfig.cs.meta
  13. 0 17
      Unity/Assets/Scripts/Config/BuffProto.cs
  14. 15 0
      Unity/Assets/Scripts/Config/ConfigAttribute.cs
  15. 0 0
      Unity/Assets/Scripts/Config/ConfigAttribute.cs.meta
  16. 21 0
      Unity/Assets/Scripts/Config/ConfigHelper.cs
  17. 2 2
      Unity/Assets/Scripts/Config/ConfigHelper.cs.meta
  18. 0 33
      Unity/Assets/Scripts/Config/GlobalProto.cs
  19. 1 1
      Unity/Assets/Scripts/Config/ICategory.cs
  20. 0 0
      Unity/Assets/Scripts/Config/ICategory.cs.meta
  21. 2 5
      Unity/Assets/Scripts/Init.cs
  22. 9 0
      Unity/Assets/Scripts/Model.meta
  23. 2 2
      Unity/Assets/Scripts/Model/Config.meta
  24. 16 0
      Unity/Assets/Scripts/Model/Config/BuffConfig.cs
  25. 0 0
      Unity/Assets/Scripts/Model/Config/BuffConfig.cs.meta
  26. 9 0
      Unity/Assets/Scripts/Model/Message.meta
  27. 0 0
      Unity/Assets/Scripts/Model/Message/Message.cs
  28. 0 0
      Unity/Assets/Scripts/Model/Message/Message.cs.meta
  29. 4 6
      Unity/Unity.CSharp.Plugins.csproj
  30. 9 4
      Unity/Unity.CSharp.csproj

+ 1 - 2
Server/App/Program.cs

@@ -14,8 +14,7 @@ namespace App
 			{
 				BsonClassMapRegister.Register();
 
-				Object.ObjectManager.Register("Base", typeof(Game).Assembly);
-				Object.ObjectManager.Register("Model", typeof(ErrorCode).Assembly);
+				Object.ObjectManager.Register("Model", typeof(Game).Assembly);
 				Object.ObjectManager.Register("Controller", DllHelper.GetController());
 
 				StartConfig startConfig = Game.Scene.AddComponent<StartConfigComponent, string[]>(args).MyConfig;

+ 0 - 12
Server/Base/Server.Base.csproj

@@ -47,18 +47,6 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="..\..\Unity\Assets\Plugins\Base\Config\ACategory.cs">
-      <Link>Config\ACategory.cs</Link>
-    </Compile>
-    <Compile Include="..\..\Unity\Assets\Plugins\Base\Config\AConfig.cs">
-      <Link>Config\AConfig.cs</Link>
-    </Compile>
-    <Compile Include="..\..\Unity\Assets\Plugins\Base\Config\ConfigAttribute.cs">
-      <Link>Config\ConfigAttribute.cs</Link>
-    </Compile>
-    <Compile Include="..\..\Unity\Assets\Plugins\Base\Config\ICategory.cs">
-      <Link>Config\ICategory.cs</Link>
-    </Compile>
     <Compile Include="..\..\Unity\Assets\Plugins\Base\DoubleMap.cs">
       <Link>DoubleMap.cs</Link>
     </Compile>

+ 22 - 0
Server/Model/Config/ConfigHelper.cs

@@ -0,0 +1,22 @@
+using System;
+using System.IO;
+
+namespace Model
+{
+	public static class ConfigHelper
+	{
+		public static string GetText(string key)
+		{
+			string path = $@"../Config/{key}.txt";
+			try
+			{
+				string configStr = File.ReadAllText(path);
+				return configStr;
+			}
+			catch (Exception)
+			{
+				throw new Exception($"load config file fail, path: {path}");
+			}
+		}
+	}
+}

+ 22 - 3
Server/Model/Server.Model.csproj

@@ -41,6 +41,9 @@
     <Reference Include="System.Core" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="..\..\Unity\Assets\Scripts\Component\ConfigComponent.cs">
+      <Link>Component\ConfigComponent.cs</Link>
+    </Compile>
     <Compile Include="..\..\Unity\Assets\Scripts\Component\EventComponent.cs">
       <Link>Component\EventComponent.cs</Link>
     </Compile>
@@ -65,6 +68,18 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Component\TimerComponent.cs">
       <Link>Component\TimerComponent.cs</Link>
     </Compile>
+    <Compile Include="..\..\Unity\Assets\Scripts\Config\ACategory.cs">
+      <Link>Config\ACategory.cs</Link>
+    </Compile>
+    <Compile Include="..\..\Unity\Assets\Scripts\Config\AConfig.cs">
+      <Link>Config\AConfig.cs</Link>
+    </Compile>
+    <Compile Include="..\..\Unity\Assets\Scripts\Config\ConfigAttribute.cs">
+      <Link>Config\ConfigAttribute.cs</Link>
+    </Compile>
+    <Compile Include="..\..\Unity\Assets\Scripts\Config\ICategory.cs">
+      <Link>Config\ICategory.cs</Link>
+    </Compile>
     <Compile Include="..\..\Unity\Assets\Scripts\Entity\Game.cs">
       <Link>Entity\Game.cs</Link>
     </Compile>
@@ -107,9 +122,6 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Message\IMHandler.cs">
       <Link>Message\IMHandler.cs</Link>
     </Compile>
-    <Compile Include="..\..\Unity\Assets\Scripts\Message\Message.cs">
-      <Link>Message\Message.cs</Link>
-    </Compile>
     <Compile Include="..\..\Unity\Assets\Scripts\Message\MessageAttribute.cs">
       <Link>Message\MessageAttribute.cs</Link>
     </Compile>
@@ -122,6 +134,12 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Message\RpcException.cs">
       <Link>Message\RpcException.cs</Link>
     </Compile>
+    <Compile Include="..\..\Unity\Assets\Scripts\Model\Config\BuffConfig.cs">
+      <Link>Model\Config\BuffConfig.cs</Link>
+    </Compile>
+    <Compile Include="..\..\Unity\Assets\Scripts\Model\Message\Message.cs">
+      <Link>Model\Message\Message.cs</Link>
+    </Compile>
     <Compile Include="..\..\Unity\Assets\Scripts\Other\BsonClassMapRegister.cs">
       <Link>Other\BsonClassMapRegister.cs</Link>
     </Compile>
@@ -139,6 +157,7 @@
     <Compile Include="Component\GateSessionKeyComponent.cs" />
     <Compile Include="Component\RealmGateAddressComponent.cs" />
     <Compile Include="Component\StartConfigComponent.cs" />
+    <Compile Include="Config\ConfigHelper.cs" />
     <Compile Include="Helper\DllHelper.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>

+ 0 - 9
Unity/Assets/Plugins/Base/Config/ConfigAttribute.cs

@@ -1,9 +0,0 @@
-using System;
-
-namespace Base
-{
-	[AttributeUsage(AttributeTargets.Class)]
-	public class ConfigAttribute: Attribute
-	{
-	}
-}

+ 94 - 0
Unity/Assets/Scripts/Component/ConfigComponent.cs

@@ -0,0 +1,94 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using Base;
+using Object = Base.Object;
+
+namespace Model
+{
+	public class ConfigComponent: Component
+	{
+		private Dictionary<Type, ICategory> allConfig;
+
+		public void Load()
+		{
+			Assembly assembly = Object.ObjectManager.GetAssembly("Base");
+
+			this.allConfig = new Dictionary<Type, ICategory>();
+			Type[] types = assembly.GetTypes();
+
+			foreach (Type type in types)
+			{
+				object[] attrs = type.GetCustomAttributes(typeof (ConfigAttribute), false);
+				if (attrs.Length == 0)
+				{
+					continue;
+				}
+				object obj = Activator.CreateInstance(type);
+
+				ICategory iCategory = obj as ICategory;
+				if (iCategory == null)
+				{
+					throw new Exception($"class: {type.Name} not inherit from ACategory");
+				}
+				iCategory.BeginInit();
+				iCategory.EndInit();
+
+				this.allConfig[iCategory.ConfigType] = iCategory;
+			}
+		}
+
+		public T GetOne<T>() where T : AConfig
+		{
+			Type type = typeof (T);
+			ICategory configCategory;
+			if (!this.allConfig.TryGetValue(type, out configCategory))
+			{
+				throw new Exception($"ConfigComponent not found key: {type.FullName}");
+			}
+			return ((ACategory<T>) configCategory).GetOne();
+		}
+
+		public T Get<T>(long id) where T : AConfig
+		{
+			Type type = typeof (T);
+			ICategory configCategory;
+			if (!this.allConfig.TryGetValue(type, out configCategory))
+			{
+				throw new Exception($"ConfigComponent not found key: {type.FullName}");
+			}
+			return ((ACategory<T>) configCategory)[id];
+		}
+
+		public T TryGet<T>(int id) where T : AConfig
+		{
+			Type type = typeof (T);
+			ICategory configCategory;
+			if (!this.allConfig.TryGetValue(type, out configCategory))
+			{
+				return default(T);
+			}
+			return ((ACategory<T>) configCategory).TryGet(id);
+		}
+
+		public T[] GetAll<T>() where T : AConfig
+		{
+			Type type = typeof (T);
+			ICategory configCategory;
+			if (!this.allConfig.TryGetValue(type, out configCategory))
+			{
+				throw new Exception($"ConfigComponent not found key: {type.FullName}");
+			}
+			return ((ACategory<T>) configCategory).GetAll();
+		}
+
+		public T GetCategory<T>() where T : class, ICategory, new()
+		{
+			T t = new T();
+			Type type = t.ConfigType;
+			ICategory category;
+			bool ret = this.allConfig.TryGetValue(type, out category);
+			return ret? (T) category : null;
+		}
+	}
+}

+ 2 - 2
Unity/Assets/Scripts/Config/GlobalProto.cs.meta → Unity/Assets/Scripts/Component/ConfigComponent.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: afebe5c3d8b077049b9bb220a89f184f
-timeCreated: 1474944857
+guid: caa77cb967441e24b9ebf780fc97581f
+timeCreated: 1477904772
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2

+ 0 - 38
Unity/Assets/Scripts/Component/GlobalConfigComponent.cs

@@ -1,38 +0,0 @@
-using System.IO;
-using Base;
-
-namespace Model
-{
-	[ObjectEvent]
-	public class GlobalConfigComponentEvent : ObjectEvent<GlobalConfigComponent>, IAwake
-	{
-		public void Awake()
-		{
-			this.GetValue().Awake();
-		}
-	}
-
-	/// <summary>
-	/// 全局配置
-	/// </summary>
-	public class GlobalConfigComponent : Component
-	{
-		public GlobalProto GlobalProto;
-		
-		public void Awake()
-		{
-		{
-#if UNITY_EDITOR
-			string filePath = @"./GlobalProto.txt";
-#else
-			string filePath = @"../GlobalProto.txt";
-#endif
-			if (!File.Exists(filePath))
-			{
-				throw new ConfigException("没有找到配置文件GlobalProto.txt");
-			}
-			this.GlobalProto = MongoHelper.FromJson<GlobalProto>(File.ReadAllLines(filePath)[0]);
-		}
-	}
-	}
-}

+ 5 - 14
Unity/Assets/Plugins/Base/Config/ACategory.cs → Unity/Assets/Scripts/Config/ACategory.cs

@@ -1,9 +1,9 @@
 using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Linq;
+using Base;
 
-namespace Base
+namespace Model
 {
 	/// <summary>
 	/// 管理该所有的配置
@@ -16,19 +16,10 @@ namespace Base
 		public virtual void BeginInit()
 		{
 			this.dict = new Dictionary<long, T>();
+			
+			string configStr = ConfigHelper.GetText(typeof (T).Name);
 
-			string path = $@"Config/{typeof(T).Name}";
-			string configStr;
-			try
-			{
-				configStr = File.ReadAllText(path);
-			}
-			catch (Exception)
-			{
-				throw new Exception($"load config file fail, path: {path}");
-			}
-
-			foreach (string str in configStr.Split(new[] { "\r\n" }, StringSplitOptions.None))
+			foreach (string str in configStr.Split(new[] { "\n" }, StringSplitOptions.None))
 			{
 				try
 				{

+ 0 - 0
Unity/Assets/Plugins/Base/Config/ACategory.cs.meta → Unity/Assets/Scripts/Config/ACategory.cs.meta


+ 1 - 1
Unity/Assets/Plugins/Base/Config/AConfig.cs → Unity/Assets/Scripts/Config/AConfig.cs

@@ -1,7 +1,7 @@
 using System.ComponentModel;
 using MongoDB.Bson.Serialization.Attributes;
 
-namespace Base
+namespace Model
 {
 	/// <summary>
 	/// 每个Config的基类

+ 0 - 0
Unity/Assets/Plugins/Base/Config/AConfig.cs.meta → Unity/Assets/Scripts/Config/AConfig.cs.meta


+ 0 - 17
Unity/Assets/Scripts/Config/BuffProto.cs

@@ -1,17 +0,0 @@
-using Base;
-using MongoDB.Bson.Serialization.Attributes;
-
-namespace Model
-{
-	[BsonIgnoreExtraElements]
-	public class BuffProto : AConfig
-	{
-		public string Name { get; set; }
-		public int Time { get; set; }
-    }
-
-	[Config]
-	public class BuffCategory : ACategory<BuffProto>
-	{
-	}
-}

+ 15 - 0
Unity/Assets/Scripts/Config/ConfigAttribute.cs

@@ -0,0 +1,15 @@
+using System;
+
+namespace Model
+{
+	[AttributeUsage(AttributeTargets.Class)]
+	public class ConfigAttribute: Attribute
+	{
+		public AppType Type { get; }
+
+		public ConfigAttribute(AppType type)
+		{
+			this.Type = type;
+		}
+	}
+}

+ 0 - 0
Unity/Assets/Plugins/Base/Config/ConfigAttribute.cs.meta → Unity/Assets/Scripts/Config/ConfigAttribute.cs.meta


+ 21 - 0
Unity/Assets/Scripts/Config/ConfigHelper.cs

@@ -0,0 +1,21 @@
+using System;
+using UnityEngine;
+
+namespace Model
+{
+	public static class ConfigHelper
+	{
+		public static string GetText(string key)
+		{
+			try
+			{
+				string configStr = ((GameObject)Resources.Load("Config")).Get<TextAsset>(key).text;
+				return configStr;
+			}
+			catch (Exception)
+			{
+				throw new GameException($"load config file fail, key: {key}");
+			}
+		}
+	}
+}

+ 2 - 2
Unity/Assets/Scripts/Component/GlobalConfigComponent.cs.meta → Unity/Assets/Scripts/Config/ConfigHelper.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: db89fa931c9a7594abb4142f40283554
-timeCreated: 1476550923
+guid: 0e19c00909caacf4bb8cdd8e39e2e365
+timeCreated: 1477905905
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2

+ 0 - 33
Unity/Assets/Scripts/Config/GlobalProto.cs

@@ -1,33 +0,0 @@
-using Base;
-using MongoDB.Bson.Serialization.Attributes;
-
-namespace Model
-{
-	public enum AssetUrlEnum
-	{
-		Local,
-		Remote,
-		RemoteAliWeb
-	}
-
-	public enum ConfigPathEnum
-	{
-		Editor,
-		Launcher,
-		Release,
-	}
-
-	[BsonIgnoreExtraElements]
-	public class GlobalProto: AConfig
-	{
-		public NetworkProtocol Protocol = NetworkProtocol.TCP;
-		public string AssetBundleServerUrl = "http://192.168.11.200/";
-		public AssetUrlEnum AssetUrlType = AssetUrlEnum.Remote;
-		public string Host = "192.168.11.200";
-        public ushort Port = 22222;
-	    public string AssetBundleName = "global";
-		
-        [BsonDefaultValue(false)]
-        public bool IsEnglishEdition = false;
-    }
-}

+ 1 - 1
Unity/Assets/Plugins/Base/Config/ICategory.cs → Unity/Assets/Scripts/Config/ICategory.cs

@@ -1,7 +1,7 @@
 using System;
 using System.ComponentModel;
 
-namespace Base
+namespace Model
 {
 	public interface ICategory: ISupportInitialize
 	{

+ 0 - 0
Unity/Assets/Plugins/Base/Config/ICategory.cs.meta → Unity/Assets/Scripts/Config/ICategory.cs.meta


+ 2 - 5
Unity/Assets/Scripts/Init.cs

@@ -1,7 +1,5 @@
 using System;
-using System.Reflection;
 using Base;
-using MongoDB.Bson.Serialization;
 using UnityEngine;
 using Object = Base.Object;
 
@@ -12,8 +10,7 @@ namespace Model
 		private void Start()
 		{
 			BsonClassMapRegister.Register();
-			Object.ObjectManager.Register("Base", typeof(Game).Assembly);
-			Object.ObjectManager.Register("Model", typeof(Init).Assembly);
+			Object.ObjectManager.Register("Model", typeof(Game).Assembly);
 			Object.ObjectManager.Register("Controller", DllHelper.GetController());
 
 			Game.Scene.AddComponent<EventComponent>().Run(EventIdType.InitSceneStart);
@@ -23,7 +20,7 @@ namespace Model
 		{
 			try
 			{
-				Base.Object.ObjectManager.Update();
+				Object.ObjectManager.Update();
 			}
 			catch (Exception e)
 			{

+ 9 - 0
Unity/Assets/Scripts/Model.meta

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

+ 2 - 2
Unity/Assets/Plugins/Base/Config.meta → Unity/Assets/Scripts/Model/Config.meta

@@ -1,7 +1,7 @@
 fileFormatVersion: 2
-guid: f73b17142efc12244a9d9893fcc7f532
+guid: 1136de56973a671409ed0bf599b1f478
 folderAsset: yes
-timeCreated: 1474947006
+timeCreated: 1474944857
 licenseType: Pro
 DefaultImporter:
   userData: 

+ 16 - 0
Unity/Assets/Scripts/Model/Config/BuffConfig.cs

@@ -0,0 +1,16 @@
+using MongoDB.Bson.Serialization.Attributes;
+
+namespace Model
+{
+	[BsonIgnoreExtraElements]
+	public class BuffConfig : AConfig
+	{
+		public string Name { get; set; }
+		public int Time { get; set; }
+    }
+
+	[Config(AppType.Client | AppType.Gate)]
+	public class BuffCategory : ACategory<BuffConfig>
+	{
+	}
+}

+ 0 - 0
Unity/Assets/Scripts/Config/BuffProto.cs.meta → Unity/Assets/Scripts/Model/Config/BuffConfig.cs.meta


+ 9 - 0
Unity/Assets/Scripts/Model/Message.meta

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

+ 0 - 0
Unity/Assets/Scripts/Message/Message.cs → Unity/Assets/Scripts/Model/Message/Message.cs


+ 0 - 0
Unity/Assets/Scripts/Message/Message.cs.meta → Unity/Assets/Scripts/Model/Message/Message.cs.meta


+ 4 - 6
Unity/Unity.CSharp.Plugins.csproj

@@ -13,11 +13,13 @@
     <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     <TargetFrameworkProfile>Unity Full v3.5</TargetFrameworkProfile>
-    <CompilerResponseFile></CompilerResponseFile>
+    <CompilerResponseFile>
+    </CompilerResponseFile>
     <UnityProjectType>GamePlugins:3</UnityProjectType>
     <UnityBuildTarget>StandaloneWindows:5</UnityBuildTarget>
     <UnityVersion>5.4.1f1</UnityVersion>
-    <RootNamespace></RootNamespace>
+    <RootNamespace>
+    </RootNamespace>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -71,10 +73,6 @@
     </Reference>
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Assets\Plugins\Base\Config\ACategory.cs" />
-    <Compile Include="Assets\Plugins\Base\Config\AConfig.cs" />
-    <Compile Include="Assets\Plugins\Base\Config\ConfigAttribute.cs" />
-    <Compile Include="Assets\Plugins\Base\Config\ICategory.cs" />
     <Compile Include="Assets\Plugins\Base\DoubleMap.cs" />
     <Compile Include="Assets\Plugins\Base\Helper\ArrayHelper.cs" />
     <Compile Include="Assets\Plugins\Base\Helper\ByteHelper.cs" />

+ 9 - 4
Unity/Unity.CSharp.csproj

@@ -79,12 +79,12 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Assets\Scripts\Component\ConfigComponent.cs" />
     <Compile Include="Assets\Scripts\Component\RobotComponent.cs" />
     <Compile Include="Assets\Scripts\Component\ChildrenComponent.cs" />
     <Compile Include="Assets\Scripts\Component\ClientConfigComponent.cs" />
     <Compile Include="Assets\Scripts\Component\EventComponent.cs" />
     <Compile Include="Assets\Scripts\Component\GameObjectComponent.cs" />
-    <Compile Include="Assets\Scripts\Component\GlobalConfigComponent.cs" />
     <Compile Include="Assets\Scripts\Component\KVComponent.cs" />
     <Compile Include="Assets\Scripts\Component\MessageDispatherComponent.cs" />
     <Compile Include="Assets\Scripts\Component\NetInnerComponent.cs" />
@@ -92,8 +92,12 @@
     <Compile Include="Assets\Scripts\Component\NetworkComponent.cs" />
     <Compile Include="Assets\Scripts\Component\TimeComponent.cs" />
     <Compile Include="Assets\Scripts\Component\TimerComponent.cs" />
-    <Compile Include="Assets\Scripts\Config\BuffProto.cs" />
-    <Compile Include="Assets\Scripts\Config\GlobalProto.cs" />
+    <Compile Include="Assets\Scripts\Config\ACategory.cs" />
+    <Compile Include="Assets\Scripts\Config\AConfig.cs" />
+    <Compile Include="Assets\Scripts\Config\ConfigAttribute.cs" />
+    <Compile Include="Assets\Scripts\Config\ConfigHelper.cs" />
+    <Compile Include="Assets\Scripts\Config\ICategory.cs" />
+    <Compile Include="Assets\Scripts\Model\Config\BuffConfig.cs" />
     <Compile Include="Assets\Scripts\Entity\Game.cs" />
     <Compile Include="Assets\Scripts\Entity\Scene.cs" />
     <Compile Include="Assets\Scripts\Entity\Session.cs" />
@@ -112,7 +116,7 @@
     <Compile Include="Assets\Scripts\Message\AppType.cs" />
     <Compile Include="Assets\Scripts\Message\ErrorCode.cs" />
     <Compile Include="Assets\Scripts\Message\IMHandler.cs" />
-    <Compile Include="Assets\Scripts\Message\Message.cs" />
+    <Compile Include="Assets\Scripts\Model\Message\Message.cs" />
     <Compile Include="Assets\Scripts\Message\MessageAttribute.cs" />
     <Compile Include="Assets\Scripts\Message\MessageHandlerAttribute.cs" />
     <Compile Include="Assets\Scripts\Message\OpcodeHelper.cs" />
@@ -130,5 +134,6 @@
     <None Include="Assets\CSharp 6.0 Support\AsyncTools\Plugins\AsyncBridge.Net35.xml" />
     <None Include="Assets\CSharp 6.0 Support\AsyncTools\Plugins\System.Threading.xml" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildExtensionsPath)\SyntaxTree\UnityVS\2015\UnityVS.CSharp.targets" />
 </Project>