新增 tryGetComponent 方法
This commit is contained in:
7
source/bin/framework.d.ts
vendored
7
source/bin/framework.d.ts
vendored
@@ -364,6 +364,13 @@ declare module es {
|
||||
* @param type
|
||||
*/
|
||||
getComponent<T extends Component>(type: any): T;
|
||||
/**
|
||||
* 尝试获取T类型的组件。如果未找到任何组件,则返回false
|
||||
* @param type
|
||||
* @param outComponent
|
||||
* @returns
|
||||
*/
|
||||
tryGetComponent<T extends Component>(type: any, outComponent: Ref<T>): boolean;
|
||||
/**
|
||||
* 检查实体是否具有该组件
|
||||
* @param type
|
||||
|
||||
Reference in New Issue
Block a user