much more natural screen transitions with regards to zoom.

This commit is contained in:
Bryce Covert
2016-12-07 18:45:05 -08:00
parent a817e55122
commit c81614c5ef
2 changed files with 5 additions and 4 deletions

View File

@@ -712,9 +712,10 @@
(if-not (get-in entities [:cam :paused?])
(-> e
(update-in [:tweens] dissoc :cam-zoom :cam-x :cam-y)
(assoc-in [:cam :x] 160)
(assoc-in [:cam :y] 120)
(assoc-in [:cam :zoom] utils/max-zoom))
(assoc-in [:cam :ideal-x] x)
(assoc-in [:cam :ideal-y] y)
(assoc-in [:cam :x] (utils/bound-to-camera x 320 (get-in entities [:cam :zoom])))
(assoc-in [:cam :y] (utils/bound-to-camera y 240 (get-in entities [:cam :zoom]))))
e)
(if music-changed?

View File

@@ -501,7 +501,7 @@
:update-fn (partial utils/update-path-location 0.33)
:baseline 240
:laber "Shovel"
:label "Shovel"
:cursor :hand
:script (actions/get-script entities
(if ((get-in @entities [:state :plaques-read]) :shovel)