新增entityprocessor管理实体解析器

This commit is contained in:
YHH
2020-06-08 21:53:09 +08:00
parent a048a8ac29
commit 11af0a31a7
17 changed files with 386 additions and 66 deletions

View File

@@ -70,8 +70,8 @@ class Entity {
return component;
}
public getComponent<T extends Component>(): T{
return this.components.firstOrDefault(component => component instanceof Component) as T;
public getComponent<T extends Component>(type): T{
return this.components.firstOrDefault(component => component instanceof type) as T;
}
public update(){