title: how to define a global function that has an event parameter in lua
body: <p>Assume that I have the following function:</p>
  
  <pre><code>function onTilt( event )
      physics.setGravity( (-9.8*event.yGravity), (-9.8*event.xGravity) ) --Το σωστό
  end
  </code></pre>
  
  <p>which will be used in many different lua files. I want to define it in an external file and then use require to this file so I will not repeat it in each lua file.</p>
  
  <p>The problem is that this function is called like that when it is in the same file with the following (without passing an argument)</p>
  
  <pre><code>Runtime:addEventListener( "accelerometer", onTilt )
  </code></pre>
  
  <p>Can someone explain me how to define it in an external file and how to call then?</p>