Add PlasmaBalls

This commit is contained in:
2026-03-17 10:45:58 +00:00
parent 0ca3bf33c9
commit 902d8e0c00
9 changed files with 245 additions and 172 deletions
+11 -2
View File
@@ -25,7 +25,8 @@ worldSPic cfig u =
<> foldup propSPic (filtOn _prPos _props)
<> foldMap' debrisSPic (filtOn' (xyV3 . _dbPos) _debris)
<> foldup drawProjectile (filtOn (^. pjPos . _xy) _projectiles)
<> foldup drawPulseBall (filtOn _pbPos _pulseBalls)
<> foldup drawPulseBall (filtOn _pzbPos _pulseBalls)
<> foldMap' drawPlasmaBall (filtOn' _pbPos _plasmaBalls)
<> foldup (shiftDraw _blPos _blDir (const drawBlock)) (filtOn _blPos _blocks)
<> foldMap' (shiftDraw _fsPos _fsDir (const _fsSPic)) (filtOn' _fsPos _foreShapes)
<> foldup (drawCreature (lw ^. items)) (filtOn (^. crPos . _xy) _creatures)
@@ -94,11 +95,19 @@ drawCliff x y =
drawPulseBall :: PulseBall -> SPic
drawPulseBall pb =
translateSPz 20
. uncurryV translateSPxy (pb ^. pbPos)
. uncurryV translateSPxy (pb ^. pzbPos)
. noShape
. setLayer BloomLayer
$ circleSolidCol green white 10
drawPlasmaBall :: PlasmaBall -> SPic
drawPlasmaBall pb =
translateSPz 20
. uncurryV translateSPxy (pb ^. pbPos)
. noShape
. setLayer BloomLayer
$ circleSolidCol green white 5
drawCreature :: IM.IntMap Item -> Creature -> SPic
drawCreature m cr = translateSP (_crPos cr) . rotateSP (_crDir cr) $
case cr ^. crType of