File hp/physics/PhysicsWorld.lua

Functions

M:addBody (bodyType) Add the PhysicsBody object.
M:copyParams (params) Set the parameter setter function.
M:createBodyFromProp (prop, bodyType, ...) Create a Body based on MOAIProp.
M:createRect (left, top, width, height, params) To create a rectangle.
M:init (params) The constructor.
M:new (...) Instance generating functions.
Unlike an ordinary class, and based on the MOAI_CLASS.
To inherit this function is not recommended.

Tables

PhysicsWorld Class that inherits from MOAIBox2DWorld.


Functions

M:addBody (bodyType)
Add the PhysicsBody object.

Parameters

  • bodyType: Can also be specified in the extended string.

Return value:

PhysicsBody instance.
M:copyParams (params)
Set the parameter setter function.

Parameters

  • params: Parameter is set to Object.
    (params:gravity, unitsToMeters)
M:createBodyFromProp (prop, bodyType, ...)
Create a Body based on MOAIProp.

Parameters

  • prop: MOAIProp instance.
  • bodyType: The type of the Body.
  • ...: physicsDatas. Data that was created in PhysicsEditor can be used.

Return value:

PhysicsBody instance.
M:createRect (left, top, width, height, params)
To create a rectangle.

Parameters

  • left:
  • top:
  • width:
  • height:
  • params:

Return value:

PhysicsBody instance.
M:init (params)
The constructor.

Parameters

  • params:
M:new (...)
Instance generating functions.
Unlike an ordinary class, and based on the MOAI_CLASS.
To inherit this function is not recommended.

Parameters

  • ...: params.

Return value:

instance.

Tables

PhysicsWorld
Class that inherits from MOAIBox2DWorld.
Has been prepared to create an object, a useful function.

Valid XHTML 1.0!