fix projectiles phasing through stuff
This commit is contained in:
+3
-2
@@ -88,7 +88,7 @@ export default class Entity {
|
||||
this.moveAction(cursor, true)
|
||||
}
|
||||
|
||||
castAction(slot, cursor, halt = true) {
|
||||
castAction(slot, cursor, halt = false) {
|
||||
const ability = this.abilities[slot]
|
||||
|
||||
if (this.casting != null) {
|
||||
@@ -120,6 +120,7 @@ export default class Entity {
|
||||
this.#moving = false
|
||||
}
|
||||
|
||||
// TODO: cancelable and uncancelable abilities
|
||||
moveAction(cursor, attack = false) {
|
||||
if (this.casting != null && (!this.#attacking || this.casting.ability.id != this.abilities[0].id)) {
|
||||
this.casting = null
|
||||
@@ -146,7 +147,7 @@ export default class Entity {
|
||||
}
|
||||
|
||||
collider() {
|
||||
return new SAT.Circle(new SAT.Vector(this.x, this.y), this.radius)
|
||||
return new SAT.Circle(new SAT.Vector(this.position.x, this.position.y), this.radius)
|
||||
}
|
||||
|
||||
colliders() {
|
||||
|
||||
Reference in New Issue
Block a user