移除fastlist(经测试比Array并没有快)

This commit is contained in:
yhh
2020-12-14 11:34:23 +08:00
parent 59c8d456cb
commit c60fe13d71
16 changed files with 325 additions and 520 deletions

View File

@@ -23,15 +23,13 @@ module es {
export class TriggerListenerHelper {
public static getITriggerListener(entity: Entity, components: ITriggerListener[]){
for (let i = 0; i < entity.components._components.length; i++) {
let component = entity.components._components.buffer[i];
for (let component of entity.components._components) {
if (isITriggerListener(component)) {
components.push(component);
}
}
for (let i = 0; i < entity.components._componentsToAdd.length; i++) {
let component = entity.components._componentsToAdd[i];
for (let component of entity.components._componentsToAdd) {
if (isITriggerListener(component)) {
components.push(component);
}

View File

@@ -76,7 +76,7 @@ module es {
public setUpdateOrder(updateOrder: number){
if (this.updateOrder != updateOrder){
this.updateOrder = updateOrder;
Core.scene._sceneComponents.sort(this);
Core.scene._sceneComponents.sort(this.compare);
}
return this;