new screen stuff.

This commit is contained in:
2014-10-09 19:23:46 -07:00
parent 0d9b49a688
commit 396ff1320c
4 changed files with 21 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
:y y
:baseline (- 240 y))]
(if (:scaled entity)
(assoc entity :scale-x (scale-fn y) :scale-y (scale-fn y))
(assoc entity :scale-x (scale-fn [x y]) :scale-y (scale-fn [x y]))
entity)))
(defn start-animation [screen entity anim]
@@ -169,8 +169,9 @@
(begin [this screen entities]
(let [_ (swap! initial-time #(or % (:total-time screen)))
target-y (get-in entities [:room :entities target-id :y])
target-x (get-in entities [:room :entities target-id :x])
scale-fn (get-in entities [:room :scale-fn])
scale (scale-fn target-y)
scale (scale-fn [target-x target-y])
height (* scale 36)]
(run! dialogue/talking-screen :on-talk :text text
:x (get-in entities [:room :entities target-id :x]) :y (+ (get-in entities [:room :entities target-id :y]) height)