fix projectiles phasing through stuff

This commit is contained in:
2025-01-17 14:01:18 +09:00
parent 20f8a2f1fe
commit 787b48a4df
4 changed files with 41 additions and 25 deletions
+3 -2
View File
@@ -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() {