restrict casting vision to nearby enemies

This commit is contained in:
2025-01-22 23:21:39 +09:00
parent 0db1ceeedc
commit 4c76d5dbde
3 changed files with 36 additions and 18 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ export default class Game {
}
const callUpdate = function callUpdate(object) { object.update() }
this.entities.forEach(callUpdate) // TODO: entity with lower ID has unfair collision advantage (regular loop + until it fully loops around with an offset?)
this.entities.forEach(callUpdate)
this.projectiles.forEach(callUpdate)
if (this.#logic != null) {
this.#logic()