add reaching.
This commit is contained in:
BIN
desktop/resources/ego/reach.png
Normal file
BIN
desktop/resources/ego/reach.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
desktop/resources/ego/reach.pxa/0.pxi
Normal file
BIN
desktop/resources/ego/reach.pxa/0.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/ego/reach.pxa/1.pxi
Normal file
BIN
desktop/resources/ego/reach.pxa/1.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/ego/reach.pxa/2.pxi
Normal file
BIN
desktop/resources/ego/reach.pxa/2.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/ego/reach.pxa/3.pxi
Normal file
BIN
desktop/resources/ego/reach.pxa/3.pxi
Normal file
Binary file not shown.
22
desktop/resources/ego/reach.pxa/CelData.plist
Normal file
22
desktop/resources/ego/reach.pxa/CelData.plist
Normal 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>
|
||||||
@@ -22,9 +22,14 @@
|
|||||||
:script (actions/get-script
|
:script (actions/get-script
|
||||||
entities
|
entities
|
||||||
(actions/walk-to entities :ego [70 80])
|
(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/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/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."))}
|
(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]
|
:mushrooms {:box [247 59 269 76]
|
||||||
:script (actions/get-script
|
:script (actions/get-script
|
||||||
|
|||||||
@@ -122,8 +122,9 @@
|
|||||||
{:door {:box [258 100 281 160]
|
{:door {:box [258 100 281 160]
|
||||||
:script (actions/get-script
|
:script (actions/get-script
|
||||||
entities
|
entities
|
||||||
(actions/walk-to entities :ego [262 88])
|
(actions/walk-to entities :ego [267 90])
|
||||||
(actions/talk entities :ego (str "Anyone home?"))
|
(actions/talk entities :ego (str "Anyone home?"))
|
||||||
|
(actions/play-animation entities :ego :reach)
|
||||||
(actions/transition-background entities :inside-house [237 0])
|
(actions/transition-background entities :inside-house [237 0])
|
||||||
(if (get-in @entities [:state :convinced-wizard?])
|
(if (get-in @entities [:state :convinced-wizard?])
|
||||||
(actions/talk entities :wizard (str "Oh, hello there boy."))
|
(actions/talk entities :wizard (str "Oh, hello there boy."))
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
talk-sheet (texture! (texture "ego/talk.png") :split 18 36)
|
talk-sheet (texture! (texture "ego/talk.png") :split 18 36)
|
||||||
stand-sheet (texture! (texture "ego/stand.png") :split 18 36)
|
stand-sheet (texture! (texture "ego/stand.png") :split 18 36)
|
||||||
squat-sheet (texture! (texture "ego/squat.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)]
|
walk-right (animation 0.075 (for [i (range 8)]
|
||||||
(texture (aget player-sheet 0 i))))
|
(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 ])]
|
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))))
|
(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] ]
|
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))))
|
(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
|
ego {:right {:walk walk-right
|
||||||
:stand stand-anim
|
:stand stand-anim
|
||||||
:talk talk-anim
|
:talk talk-anim
|
||||||
:squat squat-anim}
|
:squat squat-anim
|
||||||
|
:reach reach-anim}
|
||||||
:left {:walk (utils/flip walk-right)
|
:left {:walk (utils/flip walk-right)
|
||||||
:stand (utils/flip stand-anim)
|
:stand (utils/flip stand-anim)
|
||||||
:talk (utils/flip talk-anim)
|
:talk (utils/flip talk-anim)
|
||||||
:squat (utils/flip squat-anim)}
|
:squat (utils/flip squat-anim)
|
||||||
|
:reach (utils/flip reach-anim)}
|
||||||
:baseline 95
|
:baseline 95
|
||||||
:facing :right
|
:facing :right
|
||||||
:origin-x 9
|
:origin-x 9
|
||||||
@@ -148,7 +153,7 @@
|
|||||||
(update! screen :renderer (stage) :camera (orthographic))
|
(update! screen :renderer (stage) :camera (orthographic))
|
||||||
(let [_ (input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
|
(let [_ (input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
|
||||||
music (sound "town-music.mp3")
|
music (sound "town-music.mp3")
|
||||||
_ (sound! music :loop 0.30)
|
;;_ (sound! music :loop 0.30)
|
||||||
rooms {:inside-house (rooms.inside-house/make screen)
|
rooms {:inside-house (rooms.inside-house/make screen)
|
||||||
:outside-house (rooms.outside-house/make screen)
|
:outside-house (rooms.outside-house/make screen)
|
||||||
:behind-house (rooms.behind-house/make screen)
|
:behind-house (rooms.behind-house/make screen)
|
||||||
|
|||||||
Reference in New Issue
Block a user