sound volume!
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
|
||||
(defn drink-blergh [entities]
|
||||
(actions/walk-straight-to entities :ego [205 45])
|
||||
(sound! (sound "ego/potion.ogg") :play)
|
||||
(sound! (sound "ego/potion.ogg") :play (utils/current-sound-volume))
|
||||
(actions/play-animation entities :ego :grow :stop? false)
|
||||
(actions/do-dialogue entities
|
||||
:blergh "What this? A potion of strength?"
|
||||
@@ -290,7 +290,7 @@
|
||||
:else
|
||||
(do
|
||||
(actions/talk entities :ego "I'll just take a sip!")
|
||||
(sound! (sound "ego/potion.ogg") :play)
|
||||
(sound! (sound "ego/potion.ogg") :play (utils/current-sound-volume))
|
||||
(actions/play-animation entities :ego :grow :stop? false))))
|
||||
:recipe (actions/get-script entities (actions/do-dialogue entities
|
||||
:ego "The recipe says:"
|
||||
@@ -402,7 +402,7 @@
|
||||
|
||||
(defn fade-in-first-time-if-necessary [screen entities]
|
||||
(if (not (get-in entities [:started? :value]))
|
||||
(do (music! (utils/get-current-music entities) :set-volume (get-in entities [:volume :value]))
|
||||
(do (music! (utils/get-current-music entities) :set-volume (utils/current-music-volume (get-in entities [:volume :value])))
|
||||
(utils/play-sound (get-in entities [:musics (actions/get-music (get-in entities [:room :music]) (get-in entities [:state :time]))]))
|
||||
(assoc entities
|
||||
:tweens {:fade-in (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 1.0 :ease tween/ease-in-cubic)
|
||||
@@ -429,7 +429,7 @@
|
||||
vol (* vol vol-scale)
|
||||
vol (max vol 0.005)]
|
||||
(sound! (or (snd e)
|
||||
(snd (:sounds entities))) :play vol 1.0 pan))))))
|
||||
(snd (:sounds entities))) :play (utils/current-sound-volume vol) 1.0 pan))))))
|
||||
|
||||
(defn update-from-room [screen entities]
|
||||
(if-let [update-fn (get-in entities [:room :update-fn])]
|
||||
@@ -629,7 +629,7 @@
|
||||
(play-key-sounds entities))
|
||||
(doseq [m (vals (get-in entities [:musics]))]
|
||||
(when m
|
||||
(music! m :set-volume (get-in entities [:volume :value]))))
|
||||
(music! m :set-volume (utils/current-music-volume (get-in entities [:volume :value])))))
|
||||
(doseq [e (sort-by :baseline all-entities)]
|
||||
(if (:parallax e)
|
||||
(render-parallax screen e)
|
||||
|
||||
Reference in New Issue
Block a user