refactored sounds so they're never dynamically loaded.

This commit is contained in:
Bryce Covert
2015-10-29 20:04:08 -07:00
parent 78a4ddfce6
commit 614156245a
11 changed files with 57 additions and 33 deletions

View File

@@ -230,6 +230,8 @@
owl-puke (utils/make-anim "cat-tree/owl.png" [21 30] 0.10 [0 0 2 2 3 2 2 3 3 2 3 3 3 4 5 6 7 4 4 3 3 2 2 2 2 2])
puke (particle-effect "particles/puke")]
(rooms/make :music {:day :town-2 :night :night}
:sounds {:cat (utils/load-sound "cat-tree/cat.ogg")
:kiss (utils/load-sound "cat-tree/kiss.ogg")}
:ladder ladder-entity
:blank (rooms/make-entity :blank
{:object nil :x 0 :y 0 :width 320 :height 240 :baseline 240
@@ -316,7 +318,7 @@
(if (get-in @entities [:room :entities :ladder])
(do (actions/talk entities :ego "I think he's going for it!")
(actions/play-animation entities :ego :cat-toy-first-half :stop? false)
(sound! (utils/load-sound "cat-tree/cat.ogg") :play (utils/current-sound-volume))
(actions/play-sound entities :cat 0.5)
(actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3)
(actions/play-animation entities :ego :cat-toy-last-half)
(actions/play-animation entities :grandma :squat-1 :stop? false)
@@ -331,7 +333,7 @@
:grandma "Come here young man.")
(actions/walk-straight-to entities :ego [133 35])
(actions/talk entities :grandma "For your impressive display of courage and bravery, I give you this. ")
(sound! (utils/load-sound "cat-tree/kiss.ogg") :play (utils/current-sound-volume))
(actions/play-sound entities :kiss 0.7)
(actions/play-animation entities :grandma :kiss)
(actions/play-animation entities :ego :get-sick :stop? false)
(actions/walk-straight-to entities :ego [165 45])