diff --git a/desktop/project.clj b/desktop/project.clj index e2c91ff2..3292bc80 100644 --- a/desktop/project.clj +++ b/desktop/project.clj @@ -14,7 +14,9 @@ :classifier "natives-desktop"] [org.clojure/clojure "1.6.0"] #_[play-clj "0.3.9"] - [org.clojure/data.priority-map "0.0.5"]] + [org.clojure/data.priority-map "0.0.5"] + [criterium "0.4.3"] + [com.taoensso/timbre "3.3.1"]] :source-paths ["src" "src-common"] :javac-options ["-target" "1.6" "-source" "1.6" "-Xlint:-options"] diff --git a/desktop/resources/town-music.mp3 b/desktop/resources/town-music.mp3 index e7cc18ed..872f7a27 100644 Binary files a/desktop/resources/town-music.mp3 and b/desktop/resources/town-music.mp3 differ diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index f6723123..db880eb1 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -109,7 +109,7 @@ house (texture "house.png") overdirt (texture "overdirt.png") music (sound "town-music.mp3") - ;; _ (sound! music :loop) + _ (sound! music :loop) ] { :cursor {:id "cursor" :current :walk } @@ -132,7 +132,15 @@ :touch (fn [screen entities _] (assoc-in entities [:ego :actions] (concat (actions/from-path screen entities :ego [262 88]) - [(actions/talk :ego (str "Anyone home?"))])))}] + [(actions/talk :ego (str "Anyone home?"))])))} + {:mouse-in? (zone/box 274 55 305 88) + :look (fn [screen entities _] + (assoc-in entities [:ego :actions] [(actions/stop :ego) + (actions/talk :ego (str "It's the coolest sword I've ever seen!"))])) + :touch (fn [screen entities _] + (assoc-in entities [:ego :actions] (concat + (actions/from-path screen entities :ego [290 66]) + [(actions/talk :ego (str "Maybe I can pull it out."))])))}] :scale-fn (scaler-fn-with-baseline 110 0.10 1.00) :layers [(assoc background :x 0 :y 0 :baseline 0) (assoc house :x 0 :y 0 :baseline 122)