credits update.
This commit is contained in:
@@ -24,6 +24,7 @@ com.badlogic.gdx.scenes.scene2d.ui.ScrollPane$ScrollPaneStyle: {
|
||||
com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: {
|
||||
default: { down: screenshot-image-button-active, up: screenshot-image-button, checked: screenshot-image-button-active}
|
||||
active: { down: screenshot-image-button-active, up: screenshot-image-button-active, checked: screenshot-image-button-active}
|
||||
borderless: {down: slider, up: slider, checked: slider}
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -19,25 +19,44 @@
|
||||
(assoc e :x (- (/ 1280 2) (/ (or (:width e) (.getWidth (:object e))) 2))))
|
||||
|
||||
(def credit-messages
|
||||
[["\"Tick's Tales\" Created By"
|
||||
"Bryce Covert"]
|
||||
["Kiss for Courage"
|
||||
"Jana Covert"]
|
||||
["Frog Legs"
|
||||
"Marya Yama"]
|
||||
["Motivational Tapes"
|
||||
"Eriq Chang"]
|
||||
["In Honor Of"
|
||||
"Took, son of Luke, son of Puke (1125 - present)"]
|
||||
["In Loving Memory Of"
|
||||
"Took, son of Luke, son of Puke (1125 - 1151)"]])
|
||||
[[:dbh ["\"Tick's Tales\" Created By"
|
||||
"Bryce Covert"]]
|
||||
[:dbh ["Kiss for Courage"
|
||||
"Jana Covert"]
|
||||
["Frog Legs"
|
||||
"Marya Yama"]
|
||||
["Motivational Tapes"
|
||||
"Eriq Chang"]]
|
||||
[:pos ["CTO"
|
||||
"Richard Flores"]
|
||||
["CEO"
|
||||
"Cesar Bittar"]
|
||||
["General Manager"
|
||||
"Scott Steinburg"]]
|
||||
[:pos ["QA"
|
||||
"Dane Tippman"
|
||||
"Henri Hanninen"
|
||||
"David Goodin"]
|
||||
["QA Lead"
|
||||
"Wayne Sung"]
|
||||
["CCO"
|
||||
"Katie Hallahan"]]
|
||||
[:pos ["Public Relations Director"
|
||||
"Katie Hallahan"]
|
||||
["Social Media Associate"
|
||||
"Wayne Sung"]]
|
||||
[:pos ["Website Design"
|
||||
"Michael Fortunato"]]
|
||||
[:pos ["Promotional Graphics and Design"
|
||||
"Michael Fortunato"
|
||||
"Elisa Pavinato"]]
|
||||
[:pos ["Promotional Video Editing"
|
||||
"Mikael Palsio"]]
|
||||
])
|
||||
|
||||
(defn get-role-style [entities opacity]
|
||||
(style :label (:font entities) (color 1.0 1.0 1.0 opacity)))
|
||||
|
||||
(defn style-role [entities]
|
||||
(when-let [opacity (:opacity (:role entities))]
|
||||
(label! (:role entities) :set-style (get-role-style entities opacity))))
|
||||
|
||||
(defn get-person-style [entities opacity]
|
||||
(style :label (:font entities) (color 0.6 1.0 1.0 opacity)))
|
||||
@@ -46,40 +65,83 @@
|
||||
(when-let [opacity (:opacity (:person entities))]
|
||||
(label! (:person entities) :set-style (get-person-style entities opacity))))
|
||||
|
||||
(defn chain-tweens [screen entities id]
|
||||
(let [fade-out (tween/tween [:fade id :out]
|
||||
(defn chain-tweens [screen entities]
|
||||
(let [fade-out (tween/tween [:fade :out]
|
||||
(assoc screen :total-time (+ 4.0 (:total-time screen)))
|
||||
[id :opacity]
|
||||
1.0 0.0
|
||||
[:fade :opacity]
|
||||
0.0 1.0
|
||||
2.0
|
||||
:finish #(dissoc % id))
|
||||
pause (tween/tween [:fade id :pause]
|
||||
:finish (fn [e] (-> e
|
||||
(dissoc :credit-table)
|
||||
(assoc-in [:fade :opacity] 0.0))))
|
||||
pause (tween/tween [:fade :pause]
|
||||
(assoc screen :total-time (+ 2.0 (:total-time screen)))
|
||||
[id :opacity]
|
||||
1.0 1.0
|
||||
[:fade :opacity]
|
||||
0.0 0.0
|
||||
2.0
|
||||
:finish (fn [e] (assoc-in e [:tweens [:fade id :out]] fade-out)))
|
||||
fade-in (tween/tween [:fade id :in] screen
|
||||
[id :opacity]
|
||||
0.0 1.0
|
||||
:finish (fn [e] (assoc-in e [:tweens [:fade :out]] fade-out)))
|
||||
fade-in (tween/tween [:fade :in] screen
|
||||
[:fade :opacity]
|
||||
1.0 0.0
|
||||
2.0
|
||||
:finish (fn [e] (assoc-in e [:tweens [:fade id :pause]] pause)))]
|
||||
:finish (fn [e] (assoc-in e [:tweens [:fade :pause]] pause)))]
|
||||
fade-in))
|
||||
|
||||
(def saved-took? (atom false))
|
||||
|
||||
(defn msg->table [ msg entities]
|
||||
(-> (table
|
||||
(reduce
|
||||
(fn [cols [role & persons]] :x 640 :y 480
|
||||
(-> cols
|
||||
(conj
|
||||
[(table
|
||||
(reduce
|
||||
(fn [people-rows person-name]
|
||||
(-> people-rows
|
||||
(conj :row)
|
||||
(conj (label person-name (get-person-style entities 1.0) :set-alignment Align/center))))
|
||||
[(label (doto role) (get-role-style entities 1.0) :set-alignment Align/center)]
|
||||
persons))
|
||||
:top :width 350 :pad-right 30 :pad-left 30])))
|
||||
[]
|
||||
msg))
|
||||
(assoc
|
||||
:y 400 :width 1280 :height 200
|
||||
:x 0
|
||||
:z 8
|
||||
:opacity 1.0)))
|
||||
|
||||
(defn fade-logo-if-necessary [entities screen logo]
|
||||
(let [last-logo (:last-logo entities)
|
||||
fade-in (tween/tween :fade-logo-in
|
||||
(assoc screen :total-time (+ 0.5 (:total-time screen)))
|
||||
[logo :opacity]
|
||||
0.0 1.0
|
||||
0.5)]
|
||||
(if (not= logo last-logo)
|
||||
(assoc-in entities [:tweens :fade-logo-out]
|
||||
(tween/tween :fade-logo-out
|
||||
screen
|
||||
[last-logo :opacity]
|
||||
1.0 0.0
|
||||
0.5
|
||||
:finish (fn [e] (assoc-in e [:tweens :fade-logo-in] fade-in))))
|
||||
entities)))
|
||||
|
||||
(defn start-message-if-necessary [screen entities]
|
||||
(if (and (not (get-in entities [:role]))
|
||||
(if (and (not (get-in entities [:credit-table]))
|
||||
(= 0.0 (get-in entities [:fade :opacity])))
|
||||
(let [[[next-role next-person] & remaining-messages] (:remaining-messages entities)]
|
||||
(if next-role
|
||||
(-> entities
|
||||
(assoc :role (center (assoc (label next-role (get-role-style entities 0.0) :set-alignment Align/center) :x 640 :y 480 )))
|
||||
(assoc :person (center (assoc (label next-person (get-person-style entities 0.0) :set-alignment Align/center) :x 640 :y 430 )))
|
||||
(assoc-in [:tweens [:fade :role :in]] (chain-tweens screen entities :role))
|
||||
(assoc-in [:tweens [:fade :person :in]] (chain-tweens screen entities :person))
|
||||
(assoc :remaining-messages remaining-messages))
|
||||
entities))
|
||||
(let [[[logo & msg] & remaining-messages] (:remaining-messages entities)]
|
||||
(if msg
|
||||
(-> entities
|
||||
(fade-logo-if-necessary screen logo)
|
||||
(assoc :credit-table (msg->table msg entities))
|
||||
(assoc-in [:tweens [:fade :in]] (chain-tweens screen entities))
|
||||
(assoc :remaining-messages remaining-messages)
|
||||
(assoc :last-logo logo))
|
||||
(do (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.title/title-screen))
|
||||
entities)))
|
||||
entities))
|
||||
|
||||
|
||||
@@ -90,30 +152,51 @@
|
||||
(input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
|
||||
(let [font (bitmap-font "ego/font.fnt" )]
|
||||
{:font font
|
||||
:bg (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 1.0
|
||||
:origin-x 0
|
||||
:origin-y 0)
|
||||
:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 0.0
|
||||
:origin-x 0
|
||||
:origin-y 0)
|
||||
:remaining-messages (filter (fn [[credit _]]
|
||||
(if @saved-took?
|
||||
(not= credit "In Loving Memory Of")
|
||||
(not= credit "In Honor Of")))
|
||||
credit-messages)
|
||||
:the-end (assoc (utils/get-texture "the-end.png") :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
|
||||
:pos (assoc (utils/get-texture "pos.png") :x 640 :y 700 :scale-x 1 :scale-y 1 :origin-x 145 :origin-y 0 :z 1 :opacity 0.0)
|
||||
:dbh (assoc (utils/get-texture "dbh.png") :x 640 :y 500 :scale-x 0.5 :scale-y 0.5 :origin-x 640 :origin-y 0 :z 1 :opacity 0.0)
|
||||
:remaining-messages (cond (= @saved-took? :died)
|
||||
(conj credit-messages [nil
|
||||
|
||||
["In Loving Memory Of"
|
||||
"Took, son of Luke, son of Puke (1125 - 1151)"]])
|
||||
(= @saved-took? :saved)
|
||||
(conj credit-messages [nil
|
||||
["In Honor Of"
|
||||
"Took, son of Luke, son of Puke (1125 - present)"]])
|
||||
|
||||
:else
|
||||
|
||||
(conj credit-messages [nil
|
||||
["" ""]]))
|
||||
#_#_:the-end (assoc (utils/get-texture "the-end.png") :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:tweens {:fade-in
|
||||
(tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 5.0 :ease tween/ease-out-cubic)}}))
|
||||
:on-key-up
|
||||
(fn [screen entities]
|
||||
(when (= (key-code :escape) (:key screen))
|
||||
(utils/toggle-fullscreen!))
|
||||
nil)
|
||||
|
||||
:on-render
|
||||
(fn [{:keys [^FitViewport viewport] :as screen} [entities]]
|
||||
(.apply viewport)
|
||||
(let [entities (utils/apply-tweens screen entities (:tweens entities))
|
||||
entities (start-message-if-necessary screen entities)]
|
||||
(style-role entities)
|
||||
(style-person entities)
|
||||
|
||||
(render! screen [(:the-end entities) (:role entities) (:person entities) (:fade entities)])
|
||||
|
||||
(render! screen [(:bg entities) (:credit-table entities) (:fade entities) (:dbh entities) (:pos entities)])
|
||||
entities))
|
||||
|
||||
|
||||
|
||||
@@ -569,7 +569,10 @@
|
||||
(actions/play-animation entities :ego :hand-hold :stop? false)
|
||||
(Thread/sleep 500)
|
||||
(fade-out entities)
|
||||
(on-gl (reset! @(resolve 'advent.screens.credits/saved-took?) (get-in @entities [:state :has-voted?]))
|
||||
(on-gl (reset! @(resolve 'advent.screens.credits/saved-took?)
|
||||
(if (get-in @entities [:state :has-voted?])
|
||||
:saved
|
||||
:died))
|
||||
(set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits))))
|
||||
|
||||
(defn win []
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
[advent.tween :as tween]
|
||||
[advent.steam :as steam]
|
||||
[advent.screens.scene :as scene]
|
||||
[advent.screens.credits :as credits]
|
||||
[advent.screens.dialogue :as dialogue]
|
||||
[clojure.tools.logging :as log]
|
||||
[advent.screens.title :as title]
|
||||
@@ -353,7 +354,13 @@
|
||||
:banner-back (assoc (animation->texture (assoc screen :total-time 0.0) banner-back) :x 580 :y 400 :scale-x 4 :scale-y 4
|
||||
:anim banner-back
|
||||
:z 3)
|
||||
:quill (assoc (utils/get-texture "title/quill.png") :x 1150 :y 4 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 10)
|
||||
:quill (doto (assoc (image-button nil) :x 1150 :y 4 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 10 :key :quill)
|
||||
|
||||
(image-button! :add (doto (Group. )
|
||||
(.addActor (:object (doto (image (utils/get-texture "title/quill.png"))
|
||||
(image! :set-scale 4))))))
|
||||
|
||||
save-object)
|
||||
:logo (assoc (utils/get-texture "title/logo.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 6)
|
||||
:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
@@ -394,7 +401,7 @@
|
||||
:font font
|
||||
:music music
|
||||
:volume 1.0
|
||||
:copyright (make-label (str "DEMO - Copyright Bryce Covert - Not for distribution - version " (advent.version/version)) label-color)
|
||||
:copyright (make-label (str "Copyright Digital Bounce House 2016" (advent.version/version)) label-color)
|
||||
:tweens {:fade-in (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 1.0
|
||||
:finish #(do
|
||||
|
||||
@@ -431,12 +438,14 @@
|
||||
(when (= (key-code :escape) (:key screen))
|
||||
(utils/toggle-fullscreen!))
|
||||
nil)
|
||||
|
||||
|
||||
:on-ui-changed
|
||||
(fn [{:keys [actor] :as screen} [entities]]
|
||||
(when-not (get-in entities [:tweens :fade-out])
|
||||
(let [e (-> actor .getUserObject)
|
||||
actor-key (:key e)]
|
||||
(println e)
|
||||
|
||||
(cond (= :music-volume-slider actor-key)
|
||||
(do (swap! utils/settings assoc :music-volume (slider! e :get-value))
|
||||
@@ -447,6 +456,20 @@
|
||||
(do (swap! utils/settings assoc :sound-volume (slider! e :get-value))
|
||||
(utils/save-settings!)
|
||||
entities)
|
||||
(= :quill actor-key)
|
||||
(-> entities
|
||||
(assoc-in [:tweens :fade-out]
|
||||
(tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 1.0
|
||||
:finish (fn [entities]
|
||||
(utils/stop-music (:music entities))
|
||||
(reset! credits/saved-took? nil)
|
||||
(set-screen! @(resolve 'advent.core/advent) credits/credits)
|
||||
entities)
|
||||
:ease tween/ease-in-cubic))
|
||||
(assoc-in [:tweens :fade-out-music]
|
||||
(tween/tween :fade-out-music screen [:volume] 1.0 0.0 1.0)))
|
||||
|
||||
|
||||
|
||||
(#{:back } actor-key)
|
||||
(-> entities
|
||||
|
||||
Reference in New Issue
Block a user