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

@@ -445,6 +445,10 @@
([screen entities snd volume-fn pan type pitch]
(let [vol (volume-fn entities)
snd (if (keyword? snd)
(or (-> entities :room :sounds snd)
(-> entities :sounds snd))
snd)
sound-id (if (= :once type)
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )
(sound! snd :loop (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )) ]