more tweaks.

This commit is contained in:
2015-04-21 18:31:40 -07:00
parent 7b6d0f7a88
commit 694da55a0d
4 changed files with 24 additions and 13 deletions

View File

@@ -161,6 +161,17 @@
(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 do-stop [entities target-id & {:keys [face]}]
(run-action entities
(begin [this screen entities]
(update-in entities [:room :entities target-id]
(comp #(start-animation screen % :stand) (if face #(assoc % :facing face) identity))))
(continue [this screen entities] entities)
(done? [this screen entities] true)
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false)))
@@ -320,8 +331,8 @@
(terminate [this screen entities]
(stop screen entities target-id :face face))
(can-skip? [this screen entities]
(or can-skip? false)))
@entities)))
(or can-skip? false)))
(do-stop entities :ego :face face))))
(defn get-text-duration [text]
(* (count (s/split text #" ")) 0.5))
@@ -452,6 +463,8 @@
(can-skip? [this screen entities]
false)))
(defn update-state [entities f]
(update-entities entities #(update-in % [:state] f)))