made it so you can peel away the crack.

This commit is contained in:
2014-10-30 11:47:21 -07:00
parent 4bfb570a23
commit 6789801c33
4 changed files with 36 additions and 15 deletions

View File

@@ -125,7 +125,19 @@
(terminate [this screen entities]
(stop screen entities target-id))
(can-skip? [this screen entities]
false)))
false)))
(defn update-entity [entities target-id f]
(run-action entities
(begin [this screen entities]
(update-in entities [:room :entities target-id] f))
(continue [this screen entities] entities)
(done? [this screen entities] true)
(terminate [this screen entities] entities)
(can-skip? [this screen entities] false)))
(defn walk-to [entities target-id [final-x final-y] & [can-skip?]]
(let [{start-x :x start-y :y} (get-in @entities [:room :entities target-id])