small tweaks
This commit is contained in:
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user