implemented library of items.

This commit is contained in:
2014-10-14 12:57:12 -07:00
parent de2a4f8c7c
commit 2c046134f8
7 changed files with 26 additions and 20 deletions

View File

@@ -134,7 +134,7 @@
(update! screen :renderer (stage) :camera (orthographic))
(let [_ (input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
music (sound "town-music.mp3")
;; _ (sound! music :loop 0.80)
_ (sound! music :loop 0.30)
rooms {:inside-house (rooms.inside-house/make screen)
:outside-house (rooms.outside-house/make screen)
:behind-house (rooms.behind-house/make screen)
@@ -144,7 +144,7 @@
{:rooms rooms
:state {:object nil
:active? true
:inventory (sorted-set)}
:inventory []}
:actions {:object nil
:channel (chan)
:current nil
@@ -200,7 +200,7 @@
(assoc-in entities [:state :active?] true))
:on-chose-item (fn [{:keys [item]} [entities]]
(assoc-in entities [:cursor :current] item))
(assoc-in entities [:cursor :current] (:cursor item)))
:on-start-script (fn [{:keys [script]} [entities]]
(script entities)