rooms are beginning to be affected by state.
This commit is contained in:
@@ -68,4 +68,12 @@
|
||||
(actions/update-entity entities :peeling #(assoc % :opacity 0))
|
||||
(actions/update-state entities (fn [state] (assoc state :opened-crack? true)))))))}
|
||||
:collision "behindhouse/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)))
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:apply-state (fn [entities]
|
||||
(as-> entities entities
|
||||
(if (get-in entities [:state :opened-crack?])
|
||||
(assoc-in entities [:room :entities :peeling :opacity] 0)
|
||||
entities)
|
||||
(if (actions/has-one-of? entities [items/stick items/cat-toy])
|
||||
(update-in entities [:room :entities] #(dissoc % :stick))
|
||||
entities)))))
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
:inside-fangald (make-music "inside-fangald.ogg")}
|
||||
:state {:object nil
|
||||
:active? true
|
||||
:inventory [items/grass ]
|
||||
:inventory [items/grass]
|
||||
:clues #{}
|
||||
:mints-eaten 0}
|
||||
:actions {:object nil
|
||||
|
||||
Reference in New Issue
Block a user