mirror of
https://github.com/He4eT/DotDashPit.git
synced 2026-05-05 01:47:22 +00:00
game: nuke effect
This commit is contained in:
parent
bb1a405c11
commit
030c619d9c
1 changed files with 6 additions and 0 deletions
6
game.js
6
game.js
|
|
@ -202,12 +202,18 @@ function drawFX() {
|
||||||
.forEach((effect) =>
|
.forEach((effect) =>
|
||||||
({
|
({
|
||||||
laser: ({ from, to, frames }) => {
|
laser: ({ from, to, frames }) => {
|
||||||
|
// frames: [1, 2, 3, 4, 7, 7, 7, 6, 5, 4, 3, 2, 1],
|
||||||
const color = frames.shift()
|
const color = frames.shift()
|
||||||
line(from.x, from.y, to.x, to.y, color)
|
line(from.x, from.y, to.x, to.y, color)
|
||||||
circ(from.x, from.y, frames.length / 2, color)
|
circ(from.x, from.y, frames.length / 2, color)
|
||||||
circ(to.x, to.y, frames.length / 2, color)
|
circ(to.x, to.y, frames.length / 2, color)
|
||||||
circb(to.x, to.y, frames.length, color + 3)
|
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),
|
})[effect.type](effect),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue