reduce number of npcs because of lag

This commit is contained in:
biglyderv 2025-01-03 14:59:45 -05:00
parent e1d5131789
commit 2e524c5c8c

View file

@ -199,15 +199,15 @@ class Game extends GameBasic {
let that = this;
that.entities = [];
for (let i = 0; i < 20; i++) {
for (let i = 0; i < 10; i++) {
that.entities.push(new NPC(false, that))
}
for (let i = 0; i < 35; i++) {
for (let i = 0; i < 10; i++) {
that.entities.push(new Shooter(false, that))
}
setInterval(function () { that.sync(false) }, 1000 / 5);
setInterval(function () { that.sync(false) }, 1000 / 10);
setInterval(function () { that.sync(true) }, 1000);
setInterval(function () { that.clean() }, 1000);
}