feat: P.0.module.skeleton spine-prototype module (declares lib-core.maps dep)
This commit is contained in:
34
init.lua
Normal file
34
init.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
local maps = require("lib-core.maps")
|
||||
|
||||
-- inline stubs (extract in P.0.lib.{render,camera,input,player_control,actor,interaction})
|
||||
local render = { hello = function() return "render stub" end }
|
||||
local camera = { hello = function() return "camera stub" end }
|
||||
local input = { hello = function() return "input stub" end }
|
||||
local player_control = { hello = function() return "player_control stub" end }
|
||||
local actor = { hello = function() return "actor stub" end }
|
||||
local interaction = { hello = function() return "interaction stub" end }
|
||||
|
||||
local frames = 0
|
||||
local TARGET_FRAMES = 60
|
||||
|
||||
function init(ctx)
|
||||
engine.print("spine-prototype init: " .. maps.hello())
|
||||
engine.print("inline stubs loaded: "
|
||||
.. render.hello() .. ", "
|
||||
.. camera.hello() .. ", "
|
||||
.. input.hello() .. ", "
|
||||
.. player_control.hello() .. ", "
|
||||
.. actor.hello() .. ", "
|
||||
.. interaction.hello())
|
||||
end
|
||||
|
||||
function update(ctx, dt)
|
||||
frames = frames + 1
|
||||
if frames >= TARGET_FRAMES then
|
||||
engine.exit(0)
|
||||
end
|
||||
end
|
||||
|
||||
function cleanup(ctx)
|
||||
engine.print("spine-prototype cleanup: total_frames=" .. frames)
|
||||
end
|
||||
Reference in New Issue
Block a user