jail scene coming together

This commit is contained in:
2014-12-27 15:15:25 -08:00
parent 78f183d147
commit 04955000df
5 changed files with 64 additions and 4 deletions

View File

@@ -113,6 +113,7 @@
(defn stop [screen entities target-id & {:keys [face]}]
(update-in entities [:room :entities target-id] (comp #(start-animation screen % :stand) (if face #(assoc % :facing face) identity))))
(defn walk-straight-to [entities target-id [final-x final-y] & {:keys [update-baseline? face speed anim override-dir]}]
(let [{start-x :x start-y :y} (get-in @entities [:room :entities target-id])
final-x (int final-x)
@@ -187,6 +188,18 @@
(terminate [this screen entities] entities)
(can-skip? [this screen entities] false)))
(defn stop-walking [entities target-id & {:keys [face]}]
(run-action entities
(begin [this screen entities]
(stop screen entities target-id :face face))
(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] & {:keys [can-skip? face]}]
(let [{start-x :x start-y :y} (get-in @entities [:room :entities target-id])
final-x (int final-x)