lots of ending improvements
This commit is contained in:
@@ -677,6 +677,40 @@
|
||||
(skip-type [this screen entities]
|
||||
:none))))
|
||||
|
||||
(defn fade [entities time between]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
|
||||
(-> entities
|
||||
(assoc-in [:tweens :fade-out] (tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 time))
|
||||
(assoc-in [:tweens :fade-out-music] (tween/tween :fade-out-music screen [:volume :value] 1.0 0.0 time))))
|
||||
|
||||
(continue [this screen entities]
|
||||
entities)
|
||||
|
||||
(done? [this screen entities]
|
||||
(>= (get-in entities [:fade :opacity]) 1.0))
|
||||
|
||||
(terminate [this screen entities]
|
||||
(between entities))
|
||||
(skip-type [this screen entities]
|
||||
:none))
|
||||
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
|
||||
(assoc-in entities [:tweens :fade-out] (tween/tween :fade-out screen [:fade :opacity] 1.0 0.0 time)))
|
||||
|
||||
(continue [this screen entities]
|
||||
entities)
|
||||
|
||||
(done? [this screen entities]
|
||||
(>= (get-in entities [:fade :opacity]) 0.0))
|
||||
|
||||
(terminate [this screen entities]
|
||||
(between entities))
|
||||
(skip-type [this screen entities]
|
||||
:none)))
|
||||
|
||||
(defn transition-background [entities new-background [x y] & {:keys [transition-music? between time face type]}]
|
||||
(let [transition-music? (if (nil? transition-music?) true transition-music?)
|
||||
@@ -789,6 +823,23 @@
|
||||
(defn respond [entities line & more]
|
||||
(apply do-dialogue entities :ego line more))
|
||||
|
||||
(defn tween [entities id tween-maker]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
|
||||
(assoc-in entities [:tweens id] (tween-maker screen entities)))
|
||||
|
||||
(continue [this screen entities]
|
||||
entities)
|
||||
|
||||
(done? [this screen entities]
|
||||
(nil? (get-in entities [:tweens id])))
|
||||
|
||||
(terminate [this screen entities]
|
||||
entities)
|
||||
(skip-type [this screen entities]
|
||||
:none)))
|
||||
|
||||
(defn glad [entities]
|
||||
(actions/run-action entities
|
||||
(begin [this screen entities]
|
||||
|
||||
@@ -9,13 +9,14 @@
|
||||
(println "loading " *ns*)
|
||||
|
||||
(defn make-entity [id {:keys [scripts script only-script] :as entity}]
|
||||
|
||||
(merge entity
|
||||
{:id id
|
||||
:mouse-in? (fn [entities x y]
|
||||
(let [e (utils/get-entity entities id)]
|
||||
(if-let [[bx1 by1 bx2 by2] (:box e)]
|
||||
(zone/within bx1 by1 bx2 by2 x y)
|
||||
(let [{^float entity-x :x ^float entity-y :y width :width scale-x :scale-x scale-y :scale-y origin-x :origin-x origin-y :origin-y height :height region :object} (-> entities :room :entities id)
|
||||
(let [{^float entity-x :x ^float entity-y :y width :width scale-x :scale-x scale-y :scale-y origin-x :origin-x origin-y :origin-y height :height region :object} (-> entities :room :entities (get id))
|
||||
|
||||
width (or width (if (instance? TextureRegion region ) (.getRegionWidth ^TextureRegion region) 0))
|
||||
height (or height (if (instance? TextureRegion region ) (.getRegionHeight ^TextureRegion region) 0))
|
||||
|
||||
@@ -389,22 +389,16 @@
|
||||
(skip-type [this screen entities]
|
||||
:none)))
|
||||
|
||||
(defn do-win [entities]
|
||||
(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))))
|
||||
(defn jump-away [entities]
|
||||
(Thread/sleep 500)
|
||||
(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))))
|
||||
(assoc-in [:tweens :ego-x] (tween/tween :ego-x screen [:room :entities :ego :x] 200 163 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))
|
||||
(update-in [:room :entities :bloodclot-swallow-top] #(actions/start-animation screen % :swallow))
|
||||
(update-in [:room :entities :bloodclot-swallow-bottom] #(actions/start-animation screen % :swallow))))
|
||||
(continue [this screen entities]
|
||||
entities)
|
||||
(done? [this screen entities]
|
||||
@@ -419,7 +413,7 @@
|
||||
(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-x] (tween/tween :ego-x screen [:room :entities :ego :x] 163 63 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)
|
||||
@@ -436,37 +430,126 @@
|
||||
(-> e
|
||||
(assoc-in [:room :entities :falling-bg :opacity] 1)
|
||||
(assoc-in [:room :entities :sword-spin :opacity] 1))))
|
||||
(Thread/sleep 2000))
|
||||
|
||||
(defn show-big-bloodclot [entities time]
|
||||
(actions/update-entities entities (fn [e]
|
||||
(-> e
|
||||
(assoc-in [:room :entities :bloodclot-swallow-top :opacity] 1)
|
||||
(assoc-in [:room :entities :bloodclot-swallow-bottom :opacity] 1)
|
||||
(assoc-in [:room :entities :falling-ego :opacity] 0)
|
||||
(assoc-in [:room :entities :sword-spin :opacity] 0)
|
||||
(assoc-in [:room :entities :falling-bg :opacity] 0))))
|
||||
(Thread/sleep time))
|
||||
|
||||
(defn fall-in [entities]
|
||||
(Thread/sleep 500)
|
||||
(actions/run-action entities
|
||||
(begin [this screen entities]
|
||||
|
||||
(-> entities
|
||||
|
||||
(assoc-in [:tweens :ego-y] (tween/tween :ego-y screen [:room :entities :ego :y] 166 117 3.0 :ease tween/ease-out-cubic))
|
||||
(update-in [:room :entities :bloodclot-swallow-top] #(actions/start-animation screen % :swallow))
|
||||
(update-in [:room :entities :bloodclot-swallow-bottom] #(actions/start-animation screen % :swallow))))
|
||||
(continue [this screen entities]
|
||||
entities)
|
||||
(done? [this screen entities]
|
||||
(= 117 (get-in entities [:room :entities :ego :y])))
|
||||
|
||||
(terminate [this screen entities]
|
||||
entities)
|
||||
(skip-type [this screen entities]
|
||||
:none))
|
||||
(Thread/sleep 1500)
|
||||
(actions/update-entities entities (fn [e]
|
||||
(-> e
|
||||
(assoc-in [:room :entities :falling-bg :opacity] 1)
|
||||
|
||||
(assoc-in [:room :entities :falling-ego :opacity] 1))))
|
||||
(Thread/sleep 4000)
|
||||
|
||||
(show-big-bloodclot entities 1000)
|
||||
(actions/update-entities entities (fn [e]
|
||||
(-> e
|
||||
(assoc-in [:room :entities :falling-bg :opacity] 0)
|
||||
(assoc-in [:room :entities :sword-spin :opacity] 0))))
|
||||
(assoc-in [:room :entities :falling-bg :opacity] 1)
|
||||
(assoc-in [:room :entities :falling-ego :opacity] 0)
|
||||
(assoc-in [:room :entities :sword-spin :opacity] 1))))
|
||||
(Thread/sleep 2000))
|
||||
|
||||
(Thread/sleep 1000)
|
||||
(defn do-win [entities won?]
|
||||
(actions/fade entities 1.0 (fn [e]
|
||||
(-> e
|
||||
(assoc-in [:room :entities :penultimate :opacity] 1)
|
||||
(assoc-in [:room :entities :penultimate-wall :opacity] 1)
|
||||
(assoc-in [:room :entities :bloodclot-swallow-top :opacity] 1)
|
||||
(assoc-in [:room :entities :bloodclot-swallow-bottom :opacity] 1)
|
||||
(assoc-in [:cam :paused?] true)
|
||||
(update-in [:room :entities :ego ] assoc :x 200 :y 166 :baseline 4)
|
||||
(update-in [:room :entities] dissoc :tongue)
|
||||
(update-in [:room :entities :ego] actions/start-animation :fall-small))))
|
||||
|
||||
(if won?
|
||||
(jump-away entities)
|
||||
(fall-in entities))
|
||||
(show-big-bloodclot entities 1000)
|
||||
|
||||
(actions/update-entities entities (fn [e]
|
||||
(-> e
|
||||
(assoc-in [:room :entities :penultimate-black :opacity] 1))))
|
||||
|
||||
(update-in [:room :entities :sword-spin] assoc :opacity 1 :scale-x 0.5 :scale-y 0.5)
|
||||
(assoc-in [:room :entities :falling-bg :opacity] 1)
|
||||
(assoc-in [:room :entities :belly-bottom :opacity] 1)
|
||||
(update-in [:room :entities :falling-bg ] dissoc :anim)
|
||||
)))
|
||||
|
||||
(actions/tween entities :sword-fall (fn [screen entities]
|
||||
(tween/tween :sword-fall screen [:room :entities :sword-spin :y] 240 120 1.5 :ease tween/ease-linear)))
|
||||
|
||||
(actions/update-entities entities (fn [e]
|
||||
(-> e
|
||||
(assoc-in [:room :entities :belly-bottom :opacity] 0))))
|
||||
(show-big-bloodclot entities 0)
|
||||
(actions/update-entities entities (fn [e]
|
||||
(-> e
|
||||
(update-in [:room :entities :bloodclot-swallow-top] #(actions/start-animation % :uhoh))
|
||||
(update-in [:room :entities :bloodclot-swallow-bottom] #(actions/start-animation % :uhoh)))))
|
||||
(Thread/sleep 2000)
|
||||
|
||||
|
||||
(actions/update-entities entities (fn [e]
|
||||
(-> e
|
||||
(assoc-in [:room :entities :penultimate-black :opacity] 1)
|
||||
(assoc-in [:cam :paused?] false)
|
||||
(update-in [:room :entities :black-blowup] (fn [b]
|
||||
(particle-effect! b :reset)
|
||||
(particle-effect! b :start)
|
||||
b)))))
|
||||
|
||||
(println "doing screen shake?")
|
||||
(actions/camera-shake entities 15.0)
|
||||
(actions/camera-shake entities 8.0)
|
||||
(println "doing screen shake?")
|
||||
|
||||
(actions/transition-background entities :space [55 90] :time 6.0 :type :white-fade :between (fn [s e]
|
||||
(-> e
|
||||
(actions/transition-background entities :space [55 90]
|
||||
:time 4.0
|
||||
:transition-music? false
|
||||
: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] 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)))))
|
||||
(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] 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)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
entities))
|
||||
|
||||
(done? [this screen entities]
|
||||
(> (- (:total-time screen) @start-time) 8.7))
|
||||
(> (- (:total-time screen) @start-time) 8.0))
|
||||
|
||||
(terminate [this screen entities]
|
||||
entities
|
||||
@@ -101,8 +101,7 @@
|
||||
|
||||
(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)))))
|
||||
(actions/do-dialogue entities
|
||||
:bloodclot-head "Yes!"
|
||||
:bloodclot-head "Ultimate power is mine!"
|
||||
@@ -112,12 +111,19 @@
|
||||
(explode entities)
|
||||
|
||||
|
||||
(Thread/sleep 2000)
|
||||
(actions/talk entities :bloodclot "Now..."
|
||||
:stop? false
|
||||
:anim :big)
|
||||
(actions/talk entities :bloodclot "Where were we?"
|
||||
:stop? false
|
||||
:anim :big)
|
||||
|
||||
(actions/tween entities
|
||||
:arm-y
|
||||
(fn [screen entities]
|
||||
(tween/tween :arm-y screen [:room :entities :arm :y] 240 90 4.0 :ease tween/ease-linear)))
|
||||
|
||||
(actions/transition-background entities :tongue-fight [141 110]))
|
||||
|
||||
|
||||
|
||||
@@ -189,14 +189,15 @@
|
||||
bloodclot-head-shoot-anim (utils/make-anim-seq atlas "bloodclot-head-talk" [82 75] 0.05 [8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 10 11 10 11 10 11 10 11 10 11 10 11])
|
||||
bloodclot-head-keep-shoot-anim (utils/make-anim-seq atlas "bloodclot-head-talk" [82 75] 0.05 [12 13])
|
||||
blergh-stand-anim (utils/make-anim atlas "bloodclot-stand" [106 165] 0.9 [0 1])
|
||||
bloodclot-grow (utils/make-anim-seq atlas "bloodclot-grow" [180 200] 0.075 [0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 8 8 8 7 7 7 7 8 8 8 8 8 7 7 7 7 8 8 8 8 7 8 9 9 9 9 8 9 10 10 10 10 9 10 11 11 11 11 10 10 10 11 12 12 12 12 12 12 12 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14])
|
||||
bloodclot-grow (utils/make-anim-seq atlas "bloodclot-grow" [180 200] 0.075 [0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 8 8 8 7 7 7 7 8 8 8 8 8 7 7 7 7 8 8 8 8 7 8 9 9 9 9 8 9 10 10 10 10 9 10 11 11 11 11 10 10 10 11 12 12 12 12 12 12 12 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14])
|
||||
bloodclot-big (utils/make-anim-seq atlas "bloodclot-grow" [180 200] 0.075 [14])
|
||||
bloodclot-steam (utils/make-anim-seq atlas "bloodclot-steam" [134 77] 0.075 [0])
|
||||
bullet (utils/make-anim atlas "bullet" [24 24] 0.0075 [0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 3 3 3 4 4 5 5 6 5 4 7])
|
||||
effect (particle-effect "particles/appear")
|
||||
blowup-effect (particle-effect "particles/blowup")
|
||||
lightning-effect (particle-effect "particles/lightning")
|
||||
grow-explode (particle-effect "particles/grow-explode")]
|
||||
grow-explode (particle-effect "particles/grow-explode")
|
||||
]
|
||||
(rooms/make :name "Duel"
|
||||
:sounds {:shock (utils/load-sound "space/shock.ogg")
|
||||
:shock-short (utils/load-sound "space/shock-short.ogg")
|
||||
@@ -218,12 +219,13 @@
|
||||
:x 240 :y 240
|
||||
:baseline 200)
|
||||
:blowup (assoc blowup-effect
|
||||
:x 225 :y 175
|
||||
:x 300 :y 240
|
||||
:baseline 241)
|
||||
:lightning (assoc lightning-effect
|
||||
:x 225 :y 160
|
||||
:baseline 240
|
||||
:opacity 0.0)
|
||||
:arm (assoc (utils/atlas->texture atlas "arm") :x 80 :y 240 :origin-x 68 :origin-y 0 :baseline 241 :opacity 1)
|
||||
:bloodclot-head (assoc (animation->texture screen bloodclot-head-stand-anim)
|
||||
:x 195 :y 138 :baseline 195
|
||||
:opacity 0.0
|
||||
@@ -236,6 +238,7 @@
|
||||
:talk-color (color 0.95 0.4 0.2 1.0))
|
||||
:bloodclot (assoc (animation->texture screen blergh-stand-anim)
|
||||
:x 180 :y 50 :baseline 190
|
||||
:talk-color (color 0.95 0.4 0.2 1.0)
|
||||
:stand blergh-stand-anim
|
||||
:inhale-sound (utils/load-sound "space/bloodclot-inhale.ogg")
|
||||
:exhale-sound (utils/load-sound "space/bloodclot-exhale.ogg")
|
||||
@@ -347,7 +350,7 @@
|
||||
:broken-jewel (assoc (utils/atlas->texture atlas "broken-jewel")
|
||||
:x 225 :y 170 :baseline 240)
|
||||
|
||||
:bloodclot-smoke (doto (assoc (particle-effect "particles/candle") :x 280 :y 90
|
||||
:bloodclot-smoke (doto (assoc (particle-effect "particles/bloodclot-steam") :x 280 :y 90
|
||||
:baseline 200)
|
||||
(particle-effect! :set-position 280 90))
|
||||
:collision "space/collision.png"
|
||||
|
||||
@@ -18,10 +18,15 @@
|
||||
(println "loading " *ns*)
|
||||
|
||||
|
||||
(defn cause-damage [entities is-player-wound?]
|
||||
(defn cause-damage [entities screen is-player-wound?]
|
||||
(println "test" is-player-wound?)
|
||||
(if is-player-wound?
|
||||
(update-in entities [:room :ego-hearts] dec)
|
||||
(update-in entities [:room :tongue-hearts] dec)))
|
||||
(update-in entities [:room :tongue-hearts] dec)
|
||||
(let [remaining-hearts (dec (get-in entities [:room :ego-hearts]))]
|
||||
(-> entities
|
||||
(assoc-in [:tweens :ego-heart-scale-x] (tween/tween :ego-heart-scale-x screen [:room :entities [:ego-heart remaining-hearts] :scale-x] 1 0.0 0.2 :ease tween/ease-in-cubic))
|
||||
(assoc-in [:tweens :ego-heart-scale-y] (tween/tween :ego-heart-scale-y screen [:room :entities [:ego-heart remaining-hearts] :scale-y] 1 0.0 0.2 :ease tween/ease-in-cubic))
|
||||
(assoc-in [:room :ego-hearts] remaining-hearts)))))
|
||||
|
||||
(defn show-heart [entities screen is-player-wound?]
|
||||
|
||||
@@ -32,8 +37,8 @@
|
||||
(update-in [:room :entities :heart] #(assoc % :opacity 1 :x x :y y))
|
||||
(update-in [:room :entities :heart] #(actions/start-animation screen % :beat))
|
||||
(assoc-in [:tweens :heart-y] (tween/tween :heart-y screen [:room :entities :heart :y] y (+ y 10) 1.0 :ease tween/ease-out-cubic))
|
||||
(assoc-in [:tweens :heart-opacity] (tween/tween :heart-opacity screen [:room :entities :heart :opacity] 1.0 0.0 3.0 :ease tween/ease-in-out-quadratic))
|
||||
(cause-damage is-player-wound?))))
|
||||
(assoc-in [:tweens :heart-opacity] (tween/tween :heart-opacity screen [:room :entities :heart :opacity] 1.0 0.0 1.2 :ease tween/ease-linear))
|
||||
(cause-damage screen is-player-wound?))))
|
||||
|
||||
(defn stop-swing-if-necessary [screen {{{{:keys [anim anim-start] {:keys [tongue-swing]} :left } :ego} :entities} :room :as entities}]
|
||||
(if (and (= tongue-swing anim)
|
||||
@@ -65,15 +70,14 @@
|
||||
(get-in entities [:state :active?])
|
||||
(= 0 ego-hearts))
|
||||
(do
|
||||
((actions/get-script entities (common/do-win entities)) entities)
|
||||
((actions/get-script entities (common/do-win entities false)) entities)
|
||||
entities)
|
||||
|
||||
(and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(get-in entities [:state :active?])
|
||||
(= 0 tongue-hearts))
|
||||
(do
|
||||
((common/win)
|
||||
entities)
|
||||
((actions/get-script entities (common/do-win entities true)) entities)
|
||||
entities)
|
||||
|
||||
(and
|
||||
@@ -140,13 +144,32 @@
|
||||
hair-9 (utils/make-anim-seq atlas "hair-9" [12 18] 0.16 [0 1 2 1])
|
||||
heart (utils/make-anim-seq atlas "heart" [24 24] 0.08 [3])
|
||||
beat (utils/make-anim-seq atlas "heart" [24 24] 0.08 [0 1 0 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3])
|
||||
black-blowup (particle-effect "particles/black-blowup")
|
||||
tongue-idle (utils/make-anim-seq atlas "tongue-idle/tongue-idle" [135 145] 0.16 (range 5))
|
||||
tongue-windup (utils/make-anim-seq atlas "tongue-windup" [135 145] 0.16 [0 1 2 3 2 1 2 3 2 1 0 ])
|
||||
|
||||
tongue-attack (utils/make-anim-seq atlas "tongue-attack" [135 145] 0.12 [ 3 4 5 6])
|
||||
tongue-attack (utils/make-anim-seq atlas "tongue-attack" [135 145] 0.14 [ 2 3 4 5 6 0])
|
||||
tongue-attack-hit (utils/make-anim-seq atlas "tongue-attack-hit" [135 145] 0.1 (range 7))
|
||||
falling-bg (utils/make-anim-seq atlas "falling-bg" [128 128] 0.1 (range 6))
|
||||
sword-spin (utils/make-anim-seq atlas "sword-spin" [300 238] 0.1 (range 6))]
|
||||
sword-spin (utils/make-anim-seq atlas "sword-spin" [300 238] 0.1 (range 6))
|
||||
bloodclot-swallow-bottom (utils/make-anim-seq atlas "bloodclot-swallow-bottom" [116 83] 0.2 (concat [0 0 0 0 0 0] (range 3) (repeat 100 2)))
|
||||
bloodclot-swallow-top (utils/make-anim-seq atlas "bloodclot-swallow-top" [116 83] 0.2 (concat [0 0 0 0 0 0] (range 3) (repeat 100 2)))
|
||||
|
||||
bloodclot-swallow-bottom-uhoh (utils/make-anim-seq atlas "bloodclot-swallow-bottom" [116 83] 0.4 [0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ])
|
||||
bloodclot-swallow-top-uhoh (utils/make-anim-seq atlas "bloodclot-swallow-top" [116 83] 0.4 [0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3])
|
||||
falling-ego (utils/make-anim-seq atlas "falling-ego" [40 72] 0.2 (range 4))
|
||||
hearts (into {}
|
||||
(for [x (range 5)]
|
||||
[[:ego-heart x] (assoc (utils/atlas->texture atlas "heart" 0)
|
||||
:origin-y 12
|
||||
|
||||
:origin-x 12
|
||||
:x (+ 22 (* 16 x))
|
||||
:y 221
|
||||
|
||||
|
||||
:baseline 321
|
||||
:opacity 1)]))]
|
||||
|
||||
|
||||
|
||||
@@ -156,134 +179,155 @@
|
||||
:layers [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0 :scale-x 1 :scale-y 1)]
|
||||
:update-fn trigger-tongue
|
||||
:ego-hearts 1
|
||||
:tongue-hearts 1
|
||||
:tongue-hearts 5
|
||||
|
||||
:entities {:penultimate (assoc (utils/atlas->texture atlas "penultimate") :x 0 :y 0 :baseline 2 :scale-x 1 :scale-y 1 :opacity 0)
|
||||
:penultimate-wall (assoc (utils/atlas->texture atlas "penultimate-wall") :x 0 :y 0 :baseline 5 :scale-x 1 :scale-y 1 :opacity 0)
|
||||
:penultimate-black (assoc (utils/atlas->texture atlas "penultimate-black") :x 0 :y 0 :baseline 6 :scale-x 1 :scale-y 1 :opacity 0)
|
||||
:hair-0 (assoc (animation->texture screen hair-0)
|
||||
:x 35
|
||||
:y 46
|
||||
:width 6
|
||||
:height 7
|
||||
:baseline 1
|
||||
:anim hair-0
|
||||
:anim-start 0)
|
||||
:hair-1 (assoc (animation->texture screen hair-1)
|
||||
:x 113
|
||||
:y 176
|
||||
:width 23
|
||||
:height 16
|
||||
:baseline 1
|
||||
:anim hair-1
|
||||
:anim-start 0)
|
||||
:hair-2 (assoc (animation->texture screen hair-2)
|
||||
:x 243
|
||||
:y 104
|
||||
:width 47
|
||||
:height 66
|
||||
:baseline 1
|
||||
:anim hair-2
|
||||
:anim-start 0)
|
||||
:hair-3 (assoc (animation->texture screen hair-3)
|
||||
:x 121
|
||||
:y 222
|
||||
:width 7
|
||||
:height 8
|
||||
:baseline 1
|
||||
:anim hair-3
|
||||
:anim-start 0)
|
||||
:hair-4 (assoc (animation->texture screen hair-4)
|
||||
:x 71
|
||||
:y 6
|
||||
:width 12
|
||||
:height 28
|
||||
:baseline 1
|
||||
:anim hair-4
|
||||
:anim-start 0)
|
||||
:hair-5 (assoc (animation->texture screen hair-5)
|
||||
:x 100
|
||||
:y 12
|
||||
:width 8
|
||||
:height 10
|
||||
:baseline 1
|
||||
:anim hair-5
|
||||
:anim-start 0)
|
||||
:hair-6 (assoc (animation->texture screen hair-6)
|
||||
:x 113
|
||||
:y 38
|
||||
:width 4
|
||||
:height 6
|
||||
:baseline 1
|
||||
:anim hair-6
|
||||
:anim-start 0)
|
||||
:hair-7 (assoc (animation->texture screen hair-7)
|
||||
:x 125
|
||||
:y 21
|
||||
:width 5
|
||||
:height 7
|
||||
:baseline 1
|
||||
:anim hair-7
|
||||
:anim-start 0)
|
||||
:hair-8 (assoc (animation->texture screen hair-8)
|
||||
:x 145
|
||||
:y 6
|
||||
:width 6
|
||||
:height 6
|
||||
:baseline 1
|
||||
:anim hair-8
|
||||
:anim-start 0)
|
||||
:hair-9 (assoc (animation->texture screen hair-9)
|
||||
:x 23
|
||||
:y 29
|
||||
:width 12
|
||||
:height 18
|
||||
:baseline 1
|
||||
:anim hair-9
|
||||
:anim-start 0)
|
||||
:heart (assoc (animation->texture screen heart)
|
||||
:x 23
|
||||
:y 29
|
||||
:width 32
|
||||
:height 32
|
||||
:baseline 321
|
||||
:opacity 0
|
||||
:anim heart
|
||||
:idle heart
|
||||
:beat beat
|
||||
:anim-start 0)
|
||||
:falling-bg (assoc (animation->texture screen falling-bg)
|
||||
:x 0
|
||||
:y 0
|
||||
:width 320
|
||||
:height 240
|
||||
:baseline 320
|
||||
:anim falling-bg
|
||||
:opacity 0
|
||||
|
||||
|
||||
:anim-start 0)
|
||||
:sword-spin (assoc (animation->texture screen sword-spin)
|
||||
:x 160
|
||||
:y 120
|
||||
:origin-x 150
|
||||
:origin-y 120
|
||||
:width 300
|
||||
:height 238
|
||||
:baseline 321
|
||||
:opacity 0
|
||||
:anim sword-spin
|
||||
|
||||
|
||||
:anim-start 0)
|
||||
:tongue (assoc (animation->texture screen tongue-idle)
|
||||
:entities (into {:penultimate (assoc (utils/atlas->texture atlas "penultimate") :x 0 :y 0 :baseline 2 :scale-x 1 :scale-y 1 :opacity 0)
|
||||
:penultimate-wall (assoc (utils/atlas->texture atlas "penultimate-wall") :x 0 :y 0 :baseline 5 :scale-x 1 :scale-y 1 :opacity 0)
|
||||
:penultimate-black (assoc (utils/atlas->texture atlas "penultimate-black") :x 0 :y 0 :baseline 6 :scale-x 1 :scale-y 1 :opacity 0)
|
||||
:bloodclot-swallow-top (assoc (animation->texture screen bloodclot-swallow-top) :x 167 :y 118 :baseline 3 :scale-x 1 :scale-y 1 :opacity 0 :swallow bloodclot-swallow-top :uhoh bloodclot-swallow-top-uhoh)
|
||||
:bloodclot-swallow-bottom (assoc (animation->texture screen bloodclot-swallow-bottom) :x 167 :y 118 :baseline 5 :scale-x 1 :scale-y 1 :opacity 0 :swallow bloodclot-swallow-bottom :uhoh bloodclot-swallow-bottom-uhoh)
|
||||
:black-blowup (assoc black-blowup
|
||||
:x 222 :y 85
|
||||
:baseline 241)
|
||||
:hair-0 (assoc (animation->texture screen hair-0)
|
||||
:x 35
|
||||
:y 46
|
||||
:width 6
|
||||
:height 7
|
||||
:baseline 1
|
||||
:anim hair-0
|
||||
:anim-start 0)
|
||||
:hair-1 (assoc (animation->texture screen hair-1)
|
||||
:x 113
|
||||
:y 176
|
||||
:width 23
|
||||
:height 16
|
||||
:baseline 1
|
||||
:anim hair-1
|
||||
:anim-start 0)
|
||||
:hair-2 (assoc (animation->texture screen hair-2)
|
||||
:x 243
|
||||
:y 104
|
||||
:width 47
|
||||
:height 66
|
||||
:baseline 1
|
||||
:anim hair-2
|
||||
:anim-start 0)
|
||||
:hair-3 (assoc (animation->texture screen hair-3)
|
||||
:x 121
|
||||
:y 222
|
||||
:width 7
|
||||
:height 8
|
||||
:baseline 1
|
||||
:anim hair-3
|
||||
:anim-start 0)
|
||||
:hair-4 (assoc (animation->texture screen hair-4)
|
||||
:x 71
|
||||
:y 6
|
||||
:width 12
|
||||
:height 28
|
||||
:baseline 1
|
||||
:anim hair-4
|
||||
:anim-start 0)
|
||||
:hair-5 (assoc (animation->texture screen hair-5)
|
||||
:x 100
|
||||
:y 12
|
||||
:width 8
|
||||
:height 10
|
||||
:baseline 1
|
||||
:anim hair-5
|
||||
:anim-start 0)
|
||||
:hair-6 (assoc (animation->texture screen hair-6)
|
||||
:x 113
|
||||
:y 38
|
||||
:width 4
|
||||
:height 6
|
||||
:baseline 1
|
||||
:anim hair-6
|
||||
:anim-start 0)
|
||||
:hair-7 (assoc (animation->texture screen hair-7)
|
||||
:x 125
|
||||
:y 21
|
||||
:width 5
|
||||
:height 7
|
||||
:baseline 1
|
||||
:anim hair-7
|
||||
:anim-start 0)
|
||||
:hair-8 (assoc (animation->texture screen hair-8)
|
||||
:x 145
|
||||
:y 6
|
||||
:width 6
|
||||
:height 6
|
||||
:baseline 1
|
||||
:anim hair-8
|
||||
:anim-start 0)
|
||||
:hair-9 (assoc (animation->texture screen hair-9)
|
||||
:x 23
|
||||
:y 29
|
||||
:width 12
|
||||
:height 18
|
||||
:baseline 1
|
||||
:anim hair-9
|
||||
:anim-start 0)
|
||||
:heart (assoc (animation->texture screen heart)
|
||||
:x 23
|
||||
:y 29
|
||||
:width 32
|
||||
:height 32
|
||||
:baseline 321
|
||||
:opacity 0
|
||||
:anim heart
|
||||
:idle heart
|
||||
:beat beat
|
||||
:anim-start 0)
|
||||
|
||||
|
||||
|
||||
:falling-bg (assoc (animation->texture screen falling-bg)
|
||||
:x 0
|
||||
:y 0
|
||||
:width 320
|
||||
:height 240
|
||||
:baseline 320
|
||||
:anim falling-bg
|
||||
:opacity 0
|
||||
:anim-start 0)
|
||||
|
||||
:belly-bottom (assoc (utils/atlas->texture atlas "belly-bottom") :x 0 :y 0 :baseline 321 :scale-x 1 :scale-y 1 :opacity 0)
|
||||
:falling-ego (assoc (animation->texture screen falling-ego)
|
||||
:x 160
|
||||
:y 120
|
||||
:scale-x 2
|
||||
:scale-y 2
|
||||
:origin-x 20
|
||||
:origin-y 35
|
||||
:baseline 321
|
||||
:opacity 0
|
||||
:anim falling-ego
|
||||
|
||||
|
||||
:anim-start 0)
|
||||
:sword-spin (assoc (animation->texture screen sword-spin)
|
||||
:x 160
|
||||
:y 120
|
||||
:origin-x 150
|
||||
:origin-y 120
|
||||
:width 300
|
||||
:height 238
|
||||
:baseline 321
|
||||
:opacity 0
|
||||
:anim sword-spin
|
||||
|
||||
|
||||
:anim-start 0)
|
||||
:tongue (assoc (animation->texture screen tongue-idle)
|
||||
:x 211
|
||||
:y 40
|
||||
:origin-x 23
|
||||
:origin-y 10
|
||||
:width 135
|
||||
:height 145
|
||||
:baseline 4
|
||||
:baseline 4
|
||||
:anim tongue-idle
|
||||
:windup tongue-windup
|
||||
:idle tongue-idle
|
||||
@@ -297,8 +341,10 @@
|
||||
:state :idle
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(actions/begin-animation entities :ego :tongue-windup)))}
|
||||
(actions/begin-animation entities :ego :tongue-windup)))
|
||||
|
||||
}
|
||||
hearts)
|
||||
:collision "space/collision.png"
|
||||
:scale-fn (constantly 1.0)
|
||||
:start-pos [141 110]
|
||||
|
||||
Reference in New Issue
Block a user