added guard for ladder.

This commit is contained in:
2014-11-19 12:48:54 -08:00
parent 47deaacbac
commit ce3e5e9e38
2 changed files with 15 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -59,7 +59,11 @@
(defn make [screen]
(let [warriors-stand-sheet (texture! (texture "inside-cafeteria/warriors-stand.png") :split 66 126)
warriors-stand (animation 0.2 (for [i [0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 2 2 2 2 3 3 3 0 0 0 2 2 2 ]]
(aget warriors-stand-sheet 0 i)))]
(aget warriors-stand-sheet 0 i)))
ladder-guard-sheet (texture! (texture "inside-cafeteria/ladder-guard.png") :split 37 87)
ladder-guard-stand (animation 0.1 [(aget ladder-guard-sheet 0 0)])
ladder-guard-talk (animation 0.2 (for [i [0 0 0 0 1 0 0 1]]
(aget ladder-guard-sheet 0 i)))]
(rooms/make :music :town-1
:interactions
{:right-dir {:box [300 0 320 120]
@@ -81,6 +85,15 @@
:script (actions/get-script entities
(do-warrior-dialogue entities)
))
:stand) }
:stand)
:ladder-guard (actions/start-animation screen (assoc (animation->texture screen ladder-guard-stand) :x 202 :y 85 :baseline 155
:stand ladder-guard-stand
:talk ladder-guard-talk
:script (actions/get-script entities
(actions/talk entities :ladder-guard "Moveth along, young sire.")))
:stand)
:ladder (assoc (texture "inside-cafeteria/ladder.png") :x 250 :y 85 :baseline 155
:script (actions/get-script entities
(actions/talk entities :ladder-guard "Do not toucheth, young sire.")))}
:collision "inside-cafeteria/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.50))))