enabled sounds.

This commit is contained in:
2015-11-11 21:39:15 -08:00
parent 81c5f3e094
commit 1af249754e
4 changed files with 16 additions and 6 deletions

View File

@@ -385,7 +385,9 @@
:anim owl-stand
:anim-start 0
:night-profile :none
:puke-sound (utils/load-sound "cat-tree/owl-puke.ogg")
:script (actions/get-script entities (talk-to-owl entities))
:anim-sound-frames {owl-puke {9 [:puke-sound (constantly 0.6)]}}
:scripts #(condp = %
:monocle (actions/get-script entities (give-monocle entities))
(actions/get-script entities

View File

@@ -136,7 +136,8 @@
:bloodclot-head "Any final words before I destroy you again?")
(actions/play-animation entities :ego :scared :continue? true)
(Thread/sleep 500)
(actions/walk-straight-to entities :ego [35 45] :override-dir :right :speed 3.0))))
(actions/walk-straight-to entities :ego [35 45] :override-dir :right :speed 3.0))
(actions/talk entities :ego "I don't think it's ready yet.")))
:broken-clock (actions/get-script entities
(if (actions/has-item? entities :note-2)
(do

View File

@@ -185,7 +185,7 @@
bloodclot-head-stand-anim (utils/make-anim-seq "space/bloodclot-head-talk" [82 75] 0.05 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 3])
bloodclot-head-shoot-anim (utils/make-anim-seq "space/bloodclot-head-talk" [82 75] 0.05 [8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 10 11 10 11 10 11 10 11 10 11 10 11])
bloodclot-head-keep-shoot-anim (utils/make-anim-seq "space/bloodclot-head-talk" [82 75] 0.05 [12 13])
blergh-stand-anim (utils/make-anim "space/bloodclot-stand.png" [106 165] 0.75 [0 1])
blergh-stand-anim (utils/make-anim "space/bloodclot-stand.png" [106 165] 0.9 [0 1])
bloodclot-explode (utils/make-anim-seq "space/bloodclot-explode" [106 165] 0.075 [0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 5 5 5 4 4 4 4 5 5 5 5 5 4 4 4 4 5 5 4 4 4 4 5 5 5 4 5 5 5 5 5 5 5 5 6 5 5 5 5 6 6 5 5 5 5 5 5 5 6 6 6 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 7 6 7 7 5 6 6 6 6 6 7 7 7 7 6 6 6 6 6 6 6 6 6 6 7 7 7 7 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 10 11 12 13 14 15 16 17 18 19])
bullet (utils/make-anim "space/bullet.png" [24 24] 0.0075 [0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 3 3 3 4 4 5 5 6 5 4 7])
effect (particle-effect "particles/appear")
@@ -232,6 +232,10 @@
:bloodclot (assoc (animation->texture screen blergh-stand-anim)
:x 180 :y 50 :baseline 190
:stand blergh-stand-anim
:inhale-sound (utils/load-sound "space/bloodclot-inhale.ogg")
:exhale-sound (utils/load-sound "space/bloodclot-exhale.ogg")
:anim-sound-frames {blergh-stand-anim {0 [:inhale-sound (constantly 0.3)]
1 [:exhale-sound (constantly 0.3)]}}
:opacity 0.0
:anim blergh-stand-anim
:anim-start 0

View File

@@ -711,7 +711,7 @@ void main ()
110 [:blink 0.15]
143 [:blink 0.15]
176 [:blink 0.15]
200 [:scratch-sound 0.2]
200 [:scratch-sound 0.15]
}
(get-in ego [:right :stand]) {11 [:blink 0.15]
@@ -720,7 +720,7 @@ void main ()
110 [:blink 0.15]
143 [:blink 0.15]
176 [:blink 0.15]
200 [:scratch-sound 0.2]
200 [:scratch-sound 0.15]
}
(get-in ego [:left :sigh]) {3 [:sigh-sound 0.4]}
(get-in ego [:right :sigh]) {3 [:sigh-sound 0.4]}
@@ -870,10 +870,13 @@ void main ()
(if-let [[snd vol-scale pitch] (get-in anim-sound-frames [anim current-frame-index])]
(let [snd (if (fn? snd)
(snd entities)
snd)]
snd)
vol-scale (if (fn? vol-scale)
vol-scale
(utils/sourced-volume-fn target vol-scale [x y]))]
(utils/play-sound! screen entities
(or (snd e) snd)
(utils/sourced-volume-fn target vol-scale [x y])
vol-scale
(utils/get-sound-pan x)
:once
pitch))