step back.
This commit is contained in:
@@ -204,7 +204,7 @@
|
||||
(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]}]
|
||||
(defn walk-to [entities target-id [final-x final-y] & {:keys [can-skip? face force-dir]}]
|
||||
(let [{start-x :x start-y :y} (get-in @entities [:room :entities target-id])
|
||||
final-x (int final-x)
|
||||
final-y (int final-y)
|
||||
@@ -242,9 +242,10 @@
|
||||
(update-in entities [:room :entities target-id]
|
||||
#(start-animation screen
|
||||
(assoc (jump-to screen entities % [(+ moved-x from-x) (+ moved-y from-y)] true)
|
||||
:facing (cond (< delta-x 0) :left
|
||||
(> delta-x 0) :right
|
||||
:else (:facing %)))
|
||||
:facing (cond force-dir force-dir
|
||||
(< delta-x 0) :left
|
||||
(> delta-x 0) :right
|
||||
:else (:facing %)))
|
||||
:walk
|
||||
))))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user