wizard improvements.

This commit is contained in:
2014-12-10 23:22:40 -08:00
parent c0ef31966e
commit d069849bc8
24 changed files with 91 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,82 @@
<?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>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<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

@@ -75,6 +75,8 @@
:wizard "Already?" :wizard "Already?"
:wizard "Ok, I'll deliver them myself. Don't touch anything while I'm gone.") :wizard "Ok, I'll deliver them myself. Don't touch anything while I'm gone.")
(actions/update-state entities (fn [s] (assoc s :mints-eaten 0))) (actions/update-state entities (fn [s] (assoc s :mints-eaten 0)))
(sound! (sound "inside-house/disappear.ogg") :play)
(actions/play-animation entities :wizard :disappear :stop? false)
(actions/remove-entity entities :wizard))} (actions/remove-entity entities :wizard))}
"Nevermind." "Nevermind."
{:run #(actions/do-dialogue entities :ego %)}]})) {:run #(actions/do-dialogue entities :ego %)}]}))
@@ -83,6 +85,7 @@
(let [wizard-sheet (texture! (texture "wizard/talk.png") :split 20 46) (let [wizard-sheet (texture! (texture "wizard/talk.png") :split 20 46)
wizard-stand (animation 0.2 (for [i (flatten [(repeat 10 0) 1])] wizard-stand (animation 0.2 (for [i (flatten [(repeat 10 0) 1])]
(aget wizard-sheet 0 i))) (aget wizard-sheet 0 i)))
wizard-disappear (utils/make-anim "wizard/disappear.png" [20 46] 0.075 (range 19))
wizard-talk (animation 0.2 (for [i [0 2 0 2 1 2 0 3 0 2 0 1 0 2]] wizard-talk (animation 0.2 (for [i [0 2 0 2 1 2 0 3 0 2 0 1 0 2]]
(aget wizard-sheet 0 i))) (aget wizard-sheet 0 i)))
safelock-sheet (texture! (texture "inside-house/safe-lock.png") :split 9 2) safelock-sheet (texture! (texture "inside-house/safe-lock.png") :split 9 2)
@@ -106,9 +109,11 @@
(assoc (texture "inside-house/sillhoute.png") :x 0 :y 0 :baseline 240)] (assoc (texture "inside-house/sillhoute.png") :x 0 :y 0 :baseline 240)]
:entities {:wizard (actions/start-animation screen (assoc (animation->texture screen wizard-stand) :x 228 :y 80 :baseline 160 :scale-x 1.75 :scale-y 1.75 :entities {:wizard (actions/start-animation screen (assoc (animation->texture screen wizard-stand) :x 228 :y 80 :baseline 160 :scale-x 1.75 :scale-y 1.75
:left {:talk (utils/flip wizard-talk) :left {:talk (utils/flip wizard-talk)
:stand (utils/flip wizard-stand)} :stand (utils/flip wizard-stand)
:disappear (utils/flip wizard-disappear)}
:right {:talk wizard-talk :right {:talk wizard-talk
:stand wizard-stand} :stand wizard-stand
:disappear wizard-disappear}
:facing :left :facing :left
:script (actions/get-script entities (do-wizard-dialogue entities))) :script (actions/get-script entities (do-wizard-dialogue entities)))
:stand) :stand)
@@ -128,5 +133,6 @@
(as-> entities entities (as-> entities entities
(if (actions/has-one-of? entities [:flask-1 :flask-1-with-cream-of-mushroom :flask-1-strength :flask-1-with-mushrooms :flask-1-with-milk]) (if (actions/has-one-of? entities [:flask-1 :flask-1-with-cream-of-mushroom :flask-1-strength :flask-1-with-mushrooms :flask-1-with-milk])
(update-in entities [:room :entities] #(dissoc % :flask)) (update-in entities [:room :entities] #(dissoc % :flask))
entities))) entities)
(assoc-in entities [:state :mints-eaten] 3)))
:start-pos [237 0]))) :start-pos [237 0])))