Răsfoiți Sursa

mongodb解析配置文件

tanghai 8 ani în urmă
părinte
comite
b7a290d93c

BIN
Unity/Assets/Res/Config/BuffConfig.txt


+ 1 - 1
Unity/Assets/Scripts/Base/Config/ACategory.cs

@@ -27,7 +27,7 @@ namespace Model
 					{
 						continue;
 					}
-					T t = JsonHelper.FromJson<T>(str2);
+					T t = MongoHelper.FromJson<T>(str2);
 					this.dict.Add(t.Id, t);
 				}
 				catch (Exception e)

+ 1 - 0
Unity/Assets/Scripts/Base/Object/Disposer.cs

@@ -8,6 +8,7 @@ namespace Model
 		[BsonIgnoreIfDefault]
 		[BsonDefaultValue(1L)]
 		[BsonElement]
+		[BsonId]
 		public long Id { get; set; }
 		
 		protected Disposer()

+ 1 - 1
Unity/Assets/Scripts/Component/Config/BuffConfig.cs

@@ -3,7 +3,7 @@
 	public class BuffConfig: AConfig
 	{
 		public string Name { get; set; }
-		public int Time { get; set; }
+		public int Duration { get; set; }
 
 		public BuffConfig()
 		{