Add sound effects to example analyser
This commit is contained in:
@@ -15,6 +15,7 @@ import Dodge.Placement.Instance
|
||||
import Dodge.Placement.Instance.Analyser
|
||||
import Dodge.Default.Room
|
||||
import Dodge.Item.Consumable
|
||||
import Dodge.Machine
|
||||
--import Dodge.Item.Weapon.Utility
|
||||
--import Dodge.LevelGen.Data
|
||||
--import Geometry.Data
|
||||
@@ -24,6 +25,7 @@ import Color
|
||||
import Shape
|
||||
import LensHelp
|
||||
import Dodge.RandomHelp
|
||||
import Dodge.SoundLogic
|
||||
|
||||
import qualified Data.Set as S
|
||||
import Data.Maybe
|
||||
@@ -54,7 +56,7 @@ lasSensLightAboveDoor wth ps = extTrigLitPos
|
||||
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||
( \tp -> Just $ lightSensor wth (upf $ fromJust $ _plMID tp) ps )
|
||||
where
|
||||
upf trid mc w | _mcSensorAmount mc > 900 = w & triggers . ix trid .~ const True
|
||||
upf trid mc w | _sensAmount (_mcSensor mc) > 900 = w & triggers . ix trid .~ const True
|
||||
| otherwise = w
|
||||
|
||||
lightSensByDoor :: Int -> Room -> Room
|
||||
@@ -79,7 +81,7 @@ healthAnalyserByDoor = analyserByDoor
|
||||
"PASSED"
|
||||
"REQUIRES HEALTH AT LEAST 1100"
|
||||
(replicate 3 "")
|
||||
(testYourHealth 1100)
|
||||
(machineAddSound fridgeHumS $ testYourHealth 1100)
|
||||
|
||||
analyserByDoor :: [String] -> String -> String -> [String]
|
||||
-> (Machine -> World -> World) -> Int -> Room -> Room
|
||||
|
||||
@@ -56,7 +56,7 @@ sensAboveDoor sensetype wth ps = extTrigLitPos
|
||||
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||
( \tp -> Just $ damageSensor sensetype wth (upf $ fromJust $ _plMID tp) ps )
|
||||
where
|
||||
upf trid mc w | _mcSensorAmount mc > 900 = w & triggers . ix trid .~ const True
|
||||
upf trid mc w | _sensAmount (_mcSensor mc) > 900 = w & triggers . ix trid .~ const True
|
||||
| otherwise = w
|
||||
|
||||
sensInsideDoor :: DamageType -> Int -> Room -> Room
|
||||
|
||||
Reference in New Issue
Block a user