Refactor sounds

This commit is contained in:
2021-09-09 14:58:07 +01:00
parent be7b2d2cd7
commit 70c97f5367
26 changed files with 113 additions and 162 deletions
+2 -2
View File
@@ -44,10 +44,10 @@ killBlock bl w = f bl . flip (foldr unshadow) (_blShadows bl) $ w
pos = fst $ _wlLine bl
breakHitSound bl'
| _wlIsSeeThrough bl' = mkSoundBreakGlass pos
| otherwise = soundMultiFrom sos soundid 25 0
| otherwise = soundMultiFrom sos (fst $ _wlLine bl') (soundid + 4) Nothing
hitSound' bl'
| _wlIsSeeThrough bl' = mkSoundSplinterGlass pos
| otherwise = soundMultiFrom sos soundid 25 0
| otherwise = soundMultiFrom sos (fst $ _wlLine bl') soundid Nothing
sos = [BlockDegradeSound 0,BlockDegradeSound 1]
(soundid,_) = randomR (29,32) $ _randGen w
unshadow :: Int -> World -> World