Beginning to get IOS, Android, and Desktop all working at once. Re-enabling steam.
This commit is contained in:
@@ -545,10 +545,12 @@
|
||||
(-> 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)))))
|
||||
(update-in [:room :entities (if won? :black-blowup-big
|
||||
:black-blowup)]
|
||||
(fn [b]
|
||||
(particle-effect! b :reset)
|
||||
(particle-effect! b :start)
|
||||
b)))))
|
||||
|
||||
(println "doing screen shake?")
|
||||
(actions/camera-shake entities 8.0)
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
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")
|
||||
black-blowup-big (particle-effect "particles/black-blowup-big")
|
||||
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 ])
|
||||
|
||||
@@ -195,6 +196,10 @@
|
||||
:black-blowup (assoc black-blowup
|
||||
:x 222 :y 85
|
||||
:baseline 241)
|
||||
|
||||
:black-blowup-big (assoc black-blowup-big
|
||||
:x 222 :y 85
|
||||
:baseline 241)
|
||||
:hair-0 (assoc (animation->texture screen hair-0)
|
||||
:x 35
|
||||
:y 46
|
||||
|
||||
@@ -1098,7 +1098,10 @@
|
||||
(update-in entities [:tweens] dissoc :cam-x :cam-y :cam-zoom))
|
||||
|
||||
(defn render [{:keys [^OrthographicCamera camera ^FitViewport viewport ^Stage renderer] :as screen} {{:keys [last-pos ] [cursor-offset-x cursor-offset-y] :offset} :cursor :keys [tweens] :as entities} options]
|
||||
#_(steam/update)
|
||||
(utils/platformify
|
||||
nil
|
||||
nil
|
||||
(steam/update))
|
||||
(.apply viewport)
|
||||
|
||||
(if (-> entities :closing? :value)
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
(utils/play-music (:pop-music entities))
|
||||
(-> entities
|
||||
(assoc-in [:pop-logo :anim-start] (:total-time screen))
|
||||
(assoc-in [:pop-logo :opacity] 1.0)
|
||||
(assoc-in [:pop-logo :anim] (get-in entities [:pop-logo :main-anim]))))
|
||||
:duration 10.0}]))
|
||||
|
||||
@@ -112,12 +113,17 @@
|
||||
:on-show
|
||||
(fn [screen entities options]
|
||||
(let [[screen splash-atlas] (utils/acquire-atlas screen "packed/splash.atlas")
|
||||
[screen global-atlas] (utils/acquire-atlas screen "packed/global.atlas")]
|
||||
[screen global-atlas] (utils/acquire-atlas screen "packed/global.atlas")
|
||||
[screen pop-logo-atlas] (if utils/mobile?
|
||||
[screen nil]
|
||||
(utils/acquire-atlas screen "packed-pop-logo/pack.atlas"))]
|
||||
(utils/setup-viewport screen 1280 960)
|
||||
(log/info "Starting splash screen.")
|
||||
(graphics! :set-cursor (utils/cursor "cursor.png" :hourglass))
|
||||
(let [screen (assoc screen :total-time 0)
|
||||
pop-anim (make-anim-seq splash-atlas "POPPixelLogo_02" [320 240] 0.05 (repeat 200 0))
|
||||
pop-anim (if utils/mobile?
|
||||
(make-anim-seq splash-atlas "POPPixelLogo_02" [320 240] 0.05 (repeat 200 0))
|
||||
(make-anim-seq pop-logo-atlas "POPPixelLogo_02" [320 240] 0.05 (range 200)))
|
||||
entities {:background (assoc (utils/atlas->texture global-atlas "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
@@ -126,12 +132,12 @@
|
||||
:origin-y 0
|
||||
:z 0)
|
||||
:pop-logo (assoc (animation->texture screen pop-anim)
|
||||
:anim pop-anim
|
||||
:main-anim pop-anim
|
||||
:x 0 :y 0
|
||||
:origin-x 0 :origin-y 0
|
||||
:scale-x 4 :scale-y 4
|
||||
:z 1
|
||||
:opacity (if utils/mobile? 0.0 1.0))
|
||||
:opacity 0.0)
|
||||
:dbhlogo (assoc (utils/atlas->texture splash-atlas "dbh.png") :x 0 :y 0 :origin-x 0 :origin-y 0 :scale-x 4 :scale-y 4 :z 1 :opacity 0.0)
|
||||
:steps steps
|
||||
:pop-music (utils/make-music "music/POPPixelLogo2Audiomix_mixdown.ogg")
|
||||
@@ -144,7 +150,10 @@
|
||||
|
||||
:on-render
|
||||
(fn [{:keys [^FitViewport viewport] :as screen} entities options]
|
||||
#_(steam/update)
|
||||
(utils/platformify
|
||||
nil
|
||||
nil
|
||||
(steam/update))
|
||||
(.apply viewport)
|
||||
(clear!)
|
||||
(let [entities (utils/apply-tweens screen entities (:tweens entities))
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
(tween/tween :fade-out-music screen [:volume] 1.0 0.0 1.0)))))
|
||||
|
||||
(defn button-style []
|
||||
|
||||
(let [^TextButton$TextButtonStyle style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle)
|
||||
tx (-> style .font .getRegion .getTexture)]
|
||||
(-> style .font .getData (.setScale utils/button-font-scale))
|
||||
@@ -149,7 +150,11 @@
|
||||
([msg & rest]
|
||||
(let [button (merge (text-button msg (button-style))
|
||||
(apply hash-map rest))]
|
||||
|
||||
(utils/platformify
|
||||
nil
|
||||
nil
|
||||
(doto (text-button! button :get-label)
|
||||
(.setFontScale 0.5)))
|
||||
(doto button save-object))))
|
||||
|
||||
|
||||
@@ -164,10 +169,15 @@
|
||||
([msg checked & rest]
|
||||
(let [s (skin! (skin "ui/ui.json") :get CheckBox$CheckBoxStyle)]
|
||||
(-> s .font .getData (.setScale utils/title-label-scale))
|
||||
(doto (merge (check-box msg s)
|
||||
(apply hash-map rest))
|
||||
(set-checkbox-state checked)
|
||||
save-object))))
|
||||
(let [checkbox-entity (merge (check-box msg s)
|
||||
(apply hash-map rest))]
|
||||
(utils/platformify
|
||||
nil
|
||||
nil
|
||||
(doto (check-box! checkbox-entity :get-label)
|
||||
(.setFontScale 0.25)))
|
||||
(set-checkbox-state checkbox-entity checked)
|
||||
(save-object checkbox-entity)))))
|
||||
|
||||
(defn make-label
|
||||
([msg]
|
||||
@@ -456,7 +466,10 @@
|
||||
|
||||
:on-render
|
||||
(fn [{:keys [^FitViewport viewport] :as screen} entities options]
|
||||
#_(steam/update)
|
||||
(utils/platformify
|
||||
nil
|
||||
nil
|
||||
(steam/update))
|
||||
(.apply viewport)
|
||||
(clear!)
|
||||
(let [entities (utils/apply-tweens screen entities (:tweens entities))
|
||||
|
||||
Reference in New Issue
Block a user