Cleanup, fix menu lock on restarting level after game over
This commit is contained in:
@@ -7,4 +7,4 @@ import Control.Monad.State
|
||||
import System.Random
|
||||
|
||||
randBlockBreakWeapon :: RandomGen g => State g Item
|
||||
randBlockBreakWeapon = takeOne [pistol,ltAutoGun,spreadGun,autoGun]
|
||||
randBlockBreakWeapon = takeOne [bangStick 1,bangCane]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user