📜 ⬆️ ⬇️

Box2D - Physics movement cars do it yourself

Greetings to all readers Habra. In this topic I will try to show you how easy it is to create a simple physics of the movement of the front and all-wheel drive car. So let's go!

Introduction


I will say right away that I am not yet familiar enough with all the concepts of physics, but I understand what they are, so do not wait for clever words, I will try to describe everything in the most understandable and human language, excuse me in advance.
The impetus for writing this article is the lack of a working analogue. At that moment when I needed to do this, I just googled one more - less normal example , which, unfortunately, was not interesting for me for some reason:
  1. Total lack of drift / slip
  2. Different speeds when moving along the X and Y axes (it is not known what caused this, but I don’t need this)


Training


So what we know. And we know that when driving a car (and in our case, the wheels), some forces act. For our simple project, naturally, some of these forces can be neglected (we are not doing a full-fledged simulator).
All parameters we will use:
  1. Thrust force (it will also be speed and acceleration)
  2. Longitudinal wheel friction
  3. Wheel friction

We will apply all these forces directly to the objects of the wheels.
When moving forward graphically, these forces can be depicted as follows (for the front of the car in the pictures to take the top):
image
X axis - transverse wheel friction
Y-axis down - longitudinal wheel friction
Y-axis up - speed and acceleration
All axes described above are always relative to the center of each wheel and its angle of rotation.
')

Write the code


As a physics engine, I chose Box2D. To make the code easier to write, I decided to use the QuickBox2D wrapper, because it greatly simplifies the creation of box2D primitives.

We connect the necessary classes :
  1. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  2. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  3. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  4. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  5. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  6. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  7. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;

... and create our world:
  1. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  2. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  3. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  4. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  5. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //


Register the necessary variables or constants :
  1. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  2. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  3. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  4. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  5. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  6. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  7. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  8. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  9. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  10. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  11. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  12. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  13. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  14. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  15. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  16. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  17. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  18. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  19. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  20. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  21. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  22. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  23. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  24. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  25. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  26. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  27. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  28. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  29. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  30. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  31. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  32. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  33. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -


Create a car with wheels :
  1. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  2. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  3. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  4. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  5. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  6. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  7. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  8. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  9. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  10. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  11. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  12. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  13. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  14. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  15. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  16. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  17. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  18. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  19. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  20. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  21. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  22. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  23. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  24. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  25. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  26. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  27. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  28. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  29. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  30. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  31. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  32. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  33. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  34. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  35. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  36. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  37. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  38. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  39. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  40. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  41. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  42. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  43. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  44. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  45. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  46. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  47. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  48. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  49. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  50. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  51. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  52. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  53. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  54. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  55. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  56. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  57. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  58. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  59. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  60. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  61. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  62. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  63. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  64. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  65. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  66. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  67. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  68. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  69. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  70. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  71. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  72. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  73. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  74. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  75. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  76. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  77. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  78. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  79. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  80. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  81. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  82. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  83. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  84. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  85. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  86. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  87. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  88. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  89. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  90. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  91. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  92. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  93. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  94. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  95. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  96. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  97. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  98. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  99. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  100. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  101. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  102. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  103. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  104. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  105. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  106. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  107. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  108. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  109. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  110. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  111. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  112. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  113. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  114. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  115. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  116. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  117. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  118. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  119. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  120. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  121. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;


Well, we created our car. It looks something like the image above, but only it will be rotated 90% clockwise.
Now we face the main task: to teach our cars to drive. To achieve the driving effect, we will apply ApplyForce (..) to the right wheels (front wheels - front wheels. For full wheels - all wheels)
To calculate and control auto physics, we use accelerate () and call it every time the world is updated:
  1. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  2. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  3. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  4. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  5. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  6. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  7. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  8. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  9. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  10. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  11. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  12. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  13. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  14. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  15. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  16. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  17. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  18. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  19. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  20. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  21. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  22. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  23. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  24. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  25. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  26. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  27. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  28. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  29. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  30. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  31. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  32. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  33. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  34. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  35. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  36. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  37. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  38. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  39. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  40. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  41. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  42. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  43. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  44. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  45. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  46. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  47. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  48. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;


Well, actually the procedure itself accelerate () (parse line by line, the full procedure code will be later):
1) First we wake up our bodies.
  1. this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;
  2. this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;
  3. this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;


2) Then we will add the necessary friction forces (common, X and Y) so that the car moves forward and does not slip during a sharp turn, and when moving by inertia, it slows down:
  1. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  2. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  3. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  4. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  5. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  6. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  7. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  8. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  9. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  10. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  11. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  12. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  13. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  14. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;


3) setLinearDamping () and setAngularDamping ()
  1. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  2. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  3. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  4. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  5. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  6. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  7. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  8. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  9. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  10. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  11. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  12. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  13. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  14. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  15. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  16. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  17. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  18. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }


4) Well, in my opinion, the most interesting procedure is addFriction () , the implementation of which I have been searching for and not finding for so long, and I've implemented it myself:
  1. function addFriction ( targetBody: b2Body, isFront: Number )
  2. {
  3. var spd, spd2: b2Vec2;
  4. spd = targetBody. GetLinearVelocity ( ) ;
  5. spd2 = targetBody. GetLocalVector ( spd ) ;
  6. if ( this ._privod == FWD ) { // front-wheel drive
  7. if ( isFront == 1 ) {
  8. spd2. y = spd2. y * 0.5 ;
  9. }
  10. else {
  11. spd2. y = spd2. y > 2.5 ? spd2. y * 0.45 : 0 ;
  12. }
  13. spd = targetBody. GetWorldVector ( spd2 ) ;
  14. targetBody. SetLinearVelocity ( spd ) ;
  15. }
  16. if ( this ._privod == RWD ) {
  17. if ( isFront == 1 ) {
  18. spd2. y = 0 ;
  19. spd2. x = spd2. x * .9;
  20. spd = targetBody. GetWorldVector ( spd2 ) ;
  21. targetBody. SetLinearVelocity ( spd ) ;
  22. }
  23. else {
  24. spd2. y = spd2. y > 2.5 ? spd2. y * 0.25 : 0 ;
  25. spd = targetBody. GetWorldVector ( spd2 ) ;
  26. targetBody. SetLinearVelocity ( spd ) ;
  27. }
  28. }
  29. }

This procedure decomposes the global velocity vector spd on each wheel to the local spd2 and applies friction on X and Y. The only moment that does not fit in my head is this, why are the axes rotated 90% clockwise? That is, in order to wean the auto slide and add friction along the X axis which I sketched above, we now have to add friction to the Y axis (it is also the transverse friction of the wheel).

5) We continue to complement accelerate () , calculate the angles by which we will then apply the forces of speed and acceleration (for the front wheels):
  1. var carAngle: Number = this ._carBody. body GetAngle ( ) ;
  2. if ( this . steer ! = 0 ) { // when driving forward
  3. this ._steerAngle = this ._steerAngle + this . steer * this ._steeringAcceleration;
  4. }
  5. if ( this ._steerAngle > carAngle + this ._steeringRange ) {
  6. this ._steerAngle = carAngle + this ._steeringRange;
  7. }
  8. else if ( this ._steerAngle < carAngle - this ._steeringRange ) {
  9. this ._steerAngle = carAngle - this ._steeringRange;
  10. }
  11. if ( this . drive < 0 ) { // when driving back
  12. if ( this . steer == 0 ) {
  13. this ._steerAngle = carAngle;
  14. }
  15. else if ( this . steer == - 1 ) {
  16. this ._steerAngle = carAngle - this ._steeringRange;
  17. }
  18. else if ( this . steer == 1 ) {
  19. this ._steerAngle = carAngle + this ._steeringRange;
  20. }
  21. }
  22. if ( this . steer == 0 ) {
  23. this ._steerAngle = carAngle;
  24. }


6) turn the front wheels:
  1. this ._frontAxisBodyLeft. body SetXForm ( _frontAxisBodyLeft. Body . GetXForm ( ) . Position , this ._steerAngle ) ;
  2. this ._frontAxisBodyRight. body SetXForm ( _frontAxisBodyRight. Body . GetXForm ( ) . Position , this ._steerAngle ) ;


7) Well, depending on the drive, apply the necessary force to the right wheels:
  1. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  2. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  3. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  4. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  5. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  6. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  7. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  8. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  9. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  10. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  11. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  12. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  13. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  14. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  15. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  16. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  17. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  18. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  19. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  20. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  21. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  22. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  23. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  24. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  25. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  26. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  27. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  28. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  29. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  30. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  31. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  32. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  33. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  34. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  35. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  36. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  37. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  38. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  39. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  40. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  41. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  42. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  43. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  44. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  45. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  46. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  47. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  48. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  49. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  50. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  51. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  52. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }


8) The final touch:
  1. public function get speed ( ) : Number {
  2. return this ._carBody. body GetLinearVelocity ( ) . Length ( ) ;
  3. }


Total


As a result, we get something like this:
Demo-swf on people.ru
Demo on megaswf.com (preferably in fullscreen)

ps Full code for some reason, lay out a little later.

Source: https://habr.com/ru/post/124704/


All Articles