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:
parent
2206974711
commit
af43f305be
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user