From 030c619d9c25c24ec8663f592386e04375fb2606 Mon Sep 17 00:00:00 2001 From: He4eT Date: Thu, 5 Jun 2025 19:46:23 +0200 Subject: [PATCH] game: nuke effect --- game.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/game.js b/game.js index 9dcbe38..07c3bc9 100644 --- a/game.js +++ b/game.js @@ -202,12 +202,18 @@ function drawFX() { .forEach((effect) => ({ laser: ({ from, to, frames }) => { + // frames: [1, 2, 3, 4, 7, 7, 7, 6, 5, 4, 3, 2, 1], const color = frames.shift() line(from.x, from.y, to.x, to.y, color) circ(from.x, from.y, frames.length / 2, color) circ(to.x, to.y, frames.length / 2, color) circb(to.x, to.y, frames.length, color + 3) }, + nuke: ({ to, frames }) => { + // frames: [6, 5, 4, 3, 2], + const color = frames.shift() + circ(to.x, to.y, Math.pow(frames.length, 5), color) + }, })[effect.type](effect), )