mirror of
https://github.com/He4eT/DotDashPit.git
synced 2026-05-04 17:37:23 +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) =>
|
||||
({
|
||||
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),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue