ending is beginning to be fun.

This commit is contained in:
Bryce Covert
2018-02-08 22:01:56 -08:00
67 changed files with 982 additions and 651 deletions

View File

@@ -390,13 +390,86 @@
:none)))
(defn do-win [entities]
(actions/transition-background entities :space [200 45] :between (fn [s e]
(Thread/sleep 3000)
(actions/update-entities entities (fn [e]
(-> e
(assoc-in [:room :entities :penultimate :opacity] 1)
(assoc-in [:room :entities :penultimate-wall :opacity] 1)
(assoc-in [:cam :paused?] false)
(update-in [:room :entities :ego ] assoc :x 178 :y 166 :baseline 4)
(update-in [:room :entities] dissoc :tongue)
(update-in [:room :entities :ego] actions/start-animation :fall-small))))
(actions/run-action entities
(begin [this screen entities]
(-> entities
(assoc-in [:tweens :ego-x] (tween/tween :ego-x screen [:room :entities :ego :x] 178 153 0.5 :ease tween/ease-linear))
(assoc-in [:tweens :ego-y] (tween/tween :ego-y screen [:room :entities :ego :y] 166 186 0.5 :ease tween/ease-out-cubic))))
(continue [this screen entities]
entities)
(done? [this screen entities]
(= 186 (get-in entities [:room :entities :ego :y])))
(terminate [this screen entities]
entities)
(skip-type [this screen entities]
:none))
(actions/run-action entities
(begin [this screen entities]
(-> entities
(assoc-in [:tweens :ego-x] (tween/tween :ego-x screen [:room :entities :ego :x] 153 53 2 :ease tween/ease-linear))
(assoc-in [:tweens :ego-y] (tween/tween :ego-y screen [:room :entities :ego :y] 186 0 2 :ease tween/ease-in-cubic))))
(continue [this screen entities]
entities)
(done? [this screen entities]
(= 0 (get-in entities [:room :entities :ego :y])))
(terminate [this screen entities]
entities)
(skip-type [this screen entities]
:none))
(Thread/sleep 1000)
(actions/update-entities entities (fn [e]
(-> e
(assoc-in [:room :entities :falling-bg :opacity] 1)
(assoc-in [:room :entities :sword-spin :opacity] 1))))
(Thread/sleep 4000)
(actions/update-entities entities (fn [e]
(-> e
(assoc-in [:room :entities :falling-bg :opacity] 0)
(assoc-in [:room :entities :sword-spin :opacity] 0))))
(Thread/sleep 1000)
(actions/update-entities entities (fn [e]
(-> e
(assoc-in [:room :entities :penultimate-black :opacity] 1))))
(println "doing screen shake?")
(actions/camera-shake entities 15.0)
(println "doing screen shake?")
(actions/transition-background entities :space [55 90] :time 6.0 :type :white-fade :between (fn [s e]
(-> e
(assoc-in [:room :entities :ego :stand-override] :crawl-stand)
(assoc-in [:room :entities :ego :previous-frame-index] -1)
(update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand)))
))
(update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand))
(update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand))
(update-in [:room :entities] dissoc :bloodclot-head)
(assoc-in [:room :entities :bloodclot-smoke] (get-in e [:room :bloodclot-smoke]))
(update-in [:room ] dissoc :broken-jewel)
(update-in [:room :entities :bloodclot] #(actions/start-animation s % :steam))
(update-in [:room :entities :ego] dissoc :stand-override :talk-override )
(update-in [:room :entities :grow-explode] (fn [g]
(particle-effect! g :reset)
(particle-effect! g :start)
g)))))
(Thread/sleep 2000)
(actions/play-animation entities :ego :standup)
(Thread/sleep 1000)
(actions/update-entities entities (fn [e]
@@ -407,7 +480,7 @@
(achievements/set-achievement "BLOODCLOT")
(actions/glad entities)
(actions/walk-straight-to entities :ego [340 55])
(actions/walk-straight-to entities :ego [340 95])
(actions/run-action entities
(begin [this screen entities]
(assoc-in entities [:tweens :later] (tween/tween :later screen [:room :entities :later :opacity] 0.0 1.0 4.0 :ease tween/ease-in-cubic)))