场景搜索包含特定组件的实体列表

This commit is contained in:
yhh
2021-03-26 17:36:50 +08:00
parent d2915fe30c
commit 8b5bc444f1
5 changed files with 180 additions and 36 deletions

View File

@@ -655,6 +655,12 @@ declare module es {
* @param type
*/
findComponentsOfType<T extends Component>(type: any): T[];
/**
* 返回场景中包含特定组件的实体列表
* @param type
* @returns
*/
findEntitiesOfComponent(...types: any[]): Entity[];
/**
* 在场景中添加一个EntitySystem处理器
* @param processor 处理器
@@ -1782,6 +1788,12 @@ declare module es {
* @param type
*/
findComponentsOfType<T extends Component>(type: any): T[];
/**
* 返回场景中包含特定组件的实体列表
* @param types
* @returns
*/
findEntitesOfComponent(...types: any[]): Entity[];
}
}
declare module es {