Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
neki-dev committed Oct 30, 2023
1 parent a2f71de commit 5dd5152
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/game/scenes/world/entities/npc/variants/enemy/enemy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ export class Enemy extends NPC implements IEnemy {
return;
}

target.live.damage(this.damage);

this.freeze(1000);

target.live.damage(this.damage);
}

private addDamageLabel() {
Expand Down
10 changes: 5 additions & 5 deletions src/game/scenes/world/entities/shot/lazer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ export class ShotLazer extends Phaser.GameObjects.Line implements IShotLazer {
return;
}

const momentDamage = this.params.damage / SHOT_LAZER_REPEAT;

this.target.live.damage(momentDamage);

if (this.active && this.scene.game.isSettingEnabled(GameSettings.EFFECTS)) {
if (this.scene.game.isSettingEnabled(GameSettings.EFFECTS)) {
new Particles(this.target, {
key: 'glow',
texture: ParticlesTexture.GLOW,
Expand All @@ -119,6 +115,10 @@ export class ShotLazer extends Phaser.GameObjects.Line implements IShotLazer {
},
});
}

const momentDamage = this.params.damage / SHOT_LAZER_REPEAT;

this.target.live.damage(momentDamage);
}

private processing() {
Expand Down

0 comments on commit 5dd5152

Please sign in to comment.