slowness still updates scale

This commit is contained in:
Bryce Covert
2017-07-22 08:40:47 -07:00
parent 009f1d920a
commit 31c6a0883e

View File

@@ -254,9 +254,9 @@
0
(* speed (/ delta-y distance)))]
(if (< distance speed)
(-> entities
(assoc-in [:room :entities target-id :x] final-x)
(assoc-in [:room :entities target-id :y] final-y))
(update-in entities [:room :entities target-id]
#(jump-to screen entities % [final-x final-y] update-baseline?))
(update-in entities [:room :entities target-id]
#(start-animation screen
(assoc (jump-to screen entities % [(+ moved-x from-x) (+ moved-y from-y)] update-baseline?)
@@ -379,16 +379,15 @@
(do
(swap! targets-left rest)
(recur (-> entities
(assoc-in [:room :entities target-id :x] target-x)
(assoc-in [:room :entities target-id :y] target-y)
(update-in [:room :entities target-id] #(jump-to screen entities % [target-x target-y] true))
(assoc-in [:step-particles :x] target-x)
(assoc-in [:step-particles :y] target-y))
(- base-speed distance)))
:else
(-> entities
(assoc-in [:room :entities target-id :x] target-x)
(assoc-in [:room :entities target-id :y] target-y)
(update-in [:room :entities target-id] #(jump-to screen entities % [target-x target-y] true))
(assoc-in [:step-particles :x] target-x)
(assoc-in [:step-particles :y] target-y)))))))