diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2021-10-23 17:09:34 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2021-10-23 17:09:34 -0400 |
commit | 3fc18437f905f18aa4bf3b688930dbc68f8721b3 (patch) | |
tree | e14a25532309c88e2a33d5a7641f381a69733966 /bonnie-bee/splash.scm | |
parent | fb31282c18f33acb6de24e604059df6d05477491 (diff) |
Lots of tweaks and also sprite animations!
Diffstat (limited to 'bonnie-bee/splash.scm')
-rw-r--r-- | bonnie-bee/splash.scm | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/bonnie-bee/splash.scm b/bonnie-bee/splash.scm index 3b8fba6..98239d6 100644 --- a/bonnie-bee/splash.scm +++ b/bonnie-bee/splash.scm @@ -14,23 +14,37 @@ (define-class <splash> (<scene-2d>)) +(define %text-color (rgb #xfee761)) + (define-method (on-boot (splash <splash>)) (set-cameras! splash) (attach-to splash + (make <sprite> + #:texture darkness-image) + (make <label> + #:rank 1 + #:position (vec2 (/ %game-width 2.0) 120.0) + #:font monogram-font + #:color %text-color + #:align 'center + #:vertical-align 'center + #:text "Made with Chickadee") (make <label> - #:name 'label - #:font chonkly-font - #:color black + #:rank 1 + #:position (vec2 (/ %game-width 2.0) 100.0) + #:font monogram-font + #:color %text-color #:align 'center #:vertical-align 'center - #:position (vec2 (/ %game-width 2.0) (/ %game-height 2.0))))) + #:text "https://dthompson.us/projects/chickadee.html"))) (define-method (on-enter (splash <splash>)) - (unless (getenv "SKIP_SPLASH") - (run-script splash - (set! (text (& splash label)) "made with chickadee") - (sleep 0.5) - (replace-scene (current-kernel) (make <game>))))) + (run-script splash + (unless (getenv "SKIP_SPLASH") + (fade-in splash 1.0) + (sleep 1.0) + (fade-out splash 1.0)) + (replace-scene (current-kernel) (make <game>)))) (define (launch-game) (boot-kernel (make <kernel> |