Goon dropping
This commit is contained in:
@@ -338,7 +338,7 @@
|
||||
(defn get-text-duration [text]
|
||||
(max 1.5 (* (count (s/split text #" ")) 0.5)))
|
||||
|
||||
(defn talk [entities target-id text & {:keys [stop? animate? anim]}]
|
||||
(defn talk [entities target-id text & {:keys [stop? animate? anim wait] :or {wait true}}]
|
||||
(let [initial-time (atom nil)
|
||||
stop? (if (nil? stop?) true stop?)
|
||||
animate? (if (nil? animate?) true animate?)]
|
||||
@@ -371,15 +371,20 @@
|
||||
(continue [this screen entities] entities)
|
||||
|
||||
(done? [this screen entities]
|
||||
(> (- (:total-time screen)
|
||||
@initial-time)
|
||||
(get-text-duration text)))
|
||||
(if wait
|
||||
(> (- (:total-time screen)
|
||||
@initial-time)
|
||||
(get-text-duration text))
|
||||
true))
|
||||
|
||||
(terminate [this screen entities]
|
||||
(screen! dialogue/talking-screen :stop-talk :target-id target-id)
|
||||
(if stop?
|
||||
(stop screen entities target-id)
|
||||
entities))
|
||||
(if wait
|
||||
(do
|
||||
(screen! dialogue/talking-screen :stop-talk :target-id target-id)
|
||||
(if stop?
|
||||
(stop screen entities target-id)
|
||||
entities))
|
||||
entities))
|
||||
(can-skip? [this screen entities]
|
||||
true))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user