提交 613f2d9d 编写于 作者: T tanghai

组件的Parent应该是Component,这里漏改了

上级 e13b22f7
......@@ -91,6 +91,7 @@ namespace App
Game.Scene.AddComponent<UnitComponent>();
Game.Scene.AddComponent<DBComponent>();
Game.Scene.AddComponent<DBProxyComponent>();
Game.Scene.AddComponent<DBCacheComponent>();
Game.Scene.AddComponent<LocationComponent>();
Game.Scene.AddComponent<ActorMessageDispatherComponent>();
Game.Scene.AddComponent<ActorManagerComponent>();
......
......@@ -12,13 +12,14 @@ namespace ETModel
public long Id { get; set; }
[BsonIgnore]
public Disposer Parent { get; set; }
public Component Parent { get; set; }
public T GetParent<T>() where T : Disposer
public T GetParent<T>() where T : Component
{
return this.Parent as T;
}
[BsonIgnore]
public Entity Entity
{
get
......
......@@ -9,7 +9,7 @@ namespace ETHotfix
[BsonIgnore]
public Component Parent { get; set; }
public T GetParent<T>() where T : Entity
public T GetParent<T>() where T : Component
{
return this.Parent as T;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册