no weird scaling when switching screens

This commit is contained in:
2014-09-20 08:47:15 -07:00
parent 43c74b3a79
commit dd17a0828e

View File

@@ -182,12 +182,12 @@
entities)) entities))
(run-action entities (run-action entities
(begin [this screen entities] (begin [this screen entities]
(let [ego (get-in entities [:background :entities :ego])] (let [ego (get-in entities [:background :entities :ego])
(-> entities entities (-> entities
(assoc-in [:background] (get-in entities [:backgrounds new-background])) (assoc-in [:background] (get-in entities [:backgrounds new-background]))
(assoc-in [:background :entities :ego] ego) (assoc-in [:background :entities :ego] ego))]
(assoc-in [:background :entities :ego :x] x) (-> entities
(assoc-in [:background :entities :ego :y] y)))) (update-in [:background :entities :ego] #(jump-to screen entities % [x y])))))
(continue [this screen entities] (continue [this screen entities]
(update-in entities [:transition :opacity] - 0.075)) (update-in entities [:transition :opacity] - 0.075))