Box2D - рдЕрдкрдиреЗ рдЖрдк рдСрдЯреЛ рдЖрдВрджреЛрд▓рди рдХреА рднреМрддрд┐рдХреА

рд╣реЗрдмрд░ рдХреЗ рд╕рднреА рдкрд╛рдардХреЛрдВ рдХреЛ рдирдорд╕реНрдХрд╛рд░ред рдЗрд╕ рд╡рд┐рд╖рдп рдореЗрдВ, рдореИрдВ рдЖрдкрдХреЛ рдпрд╣ рджрд┐рдЦрд╛рдиреЗ рдХреА рдХреЛрд╢рд┐рд╢ рдХрд░реВрдВрдЧрд╛ рдХрд┐ рд╕рд╛рдордиреЗ рд╡рд╛рд▓реЗ рдХреЗ рдЖрдВрджреЛрд▓рди рдХреЗ рд╕рд░рд▓ рднреМрддрд┐рдХреА рдХреЛ рдмрдирд╛рдиреЗ рдореЗрдВ рдХрд┐рддрдирд╛ рдЖрд╕рд╛рди рд╣реИ- рдФрд░ рдСрд▓-рд╡реНрд╣реАрд▓ рдбреНрд░рд╛рдЗрд╡ рдХрд╛рд░ред рддреЛ рдЪрд▓рд┐рдП!

рдкреНрд░рд╡рд┐рд╖реНрдЯрд┐


рдореБрдЭреЗ рддреБрд░рдВрдд рдпрд╣ рдХрд╣рдирд╛ рд╣реЛрдЧрд╛ рдХрд┐ рдореИрдВ рдЕрднреА рддрдХ рднреМрддрд┐рдХреА рдХреА рд╕рднреА рдЕрд╡рдзрд╛рд░рдгрд╛рдУрдВ рд╕реЗ рдкрд░рд┐рдЪрд┐рдд рдирд╣реАрдВ рд╣реВрдВ, рд▓реЗрдХрд┐рди рдореИрдВ рд╕рдордЭрддрд╛ рд╣реВрдВ рдХрд┐ рд╡реЗ рдХреНрдпрд╛ рд╣реИрдВ, рдЗрд╕рд▓рд┐рдП рдореБрдЭреЗ рд╕реНрдорд╛рд░реНрдЯ рд╢рдмреНрджреЛрдВ рдХреА рдЙрдореНрдореАрдж рдирд╣реАрдВ рд╣реИ, рдореИрдВ рд╕рдмрд╕реЗ рдЕрдзрд┐рдХ рд╕рдордЭрдиреЗ рдпреЛрдЧреНрдп рдФрд░ рдорд╛рдирд╡реАрдп рднрд╛рд╖рд╛ рдореЗрдВ рд╕рдм рдХреБрдЫ рд╡рд░реНрдгрди рдХрд░рдиреЗ рдХрд╛ рдкреНрд░рдпрд╛рд╕ рдХрд░рддрд╛ рд╣реВрдВ, рдореБрдЭреЗ рдЕрдЧреНрд░рд┐рдо рдореЗрдВ рдХреНрд╖рдорд╛ рдХрд░реЗрдВред
рдЗрд╕ рд▓реЗрдЦ рдХреЛ рд▓рд┐рдЦрдиреЗ рдХреЗ рд▓рд┐рдП рдкреНрд░реЗрд░рдгрд╛ рдПрдХ рдХрд╛рдо рдХреЗ рдПрдирд╛рд▓реЙрдЧ рдХреА рдХрдореА рд╣реИред рдЙрд╕ рдХреНрд╖рдг рдЬрдм рдореБрдЭреЗ рдРрд╕рд╛ рдХрд░рдиреЗ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рдереА, рдореИрдВрдиреЗ рдХреЗрд╡рд▓ рдПрдХ рдпрд╛ рдХрдо рд╕рд╛рдорд╛рдиреНрдп рдЙрджрд╛рд╣рд░рдг рдХреЛ рдЧреБрдЧрд▓рд╛рдпрд╛ , рдЬреЛ рджреБрд░реНрднрд╛рдЧреНрдп рд╕реЗ, рдХрд┐рд╕реА рдХрд╛рд░рдг рд╕реЗ рдореЗрд░реЗ рд▓рд┐рдП рджрд┐рд▓рдЪрд╕реНрдк рдирд╣реАрдВ рдерд╛:
  1. рдмрд╣рд╛рд╡ / рдкрд░реНрдЪреА рдХреА рдХреБрд▓ рдХрдореА
  2. рдПрдХреНрд╕ рдФрд░ рд╡рд╛рдИ рдХреБрд▓реНрд╣рд╛рдбрд╝рд┐рдпреЛрдВ рдХреЗ рд╕рд╛рде рдЪрд▓рддреЗ рд╕рдордп рдЕрд▓рдЧ-рдЕрд▓рдЧ рдЧрддрд┐ (рдпрд╣ рдЬреНрдЮрд╛рдд рдирд╣реАрдВ рд╣реИ рдХрд┐ рдЗрд╕рдХрд╛ рдХреНрдпрд╛ рдХрд╛рд░рдг рд╣реИ, рд▓реЗрдХрд┐рди рдореБрдЭреЗ рдЗрд╕рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рдирд╣реАрдВ рд╣реИ)


рдЯреНрд░реЗрдирд┐рдВрдЧ


рддреЛ рд╣рдореЗрдВ рдХреНрдпрд╛ рдкрддрд╛ред рд▓реЗрдХрд┐рди рд╣рдо рдЬрд╛рдирддреЗ рд╣реИрдВ рдХрд┐ рдЬрдм рдПрдХ рдХрд╛рд░ рдкрд░ (рдФрд░ рдкрд╣рд┐рдпреЛрдВ рдкрд░ рд╣рдорд╛рд░реЗ рдорд╛рдорд▓реЗ рдореЗрдВ) рдбреНрд░рд╛рдЗрд╡рд┐рдВрдЧ рдХрд░рддреЗ рд╣реИрдВ, рддреЛ рдХреБрдЫ рдмрд▓ рдХрд╛рд░реНрдп рдХрд░рддреЗ рд╣реИрдВред рд╣рдорд╛рд░реА рд╕рд░рд▓ рдкрд░рд┐рдпреЛрдЬрдирд╛ рдХреЗ рд▓рд┐рдП, рд╕реНрд╡рд╛рднрд╛рд╡рд┐рдХ рд░реВрдк рд╕реЗ, рдЗрдирдореЗрдВ рд╕реЗ рдХреБрдЫ рддрд╛рдХрддреЛрдВ рдХреА рдЙрдкреЗрдХреНрд╖рд╛ рдХреА рдЬрд╛ рд╕рдХрддреА рд╣реИ (рд╣рдо рдПрдХ рдкреВрд░реНрдг рд╕рд┐рдореНрдпреБрд▓реЗрдЯрд░ рдирд╣реАрдВ рдХрд░ рд░рд╣реЗ рд╣реИрдВ)ред
рд╕рднреА рдкреИрд░рд╛рдореАрдЯрд░ рдЬреЛ рд╣рдо рдЙрдкрдпреЛрдЧ рдХрд░реЗрдВрдЧреЗ:
  1. рдХрд░реНрд╖рдг рдмрд▓ (рдпрд╣ рдпрд╣рд╛рдБ рдЧрддрд┐ рдФрд░ рддреНрд╡рд░рдг рд╣реЛрдЧрд╛)
  2. рдкрд╣рд┐рдП рдХрд╛ рдЕрдиреБрджреИрд░реНрдзреНрдп рдШрд░реНрд╖рдг
  3. рдкрд╣рд┐рдпрд╛ рдШрд░реНрд╖рдг

рдЗрди рд╕рднреА рдмрд▓реЛрдВ рдХреЛ рд╣рдо рд╕реАрдзреЗ рдкрд╣рд┐рдпреЛрдВ рдХреА рд╡рд╕реНрддреБрдУрдВ рдкрд░ рд▓рд╛рдЧреВ рдХрд░реЗрдВрдЧреЗред
рдЬрдм рдЧреНрд░рд╛рдлрд┐рдХ рд░реВрдк рд╕реЗ рдЖрдЧреЗ рдмрдврд╝рддреЗ рд╣реИрдВ, рддреЛ рдЗрди рдмрд▓реЛрдВ рдХрд╛ рдкреНрд░рддрд┐рдирд┐рдзрд┐рддреНрд╡ рдирд┐рдореНрди рдкреНрд░рдХрд╛рд░ рд╕реЗ рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ (рдЪрд┐рддреНрд░реЛрдВ рдореЗрдВ рдХрд╛рд░ рдХреЗ рд╕рд╛рдордиреЗ рдХреЗ рд▓рд┐рдП рд╢реАрд░реНрд╖ рд▓реЗрдВ):
рдЫрд╡рд┐
рдПрдХреНрд╕ рдЕрдХреНрд╖ - рдкрд╣рд┐рдпрд╛ рдХрд╛ рдЕрдиреБрдкреНрд░рд╕реНрде рдШрд░реНрд╖рдг
Y рдЕрдХреНрд╖ рдиреАрдЪреЗ - рдкрд╣рд┐рдпрд╛ рдХрд╛ рдЕрдиреБрджреИрд░реНрдзреНрдп рдШрд░реНрд╖рдг
Y рдЕрдХреНрд╖ рдКрдкрд░ - рдЧрддрд┐ рдФрд░ рддреНрд╡рд░рдг
рдЙрдкрд░реЛрдХреНрдд рд╕рднреА рдХреБрд▓реНрд╣рд╛рдбрд╝рд┐рдпрд╛рдБ рд╣рдореЗрд╢рд╛ рдкреНрд░рддреНрдпреЗрдХ рдкрд╣рд┐рдпрд╛ рдХреЗ рдХреЗрдВрджреНрд░ рдФрд░ рдЙрд╕рдХреЗ рд░реЛрдЯреЗрд╢рди рдХреЗ рдХреЛрдг рдХреЗ рд╕рд╛рдкреЗрдХреНрд╖ рд╣реЛрддреА рд╣реИрдВред

рдПрдХ рдХреЛрдб рд▓рд┐рдЦрдирд╛


рдПрдХ рднреМрддрд┐рдХ рдЗрдВрдЬрди рдХреЗ рд░реВрдк рдореЗрдВ, рдореИрдВрдиреЗ Box2D рдХреЛ рдЪреБрдирд╛ред рдХреЛрдб рд▓рд┐рдЦрдирд╛ рдЖрд╕рд╛рди рдмрдирд╛рдиреЗ рдХреЗ рд▓рд┐рдП, рдореИрдВрдиреЗ рдХреНрд╡рд┐рдХрдмреЙрдХреНрд╕ 2 рдбреА рд░реИрдкрд░ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдиреЗ рдХрд╛ рдирд┐рд░реНрдгрдп рд▓рд┐рдпрд╛, рдХреНрдпреЛрдВрдХрд┐ рдпрд╣ рдмреЙрдХреНрд╕ 2 рдбреА рдореЗрдВ рдкреНрд░рд╛рдЗрдореЗрдЯреАрд╡ рдмрдирд╛рдиреЗ рдореЗрдВ рдмрд╣реБрдд рдЖрд╕рд╛рди рдмрдирд╛рддрд╛ рд╣реИред

рд╣рдо рдЖрд╡рд╢реНрдпрдХ рд╡рд░реНрдЧреЛрдВ рдХреЛ рдЬреЛрдбрд╝рддреЗ рд╣реИрдВ :
  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 . * ;

... рдФрд░ рд╣рдорд╛рд░реА рджреБрдирд┐рдпрд╛ рдмрдирд╛рдПрдБ:
  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 ( ) ; //


рд╣рдо рдЖрд╡рд╢реНрдпрдХ рдЪрд░ рдпрд╛ рд╕реНрдерд┐рд░рд╛рдВрдХ рд▓рд┐рдЦрддреЗ рд╣реИрдВ :
  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 -


рд╣рдо рдкрд╣рд┐рдпреЛрдВ рдХреЗ рд╕рд╛рде рдПрдХ рдХрд╛рд░ рдмрдирд╛рддреЗ рд╣реИрдВ :
  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 } ) ;


рдЦреИрд░, рд╣рдордиреЗ рдЕрдкрдиреА рдХрд╛рд░ рдмрдирд╛рдИред рдЗрд╕рдХреА рдЙрдкрд╕реНрдерд┐рддрд┐ рд▓рдЧрднрдЧ рдКрдкрд░ рдХреА рддрд╕реНрд╡реАрд░ рдХреЗ рд╕рдорд╛рди рд╣реИ, рд▓реЗрдХрд┐рди рдХреЗрд╡рд▓ рдЗрд╕реЗ 90% рджрдХреНрд╖рд┐рдгрд╛рд╡рд░реНрдд рдШреБрдорд╛рдпрд╛ рдЬрд╛рдПрдЧрд╛ред
рдЕрдм рд╣рдорд╛рд░реЗ рдкрд╛рд╕ рдореБрдЦреНрдп рдХрд╛рд░реНрдп рд╣реИ: рдЕрдкрдиреА рдХрд╛рд░ рдХреЛ рдЪрд▓рд╛рдирд╛ рд╕рд┐рдЦрд╛рдиреЗ рдХреЗ рд▓рд┐рдПред рдбреНрд░рд╛рдЗрд╡рд┐рдВрдЧ рдкреНрд░рднрд╛рд╡ рдХреЛ рдкреНрд░рд╛рдкреНрдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, рд╣рдо ApplyForce (..) рдХреЛ рдЖрд╡рд╢реНрдпрдХ рдкрд╣рд┐рдпреЛрдВ (рдлреНрд░рдВрдЯ-рд╡реНрд╣реАрд▓ рдбреНрд░рд╛рдЗрд╡ - рдлреНрд░рдВрдЯ рд╡реНрд╣реАрд▓ рдХреЗ рд▓рд┐рдП ) рдХреЛ рд▓рд╛рдЧреВ рдХрд░реЗрдВрдЧреЗред рдкреВрд░реНрдг-рд╡реНрд╣реАрд▓ рдбреНрд░рд╛рдЗрд╡ рдХреЗ рд▓рд┐рдП - рд╕рднреА рдкрд╣рд┐рдпреЛрдВ)
рдХрд╛рд░реЛрдВ рдХреА рднреМрддрд┐рдХреА рдХреА рдЧрдгрдирд╛ рдХрд░рдиреЗ рдФрд░ рдЙрдиреНрд╣реЗрдВ рдирд┐рдпрдВрддреНрд░рд┐рдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, рд╣рдо рдЧрддрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддреЗ рд╣реИрдВ () рдФрд░ рд╣рд░ рдмрд╛рд░ рджреБрдирд┐рдпрд╛ рдХреЗ рдЕрдкрдбреЗрдЯ рд╣реЛрдиреЗ рдкрд░ рдЗрд╕реЗ рдХреЙрд▓ рдХрд░рддреЗ рд╣реИрдВ:
  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 } ; } ;


рдареАрдХ рд╣реИ, рд╡рд╛рд╕реНрддрд╡ рдореЗрдВ рдЧрддрд┐ () рдкреНрд░рдХреНрд░рд┐рдпрд╛ рд╣реА (рд╣рдо рдЗрд╕реЗ рд▓рд╛рдЗрди рджреНрд╡рд╛рд░рд╛ рдкрдВрдХреНрддрд┐рдмрджреНрдз рдХрд░рддреЗ рд╣реИрдВ, рдкреВрд░реНрдг рдкреНрд░рдХреНрд░рд┐рдпрд╛ рдХреЛрдб рдмрд╛рдж рдореЗрдВ рд╣реЛрдЧрд╛):
1) рд╕рдмрд╕реЗ рдкрд╣рд▓реЗ рд╣рдо рдЕрдкрдиреЗ рд╢рд░реАрд░ рдХреЛ рдЬрдЧрд╛рддреЗ рд╣реИрдВ
  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) рдлрд┐рд░ рд╣рдо рдЖрд╡рд╢реНрдпрдХ рдШрд░реНрд╖рдг рдмрд▓реЛрдВ рдХреЛ рдЬреЛрдбрд╝рддреЗ рд╣реИрдВ (рдХреБрд▓, рдПрдХреНрд╕ рдореЗрдВ, рдФрд░ рд╡рд╛рдИ рдореЗрдВ) рддрд╛рдХрд┐ рдХрд╛рд░ рдЖрдЧреЗ рдмрдврд╝реЗ рдФрд░ рдПрдХ рддреЗрдЬ рдореЛрдбрд╝ рдХреЗ рджреМрд░рд╛рди рдлрд┐рд╕рд▓ рди рдЬрд╛рдП, рдФрд░ рдЬрдбрд╝рддрд╛ рд╕реЗ рдЪрд▓рддреЗ рд╕рдордп рдпрд╣ рдзреАрдорд╛ рд╣реЛ рдЬрд╛рддрд╛ рд╣реИ:
  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) setLearearDamping () рдФрд░ 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) рдареАрдХ рд╣реИ, рдореЗрд░реА рд░рд╛рдп рдореЗрдВ, рд╕рдмрд╕реЗ рджрд┐рд▓рдЪрд╕реНрдк рдПрдбрд┐рдХреНрд╢рди () рдкреНрд░рдХреНрд░рд┐рдпрд╛, рдЬрд┐рд╕ рдХрд╛рд░реНрдпрд╛рдиреНрд╡рдпрди рдХреЗ рд▓рд┐рдП рдореИрдВрдиреЗ рдЦреЛрдЬ рдХреА рдФрд░ рдЗрддрдиреЗ рд▓рдВрдмреЗ рд╕рдордп рддрдХ рдореБрдЭреЗ рдирд╣реАрдВ рдорд┐рд▓рд╛, рдФрд░ рдЕрдм рдореИрдВрдиреЗ рдЗрд╕реЗ рд╕реНрд╡рдпрдВ рд▓рд╛рдЧреВ рдХрд┐рдпрд╛:
  1. рдлрд╝рдВрдХреНрд╢рди рдЬреЛрдбрд╝рдиреЗ рдХрд╛ рдХрд╛рд░реНрдп ( рд▓рдХреНрд╖реНрдп: b2Body, isFront: рд╕рдВрдЦреНрдпрд╛ )
  2. {
  3. var spd, spd2: b2Vec2;
  4. spd = targetBodyред GetLinearVelocity ( ) ;
  5. spd2 = targetBodyред GetLocalVector ( spd ) ;
  6. if ( рдпрд╣ ._privod == FWD ) { // рдлреНрд░рдВрдЯ-рд╡реНрд╣реАрд▓ рдбреНрд░рд╛рдЗрд╡
  7. рдЕрдЧрд░ ( isFront == 1 ) {
  8. spd2ред y = spd2ред y * 0.5 ;
  9. }
  10. рдФрд░ {
  11. spd2ред y = spd2ред y > 2.5 ? spd2ред y * 0.45 : 0 ;
  12. }
  13. spd = targetBodyред GetWorldVector ( spd2 ) ;
  14. targetBodyред рд╕реЗрдЯрд▓рд╛рдЗрдирд┐рдпрд░ рд╡реЗрд▓реЛрд╕рд┐рдЯреА ( spd ) ;
  15. }
  16. рдЕрдЧрд░ ( рдпрд╣ ._privod == RWD ) {
  17. рдЕрдЧрд░ ( isFront == 1 ) {
  18. spd2ред y = 0 ;
  19. spd2ред x = spd2ред x * .9;
  20. spd = targetBodyред GetWorldVector ( spd2 ) ;
  21. targetBodyред рд╕реЗрдЯрд▓рд╛рдЗрдирд┐рдпрд░ рд╡реЗрд▓реЛрд╕рд┐рдЯреА ( spd ) ;
  22. }
  23. рдФрд░ {
  24. spd2ред y = spd2ред y > 2.5 ? spd2ред y * 0.25 : 0 ;
  25. spd = targetBodyред GetWorldVector ( spd2 ) ;
  26. targetBodyред рд╕реЗрдЯрд▓рд╛рдЗрдирд┐рдпрд░ рд╡реЗрд▓реЛрд╕рд┐рдЯреА ( spd ) ;
  27. }
  28. }
  29. }

рдпрд╣ рдкреНрд░рдХреНрд░рд┐рдпрд╛ рдкреНрд░рддреНрдпреЗрдХ рдкрд╣рд┐рдпрд╛ рдХреЗ рд▓рд┐рдП рд╡реИрд╢реНрд╡рд┐рдХ рд╡реЗрдЧ рд╡реЗрдХреНрдЯрд░ spd2 рдХреЛ рд╕реНрдерд╛рдиреАрдп spd2 рдореЗрдВ рдШрдЯрд╛рддреА рд╣реИ рдФрд░ X рдФрд░ Y рдХреЗ рд╕рд╛рде рдШрд░реНрд╖рдг рдХреЛ рд▓рд╛рдЧреВ рдХрд░рддреА рд╣реИред рдХреЗрд╡рд▓ рдПрдХ рдЪреАрдЬ рдЬреЛ рдореЗрд░реЗ рд╕рд┐рд░ рдореЗрдВ рдлрд┐рдЯ рдирд╣реАрдВ рд╣реЛрддреА рд╣реИ, рдХреБрд▓реНрд╣рд╛рдбрд╝рд┐рдпреЛрдВ рдХреЛ 90% рджрдХреНрд╖рд┐рдгрд╛рд╡рд░реНрдд рдХреНрдпреЛрдВ рдШреБрдорд╛рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ? рдпрд╣реА рд╣реИ, рдХрд╛рд░ рдХреЛ рдлрд┐рд╕рд▓рдиреЗ рд╕реЗ рдмрдЪрд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдФрд░ рдПрдХреНрд╕ рдЕрдХреНрд╖ рдХреЗ рд╕рд╛рде рдШрд░реНрд╖рдг рдХреЛ рдЬреЛрдбрд╝рдиреЗ рдХреЗ рд▓рд┐рдП рдЬрд┐рд╕реЗ рдореИрдВрдиреЗ рдЕрдм рдКрдкрд░ рд╕реНрдХреЗрдЪ рдХрд┐рдпрд╛ рд╣реИ рд╣рдореЗрдВ рд╡рд╛рдИ рдЕрдХреНрд╖ рдкрд░ рдШрд░реНрд╖рдг рдЬреЛрдбрд╝рдирд╛ рд╣реИ (рдпрд╣ рдкрд╣рд┐рдпрд╛ рдХрд╛ рдЕрдиреБрдкреНрд░рд╕реНрде рдШрд░реНрд╖рдг рднреА рд╣реИ)ред

5) рд╣рдо рддреЗрдЬреА рдХреЛ рдкреВрд░рдХ рдХрд░рдирд╛ рдЬрд╛рд░реА рд░рдЦрддреЗ рд╣реИрдВ () , рдЙрди рдХреЛрдгреЛрдВ рдХреА рдЧрдгрдирд╛ рдХрд░реЗрдВ, рдЬрд┐рди рдкрд░ рд╣рдо рдлрд┐рд░ рдЧрддрд┐ рдФрд░ рддреНрд╡рд░рдг рдХреА рддрд╛рдХрддреЛрдВ рдХреЛ рд▓рд╛рдЧреВ рдХрд░реЗрдВрдЧреЗ (рд╕рд╛рдордиреЗ рдХреЗ рдкрд╣рд┐рдпреЛрдВ рдХреЗ рд▓рд┐рдП):
  1. var carAngle: рд╕рдВрдЦреНрдпрд╛ = рдпрд╣ ._рдХрд╛рд░рдмреЙрдбреАред рд╢рд░реАрд░ ред GetAngle ( ) ;
  2. рдЕрдЧрд░ ( рдпрд╣ рд╕реНрдЯреАрдпрд░ ! = 0 ) { // рдЖрдЧреЗ рдЧрд╛рдбрд╝реА рдЪрд▓рд╛рддреЗ рд╕рдордп
  3. this ._steerAngle = this ._steerAngle + рдпрд╣ ред рд╕реНрдЯреАрдпрд░ * рдЗрд╕ ._steeringAcceleration;
  4. }
  5. рдЕрдЧрд░ ( рдпрд╣ ред_steerAngle > carAngle + this ._steeringRange ) {
  6. this ._steerAngle = carAngle + this ._steeringRange;
  7. }
  8. рдФрд░ рдЕрдЧрд░ ( рдпрд╣ред рдЬрд▓реНрджрдмрд╛рдЬрд╝реА < carAngle - рдпрд╣ред рдЬрд▓реНрджрдмрд╛рдЬрд╝реА ) {
  9. this ._steerAngle = carAngle - рдпрд╣ ._steeringRange;
  10. }
  11. рдЕрдЧрд░ ( рдпрд╣ рдбреНрд░рд╛рдЗрд╡ < 0 ) { // рдЬрдм рд╡рд╛рдкрд╕ рдбреНрд░рд╛рдЗрд╡рд┐рдВрдЧ
  12. рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == 0 ) {
  13. this ._steerAngle = carAngle;
  14. }
  15. рдФрд░ рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == - 1 ) {
  16. this ._steerAngle = carAngle - рдпрд╣ ._steeringRange;
  17. }
  18. рдФрд░ рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == 1 ) {
  19. this ._steerAngle = carAngle + this ._steeringRange;
  20. }
  21. }
  22. рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == 0 ) {
  23. this ._steerAngle = carAngle;
  24. }


6) рд╕рд╛рдордиреЗ рдХреЗ рдкрд╣рд┐рдпреЛрдВ рдХреЛ рдЪрд╛рд▓реВ рдХрд░реЗрдВ:
  1. рдпрд╣ ._frontAxisBodyLeftред рд╢рд░реАрд░ ред SetXForm ( _frontAxisBodyLeftред рдмреЙрдбреА ред GetXForm ( ) ред рд╕реНрдерд┐рддрд┐ , рдпрд╣ ._steerAngle ) ;
  2. рдпрд╣ ._frontAxisBodyRight рд╢рд░реАрд░ ред рд╕реЗрдЯрдПрдХреНрд╕рдлрд╝реЙрд░реНрдо ( _frontAxisBodyRightред рд╢рд░реАрд░ ред GetXForm ( ) ред рд╕реНрдерд┐рддрд┐ , рдпрд╣ ._steerAngle ) ;


7) рдЦреИрд░, рдбреНрд░рд╛рдЗрд╡ рдХреЗ рдЖрдзрд╛рд░ рдкрд░ рд╣рдо рд╡рд╛рдВрдЫрд┐рдд рдкрд╣рд┐рдпреЛрдВ рдкрд░ рдЖрд╡рд╢реНрдпрдХ рдмрд▓реЛрдВ рдХреЛ рд▓рд╛рдЧреВ рдХрд░рддреЗ рд╣реИрдВ:
  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) рдЕрдВрддрд┐рдо рд╕реНрдкрд░реНрд╢:
  1. рд╕рд╛рд░реНрд╡рдЬрдирд┐рдХ рд╕рдорд╛рд░реЛрд╣ рдХреЛ рдЧрддрд┐ рдорд┐рд▓рддреА рд╣реИ ( ) : рдирдВрдмрд░ {
  2. рдЗрд╕реЗ рд╡рд╛рдкрд╕ рдХрд░реЗрдВ ред рд╢рд░реАрд░ ред GetLinearVelocity ( ) ред рд▓рдВрдмрд╛рдИ ( ) ;
  3. }


рдХреБрд▓ рдорд┐рд▓рд╛рдХрд░


рдкрд░рд┐рдгрд╛рдорд╕реНрд╡рд░реВрдк, рд╣рдореЗрдВ рдХреБрдЫ рдРрд╕рд╛ рдорд┐рд▓рддрд╛ рд╣реИ:
рдбреЗрдореЛ swf narod.ru рдкрд░
Megaswf.com рдкрд░ рдбреЗрдореЛ (рдЕрдзрд┐рдорд╛рдирддрдГ рдлреБрд▓рд╕реНрдХреНрд░реАрди рдореЗрдВ)

ps рдХрд┐рд╕реА рдХрд╛рд░рдг рдХреЗ рд▓рд┐рдП, рдореИрдВ рдереЛрдбрд╝рд╛ рдмрд╛рдж рдореЗрдВ рдкреВрд░реНрдг рдХреЛрдб рдкреЛрд╕реНрдЯ рдХрд░реВрдБрдЧрд╛ред

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


All Articles