you can escape from jail properly.

This commit is contained in:
2014-12-27 17:02:23 -08:00
parent 193e530567
commit 329902dda8
16 changed files with 82 additions and 7 deletions

View File

@@ -14,7 +14,8 @@
(let [fountain (utils/make-anim "outside-jail/fountain.png" [42 50] 0.2 (range 3))
guard-sheet (texture! (texture "inside-cafeteria/ladder-guard.png") :split 37 87)
guard-stand (animation 0.1 [(aget guard-sheet 0 0)])
guard-talk (animation 0.2 (for [i [0 0 0 0 1 0 0 1]] (aget guard-sheet 0 i)))]
guard-talk (animation 0.2 (for [i [0 0 0 0 1 0 0 1]] (aget guard-sheet 0 i)))
guard-sleep (utils/make-anim "outside-jail/guard-sleep.png" [43 67] 0.1 (range 4))]
(rooms/make :music :town-2
:interactions {:down-dir {:box [30 0 227 20]
:script (actions/get-script entities
@@ -70,7 +71,10 @@
:height 10
:talk-color (color 0.9 0.3 0.9 1.0)}}
:guard (assoc (animation->texture screen guard-stand)
:x 70 :y 55 :baseline 185)
:x 70 :y 55 :baseline 185
:stand guard-stand
:talk guard-talk
:sleep guard-sleep)
:collision "outside-jail/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 40 0.001 1.3)
:start-pos [145 15]
@@ -78,4 +82,7 @@
(as-> entities entities
(if (= :night (get-in entities [:state :time]))
(assoc-in entities [:room :entities :guard] (get-in entities [:room :guard]))
entities)
(if (get-in entities [:state :dropped-ball?])
(update-in entities [:room :entities :guard] #(actions/start-animation % :sleep))
entities))))))