Remove loop dependency on loading dodge sounds
This commit is contained in:
@@ -4,6 +4,8 @@ import Dodge.Data
|
||||
import Dodge.Base
|
||||
import Dodge.SoundLogic
|
||||
|
||||
import Dodge.WorldEvent.Sound
|
||||
|
||||
import Dodge.LevelGen.Pathing
|
||||
|
||||
import Geometry
|
||||
@@ -40,9 +42,11 @@ killBlock bl w = f bl .
|
||||
where
|
||||
f bl@(Block {_blDegrades = (x:xs)}) = degradeBlock bl . hitSound bl
|
||||
f bl = hitSound' bl
|
||||
hitSound bl | _wlIsSeeThrough bl = soundMultiFrom sos (soundid+8) 25 0
|
||||
hitSound bl | _wlIsSeeThrough bl = mkSoundBreakGlass
|
||||
-- hitSound bl | _wlIsSeeThrough bl = soundMultiFrom sos (soundid+8) 25 0
|
||||
| otherwise = soundMultiFrom sos soundid 25 0
|
||||
hitSound' bl | _wlIsSeeThrough bl = soundMultiFrom sos (soundid+4) 25 0
|
||||
hitSound' bl | _wlIsSeeThrough bl = mkSoundSplinterGlass
|
||||
-- hitSound' bl | _wlIsSeeThrough bl = soundMultiFrom sos (soundid+4) 25 0
|
||||
| otherwise = soundMultiFrom sos soundid 25 0
|
||||
sos = [BlockDegradeSound 0,BlockDegradeSound 1]
|
||||
(soundid,_) = randomR (29,32) $ _randGen w
|
||||
|
||||
Reference in New Issue
Block a user