Progress on the jail scene.

This commit is contained in:
2014-12-27 12:45:36 -08:00
parent 337e8c1f96
commit 1d0174850a
6 changed files with 129 additions and 47 deletions

View File

@@ -335,10 +335,10 @@
(recur (next-choices zipper))
(recur zipper)))))))
(defn update-state [entities f]
(defn update-entities [entities f]
(run-action entities
(begin [this screen entities]
(update-in entities [:state] f ))
(f entities))
(continue [this screen entities] entities)
(done? [this screen entities] true)
(terminate [this screen entities]
@@ -346,6 +346,21 @@
(can-skip? [this screen entities]
false)))
(defn begin-animation [entities target-id anim]
(run-action entities
(begin [this screen entities]
(update-in entities [:room :entities target-id]
#(start-animation screen % anim)))
(continue [this screen entities] entities)
(done? [this screen entities] true)
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false)))
(defn update-state [entities f]
(update-entities entities #(update-in % [:state] f)))
(defn remove-item [entities item]
(run-action entities
(begin [this screen entities]