adding stick.

This commit is contained in:
2014-10-30 11:17:13 -07:00
parent bb954465c2
commit 4bfb570a23
6 changed files with 11 additions and 2 deletions

View File

@@ -27,3 +27,4 @@
(def cards {:name "Warlock's Tower cards" :value :cards :cursor :cards})
(def cheat-deck {:name "Warlock's Tower cheat deck" :value :cheat-deck :cursor :cheat-deck})
(def stick {:name "Stick" :value :stick :cursor :stick})

View File

@@ -49,6 +49,14 @@
:layers [(assoc (texture "behindhouse/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "behindhouse/house.png") :x 0 :y 0 :baseline 122)
(assoc (texture "behindhouse/brush.png") :x 0 :y 0 :baseline 240)]
:entities {}
:entities {:stick (assoc (texture "behindhouse/stick.png")
:x 26 :y 80 :baseline 160
:script (actions/get-script entities
(actions/walk-to entities :ego [50 80])
(actions/play-animation entities :ego :reach)
(actions/remove-entity entities :stick)
(actions/give entities items/stick)
(actions/talk entities :ego "This stick might be useful.")
))}
:collision "behindhouse/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)))

View File

@@ -11,7 +11,7 @@
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
(println (:input-x screen) (:input-y screen) "->" x y)))
(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :cards :cheat-deck])
(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :cards :cheat-deck :stick])
(defn cursor [filename which]
(let [scale 2