From 3dfbd9b4087d5d39f0e0fd83f069d5337f2e6354 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 2 Sep 2015 23:27:53 -0700 Subject: [PATCH] some ending goodness --- desktop/resources/space/later.png | Bin 0 -> 4130 bytes desktop/resources/the-end.png | Bin 0 -> 3968 bytes desktop/resources/wizard/gandarf-cloud | 97 +++++++++++--- desktop/src-common/advent/actions.clj | 2 +- desktop/src-common/advent/core.clj | 1 + desktop/src-common/advent/screens/credits.clj | 47 +++++++ .../advent/screens/rooms/.#ending.clj | 1 + .../advent/screens/rooms/common.clj | 126 +++++++++++++++++- .../advent/screens/rooms/ending.clj | 102 ++++++++++++-- .../src-common/advent/screens/rooms/space.clj | 4 + 10 files changed, 350 insertions(+), 30 deletions(-) create mode 100644 desktop/resources/space/later.png create mode 100644 desktop/resources/the-end.png create mode 100644 desktop/src-common/advent/screens/credits.clj create mode 120000 desktop/src-common/advent/screens/rooms/.#ending.clj diff --git a/desktop/resources/space/later.png b/desktop/resources/space/later.png new file mode 100644 index 0000000000000000000000000000000000000000..3c501c0618811f6a1547f537452cad4a4224f8b7 GIT binary patch literal 4130 zcmeHK`#;nBAOCEIxrA~nxvZp4r(8-Ja+%99JLH-U=6W2Y#gJkf+ep+=q=b{pbW$$S zh`Da8vr?TdWK3bRlH6i*-H7?F$M^eBd>@Z~c|V?y_v86~z2A@L>-m1ZAMdMP9>{Hq zI*I@QY(u#^`v3q4A;m(doODbuW?%q7Mi}GdwaA9$SDo` ztJt7QE&GbbTouh6s-G{qeYZ}1j~wdO{b@&?_BZc;u6%hRPRDoXcndq$kFpBJDvM>v zkLC4mq&Vs*KV5x12Wm$7I%p2=tF%oTMx42|no%47i0a!J+|!m%C0R`-+X>!TAfEqr zXS^7-D~z`oY(dG-qZAjOIK4-q*Wti2qUr&`qa(-!Y|?WX$zg@=dBTIs56^C$zi_&y zN@icVnWy)#lP+lD*st~3D=tS6~K5`+s=wF z*LZcEc~h{zEjAJN)~+_I6w?9!)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%khA!beC=243ZO(KGqm9olGAZRp>v`r(>f@~0|oHL_{$)Q;n5naL~g)j&^V-PYdO zu~zuXdNNyoKw78Fg{EcMTG&Q!tTJc~85?h>l|x?X|8urkNgQEz!XsX>wEpAKZendy z1P1OF%&|RNU$U*h#){H=KQ_*Y)ye*XmJxEEB(@Q^LTicgY;P5IAhj+zc%0fp+QMKE zL65rqCVd2p8yvi^0aZdDVEb@sX@|MvYa#`@1yIytYo8>r-Wb|^L+BtHucQPn-QL9F zoI*Gw9h`x2eK|Cq8^Iu0td5Q_Xmp8wdaDF`gz{mL1D`U-9Mj#XS3wG5FeG*)o55sRv37bsx}7%8_-gqEQpuP(gU!I$C!%gpem0ObOvP06~}p zVs(q|3tC5S*Kxt*2WzyTvySkYr#?FuUNnV?(L&Qj??-$L%1L?5gW&kCmDx)z6XdtE z$B1bRk>R>Mo?*M1WTj46W=x!$Yvkz@ev1fA_m$(XXz9^0*Aw(ZzjSGNQM34gbC`+f z-Z6%RIwTaQfwMP{6pLct{rd(i$~fzW;6AiS9`+#+1)~)H_O@`J1p1P{qJTkzb{DhLI8HqiN_)ZUCm#S^-FfBL%q_+ zCg|xBtAJP6cTnqQfI z-e8E16tD`GrD^Ak09^bvrD^AY0FM74{gB{?3w~UL|GO;UlZX$3yy4UJ`O?2XfcnM5 K`H^E-#(w}IxT=Q$ literal 0 HcmV?d00001 diff --git a/desktop/resources/the-end.png b/desktop/resources/the-end.png new file mode 100644 index 0000000000000000000000000000000000000000..0c749fe2d22081240bc0094fae508c9be31590da GIT binary patch literal 3968 zcmeHK`8U)J7yr)J7h`Q?D@h~U6DdM=Gw2EBk&=YLlu{lULJVV>QK)RGEa5?mM})yN zmSLD8+aPvy+{axRN*k08$S2 zC(Z!?487xX;37NrrY=1I0E9UHwzkd=wzf#;kRU(*8&?6qBsJA_G-%|!9O_;W=7j>P zs5(trKAG(5;@PlIsiIxP;ZgC7jZ(v>A?+6(w{S`>%;U9vfv$x-Fi27$M63~2d4RW3 zl5FG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rnZunQcA z-x7N*LmTpuvK7&G5}#Ayb&1fK;TPJV;M zLNbH8!!G+otwOw=yN~eL=U-lHrk9$^H_Ed+vp$_9L<|9#fc}Yba`M(Po%#!32#{ih z6E~ze)$&F|Dr1CbD^b>p2`VmnEEI&=<@T5XC0PqnZ}dmXwLz#rtc?YtS_Pc}p0~rT z+F1)z-I3~Owgo8&6~6kbX_VSn@(LFy?A~Z;Yybv;`Y;n)WhonLV~Hqry)-li=&Be| zx)UFyz_rI(kcI$da;Ek{G?vWZY>PK3w(%hN_njS`@BQjAKsty7B<`xhK+~NwS;ExT zKo{+Vz{~bTbQ%%poS~i)L;L}PRm45Jkq^|6KxkCOIS{%}1P&t;f0y~q&2QcOUxtCv Z(t_H}_VX@9?R?gN!=FwkDs8aw{{_@3n7#l2 literal 0 HcmV?d00001 diff --git a/desktop/resources/wizard/gandarf-cloud b/desktop/resources/wizard/gandarf-cloud index 36be8315..d44160ea 100644 --- a/desktop/resources/wizard/gandarf-cloud +++ b/desktop/resources/wizard/gandarf-cloud @@ -137,7 +137,32 @@ timeline5: 0.65068495 timeline6: 0.82191783 timeline7: 0.9589041 - Gravity - -active: false +active: true +lowMin: -5.0 +lowMax: -5.0 +highMin: 10.0 +highMax: 10.0 +relative: false +scalingCount: 9 +scaling0: 0.0 +scaling1: 0.97959185 +scaling2: 0.0 +scaling3: 1.0 +scaling4: 0.0 +scaling5: 1.0 +scaling6: 0.0 +scaling7: 1.0 +scaling8: 0.0 +timelineCount: 9 +timeline0: 0.0 +timeline1: 0.15753424 +timeline2: 0.25342464 +timeline3: 0.36301368 +timeline4: 0.47260273 +timeline5: 0.6164383 +timeline6: 0.72602737 +timeline7: 0.82191783 +timeline8: 1.0 - Tint - colorsCount: 6 colors0: 0.6039216 @@ -184,12 +209,12 @@ lowMin: 5000.0 lowMax: 5000.0 - Count - min: 5 -max: 10 +max: 150 - Emission - lowMin: 0.0 lowMax: 0.0 -highMin: 5.0 -highMax: 5.0 +highMin: 25.0 +highMax: 25.0 relative: false scalingCount: 1 scaling0: 1.0 @@ -198,19 +223,21 @@ timeline0: 0.0 - Life - lowMin: 0.0 lowMax: 0.0 -highMin: 1000.0 -highMax: 1000.0 +highMin: 1500.0 +highMax: 1500.0 relative: false -scalingCount: 1 +scalingCount: 2 scaling0: 1.0 -timelineCount: 1 +scaling1: 1.0 +timelineCount: 2 timeline0: 0.0 +timeline1: 0.0890411 - Life Offset - active: false - X Offset - active: true -lowMin: -10.0 -lowMax: 10.0 +lowMin: 0.0 +lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false @@ -219,7 +246,16 @@ scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Y Offset - -active: false +active: true +lowMin: 5.0 +lowMax: 5.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 - Spawn Shape - shape: point - Spawn Width - @@ -256,8 +292,8 @@ timeline0: 0.0 active: true lowMin: 0.0 lowMax: 5.0 -highMin: 5.0 -highMax: 5.0 +highMin: 15.0 +highMax: 15.0 relative: false scalingCount: 2 scaling0: 1.0 @@ -280,8 +316,8 @@ timeline0: 0.0 active: true lowMin: 0.0 lowMax: 0.0 -highMin: -15.0 -highMax: 15.0 +highMin: -30.0 +highMax: 30.0 relative: false scalingCount: 1 scaling0: 1.0 @@ -306,13 +342,13 @@ highMax: 1.0 relative: false scalingCount: 4 scaling0: 0.0 -scaling1: 0.5263158 -scaling2: 0.50877196 +scaling1: 0.2631579 +scaling2: 0.0877193 scaling3: 0.0 timelineCount: 4 timeline0: 0.0 -timeline1: 0.34931508 -timeline2: 0.8835617 +timeline1: 0.17123288 +timeline2: 0.25342464 timeline3: 0.9931507 - Options - attached: false @@ -464,7 +500,28 @@ timeline5: 0.65068495 timeline6: 0.82191783 timeline7: 0.9589041 - Gravity - -active: false +active: true +lowMin: -5.0 +lowMax: -5.0 +highMin: 5.0 +highMax: 5.0 +relative: false +scalingCount: 7 +scaling0: 0.0 +scaling1: 0.93877554 +scaling2: 0.0 +scaling3: 1.0 +scaling4: 0.0 +scaling5: 1.0 +scaling6: 0.0 +timelineCount: 7 +timeline0: 0.0 +timeline1: 0.11643836 +timeline2: 0.28767124 +timeline3: 0.36301368 +timeline4: 0.5753425 +timeline5: 0.77397263 +timeline6: 0.8835617 - Tint - colorsCount: 6 colors0: 0.047058824 diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index bb240330..06ac6409 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -347,7 +347,7 @@ (do-stop entities :ego :face face)))) (defn get-text-duration [text] - (max 1.5 (* (count (s/split text #" ")) 0.5))) + (max 1.5 (* (count (s/split text #"[ \-]")) 0.5))) (defn talk [entities target-id text & {:keys [stop? animate? anim wait] :or {wait true}}] (let [initial-time (atom nil) diff --git a/desktop/src-common/advent/core.clj b/desktop/src-common/advent/core.clj index e4c1ef6f..ec38b5f3 100644 --- a/desktop/src-common/advent/core.clj +++ b/desktop/src-common/advent/core.clj @@ -6,6 +6,7 @@ [advent.screens.scene :as scene] [advent.screens.dialogue :as dialogue] [advent.screens.title :as title] + [advent.screens.credits :as credits] [advent.screens.inventory :as inventory] [advent.screens.test :as test] [advent.screens.safe :as safe] diff --git a/desktop/src-common/advent/screens/credits.clj b/desktop/src-common/advent/screens/credits.clj new file mode 100644 index 00000000..b2dee69b --- /dev/null +++ b/desktop/src-common/advent/screens/credits.clj @@ -0,0 +1,47 @@ +(ns advent.screens.credits + (:require [play-clj.core :refer :all] + [play-clj.ui :refer :all] + [play-clj.utils :refer :all] + [play-clj.g2d :refer :all] + [clojure.pprint] + [advent.pathfind] + [advent.tween :as tween] + [advent.zone :as zone] + [advent.utils :as utils]) + (:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter] + [com.badlogic.gdx.graphics.g2d TextureRegion] + [com.badlogic.gdx.scenes.scene2d.utils Align] + [com.badlogic.gdx Application Audio Files Game Gdx Graphics Input + InputMultiplexer InputProcessor Net Preferences Screen])) + + +(defscreen credits + :on-show + (fn [screen entities] + (utils/setup-viewport screen 320 240) + (input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0) + {:fade (assoc (texture "black.png") + :scale-x 80 + :scale-y 80 + :opacity 0.0 + :origin-x 0 + :origin-y 0) + :the-end (assoc (texture "the-end.png") :x 0 :y 0) + :tweens {:fade-in + (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 5.0 :ease tween/ease-out-cubic)}} + ) + + :on-render + (fn [screen [entities]] + (let [entities (utils/apply-tweens screen entities (:tweens entities))] + + (render! screen [(:the-end entities) (:fade entities)]) + entities)) + + + :on-touch-up (fn [screen [entities]] + (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.title/title-screen))) + + :on-resize (fn [{:keys [width height viewport]} entities] + (.update viewport width height))) + diff --git a/desktop/src-common/advent/screens/rooms/.#ending.clj b/desktop/src-common/advent/screens/rooms/.#ending.clj new file mode 120000 index 00000000..afad3f39 --- /dev/null +++ b/desktop/src-common/advent/screens/rooms/.#ending.clj @@ -0,0 +1 @@ +brycecovert@brometheus.local.2657 \ No newline at end of file diff --git a/desktop/src-common/advent/screens/rooms/common.clj b/desktop/src-common/advent/screens/rooms/common.clj index 74fcc84d..d020305a 100644 --- a/desktop/src-common/advent/screens/rooms/common.clj +++ b/desktop/src-common/advent/screens/rooms/common.clj @@ -171,8 +171,46 @@ (update-in entities [:room :entities :ego] dissoc :stand-override)) (skip-type [this screen entities] :none))) +(defn disappear [entities] + (actions/run-action entities + (begin [this screen entities] + (-> entities + + (assoc-in [:tweens :disappear-ego] + (tween/tween :disappear-ego screen [:room :entities :ego :opacity] 1.0 0.0 0.5 :ease tween/ease-in-out-quintic)))) + + (continue [this screen entities] + entities) + + (done? [this screen entities] + (= 0.0 (get-in entities [:room :entities :ego :opacity]))) + + (terminate [this screen entities] + entities) + (skip-type [this screen entities] + :none))) + +(defn fade-out [entities] + (actions/run-action entities + (begin [this screen entities] + (-> entities + (assoc-in [:tweens :fade-out] + (tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 3.5 :ease tween/ease-in-out-quintic)))) + (continue [this screen entities] + entities) + + (done? [this screen entities] + (= 1.0 (get-in entities [:fade :opacity]))) + + (terminate [this screen entities] + entities) + (skip-type [this screen entities] + :none))) + + (defn win [] + (actions/get-script entities (actions/do-dialogue entities :ego "Hey Bloodclot!" @@ -191,7 +229,93 @@ (explode entities) (actions/play-animation entities :ego :standup) - (Thread/sleep 15000) + (actions/walk-straight-to entities :ego [340 55]) + (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))) + + (continue [this screen entities] + entities) + + (done? [this screen entities] + (not (get-in entities [:tweens :later]))) + + (terminate [this screen entities] + entities) + (skip-type [this screen entities] + :none)) + (Thread/sleep 2000) + (actions/transition-background entities :ending [165 49] :time 4.0) + (actions/do-stop entities :ego :face :left) + (actions/do-dialogue entities + :duke "Ladies and gentlemen." + :duke "As the Duke of Remington, I'm pleased to inform you..." + :duke "The goblin by the name of Bloodclot has been destroyed!" + :duke "Our town is saved." + :duke "Thanks to this young boy, Tick." + :duke "It is my rightful duty as Duke of Remington to knight you." + :duke "You've proven yourself worthy." + :duke "Your sword, please.") + (actions/walk-straight-to entities :ego [150 49]) + (actions/play-animation entities :ego :reach-start :stop? false) + (actions/play-animation entities :duke :reach :stop? false) + (actions/play-animation entities :ego :reach-stop :stop? false) + (actions/talk entities :duke "Kneel." :anim :reach-talk :stop? false) + (actions/play-animation entities :ego :start-squat-2 :stop? false) + (Thread/sleep 1000) + (actions/play-animation entities :duke :knight :stop? false) + (actions/update-entity entities :duke (fn [d] (assoc d :baseline (- 240 48)))) + (actions/play-animation entities :duke :knight :stop? false) + (actions/talk entities :duke "In honor of your bravery..." :anim :reach-talk :stop? false) + (actions/talk entities :duke "I declare you Sir Tick of Remington." :anim :reach-talk) + (actions/play-animation entities :ego :end-squat :stop? true) + (Thread/sleep 500) + (actions/glad entities) + (Thread/sleep 200) + (actions/do-dialogue entities :ego "Wait...") + (Thread/sleep 400) + (actions/do-stop entities :ego :face :right) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :left) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :right) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :left) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :right) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :left) + (Thread/sleep 400) + (actions/do-dialogue entities :ego "Where's Georgia McGorgeous?") + (actions/walk-straight-to entities :gandarf-cloud [215 100] :update-baseline? false) + (actions/do-dialogue entities :gandarf "Quickly, boy!") + (actions/do-stop entities :ego :face :right) + (actions/do-dialogue entities :ego "Gandarf?" + :gandarf "Yes, it is I!" + :ego "How did you escape?" + :gandarf "No time for that!" + :gandarf "Georgia McGorgeous has been captured!" + :ego "Captured?! By who?" + :gandarf "Bloodclot's second-in-command, Swinebreath." + :gandarf "I'm afraid that I can't save her." + :gandarf "This is a job for a knight." + :gandarf "If you are willing, Tick..." + :duke "That's 'Sir Tick'..." + :gandarf "Quite right, quite right." + :gandarf "If you are willing, Sir Tick..." + :gandarf "I can transport you to the land where her prision lies." + :gandarf "But it is far out of my sight, and I know not what you'll find." + :gandarf "Well? What say you?" + :ego "I'll do it! " + :gandarf "Very good." + :gandarf "Prepare yourself.") + (Thread/sleep 300) + (actions/talk entities :gandarf "Beamium Up!!!" :anim :talk-angry) + (particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :reset) + (particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :start) + (disappear entities) + (fade-out entities) + (on-gl (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits))) )) diff --git a/desktop/src-common/advent/screens/rooms/ending.clj b/desktop/src-common/advent/screens/rooms/ending.clj index 13abb213..ea085a19 100644 --- a/desktop/src-common/advent/screens/rooms/ending.clj +++ b/desktop/src-common/advent/screens/rooms/ending.clj @@ -16,6 +16,42 @@ [play-clj.utils :refer :all] [play-clj.g2d :refer :all])) +(defn disappear [entities] + (actions/run-action entities + (begin [this screen entities] + (-> entities + + (assoc-in [:tweens :disappear-ego] + (tween/tween :disappear-ego screen [:room :entities :ego :opacity] 1.0 0.0 0.5 :ease tween/ease-in-out-quintic)))) + + (continue [this screen entities] + entities) + + (done? [this screen entities] + (= 0.0 (get-in entities [:room :entities :ego :opacity]))) + + (terminate [this screen entities] + entities) + (skip-type [this screen entities] + :none))) + +(defn fade-out [entities] + (actions/run-action entities + (begin [this screen entities] + (-> entities + (assoc-in [:tweens :fade-out] + (tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 3.5 :ease tween/ease-in-out-quintic)))) + (continue [this screen entities] + entities) + + (done? [this screen entities] + (= 1.0 (get-in entities [:fade :opacity]))) + + (terminate [this screen entities] + entities) + (skip-type [this screen entities] + :none))) + (defn make [screen] (let [ @@ -44,8 +80,7 @@ :x 245 :y 46 :baseline 200 :anim peddler-stand :anim-start 0 - :scaled true - ) + :scaled true) :warden (assoc (animation->texture screen warden-stand) :x 40 :y 50 :baseline (- 240 50) :anim warden-stand @@ -53,15 +88,18 @@ :scale-x 1.1 :scale-y 1.1 ) - :gandarf (common/make-wizard screen {:x 205 :y 130 :baseline 199}) - :gandarf-cloud (doto (assoc (particle-effect "wizard/gandarf-cloud") :x 215 :y 130 + :gandarf (assoc (common/make-wizard screen {:x 205 :y 400 :baseline 199}) + :update-fn (fn [screen entities gandarf] + (assoc gandarf :y (or (get-in entities [:gandarf-cloud :y]) + (:y gandarf))))) + :gandarf-cloud (doto (assoc (particle-effect "wizard/gandarf-cloud") :x 215 :y 400 :baseline 200) (particle-effect! :set-position 215 130)) :duke (assoc (animation->texture screen duke-stand) :x 117 :y 50 :baseline (- 240 50) :anim duke-stand :anim-start 0 - :talk-color (color 0.3 0.4 0.9 1.0) + :talk-color (color 0.4 0.5 0.94 1.0) :talk duke-talk :stand duke-stand :reach duke-reach @@ -84,15 +122,63 @@ (actions/play-animation entities :ego :reach-stop :stop? false) (actions/talk entities :duke "Kneel." :anim :reach-talk :stop? false) (actions/play-animation entities :ego :start-squat-2 :stop? false) + (Thread/sleep 1000) (actions/play-animation entities :duke :knight :stop? false) (actions/update-entity entities :duke (fn [d] (assoc d :baseline (- 240 48)))) (actions/play-animation entities :duke :knight :stop? false) (actions/talk entities :duke "In honor of your bravery..." :anim :reach-talk :stop? false) (actions/talk entities :duke "I declare you Sir Tick of Remington." :anim :reach-talk) (actions/play-animation entities :ego :end-squat :stop? true) - (actions/do-dialogue entities - :ego "That's great and everything..." - :ego "But where's Georgia McGorgeous?"))) + (Thread/sleep 500) + (actions/glad entities) + (Thread/sleep 200) + (actions/do-dialogue entities :ego "Wait...") + (Thread/sleep 400) + (actions/do-stop entities :ego :face :right) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :left) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :right) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :left) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :right) + (Thread/sleep 400) + (actions/do-stop entities :ego :face :left) + (Thread/sleep 400) + (actions/do-dialogue entities :ego "Where's Georgia McGorgeous?") + (actions/walk-straight-to entities :gandarf-cloud [215 100] :update-baseline? false) + (actions/do-dialogue entities :gandarf "Quickly, boy!") + (actions/do-stop entities :ego :face :right) + (actions/do-dialogue entities :ego "Gandarf?" + :gandarf "Yes, it is I!" + :ego "How did you escape?" + :gandarf "No time for that!" + :gandarf "Georgia McGorgeous has been captured!" + :ego "Captured?! By who?" + :gandarf "Bloodclot's second-in-command, Swinebreath." + :gandarf "I'm afraid that I can't save her." + :gandarf "This is a job for a knight." + :gandarf "If you are willing, Tick..." + :duke "That's 'Sir Tick'..." + :gandarf "Quite right, quite right." + :gandarf "If you are willing, Sir Tick..." + :gandarf "I can transport you to the land where her prision lies." + :gandarf "But it is far out of my sight, and I know not what you'll find." + :gandarf "Well? What say you?" + :ego "I'll do it! " + :gandarf "Very good." + :gandarf "Prepare yourself.") + (Thread/sleep 300) + (actions/talk entities :gandarf "Beamium Up!!!" :anim :talk-angry) + (particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :reset) + (particle-effect! (get-in @entities [:room :entities :magic-frog-particle]) :start) + (disappear entities) + (fade-out entities) + (on-gl (set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.credits/credits))))) + :magic-frog-particle (doto (assoc (particle-effect "inside-house/magic-frog") :x 140 :y 49 + :baseline 241) + (particle-effect! :set-position 150 49)) :ladder-guard-1 (assoc (animation->texture screen ladder-guard-stand-1) :x 75 :y 69 :baseline (- 240 69) :anim ladder-guard-stand-1 diff --git a/desktop/src-common/advent/screens/rooms/space.clj b/desktop/src-common/advent/screens/rooms/space.clj index 3a5b73d4..f5ae8a5f 100644 --- a/desktop/src-common/advent/screens/rooms/space.clj +++ b/desktop/src-common/advent/screens/rooms/space.clj @@ -193,6 +193,10 @@ :entities {:appear (assoc effect :x 240 :y 50 :baseline 200) + :later (assoc (texture "space/later.png") + :x 0 :y 0 + :baseline 240 + :opacity 0.0) :grow-explode (assoc grow-explode :x 240 :y 130 :baseline 200)