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

рдПрдХреНрд╕ рдЕрдХреНрд╖ - рдкрд╣рд┐рдпрд╛ рдХрд╛ рдЕрдиреБрдкреНрд░рд╕реНрде рдШрд░реНрд╖рдг
Y рдЕрдХреНрд╖ рдиреАрдЪреЗ - рдкрд╣рд┐рдпрд╛ рдХрд╛ рдЕрдиреБрджреИрд░реНрдзреНрдп рдШрд░реНрд╖рдг
Y рдЕрдХреНрд╖ рдКрдкрд░ - рдЧрддрд┐ рдФрд░ рддреНрд╡рд░рдг
рдЙрдкрд░реЛрдХреНрдд рд╕рднреА рдХреБрд▓реНрд╣рд╛рдбрд╝рд┐рдпрд╛рдБ рд╣рдореЗрд╢рд╛ рдкреНрд░рддреНрдпреЗрдХ рдкрд╣рд┐рдпрд╛ рдХреЗ рдХреЗрдВрджреНрд░ рдФрд░ рдЙрд╕рдХреЗ рд░реЛрдЯреЗрд╢рди рдХреЗ рдХреЛрдг рдХреЗ рд╕рд╛рдкреЗрдХреНрд╖ рд╣реЛрддреА рд╣реИрдВред
рдПрдХ рдХреЛрдб рд▓рд┐рдЦрдирд╛
рдПрдХ рднреМрддрд┐рдХ рдЗрдВрдЬрди рдХреЗ рд░реВрдк рдореЗрдВ, рдореИрдВрдиреЗ Box2D рдХреЛ рдЪреБрдирд╛ред рдХреЛрдб рд▓рд┐рдЦрдирд╛ рдЖрд╕рд╛рди рдмрдирд╛рдиреЗ рдХреЗ рд▓рд┐рдП, рдореИрдВрдиреЗ
рдХреНрд╡рд┐рдХрдмреЙрдХреНрд╕ 2 рдбреА рд░реИрдкрд░ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдиреЗ рдХрд╛ рдирд┐рд░реНрдгрдп рд▓рд┐рдпрд╛, рдХреНрдпреЛрдВрдХрд┐ рдпрд╣ рдмреЙрдХреНрд╕ 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 . * ;
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 . * ;
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 . * ;
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 . * ;
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 . * ;
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 . * ;
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 . * ;
... рдФрд░ рд╣рдорд╛рд░реА рджреБрдирд┐рдпрд╛ рдмрдирд╛рдПрдБ:
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 ( ) ; //
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 ( ) ; //
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 ( ) ; //
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 ( ) ; //
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 ( ) ; //
рд╣рдо рдЖрд╡рд╢реНрдпрдХ рдЪрд░ рдпрд╛ рд╕реНрдерд┐рд░рд╛рдВрдХ рд▓рд┐рдЦрддреЗ рд╣реИрдВ :
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
// : 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 -
рд╣рдо рдкрд╣рд┐рдпреЛрдВ рдХреЗ рд╕рд╛рде рдПрдХ рдХрд╛рд░ рдмрдирд╛рддреЗ рд╣реИрдВ :
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 } ) ;
// _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 (..) рдХреЛ рдЖрд╡рд╢реНрдпрдХ рдкрд╣рд┐рдпреЛрдВ (рдлреНрд░рдВрдЯ-рд╡реНрд╣реАрд▓ рдбреНрд░рд╛рдЗрд╡ - рдлреНрд░рдВрдЯ рд╡реНрд╣реАрд▓ рдХреЗ рд▓рд┐рдП
) рдХреЛ рд▓рд╛рдЧреВ рдХрд░реЗрдВрдЧреЗред рдкреВрд░реНрдг-рд╡реНрд╣реАрд▓ рдбреНрд░рд╛рдЗрд╡ рдХреЗ рд▓рд┐рдП - рд╕рднреА рдкрд╣рд┐рдпреЛрдВ)
рдХрд╛рд░реЛрдВ рдХреА рднреМрддрд┐рдХреА рдХреА рдЧрдгрдирд╛ рдХрд░рдиреЗ рдФрд░ рдЙрдиреНрд╣реЗрдВ рдирд┐рдпрдВрддреНрд░рд┐рдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, рд╣рдо
рдЧрддрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддреЗ рд╣реИрдВ
() рдФрд░ рд╣рд░ рдмрд╛рд░ рджреБрдирд┐рдпрд╛ рдХреЗ рдЕрдкрдбреЗрдЯ рд╣реЛрдиреЗ рдкрд░ рдЗрд╕реЗ рдХреЙрд▓ рдХрд░рддреЗ рд╣реИрдВ:
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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 } ; } ;
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) рд╕рдмрд╕реЗ рдкрд╣рд▓реЗ рд╣рдо рдЕрдкрдиреЗ рд╢рд░реАрд░ рдХреЛ рдЬрдЧрд╛рддреЗ рд╣реИрдВ
this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;
this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;
this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ) ;
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 ()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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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 ; }
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) рдареАрдХ рд╣реИ, рдореЗрд░реА рд░рд╛рдп рдореЗрдВ, рд╕рдмрд╕реЗ рджрд┐рд▓рдЪрд╕реНрдк
рдПрдбрд┐рдХреНрд╢рди () рдкреНрд░рдХреНрд░рд┐рдпрд╛, рдЬрд┐рд╕ рдХрд╛рд░реНрдпрд╛рдиреНрд╡рдпрди рдХреЗ рд▓рд┐рдП рдореИрдВрдиреЗ рдЦреЛрдЬ рдХреА рдФрд░ рдЗрддрдиреЗ рд▓рдВрдмреЗ рд╕рдордп рддрдХ рдореБрдЭреЗ рдирд╣реАрдВ рдорд┐рд▓рд╛, рдФрд░ рдЕрдм рдореИрдВрдиреЗ рдЗрд╕реЗ рд╕реНрд╡рдпрдВ рд▓рд╛рдЧреВ рдХрд┐рдпрд╛:
- рдлрд╝рдВрдХреНрд╢рди рдЬреЛрдбрд╝рдиреЗ рдХрд╛ рдХрд╛рд░реНрдп ( рд▓рдХреНрд╖реНрдп: b2Body, isFront: рд╕рдВрдЦреНрдпрд╛ )
- {
- var spd, spd2: b2Vec2;
- spd = targetBodyред GetLinearVelocity ( ) ;
- spd2 = targetBodyред GetLocalVector ( spd ) ;
- if ( рдпрд╣ ._privod == FWD ) { // рдлреНрд░рдВрдЯ-рд╡реНрд╣реАрд▓ рдбреНрд░рд╛рдЗрд╡
- рдЕрдЧрд░ ( isFront == 1 ) {
- spd2ред y = spd2ред y * 0.5 ;
- }
- рдФрд░ {
- spd2ред y = spd2ред y > 2.5 ? spd2ред y * 0.45 : 0 ;
- }
- spd = targetBodyред GetWorldVector ( spd2 ) ;
- targetBodyред рд╕реЗрдЯрд▓рд╛рдЗрдирд┐рдпрд░ рд╡реЗрд▓реЛрд╕рд┐рдЯреА ( spd ) ;
- }
- рдЕрдЧрд░ ( рдпрд╣ ._privod == RWD ) {
- рдЕрдЧрд░ ( isFront == 1 ) {
- spd2ред y = 0 ;
- spd2ред x = spd2ред x * .9;
- spd = targetBodyред GetWorldVector ( spd2 ) ;
- targetBodyред рд╕реЗрдЯрд▓рд╛рдЗрдирд┐рдпрд░ рд╡реЗрд▓реЛрд╕рд┐рдЯреА ( spd ) ;
- }
- рдФрд░ {
- spd2ред y = spd2ред y > 2.5 ? spd2ред y * 0.25 : 0 ;
- spd = targetBodyред GetWorldVector ( spd2 ) ;
- targetBodyред рд╕реЗрдЯрд▓рд╛рдЗрдирд┐рдпрд░ рд╡реЗрд▓реЛрд╕рд┐рдЯреА ( spd ) ;
- }
- }
- }
рдпрд╣ рдкреНрд░рдХреНрд░рд┐рдпрд╛ рдкреНрд░рддреНрдпреЗрдХ рдкрд╣рд┐рдпрд╛ рдХреЗ рд▓рд┐рдП рд╡реИрд╢реНрд╡рд┐рдХ рд╡реЗрдЧ рд╡реЗрдХреНрдЯрд░
spd2 рдХреЛ рд╕реНрдерд╛рдиреАрдп
spd2 рдореЗрдВ
рдШрдЯрд╛рддреА рд╣реИ рдФрд░ X рдФрд░ Y рдХреЗ рд╕рд╛рде рдШрд░реНрд╖рдг рдХреЛ рд▓рд╛рдЧреВ рдХрд░рддреА рд╣реИред рдХреЗрд╡рд▓ рдПрдХ рдЪреАрдЬ рдЬреЛ рдореЗрд░реЗ рд╕рд┐рд░ рдореЗрдВ рдлрд┐рдЯ рдирд╣реАрдВ рд╣реЛрддреА рд╣реИ, рдХреБрд▓реНрд╣рд╛рдбрд╝рд┐рдпреЛрдВ рдХреЛ 90% рджрдХреНрд╖рд┐рдгрд╛рд╡рд░реНрдд рдХреНрдпреЛрдВ рдШреБрдорд╛рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ? рдпрд╣реА рд╣реИ, рдХрд╛рд░ рдХреЛ рдлрд┐рд╕рд▓рдиреЗ рд╕реЗ рдмрдЪрд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдФрд░ рдПрдХреНрд╕ рдЕрдХреНрд╖ рдХреЗ рд╕рд╛рде рдШрд░реНрд╖рдг рдХреЛ рдЬреЛрдбрд╝рдиреЗ рдХреЗ рд▓рд┐рдП рдЬрд┐рд╕реЗ рдореИрдВрдиреЗ рдЕрдм рдКрдкрд░ рд╕реНрдХреЗрдЪ рдХрд┐рдпрд╛ рд╣реИ рд╣рдореЗрдВ рд╡рд╛рдИ рдЕрдХреНрд╖ рдкрд░ рдШрд░реНрд╖рдг рдЬреЛрдбрд╝рдирд╛ рд╣реИ (рдпрд╣ рдкрд╣рд┐рдпрд╛ рдХрд╛ рдЕрдиреБрдкреНрд░рд╕реНрде рдШрд░реНрд╖рдг рднреА рд╣реИ)ред
5) рд╣рдо рддреЗрдЬреА рдХреЛ рдкреВрд░рдХ рдХрд░рдирд╛ рдЬрд╛рд░реА рд░рдЦрддреЗ рд╣реИрдВ
() , рдЙрди рдХреЛрдгреЛрдВ рдХреА рдЧрдгрдирд╛ рдХрд░реЗрдВ, рдЬрд┐рди рдкрд░ рд╣рдо рдлрд┐рд░ рдЧрддрд┐ рдФрд░ рддреНрд╡рд░рдг рдХреА рддрд╛рдХрддреЛрдВ рдХреЛ рд▓рд╛рдЧреВ рдХрд░реЗрдВрдЧреЗ (рд╕рд╛рдордиреЗ рдХреЗ рдкрд╣рд┐рдпреЛрдВ рдХреЗ рд▓рд┐рдП):
- var carAngle: рд╕рдВрдЦреНрдпрд╛ = рдпрд╣ ._рдХрд╛рд░рдмреЙрдбреАред рд╢рд░реАрд░ ред GetAngle ( ) ;
- рдЕрдЧрд░ ( рдпрд╣ рд╕реНрдЯреАрдпрд░ ! = 0 ) { // рдЖрдЧреЗ рдЧрд╛рдбрд╝реА рдЪрд▓рд╛рддреЗ рд╕рдордп
- this ._steerAngle = this ._steerAngle + рдпрд╣ ред рд╕реНрдЯреАрдпрд░ * рдЗрд╕ ._steeringAcceleration;
- }
- рдЕрдЧрд░ ( рдпрд╣ ред_steerAngle > carAngle + this ._steeringRange ) {
- this ._steerAngle = carAngle + this ._steeringRange;
- }
- рдФрд░ рдЕрдЧрд░ ( рдпрд╣ред рдЬрд▓реНрджрдмрд╛рдЬрд╝реА < carAngle - рдпрд╣ред рдЬрд▓реНрджрдмрд╛рдЬрд╝реА ) {
- this ._steerAngle = carAngle - рдпрд╣ ._steeringRange;
- }
- рдЕрдЧрд░ ( рдпрд╣ рдбреНрд░рд╛рдЗрд╡ < 0 ) { // рдЬрдм рд╡рд╛рдкрд╕ рдбреНрд░рд╛рдЗрд╡рд┐рдВрдЧ
- рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == 0 ) {
- this ._steerAngle = carAngle;
- }
- рдФрд░ рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == - 1 ) {
- this ._steerAngle = carAngle - рдпрд╣ ._steeringRange;
- }
- рдФрд░ рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == 1 ) {
- this ._steerAngle = carAngle + this ._steeringRange;
- }
- }
- рдпрджрд┐ ( рдпрд╣ ред рд╕реНрдЯреАрдпрд░ == 0 ) {
- this ._steerAngle = carAngle;
- }
6) рд╕рд╛рдордиреЗ рдХреЗ рдкрд╣рд┐рдпреЛрдВ рдХреЛ рдЪрд╛рд▓реВ рдХрд░реЗрдВ:
- рдпрд╣ ._frontAxisBodyLeftред рд╢рд░реАрд░ ред SetXForm ( _frontAxisBodyLeftред рдмреЙрдбреА ред GetXForm ( ) ред рд╕реНрдерд┐рддрд┐ , рдпрд╣ ._steerAngle ) ;
- рдпрд╣ ._frontAxisBodyRight рд╢рд░реАрд░ ред рд╕реЗрдЯрдПрдХреНрд╕рдлрд╝реЙрд░реНрдо ( _frontAxisBodyRightред рд╢рд░реАрд░ ред GetXForm ( ) ред рд╕реНрдерд┐рддрд┐ , рдпрд╣ ._steerAngle ) ;
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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 ) ) ; } }
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) рдЕрдВрддрд┐рдо рд╕реНрдкрд░реНрд╢:
- рд╕рд╛рд░реНрд╡рдЬрдирд┐рдХ рд╕рдорд╛рд░реЛрд╣ рдХреЛ рдЧрддрд┐ рдорд┐рд▓рддреА рд╣реИ ( ) : рдирдВрдмрд░ {
- рдЗрд╕реЗ рд╡рд╛рдкрд╕ рдХрд░реЗрдВ ред рд╢рд░реАрд░ ред GetLinearVelocity ( ) ред рд▓рдВрдмрд╛рдИ ( ) ;
- }
рдХреБрд▓ рдорд┐рд▓рд╛рдХрд░
рдкрд░рд┐рдгрд╛рдорд╕реНрд╡рд░реВрдк, рд╣рдореЗрдВ рдХреБрдЫ рдРрд╕рд╛ рдорд┐рд▓рддрд╛ рд╣реИ:
рдбреЗрдореЛ swf narod.ru рдкрд░Megaswf.com рдкрд░ рдбреЗрдореЛ (рдЕрдзрд┐рдорд╛рдирддрдГ рдлреБрд▓рд╕реНрдХреНрд░реАрди рдореЗрдВ)ps рдХрд┐рд╕реА рдХрд╛рд░рдг рдХреЗ рд▓рд┐рдП, рдореИрдВ рдереЛрдбрд╝рд╛ рдмрд╛рдж рдореЗрдВ рдкреВрд░реНрдг рдХреЛрдб рдкреЛрд╕реНрдЯ рдХрд░реВрдБрдЧрд╛ред