sound volume!

This commit is contained in:
2015-03-04 13:37:20 -08:00
parent bed3c16b27
commit 54f6b25b39
20 changed files with 354 additions and 37 deletions

View File

@@ -29,7 +29,7 @@
(begin [this screen entities]
(particle-effect! (get-in entities [:room :entities :appear]) :reset)
(particle-effect! (get-in entities [:room :entities :appear]) :start)
(sound! (sound "inside-house/disappear.ogg") :play)
(sound! (sound "inside-house/disappear.ogg") :play (utils/current-sound-volume))
(-> entities
(assoc-in [:tweens :bloodclot-head-appear]
(tween/tween :bloodclot-head-appear screen [:room :entities :bloodclot-head :opacity] 0.0 1.0 1.0 :ease tween/ease-in-quadratic))
@@ -101,7 +101,7 @@
:game-player "I don't have the might or courage required to pull the sword and fulfill the prophecy. "
:game-player "The knights of Remington have muscles the size of tree trunks."
:game-player "But me...")
(sound! (sound "inside-castle/flex.ogg") :play)
(sound! (sound "inside-castle/flex.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :game-player :flex)
(actions/do-dialogue entities :game-player "I'd never be able to prove my strength."))
:choices actions/previous-choices}
@@ -250,7 +250,7 @@
:cursor :up
:script (actions/get-script entities
(actions/walk-to entities :ego [182 90] :face :left)
(sound! (sound "door.ogg") :play)
(sound! (sound "door.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :reach)
(if (= :night (get-in @entities [:state :time]))
(actions/talk entities :ego "It's locked.")
@@ -443,12 +443,7 @@
entities)
(if (= :night (get-in entities [:state :time]))
(make-night entities)
entities)
#_(let [chorus
instance (sound! chorus :loop 0.0)]
(-> entities
(assoc-in [:room :chorus :sound] chorus)
(assoc-in [:room :chorus :instance] instance)))))
entities)))
:update-fn (fn [screen entities]
#_(when (and (actions/has-obtained? entities :sword)
(get-in entities [:room :entities :magic])
@@ -464,8 +459,8 @@
(if (:instance chorus)
(do (sound! (:sound chorus) :set-volume
(:instance chorus)
chorus-volume)
(utils/current-sound-volume chorus-volume))
entities)
(assoc-in entities [:room :chorus :instance] (sound! (:sound chorus) :loop
chorus-volume)))))))
(utils/current-sound-volume chorus-volume))))))))
:start-pos [245 90])))