优化triggerListener与ArrayUtils

This commit is contained in:
yhh
2020-11-26 17:26:49 +08:00
parent de3f7bff60
commit ae2cfdafdd
15 changed files with 418 additions and 261 deletions

View File

@@ -335,7 +335,7 @@ module es {
* @param type
*/
public getOrCreateComponent<T extends Component>(type: T) {
let comp = this.components.getComponent<T>(type, true);
let comp = this.components.getComponent<T>(TypeUtils.getType(type), true);
if (!comp) {
comp = this.addComponent<T>(type);
}