added cat toy.

This commit is contained in:
2014-11-01 13:01:05 -07:00
parent f496f61003
commit e4005245c6
2 changed files with 11 additions and 3 deletions

View File

@@ -27,7 +27,10 @@
:x 184 :y 173 :baseline 240
:script (actions/get-script entities
(actions/talk entities :ego "Here kitty, kitty, kitty.")
(actions/talk entities :ego "Kitty's not so interested in me.")))
(actions/talk entities :ego "Kitty's not so interested in me."))
:scripts {:cat-toy (actions/get-script entities
(actions/play-animation entities :ego :cat-toy)
(actions/talk entities :ego "I guess I'm too far away."))})
cat-stand)}
:collision "cat-tree/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20))))

View File

@@ -81,6 +81,7 @@
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)
cat-toy-sheet (texture! (texture "ego/cat-toy.png") :split 41 50)
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 ])]
@@ -91,16 +92,20 @@
(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))))
cat-toy-anim (animation 0.1 (for [i [0 0 1 1 2 2 3 4 3 2 3 4 3 2 3 4 3 2 3 4 3 2 2 1 1 0 0]]
(texture (aget cat-toy-sheet 0 i))))
ego {:right {:walk walk-right
:stand stand-anim
:talk talk-anim
:squat squat-anim
:reach reach-anim}
:reach reach-anim
:cat-toy cat-toy-anim}
:left {:walk (utils/flip walk-right)
:stand (utils/flip stand-anim)
:talk (utils/flip talk-anim)
:squat (utils/flip squat-anim)
:reach (utils/flip reach-anim)}
:reach (utils/flip reach-anim)
:cat-toy (utils/flip cat-toy-anim)}
:baseline 95
:facing :right
:origin-x 9