Packagecitrus.physics.awayphysics
Classpublic class AwayPhysics
InheritanceAwayPhysics Inheritance APhysicsEngine Inheritance CitrusObject Inheritance Object
Implements ISpriteView

This is a simple wrapper class that allows you to add an AwayPhysics world to your game's state. Add an instance of this class to your State before you create any physics bodies. It will need to exist first, or your physics bodies will throw an error when they try to create themselves.



Public Properties
 PropertyDefined By
 Inheritedanimation : String
[read-only]
APhysicsEngine
 Inheritedart : ICitrusArt
[read-only]
APhysicsEngine
 InheriteddebugView : IDebugView
[read-only] Shortcut to the debugView use to change the debug drawer's flags with debugView.debugMode() or access it directly through debugView.debugDrawer.
APhysicsEngine
 Inheriteddepth : Number
[read-only]
APhysicsEngine
  fixedTimeStep : Number
fixedTimeStep is the size of that internal step.
AwayPhysics
  gravity : Vector3D
Change the gravity of the world.
AwayPhysics
 Inheritedgroup : uint
APhysicsEngine
 Inheritedheight : Number
[read-only]
APhysicsEngine
 InheritedhideParamWarnings : Boolean = false
[static]
CitrusObject
 InheritedID : uint
[read-only]
CitrusObject
 Inheritedinverted : Boolean
[read-only]
APhysicsEngine
 Inheritedkill : Boolean = false
Set it to true if you want to remove, clean and destroy the object.
CitrusObject
  maxSubSteps : uint = 1
maxSubSteps the maximum number of steps that AwayPhysics is allowed to take each time you call it.
AwayPhysics
 Inheritedname : String
A name to identify easily an objet.
CitrusObject
 InheritedoffsetX : Number
[read-only]
APhysicsEngine
 InheritedoffsetY : Number
[read-only]
APhysicsEngine
 InheritedparallaxX : Number
[read-only]
APhysicsEngine
 InheritedparallaxY : Number
[read-only]
APhysicsEngine
 InheritedrealDebugView : *
[read-only]
APhysicsEngine
 Inheritedregistration : String
[read-only]
APhysicsEngine
 Inheritedrotation : Number
[read-only]
APhysicsEngine
  timeStep : Number
timeStep the amount of time to simulate, this should not vary.
AwayPhysics
 Inheritedtouchable : Boolean
APhysicsEngine
 Inheritedtype : String = classicObject
Added to the CE's render list via the State and the add method.
CitrusObject
 InheritedupdateCallEnabled : Boolean = false
This property prevent the update method to be called by the enter frame, it will save performances.
CitrusObject
 Inheritedvelocity : Array
[read-only]
APhysicsEngine
 Inheritedview : *
APhysicsEngine
 Inheritedvisible : Boolean
APhysicsEngine
 Inheritedwidth : Number
[read-only]
APhysicsEngine
  world : AWPDynamicsWorld
[read-only] Gets a reference to the actual AwayPhysics world object.
AwayPhysics
 Inheritedx : Number
[read-only]
APhysicsEngine
 Inheritedy : Number
[read-only]
APhysicsEngine
 Inheritedz : Number
[read-only]
APhysicsEngine
Protected Properties
 PropertyDefined By
 Inherited_art : ICitrusArt
APhysicsEngine
 Inherited_ce : CitrusEngine
CitrusObject
 Inherited_group : uint = 1
APhysicsEngine
 Inherited_initialized : Boolean = false
CitrusObject
 Inherited_params : Object
CitrusObject
 Inherited_realDebugView : *
APhysicsEngine
 Inherited_timeDelta : Number
The time elasped between two update call.
CitrusObject
 Inherited_touchable : Boolean = false
APhysicsEngine
 Inherited_view : *
APhysicsEngine
 Inherited_visible : Boolean = false
APhysicsEngine
Public Methods
 MethodDefined By
  
AwayPhysics(name:String, params:Object = null)
Creates and initializes an AwayPhysics world.
AwayPhysics
  
destroy():void
[override]
AwayPhysics
 Inherited
APhysicsEngine
 Inherited
APhysicsEngine
 Inherited
handleArtReady(citrusArt:ICitrusArt):void
APhysicsEngine
  
initialize(poolObjectParams:Object = null):void
[override]
AwayPhysics
 Inherited
setParams(object:Object, params:Object):void
The initialize method usually calls this.
CitrusObject
 Inherited
toString():String
CitrusObject
  
update(timeDelta:Number):void
[override] This is where the time step of the physics world occurs.
AwayPhysics
Property Detail
fixedTimeStepproperty
public var fixedTimeStep:Number

fixedTimeStep is the size of that internal step.

gravityproperty 
gravity:Vector3D

Change the gravity of the world.


Implementation
    public function get gravity():Vector3D
    public function set gravity(value:Vector3D):void
maxSubStepsproperty 
public var maxSubSteps:uint = 1

maxSubSteps the maximum number of steps that AwayPhysics is allowed to take each time you call it.

timeStepproperty 
public var timeStep:Number

timeStep the amount of time to simulate, this should not vary.

worldproperty 
world:AWPDynamicsWorld  [read-only]

Gets a reference to the actual AwayPhysics world object.


Implementation
    public function get world():AWPDynamicsWorld
Constructor Detail
AwayPhysics()Constructor
public function AwayPhysics(name:String, params:Object = null)

Creates and initializes an AwayPhysics world.

Parameters
name:String
 
params:Object (default = null)
Method Detail
destroy()method
override public function destroy():void

initialize()method 
override public function initialize(poolObjectParams:Object = null):void

Parameters

poolObjectParams:Object (default = null)

update()method 
override public function update(timeDelta:Number):void

This is where the time step of the physics world occurs.

Parameters

timeDelta:Number