I have some transitions and animations where touches are briefly disabled (around 500ms), because it messes things up if the user touches during that time. At first, I put a simple check at the beginning of all my touch listeners like this:
1 2 3 4 5 6 7 8 9 | function touchHandlerOne ( object, event ) -- quit if touches are disabled if getVar( "levelVars.touchEnabled" ) ~= true then return true end -- rest of function... end |