add cast times and cooldowns

This commit is contained in:
2025-01-12 03:30:52 +09:00
parent 2eb914a680
commit e0dd7dcaf3
7 changed files with 142 additions and 47 deletions
+4
View File
@@ -50,6 +50,10 @@ export default class Game {
this.#terrains = this.#terrains.filter((t) => t.id != terrain.id)
}
secToTick(sec) {
return Math.floor(this.tickRate * sec)
}
spawn(object) {
if (object instanceof Entity) { this.spawnEntity(object) }
else if (object instanceof Terrain) { this.addTerrain(object) }