Refactor material sounds
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module Dodge.Block.Debris where
|
||||
import Dodge.Material
|
||||
import Dodge.Prop.Moving
|
||||
import Dodge.WorldEvent.Sound
|
||||
import Dodge.SoundLogic
|
||||
--import Dodge.Zone
|
||||
import Dodge.Base
|
||||
import Dodge.Data
|
||||
@@ -31,7 +31,7 @@ makeDebrisDirected :: Float -> Float
|
||||
makeDebrisDirected mindist maxdist arcrad dir bm p w = w
|
||||
& flip (foldr (plNew props pjID)) thedebris
|
||||
& randGen .~ newg
|
||||
& matDesSound bm p
|
||||
& originsIDsAt [MaterialSound bm i | i <- [0,1,2]] (destroyMatS bm) p
|
||||
where
|
||||
someDebris = case bm of
|
||||
Stone -> stoneDebris
|
||||
@@ -92,12 +92,3 @@ shardShape size pr = colorSH (_pjColor pr) . translateSHz (-size) $ upperPrismPo
|
||||
|
||||
debrisShape :: Float -> Prop -> Shape
|
||||
debrisShape size pr = colorSH (_pjColor pr) . translateSHz (-size) $ upperPrismPoly (2*size) $ square size
|
||||
|
||||
matDesSound :: Material -> Point2 -> World -> World
|
||||
matDesSound mat = case mat of
|
||||
Glass -> mkSoundBreakGlass
|
||||
Crystal -> mkSoundBreakGlass -- this should be more crunchy
|
||||
Stone -> mkSoundSplinterBlock
|
||||
Dirt -> originIDsAt (BlockDegradeSound 1) [impact1S,impact3S]
|
||||
Wood -> originIDsAt (BlockDegradeSound 1) [impact1S,impact2S,impact3S]
|
||||
Metal -> originIDsAt (BlockDegradeSound 1) [impact2S,impact3S]
|
||||
|
||||
Reference in New Issue
Block a user