Change targetting line to dashed
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user