Yes, type checking happening only in tl files. But you can avoid using Lua using this trick:
- Create
my.*_script - Create
my.lua(it works with Teal as well) - in
luafile:
local function init(self)
end
local function on_message(self, message_id, message, sender)
end
local function on_input(self, action_id, action)
end
local function update(self, dt)
end
return function()
_G.init = init
_G.on_message = on_message
_G.on_input = on_input
_G.update = update
-- ...etc
end
-
in
scriptfile: require(“my”)() -
Keep script file a one-liner + maybe some
go.properties()