Add sound queue when on chasm edge
This commit is contained in:
@@ -31,15 +31,20 @@ worldSPic cfig u =
|
||||
<> foldup floorItemSPic (filtOn _flItPos (_unNIntMap . _floorItems))
|
||||
<> foldup btSPic (filtOn _btPos _buttons)
|
||||
<> foldup (mcSPic (u ^. uvWorld . cWorld . lWorld)) (filtOn _mcPos _machines)
|
||||
-- <> foldMap' drawChasm (u ^. uvWorld . cWorld . chasms)
|
||||
<> foldMap' drawChasm (u ^. uvWorld . cWorld . chasms)
|
||||
where
|
||||
w = _uvWorld u
|
||||
foldup = foldMap'
|
||||
filtOn f g = IM.filter (pointIsClose . f) (g (_lWorld (_cWorld w)))
|
||||
pointIsClose = cullPoint cfig w
|
||||
|
||||
--drawChasm :: [Point2] -> SPic
|
||||
--drawChasm = noShape . color green . setDepth 2 . polygon
|
||||
drawChasm :: [Point2] -> SPic
|
||||
drawChasm = foldMap (Prelude.uncurry drawCliff) . loopPairs
|
||||
|
||||
drawCliff :: Point2 -> Point2 -> SPic
|
||||
drawCliff x y = noPic
|
||||
. translateSHz (-500.01)
|
||||
$ upperPrismPoly Large Important 500 [x,0.5 *(x+y) + normalizeV (vNormal (y - x)),y]
|
||||
|
||||
drawPulseBall :: PulseBall -> SPic
|
||||
drawPulseBall pb =
|
||||
@@ -50,7 +55,7 @@ drawPulseBall pb =
|
||||
$ circleSolidCol green white 10
|
||||
|
||||
drawCreature :: Creature -> SPic
|
||||
drawCreature cr = uncurryV translateSPxy (_crPos cr) . rotateSP (_crDir cr) $
|
||||
drawCreature cr = translateSPz (_crZ cr) . uncurryV translateSPxy (_crPos cr) . rotateSP (_crDir cr) $
|
||||
case cr ^. crType of
|
||||
BarrelCrit{} -> barrelShape
|
||||
LampCrit{_lampHeight = h} -> lampCrSPic h
|
||||
|
||||
Reference in New Issue
Block a user