Package | com.boristhebrave.Box2DWith.Flint |
Class | public class BodiesInit |
Inheritance | BodiesInit ![]() |
If you wish to do further initialization, create a new initializer, and ensure it has lower default priority than BodyInitializer.
Property | Defined by | ||
---|---|---|---|
bodyDefs : * The array or FastWeightedArray to choose body defs from.
| BodiesInit | ||
scale : Number The scaling factor to use when initialzing body properties from particle properties.
| BodiesInit | ||
shapeDefs : * An array or FastWeightedArray of arrays of b2ShapeDef to create inside the body.
| BodiesInit |
Method | Defined by | ||
---|---|---|---|
BodiesInit(world:b2World, bodyDefs:Number, shapeDefs:*, scale:*)
Creates a new initializer, attached to the given world.
| BodiesInit |
bodyDefs | property |
public var bodyDefs:*
The array or FastWeightedArray to choose body defs from. SetMassFromShapes is always used to define the body mass.
scale | property |
public var scale:Number
The scaling factor to use when initialzing body properties from particle properties.
shapeDefs | property |
public var shapeDefs:*
An array or FastWeightedArray of arrays of b2ShapeDef to create inside the body.
BodiesInit | () | constructor |
public function BodiesInit(world:b2World, bodyDefs:Number, shapeDefs:*, scale:*)
Creates a new initializer, attached to the given world.
Parametersworld:b2World — The world attached to.
|
|
bodyDefs:Number — The array or FastWeightedArray to choose body defs from.
|
|
shapeDefs:* — An array or FastWeightedArray of arrays of b2ShapeDef to create inside the body.
|
|
scale:* — The scaling factor to use in pixels/unit for initializing the position and velocity of the body given the particle properties.
|
See also