more blinks.

This commit is contained in:
2015-10-11 18:59:20 -07:00
parent 8ead5bbf6b
commit 343d1f0e26
5 changed files with 27 additions and 10 deletions

View File

@@ -817,14 +817,16 @@ void main()
(defn play-sound-if-necessary [screen entities target {:keys [previous-frame-index current-frame-index anim-sound-frames anim x y] :as e}]
(if (and (not= previous-frame-index current-frame-index)
((set (keys anim-sound-frames)) anim))
(if-let [[snd vol-scale] (get-in anim-sound-frames [anim current-frame-index])]
(if-let [[snd vol-scale pitch] (get-in anim-sound-frames [anim current-frame-index])]
(let [snd (if (fn? snd)
(snd entities)
snd)]
(utils/play-sound! screen entities
(or (snd e) (snd (:sounds entities)))
(utils/sourced-volume-fn target vol-scale [x y])
(utils/get-sound-pan x)))
(utils/get-sound-pan x)
:once
pitch))
entities)
entities))
@@ -1014,7 +1016,7 @@ void main()
:closing? {:object nil
:value false}
:sounds {:blink (utils/load-sound "blink-other.ogg")
:sounds {:blink (utils/load-sound "ego/blink2.ogg")
:object nil}
:fade {:object nil
:opacity 0.0}