add cast times and cooldowns
This commit is contained in:
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user