filling out jail.
This commit is contained in:
@@ -12,7 +12,18 @@
|
||||
|
||||
(defn make [screen]
|
||||
(rooms/make :music :inside-antique
|
||||
:interactions {}
|
||||
:interactions {
|
||||
:lock {:box [178 102 184 124]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [174 80] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/talk entities :ego "There's no helping it. It's locked."))}
|
||||
:hay {:box [130 86 177 102]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [144 86] :face :right)
|
||||
(actions/talk entities :ego "Maybe there's a needle or something in here.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "No. Nothing at all!"))}}
|
||||
:layers [(assoc (texture "inside-jail/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165)
|
||||
(assoc (texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240)]
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
(defn left-click [screen entities]
|
||||
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
|
||||
(println "clicked " [x y])
|
||||
(if ((:mouse-in? (:inventory entities)) x y)
|
||||
(click-inventory screen entities)
|
||||
(let [interaction (first (filter #((:mouse-in? %) entities x y)
|
||||
|
||||
Reference in New Issue
Block a user