1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Don't use forEach

This commit is contained in:
Bjorn Stromberg 2020-08-18 20:40:47 +09:00
parent 2206974711
commit af43f305be

View File

@ -18,7 +18,8 @@ export class LogicGateSystem extends GameSystemWithFilter {
}
update() {
this.allEntities.forEach(entity => {
for (let i = 0; i < this.allEntities.length; ++i) {
const entity = this.allEntities[i];
const logicComp = entity.components.LogicGate;
const slotComp = entity.components.WiredPins;
@ -46,7 +47,7 @@ export class LogicGateSystem extends GameSystemWithFilter {
assert(slotComp.slots[0].type === enumPinSlotType.logicalEjector, "Slot 0 should be ejector");
slotComp.slots[0].value = result;
});
}
}
/**