Permalink
Browse files

HEY GUYS LOOK IT PLAYS MUSIC

  • Loading branch information...
1 parent 9388b1f commit 67334e552987aab4abdd3cb6c5f1a43878541688 Amos Wenger committed Apr 23, 2012
Showing with 16 additions and 1 deletion.
  1. +16 −1 source/ui/MainUI.ooc
View
@@ -3,12 +3,13 @@
use gobject, cairo, sdl, deadlogger, ldkit
// game deps
-import ldkit/[Display, Input, Math, Sprites]
+import ldkit/[Display, Input, Math, Sprites, Sound]
import Pass, FlashMessages, Toolbar
// libs deps
import deadlogger/Log
import zombieconfig
+import os/Time
MainUI: class {
@@ -21,6 +22,9 @@ MainUI: class {
// something we can read events from
input: Input
+ // something we can make noise with
+ boombox: Boombox
+
/*
* Constructors
*/
@@ -36,10 +40,21 @@ MainUI: class {
input = Input new()
+ initSound()
initPasses()
initEvents()
}
+ bgMusic: Sample
+
+ initSound: func {
+ logger info("Initializing sound system")
+ boombox = Boombox new()
+
+ bgMusic = boombox load("assets/music/MistsOfTime.ogg")
+ boombox play(bgMusic)
+ }
+
// different UI passes
rootPass := Pass new(this, "root")

0 comments on commit 67334e5

Please sign in to comment.