我想检查是否可以识别事件监听器是否正在运行。例如,我已经实现了以下目标:
local function doTurn (event)
rotatingRect:applyAngularImpulse(50)
end
Runtime:addEventListener( "enterFrame", doTurn )
答案 0 :(得分:1)
你可以在该函数上打印以查看事件是否触发查看此代码
local function doTurn (event)
rotatingRect:applyAngularImpulse(50)
print("This function is being triggered")
end
Runtime:addEventListener( "enterFrame", doTurn )