Skip to content

Commit

Permalink
Adjust lightning flash effect
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed May 14, 2024
1 parent d02027b commit fb08acc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/stendhal/event/generic/KikaPunishmentEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ export class KikaPunishmentEvent extends RPEvent {
const timeDiff = Date.now() - this.startTime;
ctx.save();
if (timeDiff <= 100 || timeDiff > 200) {
ctx.globalAlpha = 0.5;
} else {
ctx.globalAlpha = 0.75;
}
ctx.fillStyle = Color.WHITE;
ctx.fillRect(offsetX, offsetY, 640, 480);
ctx.restore();
if (this.image.height) {
ctx.drawImage(this.image, offsetX, offsetY);
}
ctx.restore();
}
}

0 comments on commit fb08acc

Please sign in to comment.