如何检查事件监听器是否正在运行....?

时间:2013-09-06 05:29:36

标签: lua corona

我想检查是否可以识别事件监听器是否正在运行。例如,我已经实现了以下目标:

local function doTurn (event)   
    rotatingRect:applyAngularImpulse(50)   
end  
    Runtime:addEventListener( "enterFrame", doTurn )

1 个答案:

答案 0 :(得分:1)

你可以在该函数上打印以查看事件是否触发查看此代码

local function doTurn (event)   
    rotatingRect:applyAngularImpulse(50)
    print("This function is being triggered")
end  
    Runtime:addEventListener( "enterFrame", doTurn )