|
@@ -36,14 +36,15 @@ function Client.init()
|
36
|
36
|
g_window.setIcon(resolvepath('clienticon.png'))
|
37
|
37
|
g_keyboard.bindKeyDown('Ctrl+Shift+R', Client.reloadScripts)
|
38
|
38
|
|
39
|
|
- addEvent(function()
|
40
|
|
- scheduleEvent(function()
|
41
|
|
- -- Play startup music (The Silver Tree, by Mattias Westlund)
|
42
|
|
- g_sounds.playMusic("/client/startup.ogg", 3)
|
43
|
|
- connect(g_game, { onGameStart = function() g_sounds.stopMusic(3) end })
|
44
|
|
- connect(g_game, { onGameEnd= function() g_sounds.playMusic("/client/startup.ogg", 3) end })
|
45
|
|
- end, 100)
|
46
|
|
- end, 0)
|
|
39
|
+ connect(g_app, { onRun =
|
|
40
|
+ function()
|
|
41
|
+ -- Play startup music (The Silver Tree, by Mattias Westlund)
|
|
42
|
+ g_sounds.playMusic("startup.ogg", 3)
|
|
43
|
+ connect(g_game, { onGameStart = function() g_sounds.stopMusic(3) end })
|
|
44
|
+ connect(g_game, { onGameEnd = function() g_sounds.playMusic("startup.ogg", 3) end })
|
|
45
|
+ end
|
|
46
|
+ })
|
|
47
|
+
|
47
|
48
|
end
|
48
|
49
|
|
49
|
50
|
function Client.terminate()
|