added kitty.

This commit is contained in:
2014-10-06 21:21:14 -07:00
parent 2b7b663e72
commit a926bbe98a
2 changed files with 22 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -9,6 +9,9 @@
[play-clj.g2d :refer :all])) [play-clj.g2d :refer :all]))
(defn make [screen] (defn make [screen]
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])]
(aget cat-stand-sheet 0 i)))]
(rooms/make :interactions (rooms/make :interactions
{:down-dir {:box [150 0 270 20] {:down-dir {:box [150 0 270 20]
:script (actions/get-script entities :script (actions/get-script entities
@@ -19,6 +22,12 @@
:layers [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0) :layers [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161) (assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (texture "cat-tree/sillhoute.png") :x 0 :y 0 :baseline 240)] (assoc (texture "cat-tree/sillhoute.png") :x 0 :y 0 :baseline 240)]
:entities {} :entities { :cat (actions/start-animation screen
(assoc (animation->texture screen cat-stand)
:x 184 :y 173 :baseline 240
:script (actions/get-script entities
(actions/talk entities :ego "Here kitty, kitty, kitty.")
(actions/talk entities :ego "Kitty's not so interested in me.")))
cat-stand)}
:collision "cat-tree/collision.png" :collision "cat-tree/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20))) :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20))))