starting dialogue puzzle.

This commit is contained in:
Bryce Covert
2015-09-04 18:00:52 -07:00
parent 7b2ffa7ccc
commit 96c215605b
3 changed files with 70 additions and 4 deletions

View File

@@ -349,7 +349,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 wait] :or {wait true}}]
(defn talk [entities target-id text & {:keys [stop? animate? anim wait color] :or {wait true}}]
(let [initial-time (atom nil)
stop? (if (nil? stop?) true stop?)
animate? (if (nil? animate?) true animate?)]
@@ -371,7 +371,7 @@
(screen! dialogue/talking-screen :on-talk :text text
:scene-viewport (:viewport screen)
:x target-x :y (+ target-y height)
:color (get-in entities [:room :entities target-id :talk-color])
:color (or color (get-in entities [:room :entities target-id :talk-color]))
:target-id target-id
:scale scale)