Refactor code for invoke_lua_source and world.init. Also, add compile_commands.json to luprex
This commit is contained in:
@@ -1,14 +1,23 @@
|
||||
makeclass("world")
|
||||
makeclass('login')
|
||||
makeclass("engio")
|
||||
makeclass('cube')
|
||||
makeclass('sphere')
|
||||
|
||||
-- This gets called on every login except the admin user.
|
||||
function login.init()
|
||||
local actor = tangible.actor()
|
||||
dprint("login.init:", actor)
|
||||
tangible.animinit(actor, {bp="character", plane="earth", xyz={0, 0, 90}})
|
||||
tangible.build{class=cube, xyz={500,-100,0}}
|
||||
tangible.build{class=sphere, xyz={500,100,0}}
|
||||
end
|
||||
|
||||
-- This gets called on the admin user. You can call login.init in here if you want.
|
||||
function world.init()
|
||||
local actor = tangible.actor()
|
||||
dprint("world.init:", actor)
|
||||
tangible.build{class=cube, plane="earth", xyz={500,-100,0}}
|
||||
tangible.build{class=sphere, plane="earth", xyz={500,100,0}}
|
||||
login.init()
|
||||
end
|
||||
|
||||
function engio.move(action, xyz, facing)
|
||||
|
||||
Reference in New Issue
Block a user