local speed = 10
--XLua中 函数的映射关系
function start()
--Button组件添加监听事件
self:GetComponent("Button").onClick:AddListener(function()
print("clicked, you input is '" ..input:GetComponent("InputField").text .."'")
end)
end
腾讯XLua 02-UI事件与事例API
最新推荐文章于 2022-12-06 22:03:43 发布