Package | com.boristhebrave.Box2DWith.Flint |
Class | public class BodiesInitializer |
Inheritance | BodiesInitializer ![]() |
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.
| BodiesInitializer | ||
scale : Number The scaling factor to use when initialzing body properties from particle properties.
| BodiesInitializer | ||
shapeDefs : * An array or FastWeightedArray of arrays of b2ShapeDef to create inside the body.
| BodiesInitializer | ||
world : b2World The world which bodies will be created for.
| BodiesInitializer |
Method | Defined by | ||
---|---|---|---|
BodiesInitializer(world:b2World, bodyDefs:Number, shapeDefs:*, scale:*)
Creates a new initializer, attached to the given world.
| BodiesInitializer | ||
getDefaultPriority():Number
Returns a default priority of 0 for this action.
| BodiesInitializer | ||
initialize(emitter:Emitter, particle:Particle):void
Initializes a particle.
| BodiesInitializer |
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.
world | property |
public var world:b2World
The world which bodies will be created for.
BodiesInitializer | () | constructor |
public function BodiesInitializer(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. If this is blank, the bodies are moved, and will pile up at the origin if not moved by a later intializer.
|
See also
getDefaultPriority | () | method |
public override function getDefaultPriority():Number
Returns a default priority of 0 for this action. Derived classes overrid ethis method if they want a different default priority.
ReturnsNumber |
initialize | () | method |
public override function initialize(emitter:Emitter, particle:Particle):void
Initializes a particle.
Parametersemitter:Emitter |
|
particle:Particle |