fix: iteration

This commit is contained in:
cha0s 2021-01-18 07:57:41 -06:00
parent 8ce44024e6
commit 0b86000d04

View File

@ -25,8 +25,9 @@ export default class EntityListView extends Container {
}
renderTick(elapsed) {
for (let i = 0; i < this.entityList.entities.length; i++) {
this.entityList.entities[i].renderTick(elapsed);
const entities = Object.values(this.entityList.entities);
for (let i = 0; i < entities.length; i++) {
entities[i].renderTick(elapsed);
}
super.renderTick(elapsed);
}