1

I want to check if it is possible to identify that the event listener is running or not. For example, I have achieved the following:

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

1 回答 1

1

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

local function doTurn (event)   
    rotatingRect:applyAngularImpulse(50)
    print("This function is being triggered")
end  
    Runtime:addEventListener( "enterFrame", doTurn )
于 2013-09-06T05:43:58.473 回答