start playing correct music.

This commit is contained in:
2014-12-13 13:27:38 -08:00
parent 8d4f00c16c
commit f07ca7579f

View File

@@ -263,7 +263,7 @@
:musics {:object nil
:inside-antique (make-music "inside-antique.ogg")
:town-1 (make-music "town-music-1.ogg")
:town-2 (doto (make-music "town-music-2.ogg") play-sound)
:town-2 (make-music "town-music-2.ogg")
:inside-fangald (make-music "inside-fangald.ogg")
:fight (make-music "megaboss.mp3")}
:state (get-state)
@@ -281,6 +281,8 @@
:inventory (assoc (texture "inventory.png") :x 278 :y 0 :baseline 9000
:mouse-in? (zone/box 278 0 320 42))
:fps (assoc (label "0" (color :white) ) :x 5 :baseline 0)}]
(play-sound (get-in entities [:musics (get-in entities [:room :music])]))
(if-let [apply-state (get-in entities [:room :apply-state])]
(apply-state entities)