cauldron sound.
This commit is contained in:
BIN
desktop/asset-work/outsidehouse/cauldron.ogg
Normal file
BIN
desktop/asset-work/outsidehouse/cauldron.ogg
Normal file
Binary file not shown.
BIN
desktop/asset-work/outsidehouse/cauldron.wav
Normal file
BIN
desktop/asset-work/outsidehouse/cauldron.wav
Normal file
Binary file not shown.
BIN
desktop/resources/outsidehouse/cauldron.ogg
Normal file
BIN
desktop/resources/outsidehouse/cauldron.ogg
Normal file
Binary file not shown.
@@ -506,12 +506,19 @@
|
|||||||
(update-in entities [:room :entities] #(assoc % :note (get-in entities [:room :note])))
|
(update-in entities [:room :entities] #(assoc % :note (get-in entities [:room :note])))
|
||||||
entities))
|
entities))
|
||||||
|
|
||||||
(defn make-night [entities]
|
(defn make-night [screen entities]
|
||||||
(-> entities
|
|
||||||
(update-in [:room :entities] #(dissoc % :butterfly))
|
(as-> entities entities
|
||||||
(update-in [:room :entities] #(assoc % :cauldron (get-in entities [:room :cauldron])))
|
|
||||||
add-wizard-if-necessary
|
(update-in entities [:room :entities] #(dissoc % :butterfly))
|
||||||
add-note-if-necessary))
|
(update-in entities [:room :entities] #(assoc % :cauldron (get-in entities [:room :cauldron])))
|
||||||
|
(utils/play-sound! screen entities
|
||||||
|
(get-in entities [:room :cauldron-sound :sound])
|
||||||
|
(utils/sourced-volume-fn :cauldron 0.1 [139 73])
|
||||||
|
(utils/get-sound-pan 139)
|
||||||
|
:loop)
|
||||||
|
(add-wizard-if-necessary entities)
|
||||||
|
(add-note-if-necessary entities)))
|
||||||
|
|
||||||
(defn move-toward [screen entities {:keys [x y] :as e} target-x]
|
(defn move-toward [screen entities {:keys [x y] :as e} target-x]
|
||||||
(let [delta-x (- target-x x)
|
(let [delta-x (- target-x x)
|
||||||
@@ -590,6 +597,7 @@
|
|||||||
(aget lamb-walk-sheet 0 i)))]
|
(aget lamb-walk-sheet 0 i)))]
|
||||||
(rooms/make :music {:day :town-2 :night :night}
|
(rooms/make :music {:day :town-2 :night :night}
|
||||||
:update-fn jump-around
|
:update-fn jump-around
|
||||||
|
:cauldron-sound {:object nil :sound (utils/load-sound "outsidehouse/cauldron.ogg")}
|
||||||
:interactions
|
:interactions
|
||||||
{:door {:box [250 100 281 160]
|
{:door {:box [250 100 281 160]
|
||||||
:script
|
:script
|
||||||
@@ -787,7 +795,7 @@
|
|||||||
(common/read-note-1 entities))))
|
(common/read-note-1 entities))))
|
||||||
:collision "outsidehouse/collision.png"
|
:collision "outsidehouse/collision.png"
|
||||||
:scale-fn scaler
|
:scale-fn scaler
|
||||||
:apply-state (fn [_ entities]
|
:apply-state (fn [screen entities]
|
||||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||||
(as-> entities entities
|
(as-> entities entities
|
||||||
(if (get-in entities [:state :coaxed-sheep?])
|
(if (get-in entities [:state :coaxed-sheep?])
|
||||||
@@ -795,6 +803,6 @@
|
|||||||
(update-in entities [:room :entities :sheep] #(assoc % :x 90 :y 138 :baseline 40 :scale-x scale :scale-y scale)))
|
(update-in entities [:room :entities :sheep] #(assoc % :x 90 :y 138 :baseline 40 :scale-x scale :scale-y scale)))
|
||||||
entities)
|
entities)
|
||||||
(if (= :night (get-in entities [:state :time]))
|
(if (= :night (get-in entities [:state :time]))
|
||||||
(make-night entities)
|
(make-night screen entities)
|
||||||
entities)))
|
entities)))
|
||||||
:start-pos [30 80])))
|
:start-pos [30 80])))
|
||||||
|
|||||||
@@ -445,6 +445,7 @@
|
|||||||
(play-sound! screen entities snd volume-fn pan type 1.0))
|
(play-sound! screen entities snd volume-fn pan type 1.0))
|
||||||
|
|
||||||
([screen entities snd volume-fn pan type pitch]
|
([screen entities snd volume-fn pan type pitch]
|
||||||
|
|
||||||
(let [vol (volume-fn entities)
|
(let [vol (volume-fn entities)
|
||||||
sound-id (if (= :once type)
|
sound-id (if (= :once type)
|
||||||
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )
|
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )
|
||||||
|
|||||||
Reference in New Issue
Block a user