mirror of
https://github.com/He4eT/DotDashPit.git
synced 2026-05-05 01:47:22 +00:00
game: extract effectHandlers
This commit is contained in:
parent
8e6723efc3
commit
66a70082cf
1 changed files with 40 additions and 42 deletions
4
game.js
4
game.js
|
|
@ -405,9 +405,7 @@ function drawFX() {
|
||||||
from: arenaToScreen(effect.from ?? {}),
|
from: arenaToScreen(effect.from ?? {}),
|
||||||
to: arenaToScreen(effect.to ?? {}),
|
to: arenaToScreen(effect.to ?? {}),
|
||||||
}))
|
}))
|
||||||
.forEach((effect) =>
|
.forEach((effect) => effectHandlers[effect.type](effect))
|
||||||
effectHandlers[effect.type](effect),
|
|
||||||
)
|
|
||||||
|
|
||||||
effects = effects.filter(({ frames }) => frames.length > 0)
|
effects = effects.filter(({ frames }) => frames.length > 0)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue