added outside particles. Nice effect.

This commit is contained in:
2015-07-27 19:02:59 -07:00
parent f523ab31b5
commit ae91eceee2
9 changed files with 457 additions and 3 deletions

View File

@@ -370,6 +370,8 @@
(concat p (reverse p))))
:bird-2 (utils/make-bird screen (as-> [[220 225] [195 235] [210 230] [250 225]] p
(concat p (reverse p))))
:outside-particles (common/make-outside-particles)
:door (assoc (animation->texture screen door)
:x 160 :y 97 :baseline 99
:open door
@@ -486,6 +488,7 @@
:collision "inside-castle/collision.png"
:scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00)
:apply-state (fn [_ entities]
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
(as-> entities entities
(if (actions/has-obtained? entities :trophy)
(update-in entities [:room :entities] #(dissoc % :trophy))