Progress on the jail scene.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user