cocos3.10 schedule该则么写,dt的数值咋么是空?

function BackgroundLayer:ctor()
performWithDelay(self, BackgroundLayer.setUpdatebackground, 0)
end

function BackgroundLayer:setUpdatebackground( dt )
schedule(self, BackgroundLayer.updateBackground, 0)
end

function BackgroundLayer:updateBackground( dt )
end

请问这样写可以么?还有就是为啥dt是空?求大神帮忙解决

已经不推荐使用performWithDelay或者schedule方法了,这两个方法是通过action来模拟定时器的,回调是不会传dt参数的,建议搜索一下"deprecated.lua"文件看一看

谢谢,帮大忙了