diff --git a/desktop/resources/cat-tree/background.psd b/desktop/resources/cat-tree/background.psd index 0e36758a..041b3465 100644 Binary files a/desktop/resources/cat-tree/background.psd and b/desktop/resources/cat-tree/background.psd differ diff --git a/desktop/resources/cat-tree/owl.png b/desktop/resources/cat-tree/owl.png new file mode 100644 index 00000000..f02dab6a Binary files /dev/null and b/desktop/resources/cat-tree/owl.png differ diff --git a/desktop/resources/cat-tree/owl.pxa/0.pxi b/desktop/resources/cat-tree/owl.pxa/0.pxi new file mode 100644 index 00000000..da21af79 Binary files /dev/null and b/desktop/resources/cat-tree/owl.pxa/0.pxi differ diff --git a/desktop/resources/cat-tree/owl.pxa/1.pxi b/desktop/resources/cat-tree/owl.pxa/1.pxi new file mode 100644 index 00000000..0b12ddbc Binary files /dev/null and b/desktop/resources/cat-tree/owl.pxa/1.pxi differ diff --git a/desktop/resources/cat-tree/owl.pxa/2.pxi b/desktop/resources/cat-tree/owl.pxa/2.pxi new file mode 100644 index 00000000..7d05a39d Binary files /dev/null and b/desktop/resources/cat-tree/owl.pxa/2.pxi differ diff --git a/desktop/resources/cat-tree/owl.pxa/CelData.plist b/desktop/resources/cat-tree/owl.pxa/CelData.plist new file mode 100644 index 00000000..4749afb9 --- /dev/null +++ b/desktop/resources/cat-tree/owl.pxa/CelData.plist @@ -0,0 +1,18 @@ + + + + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + diff --git a/desktop/src-common/advent/screens/rooms/cat_tree.clj b/desktop/src-common/advent/screens/rooms/cat_tree.clj index 070a0b25..f0e55ef2 100644 --- a/desktop/src-common/advent/screens/rooms/cat_tree.clj +++ b/desktop/src-common/advent/screens/rooms/cat_tree.clj @@ -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]