Cleanup, fix menu lock on restarting level after game over

This commit is contained in:
2021-12-06 23:44:10 +00:00
parent 19540bd19e
commit 763b771928
18 changed files with 88 additions and 119 deletions
+6 -5
View File
@@ -102,9 +102,9 @@ bangCaneX i = bangCane
,_muzPos = 15
}
, _dimSPic = \it -> noPic $
(colorSH red $ foldMap
(\y -> upperPrismPoly 3 $ map (+.+ V2 0 y) $ rectXH 15 2)
$ map (\k -> fromIntegral k * 5 - ((fromIntegral i - 1) * 2.5)) [0..i-1]
colorSH red (foldMap
((\y -> upperPrismPoly 3 $ map (+.+ V2 0 y) $ rectXH 15 2)
. (\k -> fromIntegral k * 5 - ((fromIntegral i - 1) * 2.5))) [0..i-1]
) <> caneClipX i it
}
} & itUse . useAim . aimSpeed .~ 0.4
@@ -124,8 +124,9 @@ caneStickSoundChoice it
caneClipX :: Int -> Item -> Shape
caneClipX i it = case it ^? itConsumption . ammoLoaded of
Just la | la > 0 -> foldMap
(\y -> translateSH (V3 5 0 3) . upperPrismPoly 1 $ map (+.+ V2 0 y) $ square 1.5)
$ map (\k -> fromIntegral k * 5 - ((fromIntegral i - 1) * 2.5)) [0..la-1]
( (\y -> translateSH (V3 5 0 3) . upperPrismPoly 1 $ map (+.+ V2 0 y) $ square 1.5)
. (\k -> fromIntegral k * 5 - ((fromIntegral i - 1) * 2.5)))
[0..la-1]
_ -> mempty