summaryrefslogtreecommitdiff
path: root/scenes
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-07-27 09:38:14 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-07-27 17:15:49 +0200
commite74fbf491f730d6b15ea6985e75faaf0aae5701c (patch)
tree1b2da9fdda0aa4cd669cfc71c0295daff2669645 /scenes
parentb523a5ee8fe4368381eea28483c725f4a178497d (diff)
Play little tune during intro.
Diffstat (limited to 'scenes')
-rw-r--r--scenes/intro.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/scenes/intro.scm b/scenes/intro.scm
index 0592eed..cc6c5a0 100644
--- a/scenes/intro.scm
+++ b/scenes/intro.scm
@@ -16,6 +16,7 @@
;;; <http://www.gnu.org/licenses/>.
(define-module (scenes intro)
+ #:use-module (chickadee audio)
#:use-module (chickadee math rect)
#:use-module (chickadee math vector)
#:use-module (chickadee render font)
@@ -27,7 +28,7 @@
#:use-module (config)
#:use-module (scenes game)
#:use-module (oop goops)
- #:export (<intro>))
+ #:export (intro))
(define-class <intro> (<scene>))
@@ -88,3 +89,8 @@ to dry."))
(when (eq? key 'return)
(switch-scene (root-node)
(game))))
+
+(define (intro)
+ (set-music-volume! 1.0)
+ (play-music (load-music "assets/music/intro.ogg") #:loop? #f)
+ (make <intro>))