added pausing the camera.

This commit is contained in:
2015-03-19 07:28:49 -07:00
parent 137a4e8430
commit a3024fd128
5 changed files with 22 additions and 9 deletions

View File

@@ -432,6 +432,14 @@
(can-skip? [this screen entities]
false)))
(defn pause-camera [entities]
(update-entities entities #(-> %
(assoc-in [:cam :paused? ] true)
(update-in [:tweens] dissoc :cam-x :cam-y))))
(defn resume-camera [entities]
(update-entities entities #(assoc-in % [:cam :paused? ] false)))
(defn begin-animation [entities target-id anim]
(run-action entities
(begin [this screen entities]