Bladeren bron

删除了Mongodb在unity中的使用,主要是ios不支持

tanghai 8 jaren geleden
bovenliggende
commit
ffc141373d

+ 1 - 1
Unity/Hotfix/Component/MessageDispatherComponent.cs

@@ -79,7 +79,7 @@ namespace Hotfix
 			}
 
 			Type messageType = this.opcodeTypes.GetValueByKey(messageInfo.Opcode);
-			object message = MongoHelper.FromBson(messageType, messageInfo.MessageBytes, messageInfo.Offset, messageInfo.Count);
+			object message = JsonHelper.FromJson(messageType, messageInfo.MessageBytes, messageInfo.Offset, messageInfo.Count);
 			messageInfo.Message = message;
 
 			foreach (IInstanceMethod ev in actions)

+ 1 - 1
Unity/Hotfix/Config/ACategory.cs

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

+ 0 - 5
Unity/Hotfix/Object/Object.cs

@@ -25,10 +25,5 @@ namespace Hotfix
 		public virtual void Dispose()
 		{
 		}
-
-		public object Clone()
-		{
-			return MongoHelper.FromBson(this.GetType(), this.ToBson());
-		}
 	}
 }

+ 0 - 33
Unity/Hotfix/Other/Options.cs

@@ -1,33 +0,0 @@
-using System;
-using Model;
-using MongoDB.Bson;
-
-#if SERVER
-using CommandLine;
-#endif
-
-namespace Hotfix
-{
-	public class Options: ICloneable
-	{
-#if SERVER
-		[Option("appId", Required = true)]
-#endif
-		public int AppId { get; set; }
-
-#if SERVER
-		[Option("appType", Required = true)]
-#endif
-		public AppType AppType { get; set; }
-
-#if SERVER
-		[Option("config", Required = false, DefaultValue = "Start.txt")]
-#endif
-		public string Config { get; set; }
-
-		public object Clone()
-		{
-			return MongoHelper.FromBson<Options>(this.ToBson());
-		}
-	}
-}

+ 0 - 1
Unity/Hotfix/Unity.Hotfix.csproj

@@ -138,7 +138,6 @@
     <Compile Include="Other\ILBindingAttribute.cs" />
     <Compile Include="Other\IUIFactory.cs" />
     <Compile Include="Other\LayerNames.cs" />
-    <Compile Include="Other\Options.cs" />
     <Compile Include="Other\UIFactoryAttribute.cs" />
     <Compile Include="Other\UIType.cs" />
     <Compile Include="UI\UILobby\Event\InitSceneStart_CreateLobbyUI.cs" />