added owl.

This commit is contained in:
2014-12-28 13:16:24 -08:00
parent 527c6eefe2
commit 06312fbbdc
7 changed files with 36 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

View File

@@ -96,7 +96,13 @@
(-> entities
(update-in [:room :entities] #(dissoc % :grandma))
(utils/remove-interaction :ladder-area)
(utils/remove-interaction :grandma)))
(utils/remove-interaction :grandma)
(update-in [:room :entities] #(assoc % :owl (doto (get-in entities [:room :owl]) println)))))
(defn talk-to-owl [entities]
(actions/walk-to entities :ego [141 54] :face :right)
(actions/do-dialogue entities :ego "Hello there little owl."
:owl "You talking to me?"))
(defn make [screen]
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
@@ -108,7 +114,9 @@
grandma-squat-1 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [3 4 5 5 5 5 5])
grandma-squat-2 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [5 5 4 3])
grandma-talk (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 2 0 2 0 2 0 2 0 2 0 1 0 2 0 0])
grandma-kiss (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 8 9 10 9 10 9 10 9 8 0])]
grandma-kiss (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 8 9 10 9 10 9 10 9 8 0])
owl-stand (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [0 0 0 0 0 0 0 2])
owl-talk (utils/make-anim "cat-tree/owl.png" [19 28] 0.2 [1 0 1 0 1 0 0 0 2 0])]
(rooms/make :music :town-2
:interactions
{:down-dir {:box [150 0 270 20]
@@ -211,6 +219,14 @@
:origin-y 0
:scale-x 1.45
:scale-y 1.45)}
:owl (rooms/make-entity :owl (assoc (animation->texture screen owl-stand)
:x 187 :y 172 :baseline 241
:stand owl-stand
:talk owl-talk
:talk-color (color 0.5 0.5 1.0 1.0)
:anim owl-stand
:anim-start 0
:script (actions/get-script entities (talk-to-owl entities))))
:collision "cat-tree/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
:apply-state (fn [entities]