progress on multiple scripts.
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn brian [screen entities]
|
||||
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(not (get-in entities [:bg-actions :script-running?]))
|
||||
(get-in entities [:state :active?])
|
||||
@@ -116,7 +115,8 @@
|
||||
{:run #(actions/respond entities % :game-player "Fine by me.")}]})
|
||||
|
||||
(defn walk-to-player [entities]
|
||||
(actions/walk-to entities :ego [209 74] :face :right))
|
||||
(actions/walk-to entities :ego [209 74] :face :right)
|
||||
(actions/do-force-end entities :bg-actions))
|
||||
|
||||
(defn brian-pause-from-work [entities]
|
||||
(actions/play-animation entities :game-player :pause-from-work :stop? false)
|
||||
|
||||
@@ -189,6 +189,8 @@ void main ()
|
||||
(assoc-in [:cursor :override] nil)))
|
||||
(assoc-in entities [:cursor :current] :main))))
|
||||
|
||||
|
||||
|
||||
(defn skip-action [screen entities]
|
||||
(let [current-action (get-in entities [:fg-actions :current])]
|
||||
(cond (= :skip (actions/skip-type current-action screen entities))
|
||||
@@ -201,11 +203,8 @@ void main ()
|
||||
(= :end (actions/skip-type current-action screen entities))
|
||||
(let [terminated-entities (actions/terminate current-action screen entities)]
|
||||
(println "trying to end")
|
||||
(do (put! (actions/get-channel current-action) :end)
|
||||
(-> terminated-entities
|
||||
(assoc-in [:fg-actions :script-running?] false)
|
||||
(assoc-in [:fg-actions :current] nil)
|
||||
(assoc-in [:fg-actions :started?] false))))
|
||||
(actions/force-end terminated-entities current-action :fg-actions)
|
||||
)
|
||||
:else
|
||||
entities)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user