other minor tweaks.
This commit is contained in:
@@ -513,22 +513,24 @@
|
||||
(skip-type [this screen entities]
|
||||
:none)))
|
||||
|
||||
(defn play-sound [entities sound-file]
|
||||
(let [m (music sound-file)]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
(music! m :play)
|
||||
entities)
|
||||
(defn play-sound
|
||||
([entities sound-file vol]
|
||||
(let [s (sound sound-file)]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
(utils/play-sound! screen entities s (constantly vol)))
|
||||
|
||||
(continue [this screen entities] entities)
|
||||
(continue [this screen entities] entities)
|
||||
|
||||
(done? [this screen entities]
|
||||
(not (music! m :is-playing)))
|
||||
(done? [this screen entities]
|
||||
(not (seq (filter
|
||||
#(= s (:sound %))
|
||||
(get-in entities [:current-sounds :value])))))
|
||||
|
||||
(terminate [this screen entities]
|
||||
entities)
|
||||
(skip-type [this screen entities]
|
||||
:none))))
|
||||
(terminate [this screen entities]
|
||||
entities)
|
||||
(skip-type [this screen entities]
|
||||
:none)))))
|
||||
|
||||
(defn give [entities item]
|
||||
(run-action entities
|
||||
|
||||
Reference in New Issue
Block a user