otclient/data/modules/mainmenu/menustate.lua
Eduardo Bart e611734396 remove game state classes
scripting improvements
2011-04-22 10:49:46 -03:00

20 lines
366 B
Lua

-- menu state
function onEnterMenuState()
MainMenu_create()
end
function onLeaveMenuState()
MainMenu_destroy()
end
function onApplicationClose()
onLeaveMenuState()
exitGame()
end
-- here is where everything starts
if not initialStateLoaded then
onEnterMenuState()
setOnApplicationClose(onApplicationClose)
initialStateLoaded = true
end