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,16 +9,25 @@
[play-clj.g2d :refer :all])) [play-clj.g2d :refer :all]))
(defn make [screen] (defn make [screen]
(rooms/make :interactions (let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
{:down-dir {:box [150 0 270 20] 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])]
:script (actions/get-script entities (aget cat-stand-sheet 0 i)))]
(actions/walk-to entities :ego [203 1]) (rooms/make :interactions
(actions/transition-background entities :outside-house [137 204]) {:down-dir {:box [150 0 270 20]
(actions/walk-to entities :ego [195 140])) :script (actions/get-script entities
:cursor :down}} (actions/walk-to entities :ego [203 1])
:layers [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0) (actions/transition-background entities :outside-house [137 204])
(assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161) (actions/walk-to entities :ego [195 140]))
(assoc (texture "cat-tree/sillhoute.png") :x 0 :y 0 :baseline 240)] :cursor :down}}
:entities {} :layers [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
:collision "cat-tree/collision.png" (assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20))) (assoc (texture "cat-tree/sillhoute.png") :x 0 :y 0 :baseline 240)]
: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"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20))))