part 2 background scripts.

This commit is contained in:
Bryce Covert
2015-11-19 18:10:10 -08:00
parent ff04d07a0f
commit 624688524b
2 changed files with 31 additions and 15 deletions

View File

@@ -15,10 +15,12 @@
[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?])
(get-in entities [:room :entities :game-player]))
((actions/get-script entities
((actions/get-bg-script entities
((rand-nth [#(actions/do-dialogue entities :game-player "2 to the power of pi."
:game-player "No, that's not right.")
#(actions/do-dialogue entities :game-player "Eureka!"
@@ -362,7 +364,7 @@
]
(rooms/make :music {:day :town-1 :night :night :sunrise :night}
:name "Inside castle"
:timers {:brian [10.0 20.0 brian]}
:timers {:brian [10.0 2.0 brian]}
:interactions
{:right-door {:box [286 140 306 160]
:cursor :right