Defold 1.8.1 has been released

Yes, type checking happening only in tl files. But you can avoid using Lua using this trick:

  1. Create my.*_script
  2. Create my.lua (it works with Teal as well)
  3. in lua file:
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
  1. in script file: require(“my”)()

  2. Keep script file a one-liner + maybe some go.properties()

2 Likes