game: extract effectHandlers

This commit is contained in:
He4eT 2025-06-06 23:20:15 +02:00
commit 66a70082cf

View file

@ -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)
} }