Change targetting line to dashed

This commit is contained in:
Peter Stockings
2026-01-20 23:05:18 +11:00
parent 1a91aa5274
commit 327b6aa0eb
4 changed files with 89 additions and 13 deletions

View File

@@ -207,7 +207,7 @@ export class GameScene extends Phaser.Scene {
if (this.targetingSystem.isActive && this.targetingSystem.itemId === item.id) {
// Already targeting - execute shoot
if (this.targetingSystem.cursorPos) {
this.executeThrow(this.targetingSystem.cursorPos.x, this.targetingSystem.cursorPos.y);
this.executeThrow();
}
return;
}
@@ -219,6 +219,8 @@ export class GameScene extends Phaser.Scene {
item.id,
player.pos,
this.world,
this.entityManager,
this.playerId,
this.dungeonRenderer.seenArray,
this.world.width,
{ x: tx, y: ty }
@@ -240,7 +242,7 @@ export class GameScene extends Phaser.Scene {
if (this.targetingSystem.isActive && this.targetingSystem.itemId === item.id) {
// Already targeting - execute throw
if (this.targetingSystem.cursorPos) {
this.executeThrow(this.targetingSystem.cursorPos.x, this.targetingSystem.cursorPos.y);
this.executeThrow();
}
return;
}
@@ -251,6 +253,8 @@ export class GameScene extends Phaser.Scene {
item.id,
player.pos,
this.world,
this.entityManager,
this.playerId,
this.dungeonRenderer.seenArray,
this.world.width,
{ x: tx, y: ty }
@@ -323,7 +327,7 @@ export class GameScene extends Phaser.Scene {
// Only Left Click throws
if (p.button === 0) {
if (this.targetingSystem.cursorPos) {
this.executeThrow(this.targetingSystem.cursorPos.x, this.targetingSystem.cursorPos.y);
this.executeThrow();
}
}
return;
@@ -615,7 +619,7 @@ export class GameScene extends Phaser.Scene {
private executeThrow(_targetX: number, _targetY: number) {
private executeThrow() {
const success = this.targetingSystem.executeThrow(
this.world,
this.playerId,