added sheep animations.
This commit is contained in:
BIN
desktop/resources/outsidehouse/sheep-walk.png
Normal file
BIN
desktop/resources/outsidehouse/sheep-walk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/0.pxi
Normal file
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/0.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/1.pxi
Normal file
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/1.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/2.pxi
Normal file
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/2.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/3.pxi
Normal file
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/3.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/4.pxi
Normal file
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/4.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/5.pxi
Normal file
BIN
desktop/resources/outsidehouse/sheep-walk.pxa/5.pxi
Normal file
Binary file not shown.
30
desktop/resources/outsidehouse/sheep-walk.pxa/CelData.plist
Normal file
30
desktop/resources/outsidehouse/sheep-walk.pxa/CelData.plist
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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>0.10000000149011612</real>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>duration</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>duration</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>duration</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>duration</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>duration</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
||||
@@ -101,9 +101,12 @@
|
||||
(actions/respond entities % :wizard "Now scram!")
|
||||
(actions/transition-background entities :outside-house [262 88]))}]}))
|
||||
(defn make [screen]
|
||||
(let [sheep-sheet (texture! (texture "outsidehouse/sheep-anim.png") :split 33 21)
|
||||
sheep (animation 0.15 (for [i (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 9 10 (repeat 25 11) (repeat 15 12)])]
|
||||
(aget sheep-sheet 0 i)))]
|
||||
(let [sheep-stand-sheet (texture! (texture "outsidehouse/sheep-anim.png") :split 33 21)
|
||||
sheep-walk-sheet (texture! (texture "outsidehouse/sheep-walk.png") :split 33 21)
|
||||
sheep-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 9 10 (repeat 25 11) (repeat 15 12)])]
|
||||
(aget sheep-stand-sheet 0 i)))
|
||||
sheep-walk (animation 0.15 (for [i (range 6)]
|
||||
(aget sheep-walk-sheet 0 i)))]
|
||||
(rooms/make :interactions
|
||||
{:door {:box [258 100 281 160]
|
||||
:script (actions/get-script
|
||||
@@ -144,7 +147,7 @@
|
||||
(assoc (texture "overdirt.png") :x 0 :y 0 :baseline 240)
|
||||
(assoc (texture "background-trees.png") :x 0 :y 0 :baseline 44)]
|
||||
:entities {:sheep (actions/start-animation screen
|
||||
(assoc (animation->texture screen sheep) :x 38 :y 160 :baseline 160
|
||||
(assoc (animation->texture screen sheep-stand) :x 38 :y 160 :baseline 160
|
||||
:box [38 160 71 181]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
@@ -157,7 +160,11 @@
|
||||
:carrot (actions/get-script entities
|
||||
(actions/walk-to entities :ego [132 140])
|
||||
(actions/talk entities :ego "Come on girl, get the carrot!")
|
||||
(actions/walk-straight-to entities :sheep [100 150]))})
|
||||
sheep)}
|
||||
(actions/walk-straight-to entities :sheep [95 150]))}
|
||||
:left {:walk (utils/flip sheep-walk)
|
||||
:stand (utils/flip sheep-stand)}
|
||||
:right {:walk sheep-walk
|
||||
:stand sheep-stand})
|
||||
sheep-stand)}
|
||||
:collision "outsidehouse/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00))))
|
||||
|
||||
Reference in New Issue
Block a user