-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphysics_templates.xml
1 lines (1 loc) · 3.88 KB
/
physics_templates.xml
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Allows you to turn any Corona display object into a simulated physical object with one line of code, including the assignment of physical properties." enabled="true" name="physics.addBody">physics.addBody(${object}, "${static_dynamic_kinematic}", {density = ${density}, friction = ${friction}, bounce = ${bounce}, isSensor = ${false}})</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Returns the x,y components of the global gravity vector, in units of m/s2. This takes advantage of the fact that Lua functions can return multiple values." enabled="true" name="physics.getGravity">${gx}, ${gy} = physics.getGravity()</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Joints are used to assemble more complex game objects from multiple rigid bodes. To construct a joint, first construct the bodies that will be joined, and then call this method with the desired joint constructor type." enabled="true" name="physics.newJoint">${joint} = physics.newJoint( "${jointType}", ${object1}, ${object2}, ${anchorX}, ${anchorY} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Pause the physics engine." enabled="true" name="physics.pause">physics.pause()</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Removes a physics body from a display object without destroying the entire object. This removes the body created with physics.addBody." enabled="true" name="physics.removeBody">${result} = physics.removeBody( ${object} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Selects one of three possible rendering modes for the physics engine. This mode may be changed at any time -- see the "DebugDraw" sample project for an example of how to toggle it on the fly." enabled="true" name="physics.setDrawMode">physics.setDrawMode( ${debug_hybrid_normal} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Sets the x,y components of the global gravity vector, in units of m/s2. The default is ( 0, 9.8 ) to simulate standard Earth gravity, pointing downwards on the y-axis." enabled="true" name="physics.setGravity">physics.setGravity( ${gx}, ${gy} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Sets the accuracy of the engine's position calculations." enabled="true" name="physics.setPositionIterations">physics.setPositionIterations( ${value} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Sets the internal pixels-per-meter ratio that is used in converting between onscreen Corona coordinates and simulated physics coordinates. This should be done only once, before any physical objects are instantiated." enabled="true" name="physics.setScale">physics.setScale( ${value} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Sets the accuracy of the engine's velocity calculations." enabled="true" name="physics.setVelocityIterations">physics.setVelocityIterations( ${value} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="This function start the physics simulation and should be called before any other physics functions." enabled="true" name="physics.start">physics.start( ${noSleep} )</template><template autoinsert="true" context="LuaUniversalTemplateContextType" deleted="false" description="Stops the physics engine." enabled="true" name="physics.stop">physics.stop()</template></templates>