Selaa lähdekoodia

DBProxyComponent忘了添加ObjectEvent辅助类

tanghai 8 vuotta sitten
vanhempi
commit
b322dae8fb

+ 4 - 4
Server/Model/Component/DBComponent.cs

@@ -3,11 +3,11 @@
 namespace Model
 {
 	[ObjectEvent]
-	public class DBComponentEvent : ObjectEvent<DBComponent>, IStart
+	public class DBComponentEvent : ObjectEvent<DBComponent>, IAwake
 	{
-		public void Start()
+		public void Awake()
 		{
-			this.Get().Start();
+			this.Get().Awake();
 		}
 	}
 
@@ -19,7 +19,7 @@ namespace Model
 		public MongoClient mongoClient;
 		public IMongoDatabase database;
 
-		public void Start()
+		public void Awake()
 		{
 			//DBConfig config = Game.Scene.GetComponent<StartConfigComponent>().StartConfig.GetComponent<DBConfig>();
 			//string connectionString = config.ConnectionString;

+ 9 - 0
Server/Model/Component/DBProxyComponent.cs

@@ -4,6 +4,15 @@ using System.Threading.Tasks;
 
 namespace Model
 {
+	[ObjectEvent]
+	public class DBProxyComponentEvent : ObjectEvent<DBProxyComponent>, IAwake
+	{
+		public void Awake()
+		{
+			this.Get().Awake();
+		}
+	}
+	
 	/// <summary>
 	/// 用来与数据库操作代理
 	/// </summary>