vision/src/main.lua

27 lines
552 B
Lua
Raw Normal View History

2023-09-04 18:20:02 +00:00
--Client starts here!
client = { scenes = {} }
local client = client
local shared = assert( require 'shared' )
local love = assert( love )
2023-09-04 18:20:02 +00:00
function client.loadScene( name )
print( "Loading Scene:", name )
local scene = assert( client.scenes[name] )
for k, v in pairs( scene ) do
love[k] = v
end
scene.onLoad()
end
function client.addScene( t, name )
print( "Adding Scene:", name )
client.scenes[name] = t
end
function love.load()
assert( require 'client.menu' )
assert( require 'client.browser' )
client.loadScene( "menu" )
end