fix game loop timer
This commit is contained in:
+6
-2
@@ -4,12 +4,16 @@ export default class Ability {
|
||||
id = crypto.randomUUID()
|
||||
name = 'Ability'
|
||||
cooldown = 0
|
||||
effect = () => {}
|
||||
castTime = 0
|
||||
|
||||
#effect = () => {}
|
||||
|
||||
get effect() { return this.#effect }
|
||||
set effect(value) { this.#effect = value }
|
||||
|
||||
constructor(options) {
|
||||
if (options.name != null) { this.name = options.name }
|
||||
if (options.effect != null) { this.effect = options.effect }
|
||||
if (options.effect != null) { this.#effect = options.effect }
|
||||
if (options.cooldown != null) { this.cooldown = options.cooldown }
|
||||
if (options.castTime != null) { this.castTime = options.castTime }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user