PackagePBLabs.Box2D
Classpublic class Box2DManagerComponent
InheritanceBox2DManagerComponent Inheritance EntityComponent
ImplementsISpatialManager2D, ITickedObject



Public Properties
 PropertyDefined by
  AllowSleep : Boolean
Box2DManagerComponent
  Gravity : Point
Box2DManagerComponent
  InverseScale : Number
[read-only]
Box2DManagerComponent
 InheritedIsRegistered : Boolean
Whether or not the component is currently registered with an entity.
EntityComponent
 InheritedName : String
The name given to the component when it is added to an entity.
EntityComponent
 InheritedOwner : IEntity
A reference to the entity that this component currently belongs to.
EntityComponent
  Scale : Number
Box2DManagerComponent
  WorldBounds : Rectangle
Box2DManagerComponent
Public Methods
 MethodDefined by
  
Add(bodyDef:b2BodyDef):b2Body
Box2DManagerComponent
  
Box2DManagerComponent
  
CastRay(start:Point, end:Point, mask:ObjectType, result:RayHitInfo):Boolean
Box2DManagerComponent
  
OnInterpolateTick(factor:Number):void
Box2DManagerComponent
  
OnTick(tickRate:Number):void
Box2DManagerComponent
  
QueryCircle(center:Point, radius:Number, mask:ObjectType, results:Array):Boolean
Box2DManagerComponent
  
QueryRectangle(box:Rectangle, mask:ObjectType, results:Array):Boolean
Box2DManagerComponent
 Inherited
Register(owner:IEntity, name:String):void
Registers the component with an entity.
EntityComponent
  
Remove(body:b2Body):void
Box2DManagerComponent
  
Box2DManagerComponent
 Inherited
Reset():void
This is called by an entity on all of its components any time a component is added or removed.
EntityComponent
  
Box2DManagerComponent
 Inherited
Unregister():void
Unregisters the component from an entity.
EntityComponent
Protected Methods
 MethodDefined by
  
_OnAdd():void
Box2DManagerComponent
  
_OnRemove():void
Box2DManagerComponent
 Inherited
_OnReset():void
This is called anytime a component is added or removed from the owner entity.
EntityComponent
Property detail
AllowSleepproperty
AllowSleep:Boolean  [read-write]Implementation
    public function get AllowSleep():Boolean
    public function set AllowSleep(value:Boolean):void
Gravityproperty 
Gravity:Point  [read-write]Implementation
    public function get Gravity():Point
    public function set Gravity(value:Point):void
InverseScaleproperty 
InverseScale:Number  [read-only]Implementation
    public function get InverseScale():Number
Scaleproperty 
Scale:Number  [read-write]Implementation
    public function get Scale():Number
    public function set Scale(value:Number):void
WorldBoundsproperty 
WorldBounds:Rectangle  [read-write]Implementation
    public function get WorldBounds():Rectangle
    public function set WorldBounds(value:Rectangle):void
Method detail
_OnAdd()method
protected override function _OnAdd():void
_OnRemove()method 
protected override function _OnRemove():void
Add()method 
public function Add(bodyDef:b2BodyDef):b2BodyParameters
bodyDef:b2BodyDef

Returns
b2Body
AddSpatialObject()method 
public function AddSpatialObject(object:ISpatialObject2D):voidParameters
object:ISpatialObject2D
CastRay()method 
public function CastRay(start:Point, end:Point, mask:ObjectType, result:RayHitInfo):BooleanParameters
start:Point
 
end:Point
 
mask:ObjectType
 
result:RayHitInfo

Returns
Boolean
OnInterpolateTick()method 
public function OnInterpolateTick(factor:Number):voidParameters
factor:Number
OnTick()method 
public function OnTick(tickRate:Number):voidParameters
tickRate:Number
QueryCircle()method 
public function QueryCircle(center:Point, radius:Number, mask:ObjectType, results:Array):BooleanParameters
center:Point
 
radius:Number
 
mask:ObjectType
 
results:Array

Returns
Boolean
QueryRectangle()method 
public function QueryRectangle(box:Rectangle, mask:ObjectType, results:Array):BooleanParameters
box:Rectangle
 
mask:ObjectType
 
results:Array

Returns
Boolean
Remove()method 
public function Remove(body:b2Body):voidParameters
body:b2Body
RemoveSpatialObject()method 
public function RemoveSpatialObject(object:ISpatialObject2D):voidParameters
object:ISpatialObject2D
SetDebugDrawer()method 
public function SetDebugDrawer(drawer:b2DebugDraw):voidParameters
drawer:b2DebugDraw