replaced flies.
This commit is contained in:
@@ -7,6 +7,5 @@
|
||||
+ fight with blergh at end isn't great
|
||||
+ ending
|
||||
+ secret lever
|
||||
+ shopkeep sigh
|
||||
+ proper save/settings file location
|
||||
+ closing should stop all scripts
|
||||
|
||||
BIN
desktop/resources/outside-castle/flies.wav
Normal file → Executable file
BIN
desktop/resources/outside-castle/flies.wav
Normal file → Executable file
Binary file not shown.
BIN
desktop/resources/outside-castle/flies2.ogg
Normal file
BIN
desktop/resources/outside-castle/flies2.ogg
Normal file
Binary file not shown.
BIN
desktop/resources/outside-castle/flies2.wav
Normal file
BIN
desktop/resources/outside-castle/flies2.wav
Normal file
Binary file not shown.
Binary file not shown.
@@ -12,6 +12,10 @@
|
||||
[play-clj.math :refer :all]
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
|
||||
(defn flies-vol [entities]
|
||||
(utils/proximity-volume entities [201 175] :scale 0.5))
|
||||
|
||||
(defn do-initial-peddler-conversation [entities]
|
||||
(actions/do-dialogue entities
|
||||
:ego "Hello there, peddler."
|
||||
@@ -302,6 +306,8 @@
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "No one will notice one missing.")
|
||||
(actions/give entities :carrot))))}}
|
||||
:flies-sound {:sound (sound "outside-castle/flies2.ogg")
|
||||
:id nil}
|
||||
:layers {:day [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outside-castle/blanket.png") :x 60 :y (- 240 173) :baseline 1)
|
||||
(assoc (texture "outside-castle/brush.png") :origin-x 0 :origin-y 0 :scale-x 1.0 :scale-y 1.0 :x 15 :y 0 :baseline 240 :parallax 1.2)
|
||||
@@ -389,7 +395,6 @@
|
||||
:anim flies-stand
|
||||
:anim-start 0
|
||||
:baseline 240
|
||||
:sound (sound "outside-castle/flies.ogg")
|
||||
:scripts {:sack-lunch (actions/get-script entities
|
||||
(actions/walk-to entities :ego [168 150] :face :right)
|
||||
(actions/talk entities :ego "Maybe I can catch some of these flies.")
|
||||
@@ -399,7 +404,7 @@
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities :flies)
|
||||
(actions/talk entities :ego "Hopefully they won't fly out of my backpack."))}
|
||||
:anim-sound-frames {flies-stand {0 [:sound 0.33]}})}
|
||||
)}
|
||||
:note (rooms/make-entity :note (assoc (texture "outside-castle/note.png")
|
||||
:x 198 :y 66 :baseline 174
|
||||
:script (actions/get-script entities
|
||||
@@ -413,6 +418,20 @@
|
||||
:start-pos [259 80]
|
||||
:apply-state (fn [_ entities]
|
||||
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
|
||||
(if (#{:night :sunrise} (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)))))
|
||||
(->
|
||||
(if (#{:night :sunrise} (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)
|
||||
(assoc-in [:room :flies-sound :id] (sound! (get-in entities [:room :flies-sound :sound]) :loop (flies-vol entities)))))
|
||||
|
||||
:update-fn (fn [_ entities]
|
||||
(when-let [flies-sound-id (get-in entities [:room :flies-sound :id])]
|
||||
(sound! (get-in entities [:room :flies-sound :sound]) :set-volume flies-sound-id (flies-vol entities)))
|
||||
entities)
|
||||
|
||||
:stop-fn (fn [_ entities]
|
||||
(when-let [flies-sound-id (get-in entities [:room :flies-sound :id])]
|
||||
(sound! (get-in entities [:room :flies-sound :sound]) :stop flies-sound-id))
|
||||
entities)
|
||||
|
||||
)))
|
||||
|
||||
@@ -1010,8 +1010,8 @@ void main()
|
||||
:on-render
|
||||
(fn [screen [entities]]
|
||||
(let [entities (utils/apply-tweens screen entities (:tweens entities))]
|
||||
#_(label! (:fps entities) :set-text (str (game :fps)))
|
||||
(render! screen [#_(:fps entities) (:inventory entities) (:close entities)])
|
||||
(label! (:fps entities) :set-text (str (game :fps)))
|
||||
(render! screen [(:fps entities) (:inventory entities) (:close entities)])
|
||||
entities))
|
||||
|
||||
:on-resize
|
||||
|
||||
Reference in New Issue
Block a user