small tweaks

This commit is contained in:
Bryce Covert
2015-10-07 18:34:11 -07:00
parent 7423f991b0
commit 75b44709ae
3 changed files with 10 additions and 12 deletions

View File

@@ -283,7 +283,7 @@
(as-> entities entities
(utils/play-sound! screen entities (get-in entities [:room :fountain-sound :sound])
(utils/sourced-volume-fn :fountain 0.5 [172 120])
(utils/sourced-volume-fn :fountain 0.25 [172 120])
(utils/get-sound-pan 172)
:loop)

View File

@@ -1166,7 +1166,9 @@ void main()
(tween/tween :fade-out-music screen [:volume :value] 1.0 0.0 1.0))
(assoc-in [:tweens :fade-out]
(tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 1.0
:finish #(do (.clear @(resolve 'advent.core/am))
:finish #(do
(utils/stop-all-sounds! %)
(.clear @(resolve 'advent.core/am))
(set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.title/title-screen))
%))))))

View File

@@ -400,21 +400,17 @@
(doto (.setAccessible true))
(.get Gdx/graphics))) 60))))
(defn get-sound-volume [entities target vol-scale [x y]]
(* (if (= target :ego)
(-> (* (/ (get-in entities [:room :entities :ego :scale-x]) 1.5) 0.75)
(* (or vol-scale 1.0))
(clamp-volume))
(proximity-volume entities [x y] :scale vol-scale))
(- 1.0 (get-in entities [:fade :opacity]))))
(defn get-sound-pan [x]
(/ (- x 160 ) 160))
(defn sourced-volume-fn [target vol-scale [x y]]
(fn [entities]
(get-sound-volume entities target vol-scale [x y])))
(* (if (= target :ego)
(-> (* (/ (get-in entities [:room :entities :ego :scale-x]) 1.5) 0.75)
(* (or vol-scale 1.0))
(clamp-volume))
(proximity-volume entities [x y] :scale vol-scale))
(- 1.0 (get-in entities [:fade :opacity])))))
(defn play-sound!