diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2021-10-15 23:29:49 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2021-10-15 23:29:49 -0400 |
commit | 58266627bf3ea66dfc6f8434c32304758d1d9e98 (patch) | |
tree | 2f398d7cc9230250f5d11abece2e9e8ae0f05dd8 /bonnie-bee/splash.scm | |
parent | a2b03f564d1eb66298c5502b07e36c67f856857e (diff) |
Day 1 check-in.
Diffstat (limited to 'bonnie-bee/splash.scm')
-rw-r--r-- | bonnie-bee/splash.scm | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/bonnie-bee/splash.scm b/bonnie-bee/splash.scm index 0c2a507..292fd05 100644 --- a/bonnie-bee/splash.scm +++ b/bonnie-bee/splash.scm @@ -1,5 +1,41 @@ (define-module (bonnie-bee splash) + #:use-module (bonnie-bee assets) + #:use-module (bonnie-bee common) + #:use-module (bonnie-bee game) + #:use-module (chickadee graphics color) + #:use-module (chickadee math vector) + #:use-module (chickadee scripting) + #:use-module (oop goops) + #:use-module (starling kernel) + #:use-module (starling node) + #:use-module (starling node-2d) + #:use-module (starling scene) #:export (launch-game)) +(define-class <splash> (<scene-2d>)) + +(define-method (on-boot (splash <splash>)) + (set-cameras! splash) + (attach-to splash + (make <label> + #:name 'label + #:font chonkly-font + #:color black + #:align 'center + #:vertical-align 'center + #:position (vec2 (/ %game-width 2.0) (/ %game-height 2.0))))) + +(define-method (on-enter (splash <splash>)) + (unless (getenv "SKIP_SPLASH") + (run-script splash + (set! (text (& splash label)) "made with chickadee") + (sleep 30) + (replace-scene (current-kernel) (make <game>))))) + (define (launch-game) - (display "hi I don't do anything yet!\n")) + (boot-kernel (make <kernel> + #:window-config (make <window-config> + #:title "Bonnie Bee and the Pesticidal Tendencies - Autumn Lisp Game Jam 2021" + #:width %window-width + #:height %window-height)) + (lambda () (make <splash>)))) |