removing stuff that needs to go away at night.

This commit is contained in:
2014-12-27 23:26:10 -08:00
parent e6055f6941
commit bc55fa4c28
5 changed files with 84 additions and 37 deletions

View File

@@ -92,6 +92,12 @@
(do-saved-grandma-dialogue entities)
(do-grandma-dialogue-with-cat entities)))
(defn make-night [entities]
(-> entities
(update-in [:room :entities] #(dissoc % :grandma))
(utils/remove-interaction :ladder-area)
(utils/remove-interaction :grandma)))
(defn make [screen]
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])]
@@ -211,5 +217,8 @@
(as-> entities entities
(if (actions/has-item? entities :kiss)
(update-in entities [:room :entities] #(dissoc % :cat))
entities)
(if (= :night (get-in entities [:state :time]))
(make-night entities)
entities)))
:start-pos [203 1])))