bind sound functions and add sample startup music

This commit is contained in:
Eduardo Bart
2012-04-14 11:19:58 -03:00
parent 8e679f2da7
commit c3eae3ba06
12 changed files with 110 additions and 50 deletions

View File

@@ -34,10 +34,16 @@ function Client.init()
g_window.setTitle('OTClient')
g_window.setIcon(resolvepath('clienticon.png'))
-- show the only window after the first frame is rendered
scheduleEvent(function()
scheduleEvent(function()
g_window.show()
-- play startup music
g_sounds.playMusic("startup.ogg", 3)
connect(g_game, { onGameStart = function() g_sounds.stopMusic(3) end })
connect(g_game, { onGameEnd= function() g_sounds.playMusic("startup.ogg", 3) end })
end, 0)
end, 0)
end

BIN
modules/client/startup.ogg Normal file

Binary file not shown.