panning
This commit is contained in:
@@ -408,8 +408,6 @@
|
||||
(when (and (not= previous-frame-index current-frame-index)
|
||||
((set (keys anim-sound-frames)) anim))
|
||||
(when-let [[snd vol-scale] (get-in anim-sound-frames [anim current-frame-index])]
|
||||
(println "play")
|
||||
|
||||
(let [vol (if (= target :ego)
|
||||
(* (/ (get-in entities [:room :entities :ego :scale-x]) 1.5) 0.75)
|
||||
(max 0.0
|
||||
@@ -419,11 +417,11 @@
|
||||
:y-sign 2.0
|
||||
:x-sign (/ 1.0 (get-in entities [:room :entities :ego :scale-x])))
|
||||
175.0))))
|
||||
pan (/ (- (:x e) 160 ) 160)
|
||||
vol (* vol vol-scale)
|
||||
vol (max vol 0.005)]
|
||||
(println vol snd)
|
||||
(sound! (or (snd e)
|
||||
(snd (:sounds entities))) :play vol))))))
|
||||
(snd (:sounds entities))) :play vol 1.0 pan))))))
|
||||
|
||||
|
||||
(defscreen scene
|
||||
|
||||
Reference in New Issue
Block a user