add enemy

This commit is contained in:
biglyderv 2024-11-25 14:14:21 -05:00
parent 276e11fb49
commit edd005cb4d
7 changed files with 137 additions and 10 deletions

View file

@ -1,5 +1,6 @@
import GameBasic from "./common/game_basic.js";
import NPC from "./common/npc.js";
import Shooter from "./common/shooter.js";
import initDb from './db.js';
@ -102,6 +103,10 @@ class Game extends GameBasic {
that.entities.push(new NPC(false,that))
}
for (let i = 0; i < 30; i++) {
that.entities.push(new Shooter(false,that))
}
setInterval(function () { that.sync(false) }, 1000 / 10);
setInterval(function () { that.sync(true) }, 1000);
}