adding cursors everywhere!

This commit is contained in:
Bryce Covert
2016-08-11 21:28:56 -07:00
parent 626eb12f98
commit 6f24840998

View File

@@ -224,6 +224,7 @@
:ego "Thanks, I guess.")) :ego "Thanks, I guess."))
(defn make-ladder-area [box] (defn make-ladder-area [box]
{:box box {:box box
:cursor :hand
:script (actions/get-script entities :script (actions/get-script entities
(actions/walk-to entities :ego [144 58] ) (actions/walk-to entities :ego [144 58] )
(actions/talk entities :ego "Maybe I can climb it!") (actions/talk entities :ego "Maybe I can climb it!")
@@ -275,22 +276,23 @@
(get-down entities)))}) (get-down entities)))})
:interactions :interactions
{:down-dir {:box [150 0 270 20] {:down-dir {:box [150 0 270 20]
:script (actions/get-script entities :only-script (actions/get-script entities
(if (get-in @entities [:room :entities :ladder]) (if (get-in @entities [:room :entities :ladder])
(do (do
(actions/talk entities :ego "I'll get down.") (actions/talk entities :ego "I'll get down.")
(get-down entities))) (get-down entities)))
(actions/walk-to entities :ego [200 10] :skip-type :end :stop? false) (actions/walk-to entities :ego [200 10] :skip-type :end :stop? false)
(actions/walk-straight-to entities :ego [223 -51]) (actions/walk-straight-to entities :ego [223 -51])
(actions/transition-background entities :outside-house [137 204]) (actions/transition-background entities :outside-house [137 204])
(actions/walk-to entities :ego [158 110] :skip-type :end)) (actions/walk-to entities :ego [158 110] :skip-type :end))
:cursor :down} :cursor :down}
:ladder-area-1 (make-ladder-area [123 100 167 199]) :ladder-area-1 (make-ladder-area [123 100 167 199])
:ladder-area-2 (make-ladder-area [87 151 227 212]) :ladder-area-2 (make-ladder-area [87 151 227 212])
:ladder-area-3 (make-ladder-area [133 69 205 92]) :ladder-area-3 (make-ladder-area [133 69 205 92])
:rock {:box [62 83 101 103] :rock {:box [62 83 101 103]
:cursor :hand
:script (actions/get-script entities :script (actions/get-script entities
(when (and (actions/has-obtained? entities :note-1) (when (and (actions/has-obtained? entities :note-1)
(not (actions/has-obtained? entities :walkie-talkies))) (not (actions/has-obtained? entities :walkie-talkies)))
@@ -310,6 +312,7 @@
(actions/talk entities :ego "Tin cans connected with string?") (actions/talk entities :ego "Tin cans connected with string?")
(actions/do-dialogue entities :ego "I wonder what all of these magic devices do.")))} (actions/do-dialogue entities :ego "I wonder what all of these magic devices do.")))}
:grass {:box [26 105 60 160] :grass {:box [26 105 60 160]
:cursor :hand
:script (actions/get-script entities :script (actions/get-script entities
(if (not (actions/has-obtained? entities :grass)) (if (not (actions/has-obtained? entities :grass))
(do (do
@@ -320,6 +323,7 @@
:ego "It's a high protein variety.")) :ego "It's a high protein variety."))
(actions/talk entities :ego "I don't really need any more grass.")))} (actions/talk entities :ego "I don't really need any more grass.")))}
:grandma {:box [109 33 132 98] :grandma {:box [109 33 132 98]
:cursor :talk
:script (actions/get-script entities (do-grandma-dialogue entities)) :script (actions/get-script entities (do-grandma-dialogue entities))
:scripts #(condp = % :scripts #(condp = %
:kiss :kiss
@@ -330,71 +334,72 @@
(actions/do-dialogue entities :grandma "No thank you, handsome.") (actions/do-dialogue entities :grandma "No thank you, handsome.")
(if (get-in @entities [:room :entities :ladder]) (if (get-in @entities [:room :entities :ladder])
(actions/do-stop entities :ego :face :right)))) (actions/do-stop entities :ego :face :right))))
}} }}
:layers {:day [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0) :layers {:day [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161) (assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240) (assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)] (assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]
:night [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0) :night [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161) (assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240) (assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]} (assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
:entities { :entities {
:outside-particles (common/make-outside-particles) :outside-particles (common/make-outside-particles)
:cat (actions/start-animation screen :cat (actions/start-animation screen
(assoc (animation->texture screen cat-stand) (assoc (animation->texture screen cat-stand)
:x 184 :y 173 :baseline 1000 :x 184 :y 173 :baseline 1000
:walk cat-walk :cursor :talk
:stand cat-stand :walk cat-walk
:script (actions/get-script entities :stand cat-stand
(actions/talk entities :ego "Here kitty, kitty, kitty.") :script (actions/get-script entities
(actions/talk entities :ego "Kitty's so bored, he doesn't even notice me.")) (actions/talk entities :ego "Here kitty, kitty, kitty.")
:scripts {:cat-toy (actions/get-script entities (actions/talk entities :ego "Kitty's so bored, he doesn't even notice me."))
(actions/play-animation entities :ego :cat-toy) :scripts {:cat-toy (actions/get-script entities
(if (get-in @entities [:room :entities :ladder]) (actions/play-animation entities :ego :cat-toy)
(do (actions/talk entities :ego "I think he's going for it!") (if (get-in @entities [:room :entities :ladder])
(actions/play-animation entities :ego :cat-toy-first-half :stop? false) (do (actions/talk entities :ego "I think he's going for it!")
(actions/play-sound entities :cat 0.5) (actions/play-animation entities :ego :cat-toy-first-half :stop? false)
(actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3) (actions/play-sound entities :cat 0.5)
(actions/play-animation entities :ego :cat-toy-last-half) (actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3)
(actions/play-animation entities :grandma :squat-1 :stop? false) (actions/play-animation entities :ego :cat-toy-last-half)
(actions/remove-entity entities :cat) (actions/play-animation entities :grandma :squat-1 :stop? false)
(actions/play-animation entities :grandma :squat-2) (actions/remove-entity entities :cat)
(actions/do-dialogue entities :grandma "Thank you for rescuing my furry friend, young man!") (actions/play-animation entities :grandma :squat-2)
(get-down entities true) (actions/do-dialogue entities :grandma "Thank you for rescuing my furry friend, young man!")
(actions/walk-straight-to entities :ego [165 45] :face :left) (get-down entities true)
(actions/do-dialogue entities (actions/walk-straight-to entities :ego [165 45] :face :left)
:ego "It's no big deal." (actions/do-dialogue entities
:grandma "You won't go unrewarded!" :ego "It's no big deal."
:grandma "Come here, young man.") :grandma "You won't go unrewarded!"
(actions/walk-straight-to entities :ego [133 35]) :grandma "Come here, young man.")
(actions/talk entities :grandma "For your impressive display of courage and bravery, I give you this. ") (actions/walk-straight-to entities :ego [133 35])
(actions/talk entities :grandma "For your impressive display of courage and bravery, I give you this. ")
(actions/play-sound entities :kiss 0.7) (actions/play-sound entities :kiss 0.7)
(actions/play-animation entities :grandma :kiss) (actions/play-animation entities :grandma :kiss)
(actions/play-animation entities :ego :get-sick :stop? false) (actions/play-animation entities :ego :get-sick :stop? false)
(actions/walk-straight-to entities :ego [165 45]) (actions/walk-straight-to entities :ego [165 45])
(actions/do-dialogue entities :ego (actions/do-dialogue entities :ego
"Ugh! Gross!" "Ugh! Gross!"
:ego "What's this?") :ego "What's this?")
(actions/give entities :kiss) (actions/give entities :kiss)
(actions/do-dialogue entities :ego "A kiss for an inventory item?" (actions/do-dialogue entities :ego "A kiss for an inventory item?"
:ego "Sounds like the game designer was running out of good ideas.") :ego "Sounds like the game designer was running out of good ideas.")
(steam/set-achievement "KITTY_KISS")) (steam/set-achievement "KITTY_KISS"))
(actions/talk entities :ego "I can't get his attention from way down here."))) (actions/talk entities :ego "I can't get his attention from way down here.")))
:stick (actions/get-script entities :stick (actions/get-script entities
(if (get-in @entities [:room :entities :ladder]) (if (get-in @entities [:room :entities :ladder])
(do (do
(actions/play-animation entities :ego :poke) (actions/play-animation entities :ego :poke)
(actions/do-dialogue entities (actions/do-dialogue entities
:ego "He's still too far for me to poke him." :ego "He's still too far for me to poke him."
:ego "Maybe I can encourage him to come down on his own.")) :ego "Maybe I can encourage him to come down on his own."))
(do (do
(actions/walk-to entities :ego [210 58] :face :right) (actions/walk-to entities :ego [210 58] :face :right)
(actions/play-animation entities :ego :poke) (actions/play-animation entities :ego :poke)
(actions/talk entities :ego "I can't poke him from way down here.")))) (actions/talk entities :ego "I can't poke him from way down here."))))
:wool (actions/get-script entities (actions/talk entities :ego "I don't think the cat would notice the wool from all the way up there.")) :wool (actions/get-script entities (actions/talk entities :ego "I don't think the cat would notice the wool from all the way up there."))
:default (actions/get-script entities (actions/talk entities :ego "Kitty seems disinterested in it."))}) :default (actions/get-script entities (actions/talk entities :ego "Kitty seems disinterested in it."))})
cat-stand) cat-stand)
:grandma (let [gma (assoc (animation->texture screen grandma-stand) :grandma (let [gma (assoc (animation->texture screen grandma-stand)
:x 130 :y 37 :baseline 200 :x 130 :y 37 :baseline 200
:anim grandma-stand :anim grandma-stand
@@ -425,6 +430,7 @@
:talk owl-talk :talk owl-talk
:puke owl-puke :puke owl-puke
:eye owl-eye :eye owl-eye
:cursor :talk
:talk-color (color 0.5 0.5 1.0 1.0) :talk-color (color 0.5 0.5 1.0 1.0)
:anim owl-stand :anim owl-stand
:anim-start 0 :anim-start 0
@@ -498,5 +504,5 @@
(if (= :night (get-in entities [:state :time])) (if (= :night (get-in entities [:state :time]))
(make-night entities) (make-night entities)
(utils/remove-interaction entities :rock) (utils/remove-interaction entities :rock)
))) )))
:start-pos [200 10]))) :start-pos [200 10])))