add reaching.

This commit is contained in:
2014-10-22 15:52:18 -07:00
parent 8c8acc91c5
commit 27657afc41
9 changed files with 38 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
<?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>
</array>
</plist>

View File

@@ -22,9 +22,14 @@
:script (actions/get-script
entities
(actions/walk-to entities :ego [70 80])
(actions/talk entities :ego "I can see Fangald, the wizard inside.")
(actions/play-animation entities :ego :squat)
(actions/talk entities :ego "I can see Gandarf, the wizard inside.")
(actions/play-animation entities :ego :squat)
(actions/talk entities :ego "It looks like he's opening his Magi-safe.")
(actions/play-animation entities :ego :squat)
(actions/talk entities :ego "[todo: sounds play.]")
(actions/play-animation entities :ego :squat)
(actions/talk entities :ego "A lot of good it'll do me to know his password while he's still there."))}
:mushrooms {:box [247 59 269 76]
:script (actions/get-script

View File

@@ -122,8 +122,9 @@
{:door {:box [258 100 281 160]
:script (actions/get-script
entities
(actions/walk-to entities :ego [262 88])
(actions/walk-to entities :ego [267 90])
(actions/talk entities :ego (str "Anyone home?"))
(actions/play-animation entities :ego :reach)
(actions/transition-background entities :inside-house [237 0])
(if (get-in @entities [:state :convinced-wizard?])
(actions/talk entities :wizard (str "Oh, hello there boy."))

View File

@@ -79,6 +79,7 @@
talk-sheet (texture! (texture "ego/talk.png") :split 18 36)
stand-sheet (texture! (texture "ego/stand.png") :split 18 36)
squat-sheet (texture! (texture "ego/squat.png") :split 18 36)
reach-sheet (texture! (texture "ego/reach.png") :split 18 36)
walk-right (animation 0.075 (for [i (range 8)]
(texture (aget player-sheet 0 i))))
stand-anim (animation 0.1 (for [i (flatten [(repeat 6 [(repeat 10 0) (repeat 3 1) (repeat 20 0)]) 3 4 5 5 5 6 5 6 5 6 5 4 3 ])]
@@ -87,14 +88,18 @@
(texture (aget talk-sheet 0 i))))
squat-anim (animation 0.05 (for [i [0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 2 1] ]
(texture (aget squat-sheet 0 i))))
reach-anim (animation 0.1 (for [i [0 1 2 3 3 3 3 3 3 2 1 0]]
(texture (aget reach-sheet 0 i))))
ego {:right {:walk walk-right
:stand stand-anim
:talk talk-anim
:squat squat-anim}
:squat squat-anim
:reach reach-anim}
:left {:walk (utils/flip walk-right)
:stand (utils/flip stand-anim)
:talk (utils/flip talk-anim)
:squat (utils/flip squat-anim)}
:squat (utils/flip squat-anim)
:reach (utils/flip reach-anim)}
:baseline 95
:facing :right
:origin-x 9
@@ -148,7 +153,7 @@
(update! screen :renderer (stage) :camera (orthographic))
(let [_ (input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
music (sound "town-music.mp3")
_ (sound! music :loop 0.30)
;;_ (sound! music :loop 0.30)
rooms {:inside-house (rooms.inside-house/make screen)
:outside-house (rooms.outside-house/make screen)
:behind-house (rooms.behind-house/make screen)