simplified wind.

This commit is contained in:
Bryce Covert
2015-10-08 15:51:46 -07:00
parent 2ff70ff209
commit cae1ca9aed
3 changed files with 16 additions and 16 deletions

View File

@@ -242,7 +242,7 @@
:ego "But..."
:fairy-godfather "No buts.")
(utils/snapshot-state @entities :beginning)
(actions/update-state entities #(assoc % :seen-intro? true)))
(actions/update-state entities #(assoc % :seen-intro? true :time :day)))
(defn swing [entities]
(actions/run-action entities
@@ -341,7 +341,7 @@
(defn make [screen]
(let [fairy-godfather-anim (utils/make-anim "dream/fairy-godfather.png" [63 77] 0.15 [0 1 2 3 2 1 0 1 4 3 2 1])
fairy-godfather-talk-anim (utils/make-anim "dream/fairy-godfather.png" [63 77] 0.15 [5 6 7 8 7 6])]
(rooms/make :music :dream
(rooms/make :music {:intro :wind :day :dream}
:interactions {:pit {:box [54 0 219 36]
:script (actions/get-script entities
(actions/walk-to entities :ego [154 41])
@@ -376,8 +376,7 @@
(assoc (utils/get-texture "dream/corner-l.png") :x -10 :y -10 :baseline 240 :parallax 2.0 )
(assoc (utils/get-texture "dream/corner-r.png") :x (- 320 80) :y -20 :baseline 240 :parallax 3.2)
(assoc (utils/get-texture "dream/pedestals.png") :x 0 :y 0 :baseline 139)]
:wind-sound {:sound (utils/load-sound "dream/wind.ogg")
:id nil}
:entities {:magic (assoc (particle-effect "particles/dream-magic") :x 160 :y 80 :baseline 240)
:clouds (assoc (particle-effect "particles/cloudy2") :x 160 :y 120 :baseline 241)
@@ -488,10 +487,7 @@
(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]))
@@ -504,6 +500,5 @@
entities)
(if (actions/has-item? entities :shovel)
(update-in entities [:room :entities] dissoc :shovel)
entities)
(assoc-in entities [:room :wind-sound :id] (sound! (get-in entities [:room :wind-sound :sound]) :loop 0.2))))
entities)))
:start-pos [140 55])))