add visualRadius
This commit is contained in:
+6
-1
@@ -13,11 +13,12 @@ export default class Entity {
|
||||
health = null
|
||||
height = 40
|
||||
maxHealth = 1
|
||||
memory = {} // TODO: WARNING: currently only used for minions (code smell?)
|
||||
memory = {}
|
||||
position = null
|
||||
radius = 0
|
||||
speed = 400
|
||||
team = Team.neutral
|
||||
visualRadius = null
|
||||
|
||||
#attacking = false
|
||||
#dest = null
|
||||
@@ -39,6 +40,9 @@ export default class Entity {
|
||||
if (this.health == null) {
|
||||
this.health = this.maxHealth
|
||||
}
|
||||
if (this.visualRadius == null) {
|
||||
this.visualRadius = this.radius
|
||||
}
|
||||
}
|
||||
|
||||
get destination() { return this.#dest }
|
||||
@@ -90,6 +94,7 @@ export default class Entity {
|
||||
|
||||
castAction(slot, cursor, halt = false) {
|
||||
const ability = this.abilities[slot]
|
||||
if (ability == null) { return }
|
||||
|
||||
if (this.casting != null) {
|
||||
const abilityBeingCasted = this.casting.ability
|
||||
|
||||
Reference in New Issue
Block a user