preparing for quittable scripts.

This commit is contained in:
Bryce Covert
2015-08-13 12:48:11 -07:00
parent 919695de81
commit ac3b8665ef
6 changed files with 66 additions and 66 deletions

View File

@@ -140,8 +140,8 @@
(-> entities
(update-in [:room :entities] dissoc :bloodclot)
(assoc-in [:tweens :flash] (tween/tween :flash screen [:white-fade :opacity] 0.0 1.0 0.2 :ease tween/ease-in-cubic))))
(can-skip? [this screen entities]
false))
(skip-type [this screen entities]
:none))
(actions/run-action entities
(begin [this screen entities]
entities)
@@ -154,8 +154,8 @@
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false))
(skip-type [this screen entities]
:none))
(actions/run-action entities
(begin [this screen entities]
@@ -169,8 +169,8 @@
(terminate [this screen entities]
(update-in entities [:room :entities :ego] dissoc :stand-override))
(can-skip? [this screen entities]
false)))
(skip-type [this screen entities]
:none)))
(defn win []
(actions/get-script entities

View File

@@ -52,8 +52,8 @@
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false)))
(skip-type [this screen entities]
:none)))
(defn fade-in-tools [entities]
(actions/run-action entities
(begin [this screen entities]
@@ -69,8 +69,8 @@
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false)))
(skip-type [this screen entities]
:none)))
(defn face-fairy [entities]
@@ -255,8 +255,8 @@
(terminate [this screen entities]
(actions/stop screen entities :ego))
(can-skip? [this screen entities]
false)))
(skip-type [this screen entities]
:none)))
(defn return-from-island [screen entities]
(when (and (not (get-in entities [:actions :script-running?]))

View File

@@ -69,8 +69,8 @@
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false)))
(skip-type [this screen entities]
:none)))
(defn nice-trophy-dialogue [entities]

View File

@@ -72,8 +72,8 @@
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false)))
(skip-type [this screen entities]
:none)))
(defn swing-at-blergh [entities]
(let [jump-path (bezier (map #(apply vector-2* %) [[35 45] [110 145] [195 180]]))
@@ -127,8 +127,8 @@
(terminate [this screen entities]
(assoc-in entities [:room :entities :ego :move-pct] 0.0))
(can-skip? [this screen entities]
false))
(skip-type [this screen entities]
:none))
(actions/run-action entities
(begin [this screen entities]
@@ -153,9 +153,9 @@
(-> entities
(assoc-in [:room :entities :ego :move-pct] 0.0)
(update-in [:room :entities :ego] #(actions/start-animation screen % :pant))))
(can-skip? [this screen entities]
(skip-type [this screen entities]
false))
:none))
(actions/run-action entities
(begin [this screen entities]
(assoc-in entities [:tweens :flash] (tween/tween :flash screen [:white-fade :opacity] 1.0 0.0 3.0 :ease tween/ease-in-quadratic)))
@@ -168,8 +168,8 @@
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false))))
(skip-type [this screen entities]
:none))))

View File

@@ -204,7 +204,7 @@ void main()
(def default-interaction
{:get-script (fn [cursor [x y]] (if (= :main cursor)
(actions/get-script entities
(actions/walk-to entities :ego [x y] :can-skip? true))
(actions/walk-to entities :ego [x y] :skip-type :skip))
(actions/get-script entities
(actions/talk entities :ego "I don't know what to do with that."))))})
@@ -238,7 +238,7 @@ void main()
current-action (get-in entities [:actions :current])
;; TODO - hacky way of resetting queue
entities (if (and current-action (actions/can-skip? current-action screen entities))
entities (if (and current-action (= :skip (actions/skip-type current-action screen entities)))
(let [terminated-entities (actions/terminate current-action screen entities)]
(do (put! (actions/get-channel current-action) terminated-entities)
(-> terminated-entities