cannot espace without dropping the ball.

This commit is contained in:
2014-12-27 16:00:45 -08:00
parent e0f4dcf607
commit 193e530567
5 changed files with 32 additions and 12 deletions

View File

@@ -11,7 +11,10 @@
(defn make [screen]
(let [fountain (utils/make-anim "outside-jail/fountain.png" [42 50] 0.2 (range 3))]
(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)))]
(rooms/make :music :town-2
:interactions {:down-dir {:box [30 0 227 20]
:script (actions/get-script entities
@@ -66,6 +69,13 @@
:width 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)
:collision "outside-jail/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 40 0.001 1.3)
:start-pos [145 15])))
:start-pos [145 15]
:apply-state (fn [entities]
(as-> entities entities
(if (= :night (get-in entities [:state :time]))
(assoc-in entities [:room :entities :guard] (get-in entities [:room :guard]))
entities))))))