优化vector2构造函数

This commit is contained in:
yhh
2021-05-24 17:20:27 +08:00
parent 9c7703eb2d
commit da3ab02a8d
20 changed files with 177 additions and 109 deletions

View File

@@ -77,16 +77,16 @@ module es {
for (let i = 0, s = this._components.length; i < s; ++ i) {
this.handleRemove(this._components[i]);
}
this.componentsByType.clear();
this.componentsToAddByType.clear();
this._components.length = 0;
this._updatableComponents.length = 0;
this._componentsToAdd = {};
this._componentsToRemove = {};
this._componentsToAddList.length = 0;
this._componentsToRemoveList.length = 0;
}
this.componentsByType.clear();
this.componentsToAddByType.clear();
this._components.length = 0;
this._updatableComponents.length = 0;
this._componentsToAdd = {};
this._componentsToRemove = {};
this._componentsToAddList.length = 0;
this._componentsToRemoveList.length = 0;
}
public deregisterAllComponents() {