wind updates.

This commit is contained in:
Bryce Covert
2015-07-28 18:42:19 -07:00
parent 3a8950dad9
commit c3140bee4a
3 changed files with 13 additions and 5 deletions

View File

@@ -173,11 +173,11 @@
(sound! (sound "dream/appear.ogg") :play (utils/current-sound-volume))
(particle-effect! (get-in @entities [:room :entities :magic]) :reset)
(particle-effect! (get-in @entities [:room :entities :magic]) :start)
(Thread/sleep 500)
(fade-in entities)
(actions/transition-music entities :dream)
(Thread/sleep 100)
(actions/talk entities :fairy-godfather "-daaaaaaaaaaaaa!")
(Thread/sleep 2500)
(Thread/sleep 1500)
(actions/talk entities :ego "Oh no! The grim reaper!" :anim :frustrated-talk)
(actions/do-dialogue entities
:fairy-godfather "Relax, Tick. You're dreaming!"
@@ -362,6 +362,8 @@
(assoc (texture "dream/corner-l.png") :x -10 :y -10 :baseline 240 :parallax 2.0 )
(assoc (texture "dream/corner-r.png") :x (- 320 80) :y -20 :baseline 240 :parallax 3.2)
(assoc (texture "dream/pedestals.png") :x 0 :y 0 :baseline 139)]
:wind-sound {:sound (sound "dream/wind.ogg")
:id nil}
:entities {:magic (assoc (particle-effect "dream/magic") :x 160 :y 80 :baseline 240)
:clouds (assoc (particle-effect "dream/cloudy2") :x 160 :y 120 :baseline 241)
@@ -472,8 +474,13 @@
(actions/play-animation entities :ego :sigh))})}
:collision "dream/collision.png"
:scale-fn (utils/scaler-fn-from-image "dream/scale.png" 0.1 1.3)
:stop-fn (fn [_ entities]
(when-let [wind-sound-id (get-in entities [:room :wind-sound :id])]
(sound! (get-in entities [:room :wind-sound :sound]) :stop wind-sound-id))
entities)
:apply-state (fn [_ entities]
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
(as-> entities entities
(if (get-in entities [:state :seen-intro?])
(set-opacity entities 1.0 1.0)
@@ -483,5 +490,6 @@
entities)
(if (actions/has-item? entities :shovel)
(update-in entities [:room :entities] dissoc :shovel)
entities)))
entities)
(assoc-in entities [:room :wind-sound :id] (sound! (get-in entities [:room :wind-sound :sound]) :loop 0.175))))
:start-pos [140 55])))