Refactor sound

This commit is contained in:
2021-09-12 17:52:34 +01:00
parent ea333a363b
commit 51a85bd1ec
97 changed files with 409 additions and 177 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import Dodge.Creature.State.Data
import Dodge.Creature.Perception.Data
import Dodge.Creature.Memory.Data
import Dodge.SoundLogic
import Dodge.SoundLogic.LoadSound
import Dodge.Picture.Layer
import Geometry
import Picture
@@ -214,7 +215,7 @@ defaultButton = Button
, _btEvent = \b w ->
set (buttons . ix (_btID b) . btPict) (onLayer WlLayer $ color red $ polygon $ rectNSEW (-4) (-5) 10 (-10))
. set (buttons . ix (_btID b) . btState) BtNoLabel
. soundFrom (LeverSound 0) (_btPos b) 1 Nothing $ w
. soundFrom (LeverSound 0) (_btPos b) click1S Nothing $ w
, _btID = 0
, _btText = "Button"
, _btState = BtOff