2021-12-28 13:56:16 -05:00
|
|
|
makeclass('login')
|
2025-01-14 18:37:31 -05:00
|
|
|
makeclass("engio")
|
2025-03-28 23:31:44 -04:00
|
|
|
makeclass('cube')
|
|
|
|
|
makeclass('sphere')
|
2025-01-21 20:20:54 -05:00
|
|
|
|
2025-02-26 15:58:12 -05:00
|
|
|
function login.init()
|
|
|
|
|
local actor = tangible.actor()
|
2025-01-21 20:20:54 -05:00
|
|
|
dprint("login.init:", actor)
|
2025-03-28 23:31:44 -04:00
|
|
|
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}}
|
2025-01-21 20:20:54 -05:00
|
|
|
end
|
2024-02-07 15:59:17 -05:00
|
|
|
|
2025-02-26 15:58:12 -05:00
|
|
|
function engio.move(action, xyz, facing)
|
2024-02-16 15:48:49 -05:00
|
|
|
-- todo: sanity check the parameters.
|
2025-02-26 15:58:12 -05:00
|
|
|
local actor = tangible.actor()
|
2024-02-16 15:48:49 -05:00
|
|
|
dprint("engio.move ", action, " ", xyz[1], " ", xyz[2], " ", xyz[3])
|
|
|
|
|
tangible.animate(actor, nil, {action=action, xyz=xyz, facing=facing})
|
2025-01-21 20:20:54 -05:00
|
|
|
end
|
2025-02-24 16:46:05 -05:00
|
|
|
|
2025-04-07 16:48:27 -04:00
|
|
|
function cube.getlookat()
|
|
|
|
|
return { "Hotkeys", "X", "I Am a Cube" }
|
2025-02-24 16:46:05 -05:00
|
|
|
end
|
2025-02-26 14:47:53 -05:00
|
|
|
|
2025-04-07 16:48:27 -04:00
|
|
|
function sphere.getlookat()
|
|
|
|
|
return { "Hotkeys", "X", "I Am a Sphere" }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function engio.getlookat()
|
|
|
|
|
local place = tangible.place()
|
|
|
|
|
local class = tangible.getclass(place)
|
|
|
|
|
return class.getlookat()
|
2025-02-26 14:47:53 -05:00
|
|
|
end
|
|
|
|
|
|