STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/76665527?noj=FRM76665527-22DC" width="1" height="1"></div>

Rocket Toilet 2 - launch and upgrade toilet through the ages.swf

This is the info page for
Flash #131769

(Click the ID number above for more basic data on this flash file.)


Text
2

Rocket

Toilet

START

!

START

!

clear progress

QHI

QME

QLO

credits

play more games

game design: k.elgazin   code: a.sobchenko   art: m.peleshko

PITERGAMES     2012

c

www.pitergames.com

www.pitergames.com

ERA2

ERA3

ERA1

ERA4

ERA5

like us!

LAUNCH AGAIN

!

LAUNCH AGAIN

!

SHOP

get +$50000

for FGL testing

$ 10000

MONEY EARNED:

$ 10000

TOTAL MONEY:

big wheels

DEFENSE

FORCED

FLUSH

?

accelerator

timejump

wings

naked!

MAX

power

DEFENSE

WHEELS

Aviation!

LASER

HEAD

$000000

Buy it!

$000000

BOUGHT

new item!

enter shop!

height:

length:

money:

4345

3534

$1432

max:

3534

3534

restart

GOOD

landing!

+$12301

PERFECT

+$12301

ROTATION

bonus!

+$12301

TO ACCELERATE

CLICK

!

?

aim and click to get a powerfull shot!

Click

here!

QHI

QME

QLO

1|4

NEXT

NEXT

IT WAS A NICE GAME

!

IT WAS A NICE GAME

!

2|4

3|4

4|4

?

skip :(

skip :(

LET'S PLAY

LET'S PLAY

FLUSH

SHOOT

LOADING

...

LOADING

...

TOILET

ROCKET

00%

the time jumps

100%

time jump

time jump

QHI

QME

QLO

ActionScript [AS3]

Section 1
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleShape extends b2Shape { b2internal var m_p:b2Vec2; public function b2CircleShape(_arg1:Number=0){ m_p = new b2Vec2(); super(); m_type = e_circleShape; m_radius = _arg1; } public function GetRadius():Number{ return (m_radius); } override public function Set(_arg1:b2Shape):void{ var _local2:b2CircleShape; super.Set(_arg1); if ((_arg1 is b2CircleShape)){ _local2 = (_arg1 as b2CircleShape); m_p.SetV(_local2.m_p); }; } public function GetLocalPosition():b2Vec2{ return (m_p); } override public function RayCast(_arg1:b2RayCastOutput, _arg2:b2RayCastInput, _arg3:b2Transform):Boolean{ var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; _local4 = _arg3.R; _local5 = (_arg3.position.x + ((_local4.col1.x * m_p.x) + (_local4.col2.x * m_p.y))); _local6 = (_arg3.position.y + ((_local4.col1.y * m_p.x) + (_local4.col2.y * m_p.y))); _local7 = (_arg2.p1.x - _local5); _local8 = (_arg2.p1.y - _local6); _local9 = (((_local7 * _local7) + (_local8 * _local8)) - (m_radius * m_radius)); _local10 = (_arg2.p2.x - _arg2.p1.x); _local11 = (_arg2.p2.y - _arg2.p1.y); _local12 = ((_local7 * _local10) + (_local8 * _local11)); _local13 = ((_local10 * _local10) + (_local11 * _local11)); _local14 = ((_local12 * _local12) - (_local13 * _local9)); if ((((_local14 < 0)) || ((_local13 < Number.MIN_VALUE)))){ return (false); }; _local15 = -((_local12 + Math.sqrt(_local14))); if ((((0 <= _local15)) && ((_local15 <= (_arg2.maxFraction * _local13))))){ _local15 = (_local15 / _local13); _arg1.fraction = _local15; _arg1.normal.x = (_local7 + (_local15 * _local10)); _arg1.normal.y = (_local8 + (_local15 * _local11)); _arg1.normal.Normalize(); return (true); }; return (false); } override public function ComputeMass(_arg1:b2MassData, _arg2:Number):void{ _arg1.mass = (((_arg2 * b2Settings.b2_pi) * m_radius) * m_radius); _arg1.center.SetV(m_p); _arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_p.x * m_p.x) + (m_p.y * m_p.y)))); } override public function ComputeSubmergedArea(_arg1:b2Vec2, _arg2:Number, _arg3:b2Transform, _arg4:b2Vec2):Number{ var _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local5 = b2Math.MulX(_arg3, m_p); _local6 = -((b2Math.Dot(_arg1, _local5) - _arg2)); if (_local6 < (-(m_radius) + Number.MIN_VALUE)){ return (0); }; if (_local6 > m_radius){ _arg4.SetV(_local5); return (((Math.PI * m_radius) * m_radius)); }; _local7 = (m_radius * m_radius); _local8 = (_local6 * _local6); _local9 = ((_local7 * (Math.asin((_local6 / m_radius)) + (Math.PI / 2))) + (_local6 * Math.sqrt((_local7 - _local8)))); _local10 = (((-2 / 3) * Math.pow((_local7 - _local8), 1.5)) / _local9); _arg4.x = (_local5.x + (_arg1.x * _local10)); _arg4.y = (_local5.y + (_arg1.y * _local10)); return (_local9); } public function SetLocalPosition(_arg1:b2Vec2):void{ m_p.SetV(_arg1); } public function SetRadius(_arg1:Number):void{ m_radius = _arg1; } override public function Copy():b2Shape{ var _local1:b2Shape; _local1 = new b2CircleShape(); _local1.Set(this); return (_local1); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2Transform):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg2.R; _local4 = (_arg2.position.x + ((_local3.col1.x * m_p.x) + (_local3.col2.x * m_p.y))); _local5 = (_arg2.position.y + ((_local3.col1.y * m_p.x) + (_local3.col2.y * m_p.y))); _arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius)); _arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius)); } override public function TestPoint(_arg1:b2Transform, _arg2:b2Vec2):Boolean{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg1.R; _local4 = (_arg1.position.x + ((_local3.col1.x * m_p.x) + (_local3.col2.x * m_p.y))); _local5 = (_arg1.position.y + ((_local3.col1.y * m_p.x) + (_local3.col2.y * m_p.y))); _local4 = (_arg2.x - _local4); _local5 = (_arg2.y - _local5); return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius))); } } }//package Box2D.Collision.Shapes
Section 2
//b2EdgeShape (Box2D.Collision.Shapes.b2EdgeShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2EdgeShape extends b2Shape { b2internal var m_v1:b2Vec2; b2internal var m_v2:b2Vec2; private var s_supportVec:b2Vec2; b2internal var m_coreV1:b2Vec2; b2internal var m_coreV2:b2Vec2; b2internal var m_prevEdge:b2EdgeShape; b2internal var m_direction:b2Vec2; b2internal var m_cornerConvex1:Boolean; b2internal var m_cornerConvex2:Boolean; b2internal var m_cornerDir1:b2Vec2; b2internal var m_cornerDir2:b2Vec2; b2internal var m_nextEdge:b2EdgeShape; b2internal var m_normal:b2Vec2; b2internal var m_length:Number; public function b2EdgeShape(_arg1:b2Vec2, _arg2:b2Vec2){ s_supportVec = new b2Vec2(); m_v1 = new b2Vec2(); m_v2 = new b2Vec2(); m_coreV1 = new b2Vec2(); m_coreV2 = new b2Vec2(); m_normal = new b2Vec2(); m_direction = new b2Vec2(); m_cornerDir1 = new b2Vec2(); m_cornerDir2 = new b2Vec2(); super(); m_type = e_edgeShape; m_prevEdge = null; m_nextEdge = null; m_v1 = _arg1; m_v2 = _arg2; m_direction.Set((m_v2.x - m_v1.x), (m_v2.y - m_v1.y)); m_length = m_direction.Normalize(); m_normal.Set(m_direction.y, -(m_direction.x)); m_coreV1.Set(((-(b2Settings.b2_toiSlop) * (m_normal.x - m_direction.x)) + m_v1.x), ((-(b2Settings.b2_toiSlop) * (m_normal.y - m_direction.y)) + m_v1.y)); m_coreV2.Set(((-(b2Settings.b2_toiSlop) * (m_normal.x + m_direction.x)) + m_v2.x), ((-(b2Settings.b2_toiSlop) * (m_normal.y + m_direction.y)) + m_v2.y)); m_cornerDir1 = m_normal; m_cornerDir2.Set(-(m_normal.x), -(m_normal.y)); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2Transform):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local3 = _arg2.R; _local4 = (_arg2.position.x + ((_local3.col1.x * m_v1.x) + (_local3.col2.x * m_v1.y))); _local5 = (_arg2.position.y + ((_local3.col1.y * m_v1.x) + (_local3.col2.y * m_v1.y))); _local6 = (_arg2.position.x + ((_local3.col1.x * m_v2.x) + (_local3.col2.x * m_v2.y))); _local7 = (_arg2.position.y + ((_local3.col1.y * m_v2.x) + (_local3.col2.y * m_v2.y))); if (_local4 < _local6){ _arg1.lowerBound.x = _local4; _arg1.upperBound.x = _local6; } else { _arg1.lowerBound.x = _local6; _arg1.upperBound.x = _local4; }; if (_local5 < _local7){ _arg1.lowerBound.y = _local5; _arg1.upperBound.y = _local7; } else { _arg1.lowerBound.y = _local7; _arg1.upperBound.y = _local5; }; } public function GetCorner2Vector():b2Vec2{ return (m_cornerDir2); } public function GetDirectionVector():b2Vec2{ return (m_direction); } public function GetNextEdge():b2EdgeShape{ return (m_nextEdge); } override public function ComputeMass(_arg1:b2MassData, _arg2:Number):void{ _arg1.mass = 0; _arg1.center.SetV(m_v1); _arg1.I = 0; } public function Corner1IsConvex():Boolean{ return (m_cornerConvex1); } public function Corner2IsConvex():Boolean{ return (m_cornerConvex2); } public function Support(_arg1:b2Transform, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = _arg1.R; _local5 = (_arg1.position.x + ((_local4.col1.x * m_coreV1.x) + (_local4.col2.x * m_coreV1.y))); _local6 = (_arg1.position.y + ((_local4.col1.y * m_coreV1.x) + (_local4.col2.y * m_coreV1.y))); _local7 = (_arg1.position.x + ((_local4.col1.x * m_coreV2.x) + (_local4.col2.x * m_coreV2.y))); _local8 = (_arg1.position.y + ((_local4.col1.y * m_coreV2.x) + (_local4.col2.y * m_coreV2.y))); if (((_local5 * _arg2) + (_local6 * _arg3)) > ((_local7 * _arg2) + (_local8 * _arg3))){ s_supportVec.x = _local5; s_supportVec.y = _local6; } else { s_supportVec.x = _local7; s_supportVec.y = _local8; }; return (s_supportVec); } b2internal function SetNextEdge(_arg1:b2EdgeShape, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Boolean):void{ m_nextEdge = _arg1; m_coreV2 = _arg2; m_cornerDir2 = _arg3; m_cornerConvex2 = _arg4; } b2internal function SetPrevEdge(_arg1:b2EdgeShape, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Boolean):void{ m_prevEdge = _arg1; m_coreV1 = _arg2; m_cornerDir1 = _arg3; m_cornerConvex1 = _arg4; } public function GetLength():Number{ return (m_length); } override public function ComputeSubmergedArea(_arg1:b2Vec2, _arg2:Number, _arg3:b2Transform, _arg4:b2Vec2):Number{ var _local5:b2Vec2; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:Number; var _local9:Number; _local5 = new b2Vec2((_arg1.x * _arg2), (_arg1.y * _arg2)); _local6 = b2Math.MulX(_arg3, m_v1); _local7 = b2Math.MulX(_arg3, m_v2); _local8 = (b2Math.Dot(_arg1, _local6) - _arg2); _local9 = (b2Math.Dot(_arg1, _local7) - _arg2); if (_local8 > 0){ if (_local9 > 0){ return (0); }; _local6.x = (((-(_local9) / (_local8 - _local9)) * _local6.x) + ((_local8 / (_local8 - _local9)) * _local7.x)); _local6.y = (((-(_local9) / (_local8 - _local9)) * _local6.y) + ((_local8 / (_local8 - _local9)) * _local7.y)); } else { if (_local9 > 0){ _local7.x = (((-(_local9) / (_local8 - _local9)) * _local6.x) + ((_local8 / (_local8 - _local9)) * _local7.x)); _local7.y = (((-(_local9) / (_local8 - _local9)) * _local6.y) + ((_local8 / (_local8 - _local9)) * _local7.y)); }; }; _arg4.x = (((_local5.x + _local6.x) + _local7.x) / 3); _arg4.y = (((_local5.y + _local6.y) + _local7.y) / 3); return ((0.5 * (((_local6.x - _local5.x) * (_local7.y - _local5.y)) - ((_local6.y - _local5.y) * (_local7.x - _local5.x))))); } public function GetCorner1Vector():b2Vec2{ return (m_cornerDir1); } public function GetCoreVertex1():b2Vec2{ return (m_coreV1); } public function GetCoreVertex2():b2Vec2{ return (m_coreV2); } public function GetFirstVertex(_arg1:b2Transform):b2Vec2{ var _local2:b2Mat22; _local2 = _arg1.R; return (new b2Vec2((_arg1.position.x + ((_local2.col1.x * m_coreV1.x) + (_local2.col2.x * m_coreV1.y))), (_arg1.position.y + ((_local2.col1.y * m_coreV1.x) + (_local2.col2.y * m_coreV1.y))))); } public function GetNormalVector():b2Vec2{ return (m_normal); } public function GetPrevEdge():b2EdgeShape{ return (m_prevEdge); } override public function RayCast(_arg1:b2RayCastOutput, _arg2:b2RayCastInput, _arg3:b2Transform):Boolean{ var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local5 = (_arg2.p2.x - _arg2.p1.x); _local6 = (_arg2.p2.y - _arg2.p1.y); _local4 = _arg3.R; _local7 = (_arg3.position.x + ((_local4.col1.x * m_v1.x) + (_local4.col2.x * m_v1.y))); _local8 = (_arg3.position.y + ((_local4.col1.y * m_v1.x) + (_local4.col2.y * m_v1.y))); _local9 = ((_arg3.position.y + ((_local4.col1.y * m_v2.x) + (_local4.col2.y * m_v2.y))) - _local8); _local10 = -(((_arg3.position.x + ((_local4.col1.x * m_v2.x) + (_local4.col2.x * m_v2.y))) - _local7)); _local11 = (100 * Number.MIN_VALUE); _local12 = -(((_local5 * _local9) + (_local6 * _local10))); if (_local12 > _local11){ _local13 = (_arg2.p1.x - _local7); _local14 = (_arg2.p1.y - _local8); _local15 = ((_local13 * _local9) + (_local14 * _local10)); if ((((0 <= _local15)) && ((_local15 <= (_arg2.maxFraction * _local12))))){ _local16 = ((-(_local5) * _local14) + (_local6 * _local13)); if (((((-(_local11) * _local12) <= _local16)) && ((_local16 <= (_local12 * (1 + _local11)))))){ _local15 = (_local15 / _local12); _arg1.fraction = _local15; _local17 = Math.sqrt(((_local9 * _local9) + (_local10 * _local10))); _arg1.normal.x = (_local9 / _local17); _arg1.normal.y = (_local10 / _local17); return (true); }; }; }; return (false); } public function GetVertex1():b2Vec2{ return (m_v1); } public function GetVertex2():b2Vec2{ return (m_v2); } override public function TestPoint(_arg1:b2Transform, _arg2:b2Vec2):Boolean{ return (false); } } }//package Box2D.Collision.Shapes
Section 3
//b2MassData (Box2D.Collision.Shapes.b2MassData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2MassData { public var mass:Number;// = 0 public var center:b2Vec2; public var I:Number;// = 0 public function b2MassData(){ mass = 0; center = new b2Vec2(0, 0); I = 0; super(); } } }//package Box2D.Collision.Shapes
Section 4
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolygonShape extends b2Shape { b2internal var m_vertexCount:int; b2internal var m_vertices:Array; b2internal var m_centroid:b2Vec2; b2internal var m_normals:Array; private static var s_mat:b2Mat22 = new b2Mat22(); public function b2PolygonShape(){ m_type = e_polygonShape; m_centroid = new b2Vec2(); m_vertices = new Array(); m_normals = new Array(); } override public function Set(_arg1:b2Shape):void{ var _local2:b2PolygonShape; var _local3:int; super.Set(_arg1); if ((_arg1 is b2PolygonShape)){ _local2 = (_arg1 as b2PolygonShape); m_centroid.SetV(_local2.m_centroid); m_vertexCount = _local2.m_vertexCount; Reserve(m_vertexCount); _local3 = 0; while (_local3 < m_vertexCount) { m_vertices[_local3].SetV(_local2.m_vertices[_local3]); m_normals[_local3].SetV(_local2.m_normals[_local3]); _local3++; }; }; } override public function TestPoint(_arg1:b2Transform, _arg2:b2Vec2):Boolean{ var _local3:b2Vec2; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:Number; _local4 = _arg1.R; _local5 = (_arg2.x - _arg1.position.x); _local6 = (_arg2.y - _arg1.position.y); _local7 = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y)); _local8 = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y)); _local9 = 0; while (_local9 < m_vertexCount) { _local3 = m_vertices[_local9]; _local5 = (_local7 - _local3.x); _local6 = (_local8 - _local3.y); _local3 = m_normals[_local9]; _local10 = ((_local3.x * _local5) + (_local3.y * _local6)); if (_local10 > 0){ return (false); }; _local9++; }; return (true); } override public function ComputeSubmergedArea(_arg1:b2Vec2, _arg2:Number, _arg3:b2Transform, _arg4:b2Vec2):Number{ var _local5:b2Vec2; var _local6:Number; var _local7:Array; var _local8:int; var _local9:int; var _local10:int; var _local11:Boolean; var _local12:int; var _local13:int; var _local14:int; var _local15:Number; var _local16:Number; var _local17:b2Vec2; var _local18:b2Vec2; var _local19:Number; var _local20:b2Vec2; var _local21:b2Vec2; var _local22:b2Vec2; var _local23:Boolean; var _local24:b2MassData; var _local25:Number; _local5 = b2Math.MulTMV(_arg3.R, _arg1); _local6 = (_arg2 - b2Math.Dot(_arg1, _arg3.position)); _local7 = new Array(); _local8 = 0; _local9 = -1; _local10 = -1; _local11 = false; _local12 = 0; while (_local12 < m_vertexCount) { _local7[_local12] = (b2Math.Dot(_local5, m_vertices[_local12]) - _local6); _local23 = (_local7[_local12] < -(Number.MIN_VALUE)); if (_local12 > 0){ if (_local23){ if (!_local11){ _local9 = (_local12 - 1); _local8++; }; } else { if (_local11){ _local10 = (_local12 - 1); _local8++; }; }; }; _local11 = _local23; _local12++; }; switch (_local8){ case 0: if (_local11){ _local24 = new b2MassData(); ComputeMass(_local24, 1); _arg4.SetV(b2Math.MulX(_arg3, _local24.center)); return (_local24.mass); }; return (0); case 1: if (_local9 == -1){ _local9 = (m_vertexCount - 1); } else { _local10 = (m_vertexCount - 1); }; break; }; _local13 = ((_local9 + 1) % m_vertexCount); _local14 = ((_local10 + 1) % m_vertexCount); _local15 = ((0 - _local7[_local9]) / (_local7[_local13] - _local7[_local9])); _local16 = ((0 - _local7[_local10]) / (_local7[_local14] - _local7[_local10])); _local17 = new b2Vec2(((m_vertices[_local9].x * (1 - _local15)) + (m_vertices[_local13].x * _local15)), ((m_vertices[_local9].y * (1 - _local15)) + (m_vertices[_local13].y * _local15))); _local18 = new b2Vec2(((m_vertices[_local10].x * (1 - _local16)) + (m_vertices[_local14].x * _local16)), ((m_vertices[_local10].y * (1 - _local16)) + (m_vertices[_local14].y * _local16))); _local19 = 0; _local20 = new b2Vec2(); _local21 = m_vertices[_local13]; _local12 = _local13; while (_local12 != _local14) { _local12 = ((_local12 + 1) % m_vertexCount); if (_local12 == _local14){ _local22 = _local18; } else { _local22 = m_vertices[_local12]; }; _local25 = (0.5 * (((_local21.x - _local17.x) * (_local22.y - _local17.y)) - ((_local21.y - _local17.y) * (_local22.x - _local17.x)))); _local19 = (_local19 + _local25); _local20.x = (_local20.x + ((_local25 * ((_local17.x + _local21.x) + _local22.x)) / 3)); _local20.y = (_local20.y + ((_local25 * ((_local17.y + _local21.y) + _local22.y)) / 3)); _local21 = _local22; }; _local20.Multiply((1 / _local19)); _arg4.SetV(b2Math.MulX(_arg3, _local20)); return (_local19); } public function SetAsOrientedBox(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{ var _local5:b2Transform; var _local6:int; m_vertexCount = 4; Reserve(4); m_vertices[0].Set(-(_arg1), -(_arg2)); m_vertices[1].Set(_arg1, -(_arg2)); m_vertices[2].Set(_arg1, _arg2); m_vertices[3].Set(-(_arg1), _arg2); m_normals[0].Set(0, -1); m_normals[1].Set(1, 0); m_normals[2].Set(0, 1); m_normals[3].Set(-1, 0); m_centroid = _arg3; _local5 = new b2Transform(); _local5.position = _arg3; _local5.R.Set(_arg4); _local6 = 0; while (_local6 < m_vertexCount) { m_vertices[_local6] = b2Math.MulX(_local5, m_vertices[_local6]); m_normals[_local6] = b2Math.MulMV(_local5.R, m_normals[_local6]); _local6++; }; } override public function Copy():b2Shape{ var _local1:b2PolygonShape; _local1 = new b2PolygonShape(); _local1.Set(this); return (_local1); } public function GetVertices():Array{ return (m_vertices); } public function SetAsBox(_arg1:Number, _arg2:Number):void{ m_vertexCount = 4; Reserve(4); m_vertices[0].Set(-(_arg1), -(_arg2)); m_vertices[1].Set(_arg1, -(_arg2)); m_vertices[2].Set(_arg1, _arg2); m_vertices[3].Set(-(_arg1), _arg2); m_normals[0].Set(0, -1); m_normals[1].Set(1, 0); m_normals[2].Set(0, 1); m_normals[3].Set(-1, 0); m_centroid.SetZero(); } private function Reserve(_arg1:int):void{ var _local2:int; _local2 = m_vertices.length; while (_local2 < _arg1) { m_vertices[_local2] = new b2Vec2(); m_normals[_local2] = new b2Vec2(); _local2++; }; } public function GetNormals():Array{ return (m_normals); } public function SetAsArray(_arg1:Array, _arg2:Number=0):void{ var _local3:Array; var _local4:b2Vec2; _local3 = new Array(); for each (_local4 in _arg1) { _local3.push(_local4); }; SetAsVector(_local3, _arg2); } override public function RayCast(_arg1:b2RayCastOutput, _arg2:b2RayCastInput, _arg3:b2Transform):Boolean{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:b2Mat22; var _local9:b2Vec2; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:int; var _local17:int; var _local18:Number; var _local19:Number; _local4 = 0; _local5 = _arg2.maxFraction; _local6 = (_arg2.p1.x - _arg3.position.x); _local7 = (_arg2.p1.y - _arg3.position.y); _local8 = _arg3.R; _local10 = ((_local6 * _local8.col1.x) + (_local7 * _local8.col1.y)); _local11 = ((_local6 * _local8.col2.x) + (_local7 * _local8.col2.y)); _local6 = (_arg2.p2.x - _arg3.position.x); _local7 = (_arg2.p2.y - _arg3.position.y); _local8 = _arg3.R; _local12 = ((_local6 * _local8.col1.x) + (_local7 * _local8.col1.y)); _local13 = ((_local6 * _local8.col2.x) + (_local7 * _local8.col2.y)); _local14 = (_local12 - _local10); _local15 = (_local13 - _local11); _local16 = -1; _local17 = 0; while (_local17 < m_vertexCount) { _local9 = m_vertices[_local17]; _local6 = (_local9.x - _local10); _local7 = (_local9.y - _local11); _local9 = m_normals[_local17]; _local18 = ((_local9.x * _local6) + (_local9.y * _local7)); _local19 = ((_local9.x * _local14) + (_local9.y * _local15)); if (_local19 == 0){ if (_local18 < 0){ return (false); }; } else { if ((((_local19 < 0)) && ((_local18 < (_local4 * _local19))))){ _local4 = (_local18 / _local19); _local16 = _local17; } else { if ((((_local19 > 0)) && ((_local18 < (_local5 * _local19))))){ _local5 = (_local18 / _local19); }; }; }; if (_local5 < (_local4 - Number.MIN_VALUE)){ return (false); }; _local17++; }; if (_local16 >= 0){ _arg1.fraction = _local4; _local8 = _arg3.R; _local9 = m_normals[_local16]; _arg1.normal.x = ((_local8.col1.x * _local9.x) + (_local8.col2.x * _local9.y)); _arg1.normal.y = ((_local8.col1.y * _local9.x) + (_local8.col2.y * _local9.y)); return (true); }; return (false); } override public function ComputeMass(_arg1:b2MassData, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; if (m_vertexCount == 2){ _arg1.center.x = (0.5 * (m_vertices[0].x + m_vertices[1].x)); _arg1.center.y = (0.5 * (m_vertices[0].y + m_vertices[1].y)); _arg1.mass = 0; _arg1.I = 0; return; }; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; _local9 = (1 / 3); _local10 = 0; while (_local10 < m_vertexCount) { _local11 = m_vertices[_local10]; _local12 = (((_local10 + 1) < m_vertexCount)) ? m_vertices[int((_local10 + 1))] : m_vertices[0]; _local13 = (_local11.x - _local7); _local14 = (_local11.y - _local8); _local15 = (_local12.x - _local7); _local16 = (_local12.y - _local8); _local17 = ((_local13 * _local16) - (_local14 * _local15)); _local18 = (0.5 * _local17); _local5 = (_local5 + _local18); _local3 = (_local3 + ((_local18 * _local9) * ((_local7 + _local11.x) + _local12.x))); _local4 = (_local4 + ((_local18 * _local9) * ((_local8 + _local11.y) + _local12.y))); _local19 = _local7; _local20 = _local8; _local21 = _local13; _local22 = _local14; _local23 = _local15; _local24 = _local16; _local25 = ((_local9 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local26 = ((_local9 * ((0.25 * (((_local22 * _local22) + (_local24 * _local22)) + (_local24 * _local24))) + ((_local20 * _local22) + (_local20 * _local24)))) + ((0.5 * _local20) * _local20)); _local6 = (_local6 + (_local17 * (_local25 + _local26))); _local10++; }; _arg1.mass = (_arg2 * _local5); _local3 = (_local3 * (1 / _local5)); _local4 = (_local4 * (1 / _local5)); _arg1.center.Set(_local3, _local4); _arg1.I = (_arg2 * _local6); } public function SetAsEdge(_arg1:b2Vec2, _arg2:b2Vec2):void{ m_vertexCount = 2; Reserve(2); m_vertices[0].SetV(_arg1); m_vertices[1].SetV(_arg2); m_centroid.x = (0.5 * (_arg1.x + _arg2.x)); m_centroid.y = (0.5 * (_arg1.y + _arg2.y)); m_normals[0] = b2Math.CrossVF(b2Math.SubtractVV(_arg2, _arg1), 1); m_normals[0].Normalize(); m_normals[1].x = -(m_normals[0].x); m_normals[1].y = -(m_normals[0].y); } public function GetVertexCount():int{ return (m_vertexCount); } private function Validate():Boolean{ return (false); } public function SetAsVector(_arg1:Array, _arg2:Number=0):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:b2Vec2; if (_arg2 == 0){ _arg2 = _arg1.length; }; b2Settings.b2Assert((2 <= _arg2)); m_vertexCount = _arg2; Reserve(_arg2); _local3 = 0; while (_local3 < m_vertexCount) { m_vertices[_local3].SetV(_arg1[_local3]); _local3++; }; _local3 = 0; while (_local3 < m_vertexCount) { _local4 = _local3; _local5 = (((_local3 + 1) < m_vertexCount)) ? (_local3 + 1) : 0; _local6 = b2Math.SubtractVV(m_vertices[_local5], m_vertices[_local4]); b2Settings.b2Assert((_local6.LengthSquared() > Number.MIN_VALUE)); m_normals[_local3].SetV(b2Math.CrossVF(_local6, 1)); m_normals[_local3].Normalize(); _local3++; }; m_centroid = ComputeCentroid(m_vertices, m_vertexCount); } public function GetSupport(_arg1:b2Vec2):int{ var _local2:int; var _local3:Number; var _local4:int; var _local5:Number; _local2 = 0; _local3 = ((m_vertices[0].x * _arg1.x) + (m_vertices[0].y * _arg1.y)); _local4 = 1; while (_local4 < m_vertexCount) { _local5 = ((m_vertices[_local4].x * _arg1.x) + (m_vertices[_local4].y * _arg1.y)); if (_local5 > _local3){ _local2 = _local4; _local3 = _local5; }; _local4++; }; return (_local2); } public function GetSupportVertex(_arg1:b2Vec2):b2Vec2{ var _local2:int; var _local3:Number; var _local4:int; var _local5:Number; _local2 = 0; _local3 = ((m_vertices[0].x * _arg1.x) + (m_vertices[0].y * _arg1.y)); _local4 = 1; while (_local4 < m_vertexCount) { _local5 = ((m_vertices[_local4].x * _arg1.x) + (m_vertices[_local4].y * _arg1.y)); if (_local5 > _local3){ _local2 = _local4; _local3 = _local5; }; _local4++; }; return (m_vertices[_local2]); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2Transform):void{ var _local3:b2Mat22; var _local4:b2Vec2; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:Number; var _local11:Number; _local3 = _arg2.R; _local4 = m_vertices[0]; _local5 = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y))); _local6 = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y))); _local7 = _local5; _local8 = _local6; _local9 = 1; while (_local9 < m_vertexCount) { _local4 = m_vertices[_local9]; _local10 = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y))); _local11 = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y))); _local5 = ((_local5 < _local10)) ? _local5 : _local10; _local6 = ((_local6 < _local11)) ? _local6 : _local11; _local7 = ((_local7 > _local10)) ? _local7 : _local10; _local8 = ((_local8 > _local11)) ? _local8 : _local11; _local9++; }; _arg1.lowerBound.x = (_local5 - m_radius); _arg1.lowerBound.y = (_local6 - m_radius); _arg1.upperBound.x = (_local7 + m_radius); _arg1.upperBound.y = (_local8 + m_radius); } b2internal static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{ var _local4:int; var _local5:Array; var _local6:Number; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:b2Mat22; _local5 = new Array((_arg3 + 1)); _local4 = 0; while (_local4 < _arg3) { _local5[_local4] = _arg2[_local4]; _local4++; }; _local5[_arg3] = _local5[0]; _local6 = Number.MAX_VALUE; _local4 = 1; while (_local4 <= _arg3) { _local7 = _local5[int((_local4 - 1))]; _local8 = (_local5[_local4].x - _local7.x); _local9 = (_local5[_local4].y - _local7.y); _local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local8 = (_local8 / _local10); _local9 = (_local9 / _local10); _local11 = -(_local9); _local12 = _local8; _local13 = Number.MAX_VALUE; _local14 = Number.MAX_VALUE; _local15 = -(Number.MAX_VALUE); _local16 = -(Number.MAX_VALUE); _local17 = 0; while (_local17 < _arg3) { _local19 = (_local5[_local17].x - _local7.x); _local20 = (_local5[_local17].y - _local7.y); _local21 = ((_local8 * _local19) + (_local9 * _local20)); _local22 = ((_local11 * _local19) + (_local12 * _local20)); if (_local21 < _local13){ _local13 = _local21; }; if (_local22 < _local14){ _local14 = _local22; }; if (_local21 > _local15){ _local15 = _local21; }; if (_local22 > _local16){ _local16 = _local22; }; _local17++; }; _local18 = ((_local15 - _local13) * (_local16 - _local14)); if (_local18 < (0.95 * _local6)){ _local6 = _local18; _arg1.R.col1.x = _local8; _arg1.R.col1.y = _local9; _arg1.R.col2.x = _local11; _arg1.R.col2.y = _local12; _local23 = (0.5 * (_local13 + _local15)); _local24 = (0.5 * (_local14 + _local16)); _local25 = _arg1.R; _arg1.center.x = (_local7.x + ((_local25.col1.x * _local23) + (_local25.col2.x * _local24))); _arg1.center.y = (_local7.y + ((_local25.col1.y * _local23) + (_local25.col2.y * _local24))); _arg1.extents.x = (0.5 * (_local15 - _local13)); _arg1.extents.y = (0.5 * (_local16 - _local14)); }; _local4++; }; } public static function AsVector(_arg1:Array, _arg2:Number):b2PolygonShape{ var _local3:b2PolygonShape; _local3 = new (b2PolygonShape); _local3.SetAsVector(_arg1, _arg2); return (_local3); } public static function AsArray(_arg1:Array, _arg2:Number):b2PolygonShape{ var _local3:b2PolygonShape; _local3 = new (b2PolygonShape); _local3.SetAsArray(_arg1, _arg2); return (_local3); } public static function AsBox(_arg1:Number, _arg2:Number):b2PolygonShape{ var _local3:b2PolygonShape; _local3 = new (b2PolygonShape); _local3.SetAsBox(_arg1, _arg2); return (_local3); } public static function AsOrientedBox(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):b2PolygonShape{ var _local5:b2PolygonShape; _local5 = new (b2PolygonShape); _local5.SetAsOrientedBox(_arg1, _arg2, _arg3, _arg4); return (_local5); } public static function ComputeCentroid(_arg1:Array, _arg2:uint):b2Vec2{ var _local3:b2Vec2; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local3 = new b2Vec2(); _local4 = 0; _local5 = 0; _local6 = 0; _local7 = (1 / 3); _local8 = 0; while (_local8 < _arg2) { _local9 = _arg1[_local8]; _local10 = (((_local8 + 1) < _arg2)) ? _arg1[int((_local8 + 1))] : _arg1[0]; _local11 = (_local9.x - _local5); _local12 = (_local9.y - _local6); _local13 = (_local10.x - _local5); _local14 = (_local10.y - _local6); _local15 = ((_local11 * _local14) - (_local12 * _local13)); _local16 = (0.5 * _local15); _local4 = (_local4 + _local16); _local3.x = (_local3.x + ((_local16 * _local7) * ((_local5 + _local9.x) + _local10.x))); _local3.y = (_local3.y + ((_local16 * _local7) * ((_local6 + _local9.y) + _local10.y))); _local8++; }; _local3.x = (_local3.x * (1 / _local4)); _local3.y = (_local3.y * (1 / _local4)); return (_local3); } public static function AsEdge(_arg1:b2Vec2, _arg2:b2Vec2):b2PolygonShape{ var _local3:b2PolygonShape; _local3 = new (b2PolygonShape); _local3.SetAsEdge(_arg1, _arg2); return (_local3); } } }//package Box2D.Collision.Shapes
Section 5
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Shape { b2internal var m_radius:Number; b2internal var m_type:int; b2internal static const e_polygonShape:int = 1; public static const e_hitCollide:int = 1; public static const e_missCollide:int = 0; b2internal static const e_edgeShape:int = 2; b2internal static const e_shapeTypeCount:int = 3; b2internal static const e_unknownShape:int = -1; b2internal static const e_circleShape:int = 0; public static const e_startsInsideCollide:int = -1; public function b2Shape(){ m_type = e_unknownShape; m_radius = b2Settings.b2_linearSlop; } public function Set(_arg1:b2Shape):void{ m_radius = _arg1.m_radius; } public function RayCast(_arg1:b2RayCastOutput, _arg2:b2RayCastInput, _arg3:b2Transform):Boolean{ return (false); } public function ComputeMass(_arg1:b2MassData, _arg2:Number):void{ } public function GetType():int{ return (m_type); } public function ComputeSubmergedArea(_arg1:b2Vec2, _arg2:Number, _arg3:b2Transform, _arg4:b2Vec2):Number{ return (0); } public function Copy():b2Shape{ return (null); } public function ComputeAABB(_arg1:b2AABB, _arg2:b2Transform):void{ } public function TestPoint(_arg1:b2Transform, _arg2:b2Vec2):Boolean{ return (false); } public static function TestOverlap(_arg1:b2Shape, _arg2:b2Transform, _arg3:b2Shape, _arg4:b2Transform):Boolean{ var _local5:b2DistanceInput; var _local6:b2SimplexCache; var _local7:b2DistanceOutput; _local5 = new b2DistanceInput(); _local5.proxyA = new b2DistanceProxy(); _local5.proxyA.Set(_arg1); _local5.proxyB = new b2DistanceProxy(); _local5.proxyB.Set(_arg3); _local5.transformA = _arg2; _local5.transformB = _arg4; _local5.useRadii = true; _local6 = new b2SimplexCache(); _local6.count = 0; _local7 = new b2DistanceOutput(); b2Distance.Distance(_local7, _local6, _local5); return ((_local7.distance < (10 * Number.MIN_VALUE))); } } }//package Box2D.Collision.Shapes
Section 6
//b2AABB (Box2D.Collision.b2AABB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2AABB { public var upperBound:b2Vec2; public var lowerBound:b2Vec2; public function b2AABB(){ lowerBound = new b2Vec2(); upperBound = new b2Vec2(); super(); } public function Combine(_arg1:b2AABB, _arg2:b2AABB):void{ lowerBound.x = Math.min(_arg1.lowerBound.x, _arg2.lowerBound.x); lowerBound.y = Math.min(_arg1.lowerBound.y, _arg2.lowerBound.y); upperBound.x = Math.max(_arg1.upperBound.x, _arg2.upperBound.x); upperBound.y = Math.max(_arg1.upperBound.y, _arg2.upperBound.y); } public function RayCast(_arg1:b2RayCastOutput, _arg2:b2RayCastInput):Boolean{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local3 = -(Number.MAX_VALUE); _local4 = Number.MAX_VALUE; _local5 = _arg2.p1.x; _local6 = _arg2.p1.y; _local7 = (_arg2.p2.x - _arg2.p1.x); _local8 = (_arg2.p2.y - _arg2.p1.y); _local9 = Math.abs(_local7); _local10 = Math.abs(_local8); _local11 = _arg1.normal; if (_local9 < Number.MIN_VALUE){ if ((((_local5 < lowerBound.x)) || ((upperBound.x < _local5)))){ return (false); }; } else { _local12 = (1 / _local7); _local13 = ((lowerBound.x - _local5) * _local12); _local14 = ((upperBound.x - _local5) * _local12); _local16 = -1; if (_local13 > _local14){ _local15 = _local13; _local13 = _local14; _local14 = _local15; _local16 = 1; }; if (_local13 > _local3){ _local11.x = _local16; _local11.y = 0; _local3 = _local13; }; _local4 = Math.min(_local4, _local14); if (_local3 > _local4){ return (false); }; }; if (_local10 < Number.MIN_VALUE){ if ((((_local6 < lowerBound.y)) || ((upperBound.y < _local6)))){ return (false); }; } else { _local12 = (1 / _local8); _local13 = ((lowerBound.y - _local6) * _local12); _local14 = ((upperBound.y - _local6) * _local12); _local16 = -1; if (_local13 > _local14){ _local15 = _local13; _local13 = _local14; _local14 = _local15; _local16 = 1; }; if (_local13 > _local3){ _local11.y = _local16; _local11.x = 0; _local3 = _local13; }; _local4 = Math.min(_local4, _local14); if (_local3 > _local4){ return (false); }; }; _arg1.fraction = _local3; return (true); } public function GetCenter():b2Vec2{ return (new b2Vec2(((lowerBound.x + upperBound.x) / 2), ((lowerBound.y + upperBound.y) / 2))); } public function IsValid():Boolean{ var _local1:Number; var _local2:Number; var _local3:Boolean; _local1 = (upperBound.x - lowerBound.x); _local2 = (upperBound.y - lowerBound.y); _local3 = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid())); return (_local3); } public function GetExtents():b2Vec2{ return (new b2Vec2(((upperBound.x - lowerBound.x) / 2), ((upperBound.y - lowerBound.y) / 2))); } public function TestOverlap(_arg1:b2AABB):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = (_arg1.lowerBound.x - upperBound.x); _local3 = (_arg1.lowerBound.y - upperBound.y); _local4 = (lowerBound.x - _arg1.upperBound.x); _local5 = (lowerBound.y - _arg1.upperBound.y); if ((((_local2 > 0)) || ((_local3 > 0)))){ return (false); }; if ((((_local4 > 0)) || ((_local5 > 0)))){ return (false); }; return (true); } public function Contains(_arg1:b2AABB):Boolean{ var _local2:Boolean; _local2 = true; _local2 = ((_local2) && ((lowerBound.x <= _arg1.lowerBound.x))); _local2 = ((_local2) && ((lowerBound.y <= _arg1.lowerBound.y))); _local2 = ((_local2) && ((_arg1.upperBound.x <= upperBound.x))); _local2 = ((_local2) && ((_arg1.upperBound.y <= upperBound.y))); return (_local2); } public static function Combine(_arg1:b2AABB, _arg2:b2AABB):b2AABB{ var _local3:b2AABB; _local3 = new (b2AABB); _local3.Combine(_arg1, _arg2); return (_local3); } } }//package Box2D.Collision
Section 7
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Collision { public static const b2_nullFeature:uint = 0xFF; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); private static var s_v12:b2Vec2 = new b2Vec2(); private static var s_v11:b2Vec2 = new b2Vec2(); private static var s_edgeBO:Array = new Array(1); private static var s_tangent2:b2Vec2 = new b2Vec2(); private static var s_planePoint:b2Vec2 = new b2Vec2(); private static var s_localTangent:b2Vec2 = new b2Vec2(); private static var s_clipPoints1:Array = MakeClipPointVector(); private static var s_clipPoints2:Array = MakeClipPointVector(); private static var s_localNormal:b2Vec2 = new b2Vec2(); private static var s_edgeAO:Array = new Array(1); private static var s_tangent:b2Vec2 = new b2Vec2(); private static var s_normal:b2Vec2 = new b2Vec2(); private static var s_incidentEdge:Array = MakeClipPointVector(); public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2Transform, _arg3:int, _arg4:b2PolygonShape, _arg5:b2Transform):Number{ var _local6:int; var _local7:Array; var _local8:Array; var _local9:int; var _local10:Array; var _local11:b2Mat22; var _local12:b2Vec2; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:int; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _local6 = _arg1.m_vertexCount; _local7 = _arg1.m_vertices; _local8 = _arg1.m_normals; _local9 = _arg4.m_vertexCount; _local10 = _arg4.m_vertices; _local11 = _arg2.R; _local12 = _local8[_arg3]; _local13 = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)); _local14 = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)); _local11 = _arg5.R; _local15 = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14)); _local16 = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14)); _local17 = 0; _local18 = Number.MAX_VALUE; _local19 = 0; while (_local19 < _local9) { _local12 = _local10[_local19]; _local25 = ((_local12.x * _local15) + (_local12.y * _local16)); if (_local25 < _local18){ _local18 = _local25; _local17 = _local19; }; _local19++; }; _local12 = _local7[_arg3]; _local11 = _arg2.R; _local20 = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); _local21 = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local12 = _local10[_local17]; _local11 = _arg5.R; _local22 = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); _local23 = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local22 = (_local22 - _local20); _local23 = (_local23 - _local21); _local24 = ((_local22 * _local13) + (_local23 * _local14)); return (_local24); } public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{ var _local5:ClipVertex; var _local6:int; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:b2Vec2; var _local13:ClipVertex; _local6 = 0; _local5 = _arg2[0]; _local7 = _local5.v; _local5 = _arg2[1]; _local8 = _local5.v; _local9 = (((_arg3.x * _local7.x) + (_arg3.y * _local7.y)) - _arg4); _local10 = (((_arg3.x * _local8.x) + (_arg3.y * _local8.y)) - _arg4); if (_local9 <= 0){ var _temp1 = _local6; _local6 = (_local6 + 1); _arg1[_temp1].Set(_arg2[0]); }; if (_local10 <= 0){ var _temp2 = _local6; _local6 = (_local6 + 1); _arg1[_temp2].Set(_arg2[1]); }; if ((_local9 * _local10) < 0){ _local11 = (_local9 / (_local9 - _local10)); _local5 = _arg1[_local6]; _local12 = _local5.v; _local12.x = (_local7.x + (_local11 * (_local8.x - _local7.x))); _local12.y = (_local7.y + (_local11 * (_local8.y - _local7.y))); _local5 = _arg1[_local6]; if (_local9 > 0){ _local13 = _arg2[0]; _local5.id = _local13.id; } else { _local13 = _arg2[1]; _local5.id = _local13.id; }; _local6++; }; return (_local6); } private static function MakeClipPointVector():Array{ var _local1:Array; _local1 = new Array(2); _local1[0] = new ClipVertex(); _local1[1] = new ClipVertex(); return (_local1); } public static function CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2Transform, _arg4:b2CircleShape, _arg5:b2Transform):void{ var _local6:b2Mat22; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; _arg1.m_pointCount = 0; _local6 = _arg3.R; _local7 = _arg2.m_p; _local8 = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); _local9 = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local6 = _arg5.R; _local7 = _arg4.m_p; _local10 = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); _local11 = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local12 = (_local10 - _local8); _local13 = (_local11 - _local9); _local14 = ((_local12 * _local12) + (_local13 * _local13)); _local15 = (_arg2.m_radius + _arg4.m_radius); if (_local14 > (_local15 * _local15)){ return; }; _arg1.m_type = b2Manifold.e_circles; _arg1.m_localPoint.SetV(_arg2.m_p); _arg1.m_localPlaneNormal.SetZero(); _arg1.m_pointCount = 1; _arg1.m_points[0].m_localPoint.SetV(_arg4.m_p); _arg1.m_points[0].m_id.key = 0; } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2Transform, _arg4:int, _arg5:b2PolygonShape, _arg6:b2Transform):void{ var _local7:int; var _local8:Array; var _local9:int; var _local10:Array; var _local11:Array; var _local12:b2Mat22; var _local13:b2Vec2; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:int; var _local20:ClipVertex; var _local21:int; var _local22:int; var _local23:Number; _local7 = _arg2.m_vertexCount; _local8 = _arg2.m_normals; _local9 = _arg5.m_vertexCount; _local10 = _arg5.m_vertices; _local11 = _arg5.m_normals; _local12 = _arg3.R; _local13 = _local8[_arg4]; _local14 = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)); _local15 = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)); _local12 = _arg6.R; _local16 = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15)); _local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15)); _local14 = _local16; _local17 = 0; _local18 = Number.MAX_VALUE; _local19 = 0; while (_local19 < _local9) { _local13 = _local11[_local19]; _local23 = ((_local14 * _local13.x) + (_local15 * _local13.y)); if (_local23 < _local18){ _local18 = _local23; _local17 = _local19; }; _local19++; }; _local21 = _local17; _local22 = (((_local21 + 1) < _local9)) ? (_local21 + 1) : 0; _local20 = _arg1[0]; _local13 = _local10[_local21]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local21; _local20.id.features.incidentVertex = 0; _local20 = _arg1[1]; _local13 = _local10[_local22]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local22; _local20.id.features.incidentVertex = 1; } public static function CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2Transform, _arg4:b2CircleShape, _arg5:b2Transform):void{ var _local6:b2ManifoldPoint; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:b2Mat22; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:Number; var _local20:Number; var _local21:int; var _local22:Array; var _local23:Array; var _local24:int; var _local25:int; var _local26:int; var _local27:b2Vec2; var _local28:b2Vec2; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; _arg1.m_pointCount = 0; _local12 = _arg5.R; _local11 = _arg4.m_p; _local13 = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y))); _local14 = (_arg5.position.y + ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y))); _local7 = (_local13 - _arg3.position.x); _local8 = (_local14 - _arg3.position.y); _local12 = _arg3.R; _local15 = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local16 = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local18 = 0; _local19 = -(Number.MAX_VALUE); _local20 = (_arg2.m_radius + _arg4.m_radius); _local21 = _arg2.m_vertexCount; _local22 = _arg2.m_vertices; _local23 = _arg2.m_normals; _local24 = 0; while (_local24 < _local21) { _local11 = _local22[_local24]; _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); _local11 = _local23[_local24]; _local31 = ((_local11.x * _local7) + (_local11.y * _local8)); if (_local31 > _local20){ return; }; if (_local31 > _local19){ _local19 = _local31; _local18 = _local24; }; _local24++; }; _local25 = _local18; _local26 = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0; _local27 = _local22[_local25]; _local28 = _local22[_local26]; if (_local19 < Number.MIN_VALUE){ _arg1.m_pointCount = 1; _arg1.m_type = b2Manifold.e_faceA; _arg1.m_localPlaneNormal.SetV(_local23[_local18]); _arg1.m_localPoint.x = (0.5 * (_local27.x + _local28.x)); _arg1.m_localPoint.y = (0.5 * (_local27.y + _local28.y)); _arg1.m_points[0].m_localPoint.SetV(_arg4.m_p); _arg1.m_points[0].m_id.key = 0; return; }; _local29 = (((_local15 - _local27.x) * (_local28.x - _local27.x)) + ((_local16 - _local27.y) * (_local28.y - _local27.y))); _local30 = (((_local15 - _local28.x) * (_local27.x - _local28.x)) + ((_local16 - _local28.y) * (_local27.y - _local28.y))); if (_local29 <= 0){ if ((((_local15 - _local27.x) * (_local15 - _local27.x)) + ((_local16 - _local27.y) * (_local16 - _local27.y))) > (_local20 * _local20)){ return; }; _arg1.m_pointCount = 1; _arg1.m_type = b2Manifold.e_faceA; _arg1.m_localPlaneNormal.x = (_local15 - _local27.x); _arg1.m_localPlaneNormal.y = (_local16 - _local27.y); _arg1.m_localPlaneNormal.Normalize(); _arg1.m_localPoint.SetV(_local27); _arg1.m_points[0].m_localPoint.SetV(_arg4.m_p); _arg1.m_points[0].m_id.key = 0; } else { if (_local30 <= 0){ if ((((_local15 - _local28.x) * (_local15 - _local28.x)) + ((_local16 - _local28.y) * (_local16 - _local28.y))) > (_local20 * _local20)){ return; }; _arg1.m_pointCount = 1; _arg1.m_type = b2Manifold.e_faceA; _arg1.m_localPlaneNormal.x = (_local15 - _local28.x); _arg1.m_localPlaneNormal.y = (_local16 - _local28.y); _arg1.m_localPlaneNormal.Normalize(); _arg1.m_localPoint.SetV(_local28); _arg1.m_points[0].m_localPoint.SetV(_arg4.m_p); _arg1.m_points[0].m_id.key = 0; } else { _local32 = (0.5 * (_local27.x + _local28.x)); _local33 = (0.5 * (_local27.y + _local28.y)); _local19 = (((_local15 - _local32) * _local23[_local25].x) + ((_local16 - _local33) * _local23[_local25].y)); if (_local19 > _local20){ return; }; _arg1.m_pointCount = 1; _arg1.m_type = b2Manifold.e_faceA; _arg1.m_localPlaneNormal.x = _local23[_local25].x; _arg1.m_localPlaneNormal.y = _local23[_local25].y; _arg1.m_localPlaneNormal.Normalize(); _arg1.m_localPoint.Set(_local32, _local33); _arg1.m_points[0].m_localPoint.SetV(_arg4.m_p); _arg1.m_points[0].m_id.key = 0; }; }; } public static function CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2Transform, _arg4:b2PolygonShape, _arg5:b2Transform):void{ var _local6:ClipVertex; var _local7:Number; var _local8:int; var _local9:Number; var _local10:int; var _local11:Number; var _local12:b2PolygonShape; var _local13:b2PolygonShape; var _local14:b2Transform; var _local15:b2Transform; var _local16:int; var _local17:uint; var _local18:Number; var _local19:Number; var _local20:b2Mat22; var _local21:Array; var _local22:int; var _local23:Array; var _local24:b2Vec2; var _local25:b2Vec2; var _local26:b2Vec2; var _local27:b2Vec2; var _local28:b2Vec2; var _local29:b2Vec2; var _local30:b2Vec2; var _local31:b2Vec2; var _local32:b2Vec2; var _local33:b2Vec2; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Array; var _local38:Array; var _local39:int; var _local40:int; var _local41:int; var _local42:Number; var _local43:b2ManifoldPoint; var _local44:Number; var _local45:Number; _arg1.m_pointCount = 0; _local7 = (_arg2.m_radius + _arg4.m_radius); _local8 = 0; s_edgeAO[0] = _local8; _local9 = FindMaxSeparation(s_edgeAO, _arg2, _arg3, _arg4, _arg5); _local8 = s_edgeAO[0]; if (_local9 > _local7){ return; }; _local10 = 0; s_edgeBO[0] = _local10; _local11 = FindMaxSeparation(s_edgeBO, _arg4, _arg5, _arg2, _arg3); _local10 = s_edgeBO[0]; if (_local11 > _local7){ return; }; _local18 = 0.98; _local19 = 0.001; if (_local11 > ((_local18 * _local9) + _local19)){ _local12 = _arg4; _local13 = _arg2; _local14 = _arg5; _local15 = _arg3; _local16 = _local10; _arg1.m_type = b2Manifold.e_faceB; _local17 = 1; } else { _local12 = _arg2; _local13 = _arg4; _local14 = _arg3; _local15 = _arg5; _local16 = _local8; _arg1.m_type = b2Manifold.e_faceA; _local17 = 0; }; _local21 = s_incidentEdge; FindIncidentEdge(_local21, _local12, _local14, _local16, _local13, _local15); _local22 = _local12.m_vertexCount; _local23 = _local12.m_vertices; _local24 = _local23[_local16]; if ((_local16 + 1) < _local22){ _local25 = _local23[int((_local16 + 1))]; } else { _local25 = _local23[0]; }; _local26 = s_localTangent; _local26.Set((_local25.x - _local24.x), (_local25.y - _local24.y)); _local26.Normalize(); _local27 = s_localNormal; _local27.x = _local26.y; _local27.y = -(_local26.x); _local28 = s_planePoint; _local28.Set((0.5 * (_local24.x + _local25.x)), (0.5 * (_local24.y + _local25.y))); _local29 = s_tangent; _local20 = _local14.R; _local29.x = ((_local20.col1.x * _local26.x) + (_local20.col2.x * _local26.y)); _local29.y = ((_local20.col1.y * _local26.x) + (_local20.col2.y * _local26.y)); _local30 = s_tangent2; _local30.x = -(_local29.x); _local30.y = -(_local29.y); _local31 = s_normal; _local31.x = _local29.y; _local31.y = -(_local29.x); _local32 = s_v11; _local33 = s_v12; _local32.x = (_local14.position.x + ((_local20.col1.x * _local24.x) + (_local20.col2.x * _local24.y))); _local32.y = (_local14.position.y + ((_local20.col1.y * _local24.x) + (_local20.col2.y * _local24.y))); _local33.x = (_local14.position.x + ((_local20.col1.x * _local25.x) + (_local20.col2.x * _local25.y))); _local33.y = (_local14.position.y + ((_local20.col1.y * _local25.x) + (_local20.col2.y * _local25.y))); _local34 = ((_local31.x * _local32.x) + (_local31.y * _local32.y)); _local35 = (((-(_local29.x) * _local32.x) - (_local29.y * _local32.y)) + _local7); _local36 = (((_local29.x * _local33.x) + (_local29.y * _local33.y)) + _local7); _local37 = s_clipPoints1; _local38 = s_clipPoints2; _local39 = ClipSegmentToLine(_local37, _local21, _local30, _local35); if (_local39 < 2){ return; }; _local39 = ClipSegmentToLine(_local38, _local37, _local29, _local36); if (_local39 < 2){ return; }; _arg1.m_localPlaneNormal.SetV(_local27); _arg1.m_localPoint.SetV(_local28); _local40 = 0; _local41 = 0; while (_local41 < b2Settings.b2_maxManifoldPoints) { _local6 = _local38[_local41]; _local42 = (((_local31.x * _local6.v.x) + (_local31.y * _local6.v.y)) - _local34); if (_local42 <= _local7){ _local43 = _arg1.m_points[_local40]; _local20 = _local15.R; _local44 = (_local6.v.x - _local15.position.x); _local45 = (_local6.v.y - _local15.position.y); _local43.m_localPoint.x = ((_local44 * _local20.col1.x) + (_local45 * _local20.col1.y)); _local43.m_localPoint.y = ((_local44 * _local20.col2.x) + (_local45 * _local20.col2.y)); _local43.m_id.Set(_local6.id); _local43.m_id.features.flip = _local17; _local40++; }; _local41++; }; _arg1.m_pointCount = _local40; } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2Transform, _arg4:b2PolygonShape, _arg5:b2Transform):Number{ var _local6:int; var _local7:Array; var _local8:b2Vec2; var _local9:b2Mat22; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:int; var _local15:Number; var _local16:int; var _local17:Number; var _local18:int; var _local19:Number; var _local20:int; var _local21:Number; var _local22:int; var _local23:Number; var _local24:int; var _local25:Number; _local6 = _arg2.m_vertexCount; _local7 = _arg2.m_normals; _local9 = _arg5.R; _local8 = _arg4.m_centroid; _local10 = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))); _local11 = (_arg5.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y))); _local9 = _arg3.R; _local8 = _arg2.m_centroid; _local10 = (_local10 - (_arg3.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y)))); _local11 = (_local11 - (_arg3.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y)))); _local12 = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y)); _local13 = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y)); _local14 = 0; _local15 = -(Number.MAX_VALUE); _local16 = 0; while (_local16 < _local6) { _local8 = _local7[_local16]; _local25 = ((_local8.x * _local12) + (_local8.y * _local13)); if (_local25 > _local15){ _local15 = _local25; _local14 = _local16; }; _local16++; }; _local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); _local18 = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1); _local19 = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5); _local20 = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0; _local21 = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5); if ((((_local19 > _local17)) && ((_local19 > _local21)))){ _local24 = -1; _local22 = _local18; _local23 = _local19; } else { if (_local21 > _local17){ _local24 = 1; _local22 = _local20; _local23 = _local21; } else { _arg1[0] = _local14; return (_local17); }; }; while (true) { if (_local24 == -1){ _local14 = (((_local22 - 1) >= 0)) ? (_local22 - 1) : (_local6 - 1); } else { _local14 = (((_local22 + 1) < _local6)) ? (_local22 + 1) : 0; }; _local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > _local23){ _local22 = _local14; _local23 = _local17; } else { break; }; }; _arg1[0] = _local22; return (_local23); } public static function TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local3 = _arg2.lowerBound; _local4 = _arg1.upperBound; _local5 = (_local3.x - _local4.x); _local6 = (_local3.y - _local4.y); _local3 = _arg1.lowerBound; _local4 = _arg2.upperBound; _local7 = (_local3.x - _local4.x); _local8 = (_local3.y - _local4.y); if ((((_local5 > 0)) || ((_local6 > 0)))){ return (false); }; if ((((_local7 > 0)) || ((_local8 > 0)))){ return (false); }; return (true); } } }//package Box2D.Collision
Section 8
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { import Box2D.Common.*; public class b2ContactID { b2internal var _key:uint; public var features:Features; public function b2ContactID(){ features = new Features(); super(); features._m_id = this; } public function Set(_arg1:b2ContactID):void{ key = _arg1._key; } public function Copy():b2ContactID{ var _local1:b2ContactID; _local1 = new b2ContactID(); _local1.key = key; return (_local1); } public function get key():uint{ return (_key); } public function set key(_arg1:uint):void{ _key = _arg1; features._referenceEdge = (_key & 0xFF); features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF); features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF); features._flip = (((_key & 4278190080) >> 24) & 0xFF); } } }//package Box2D.Collision
Section 9
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class b2ContactPoint { public var separation:Number; public var normal:b2Vec2; public var position:b2Vec2; public var restitution:Number; public var shape1:b2Shape; public var shape2:b2Shape; public var id:b2ContactID; public var friction:Number; public var velocity:b2Vec2; public function b2ContactPoint(){ position = new b2Vec2(); velocity = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 10
//b2Distance (Box2D.Collision.b2Distance) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Distance { private static var b2_gjkIters:int; private static var b2_gjkMaxIters:int; private static var s_saveB:Array = new Array(3); private static var s_simplex:b2Simplex = new b2Simplex(); private static var b2_gjkCalls:int; private static var s_saveA:Array = new Array(3); public static function Distance(_arg1:b2DistanceOutput, _arg2:b2SimplexCache, _arg3:b2DistanceInput):void{ var _local4:b2DistanceProxy; var _local5:b2DistanceProxy; var _local6:b2Transform; var _local7:b2Transform; var _local8:b2Simplex; var _local9:Array; var _local10:int; var _local11:Array; var _local12:Array; var _local13:int; var _local14:b2Vec2; var _local15:Number; var _local16:Number; var _local17:int; var _local18:b2Vec2; var _local19:int; var _local20:b2Vec2; var _local21:b2SimplexVertex; var _local22:Boolean; var _local23:Number; var _local24:Number; var _local25:b2Vec2; b2_gjkCalls++; _local4 = _arg3.proxyA; _local5 = _arg3.proxyB; _local6 = _arg3.transformA; _local7 = _arg3.transformB; _local8 = s_simplex; _local8.ReadCache(_arg2, _local4, _local6, _local5, _local7); _local9 = _local8.m_vertices; _local10 = 20; _local11 = s_saveA; _local12 = s_saveB; _local13 = 0; _local14 = _local8.GetClosestPoint(); _local15 = _local14.LengthSquared(); _local16 = _local15; _local19 = 0; while (_local19 < _local10) { _local13 = _local8.m_count; _local17 = 0; while (_local17 < _local13) { _local11[_local17] = _local9[_local17].indexA; _local12[_local17] = _local9[_local17].indexB; _local17++; }; switch (_local8.m_count){ case 1: break; case 2: _local8.Solve2(); break; case 3: _local8.Solve3(); break; default: b2Settings.b2Assert(false); }; if (_local8.m_count == 3){ break; }; _local18 = _local8.GetClosestPoint(); _local16 = _local18.LengthSquared(); if (_local16 > _local15){ }; _local15 = _local16; _local20 = _local8.GetSearchDirection(); if (_local20.LengthSquared() < (Number.MIN_VALUE * Number.MIN_VALUE)){ break; }; _local21 = _local9[_local8.m_count]; _local21.indexA = _local4.GetSupport(b2Math.MulTMV(_local6.R, _local20.GetNegative())); _local21.wA = b2Math.MulX(_local6, _local4.GetVertex(_local21.indexA)); _local21.indexB = _local5.GetSupport(b2Math.MulTMV(_local7.R, _local20)); _local21.wB = b2Math.MulX(_local7, _local5.GetVertex(_local21.indexB)); _local21.w = b2Math.SubtractVV(_local21.wB, _local21.wA); _local19++; b2_gjkIters++; _local22 = false; _local17 = 0; while (_local17 < _local13) { if ((((_local21.indexA == _local11[_local17])) && ((_local21.indexB == _local12[_local17])))){ _local22 = true; break; }; _local17++; }; if (_local22){ break; }; _local8.m_count++; }; b2_gjkMaxIters = b2Math.Max(b2_gjkMaxIters, _local19); _local8.GetWitnessPoints(_arg1.pointA, _arg1.pointB); _arg1.distance = b2Math.SubtractVV(_arg1.pointA, _arg1.pointB).Length(); _arg1.iterations = _local19; _local8.WriteCache(_arg2); if (_arg3.useRadii){ _local23 = _local4.m_radius; _local24 = _local5.m_radius; if ((((_arg1.distance > (_local23 + _local24))) && ((_arg1.distance > Number.MIN_VALUE)))){ _arg1.distance = (_arg1.distance - (_local23 + _local24)); _local25 = b2Math.SubtractVV(_arg1.pointB, _arg1.pointA); _local25.Normalize(); _arg1.pointA.x = (_arg1.pointA.x + (_local23 * _local25.x)); _arg1.pointA.y = (_arg1.pointA.y + (_local23 * _local25.y)); _arg1.pointB.x = (_arg1.pointB.x - (_local24 * _local25.x)); _arg1.pointB.y = (_arg1.pointB.y - (_local24 * _local25.y)); } else { _local18 = new b2Vec2(); _local18.x = (0.5 * (_arg1.pointA.x + _arg1.pointB.x)); _local18.y = (0.5 * (_arg1.pointA.y + _arg1.pointB.y)); _arg1.pointA.x = (_arg1.pointB.x = _local18.x); _arg1.pointA.y = (_arg1.pointB.y = _local18.y); _arg1.distance = 0; }; }; } } }//package Box2D.Collision
Section 11
//b2DistanceInput (Box2D.Collision.b2DistanceInput) package Box2D.Collision { import Box2D.Common.Math.*; public class b2DistanceInput { public var useRadii:Boolean; public var proxyA:b2DistanceProxy; public var proxyB:b2DistanceProxy; public var transformA:b2Transform; public var transformB:b2Transform; } }//package Box2D.Collision
Section 12
//b2DistanceOutput (Box2D.Collision.b2DistanceOutput) package Box2D.Collision { import Box2D.Common.Math.*; public class b2DistanceOutput { public var pointA:b2Vec2; public var pointB:b2Vec2; public var distance:Number; public var iterations:int; public function b2DistanceOutput(){ pointA = new b2Vec2(); pointB = new b2Vec2(); super(); } } }//package Box2D.Collision
Section 13
//b2DistanceProxy (Box2D.Collision.b2DistanceProxy) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2DistanceProxy { public var m_vertices:Array; public var m_radius:Number; public var m_count:int; public function Set(_arg1:b2Shape):void{ var _local2:b2CircleShape; var _local3:b2PolygonShape; switch (_arg1.GetType()){ case b2Shape.e_circleShape: _local2 = (_arg1 as b2CircleShape); m_vertices = new Array(1, true); m_vertices[0] = _local2.m_p; m_count = 1; m_radius = _local2.m_radius; break; case b2Shape.e_polygonShape: _local3 = (_arg1 as b2PolygonShape); m_vertices = _local3.m_vertices; m_count = _local3.m_vertexCount; m_radius = _local3.m_radius; break; default: b2Settings.b2Assert(false); }; } public function GetSupportVertex(_arg1:b2Vec2):b2Vec2{ var _local2:int; var _local3:Number; var _local4:int; var _local5:Number; _local2 = 0; _local3 = ((m_vertices[0].x * _arg1.x) + (m_vertices[0].y * _arg1.y)); _local4 = 1; while (_local4 < m_count) { _local5 = ((m_vertices[_local4].x * _arg1.x) + (m_vertices[_local4].y * _arg1.y)); if (_local5 > _local3){ _local2 = _local4; _local3 = _local5; }; _local4++; }; return (m_vertices[_local2]); } public function GetVertexCount():int{ return (m_count); } public function GetSupport(_arg1:b2Vec2):Number{ var _local2:int; var _local3:Number; var _local4:int; var _local5:Number; _local2 = 0; _local3 = ((m_vertices[0].x * _arg1.x) + (m_vertices[0].y * _arg1.y)); _local4 = 1; while (_local4 < m_count) { _local5 = ((m_vertices[_local4].x * _arg1.x) + (m_vertices[_local4].y * _arg1.y)); if (_local5 > _local3){ _local2 = _local4; _local3 = _local5; }; _local4++; }; return (_local2); } public function GetVertex(_arg1:int):b2Vec2{ b2Settings.b2Assert((((0 <= _arg1)) && ((_arg1 < m_count)))); return (m_vertices[_arg1]); } } }//package Box2D.Collision
Section 14
//b2DynamicTree (Box2D.Collision.b2DynamicTree) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2DynamicTree { private var m_insertionCount:int; private var m_root:b2DynamicTreeNode; private var m_freeList:b2DynamicTreeNode; private var m_path:uint; public function b2DynamicTree(){ m_root = null; m_freeList = null; m_path = 0; m_insertionCount = 0; } private function RemoveLeaf(_arg1:b2DynamicTreeNode):void{ var _local2:b2DynamicTreeNode; var _local3:b2DynamicTreeNode; var _local4:b2DynamicTreeNode; var _local5:b2AABB; if (_arg1 == m_root){ m_root = null; return; }; _local2 = _arg1.parent; _local3 = _local2.parent; if (_local2.child1 == _arg1){ _local4 = _local2.child2; } else { _local4 = _local2.child1; }; if (_local3){ if (_local3.child1 == _local2){ _local3.child1 = _local4; } else { _local3.child2 = _local4; }; _local4.parent = _local3; FreeNode(_local2); while (_local3) { _local5 = _local3.aabb; _local3.aabb = b2AABB.Combine(_local3.child1.aabb, _local3.child2.aabb); if (_local5.Contains(_local3.aabb)){ break; }; _local3 = _local3.parent; }; } else { m_root = _local4; _local4.parent = null; FreeNode(_local2); }; } public function GetFatAABB(_arg1:b2DynamicTreeNode):b2AABB{ return (_arg1.aabb); } public function Query(_arg1:Function, _arg2:b2AABB):void{ var _local3:Array; var _local4:int; var _local5:b2DynamicTreeNode; var _local6:Boolean; if (m_root == null){ return; }; _local3 = new Array(); _local4 = 0; var _temp1 = _local4; _local4 = (_local4 + 1); var _local7 = _temp1; _local3[_local7] = m_root; while (_local4 > 0) { --_local4; _local5 = _local3[_local4]; if (_local5.aabb.TestOverlap(_arg2)){ if (_local5.IsLeaf()){ _local6 = _arg1(_local5); if (!_local6){ return; }; } else { var _temp2 = _local4; _local4 = (_local4 + 1); var _local8 = _temp2; _local3[_local8] = _local5.child1; var _temp3 = _local4; _local4 = (_local4 + 1); var _local9 = _temp3; _local3[_local9] = _local5.child2; }; }; }; } public function RayCast(_arg1:Function, _arg2:b2RayCastInput):void{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:Number; var _local9:b2AABB; var _local10:Number; var _local11:Number; var _local12:Array; var _local13:int; var _local14:b2DynamicTreeNode; var _local15:b2Vec2; var _local16:b2Vec2; var _local17:Number; var _local18:b2RayCastInput; if (m_root == null){ return; }; _local3 = _arg2.p1; _local4 = _arg2.p2; _local5 = b2Math.SubtractVV(_local3, _local4); _local5.Normalize(); _local6 = b2Math.CrossFV(1, _local5); _local7 = b2Math.AbsV(_local6); _local8 = _arg2.maxFraction; _local9 = new b2AABB(); _local10 = (_local3.x + (_local8 * (_local4.x - _local3.x))); _local11 = (_local3.y + (_local8 * (_local4.y - _local3.y))); _local9.lowerBound.x = Math.min(_local3.x, _local10); _local9.lowerBound.y = Math.min(_local3.y, _local11); _local9.upperBound.x = Math.max(_local3.x, _local10); _local9.upperBound.y = Math.max(_local3.y, _local11); _local12 = new Array(); _local13 = 0; var _temp1 = _local13; _local13 = (_local13 + 1); var _local19 = _temp1; _local12[_local19] = m_root; while (_local13 > 0) { --_local13; _local14 = _local12[_local13]; if (_local14.aabb.TestOverlap(_local9) == false){ } else { _local15 = _local14.aabb.GetCenter(); _local16 = _local14.aabb.GetExtents(); _local17 = ((Math.abs(((_local6.x * (_local3.x - _local15.x)) + (_local6.y * (_local3.y - _local15.y)))) - (_local7.x * _local16.x)) - (_local7.y * _local16.y)); if (_local17 > 0){ } else { if (_local14.IsLeaf()){ _local18 = new b2RayCastInput(); _local18.p1 = _arg2.p1; _local18.p2 = _arg2.p2; _local18.maxFraction = _arg2.maxFraction; _local8 = _arg1(_local18, _local14); if (_local8 == 0){ return; }; _local10 = (_local3.x + (_local8 * (_local4.x - _local3.x))); _local11 = (_local3.y + (_local8 * (_local4.y - _local3.y))); _local9.lowerBound.x = Math.min(_local3.x, _local10); _local9.lowerBound.y = Math.min(_local3.y, _local11); _local9.upperBound.x = Math.max(_local3.x, _local10); _local9.upperBound.y = Math.max(_local3.y, _local11); } else { var _temp2 = _local13; _local13 = (_local13 + 1); var _local20 = _temp2; _local12[_local20] = _local14.child1; var _temp3 = _local13; _local13 = (_local13 + 1); var _local21 = _temp3; _local12[_local21] = _local14.child2; }; }; }; }; } public function GetUserData(_arg1:b2DynamicTreeNode){ return (_arg1.userData); } private function FreeNode(_arg1:b2DynamicTreeNode):void{ _arg1.parent = m_freeList; m_freeList = _arg1; } public function Rebalance(_arg1:int):void{ var _local2:int; var _local3:b2DynamicTreeNode; var _local4:uint; if (m_root == null){ return; }; _local2 = 0; while (_local2 < _arg1) { _local3 = m_root; _local4 = 0; while (_local3.IsLeaf() == false) { _local3 = (((m_path >> _local4) & 1)) ? _local3.child2 : _local3.child1; _local4 = ((_local4 + 1) & 31); }; m_path++; RemoveLeaf(_local3); InsertLeaf(_local3); _local2++; }; } public function CreateProxy(_arg1:b2AABB, _arg2):b2DynamicTreeNode{ var _local3:b2DynamicTreeNode; var _local4:Number; var _local5:Number; _local3 = AllocateNode(); _local4 = b2Settings.b2_aabbExtension; _local5 = b2Settings.b2_aabbExtension; _local3.aabb.lowerBound.x = (_arg1.lowerBound.x - _local4); _local3.aabb.lowerBound.y = (_arg1.lowerBound.y - _local5); _local3.aabb.upperBound.x = (_arg1.upperBound.x + _local4); _local3.aabb.upperBound.y = (_arg1.upperBound.y + _local5); _local3.userData = _arg2; InsertLeaf(_local3); return (_local3); } public function DestroyProxy(_arg1:b2DynamicTreeNode):void{ RemoveLeaf(_arg1); FreeNode(_arg1); } private function InsertLeaf(_arg1:b2DynamicTreeNode):void{ var _local2:b2Vec2; var _local3:b2DynamicTreeNode; var _local4:b2DynamicTreeNode; var _local5:b2DynamicTreeNode; var _local6:*; var _local7:*; var _local8:*; var _local9:*; m_insertionCount++; if (m_root == null){ m_root = _arg1; m_root.parent = null; return; }; _local2 = _arg1.aabb.GetCenter(); _local3 = m_root; if (_local3.IsLeaf() == false){ do { _local6 = _local3.child1; _local7 = _local3.child2; _local8 = (Math.abs((((_local6.aabb.lowerBound.x + _local6.aabb.upperBound.x) / 2) - _local2.x)) + Math.abs((((_local6.aabb.lowerBound.y + _local6.aabb.upperBound.y) / 2) - _local2.y))); _local9 = (Math.abs((((_local7.aabb.lowerBound.x + _local7.aabb.upperBound.x) / 2) - _local2.x)) + Math.abs((((_local7.aabb.lowerBound.y + _local7.aabb.upperBound.y) / 2) - _local2.y))); if (_local8 < _local9){ _local3 = _local6; } else { _local3 = _local7; }; } while (_local3.IsLeaf() == false); }; _local4 = _local3.parent; _local5 = AllocateNode(); _local5.parent = _local4; _local5.userData = null; _local5.aabb.Combine(_arg1.aabb, _local3.aabb); if (_local4){ if (_local3.parent.child1 == _local3){ _local4.child1 = _local5; } else { _local4.child2 = _local5; }; _local5.child1 = _local3; _local5.child2 = _arg1; _local3.parent = _local5; _arg1.parent = _local5; do { } while (!(_local4.aabb.Contains(_local5.aabb))); } else { _local5.child1 = _local3; _local5.child2 = _arg1; _local3.parent = _local5; _arg1.parent = _local5; m_root = _local5; }; } public function MoveProxy(_arg1:b2DynamicTreeNode, _arg2:b2AABB, _arg3:b2Vec2):Boolean{ var _local4:Number; var _local5:Number; b2Settings.b2Assert(_arg1.IsLeaf()); if (_arg1.aabb.Contains(_arg2)){ return (false); }; RemoveLeaf(_arg1); _local4 = (b2Settings.b2_aabbExtension + (b2Settings.b2_aabbMultiplier * ((_arg3.x > 0)) ? _arg3.x : -(_arg3.x))); _local5 = (b2Settings.b2_aabbExtension + (b2Settings.b2_aabbMultiplier * ((_arg3.y > 0)) ? _arg3.y : -(_arg3.y))); _arg1.aabb.lowerBound.x = (_arg2.lowerBound.x - _local4); _arg1.aabb.lowerBound.y = (_arg2.lowerBound.y - _local5); _arg1.aabb.upperBound.x = (_arg2.upperBound.x + _local4); _arg1.aabb.upperBound.y = (_arg2.upperBound.y + _local5); InsertLeaf(_arg1); return (true); } private function AllocateNode():b2DynamicTreeNode{ var _local1:b2DynamicTreeNode; if (m_freeList){ _local1 = m_freeList; m_freeList = _local1.parent; _local1.parent = null; _local1.child1 = null; _local1.child2 = null; return (_local1); }; return (new b2DynamicTreeNode()); } } }//package Box2D.Collision
Section 15
//b2DynamicTreeBroadPhase (Box2D.Collision.b2DynamicTreeBroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; public class b2DynamicTreeBroadPhase implements IBroadPhase { private var m_moveBuffer:Array; private var m_pairBuffer:Array; private var m_pairCount:int;// = 0 private var m_proxyCount:int; private var m_tree:b2DynamicTree; public function b2DynamicTreeBroadPhase(){ m_tree = new b2DynamicTree(); m_moveBuffer = new Array(); m_pairBuffer = new Array(); m_pairCount = 0; super(); } public function Validate():void{ } private function UnBufferMove(_arg1:b2DynamicTreeNode):void{ var _local2:int; _local2 = m_moveBuffer.indexOf(_arg1); m_moveBuffer.splice(_local2, 1); } public function Rebalance(_arg1:int):void{ m_tree.Rebalance(_arg1); } private function BufferMove(_arg1:b2DynamicTreeNode):void{ m_moveBuffer[m_moveBuffer.length] = _arg1; } private function ComparePairs(_arg1:b2DynamicTreePair, _arg2:b2DynamicTreePair):int{ return (0); } public function GetProxyCount():int{ return (m_proxyCount); } public function GetFatAABB(_arg1):b2AABB{ return (m_tree.GetFatAABB(_arg1)); } public function RayCast(_arg1:Function, _arg2:b2RayCastInput):void{ m_tree.RayCast(_arg1, _arg2); } public function GetUserData(_arg1){ return (m_tree.GetUserData(_arg1)); } public function Query(_arg1:Function, _arg2:b2AABB):void{ m_tree.Query(_arg1, _arg2); } public function UpdatePairs(_arg1:Function):void{ var queryProxy:b2DynamicTreeNode; var i:int; var QueryCallback:Function; var fatAABB:b2AABB; var primaryPair:b2DynamicTreePair; var userDataA:*; var userDataB:*; var pair:b2DynamicTreePair; var callback = _arg1; m_pairCount = 0; for each (queryProxy in m_moveBuffer) { QueryCallback = function (_arg1:b2DynamicTreeNode):Boolean{ var _local2:b2DynamicTreePair; if (_arg1 == queryProxy){ return (true); }; if (m_pairCount == m_pairBuffer.length){ m_pairBuffer[m_pairCount] = new b2DynamicTreePair(); }; _local2 = m_pairBuffer[m_pairCount]; _local2.proxyA = ((_arg1 < queryProxy)) ? _arg1 : queryProxy; _local2.proxyB = ((_arg1 >= queryProxy)) ? _arg1 : queryProxy; m_pairCount++; return (true); }; fatAABB = m_tree.GetFatAABB(queryProxy); m_tree.Query(QueryCallback, fatAABB); }; m_moveBuffer.length = 0; i = 0; while (i < m_pairCount) { primaryPair = m_pairBuffer[i]; userDataA = m_tree.GetUserData(primaryPair.proxyA); userDataB = m_tree.GetUserData(primaryPair.proxyB); callback(userDataA, userDataB); i = (i + 1); while (i < m_pairCount) { pair = m_pairBuffer[i]; if (((!((pair.proxyA == primaryPair.proxyA))) || (!((pair.proxyB == primaryPair.proxyB))))){ break; }; i = (i + 1); }; }; } public function CreateProxy(_arg1:b2AABB, _arg2){ var _local3:b2DynamicTreeNode; _local3 = m_tree.CreateProxy(_arg1, _arg2); m_proxyCount++; BufferMove(_local3); return (_local3); } public function DestroyProxy(_arg1):void{ UnBufferMove(_arg1); m_proxyCount--; m_tree.DestroyProxy(_arg1); } public function TestOverlap(_arg1, _arg2):Boolean{ var _local3:b2AABB; var _local4:b2AABB; _local3 = m_tree.GetFatAABB(_arg1); _local4 = m_tree.GetFatAABB(_arg2); return (_local3.TestOverlap(_local4)); } public function MoveProxy(_arg1, _arg2:b2AABB, _arg3:b2Vec2):void{ var _local4:Boolean; _local4 = m_tree.MoveProxy(_arg1, _arg2, _arg3); if (_local4){ BufferMove(_arg1); }; } } }//package Box2D.Collision
Section 16
//b2DynamicTreeNode (Box2D.Collision.b2DynamicTreeNode) package Box2D.Collision { public class b2DynamicTreeNode { public var aabb:b2AABB; public var parent:b2DynamicTreeNode; public var userData; public var child2:b2DynamicTreeNode; public var child1:b2DynamicTreeNode; public function b2DynamicTreeNode(){ aabb = new b2AABB(); super(); } public function IsLeaf():Boolean{ return ((child1 == null)); } } }//package Box2D.Collision
Section 17
//b2DynamicTreePair (Box2D.Collision.b2DynamicTreePair) package Box2D.Collision { public class b2DynamicTreePair { public var proxyA:b2DynamicTreeNode; public var proxyB:b2DynamicTreeNode; } }//package Box2D.Collision
Section 18
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var m_pointCount:int;// = 0 public var m_localPlaneNormal:b2Vec2; public var m_type:int; public var m_localPoint:b2Vec2; public var m_points:Array; public static const e_circles:int = 1; public static const e_faceA:int = 2; public static const e_faceB:int = 4; public function b2Manifold(){ var _local1:int; m_pointCount = 0; super(); m_points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { m_points[_local1] = new b2ManifoldPoint(); _local1++; }; m_localPlaneNormal = new b2Vec2(); m_localPoint = new b2Vec2(); } public function Set(_arg1:b2Manifold):void{ var _local2:int; m_pointCount = _arg1.m_pointCount; _local2 = 0; while (_local2 < b2Settings.b2_maxManifoldPoints) { (m_points[_local2] as b2ManifoldPoint).Set(_arg1.m_points[_local2]); _local2++; }; m_localPlaneNormal.SetV(_arg1.m_localPlaneNormal); m_localPoint.SetV(_arg1.m_localPoint); m_type = _arg1.m_type; } public function Copy():b2Manifold{ var _local1:b2Manifold; _local1 = new b2Manifold(); _local1.Set(this); return (_local1); } public function Reset():void{ var _local1:int; _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { (m_points[_local1] as b2ManifoldPoint).Reset(); _local1++; }; m_localPlaneNormal.SetZero(); m_localPoint.SetZero(); m_type = 0; m_pointCount = 0; } } }//package Box2D.Collision
Section 19
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ManifoldPoint { public var m_tangentImpulse:Number; public var m_id:b2ContactID; public var m_localPoint:b2Vec2; public var m_normalImpulse:Number; public function b2ManifoldPoint(){ m_localPoint = new b2Vec2(); m_id = new b2ContactID(); super(); Reset(); } public function Set(_arg1:b2ManifoldPoint):void{ m_localPoint.SetV(_arg1.m_localPoint); m_normalImpulse = _arg1.m_normalImpulse; m_tangentImpulse = _arg1.m_tangentImpulse; m_id.Set(_arg1.m_id); } public function Reset():void{ m_localPoint.SetZero(); m_normalImpulse = 0; m_tangentImpulse = 0; m_id.key = 0; } } }//package Box2D.Collision
Section 20
//b2OBB (Box2D.Collision.b2OBB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2OBB { public var R:b2Mat22; public var center:b2Vec2; public var extents:b2Vec2; public function b2OBB(){ R = new b2Mat22(); center = new b2Vec2(); extents = new b2Vec2(); super(); } } }//package Box2D.Collision
Section 21
//b2RayCastInput (Box2D.Collision.b2RayCastInput) package Box2D.Collision { import Box2D.Common.Math.*; public class b2RayCastInput { public var p1:b2Vec2; public var maxFraction:Number; public var p2:b2Vec2; public function b2RayCastInput(_arg1:b2Vec2=null, _arg2:b2Vec2=null, _arg3:Number=1){ p1 = new b2Vec2(); p2 = new b2Vec2(); super(); if (_arg1){ this.p1.SetV(_arg1); }; if (_arg2){ this.p2.SetV(_arg2); }; this.maxFraction = _arg3; } } }//package Box2D.Collision
Section 22
//b2RayCastOutput (Box2D.Collision.b2RayCastOutput) package Box2D.Collision { import Box2D.Common.Math.*; public class b2RayCastOutput { public var fraction:Number; public var normal:b2Vec2; public function b2RayCastOutput(){ normal = new b2Vec2(); super(); } } }//package Box2D.Collision
Section 23
//b2SeparationFunction (Box2D.Collision.b2SeparationFunction) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; class b2SeparationFunction { public var m_proxyA:b2DistanceProxy; public var m_proxyB:b2DistanceProxy; public var m_type:int; public var m_localPoint:b2Vec2; public var m_axis:b2Vec2; public static const e_faceA:int = 2; public static const e_faceB:int = 4; public static const e_points:int = 1; function b2SeparationFunction(){ m_localPoint = new b2Vec2(); m_axis = new b2Vec2(); super(); } public function Initialize(_arg1:b2SimplexCache, _arg2:b2DistanceProxy, _arg3:b2Transform, _arg4:b2DistanceProxy, _arg5:b2Transform):void{ var _local6:int; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:b2Mat22; var _local20:b2Vec2; var _local21:Number; var _local22:Number; var _local23:b2Vec2; var _local24:b2Vec2; var _local25:b2Vec2; var _local26:b2Vec2; var _local27:Number; var _local28:Number; var _local29:b2Vec2; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; m_proxyA = _arg2; m_proxyB = _arg4; _local6 = _arg1.count; b2Settings.b2Assert((((0 < _local6)) && ((_local6 < 3)))); if (_local6 == 1){ m_type = e_points; _local7 = m_proxyA.GetVertex(_arg1.indexA[0]); _local10 = m_proxyB.GetVertex(_arg1.indexB[0]); _local20 = _local7; _local19 = _arg3.R; _local13 = (_arg3.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local14 = (_arg3.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local20 = _local10; _local19 = _arg5.R; _local15 = (_arg5.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local16 = (_arg5.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); m_axis.x = (_local15 - _local13); m_axis.y = (_local16 - _local14); m_axis.Normalize(); } else { if (_arg1.indexB[0] == _arg1.indexB[1]){ m_type = e_faceA; _local8 = m_proxyA.GetVertex(_arg1.indexA[0]); _local9 = m_proxyA.GetVertex(_arg1.indexA[1]); _local10 = m_proxyB.GetVertex(_arg1.indexB[0]); m_localPoint.x = (0.5 * (_local8.x + _local9.x)); m_localPoint.y = (0.5 * (_local8.y + _local9.y)); m_axis = b2Math.CrossVF(b2Math.SubtractVV(_local9, _local8), 1); m_axis.Normalize(); _local20 = m_axis; _local19 = _arg3.R; _local17 = ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y)); _local18 = ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y)); _local20 = m_localPoint; _local19 = _arg3.R; _local13 = (_arg3.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local14 = (_arg3.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local20 = _local10; _local19 = _arg5.R; _local15 = (_arg5.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local16 = (_arg5.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local21 = (((_local15 - _local13) * _local17) + ((_local16 - _local14) * _local18)); if (_local21 < 0){ m_axis.NegativeSelf(); }; } else { if (_arg1.indexA[0] == _arg1.indexA[0]){ m_type = e_faceB; _local11 = m_proxyB.GetVertex(_arg1.indexB[0]); _local12 = m_proxyB.GetVertex(_arg1.indexB[1]); _local7 = m_proxyA.GetVertex(_arg1.indexA[0]); m_localPoint.x = (0.5 * (_local11.x + _local12.x)); m_localPoint.y = (0.5 * (_local11.y + _local12.y)); m_axis = b2Math.CrossVF(b2Math.SubtractVV(_local12, _local11), 1); m_axis.Normalize(); _local20 = m_axis; _local19 = _arg5.R; _local17 = ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y)); _local18 = ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y)); _local20 = m_localPoint; _local19 = _arg5.R; _local15 = (_arg5.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local16 = (_arg5.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local20 = _local7; _local19 = _arg3.R; _local13 = (_arg3.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local14 = (_arg3.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local21 = (((_local13 - _local15) * _local17) + ((_local14 - _local16) * _local18)); if (_local21 < 0){ m_axis.NegativeSelf(); }; } else { _local8 = m_proxyA.GetVertex(_arg1.indexA[0]); _local9 = m_proxyA.GetVertex(_arg1.indexA[1]); _local11 = m_proxyB.GetVertex(_arg1.indexB[0]); _local12 = m_proxyB.GetVertex(_arg1.indexB[1]); _local23 = b2Math.MulX(_arg3, _local7); _local24 = b2Math.MulMV(_arg3.R, b2Math.SubtractVV(_local9, _local8)); _local25 = b2Math.MulX(_arg5, _local10); _local26 = b2Math.MulMV(_arg5.R, b2Math.SubtractVV(_local12, _local11)); _local27 = ((_local24.x * _local24.x) + (_local24.y * _local24.y)); _local28 = ((_local26.x * _local26.x) + (_local26.y * _local26.y)); _local29 = b2Math.SubtractVV(_local26, _local24); _local30 = ((_local24.x * _local29.x) + (_local24.y * _local29.y)); _local31 = ((_local26.x * _local29.x) + (_local26.y * _local29.y)); _local32 = ((_local24.x * _local26.x) + (_local24.y * _local26.y)); _local33 = ((_local27 * _local28) - (_local32 * _local32)); _local21 = 0; if (_local33 != 0){ _local21 = b2Math.Clamp((((_local32 * _local31) - (_local30 * _local28)) / _local33), 0, 1); }; _local34 = (((_local32 * _local21) + _local31) / _local28); if (_local34 < 0){ _local34 = 0; _local21 = b2Math.Clamp(((_local32 - _local30) / _local27), 0, 1); }; _local7 = new b2Vec2(); _local7.x = (_local8.x + (_local21 * (_local9.x - _local8.x))); _local7.y = (_local8.y + (_local21 * (_local9.y - _local8.y))); _local10 = new b2Vec2(); _local10.x = (_local11.x + (_local21 * (_local12.x - _local11.x))); _local10.y = (_local11.y + (_local21 * (_local12.y - _local11.y))); if ((((_local21 == 0)) || ((_local21 == 1)))){ m_type = e_faceB; m_axis = b2Math.CrossVF(b2Math.SubtractVV(_local12, _local11), 1); m_localPoint = _local10; _local20 = m_axis; _local19 = _arg5.R; _local17 = ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y)); _local18 = ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y)); _local20 = m_localPoint; _local19 = _arg5.R; _local15 = (_arg5.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local16 = (_arg5.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local20 = _local7; _local19 = _arg3.R; _local13 = (_arg3.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local14 = (_arg3.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local22 = (((_local13 - _local15) * _local17) + ((_local14 - _local16) * _local18)); if (_local21 < 0){ m_axis.NegativeSelf(); }; } else { m_type = e_faceA; m_axis = b2Math.CrossVF(b2Math.SubtractVV(_local9, _local8), 1); m_localPoint = _local7; _local20 = m_axis; _local19 = _arg3.R; _local17 = ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y)); _local18 = ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y)); _local20 = m_localPoint; _local19 = _arg3.R; _local13 = (_arg3.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local14 = (_arg3.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local20 = _local10; _local19 = _arg5.R; _local15 = (_arg5.position.x + ((_local19.col1.x * _local20.x) + (_local19.col2.x * _local20.y))); _local16 = (_arg5.position.y + ((_local19.col1.y * _local20.x) + (_local19.col2.y * _local20.y))); _local22 = (((_local15 - _local13) * _local17) + ((_local16 - _local14) * _local18)); if (_local21 < 0){ m_axis.NegativeSelf(); }; }; }; }; }; } public function Evaluate(_arg1:b2Transform, _arg2:b2Transform):Number{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:Number; var _local10:b2Vec2; switch (m_type){ case e_points: _local3 = b2Math.MulTMV(_arg1.R, m_axis); _local4 = b2Math.MulTMV(_arg2.R, m_axis.GetNegative()); _local5 = m_proxyA.GetSupportVertex(_local3); _local6 = m_proxyB.GetSupportVertex(_local4); _local7 = b2Math.MulX(_arg1, _local5); _local8 = b2Math.MulX(_arg2, _local6); _local9 = (((_local8.x - _local7.x) * m_axis.x) + ((_local8.y - _local7.y) * m_axis.y)); return (_local9); case e_faceA: _local10 = b2Math.MulMV(_arg1.R, m_axis); _local7 = b2Math.MulX(_arg1, m_localPoint); _local4 = b2Math.MulTMV(_arg2.R, _local10.GetNegative()); _local6 = m_proxyB.GetSupportVertex(_local4); _local8 = b2Math.MulX(_arg2, _local6); _local9 = (((_local8.x - _local7.x) * _local10.x) + ((_local8.y - _local7.y) * _local10.y)); return (_local9); case e_faceB: _local10 = b2Math.MulMV(_arg2.R, m_axis); _local8 = b2Math.MulX(_arg2, m_localPoint); _local3 = b2Math.MulTMV(_arg1.R, _local10.GetNegative()); _local5 = m_proxyA.GetSupportVertex(_local3); _local7 = b2Math.MulX(_arg1, _local5); _local9 = (((_local7.x - _local8.x) * _local10.x) + ((_local7.y - _local8.y) * _local10.y)); return (_local9); default: b2Settings.b2Assert(false); return (0); }; } } }//package Box2D.Collision
Section 24
//b2Simplex (Box2D.Collision.b2Simplex) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; class b2Simplex { public var m_count:int; public var m_v1:b2SimplexVertex; public var m_v2:b2SimplexVertex; public var m_vertices:Array; public var m_v3:b2SimplexVertex; function b2Simplex(){ m_v1 = new b2SimplexVertex(); m_v2 = new b2SimplexVertex(); m_v3 = new b2SimplexVertex(); m_vertices = new Array(3); super(); m_vertices[0] = m_v1; m_vertices[1] = m_v2; m_vertices[2] = m_v3; } public function WriteCache(_arg1:b2SimplexCache):void{ var _local2:Array; var _local3:int; _arg1.metric = GetMetric(); _arg1.count = uint(m_count); _local2 = m_vertices; _local3 = 0; while (_local3 < m_count) { _arg1.indexA[_local3] = uint(_local2[_local3].indexA); _arg1.indexB[_local3] = uint(_local2[_local3].indexB); _local3++; }; } public function GetMetric():Number{ switch (m_count){ case 0: b2Settings.b2Assert(false); return (0); case 1: return (0); case 2: return (b2Math.SubtractVV(m_v1.w, m_v2.w).Length()); case 3: return (b2Math.CrossVV(b2Math.SubtractVV(m_v2.w, m_v1.w), b2Math.SubtractVV(m_v3.w, m_v1.w))); default: b2Settings.b2Assert(false); return (0); }; } public function GetSearchDirection():b2Vec2{ var _local1:b2Vec2; var _local2:Number; switch (m_count){ case 1: return (m_v1.w.GetNegative()); case 2: _local1 = b2Math.SubtractVV(m_v2.w, m_v1.w); _local2 = b2Math.CrossVV(_local1, m_v1.w.GetNegative()); if (_local2 > 0){ return (b2Math.CrossFV(1, _local1)); }; return (b2Math.CrossVF(_local1, 1)); default: b2Settings.b2Assert(false); return (new b2Vec2()); }; } public function ReadCache(_arg1:b2SimplexCache, _arg2:b2DistanceProxy, _arg3:b2Transform, _arg4:b2DistanceProxy, _arg5:b2Transform):void{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:Array; var _local9:int; var _local10:b2SimplexVertex; var _local11:Number; var _local12:Number; b2Settings.b2Assert((((0 <= _arg1.count)) && ((_arg1.count <= 3)))); m_count = _arg1.count; _local8 = m_vertices; _local9 = 0; while (_local9 < m_count) { _local10 = _local8[_local9]; _local10.indexA = _arg1.indexA[_local9]; _local10.indexB = _arg1.indexB[_local9]; _local6 = _arg2.GetVertex(_local10.indexA); _local7 = _arg4.GetVertex(_local10.indexB); _local10.wA = b2Math.MulX(_arg3, _local6); _local10.wB = b2Math.MulX(_arg5, _local6); _local10.w = b2Math.SubtractVV(_local10.wB, _local10.wA); _local10.a = 0; _local9++; }; if (m_count > 1){ _local11 = _arg1.metric; _local12 = GetMetric(); if ((((((_local12 < (0.5 * _local11))) || (((2 * _local11) < _local12)))) || ((_local12 < Number.MIN_VALUE)))){ m_count = 0; }; }; if (m_count == 0){ _local10 = _local8[0]; _local10.indexA = 0; _local10.indexB = 0; _local6 = _arg2.GetVertex(0); _local7 = _arg4.GetVertex(0); _local10.wA = b2Math.MulX(_arg3, _local6); _local10.wB = b2Math.MulX(_arg5, _local7); _local10.w = b2Math.SubtractVV(_local10.wB, _local10.wA); m_count = 1; }; } public function GetWitnessPoints(_arg1:b2Vec2, _arg2:b2Vec2):void{ switch (m_count){ case 0: b2Settings.b2Assert(false); break; case 1: _arg1.SetV(m_v1.wA); _arg2.SetV(m_v1.wB); break; case 2: _arg1.x = ((m_v1.a * m_v1.wA.x) + (m_v2.a * m_v2.wA.x)); _arg1.y = ((m_v1.a * m_v1.wA.y) + (m_v2.a * m_v2.wA.y)); _arg2.x = ((m_v1.a * m_v1.wB.x) + (m_v2.a * m_v2.wB.x)); _arg2.y = ((m_v1.a * m_v1.wB.y) + (m_v2.a * m_v2.wB.y)); break; case 3: _arg2.x = (_arg1.x = (((m_v1.a * m_v1.wA.x) + (m_v2.a * m_v2.wA.x)) + (m_v3.a * m_v3.wA.x))); _arg2.y = (_arg1.y = (((m_v1.a * m_v1.wA.y) + (m_v2.a * m_v2.wA.y)) + (m_v3.a * m_v3.wA.y))); break; default: b2Settings.b2Assert(false); break; }; } public function Solve2():void{ var _local1:b2Vec2; var _local2:b2Vec2; var _local3:b2Vec2; var _local4:Number; var _local5:Number; var _local6:Number; _local1 = m_v1.w; _local2 = m_v2.w; _local3 = b2Math.SubtractVV(_local2, _local1); _local4 = -(((_local1.x * _local3.x) + (_local1.y * _local3.y))); if (_local4 <= 0){ m_v1.a = 1; m_count = 1; return; }; _local5 = ((_local2.x * _local3.x) + (_local2.y * _local3.y)); if (_local5 <= 0){ m_v2.a = 1; m_count = 1; m_v1.Set(m_v2); return; }; _local6 = (1 / (_local5 + _local4)); m_v1.a = (_local5 * _local6); m_v2.a = (_local4 * _local6); m_count = 2; } public function Solve3():void{ var _local1:b2Vec2; var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2Vec2; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Vec2; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:b2Vec2; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local1 = m_v1.w; _local2 = m_v2.w; _local3 = m_v3.w; _local4 = b2Math.SubtractVV(_local2, _local1); _local5 = b2Math.Dot(_local1, _local4); _local6 = b2Math.Dot(_local2, _local4); _local7 = _local6; _local8 = -(_local5); _local9 = b2Math.SubtractVV(_local3, _local1); _local10 = b2Math.Dot(_local1, _local9); _local11 = b2Math.Dot(_local3, _local9); _local12 = _local11; _local13 = -(_local10); _local14 = b2Math.SubtractVV(_local3, _local2); _local15 = b2Math.Dot(_local2, _local14); _local16 = b2Math.Dot(_local3, _local14); _local17 = _local16; _local18 = -(_local15); _local19 = b2Math.CrossVV(_local4, _local9); _local20 = (_local19 * b2Math.CrossVV(_local2, _local3)); _local21 = (_local19 * b2Math.CrossVV(_local3, _local1)); _local22 = (_local19 * b2Math.CrossVV(_local1, _local2)); if ((((_local8 <= 0)) && ((_local13 <= 0)))){ m_v1.a = 1; m_count = 1; return; }; if ((((((_local7 > 0)) && ((_local8 > 0)))) && ((_local22 <= 0)))){ _local24 = (1 / (_local7 + _local8)); m_v1.a = (_local7 * _local24); m_v2.a = (_local8 * _local24); m_count = 2; return; }; if ((((((_local12 > 0)) && ((_local13 > 0)))) && ((_local21 <= 0)))){ _local25 = (1 / (_local12 + _local13)); m_v1.a = (_local12 * _local25); m_v3.a = (_local13 * _local25); m_count = 2; m_v2.Set(m_v3); return; }; if ((((_local7 <= 0)) && ((_local18 <= 0)))){ m_v2.a = 1; m_count = 1; m_v1.Set(m_v2); return; }; if ((((_local12 <= 0)) && ((_local17 <= 0)))){ m_v3.a = 1; m_count = 1; m_v1.Set(m_v3); return; }; if ((((((_local17 > 0)) && ((_local18 > 0)))) && ((_local20 <= 0)))){ _local26 = (1 / (_local17 + _local18)); m_v2.a = (_local17 * _local26); m_v3.a = (_local18 * _local26); m_count = 2; m_v1.Set(m_v3); return; }; _local23 = (1 / ((_local20 + _local21) + _local22)); m_v1.a = (_local20 * _local23); m_v2.a = (_local21 * _local23); m_v3.a = (_local22 * _local23); m_count = 3; } public function GetClosestPoint():b2Vec2{ switch (m_count){ case 0: b2Settings.b2Assert(false); return (new b2Vec2()); case 1: return (m_v1.w); case 2: return (new b2Vec2(((m_v1.a * m_v1.w.x) + (m_v2.a * m_v2.w.x)), ((m_v1.a * m_v1.w.y) + (m_v2.a * m_v2.w.y)))); default: b2Settings.b2Assert(false); return (new b2Vec2()); }; } } }//package Box2D.Collision
Section 25
//b2SimplexCache (Box2D.Collision.b2SimplexCache) package Box2D.Collision { public class b2SimplexCache { public var metric:Number; public var count:uint; public var indexA:Array; public var indexB:Array; public function b2SimplexCache(){ indexA = new Array(3); indexB = new Array(3); super(); } } }//package Box2D.Collision
Section 26
//b2SimplexVertex (Box2D.Collision.b2SimplexVertex) package Box2D.Collision { import Box2D.Common.Math.*; class b2SimplexVertex { public var a:Number; public var wA:b2Vec2; public var wB:b2Vec2; public var indexB:int; public var w:b2Vec2; public var indexA:int; public function Set(_arg1:b2SimplexVertex):void{ wA.SetV(_arg1.wA); wB.SetV(_arg1.wB); w.SetV(_arg1.w); a = _arg1.a; indexA = _arg1.indexA; indexB = _arg1.indexB; } } }//package Box2D.Collision
Section 27
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2TimeOfImpact { private static var b2_toiCalls:int = 0; private static var s_xfA:b2Transform = new b2Transform(); private static var s_distanceInput:b2DistanceInput = new b2DistanceInput(); private static var s_xfB:b2Transform = new b2Transform(); private static var s_distanceOutput:b2DistanceOutput = new b2DistanceOutput(); private static var b2_toiMaxRootIters:int = 0; private static var s_cache:b2SimplexCache = new b2SimplexCache(); private static var b2_toiRootIters:int = 0; private static var b2_toiIters:int = 0; private static var b2_toiMaxIters:int = 0; private static var s_fcn:b2SeparationFunction = new b2SeparationFunction(); public static function TimeOfImpact(_arg1:b2TOIInput):Number{ var _local2:b2DistanceProxy; var _local3:b2DistanceProxy; var _local4:b2Sweep; var _local5:b2Sweep; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:Number; var _local20:Number; b2_toiCalls++; _local2 = _arg1.proxyA; _local3 = _arg1.proxyB; _local4 = _arg1.sweepA; _local5 = _arg1.sweepB; b2Settings.b2Assert((_local4.t0 == _local5.t0)); b2Settings.b2Assert(((1 - _local4.t0) > Number.MIN_VALUE)); _local6 = (_local2.m_radius + _local3.m_radius); _local7 = _arg1.tolerance; _local8 = 0; _local9 = 1000; _local10 = 0; _local11 = 0; s_cache.count = 0; s_distanceInput.useRadii = false; while (true) { _local4.GetTransform(s_xfA, _local8); _local5.GetTransform(s_xfB, _local8); s_distanceInput.proxyA = _local2; s_distanceInput.proxyB = _local3; s_distanceInput.transformA = s_xfA; s_distanceInput.transformB = s_xfB; b2Distance.Distance(s_distanceOutput, s_cache, s_distanceInput); if (s_distanceOutput.distance <= 0){ _local8 = 1; break; }; s_fcn.Initialize(s_cache, _local2, s_xfA, _local3, s_xfB); _local12 = s_fcn.Evaluate(s_xfA, s_xfB); if (_local12 <= 0){ _local8 = 1; break; }; if (_local10 == 0){ if (_local12 > _local6){ _local11 = b2Math.Max((_local6 - _local7), (0.75 * _local6)); } else { _local11 = b2Math.Max((_local12 - _local7), (0.02 * _local6)); }; }; if ((_local12 - _local11) < (0.5 * _local7)){ if (_local10 == 0){ _local8 = 1; break; }; break; }; _local13 = _local8; _local14 = _local8; _local15 = 1; _local16 = _local12; _local4.GetTransform(s_xfA, _local15); _local5.GetTransform(s_xfB, _local15); _local17 = s_fcn.Evaluate(s_xfA, s_xfB); if (_local17 >= _local11){ _local8 = 1; break; }; _local18 = 0; while (true) { if ((_local18 & 1)){ _local19 = (_local14 + (((_local11 - _local16) * (_local15 - _local14)) / (_local17 - _local16))); } else { _local19 = (0.5 * (_local14 + _local15)); }; _local4.GetTransform(s_xfA, _local19); _local5.GetTransform(s_xfB, _local19); _local20 = s_fcn.Evaluate(s_xfA, s_xfB); if (b2Math.Abs((_local20 - _local11)) < (0.025 * _local7)){ _local13 = _local19; break; }; if (_local20 > _local11){ _local14 = _local19; _local16 = _local20; } else { _local15 = _local19; _local17 = _local20; }; _local18++; b2_toiRootIters++; if (_local18 == 50){ break; }; }; b2_toiMaxRootIters = b2Math.Max(b2_toiMaxRootIters, _local18); if (_local13 < ((1 + (100 * Number.MIN_VALUE)) * _local8)){ break; }; _local8 = _local13; _local10++; b2_toiIters++; if (_local10 == _local9){ break; }; }; b2_toiMaxIters = b2Math.Max(b2_toiMaxIters, _local10); return (_local8); } } }//package Box2D.Collision
Section 28
//b2TOIInput (Box2D.Collision.b2TOIInput) package Box2D.Collision { import Box2D.Common.Math.*; public class b2TOIInput { public var tolerance:Number; public var proxyA:b2DistanceProxy; public var proxyB:b2DistanceProxy; public var sweepA:b2Sweep; public var sweepB:b2Sweep; public function b2TOIInput(){ proxyA = new b2DistanceProxy(); proxyB = new b2DistanceProxy(); sweepA = new b2Sweep(); sweepB = new b2Sweep(); super(); } } }//package Box2D.Collision
Section 29
//b2WorldManifold (Box2D.Collision.b2WorldManifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2WorldManifold { public var m_points:Array; public var m_normal:b2Vec2; public function b2WorldManifold(){ var _local1:int; m_normal = new b2Vec2(); super(); m_points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { m_points[_local1] = new b2Vec2(); _local1++; }; } public function Initialize(_arg1:b2Manifold, _arg2:b2Transform, _arg3:Number, _arg4:b2Transform, _arg5:Number):void{ var _local6:int; var _local7:b2Vec2; var _local8:b2Mat22; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; if (_arg1.m_pointCount == 0){ return; }; switch (_arg1.m_type){ case b2Manifold.e_circles: _local8 = _arg2.R; _local7 = _arg1.m_localPoint; _local15 = ((_arg2.position.x + (_local8.col1.x * _local7.x)) + (_local8.col2.x * _local7.y)); _local16 = ((_arg2.position.y + (_local8.col1.y * _local7.x)) + (_local8.col2.y * _local7.y)); _local8 = _arg4.R; _local7 = _arg1.m_points[0].m_localPoint; _local17 = ((_arg4.position.x + (_local8.col1.x * _local7.x)) + (_local8.col2.x * _local7.y)); _local18 = ((_arg4.position.y + (_local8.col1.y * _local7.x)) + (_local8.col2.y * _local7.y)); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local21 = ((_local19 * _local19) + (_local20 * _local20)); if (_local21 > (Number.MIN_VALUE * Number.MIN_VALUE)){ _local26 = Math.sqrt(_local21); m_normal.x = (_local19 / _local26); m_normal.y = (_local20 / _local26); } else { m_normal.x = 1; m_normal.y = 0; }; _local22 = (_local15 + (_arg3 * m_normal.x)); _local23 = (_local16 + (_arg3 * m_normal.y)); _local24 = (_local17 - (_arg5 * m_normal.x)); _local25 = (_local18 - (_arg5 * m_normal.y)); m_points[0].x = (0.5 * (_local22 + _local24)); m_points[0].y = (0.5 * (_local23 + _local25)); break; case b2Manifold.e_faceA: _local8 = _arg2.R; _local7 = _arg1.m_localPlaneNormal; _local9 = ((_local8.col1.x * _local7.x) + (_local8.col2.x * _local7.y)); _local10 = ((_local8.col1.y * _local7.x) + (_local8.col2.y * _local7.y)); _local8 = _arg2.R; _local7 = _arg1.m_localPoint; _local11 = ((_arg2.position.x + (_local8.col1.x * _local7.x)) + (_local8.col2.x * _local7.y)); _local12 = ((_arg2.position.y + (_local8.col1.y * _local7.x)) + (_local8.col2.y * _local7.y)); m_normal.x = _local9; m_normal.y = _local10; _local6 = 0; while (_local6 < _arg1.m_pointCount) { _local8 = _arg4.R; _local7 = _arg1.m_points[_local6].m_localPoint; _local13 = ((_arg4.position.x + (_local8.col1.x * _local7.x)) + (_local8.col2.x * _local7.y)); _local14 = ((_arg4.position.y + (_local8.col1.y * _local7.x)) + (_local8.col2.y * _local7.y)); m_points[_local6].x = (_local13 + ((0.5 * (((_arg3 - ((_local13 - _local11) * _local9)) - ((_local14 - _local12) * _local10)) - _arg5)) * _local9)); m_points[_local6].y = (_local14 + ((0.5 * (((_arg3 - ((_local13 - _local11) * _local9)) - ((_local14 - _local12) * _local10)) - _arg5)) * _local10)); _local6++; }; break; case b2Manifold.e_faceB: _local8 = _arg4.R; _local7 = _arg1.m_localPlaneNormal; _local9 = ((_local8.col1.x * _local7.x) + (_local8.col2.x * _local7.y)); _local10 = ((_local8.col1.y * _local7.x) + (_local8.col2.y * _local7.y)); _local8 = _arg4.R; _local7 = _arg1.m_localPoint; _local11 = ((_arg4.position.x + (_local8.col1.x * _local7.x)) + (_local8.col2.x * _local7.y)); _local12 = ((_arg4.position.y + (_local8.col1.y * _local7.x)) + (_local8.col2.y * _local7.y)); m_normal.x = -(_local9); m_normal.y = -(_local10); _local6 = 0; while (_local6 < _arg1.m_pointCount) { _local8 = _arg2.R; _local7 = _arg1.m_points[_local6].m_localPoint; _local13 = ((_arg2.position.x + (_local8.col1.x * _local7.x)) + (_local8.col2.x * _local7.y)); _local14 = ((_arg2.position.y + (_local8.col1.y * _local7.x)) + (_local8.col2.y * _local7.y)); m_points[_local6].x = (_local13 + ((0.5 * (((_arg5 - ((_local13 - _local11) * _local9)) - ((_local14 - _local12) * _local10)) - _arg3)) * _local9)); m_points[_local6].y = (_local14 + ((0.5 * (((_arg5 - ((_local13 - _local11) * _local9)) - ((_local14 - _local12) * _local10)) - _arg3)) * _local10)); _local6++; }; break; }; } } }//package Box2D.Collision
Section 30
//ClipVertex (Box2D.Collision.ClipVertex) package Box2D.Collision { import Box2D.Common.Math.*; public class ClipVertex { public var v:b2Vec2; public var id:b2ContactID; public function ClipVertex(){ v = new b2Vec2(); id = new b2ContactID(); super(); } public function Set(_arg1:ClipVertex):void{ v.SetV(_arg1.v); id.Set(_arg1.id); } } }//package Box2D.Collision
Section 31
//Features (Box2D.Collision.Features) package Box2D.Collision { import Box2D.Common.*; public class Features { b2internal var _referenceEdge:int; b2internal var _incidentEdge:int; b2internal var _flip:int; b2internal var _incidentVertex:int; b2internal var _m_id:b2ContactID; public function get referenceEdge():int{ return (_referenceEdge); } public function set incidentVertex(_arg1:int):void{ _incidentVertex = _arg1; _m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000)); } public function get flip():int{ return (_flip); } public function get incidentEdge():int{ return (_incidentEdge); } public function set referenceEdge(_arg1:int):void{ _referenceEdge = _arg1; _m_id._key = ((_m_id._key & 4294967040) | (_referenceEdge & 0xFF)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Box2D.Collision
Section 32
//IBroadPhase (Box2D.Collision.IBroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; public interface IBroadPhase { function GetFatAABB(_arg1):b2AABB; function Query(_arg1:Function, _arg2:b2AABB):void; function RayCast(_arg1:Function, _arg2:b2RayCastInput):void; function GetUserData(_arg1); function UpdatePairs(_arg1:Function):void; function CreateProxy(_arg1:b2AABB, _arg2); function DestroyProxy(_arg1):void; function TestOverlap(_arg1, _arg2):Boolean; function Validate():void; function GetProxyCount():int; function Rebalance(_arg1:int):void; function MoveProxy(_arg1, _arg2:b2AABB, _arg3:b2Vec2):void; } }//package Box2D.Collision
Section 33
//b2Mat22 (Box2D.Common.Math.b2Mat22) package Box2D.Common.Math { public class b2Mat22 { public var col1:b2Vec2; public var col2:b2Vec2; public function b2Mat22(){ col1 = new b2Vec2(); col2 = new b2Vec2(); super(); col1.x = (col2.y = 1); } public function SetIdentity():void{ col1.x = 1; col2.x = 0; col1.y = 0; col2.y = 1; } public function Set(_arg1:Number):void{ var _local2:Number; var _local3:Number; _local2 = Math.cos(_arg1); _local3 = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{ col1.SetV(_arg1); col2.SetV(_arg2); } public function SetZero():void{ col1.x = 0; col2.x = 0; col1.y = 0; col2.y = 0; } public function SetM(_arg1:b2Mat22):void{ col1.SetV(_arg1.col1); col2.SetV(_arg1.col2); } public function AddM(_arg1:b2Mat22):void{ col1.x = (col1.x + _arg1.col1.x); col1.y = (col1.y + _arg1.col1.y); col2.x = (col2.x + _arg1.col2.x); col2.y = (col2.y + _arg1.col2.y); } public function Abs():void{ col1.Abs(); col2.Abs(); } public function Copy():b2Mat22{ var _local1:b2Mat22; _local1 = new b2Mat22(); _local1.SetM(this); return (_local1); } public function GetInverse(_arg1:b2Mat22):b2Mat22{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = col1.x; _local3 = col2.x; _local4 = col1.y; _local5 = col2.y; _local6 = ((_local2 * _local5) - (_local3 * _local4)); if (_local6 != 0){ _local6 = (1 / _local6); }; _arg1.col1.x = (_local6 * _local5); _arg1.col2.x = (-(_local6) * _local3); _arg1.col1.y = (-(_local6) * _local4); _arg1.col2.y = (_local6 * _local2); return (_arg1); } public function GetAngle():Number{ return (Math.atan2(col1.y, col1.x)); } public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = col1.x; _local5 = col2.x; _local6 = col1.y; _local7 = col2.y; _local8 = ((_local4 * _local7) - (_local5 * _local6)); if (_local8 != 0){ _local8 = (1 / _local8); }; _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } public static function FromAngle(_arg1:Number):b2Mat22{ var _local2:b2Mat22; _local2 = new (b2Mat22); _local2.Set(_arg1); return (_local2); } public static function FromVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Mat22{ var _local3:b2Mat22; _local3 = new (b2Mat22); _local3.SetVV(_arg1, _arg2); return (_local3); } } }//package Box2D.Common.Math
Section 34
//b2Mat33 (Box2D.Common.Math.b2Mat33) package Box2D.Common.Math { public class b2Mat33 { public var col1:b2Vec3; public var col2:b2Vec3; public var col3:b2Vec3; public function b2Mat33(_arg1:b2Vec3=null, _arg2:b2Vec3=null, _arg3:b2Vec3=null){ col1 = new b2Vec3(); col2 = new b2Vec3(); col3 = new b2Vec3(); super(); if (((((!(_arg1)) && (!(_arg2)))) && (!(_arg3)))){ col1.SetZero(); col2.SetZero(); col3.SetZero(); } else { col1.SetV(_arg1); col2.SetV(_arg2); col3.SetV(_arg3); }; } public function SetIdentity():void{ col1.x = 1; col2.x = 0; col3.x = 0; col1.y = 0; col2.y = 1; col3.y = 0; col1.z = 0; col2.z = 0; col3.z = 1; } public function Solve33(_arg1:b2Vec3, _arg2:Number, _arg3:Number, _arg4:Number):b2Vec3{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local5 = col1.x; _local6 = col1.y; _local7 = col1.z; _local8 = col2.x; _local9 = col2.y; _local10 = col2.z; _local11 = col3.x; _local12 = col3.y; _local13 = col3.z; _local14 = (((_local5 * ((_local9 * _local13) - (_local10 * _local12))) + (_local6 * ((_local10 * _local11) - (_local8 * _local13)))) + (_local7 * ((_local8 * _local12) - (_local9 * _local11)))); if (_local14 != 0){ _local14 = (1 / _local14); }; _arg1.x = (_local14 * (((_arg2 * ((_local9 * _local13) - (_local10 * _local12))) + (_arg3 * ((_local10 * _local11) - (_local8 * _local13)))) + (_arg4 * ((_local8 * _local12) - (_local9 * _local11))))); _arg1.y = (_local14 * (((_local5 * ((_arg3 * _local13) - (_arg4 * _local12))) + (_local6 * ((_arg4 * _local11) - (_arg2 * _local13)))) + (_local7 * ((_arg2 * _local12) - (_arg3 * _local11))))); _arg1.z = (_local14 * (((_local5 * ((_local9 * _arg4) - (_local10 * _arg3))) + (_local6 * ((_local10 * _arg2) - (_local8 * _arg4)))) + (_local7 * ((_local8 * _arg3) - (_local9 * _arg2))))); return (_arg1); } public function SetZero():void{ col1.x = 0; col2.x = 0; col3.x = 0; col1.y = 0; col2.y = 0; col3.y = 0; col1.z = 0; col2.z = 0; col3.z = 0; } public function SetM(_arg1:b2Mat33):void{ col1.SetV(_arg1.col1); col2.SetV(_arg1.col2); col3.SetV(_arg1.col3); } public function AddM(_arg1:b2Mat33):void{ col1.x = (col1.x + _arg1.col1.x); col1.y = (col1.y + _arg1.col1.y); col1.z = (col1.z + _arg1.col1.z); col2.x = (col2.x + _arg1.col2.x); col2.y = (col2.y + _arg1.col2.y); col2.z = (col2.z + _arg1.col2.z); col3.x = (col3.x + _arg1.col3.x); col3.y = (col3.y + _arg1.col3.y); col3.z = (col3.z + _arg1.col3.z); } public function SetVVV(_arg1:b2Vec3, _arg2:b2Vec3, _arg3:b2Vec3):void{ col1.SetV(_arg1); col2.SetV(_arg2); col3.SetV(_arg3); } public function Copy():b2Mat33{ return (new b2Mat33(col1, col2, col3)); } public function Solve22(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = col1.x; _local5 = col2.x; _local6 = col1.y; _local7 = col2.y; _local8 = ((_local4 * _local7) - (_local5 * _local6)); if (_local8 != 0){ _local8 = (1 / _local8); }; _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } } }//package Box2D.Common.Math
Section 35
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { public static const b2Transform_identity:b2Transform = new b2Transform(b2Vec2_zero, b2Mat22_identity); public static const b2Mat22_identity:b2Mat22 = b2Mat22.FromVV(new b2Vec2(1, 0), new b2Vec2(0, 1)); public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0); public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)); return (_local3); } public static function AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22; _local2 = b2Mat22.FromVV(AbsV(_arg1.col1), AbsV(_arg1.col2)); return (_local2); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)); return (_local3); } public static function MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = b2Mat22.FromVV(MulMV(_arg1, _arg2.col1), MulMV(_arg1, _arg2.col2)); return (_local3); } public static function NextPowerOfTwo(_arg1:uint):uint{ _arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647)); _arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823)); _arg1 = (_arg1 | ((_arg1 >> 4) & 268435455)); _arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF)); _arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF)); return ((_arg1 + 1)); } public static function Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y))); return (_local3); } public static function CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(Max(_arg1.x, _arg2.x), Max(_arg1.y, _arg2.y)); return (_local3); } public static function AbsV(_arg1:b2Vec2):b2Vec2{ var _local2:b2Vec2; _local2 = new b2Vec2(Abs(_arg1.x), Abs(_arg1.y)); return (_local2); } public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number; var _local4:Number; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public static function MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Mat22; _local3 = new b2Vec2(Dot(_arg1.col1, _arg2.col1), Dot(_arg1.col2, _arg2.col1)); _local4 = new b2Vec2(Dot(_arg1.col1, _arg2.col2), Dot(_arg1.col2, _arg2.col2)); _local5 = b2Mat22.FromVV(_local3, _local4); return (_local5); } public static function DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number; var _local4:Number; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg1.y - _arg2.y); return (((_local3 * _local3) + (_local4 * _local4))); } public static function RandomRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = Math.random(); _local3 = (((_arg2 - _arg1) * _local3) + _arg1); return (_local3); } public static function Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (((_arg1 < _arg2)) ? _arg2 : ((_arg1 > _arg3)) ? _arg3 : _arg1); } public static function MulXT(_arg1:b2Transform, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; var _local4:Number; _local3 = SubtractVV(_arg2, _arg1.position); _local4 = ((_local3.x * _arg1.R.col1.x) + (_local3.y * _arg1.R.col1.y)); _local3.y = ((_local3.x * _arg1.R.col2.x) + (_local3.y * _arg1.R.col2.y)); _local3.x = _local4; return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = b2Mat22.FromVV(AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function Random():Number{ return (((Math.random() * 2) - 1)); } public static function MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(Min(_arg1.x, _arg2.x), Min(_arg1.y, _arg2.y)); return (_local3); } public static function CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } public static function MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(Dot(_arg2, _arg1.col1), Dot(_arg2, _arg1.col2)); return (_local3); } public static function Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } public static function CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (MaxV(_arg2, MinV(_arg1, _arg3))); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function Swap(_arg1:Array, _arg2:Array):void{ var _local3:*; _local3 = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function MulX(_arg1:b2Transform, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = MulMV(_arg1.R, _arg2); _local3.x = (_local3.x + _arg1.position.x); _local3.y = (_local3.y + _arg1.position.y); return (_local3); } public static function IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean; _local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } public static function IsValid(_arg1:Number):Boolean{ return (isFinite(_arg1)); } } }//package Box2D.Common.Math
Section 36
//b2Sweep (Box2D.Common.Math.b2Sweep) package Box2D.Common.Math { public class b2Sweep { public var localCenter:b2Vec2; public var c:b2Vec2; public var a:Number; public var c0:b2Vec2; public var a0:Number; public var t0:Number; public function b2Sweep(){ localCenter = new b2Vec2(); c0 = new b2Vec2(); c = new b2Vec2(); super(); } public function Set(_arg1:b2Sweep):void{ localCenter.SetV(_arg1.localCenter); c0.SetV(_arg1.c0); c.SetV(_arg1.c); a0 = _arg1.a0; a = _arg1.a; t0 = _arg1.t0; } public function Advance(_arg1:Number):void{ var _local2:Number; if ((((t0 < _arg1)) && (((1 - t0) > Number.MIN_VALUE)))){ _local2 = ((_arg1 - t0) / (1 - t0)); c0.x = (((1 - _local2) * c0.x) + (_local2 * c.x)); c0.y = (((1 - _local2) * c0.y) + (_local2 * c.y)); a0 = (((1 - _local2) * a0) + (_local2 * a)); t0 = _arg1; }; } public function Copy():b2Sweep{ var _local1:b2Sweep; _local1 = new b2Sweep(); _local1.localCenter.SetV(localCenter); _local1.c0.SetV(c0); _local1.c.SetV(c); _local1.a0 = a0; _local1.a = a; _local1.t0 = t0; return (_local1); } public function GetTransform(_arg1:b2Transform, _arg2:Number):void{ var _local3:Number; var _local4:b2Mat22; _arg1.position.x = (((1 - _arg2) * c0.x) + (_arg2 * c.x)); _arg1.position.y = (((1 - _arg2) * c0.y) + (_arg2 * c.y)); _local3 = (((1 - _arg2) * a0) + (_arg2 * a)); _arg1.R.Set(_local3); _local4 = _arg1.R; _arg1.position.x = (_arg1.position.x - ((_local4.col1.x * localCenter.x) + (_local4.col2.x * localCenter.y))); _arg1.position.y = (_arg1.position.y - ((_local4.col1.y * localCenter.x) + (_local4.col2.y * localCenter.y))); } } }//package Box2D.Common.Math
Section 37
//b2Transform (Box2D.Common.Math.b2Transform) package Box2D.Common.Math { public class b2Transform { public var R:b2Mat22; public var position:b2Vec2; public function b2Transform(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{ position = new b2Vec2(); R = new b2Mat22(); super(); if (_arg1){ position.SetV(_arg1); R.SetM(_arg2); }; } public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{ position.SetV(_arg1); R.SetM(_arg2); } public function Set(_arg1:b2Transform):void{ position.SetV(_arg1.position); R.SetM(_arg1.R); } public function SetIdentity():void{ position.SetZero(); R.SetIdentity(); } public function GetAngle():Number{ return (Math.atan2(R.col1.y, R.col1.x)); } } }//package Box2D.Common.Math
Section 38
//b2Vec2 (Box2D.Common.Math.b2Vec2) package Box2D.Common.Math { public class b2Vec2 { public var x:Number; public var y:Number; public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function Set(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); } public function Length():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function LengthSquared():Number{ return (((x * x) + (y * y))); } public function SetZero():void{ x = 0; y = 0; } public function GetNegative():b2Vec2{ return (new b2Vec2(-(x), -(y))); } public function MaxV(_arg1:b2Vec2):void{ x = ((x > _arg1.x)) ? x : _arg1.x; y = ((y > _arg1.y)) ? y : _arg1.y; } public function SetV(_arg1:b2Vec2):void{ x = _arg1.x; y = _arg1.y; } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function CrossVF(_arg1:Number):void{ var _local2:Number; _local2 = x; x = (_arg1 * y); y = (-(_arg1) * _local2); } public function NegativeSelf():void{ x = -(x); y = -(y); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number; _local2 = b2Math.Dot(this, _arg1.col1); y = b2Math.Dot(this, _arg1.col2); x = _local2; } public function IsValid():Boolean{ return (((b2Math.IsValid(x)) && (b2Math.IsValid(y)))); } public function MinV(_arg1:b2Vec2):void{ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.y)) ? y : _arg1.y; } public function MulM(_arg1:b2Mat22):void{ var _local2:Number; _local2 = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function Abs():void{ if (x < 0){ x = -(x); }; if (y < 0){ y = -(y); }; } public function Normalize():Number{ var _local1:Number; var _local2:Number; _local1 = Math.sqrt(((x * x) + (y * y))); if (_local1 < Number.MIN_VALUE){ return (0); }; _local2 = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function CrossFV(_arg1:Number):void{ var _local2:Number; _local2 = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public function Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 39
//b2Vec3 (Box2D.Common.Math.b2Vec3) package Box2D.Common.Math { public class b2Vec3 { public var x:Number; public var y:Number; public var z:Number; public function b2Vec3(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){ this.x = _arg1; this.y = _arg2; this.z = _arg3; } public function Add(_arg1:b2Vec3):void{ x = (x + _arg1.x); y = (y + _arg1.y); z = (z + _arg1.z); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ this.x = _arg1; this.y = _arg2; this.z = _arg3; } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); z = (z * _arg1); } public function SetZero():void{ x = (y = (z = 0)); } public function GetNegative():b2Vec3{ return (new b2Vec3(-(x), -(y), -(z))); } public function NegativeSelf():void{ x = -(x); y = -(y); z = -(z); } public function SetV(_arg1:b2Vec3):void{ x = _arg1.x; y = _arg1.y; z = _arg1.z; } public function Copy():b2Vec3{ return (new b2Vec3(x, y, z)); } public function Subtract(_arg1:b2Vec3):void{ x = (x - _arg1.x); y = (y - _arg1.y); z = (z - _arg1.z); } } }//package Box2D.Common.Math
Section 40
//b2Color (Box2D.Common.b2Color) package Box2D.Common { import Box2D.Common.Math.*; public class b2Color { private var _g:uint;// = 0 private var _b:uint;// = 0 private var _r:uint;// = 0 public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){ _r = 0; _g = 0; _b = 0; super(); _r = uint((0xFF * b2Math.Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.Clamp(_arg3, 0, 1))); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ _r = uint((0xFF * b2Math.Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.Clamp(_arg3, 0, 1))); } public function get color():uint{ return ((((_r << 16) | (_g << 8)) | _b)); } public function set r(_arg1:Number):void{ _r = uint((0xFF * b2Math.Clamp(_arg1, 0, 1))); } public function set b(_arg1:Number):void{ _b = uint((0xFF * b2Math.Clamp(_arg1, 0, 1))); } public function set g(_arg1:Number):void{ _g = uint((0xFF * b2Math.Clamp(_arg1, 0, 1))); } } }//package Box2D.Common
Section 41
//b2internal (Box2D.Common.b2internal) package Box2D.Common { public namespace b2internal = "http://www.box2d.org/ns/b2internal"; }//package Box2D.Common
Section 42
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { public class b2Settings { public static const b2_polygonRadius:Number = (2 * b2_linearSlop); public static const b2_pi:Number = 3.14159265358979; public static const b2_aabbExtension:Number = 0.1; public static const b2_linearSleepTolerance:Number = 0.01; public static const b2_maxTranslationSquared:Number = 9; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_linearSlop:Number = 0.005; public static const b2_maxRotation:Number = 1.5707963267949; public static const b2_maxRotationSquared:Number = 2.46740110027234; public static const b2_angularSleepTolerance:Number = 0.0349065850398866; public static const b2_timeToSleep:Number = 0.5; public static const b2_maxTOIJointsPerIsland:int = 32; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_maxTOIContactsPerIsland:int = 32; public static const b2_maxManifoldPoints:int = 2; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const b2_velocityThreshold:Number = 1; public static const USHRT_MAX:int = 0xFFFF; public static const VERSION:String = "2.1alpha"; public static const b2_toiSlop:Number = 0.04; public static const b2_maxTranslation:Number = 3; public static const b2_aabbMultiplier:Number = 2; public static const b2_maxLinearCorrection:Number = 0.2; public static function b2MixFriction(_arg1:Number, _arg2:Number):Number{ return (Math.sqrt((_arg1 * _arg2))); } public static function b2MixRestitution(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2Assert(_arg1:Boolean):void{ if (!_arg1){ throw ("Assertion Failed"); }; } } }//package Box2D.Common
Section 43
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2CircleContact extends b2Contact { override b2internal function Evaluate():void{ var _local1:b2Body; var _local2:b2Body; _local1 = m_fixtureA.GetBody(); _local2 = m_fixtureB.GetBody(); b2Collision.CollideCircles(m_manifold, (m_fixtureA.GetShape() as b2CircleShape), _local1.m_xf, (m_fixtureB.GetShape() as b2CircleShape), _local2.m_xf); } public function Reset(_arg1:b2Fixture, _arg2:b2Fixture):void{ super.Reset(_arg1, _arg2); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1):b2Contact{ return (new (b2CircleContact)); } } }//package Box2D.Dynamics.Contacts
Section 44
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Contact { b2internal var m_prev:b2Contact; b2internal var m_next:b2Contact; b2internal var m_oldManifold:b2Manifold; b2internal var m_manifold:b2Manifold; b2internal var m_fixtureB:b2Fixture; b2internal var m_fixtureA:b2Fixture; b2internal var m_nodeA:b2ContactEdge; b2internal var m_flags:uint; b2internal var m_toi:Number; b2internal var m_nodeB:b2ContactEdge; b2internal static var e_sensorFlag:uint = 1; private static var s_input:b2TOIInput = new b2TOIInput(); b2internal static var e_touchingFlag:uint = 16; b2internal static var e_enabledFlag:uint = 32; b2internal static var e_continuousFlag:uint = 2; b2internal static var e_toiFlag:uint = 8; b2internal static var e_islandFlag:uint = 4; b2internal static var e_filterFlag:uint = 64; public function b2Contact(){ m_nodeA = new b2ContactEdge(); m_nodeB = new b2ContactEdge(); m_manifold = new b2Manifold(); m_oldManifold = new b2Manifold(); super(); } public function IsContinuous():Boolean{ return (((m_flags & e_continuousFlag) == e_continuousFlag)); } public function GetNext():b2Contact{ return (m_next); } public function FlagForFiltering():void{ m_flags = (m_flags | e_filterFlag); } public function IsEnabled():Boolean{ return (((m_flags & e_enabledFlag) == e_enabledFlag)); } public function SetSensor(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_sensorFlag); } else { m_flags = (m_flags & ~(e_sensorFlag)); }; } public function SetEnabled(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_enabledFlag); } else { m_flags = (m_flags & ~(e_enabledFlag)); }; } public function IsSensor():Boolean{ return (((m_flags & e_sensorFlag) == e_sensorFlag)); } public function GetManifold():b2Manifold{ return (m_manifold); } b2internal function Update(_arg1:b2ContactListener):void{ var _local2:b2Manifold; var _local3:Boolean; var _local4:Boolean; var _local5:b2Body; var _local6:b2Body; var _local7:Boolean; var _local8:b2Shape; var _local9:b2Shape; var _local10:b2Transform; var _local11:b2Transform; var _local12:int; var _local13:b2ManifoldPoint; var _local14:b2ContactID; var _local15:int; var _local16:b2ManifoldPoint; _local2 = m_oldManifold; m_oldManifold = m_manifold; m_manifold = _local2; m_flags = (m_flags | e_enabledFlag); _local3 = false; _local4 = ((m_flags & e_touchingFlag) == e_touchingFlag); _local5 = m_fixtureA.m_body; _local6 = m_fixtureB.m_body; _local7 = m_fixtureA.m_aabb.TestOverlap(m_fixtureB.m_aabb); if ((m_flags & e_sensorFlag)){ if (_local7){ _local8 = m_fixtureA.GetShape(); _local9 = m_fixtureB.GetShape(); _local10 = _local5.GetTransform(); _local11 = _local6.GetTransform(); _local3 = b2Shape.TestOverlap(_local8, _local10, _local9, _local11); }; m_manifold.m_pointCount = 0; } else { if (((((((!((_local5.GetType() == b2Body.b2_dynamicBody))) || (_local5.IsBullet()))) || (!((_local6.GetType() == b2Body.b2_dynamicBody))))) || (_local6.IsBullet()))){ m_flags = (m_flags | e_continuousFlag); } else { m_flags = (m_flags & ~(e_continuousFlag)); }; if (_local7){ Evaluate(); _local3 = (m_manifold.m_pointCount > 0); _local12 = 0; while (_local12 < m_manifold.m_pointCount) { _local13 = m_manifold.m_points[_local12]; _local13.m_normalImpulse = 0; _local13.m_tangentImpulse = 0; _local14 = _local13.m_id; _local15 = 0; while (_local15 < m_oldManifold.m_pointCount) { _local16 = m_oldManifold.m_points[_local15]; if (_local16.m_id.key == _local14.key){ _local13.m_normalImpulse = _local16.m_normalImpulse; _local13.m_tangentImpulse = _local16.m_tangentImpulse; break; }; _local15++; }; _local12++; }; } else { m_manifold.m_pointCount = 0; }; if (_local3 != _local4){ _local5.SetAwake(true); _local6.SetAwake(true); }; }; if (_local3){ m_flags = (m_flags | e_touchingFlag); } else { m_flags = (m_flags & ~(e_touchingFlag)); }; if ((((_local4 == false)) && ((_local3 == true)))){ _arg1.BeginContact(this); }; if ((((_local4 == true)) && ((_local3 == false)))){ _arg1.EndContact(this); }; if ((m_flags & e_sensorFlag) == 0){ _arg1.PreSolve(this, m_oldManifold); }; } public function GetWorldManifold(_arg1:b2WorldManifold):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Shape; var _local5:b2Shape; _local2 = m_fixtureA.GetBody(); _local3 = m_fixtureB.GetBody(); _local4 = m_fixtureA.GetShape(); _local5 = m_fixtureB.GetShape(); _arg1.Initialize(m_manifold, _local2.GetTransform(), _local4.m_radius, _local3.GetTransform(), _local5.m_radius); } public function IsTouching():Boolean{ return (((m_flags & e_touchingFlag) == e_touchingFlag)); } public function GetFixtureA():b2Fixture{ return (m_fixtureA); } public function GetFixtureB():b2Fixture{ return (m_fixtureB); } b2internal function Reset(_arg1:b2Fixture=null, _arg2:b2Fixture=null):void{ var _local3:b2Body; var _local4:b2Body; m_flags = e_enabledFlag; if (((!(_arg1)) || (!(_arg2)))){ m_fixtureA = null; m_fixtureB = null; return; }; if (((_arg1.IsSensor()) || (_arg2.IsSensor()))){ m_flags = (m_flags | e_sensorFlag); }; _local3 = _arg1.GetBody(); _local4 = _arg2.GetBody(); if (((((((!((_local3.GetType() == b2Body.b2_dynamicBody))) || (_local3.IsBullet()))) || (!((_local4.GetType() == b2Body.b2_dynamicBody))))) || (_local4.IsBullet()))){ m_flags = (m_flags | e_continuousFlag); }; m_fixtureA = _arg1; m_fixtureB = _arg2; m_manifold.m_pointCount = 0; m_prev = null; m_next = null; m_nodeA.contact = null; m_nodeA.prev = null; m_nodeA.next = null; m_nodeA.other = null; m_nodeB.contact = null; m_nodeB.prev = null; m_nodeB.next = null; m_nodeB.other = null; } b2internal function ComputeTOI(_arg1:b2Sweep, _arg2:b2Sweep):Number{ s_input.proxyA.Set(m_fixtureA.GetShape()); s_input.proxyB.Set(m_fixtureB.GetShape()); s_input.sweepA = _arg1; s_input.sweepB = _arg2; s_input.tolerance = b2Settings.b2_linearSlop; return (b2TimeOfImpact.TimeOfImpact(s_input)); } b2internal function Evaluate():void{ } } }//package Box2D.Dynamics.Contacts
Section 45
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactConstraint { public var type:int; public var K:b2Mat22; public var manifold:b2Manifold; public var radius:Number; public var bodyA:b2Body; public var bodyB:b2Body; public var points:Array; public var localPoint:b2Vec2; public var pointCount:int; public var normal:b2Vec2; public var restitution:Number; public var localPlaneNormal:b2Vec2; public var friction:Number; public var normalMass:b2Mat22; public function b2ContactConstraint(){ var _local1:int; localPlaneNormal = new b2Vec2(); localPoint = new b2Vec2(); normal = new b2Vec2(); normalMass = new b2Mat22(); K = new b2Mat22(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 46
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var velocityBias:Number; public var localPoint:b2Vec2; public var normalImpulse:Number; public var rB:b2Vec2; public var rA:b2Vec2; public var tangentImpulse:Number; public var tangentMass:Number; public var normalMass:Number; public var equalizedMass:Number; public function b2ContactConstraintPoint(){ localPoint = new b2Vec2(); rA = new b2Vec2(); rB = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 47
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactEdge { public var next:b2ContactEdge; public var other:b2Body; public var contact:b2Contact; public var prev:b2ContactEdge; } }//package Box2D.Dynamics.Contacts
Section 48
//b2ContactFactory (Box2D.Dynamics.Contacts.b2ContactFactory) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2ContactFactory { private var m_allocator; private var m_registers:Array; public function b2ContactFactory(_arg1){ m_allocator = _arg1; InitializeRegisters(); } b2internal function InitializeRegisters():void{ var _local1:int; var _local2:int; m_registers = new Array(b2Shape.e_shapeTypeCount); _local1 = 0; while (_local1 < b2Shape.e_shapeTypeCount) { m_registers[_local1] = new Array(b2Shape.e_shapeTypeCount); _local2 = 0; while (_local2 < b2Shape.e_shapeTypeCount) { m_registers[_local1][_local2] = new b2ContactRegister(); _local2++; }; _local1++; }; AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape); AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_circleShape); AddType(b2PolygonContact.Create, b2PolygonContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_polygonShape); AddType(b2EdgeAndCircleContact.Create, b2EdgeAndCircleContact.Destroy, b2Shape.e_edgeShape, b2Shape.e_circleShape); AddType(b2PolyAndEdgeContact.Create, b2PolyAndEdgeContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_edgeShape); } public function Create(_arg1:b2Fixture, _arg2:b2Fixture):b2Contact{ var _local3:int; var _local4:int; var _local5:b2ContactRegister; var _local6:b2Contact; var _local7:Function; _local3 = _arg1.GetType(); _local4 = _arg2.GetType(); _local5 = m_registers[_local3][_local4]; if (_local5.pool){ _local6 = _local5.pool; _local5.pool = _local6.m_next; _local5.poolCount--; _local6.Reset(_arg1, _arg2); return (_local6); }; _local7 = _local5.createFcn; if (_local7 != null){ if (_local5.primary){ _local6 = _local7(m_allocator); _local6.Reset(_arg1, _arg2); return (_local6); }; _local6 = _local7(m_allocator); _local6.Reset(_arg2, _arg1); return (_local6); //unresolved jump }; return (null); } public function Destroy(_arg1:b2Contact):void{ var _local2:int; var _local3:int; var _local4:b2ContactRegister; var _local5:Function; if (_arg1.m_manifold.m_pointCount > 0){ _arg1.m_fixtureA.m_body.SetAwake(true); _arg1.m_fixtureB.m_body.SetAwake(true); }; _local2 = _arg1.m_fixtureA.GetType(); _local3 = _arg1.m_fixtureB.GetType(); _local4 = m_registers[_local2][_local3]; _local4.poolCount++; _arg1.m_next = _local4.pool; _local4.pool = _arg1; _local5 = _local4.destroyFcn; _local5(_arg1, m_allocator); } b2internal function AddType(_arg1:Function, _arg2:Function, _arg3:int, _arg4:int):void{ m_registers[_arg3][_arg4].createFcn = _arg1; m_registers[_arg3][_arg4].destroyFcn = _arg2; m_registers[_arg3][_arg4].primary = true; if (_arg3 != _arg4){ m_registers[_arg4][_arg3].createFcn = _arg1; m_registers[_arg4][_arg3].destroyFcn = _arg2; m_registers[_arg4][_arg3].primary = false; }; } } }//package Box2D.Dynamics.Contacts
Section 49
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister) package Box2D.Dynamics.Contacts { public class b2ContactRegister { public var primary:Boolean; public var poolCount:int; public var createFcn:Function; public var destroyFcn:Function; public var pool:b2Contact; } }//package Box2D.Dynamics.Contacts
Section 50
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2ContactSolver { private var m_constraintCount:int; b2internal var m_constraints:Array; private var m_allocator; private var m_step:b2TimeStep; private static var s_psm:b2PositionSolverManifold = new b2PositionSolverManifold(); private static var s_worldManifold:b2WorldManifold = new b2WorldManifold(); public function b2ContactSolver(){ m_step = new b2TimeStep(); m_constraints = new Array(); super(); } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2Mat22; var _local5:int; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:int; var _local20:b2ContactConstraintPoint; var _local21:Number; var _local22:Number; var _local23:b2ContactConstraintPoint; _local5 = 0; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.bodyA; _local8 = _local6.bodyB; _local9 = _local7.m_invMass; _local10 = _local7.m_invI; _local11 = _local8.m_invMass; _local12 = _local8.m_invI; _local13 = _local6.normal.x; _local14 = _local6.normal.y; _local15 = _local14; _local16 = -(_local13); if (_arg1.warmStarting){ _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local20 = _local6.points[_local18]; _local6.points[_local18].normalImpulse = (_local20.normalImpulse * _arg1.dtRatio); _local20.tangentImpulse = (_local20.tangentImpulse * _arg1.dtRatio); _local21 = ((_local20.normalImpulse * _local13) + (_local20.tangentImpulse * _local15)); _local22 = ((_local20.normalImpulse * _local14) + (_local20.tangentImpulse * _local16)); _local7.m_angularVelocity = (_local7.m_angularVelocity - (_local10 * ((_local20.rA.x * _local22) - (_local20.rA.y * _local21)))); _local7.m_linearVelocity.x = (_local7.m_linearVelocity.x - (_local9 * _local21)); _local7.m_linearVelocity.y = (_local7.m_linearVelocity.y - (_local9 * _local22)); _local8.m_angularVelocity = (_local8.m_angularVelocity + (_local12 * ((_local20.rB.x * _local22) - (_local20.rB.y * _local21)))); _local8.m_linearVelocity.x = (_local8.m_linearVelocity.x + (_local11 * _local21)); _local8.m_linearVelocity.y = (_local8.m_linearVelocity.y + (_local11 * _local22)); _local18++; }; } else { _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local23 = _local6.points[_local18]; _local23.normalImpulse = 0; _local23.tangentImpulse = 0; _local18++; }; }; _local5++; }; } public function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:int; var _local4:b2ContactConstraint; var _local5:b2Body; var _local6:b2Body; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:int; var _local13:b2ContactConstraintPoint; var _local14:b2Vec2; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; _local2 = 0; _local3 = 0; while (_local3 < m_constraintCount) { _local4 = m_constraints[_local3]; _local5 = _local4.bodyA; _local6 = _local4.bodyB; _local7 = (_local5.m_mass * _local5.m_invMass); _local8 = (_local5.m_mass * _local5.m_invI); _local9 = (_local6.m_mass * _local6.m_invMass); _local10 = (_local6.m_mass * _local6.m_invI); s_psm.Initialize(_local4); _local11 = s_psm.m_normal; _local12 = 0; while (_local12 < _local4.pointCount) { _local13 = _local4.points[_local12]; _local14 = s_psm.m_points[_local12]; _local15 = s_psm.m_separations[_local12]; _local16 = (_local14.x - _local5.m_sweep.c.x); _local17 = (_local14.y - _local5.m_sweep.c.y); _local18 = (_local14.x - _local6.m_sweep.c.x); _local19 = (_local14.y - _local6.m_sweep.c.y); _local2 = ((_local2 < _local15)) ? _local2 : _local15; _local20 = b2Math.Clamp((_arg1 * (_local15 + b2Settings.b2_linearSlop)), -(b2Settings.b2_maxLinearCorrection), 0); _local21 = (-(_local13.equalizedMass) * _local20); _local22 = (_local21 * _local11.x); _local23 = (_local21 * _local11.y); _local5.m_sweep.c.x = (_local5.m_sweep.c.x - (_local7 * _local22)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y - (_local7 * _local23)); _local5.m_sweep.a = (_local5.m_sweep.a - (_local8 * ((_local16 * _local23) - (_local17 * _local22)))); _local5.SynchronizeTransform(); _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_local9 * _local22)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_local9 * _local23)); _local6.m_sweep.a = (_local6.m_sweep.a + (_local10 * ((_local18 * _local23) - (_local19 * _local22)))); _local6.SynchronizeTransform(); _local12++; }; _local3++; }; return ((_local2 > (-1.5 * b2Settings.b2_linearSlop))); } public function Initialize(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4):void{ var _local5:b2Contact; var _local6:int; var _local7:b2Vec2; var _local8:b2Mat22; var _local9:b2Fixture; var _local10:b2Fixture; var _local11:b2Shape; var _local12:b2Shape; var _local13:Number; var _local14:Number; var _local15:b2Body; var _local16:b2Body; var _local17:b2Manifold; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:b2ContactConstraint; var _local29:uint; var _local30:b2ManifoldPoint; var _local31:b2ContactConstraintPoint; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; var _local42:Number; var _local43:Number; var _local44:Number; var _local45:Number; var _local46:Number; var _local47:Number; var _local48:b2ContactConstraintPoint; var _local49:b2ContactConstraintPoint; var _local50:Number; var _local51:Number; var _local52:Number; var _local53:Number; var _local54:Number; var _local55:Number; var _local56:Number; var _local57:Number; var _local58:Number; var _local59:Number; var _local60:Number; var _local61:Number; m_step.Set(_arg1); m_allocator = _arg4; m_constraintCount = _arg3; while (m_constraints.length < m_constraintCount) { m_constraints[m_constraints.length] = new b2ContactConstraint(); }; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; _local9 = _local5.m_fixtureA; _local10 = _local5.m_fixtureB; _local11 = _local9.m_shape; _local12 = _local10.m_shape; _local13 = _local11.m_radius; _local14 = _local12.m_radius; _local15 = _local9.m_body; _local16 = _local10.m_body; _local17 = _local5.GetManifold(); _local18 = b2Settings.b2MixFriction(_local9.GetFriction(), _local10.GetFriction()); _local19 = b2Settings.b2MixRestitution(_local9.GetRestitution(), _local10.GetRestitution()); _local20 = _local15.m_linearVelocity.x; _local21 = _local15.m_linearVelocity.y; _local22 = _local16.m_linearVelocity.x; _local23 = _local16.m_linearVelocity.y; _local24 = _local15.m_angularVelocity; _local25 = _local16.m_angularVelocity; b2Settings.b2Assert((_local17.m_pointCount > 0)); s_worldManifold.Initialize(_local17, _local15.m_xf, _local13, _local16.m_xf, _local14); _local26 = s_worldManifold.m_normal.x; _local27 = s_worldManifold.m_normal.y; _local28 = m_constraints[_local6]; _local28.bodyA = _local15; _local28.bodyB = _local16; _local28.manifold = _local17; _local28.normal.x = _local26; _local28.normal.y = _local27; _local28.pointCount = _local17.m_pointCount; _local28.friction = _local18; _local28.restitution = _local19; _local28.localPlaneNormal.x = _local17.m_localPlaneNormal.x; _local28.localPlaneNormal.y = _local17.m_localPlaneNormal.y; _local28.localPoint.x = _local17.m_localPoint.x; _local28.localPoint.y = _local17.m_localPoint.y; _local28.radius = (_local13 + _local14); _local28.type = _local17.m_type; _local29 = 0; while (_local29 < _local28.pointCount) { _local30 = _local17.m_points[_local29]; _local31 = _local28.points[_local29]; _local31.normalImpulse = _local30.m_normalImpulse; _local31.tangentImpulse = _local30.m_tangentImpulse; _local31.localPoint.SetV(_local30.m_localPoint); _local32 = (_local31.rA.x = (s_worldManifold.m_points[_local29].x - _local15.m_sweep.c.x)); _local33 = (_local31.rA.y = (s_worldManifold.m_points[_local29].y - _local15.m_sweep.c.y)); _local34 = (_local31.rB.x = (s_worldManifold.m_points[_local29].x - _local16.m_sweep.c.x)); _local35 = (_local31.rB.y = (s_worldManifold.m_points[_local29].y - _local16.m_sweep.c.y)); _local36 = ((_local32 * _local27) - (_local33 * _local26)); _local37 = ((_local34 * _local27) - (_local35 * _local26)); _local36 = (_local36 * _local36); _local37 = (_local37 * _local37); _local38 = (((_local15.m_invMass + _local16.m_invMass) + (_local15.m_invI * _local36)) + (_local16.m_invI * _local37)); _local31.normalMass = (1 / _local38); _local39 = ((_local15.m_mass * _local15.m_invMass) + (_local16.m_mass * _local16.m_invMass)); _local39 = (_local39 + (((_local15.m_mass * _local15.m_invI) * _local36) + ((_local16.m_mass * _local16.m_invI) * _local37))); _local31.equalizedMass = (1 / _local39); _local40 = _local27; _local41 = -(_local26); _local42 = ((_local32 * _local41) - (_local33 * _local40)); _local43 = ((_local34 * _local41) - (_local35 * _local40)); _local42 = (_local42 * _local42); _local43 = (_local43 * _local43); _local44 = (((_local15.m_invMass + _local16.m_invMass) + (_local15.m_invI * _local42)) + (_local16.m_invI * _local43)); _local31.tangentMass = (1 / _local44); _local31.velocityBias = 0; _local45 = (((_local22 + (-(_local25) * _local35)) - _local20) - (-(_local24) * _local33)); _local46 = (((_local23 + (_local25 * _local34)) - _local21) - (_local24 * _local32)); _local47 = ((_local28.normal.x * _local45) + (_local28.normal.y * _local46)); if (_local47 < -(b2Settings.b2_velocityThreshold)){ _local31.velocityBias = (_local31.velocityBias + (-(_local28.restitution) * _local47)); }; _local29++; }; if (_local28.pointCount == 2){ _local48 = _local28.points[0]; _local49 = _local28.points[1]; _local50 = _local15.m_invMass; _local51 = _local15.m_invI; _local52 = _local16.m_invMass; _local53 = _local16.m_invI; _local54 = ((_local48.rA.x * _local27) - (_local48.rA.y * _local26)); _local55 = ((_local48.rB.x * _local27) - (_local48.rB.y * _local26)); _local56 = ((_local49.rA.x * _local27) - (_local49.rA.y * _local26)); _local57 = ((_local49.rB.x * _local27) - (_local49.rB.y * _local26)); _local58 = (((_local50 + _local52) + ((_local51 * _local54) * _local54)) + ((_local53 * _local55) * _local55)); _local59 = (((_local50 + _local52) + ((_local51 * _local56) * _local56)) + ((_local53 * _local57) * _local57)); _local60 = (((_local50 + _local52) + ((_local51 * _local54) * _local56)) + ((_local53 * _local55) * _local57)); _local61 = 100; if ((_local58 * _local58) < (_local61 * ((_local58 * _local59) - (_local60 * _local60)))){ _local28.K.col1.Set(_local58, _local60); _local28.K.col2.Set(_local60, _local59); _local28.K.GetInverse(_local28.normalMass); } else { _local28.pointCount = 1; }; }; _local6++; }; } public function SolveVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraintPoint; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:b2Mat22; var _local23:b2Vec2; var _local24:int; var _local25:b2ContactConstraint; var _local26:b2Body; var _local27:b2Body; var _local28:Number; var _local29:Number; var _local30:b2Vec2; var _local31:b2Vec2; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; var _local42:int; var _local43:b2ContactConstraintPoint; var _local44:b2ContactConstraintPoint; var _local45:Number; var _local46:Number; var _local47:Number; var _local48:Number; var _local49:Number; var _local50:Number; var _local51:Number; var _local52:Number; var _local53:Number; var _local54:Number; var _local55:Number; var _local56:Number; var _local57:Number; _local24 = 0; while (_local24 < m_constraintCount) { _local25 = m_constraints[_local24]; _local26 = _local25.bodyA; _local27 = _local25.bodyB; _local28 = _local26.m_angularVelocity; _local29 = _local27.m_angularVelocity; _local30 = _local26.m_linearVelocity; _local31 = _local27.m_linearVelocity; _local32 = _local26.m_invMass; _local33 = _local26.m_invI; _local34 = _local27.m_invMass; _local35 = _local27.m_invI; _local36 = _local25.normal.x; _local37 = _local25.normal.y; _local38 = _local37; _local39 = -(_local36); _local40 = _local25.friction; _local1 = 0; while (_local1 < _local25.pointCount) { _local2 = _local25.points[_local1]; _local7 = (((_local31.x - (_local29 * _local2.rB.y)) - _local30.x) + (_local28 * _local2.rA.y)); _local8 = (((_local31.y + (_local29 * _local2.rB.x)) - _local30.y) - (_local28 * _local2.rA.x)); _local10 = ((_local7 * _local38) + (_local8 * _local39)); _local11 = (_local2.tangentMass * -(_local10)); _local12 = (_local40 * _local2.normalImpulse); _local13 = b2Math.Clamp((_local2.tangentImpulse + _local11), -(_local12), _local12); _local11 = (_local13 - _local2.tangentImpulse); _local14 = (_local11 * _local38); _local15 = (_local11 * _local39); _local30.x = (_local30.x - (_local32 * _local14)); _local30.y = (_local30.y - (_local32 * _local15)); _local28 = (_local28 - (_local33 * ((_local2.rA.x * _local15) - (_local2.rA.y * _local14)))); _local31.x = (_local31.x + (_local34 * _local14)); _local31.y = (_local31.y + (_local34 * _local15)); _local29 = (_local29 + (_local35 * ((_local2.rB.x * _local15) - (_local2.rB.y * _local14)))); _local2.tangentImpulse = _local13; _local1++; }; _local42 = _local25.pointCount; if (_local25.pointCount == 1){ _local2 = _local25.points[0]; _local7 = (((_local31.x + (-(_local29) * _local2.rB.y)) - _local30.x) - (-(_local28) * _local2.rA.y)); _local8 = (((_local31.y + (_local29 * _local2.rB.x)) - _local30.y) - (_local28 * _local2.rA.x)); _local9 = ((_local7 * _local36) + (_local8 * _local37)); _local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias)); _local13 = (_local2.normalImpulse + _local11); _local13 = ((_local13 > 0)) ? _local13 : 0; _local11 = (_local13 - _local2.normalImpulse); _local14 = (_local11 * _local36); _local15 = (_local11 * _local37); _local30.x = (_local30.x - (_local32 * _local14)); _local30.y = (_local30.y - (_local32 * _local15)); _local28 = (_local28 - (_local33 * ((_local2.rA.x * _local15) - (_local2.rA.y * _local14)))); _local31.x = (_local31.x + (_local34 * _local14)); _local31.y = (_local31.y + (_local34 * _local15)); _local29 = (_local29 + (_local35 * ((_local2.rB.x * _local15) - (_local2.rB.y * _local14)))); _local2.normalImpulse = _local13; } else { _local43 = _local25.points[0]; _local44 = _local25.points[1]; _local45 = _local43.normalImpulse; _local46 = _local44.normalImpulse; _local47 = (((_local31.x - (_local29 * _local43.rB.y)) - _local30.x) + (_local28 * _local43.rA.y)); _local48 = (((_local31.y + (_local29 * _local43.rB.x)) - _local30.y) - (_local28 * _local43.rA.x)); _local49 = (((_local31.x - (_local29 * _local44.rB.y)) - _local30.x) + (_local28 * _local44.rA.y)); _local50 = (((_local31.y + (_local29 * _local44.rB.x)) - _local30.y) - (_local28 * _local44.rA.x)); _local51 = ((_local47 * _local36) + (_local48 * _local37)); _local52 = ((_local49 * _local36) + (_local50 * _local37)); _local53 = (_local51 - _local43.velocityBias); _local54 = (_local52 - _local44.velocityBias); _local22 = _local25.K; _local53 = (_local53 - ((_local22.col1.x * _local45) + (_local22.col2.x * _local46))); _local54 = (_local54 - ((_local22.col1.y * _local45) + (_local22.col2.y * _local46))); _local55 = 0.001; while (true) { _local22 = _local25.normalMass; _local56 = -(((_local22.col1.x * _local53) + (_local22.col2.x * _local54))); _local57 = -(((_local22.col1.y * _local53) + (_local22.col2.y * _local54))); if ((((_local56 >= 0)) && ((_local57 >= 0)))){ _local16 = (_local56 - _local45); _local17 = (_local57 - _local46); _local18 = (_local16 * _local36); _local19 = (_local16 * _local37); _local20 = (_local17 * _local36); _local21 = (_local17 * _local37); _local30.x = (_local30.x - (_local32 * (_local18 + _local20))); _local30.y = (_local30.y - (_local32 * (_local19 + _local21))); _local28 = (_local28 - (_local33 * ((((_local43.rA.x * _local19) - (_local43.rA.y * _local18)) + (_local44.rA.x * _local21)) - (_local44.rA.y * _local20)))); _local31.x = (_local31.x + (_local34 * (_local18 + _local20))); _local31.y = (_local31.y + (_local34 * (_local19 + _local21))); _local29 = (_local29 + (_local35 * ((((_local43.rB.x * _local19) - (_local43.rB.y * _local18)) + (_local44.rB.x * _local21)) - (_local44.rB.y * _local20)))); _local43.normalImpulse = _local56; _local44.normalImpulse = _local57; break; }; _local56 = (-(_local43.normalMass) * _local53); _local57 = 0; _local51 = 0; _local52 = ((_local25.K.col1.y * _local56) + _local54); if ((((_local56 >= 0)) && ((_local52 >= 0)))){ _local16 = (_local56 - _local45); _local17 = (_local57 - _local46); _local18 = (_local16 * _local36); _local19 = (_local16 * _local37); _local20 = (_local17 * _local36); _local21 = (_local17 * _local37); _local30.x = (_local30.x - (_local32 * (_local18 + _local20))); _local30.y = (_local30.y - (_local32 * (_local19 + _local21))); _local28 = (_local28 - (_local33 * ((((_local43.rA.x * _local19) - (_local43.rA.y * _local18)) + (_local44.rA.x * _local21)) - (_local44.rA.y * _local20)))); _local31.x = (_local31.x + (_local34 * (_local18 + _local20))); _local31.y = (_local31.y + (_local34 * (_local19 + _local21))); _local29 = (_local29 + (_local35 * ((((_local43.rB.x * _local19) - (_local43.rB.y * _local18)) + (_local44.rB.x * _local21)) - (_local44.rB.y * _local20)))); _local43.normalImpulse = _local56; _local44.normalImpulse = _local57; break; }; _local56 = 0; _local57 = (-(_local44.normalMass) * _local54); _local51 = ((_local25.K.col2.x * _local57) + _local53); _local52 = 0; if ((((_local57 >= 0)) && ((_local51 >= 0)))){ _local16 = (_local56 - _local45); _local17 = (_local57 - _local46); _local18 = (_local16 * _local36); _local19 = (_local16 * _local37); _local20 = (_local17 * _local36); _local21 = (_local17 * _local37); _local30.x = (_local30.x - (_local32 * (_local18 + _local20))); _local30.y = (_local30.y - (_local32 * (_local19 + _local21))); _local28 = (_local28 - (_local33 * ((((_local43.rA.x * _local19) - (_local43.rA.y * _local18)) + (_local44.rA.x * _local21)) - (_local44.rA.y * _local20)))); _local31.x = (_local31.x + (_local34 * (_local18 + _local20))); _local31.y = (_local31.y + (_local34 * (_local19 + _local21))); _local29 = (_local29 + (_local35 * ((((_local43.rB.x * _local19) - (_local43.rB.y * _local18)) + (_local44.rB.x * _local21)) - (_local44.rB.y * _local20)))); _local43.normalImpulse = _local56; _local44.normalImpulse = _local57; break; }; _local56 = 0; _local57 = 0; _local51 = _local53; _local52 = _local54; if ((((_local51 >= 0)) && ((_local52 >= 0)))){ _local16 = (_local56 - _local45); _local17 = (_local57 - _local46); _local18 = (_local16 * _local36); _local19 = (_local16 * _local37); _local20 = (_local17 * _local36); _local21 = (_local17 * _local37); _local30.x = (_local30.x - (_local32 * (_local18 + _local20))); _local30.y = (_local30.y - (_local32 * (_local19 + _local21))); _local28 = (_local28 - (_local33 * ((((_local43.rA.x * _local19) - (_local43.rA.y * _local18)) + (_local44.rA.x * _local21)) - (_local44.rA.y * _local20)))); _local31.x = (_local31.x + (_local34 * (_local18 + _local20))); _local31.y = (_local31.y + (_local34 * (_local19 + _local21))); _local29 = (_local29 + (_local35 * ((((_local43.rB.x * _local19) - (_local43.rB.y * _local18)) + (_local44.rB.x * _local21)) - (_local44.rB.y * _local20)))); _local43.normalImpulse = _local56; _local44.normalImpulse = _local57; break; }; break; }; }; _local26.m_angularVelocity = _local28; _local27.m_angularVelocity = _local29; _local24++; }; } public function FinalizeVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ManifoldPoint; var _local6:b2ContactConstraintPoint; _local1 = 0; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local5 = _local3.m_points[_local4]; _local6 = _local2.points[_local4]; _local5.m_normalImpulse = _local6.normalImpulse; _local5.m_tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 51
//b2EdgeAndCircleContact (Box2D.Dynamics.Contacts.b2EdgeAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2EdgeAndCircleContact extends b2Contact { override b2internal function Evaluate():void{ var _local1:b2Body; var _local2:b2Body; _local1 = m_fixtureA.GetBody(); _local2 = m_fixtureB.GetBody(); b2CollideEdgeAndCircle(m_manifold, (m_fixtureA.GetShape() as b2EdgeShape), _local1.m_xf, (m_fixtureB.GetShape() as b2CircleShape), _local2.m_xf); } private function b2CollideEdgeAndCircle(_arg1:b2Manifold, _arg2:b2EdgeShape, _arg3:b2Transform, _arg4:b2CircleShape, _arg5:b2Transform):void{ } public function Reset(_arg1:b2Fixture, _arg2:b2Fixture):void{ super.Reset(_arg1, _arg2); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1):b2Contact{ return (new (b2EdgeAndCircleContact)); } } }//package Box2D.Dynamics.Contacts
Section 52
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { override b2internal function Evaluate():void{ var _local1:b2Body; var _local2:b2Body; _local1 = m_fixtureA.m_body; _local2 = m_fixtureB.m_body; b2Collision.CollidePolygonAndCircle(m_manifold, (m_fixtureA.GetShape() as b2PolygonShape), _local1.m_xf, (m_fixtureB.GetShape() as b2CircleShape), _local2.m_xf); } public function Reset(_arg1:b2Fixture, _arg2:b2Fixture):void{ super.Reset(_arg1, _arg2); b2Settings.b2Assert((_arg1.GetType() == b2Shape.e_polygonShape)); b2Settings.b2Assert((_arg2.GetType() == b2Shape.e_circleShape)); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1):b2Contact{ return (new (b2PolyAndCircleContact)); } } }//package Box2D.Dynamics.Contacts
Section 53
//b2PolyAndEdgeContact (Box2D.Dynamics.Contacts.b2PolyAndEdgeContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolyAndEdgeContact extends b2Contact { override b2internal function Evaluate():void{ var _local1:b2Body; var _local2:b2Body; _local1 = m_fixtureA.GetBody(); _local2 = m_fixtureB.GetBody(); b2CollidePolyAndEdge(m_manifold, (m_fixtureA.GetShape() as b2PolygonShape), _local1.m_xf, (m_fixtureB.GetShape() as b2EdgeShape), _local2.m_xf); } private function b2CollidePolyAndEdge(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2Transform, _arg4:b2EdgeShape, _arg5:b2Transform):void{ } public function Reset(_arg1:b2Fixture, _arg2:b2Fixture):void{ super.Reset(_arg1, _arg2); b2Settings.b2Assert((_arg1.GetType() == b2Shape.e_polygonShape)); b2Settings.b2Assert((_arg2.GetType() == b2Shape.e_edgeShape)); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1):b2Contact{ return (new (b2PolyAndEdgeContact)); } } }//package Box2D.Dynamics.Contacts
Section 54
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolygonContact extends b2Contact { override b2internal function Evaluate():void{ var _local1:b2Body; var _local2:b2Body; _local1 = m_fixtureA.GetBody(); _local2 = m_fixtureB.GetBody(); b2Collision.CollidePolygons(m_manifold, (m_fixtureA.GetShape() as b2PolygonShape), _local1.m_xf, (m_fixtureB.GetShape() as b2PolygonShape), _local2.m_xf); } public function Reset(_arg1:b2Fixture, _arg2:b2Fixture):void{ super.Reset(_arg1, _arg2); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1):b2Contact{ return (new (b2PolygonContact)); } } }//package Box2D.Dynamics.Contacts
Section 55
//b2PositionSolverManifold (Box2D.Dynamics.Contacts.b2PositionSolverManifold) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; class b2PositionSolverManifold { public var m_points:Array; public var m_normal:b2Vec2; public var m_separations:Array; private static var circlePointA:b2Vec2 = new b2Vec2(); private static var circlePointB:b2Vec2 = new b2Vec2(); function b2PositionSolverManifold(){ var _local1:int; super(); m_normal = new b2Vec2(); m_separations = new Array(b2Settings.b2_maxManifoldPoints); m_points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { m_points[_local1] = new b2Vec2(); _local1++; }; } public function Initialize(_arg1:b2ContactConstraint):void{ var _local2:int; var _local3:Number; var _local4:Number; var _local5:b2Mat22; var _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; b2Settings.b2Assert((_arg1.pointCount > 0)); switch (_arg1.type){ case b2Manifold.e_circles: _local5 = _arg1.bodyA.m_xf.R; _local6 = _arg1.localPoint; _local9 = (_arg1.bodyA.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local10 = (_arg1.bodyA.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); _local5 = _arg1.bodyB.m_xf.R; _local6 = _arg1.points[0].localPoint; _local11 = (_arg1.bodyB.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local12 = (_arg1.bodyB.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = ((_local13 * _local13) + (_local14 * _local14)); if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){ _local16 = Math.sqrt(_local15); m_normal.x = (_local13 / _local16); m_normal.y = (_local14 / _local16); } else { m_normal.x = 1; m_normal.y = 0; }; m_points[0].x = (0.5 * (_local9 + _local11)); m_points[0].y = (0.5 * (_local10 + _local12)); m_separations[0] = (((_local13 * m_normal.x) + (_local14 * m_normal.y)) - _arg1.radius); break; case b2Manifold.e_faceA: _local5 = _arg1.bodyA.m_xf.R; _local6 = _arg1.localPlaneNormal; m_normal.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y)); m_normal.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y)); _local5 = _arg1.bodyA.m_xf.R; _local6 = _arg1.localPoint; _local7 = (_arg1.bodyA.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local8 = (_arg1.bodyA.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); _local5 = _arg1.bodyB.m_xf.R; _local2 = 0; while (_local2 < _arg1.pointCount) { _local6 = _arg1.points[_local2].localPoint; _local3 = (_arg1.bodyB.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local4 = (_arg1.bodyB.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); m_separations[_local2] = ((((_local3 - _local7) * m_normal.x) + ((_local4 - _local8) * m_normal.y)) - _arg1.radius); m_points[_local2].x = _local3; m_points[_local2].y = _local4; _local2++; }; break; case b2Manifold.e_faceB: _local5 = _arg1.bodyB.m_xf.R; _local6 = _arg1.localPlaneNormal; m_normal.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y)); m_normal.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y)); _local5 = _arg1.bodyB.m_xf.R; _local6 = _arg1.localPoint; _local7 = (_arg1.bodyB.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local8 = (_arg1.bodyB.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); _local5 = _arg1.bodyA.m_xf.R; _local2 = 0; while (_local2 < _arg1.pointCount) { _local6 = _arg1.points[_local2].localPoint; _local3 = (_arg1.bodyA.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local4 = (_arg1.bodyA.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); m_separations[_local2] = ((((_local3 - _local7) * m_normal.x) + ((_local4 - _local8) * m_normal.y)) - _arg1.radius); m_points[_local2].Set(_local3, _local4); _local2++; }; m_normal.x = (m_normal.x * -1); m_normal.y = (m_normal.y * -1); break; }; } } }//package Box2D.Dynamics.Contacts
Section 56
//b2Controller (Box2D.Dynamics.Controllers.b2Controller) package Box2D.Dynamics.Controllers { import Box2D.Dynamics.*; import Box2D.Common.*; public class b2Controller { b2internal var m_world:b2World; b2internal var m_next:b2Controller; protected var m_bodyList:b2ControllerEdge; b2internal var m_prev:b2Controller; protected var m_bodyCount:int; public function AddBody(_arg1:b2Body):void{ var _local2:b2ControllerEdge; _local2 = new b2ControllerEdge(); _local2.controller = this; _local2.body = _arg1; _local2.nextBody = m_bodyList; _local2.prevBody = null; m_bodyList = _local2; if (_local2.nextBody){ _local2.nextBody.prevBody = _local2; }; m_bodyCount++; _local2.nextController = _arg1.m_controllerList; _local2.prevController = null; _arg1.m_controllerList = _local2; if (_local2.nextController){ _local2.nextController.prevController = _local2; }; _arg1.m_controllerCount++; } public function Draw(_arg1:b2DebugDraw):void{ } public function RemoveBody(_arg1:b2Body):void{ var _local2:b2ControllerEdge; _local2 = _arg1.m_controllerList; while (((_local2) && (!((_local2.controller == this))))) { _local2 = _local2.nextController; }; if (_local2.prevBody){ _local2.prevBody.nextBody = _local2.nextBody; }; if (_local2.nextBody){ _local2.nextBody.prevBody = _local2.prevBody; }; if (_local2.nextController){ _local2.nextController.prevController = _local2.prevController; }; if (_local2.prevController){ _local2.prevController.nextController = _local2.nextController; }; if (m_bodyList == _local2){ m_bodyList = _local2.nextBody; }; if (_arg1.m_controllerList == _local2){ _arg1.m_controllerList = _local2.nextController; }; _arg1.m_controllerCount--; m_bodyCount--; } public function GetNext():b2Controller{ return (m_next); } public function Step(_arg1:b2TimeStep):void{ } public function Clear():void{ while (m_bodyList) { RemoveBody(m_bodyList.body); }; } public function GetBodyList():b2ControllerEdge{ return (m_bodyList); } public function GetWorld():b2World{ return (m_world); } } }//package Box2D.Dynamics.Controllers
Section 57
//b2ControllerEdge (Box2D.Dynamics.Controllers.b2ControllerEdge) package Box2D.Dynamics.Controllers { import Box2D.Dynamics.*; public class b2ControllerEdge { public var body:b2Body; public var nextController:b2ControllerEdge; public var nextBody:b2ControllerEdge; public var prevController:b2ControllerEdge; public var prevBody:b2ControllerEdge; public var controller:b2Controller; } }//package Box2D.Dynamics.Controllers
Section 58
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2DistanceJoint extends b2Joint { private var m_mass:Number; private var m_u:b2Vec2; private var m_length:Number; private var m_impulse:Number; private var m_dampingRatio:Number; private var m_localAnchor1:b2Vec2; private var m_localAnchor2:b2Vec2; private var m_frequencyHz:Number; private var m_gamma:Number; private var m_bias:Number; public function b2DistanceJoint(_arg1:b2DistanceJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u = new b2Vec2(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchorA); m_localAnchor2.SetV(_arg1.localAnchorB); m_length = _arg1.length; m_frequencyHz = _arg1.frequencyHz; m_dampingRatio = _arg1.dampingRatio; m_impulse = 0; m_gamma = 0; m_bias = 0; } public function GetDampingRatio():Number{ return (m_dampingRatio); } public function SetDampingRatio(_arg1:Number):void{ m_dampingRatio = _arg1; } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchor1)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2(((_arg1 * m_impulse) * m_u.x), ((_arg1 * m_impulse) * m_u.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:b2Mat22; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; if (m_frequencyHz > 0){ return (true); }; _local3 = m_bodyA; _local4 = m_bodyB; _local2 = _local3.m_xf.R; _local5 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6)); _local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6)); _local5 = _local7; _local2 = _local4.m_xf.R; _local8 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local7; _local10 = (((_local4.m_sweep.c.x + _local8) - _local3.m_sweep.c.x) - _local5); _local11 = (((_local4.m_sweep.c.y + _local9) - _local3.m_sweep.c.y) - _local6); _local12 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); _local10 = (_local10 / _local12); _local11 = (_local11 / _local12); _local13 = (_local12 - m_length); _local13 = b2Math.Clamp(_local13, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local14 = (-(m_mass) * _local13); m_u.Set(_local10, _local11); _local15 = (_local14 * m_u.x); _local16 = (_local14 * m_u.y); _local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local15)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local16)); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local5 * _local16) - (_local6 * _local15)))); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local15)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local16)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local8 * _local16) - (_local9 * _local15)))); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); return ((b2Math.Abs(_local13) < b2Settings.b2_linearSlop)); } public function GetLength():Number{ return (m_length); } public function SetFrequency(_arg1:Number):void{ m_frequencyHz = _arg1; } public function GetFrequency():Number{ return (m_frequencyHz); } public function SetLength(_arg1:Number):void{ m_length = _arg1; } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _local4 = m_bodyA; _local5 = m_bodyB; _local2 = _local4.m_xf.R; _local6 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7)); _local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7)); _local6 = _local3; _local2 = _local5.m_xf.R; _local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local3; m_u.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6); m_u.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7); _local10 = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y))); if (_local10 > b2Settings.b2_linearSlop){ m_u.Multiply((1 / _local10)); } else { m_u.SetZero(); }; _local11 = ((_local6 * m_u.y) - (_local7 * m_u.x)); _local12 = ((_local8 * m_u.y) - (_local9 * m_u.x)); _local13 = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12)); m_mass = ((_local13)!=0) ? (1 / _local13) : 0; if (m_frequencyHz > 0){ _local14 = (_local10 - m_length); _local15 = ((2 * Math.PI) * m_frequencyHz); _local16 = (((2 * m_mass) * m_dampingRatio) * _local15); _local17 = ((m_mass * _local15) * _local15); m_gamma = (_arg1.dt * (_local16 + (_arg1.dt * _local17))); m_gamma = ((m_gamma)!=0) ? (1 / m_gamma) : 0; m_bias = (((_local14 * _arg1.dt) * _local17) * m_gamma); m_mass = (_local13 + m_gamma); m_mass = ((m_mass)!=0) ? (1 / m_mass) : 0; }; if (_arg1.warmStarting){ m_impulse = (m_impulse * _arg1.dtRatio); _local18 = (m_impulse * m_u.x); _local19 = (m_impulse * m_u.y); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local18)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local19)); _local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local19) - (_local7 * _local18)))); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local18)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local19)); _local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local19) - (_local9 * _local18)))); } else { m_impulse = 0; }; } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local3 = m_bodyA; _local4 = m_bodyB; _local2 = _local3.m_xf.R; _local5 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6)); _local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6)); _local5 = _local7; _local2 = _local4.m_xf.R; _local8 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local7; _local10 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6)); _local11 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5)); _local12 = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9)); _local13 = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8)); _local14 = ((m_u.x * (_local12 - _local10)) + (m_u.y * (_local13 - _local11))); _local15 = (-(m_mass) * ((_local14 + m_bias) + (m_gamma * m_impulse))); m_impulse = (m_impulse + _local15); _local16 = (_local15 * m_u.x); _local17 = (_local15 * m_u.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16)))); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17)); _local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); } } }//package Box2D.Dynamics.Joints
Section 59
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2DistanceJointDef extends b2JointDef { public var length:Number; public var localAnchorA:b2Vec2; public var localAnchorB:b2Vec2; public var frequencyHz:Number; public var dampingRatio:Number; public function b2DistanceJointDef(){ localAnchorA = new b2Vec2(); localAnchorB = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; length = 1; frequencyHz = 0; dampingRatio = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ var _local5:Number; var _local6:Number; bodyA = _arg1; bodyB = _arg2; localAnchorA.SetV(bodyA.GetLocalPoint(_arg3)); localAnchorB.SetV(bodyB.GetLocalPoint(_arg4)); _local5 = (_arg4.x - _arg3.x); _local6 = (_arg4.y - _arg3.y); length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6))); frequencyHz = 0; dampingRatio = 0; } } }//package Box2D.Dynamics.Joints
Section 60
//b2FrictionJoint (Box2D.Dynamics.Joints.b2FrictionJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2FrictionJoint extends b2Joint { public var m_angularMass:Number; private var m_maxTorque:Number; private var m_linearImpulse:b2Vec2; public var m_linearMass:b2Mat22; private var m_localAnchorB:b2Vec2; private var m_localAnchorA:b2Vec2; private var m_angularImpulse:Number; private var m_maxForce:Number; public function b2FrictionJoint(_arg1:b2FrictionJointDef){ m_localAnchorA = new b2Vec2(); m_localAnchorB = new b2Vec2(); m_linearMass = new b2Mat22(); m_linearImpulse = new b2Vec2(); super(_arg1); m_localAnchorA.SetV(_arg1.localAnchorA); m_localAnchorB.SetV(_arg1.localAnchorB); m_linearMass.SetZero(); m_angularMass = 0; m_linearImpulse.SetZero(); m_angularImpulse = 0; m_maxForce = _arg1.maxForce; m_maxTorque = _arg1.maxTorque; } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchorA)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchorB)); } public function GetMaxTorque():Number{ return (m_maxTorque); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * m_linearImpulse.x), (_arg1 * m_linearImpulse.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ return (true); } public function GetMaxForce():Number{ return (m_maxForce); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:b2Mat22; var _local15:b2Vec2; _local4 = m_bodyA; _local5 = m_bodyB; _local2 = _local4.m_xf.R; _local6 = (m_localAnchorA.x - _local4.m_sweep.localCenter.x); _local7 = (m_localAnchorA.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7)); _local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7)); _local6 = _local3; _local2 = _local5.m_xf.R; _local8 = (m_localAnchorB.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchorB.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local3; _local10 = _local4.m_invMass; _local11 = _local5.m_invMass; _local12 = _local4.m_invI; _local13 = _local5.m_invI; _local14 = new b2Mat22(); _local14.col1.x = (_local10 + _local11); _local14.col2.x = 0; _local14.col1.y = 0; _local14.col2.y = (_local10 + _local11); _local14.col1.x = (_local14.col1.x + ((_local12 * _local7) * _local7)); _local14.col2.x = (_local14.col2.x + ((-(_local12) * _local6) * _local7)); _local14.col1.y = (_local14.col1.y + ((-(_local12) * _local6) * _local7)); _local14.col2.y = (_local14.col2.y + ((_local12 * _local6) * _local6)); _local14.col1.x = (_local14.col1.x + ((_local13 * _local9) * _local9)); _local14.col2.x = (_local14.col2.x + ((-(_local13) * _local8) * _local9)); _local14.col1.y = (_local14.col1.y + ((-(_local13) * _local8) * _local9)); _local14.col2.y = (_local14.col2.y + ((_local13 * _local8) * _local8)); _local14.GetInverse(m_linearMass); m_angularMass = (_local12 + _local13); if (m_angularMass > 0){ m_angularMass = (1 / m_angularMass); }; if (_arg1.warmStarting){ m_linearImpulse.x = (m_linearImpulse.x * _arg1.dtRatio); m_linearImpulse.y = (m_linearImpulse.y * _arg1.dtRatio); m_angularImpulse = (m_angularImpulse * _arg1.dtRatio); _local15 = m_linearImpulse; _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local10 * _local15.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local10 * _local15.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity - (_local12 * (((_local6 * _local15.y) - (_local7 * _local15.x)) + m_angularImpulse))); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local11 * _local15.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local11 * _local15.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + (_local13 * (((_local8 * _local15.y) - (_local9 * _local15.x)) + m_angularImpulse))); } else { m_linearImpulse.SetZero(); m_angularImpulse = 0; }; } public function SetMaxForce(_arg1:Number):void{ m_maxForce = _arg1; } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_angularImpulse)); } public function SetMaxTorque(_arg1:Number):void{ m_maxTorque = _arg1; } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:b2Vec2; var _local7:Number; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:b2Vec2; var _local25:b2Vec2; _local4 = m_bodyA; _local5 = m_bodyB; _local6 = _local4.m_linearVelocity; _local7 = _local4.m_angularVelocity; _local8 = _local5.m_linearVelocity; _local9 = _local5.m_angularVelocity; _local10 = _local4.m_invMass; _local11 = _local5.m_invMass; _local12 = _local4.m_invI; _local13 = _local5.m_invI; _local2 = _local4.m_xf.R; _local14 = (m_localAnchorA.x - _local4.m_sweep.localCenter.x); _local15 = (m_localAnchorA.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local14) + (_local2.col2.x * _local15)); _local15 = ((_local2.col1.y * _local14) + (_local2.col2.y * _local15)); _local14 = _local3; _local2 = _local5.m_xf.R; _local16 = (m_localAnchorB.x - _local5.m_sweep.localCenter.x); _local17 = (m_localAnchorB.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local16) + (_local2.col2.x * _local17)); _local17 = ((_local2.col1.y * _local16) + (_local2.col2.y * _local17)); _local16 = _local3; _local19 = (_local9 - _local7); _local20 = (-(m_angularMass) * _local19); _local21 = m_angularImpulse; _local18 = (_arg1.dt * m_maxTorque); m_angularImpulse = b2Math.Clamp((m_angularImpulse + _local20), -(_local18), _local18); _local20 = (m_angularImpulse - _local21); _local7 = (_local7 - (_local12 * _local20)); _local9 = (_local9 + (_local13 * _local20)); _local22 = (((_local8.x - (_local9 * _local17)) - _local6.x) + (_local7 * _local15)); _local23 = (((_local8.y + (_local9 * _local16)) - _local6.y) - (_local7 * _local14)); _local24 = b2Math.MulMV(m_linearMass, new b2Vec2(-(_local22), -(_local23))); _local25 = m_linearImpulse.Copy(); m_linearImpulse.Add(_local24); _local18 = (_arg1.dt * m_maxForce); if (m_linearImpulse.LengthSquared() > (_local18 * _local18)){ m_linearImpulse.Normalize(); m_linearImpulse.Multiply(_local18); }; _local24 = b2Math.SubtractVV(m_linearImpulse, _local25); _local6.x = (_local6.x - (_local10 * _local24.x)); _local6.y = (_local6.y - (_local10 * _local24.y)); _local7 = (_local7 - (_local12 * ((_local14 * _local24.y) - (_local15 * _local24.x)))); _local8.x = (_local8.x + (_local11 * _local24.x)); _local8.y = (_local8.y + (_local11 * _local24.y)); _local9 = (_local9 + (_local13 * ((_local16 * _local24.y) - (_local17 * _local24.x)))); _local4.m_angularVelocity = _local7; _local5.m_angularVelocity = _local9; } } }//package Box2D.Dynamics.Joints
Section 61
//b2FrictionJointDef (Box2D.Dynamics.Joints.b2FrictionJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2FrictionJointDef extends b2JointDef { public var maxTorque:Number; public var localAnchorA:b2Vec2; public var localAnchorB:b2Vec2; public var maxForce:Number; public function b2FrictionJointDef(){ localAnchorA = new b2Vec2(); localAnchorB = new b2Vec2(); super(); type = b2Joint.e_frictionJoint; maxForce = 0; maxTorque = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{ bodyA = _arg1; bodyB = _arg2; localAnchorA.SetV(bodyA.GetLocalPoint(_arg3)); localAnchorB.SetV(bodyB.GetLocalPoint(_arg3)); } } }//package Box2D.Dynamics.Joints
Section 62
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2GearJoint extends b2Joint { private var m_impulse:Number; private var m_J:b2Jacobian; private var m_mass:Number; private var m_prismatic1:b2PrismaticJoint; private var m_prismatic2:b2PrismaticJoint; private var m_ground1:b2Body; private var m_ground2:b2Body; private var m_constant:Number; private var m_revolute1:b2RevoluteJoint; private var m_revolute2:b2RevoluteJoint; private var m_groundAnchor1:b2Vec2; private var m_groundAnchor2:b2Vec2; private var m_ratio:Number; private var m_localAnchor2:b2Vec2; private var m_localAnchor1:b2Vec2; public function b2GearJoint(_arg1:b2GearJointDef){ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_J = new b2Jacobian(); super(_arg1); _local2 = _arg1.joint1.m_type; _local3 = _arg1.joint2.m_type; m_revolute1 = null; m_prismatic1 = null; m_revolute2 = null; m_prismatic2 = null; m_ground1 = _arg1.joint1.GetBodyA(); m_bodyA = _arg1.joint1.GetBodyB(); if (_local2 == b2Joint.e_revoluteJoint){ m_revolute1 = (_arg1.joint1 as b2RevoluteJoint); m_groundAnchor1.SetV(m_revolute1.m_localAnchor1); m_localAnchor1.SetV(m_revolute1.m_localAnchor2); _local4 = m_revolute1.GetJointAngle(); } else { m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint); m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1); m_localAnchor1.SetV(m_prismatic1.m_localAnchor2); _local4 = m_prismatic1.GetJointTranslation(); }; m_ground2 = _arg1.joint2.GetBodyA(); m_bodyB = _arg1.joint2.GetBodyB(); if (_local3 == b2Joint.e_revoluteJoint){ m_revolute2 = (_arg1.joint2 as b2RevoluteJoint); m_groundAnchor2.SetV(m_revolute2.m_localAnchor1); m_localAnchor2.SetV(m_revolute2.m_localAnchor2); _local5 = m_revolute2.GetJointAngle(); } else { m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint); m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1); m_localAnchor2.SetV(m_prismatic2.m_localAnchor2); _local5 = m_prismatic2.GetJointTranslation(); }; m_ratio = _arg1.ratio; m_constant = (_local4 + (m_ratio * _local5)); m_impulse = 0; } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchor1)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2(((_arg1 * m_impulse) * m_J.linearB.x), ((_arg1 * m_impulse) * m_J.linearB.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local2 = 0; _local3 = m_bodyA; _local4 = m_bodyB; if (m_revolute1){ _local5 = m_revolute1.GetJointAngle(); } else { _local5 = m_prismatic1.GetJointTranslation(); }; if (m_revolute2){ _local6 = m_revolute2.GetJointAngle(); } else { _local6 = m_prismatic2.GetJointTranslation(); }; _local7 = (m_constant - (_local5 + (m_ratio * _local6))); _local8 = (-(m_mass) * _local7); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local8) * m_J.linearA.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local8) * m_J.linearA.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local8) * m_J.angularA)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local4.m_invMass * _local8) * m_J.linearB.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local4.m_invMass * _local8) * m_J.linearB.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local4.m_invI * _local8) * m_J.angularB)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); return ((_local2 < b2Settings.b2_linearSlop)); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; _local2 = m_ground1; _local3 = m_ground2; _local4 = m_bodyA; _local5 = m_bodyB; _local14 = 0; m_J.SetZero(); if (m_revolute1){ m_J.angularA = -1; _local14 = (_local14 + _local4.m_invI); } else { _local10 = _local2.m_xf.R; _local11 = m_prismatic1.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local4.m_xf.R; _local8 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linearA.Set(-(_local6), -(_local7)); m_J.angularA = -(_local12); _local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12))); }; if (m_revolute2){ m_J.angularB = -(m_ratio); _local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI)); } else { _local10 = _local3.m_xf.R; _local11 = m_prismatic2.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local5.m_xf.R; _local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linearB.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7)); m_J.angularB = (-(m_ratio) * _local12); _local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12)))); }; m_mass = ((_local14 > 0)) ? (1 / _local14) : 0; if (_arg1.warmStarting){ _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * m_impulse) * m_J.linearA.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * m_impulse) * m_J.linearA.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * m_impulse) * m_J.angularA)); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * m_impulse) * m_J.linearB.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * m_impulse) * m_J.linearB.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * m_impulse) * m_J.angularB)); } else { m_impulse = 0; }; } public function SetRatio(_arg1:Number):void{ m_ratio = _arg1; } override public function GetReactionTorque(_arg1:Number):Number{ var _local2:b2Mat22; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local2 = m_bodyB.m_xf.R; _local3 = (m_localAnchor1.x - m_bodyB.m_sweep.localCenter.x); _local4 = (m_localAnchor1.y - m_bodyB.m_sweep.localCenter.y); _local5 = ((_local2.col1.x * _local3) + (_local2.col2.x * _local4)); _local4 = ((_local2.col1.y * _local3) + (_local2.col2.y * _local4)); _local3 = _local5; _local6 = (m_impulse * m_J.linearB.x); _local7 = (m_impulse * m_J.linearB.y); return ((_arg1 * (((m_impulse * m_J.angularB) - (_local3 * _local7)) + (_local4 * _local6)))); } public function GetRatio():Number{ return (m_ratio); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; _local2 = m_bodyA; _local3 = m_bodyB; _local4 = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local5 = (-(m_mass) * _local4); m_impulse = (m_impulse + _local5); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local5) * m_J.linearA.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local5) * m_J.linearA.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local5) * m_J.angularA)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local5) * m_J.linearB.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local5) * m_J.linearB.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local5) * m_J.angularB)); } } }//package Box2D.Dynamics.Joints
Section 63
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef) package Box2D.Dynamics.Joints { public class b2GearJointDef extends b2JointDef { public var joint2:b2Joint; public var joint1:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Box2D.Dynamics.Joints
Section 64
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2Jacobian { public var angularB:Number; public var linearA:b2Vec2; public var linearB:b2Vec2; public var angularA:Number; public function b2Jacobian(){ linearA = new b2Vec2(); linearB = new b2Vec2(); super(); } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{ linearA.SetV(_arg1); angularA = _arg2; linearB.SetV(_arg3); angularB = _arg4; } public function SetZero():void{ linearA.SetZero(); angularA = 0; linearB.SetZero(); angularB = 0; } public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{ return ((((((linearA.x * _arg1.x) + (linearA.y * _arg1.y)) + (angularA * _arg2)) + ((linearB.x * _arg3.x) + (linearB.y * _arg3.y))) + (angularB * _arg4))); } } }//package Box2D.Dynamics.Joints
Section 65
//b2Joint (Box2D.Dynamics.Joints.b2Joint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2Joint { b2internal var m_islandFlag:Boolean; b2internal var m_next:b2Joint; b2internal var m_invMassA:Number; b2internal var m_localCenterA:b2Vec2; b2internal var m_type:int; b2internal var m_bodyA:b2Body; b2internal var m_bodyB:b2Body; b2internal var m_edgeA:b2JointEdge; b2internal var m_edgeB:b2JointEdge; b2internal var m_prev:b2Joint; b2internal var m_invMassB:Number; b2internal var m_localCenterB:b2Vec2; private var m_userData; b2internal var m_invIB:Number; b2internal var m_collideConnected:Boolean; b2internal var m_invIA:Number; b2internal static const e_prismaticJoint:int = 2; b2internal static const e_weldJoint:int = 8; b2internal static const e_equalLimits:int = 3; b2internal static const e_frictionJoint:int = 9; b2internal static const e_lineJoint:int = 7; b2internal static const e_gearJoint:int = 6; b2internal static const e_atUpperLimit:int = 2; b2internal static const e_atLowerLimit:int = 1; b2internal static const e_revoluteJoint:int = 1; b2internal static const e_inactiveLimit:int = 0; b2internal static const e_pulleyJoint:int = 4; b2internal static const e_unknownJoint:int = 0; b2internal static const e_distanceJoint:int = 3; b2internal static const e_mouseJoint:int = 5; public function b2Joint(_arg1:b2JointDef){ m_edgeA = new b2JointEdge(); m_edgeB = new b2JointEdge(); m_localCenterA = new b2Vec2(); m_localCenterB = new b2Vec2(); super(); b2Settings.b2Assert(!((_arg1.bodyA == _arg1.bodyB))); m_type = _arg1.type; m_prev = null; m_next = null; m_bodyA = _arg1.bodyA; m_bodyB = _arg1.bodyB; m_collideConnected = _arg1.collideConnected; m_islandFlag = false; m_userData = _arg1.userData; } public function GetNext():b2Joint{ return (m_next); } public function GetBodyB():b2Body{ return (m_bodyB); } public function GetBodyA():b2Body{ return (m_bodyA); } public function GetAnchorA():b2Vec2{ return (null); } public function GetType():int{ return (m_type); } public function GetAnchorB():b2Vec2{ return (null); } b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ } public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce(_arg1:Number):b2Vec2{ return (null); } b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ return (false); } public function IsActive():Boolean{ return (((m_bodyA.IsActive()) && (m_bodyB.IsActive()))); } public function SetUserData(_arg1):void{ m_userData = _arg1; } b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } b2internal function FinalizeVelocityConstraints():void{ } b2internal static function Destroy(_arg1:b2Joint, _arg2):void{ } b2internal static function Create(_arg1:b2JointDef, _arg2):b2Joint{ var _local3:b2Joint; _local3 = null; switch (_arg1.type){ case e_distanceJoint: _local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef)); break; case e_mouseJoint: _local3 = new b2MouseJoint((_arg1 as b2MouseJointDef)); break; case e_prismaticJoint: _local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef)); break; case e_revoluteJoint: _local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef)); break; case e_pulleyJoint: _local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef)); break; case e_gearJoint: _local3 = new b2GearJoint((_arg1 as b2GearJointDef)); break; case e_lineJoint: _local3 = new b2LineJoint((_arg1 as b2LineJointDef)); break; case e_weldJoint: _local3 = new b2WeldJoint((_arg1 as b2WeldJointDef)); break; case e_frictionJoint: _local3 = new b2FrictionJoint((_arg1 as b2FrictionJointDef)); break; default: break; }; return (_local3); } } }//package Box2D.Dynamics.Joints
Section 66
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointDef { public var bodyB:b2Body; public var collideConnected:Boolean; public var userData; public var type:int; public var bodyA:b2Body; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; bodyA = null; bodyB = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 67
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointEdge { public var joint:b2Joint; public var other:b2Body; public var next:b2JointEdge; public var prev:b2JointEdge; } }//package Box2D.Dynamics.Joints
Section 68
//b2LineJoint (Box2D.Dynamics.Joints.b2LineJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2LineJoint extends b2Joint { private var m_a1:Number; private var m_a2:Number; private var m_impulse:b2Vec2; private var m_enableLimit:Boolean; private var m_localYAxis1:b2Vec2; private var m_s2:Number; private var m_s1:Number; private var m_upperTranslation:Number; private var m_axis:b2Vec2; private var m_motorImpulse:Number; private var m_lowerTranslation:Number; private var m_perp:b2Vec2; b2internal var m_localXAxis1:b2Vec2; private var m_maxMotorForce:Number; private var m_motorMass:Number; b2internal var m_localAnchor1:b2Vec2; b2internal var m_localAnchor2:b2Vec2; private var m_limitState:int; private var m_enableMotor:Boolean; private var m_motorSpeed:Number; private var m_K:b2Mat22; public function b2LineJoint(_arg1:b2LineJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_localXAxis1 = new b2Vec2(); m_localYAxis1 = new b2Vec2(); m_axis = new b2Vec2(); m_perp = new b2Vec2(); m_K = new b2Mat22(); m_impulse = new b2Vec2(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchorA); m_localAnchor2.SetV(_arg1.localAnchorB); m_localXAxis1.SetV(_arg1.localAxisA); m_localYAxis1.x = -(m_localXAxis1.y); m_localYAxis1.y = m_localXAxis1.x; m_impulse.SetZero(); m_motorMass = 0; m_motorImpulse = 0; m_lowerTranslation = _arg1.lowerTranslation; m_upperTranslation = _arg1.upperTranslation; m_maxMotorForce = _arg1.maxMotorForce; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; m_limitState = e_inactiveLimit; m_axis.SetZero(); m_perp.SetZero(); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } public function GetLowerLimit():Number{ return (m_lowerTranslation); } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchor1)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchor2)); } public function GetJointTranslation():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:b2Vec2; var _local9:Number; _local1 = m_bodyA; _local2 = m_bodyB; _local4 = _local1.GetWorldPoint(m_localAnchor1); _local5 = _local2.GetWorldPoint(m_localAnchor2); _local6 = (_local5.x - _local4.x); _local7 = (_local5.y - _local4.y); _local8 = _local1.GetWorldVector(m_localXAxis1); _local9 = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetMotorForce():Number{ return (m_motorImpulse); } public function GetMaxMotorForce():Number{ return (m_maxMotorForce); } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_impulse.y)); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Vec2; var _local5:Number; var _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:b2Vec2; var _local19:b2Vec2; var _local20:Number; var _local21:Number; var _local22:Number; _local2 = m_bodyA; _local3 = m_bodyB; _local4 = _local2.m_linearVelocity; _local5 = _local2.m_angularVelocity; _local6 = _local3.m_linearVelocity; _local7 = _local3.m_angularVelocity; if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local13 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local14 = (m_motorMass * (m_motorSpeed - _local13)); _local15 = m_motorImpulse; _local16 = (_arg1.dt * m_maxMotorForce); m_motorImpulse = b2Math.Clamp((m_motorImpulse + _local14), -(_local16), _local16); _local14 = (m_motorImpulse - _local15); _local8 = (_local14 * m_axis.x); _local9 = (_local14 * m_axis.y); _local10 = (_local14 * m_a1); _local11 = (_local14 * m_a2); _local4.x = (_local4.x - (m_invMassA * _local8)); _local4.y = (_local4.y - (m_invMassA * _local9)); _local5 = (_local5 - (m_invIA * _local10)); _local6.x = (_local6.x + (m_invMassB * _local8)); _local6.y = (_local6.y + (m_invMassB * _local9)); _local7 = (_local7 + (m_invIB * _local11)); }; _local12 = ((((m_perp.x * (_local6.x - _local4.x)) + (m_perp.y * (_local6.y - _local4.y))) + (m_s2 * _local7)) - (m_s1 * _local5)); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local17 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local18 = m_impulse.Copy(); _local19 = m_K.Solve(new b2Vec2(), -(_local12), -(_local17)); m_impulse.Add(_local19); if (m_limitState == e_atLowerLimit){ m_impulse.y = b2Math.Max(m_impulse.y, 0); } else { if (m_limitState == e_atUpperLimit){ m_impulse.y = b2Math.Min(m_impulse.y, 0); }; }; _local20 = (-(_local12) - ((m_impulse.y - _local18.y) * m_K.col2.x)); if (m_K.col1.x != 0){ _local21 = ((_local20 / m_K.col1.x) + _local18.x); } else { _local21 = _local18.x; }; m_impulse.x = _local21; _local19.x = (m_impulse.x - _local18.x); _local19.y = (m_impulse.y - _local18.y); _local8 = ((_local19.x * m_perp.x) + (_local19.y * m_axis.x)); _local9 = ((_local19.x * m_perp.y) + (_local19.y * m_axis.y)); _local10 = ((_local19.x * m_s1) + (_local19.y * m_a1)); _local11 = ((_local19.x * m_s2) + (_local19.y * m_a2)); _local4.x = (_local4.x - (m_invMassA * _local8)); _local4.y = (_local4.y - (m_invMassA * _local9)); _local5 = (_local5 - (m_invIA * _local10)); _local6.x = (_local6.x + (m_invMassB * _local8)); _local6.y = (_local6.y + (m_invMassB * _local9)); _local7 = (_local7 + (m_invIB * _local11)); } else { if (m_K.col1.x != 0){ _local22 = (-(_local12) / m_K.col1.x); } else { _local22 = 0; }; m_impulse.x = (m_impulse.x + _local22); _local8 = (_local22 * m_perp.x); _local9 = (_local22 * m_perp.y); _local10 = (_local22 * m_s1); _local11 = (_local22 * m_s2); _local4.x = (_local4.x - (m_invMassA * _local8)); _local4.y = (_local4.y - (m_invMassA * _local9)); _local5 = (_local5 - (m_invIA * _local10)); _local6.x = (_local6.x + (m_invMassB * _local8)); _local6.y = (_local6.y + (m_invMassB * _local9)); _local7 = (_local7 + (m_invIB * _local11)); }; _local2.m_linearVelocity.SetV(_local4); _local2.m_angularVelocity = _local5; _local3.m_linearVelocity.SetV(_local6); _local3.m_angularVelocity = _local7; } public function EnableMotor(_arg1:Boolean):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_enableMotor = _arg1; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.y) * m_axis.x))), (_arg1 * ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.y) * m_axis.y))))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:b2Vec2; var _local7:Number; var _local8:b2Vec2; var _local9:Number; var _local10:b2Mat22; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Boolean; var _local19:Number; var _local20:b2Mat22; var _local21:b2Mat22; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:b2Vec2; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; _local4 = m_bodyA; _local5 = m_bodyB; _local6 = _local4.m_sweep.c; _local7 = _local4.m_sweep.a; _local8 = _local5.m_sweep.c; _local9 = _local5.m_sweep.a; _local16 = 0; _local17 = 0; _local18 = false; _local19 = 0; _local20 = b2Mat22.FromAngle(_local7); _local21 = b2Mat22.FromAngle(_local9); _local10 = _local20; _local22 = (m_localAnchor1.x - m_localCenterA.x); _local23 = (m_localAnchor1.y - m_localCenterA.y); _local11 = ((_local10.col1.x * _local22) + (_local10.col2.x * _local23)); _local23 = ((_local10.col1.y * _local22) + (_local10.col2.y * _local23)); _local22 = _local11; _local10 = _local21; _local24 = (m_localAnchor2.x - m_localCenterB.x); _local25 = (m_localAnchor2.y - m_localCenterB.y); _local11 = ((_local10.col1.x * _local24) + (_local10.col2.x * _local25)); _local25 = ((_local10.col1.y * _local24) + (_local10.col2.y * _local25)); _local24 = _local11; _local26 = (((_local8.x + _local24) - _local6.x) - _local22); _local27 = (((_local8.y + _local25) - _local6.y) - _local23); if (m_enableLimit){ m_axis = b2Math.MulMV(_local20, m_localXAxis1); m_a1 = (((_local26 + _local22) * m_axis.y) - ((_local27 + _local23) * m_axis.x)); m_a2 = ((_local24 * m_axis.y) - (_local25 * m_axis.x)); _local34 = ((m_axis.x * _local26) + (m_axis.y * _local27)); if (b2Math.Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ _local19 = b2Math.Clamp(_local34, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local16 = b2Math.Abs(_local34); _local18 = true; } else { if (_local34 <= m_lowerTranslation){ _local19 = b2Math.Clamp(((_local34 - m_lowerTranslation) + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local16 = (m_lowerTranslation - _local34); _local18 = true; } else { if (_local34 >= m_upperTranslation){ _local19 = b2Math.Clamp(((_local34 - m_upperTranslation) + b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local16 = (_local34 - m_upperTranslation); _local18 = true; }; }; }; }; m_perp = b2Math.MulMV(_local20, m_localYAxis1); m_s1 = (((_local26 + _local22) * m_perp.y) - ((_local27 + _local23) * m_perp.x)); m_s2 = ((_local24 * m_perp.y) - (_local25 * m_perp.x)); _local28 = new b2Vec2(); _local29 = ((m_perp.x * _local26) + (m_perp.y * _local27)); _local16 = b2Math.Max(_local16, b2Math.Abs(_local29)); _local17 = 0; if (_local18){ _local12 = m_invMassA; _local13 = m_invMassB; _local14 = m_invIA; _local15 = m_invIB; m_K.col1.x = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); m_K.col1.y = (((_local14 * m_s1) * m_a1) + ((_local15 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (((_local12 + _local13) + ((_local14 * m_a1) * m_a1)) + ((_local15 * m_a2) * m_a2)); m_K.Solve(_local28, -(_local29), -(_local19)); } else { _local12 = m_invMassA; _local13 = m_invMassB; _local14 = m_invIA; _local15 = m_invIB; _local35 = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); if (_local35 != 0){ _local36 = (-(_local29) / _local35); } else { _local36 = 0; }; _local28.x = _local36; _local28.y = 0; }; _local30 = ((_local28.x * m_perp.x) + (_local28.y * m_axis.x)); _local31 = ((_local28.x * m_perp.y) + (_local28.y * m_axis.y)); _local32 = ((_local28.x * m_s1) + (_local28.y * m_a1)); _local33 = ((_local28.x * m_s2) + (_local28.y * m_a2)); _local6.x = (_local6.x - (m_invMassA * _local30)); _local6.y = (_local6.y - (m_invMassA * _local31)); _local7 = (_local7 - (m_invIA * _local32)); _local8.x = (_local8.x + (m_invMassB * _local30)); _local8.y = (_local8.y + (m_invMassB * _local31)); _local9 = (_local9 + (m_invIB * _local33)); _local4.m_sweep.a = _local7; _local5.m_sweep.a = _local9; _local4.SynchronizeTransform(); _local5.SynchronizeTransform(); return ((((_local16 <= b2Settings.b2_linearSlop)) && ((_local17 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:b2Vec2; var _local16:b2Vec2; var _local17:b2Vec2; var _local18:Number; var _local19:Number; var _local20:Number; _local1 = m_bodyA; _local2 = m_bodyB; _local3 = _local1.m_xf.R; _local4 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local5 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local3 = _local2.m_xf.R; _local7 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local8 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8)); _local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8)); _local7 = _local6; _local9 = (_local1.m_sweep.c.x + _local4); _local10 = (_local1.m_sweep.c.y + _local5); _local11 = (_local2.m_sweep.c.x + _local7); _local12 = (_local2.m_sweep.c.y + _local8); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = _local1.GetWorldVector(m_localXAxis1); _local16 = _local1.m_linearVelocity; _local17 = _local2.m_linearVelocity; _local18 = _local1.m_angularVelocity; _local19 = _local2.m_angularVelocity; _local20 = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4))))); return (_local20); } public function SetMotorSpeed(_arg1:Number):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_motorSpeed = _arg1; } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:b2Transform; var _local7:b2Transform; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; _local2 = m_bodyA; _local3 = m_bodyB; m_localCenterA.SetV(_local2.GetLocalCenter()); m_localCenterB.SetV(_local3.GetLocalCenter()); _local6 = _local2.GetTransform(); _local7 = _local3.GetTransform(); _local4 = _local2.m_xf.R; _local8 = (m_localAnchor1.x - m_localCenterA.x); _local9 = (m_localAnchor1.y - m_localCenterA.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local4 = _local3.m_xf.R; _local10 = (m_localAnchor2.x - m_localCenterB.x); _local11 = (m_localAnchor2.y - m_localCenterB.y); _local5 = ((_local4.col1.x * _local10) + (_local4.col2.x * _local11)); _local11 = ((_local4.col1.y * _local10) + (_local4.col2.y * _local11)); _local10 = _local5; _local12 = (((_local3.m_sweep.c.x + _local10) - _local2.m_sweep.c.x) - _local8); _local13 = (((_local3.m_sweep.c.y + _local11) - _local2.m_sweep.c.y) - _local9); m_invMassA = _local2.m_invMass; m_invMassB = _local3.m_invMass; m_invIA = _local2.m_invI; m_invIB = _local3.m_invI; m_axis.SetV(b2Math.MulMV(_local6.R, m_localXAxis1)); m_a1 = (((_local12 + _local8) * m_axis.y) - ((_local13 + _local9) * m_axis.x)); m_a2 = ((_local10 * m_axis.y) - (_local11 * m_axis.x)); m_motorMass = (((m_invMassA + m_invMassB) + ((m_invIA * m_a1) * m_a1)) + ((m_invIB * m_a2) * m_a2)); m_motorMass = ((m_motorMass > Number.MIN_VALUE)) ? (1 / m_motorMass) : 0; m_perp.SetV(b2Math.MulMV(_local6.R, m_localYAxis1)); m_s1 = (((_local12 + _local8) * m_perp.y) - ((_local13 + _local9) * m_perp.x)); m_s2 = ((_local10 * m_perp.y) - (_local11 * m_perp.x)); _local14 = m_invMassA; _local15 = m_invMassB; _local16 = m_invIA; _local17 = m_invIB; m_K.col1.x = (((_local14 + _local15) + ((_local16 * m_s1) * m_s1)) + ((_local17 * m_s2) * m_s2)); m_K.col1.y = (((_local16 * m_s1) * m_a1) + ((_local17 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (((_local14 + _local15) + ((_local16 * m_a1) * m_a1)) + ((_local17 * m_a2) * m_a2)); if (m_enableLimit){ _local18 = ((m_axis.x * _local12) + (m_axis.y * _local13)); if (b2Math.Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local18 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitState = e_atLowerLimit; m_impulse.y = 0; }; } else { if (_local18 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitState = e_atUpperLimit; m_impulse.y = 0; }; } else { m_limitState = e_inactiveLimit; m_impulse.y = 0; }; }; }; } else { m_limitState = e_inactiveLimit; }; if (m_enableMotor == false){ m_motorImpulse = 0; }; if (_arg1.warmStarting){ m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); m_motorImpulse = (m_motorImpulse * _arg1.dtRatio); _local19 = ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.y) * m_axis.x)); _local20 = ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.y) * m_axis.y)); _local21 = ((m_impulse.x * m_s1) + ((m_motorImpulse + m_impulse.y) * m_a1)); _local22 = ((m_impulse.x * m_s2) + ((m_motorImpulse + m_impulse.y) * m_a2)); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (m_invMassA * _local19)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (m_invMassA * _local20)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (m_invIA * _local21)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (m_invMassB * _local19)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (m_invMassB * _local20)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (m_invIB * _local22)); } else { m_impulse.SetZero(); m_motorImpulse = 0; }; } public function EnableLimit(_arg1:Boolean):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_enableLimit = _arg1; } public function SetMaxMotorForce(_arg1:Number):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_maxMotorForce = _arg1; } } }//package Box2D.Dynamics.Joints
Section 69
//b2LineJointDef (Box2D.Dynamics.Joints.b2LineJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2LineJointDef extends b2JointDef { public var localAnchorA:b2Vec2; public var localAnchorB:b2Vec2; public var maxMotorForce:Number; public var motorSpeed:Number; public var localAxisA:b2Vec2; public var upperTranslation:Number; public var enableMotor:Boolean; public var lowerTranslation:Number; public var enableLimit:Boolean; public function b2LineJointDef(){ localAnchorA = new b2Vec2(); localAnchorB = new b2Vec2(); localAxisA = new b2Vec2(); super(); type = b2Joint.e_lineJoint; localAxisA.Set(1, 0); enableLimit = false; lowerTranslation = 0; upperTranslation = 0; enableMotor = false; maxMotorForce = 0; motorSpeed = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ bodyA = _arg1; bodyB = _arg2; localAnchorA = bodyA.GetLocalPoint(_arg3); localAnchorB = bodyB.GetLocalPoint(_arg3); localAxisA = bodyA.GetLocalVector(_arg4); } } }//package Box2D.Dynamics.Joints
Section 70
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { private var m_beta:Number; private var m_mass:b2Mat22; private var m_target:b2Vec2; private var m_impulse:b2Vec2; private var m_localAnchor:b2Vec2; private var m_dampingRatio:Number; private var m_frequencyHz:Number; private var K2:b2Mat22; private var K:b2Mat22; private var K1:b2Mat22; private var m_gamma:Number; private var m_C:b2Vec2; private var m_maxForce:Number; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local2:Number; var _local3:Number; var _local4:b2Mat22; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); m_localAnchor = new b2Vec2(); m_target = new b2Vec2(); m_impulse = new b2Vec2(); m_mass = new b2Mat22(); m_C = new b2Vec2(); super(_arg1); m_target.SetV(_arg1.target); _local2 = (m_target.x - m_bodyB.m_xf.position.x); _local3 = (m_target.y - m_bodyB.m_xf.position.y); _local4 = m_bodyB.m_xf.R; m_localAnchor.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y)); m_localAnchor.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y)); m_maxForce = _arg1.maxForce; m_impulse.SetZero(); m_frequencyHz = _arg1.frequencyHz; m_dampingRatio = _arg1.dampingRatio; m_beta = 0; m_gamma = 0; } public function GetDampingRatio():Number{ return (m_dampingRatio); } public function SetDampingRatio(_arg1:Number):void{ m_dampingRatio = _arg1; } override public function GetAnchorA():b2Vec2{ return (m_target); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchor)); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * m_impulse.x), (_arg1 * m_impulse.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ return (true); } public function GetMaxForce():Number{ return (m_maxForce); } public function SetFrequency(_arg1:Number):void{ m_frequencyHz = _arg1; } public function GetFrequency():Number{ return (m_frequencyHz); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:b2Mat22; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; _local2 = m_bodyB; _local3 = _local2.GetMass(); _local4 = ((2 * Math.PI) * m_frequencyHz); _local5 = (((2 * _local3) * m_dampingRatio) * _local4); _local6 = ((_local3 * _local4) * _local4); m_gamma = (_arg1.dt * (_local5 + (_arg1.dt * _local6))); m_gamma = ((m_gamma)!=0) ? (1 / m_gamma) : 0; m_beta = ((_arg1.dt * _local6) * m_gamma); _local7 = _local2.m_xf.R; _local8 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local9 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local10 = ((_local7.col1.x * _local8) + (_local7.col2.x * _local9)); _local9 = ((_local7.col1.y * _local8) + (_local7.col2.y * _local9)); _local8 = _local10; _local11 = _local2.m_invMass; _local12 = _local2.m_invI; K1.col1.x = _local11; K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = _local11; K2.col1.x = ((_local12 * _local9) * _local9); K2.col2.x = ((-(_local12) * _local8) * _local9); K2.col1.y = ((-(_local12) * _local8) * _local9); K2.col2.y = ((_local12 * _local8) * _local8); K.SetM(K1); K.AddM(K2); K.col1.x = (K.col1.x + m_gamma); K.col2.y = (K.col2.y + m_gamma); K.GetInverse(m_mass); m_C.x = ((_local2.m_sweep.c.x + _local8) - m_target.x); m_C.y = ((_local2.m_sweep.c.y + _local9) - m_target.y); _local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98); m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local11 * m_impulse.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local11 * m_impulse.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * ((_local8 * m_impulse.y) - (_local9 * m_impulse.x)))); } public function SetMaxForce(_arg1:Number):void{ m_maxForce = _arg1; } public function GetTarget():b2Vec2{ return (m_target); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function SetTarget(_arg1:b2Vec2):void{ if (m_bodyB.IsAwake() == false){ m_bodyB.SetAwake(true); }; m_target = _arg1; } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local2 = m_bodyB; _local3 = _local2.m_xf.R; _local6 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local4 = ((_local3.col1.x * _local6) + (_local3.col2.x * _local7)); _local7 = ((_local3.col1.y * _local6) + (_local3.col2.y * _local7)); _local6 = _local4; _local8 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7)); _local9 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6)); _local3 = m_mass; _local4 = ((_local8 + (m_beta * m_C.x)) + (m_gamma * m_impulse.x)); _local5 = ((_local9 + (m_beta * m_C.y)) + (m_gamma * m_impulse.y)); _local10 = -(((_local3.col1.x * _local4) + (_local3.col2.x * _local5))); _local11 = -(((_local3.col1.y * _local4) + (_local3.col2.y * _local5))); _local12 = m_impulse.x; _local13 = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); _local14 = (_arg1.dt * m_maxForce); if (m_impulse.LengthSquared() > (_local14 * _local14)){ m_impulse.Multiply((_local14 / m_impulse.Length())); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local10)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local11)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local11) - (_local7 * _local10)))); } } }//package Box2D.Dynamics.Joints
Section 71
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var frequencyHz:Number; public var dampingRatio:Number; public var maxForce:Number; public var target:b2Vec2; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; } } }//package Box2D.Dynamics.Joints
Section 72
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PrismaticJoint extends b2Joint { private var m_a1:Number; private var m_a2:Number; private var m_impulse:b2Vec3; private var m_enableLimit:Boolean; private var m_localYAxis1:b2Vec2; private var m_s2:Number; private var m_s1:Number; private var m_upperTranslation:Number; private var m_axis:b2Vec2; private var m_motorImpulse:Number; private var m_lowerTranslation:Number; private var m_perp:b2Vec2; b2internal var m_localXAxis1:b2Vec2; private var m_refAngle:Number; private var m_maxMotorForce:Number; private var m_motorMass:Number; b2internal var m_localAnchor1:b2Vec2; b2internal var m_localAnchor2:b2Vec2; private var m_limitState:int; private var m_enableMotor:Boolean; private var m_motorSpeed:Number; private var m_K:b2Mat33; public function b2PrismaticJoint(_arg1:b2PrismaticJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_localXAxis1 = new b2Vec2(); m_localYAxis1 = new b2Vec2(); m_axis = new b2Vec2(); m_perp = new b2Vec2(); m_K = new b2Mat33(); m_impulse = new b2Vec3(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchorA); m_localAnchor2.SetV(_arg1.localAnchorB); m_localXAxis1.SetV(_arg1.localAxisA); m_localYAxis1.x = -(m_localXAxis1.y); m_localYAxis1.y = m_localXAxis1.x; m_refAngle = _arg1.referenceAngle; m_impulse.SetZero(); m_motorMass = 0; m_motorImpulse = 0; m_lowerTranslation = _arg1.lowerTranslation; m_upperTranslation = _arg1.upperTranslation; m_maxMotorForce = _arg1.maxMotorForce; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; m_limitState = e_inactiveLimit; m_axis.SetZero(); m_perp.SetZero(); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } public function GetLowerLimit():Number{ return (m_lowerTranslation); } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchor1)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchor2)); } public function GetJointTranslation():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:b2Vec2; var _local9:Number; _local1 = m_bodyA; _local2 = m_bodyB; _local4 = _local1.GetWorldPoint(m_localAnchor1); _local5 = _local2.GetWorldPoint(m_localAnchor2); _local6 = (_local5.x - _local4.x); _local7 = (_local5.y - _local4.y); _local8 = _local1.GetWorldVector(m_localXAxis1); _local9 = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetMotorForce():Number{ return (m_motorImpulse); } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_impulse.y)); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Vec2; var _local5:Number; var _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:b2Vec3; var _local20:b2Vec3; var _local21:Number; var _local22:Number; var _local23:b2Vec2; var _local24:b2Vec2; _local2 = m_bodyA; _local3 = m_bodyB; _local4 = _local2.m_linearVelocity; _local5 = _local2.m_angularVelocity; _local6 = _local3.m_linearVelocity; _local7 = _local3.m_angularVelocity; if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local14 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local15 = (m_motorMass * (m_motorSpeed - _local14)); _local16 = m_motorImpulse; _local17 = (_arg1.dt * m_maxMotorForce); m_motorImpulse = b2Math.Clamp((m_motorImpulse + _local15), -(_local17), _local17); _local15 = (m_motorImpulse - _local16); _local8 = (_local15 * m_axis.x); _local9 = (_local15 * m_axis.y); _local10 = (_local15 * m_a1); _local11 = (_local15 * m_a2); _local4.x = (_local4.x - (m_invMassA * _local8)); _local4.y = (_local4.y - (m_invMassA * _local9)); _local5 = (_local5 - (m_invIA * _local10)); _local6.x = (_local6.x + (m_invMassB * _local8)); _local6.y = (_local6.y + (m_invMassB * _local9)); _local7 = (_local7 + (m_invIB * _local11)); }; _local12 = ((((m_perp.x * (_local6.x - _local4.x)) + (m_perp.y * (_local6.y - _local4.y))) + (m_s2 * _local7)) - (m_s1 * _local5)); _local13 = (_local7 - _local5); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local18 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local19 = m_impulse.Copy(); _local20 = m_K.Solve33(new b2Vec3(), -(_local12), -(_local13), -(_local18)); m_impulse.Add(_local20); if (m_limitState == e_atLowerLimit){ m_impulse.z = b2Math.Max(m_impulse.z, 0); } else { if (m_limitState == e_atUpperLimit){ m_impulse.z = b2Math.Min(m_impulse.z, 0); }; }; _local21 = (-(_local12) - ((m_impulse.z - _local19.z) * m_K.col3.x)); _local22 = (-(_local13) - ((m_impulse.z - _local19.z) * m_K.col3.y)); _local23 = m_K.Solve22(new b2Vec2(), _local21, _local22); m_K.Solve22(new b2Vec2(), _local21, _local22).x = (_local23.x + _local19.x); _local23.y = (_local23.y + _local19.y); m_impulse.x = _local23.x; m_impulse.y = _local23.y; _local20.x = (m_impulse.x - _local19.x); _local20.y = (m_impulse.y - _local19.y); _local20.z = (m_impulse.z - _local19.z); _local8 = ((_local20.x * m_perp.x) + (_local20.z * m_axis.x)); _local9 = ((_local20.x * m_perp.y) + (_local20.z * m_axis.y)); _local10 = (((_local20.x * m_s1) + _local20.y) + (_local20.z * m_a1)); _local11 = (((_local20.x * m_s2) + _local20.y) + (_local20.z * m_a2)); _local4.x = (_local4.x - (m_invMassA * _local8)); _local4.y = (_local4.y - (m_invMassA * _local9)); _local5 = (_local5 - (m_invIA * _local10)); _local6.x = (_local6.x + (m_invMassB * _local8)); _local6.y = (_local6.y + (m_invMassB * _local9)); _local7 = (_local7 + (m_invIB * _local11)); } else { _local24 = m_K.Solve22(new b2Vec2(), -(_local12), -(_local13)); m_impulse.x = (m_impulse.x + _local24.x); m_impulse.y = (m_impulse.y + _local24.y); _local8 = (_local24.x * m_perp.x); _local9 = (_local24.x * m_perp.y); _local10 = ((_local24.x * m_s1) + _local24.y); _local11 = ((_local24.x * m_s2) + _local24.y); _local4.x = (_local4.x - (m_invMassA * _local8)); _local4.y = (_local4.y - (m_invMassA * _local9)); _local5 = (_local5 - (m_invIA * _local10)); _local6.x = (_local6.x + (m_invMassB * _local8)); _local6.y = (_local6.y + (m_invMassB * _local9)); _local7 = (_local7 + (m_invIB * _local11)); }; _local2.m_linearVelocity.SetV(_local4); _local2.m_angularVelocity = _local5; _local3.m_linearVelocity.SetV(_local6); _local3.m_angularVelocity = _local7; } public function EnableMotor(_arg1:Boolean):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_enableMotor = _arg1; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.z) * m_axis.x))), (_arg1 * ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.z) * m_axis.y))))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:b2Vec2; var _local7:Number; var _local8:b2Vec2; var _local9:Number; var _local10:b2Mat22; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Boolean; var _local19:Number; var _local20:b2Mat22; var _local21:b2Mat22; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:b2Vec3; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:b2Vec2; _local4 = m_bodyA; _local5 = m_bodyB; _local6 = _local4.m_sweep.c; _local7 = _local4.m_sweep.a; _local8 = _local5.m_sweep.c; _local9 = _local5.m_sweep.a; _local16 = 0; _local17 = 0; _local18 = false; _local19 = 0; _local20 = b2Mat22.FromAngle(_local7); _local21 = b2Mat22.FromAngle(_local9); _local10 = _local20; _local22 = (m_localAnchor1.x - m_localCenterA.x); _local23 = (m_localAnchor1.y - m_localCenterA.y); _local11 = ((_local10.col1.x * _local22) + (_local10.col2.x * _local23)); _local23 = ((_local10.col1.y * _local22) + (_local10.col2.y * _local23)); _local22 = _local11; _local10 = _local21; _local24 = (m_localAnchor2.x - m_localCenterB.x); _local25 = (m_localAnchor2.y - m_localCenterB.y); _local11 = ((_local10.col1.x * _local24) + (_local10.col2.x * _local25)); _local25 = ((_local10.col1.y * _local24) + (_local10.col2.y * _local25)); _local24 = _local11; _local26 = (((_local8.x + _local24) - _local6.x) - _local22); _local27 = (((_local8.y + _local25) - _local6.y) - _local23); if (m_enableLimit){ m_axis = b2Math.MulMV(_local20, m_localXAxis1); m_a1 = (((_local26 + _local22) * m_axis.y) - ((_local27 + _local23) * m_axis.x)); m_a2 = ((_local24 * m_axis.y) - (_local25 * m_axis.x)); _local35 = ((m_axis.x * _local26) + (m_axis.y * _local27)); if (b2Math.Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ _local19 = b2Math.Clamp(_local35, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local16 = b2Math.Abs(_local35); _local18 = true; } else { if (_local35 <= m_lowerTranslation){ _local19 = b2Math.Clamp(((_local35 - m_lowerTranslation) + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local16 = (m_lowerTranslation - _local35); _local18 = true; } else { if (_local35 >= m_upperTranslation){ _local19 = b2Math.Clamp(((_local35 - m_upperTranslation) + b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local16 = (_local35 - m_upperTranslation); _local18 = true; }; }; }; }; m_perp = b2Math.MulMV(_local20, m_localYAxis1); m_s1 = (((_local26 + _local22) * m_perp.y) - ((_local27 + _local23) * m_perp.x)); m_s2 = ((_local24 * m_perp.y) - (_local25 * m_perp.x)); _local28 = new b2Vec3(); _local29 = ((m_perp.x * _local26) + (m_perp.y * _local27)); _local30 = ((_local9 - _local7) - m_refAngle); _local16 = b2Math.Max(_local16, b2Math.Abs(_local29)); _local17 = b2Math.Abs(_local30); if (_local18){ _local12 = m_invMassA; _local13 = m_invMassB; _local14 = m_invIA; _local15 = m_invIB; m_K.col1.x = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); m_K.col1.y = ((_local14 * m_s1) + (_local15 * m_s2)); m_K.col1.z = (((_local14 * m_s1) * m_a1) + ((_local15 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (_local14 + _local15); m_K.col2.z = ((_local14 * m_a1) + (_local15 * m_a2)); m_K.col3.x = m_K.col1.z; m_K.col3.y = m_K.col2.z; m_K.col3.z = (((_local12 + _local13) + ((_local14 * m_a1) * m_a1)) + ((_local15 * m_a2) * m_a2)); m_K.Solve33(_local28, -(_local29), -(_local30), -(_local19)); } else { _local12 = m_invMassA; _local13 = m_invMassB; _local14 = m_invIA; _local15 = m_invIB; _local36 = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); _local37 = ((_local14 * m_s1) + (_local15 * m_s2)); _local38 = (_local14 + _local15); m_K.col1.Set(_local36, _local37, 0); m_K.col2.Set(_local37, _local38, 0); _local39 = m_K.Solve22(new b2Vec2(), -(_local29), -(_local30)); _local28.x = _local39.x; _local28.y = _local39.y; _local28.z = 0; }; _local31 = ((_local28.x * m_perp.x) + (_local28.z * m_axis.x)); _local32 = ((_local28.x * m_perp.y) + (_local28.z * m_axis.y)); _local33 = (((_local28.x * m_s1) + _local28.y) + (_local28.z * m_a1)); _local34 = (((_local28.x * m_s2) + _local28.y) + (_local28.z * m_a2)); _local6.x = (_local6.x - (m_invMassA * _local31)); _local6.y = (_local6.y - (m_invMassA * _local32)); _local7 = (_local7 - (m_invIA * _local33)); _local8.x = (_local8.x + (m_invMassB * _local31)); _local8.y = (_local8.y + (m_invMassB * _local32)); _local9 = (_local9 + (m_invIB * _local34)); _local4.m_sweep.a = _local7; _local5.m_sweep.a = _local9; _local4.SynchronizeTransform(); _local5.SynchronizeTransform(); return ((((_local16 <= b2Settings.b2_linearSlop)) && ((_local17 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:b2Vec2; var _local16:b2Vec2; var _local17:b2Vec2; var _local18:Number; var _local19:Number; var _local20:Number; _local1 = m_bodyA; _local2 = m_bodyB; _local3 = _local1.m_xf.R; _local4 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local5 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local3 = _local2.m_xf.R; _local7 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local8 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8)); _local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8)); _local7 = _local6; _local9 = (_local1.m_sweep.c.x + _local4); _local10 = (_local1.m_sweep.c.y + _local5); _local11 = (_local2.m_sweep.c.x + _local7); _local12 = (_local2.m_sweep.c.y + _local8); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = _local1.GetWorldVector(m_localXAxis1); _local16 = _local1.m_linearVelocity; _local17 = _local2.m_linearVelocity; _local18 = _local1.m_angularVelocity; _local19 = _local2.m_angularVelocity; _local20 = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4))))); return (_local20); } public function SetMotorSpeed(_arg1:Number):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_motorSpeed = _arg1; } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:b2Transform; var _local7:b2Transform; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; _local2 = m_bodyA; _local3 = m_bodyB; m_localCenterA.SetV(_local2.GetLocalCenter()); m_localCenterB.SetV(_local3.GetLocalCenter()); _local6 = _local2.GetTransform(); _local7 = _local3.GetTransform(); _local4 = _local2.m_xf.R; _local8 = (m_localAnchor1.x - m_localCenterA.x); _local9 = (m_localAnchor1.y - m_localCenterA.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local4 = _local3.m_xf.R; _local10 = (m_localAnchor2.x - m_localCenterB.x); _local11 = (m_localAnchor2.y - m_localCenterB.y); _local5 = ((_local4.col1.x * _local10) + (_local4.col2.x * _local11)); _local11 = ((_local4.col1.y * _local10) + (_local4.col2.y * _local11)); _local10 = _local5; _local12 = (((_local3.m_sweep.c.x + _local10) - _local2.m_sweep.c.x) - _local8); _local13 = (((_local3.m_sweep.c.y + _local11) - _local2.m_sweep.c.y) - _local9); m_invMassA = _local2.m_invMass; m_invMassB = _local3.m_invMass; m_invIA = _local2.m_invI; m_invIB = _local3.m_invI; m_axis.SetV(b2Math.MulMV(_local6.R, m_localXAxis1)); m_a1 = (((_local12 + _local8) * m_axis.y) - ((_local13 + _local9) * m_axis.x)); m_a2 = ((_local10 * m_axis.y) - (_local11 * m_axis.x)); m_motorMass = (((m_invMassA + m_invMassB) + ((m_invIA * m_a1) * m_a1)) + ((m_invIB * m_a2) * m_a2)); if (m_motorMass > Number.MIN_VALUE){ m_motorMass = (1 / m_motorMass); }; m_perp.SetV(b2Math.MulMV(_local6.R, m_localYAxis1)); m_s1 = (((_local12 + _local8) * m_perp.y) - ((_local13 + _local9) * m_perp.x)); m_s2 = ((_local10 * m_perp.y) - (_local11 * m_perp.x)); _local14 = m_invMassA; _local15 = m_invMassB; _local16 = m_invIA; _local17 = m_invIB; m_K.col1.x = (((_local14 + _local15) + ((_local16 * m_s1) * m_s1)) + ((_local17 * m_s2) * m_s2)); m_K.col1.y = ((_local16 * m_s1) + (_local17 * m_s2)); m_K.col1.z = (((_local16 * m_s1) * m_a1) + ((_local17 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (_local16 + _local17); m_K.col2.z = ((_local16 * m_a1) + (_local17 * m_a2)); m_K.col3.x = m_K.col1.z; m_K.col3.y = m_K.col2.z; m_K.col3.z = (((_local14 + _local15) + ((_local16 * m_a1) * m_a1)) + ((_local17 * m_a2) * m_a2)); if (m_enableLimit){ _local18 = ((m_axis.x * _local12) + (m_axis.y * _local13)); if (b2Math.Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local18 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitState = e_atLowerLimit; m_impulse.z = 0; }; } else { if (_local18 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitState = e_atUpperLimit; m_impulse.z = 0; }; } else { m_limitState = e_inactiveLimit; m_impulse.z = 0; }; }; }; } else { m_limitState = e_inactiveLimit; }; if (m_enableMotor == false){ m_motorImpulse = 0; }; if (_arg1.warmStarting){ m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); m_motorImpulse = (m_motorImpulse * _arg1.dtRatio); _local19 = ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.z) * m_axis.x)); _local20 = ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.z) * m_axis.y)); _local21 = (((m_impulse.x * m_s1) + m_impulse.y) + ((m_motorImpulse + m_impulse.z) * m_a1)); _local22 = (((m_impulse.x * m_s2) + m_impulse.y) + ((m_motorImpulse + m_impulse.z) * m_a2)); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (m_invMassA * _local19)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (m_invMassA * _local20)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (m_invIA * _local21)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (m_invMassB * _local19)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (m_invMassB * _local20)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (m_invIB * _local22)); } else { m_impulse.SetZero(); m_motorImpulse = 0; }; } public function EnableLimit(_arg1:Boolean):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_enableLimit = _arg1; } public function SetMaxMotorForce(_arg1:Number):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_maxMotorForce = _arg1; } } }//package Box2D.Dynamics.Joints
Section 73
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PrismaticJointDef extends b2JointDef { public var localAnchorA:b2Vec2; public var localAnchorB:b2Vec2; public var maxMotorForce:Number; public var referenceAngle:Number; public var motorSpeed:Number; public var localAxisA:b2Vec2; public var upperTranslation:Number; public var enableMotor:Boolean; public var enableLimit:Boolean; public var lowerTranslation:Number; public function b2PrismaticJointDef(){ localAnchorA = new b2Vec2(); localAnchorB = new b2Vec2(); localAxisA = new b2Vec2(); super(); type = b2Joint.e_prismaticJoint; localAxisA.Set(1, 0); referenceAngle = 0; enableLimit = false; lowerTranslation = 0; upperTranslation = 0; enableMotor = false; maxMotorForce = 0; motorSpeed = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ bodyA = _arg1; bodyB = _arg2; localAnchorA = bodyA.GetLocalPoint(_arg3); localAnchorB = bodyB.GetLocalPoint(_arg3); localAxisA = bodyA.GetLocalVector(_arg4); referenceAngle = (bodyB.GetAngle() - bodyA.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 74
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PulleyJoint extends b2Joint { private var m_limitImpulse2:Number; private var m_ground:b2Body; private var m_u1:b2Vec2; private var m_maxLength2:Number; private var m_limitState2:int; private var m_impulse:Number; private var m_maxLength1:Number; private var m_u2:b2Vec2; private var m_constant:Number; private var m_ratio:Number; private var m_state:int; private var m_groundAnchor1:b2Vec2; private var m_groundAnchor2:b2Vec2; private var m_localAnchor2:b2Vec2; private var m_limitState1:int; private var m_limitMass1:Number; private var m_limitMass2:Number; private var m_localAnchor1:b2Vec2; private var m_pulleyMass:Number; private var m_limitImpulse1:Number; b2internal static const b2_minPulleyLength:Number = 2; public function b2PulleyJoint(_arg1:b2PulleyJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u1 = new b2Vec2(); m_u2 = new b2Vec2(); super(_arg1); m_ground = m_bodyA.m_world.m_groundBody; m_groundAnchor1.x = (_arg1.groundAnchorA.x - m_ground.m_xf.position.x); m_groundAnchor1.y = (_arg1.groundAnchorA.y - m_ground.m_xf.position.y); m_groundAnchor2.x = (_arg1.groundAnchorB.x - m_ground.m_xf.position.x); m_groundAnchor2.y = (_arg1.groundAnchorB.y - m_ground.m_xf.position.y); m_localAnchor1.SetV(_arg1.localAnchorA); m_localAnchor2.SetV(_arg1.localAnchorB); m_ratio = _arg1.ratio; m_constant = (_arg1.lengthA + (m_ratio * _arg1.lengthB)); m_maxLength1 = b2Math.Min(_arg1.maxLengthA, (m_constant - (m_ratio * b2_minPulleyLength))); m_maxLength2 = b2Math.Min(_arg1.maxLengthB, ((m_constant - b2_minPulleyLength) / m_ratio)); m_impulse = 0; m_limitImpulse1 = 0; m_limitImpulse2 = 0; } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchor1)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchor2)); } public function GetGroundAnchorA():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor1); return (_local1); } public function GetGroundAnchorB():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor2); return (_local1); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2(((_arg1 * m_impulse) * m_u2.x), ((_arg1 * m_impulse) * m_u2.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; _local2 = m_bodyA; _local3 = m_bodyB; _local5 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local6 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local7 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local8 = (m_ground.m_xf.position.y + m_groundAnchor2.y); _local24 = 0; if (m_state == e_atUpperLimit){ _local4 = _local2.m_xf.R; _local9 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local10 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local9) + (_local4.col2.x * _local10)); _local10 = ((_local4.col1.y * _local9) + (_local4.col2.y * _local10)); _local9 = _local23; _local4 = _local3.m_xf.R; _local11 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local11) + (_local4.col2.x * _local12)); _local12 = ((_local4.col1.y * _local11) + (_local4.col2.y * _local12)); _local11 = _local23; _local13 = (_local2.m_sweep.c.x + _local9); _local14 = (_local2.m_sweep.c.y + _local10); _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); m_u1.Set((_local13 - _local5), (_local14 - _local6)); m_u2.Set((_local15 - _local7), (_local16 - _local8)); _local17 = m_u1.Length(); _local18 = m_u2.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local17)); } else { m_u1.SetZero(); }; if (_local18 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local18)); } else { m_u2.SetZero(); }; _local19 = ((m_constant - _local17) - (m_ratio * _local18)); _local24 = b2Math.Max(_local24, -(_local19)); _local19 = b2Math.Clamp((_local19 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local20 = (-(m_pulleyMass) * _local19); _local13 = (-(_local20) * m_u1.x); _local14 = (-(_local20) * m_u1.y); _local15 = ((-(m_ratio) * _local20) * m_u2.x); _local16 = ((-(m_ratio) * _local20) * m_u2.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local13)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local14)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local9 * _local14) - (_local10 * _local13)))); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local15)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local16)); _local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local11 * _local16) - (_local12 * _local15)))); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); }; if (m_limitState1 == e_atUpperLimit){ _local4 = _local2.m_xf.R; _local9 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local10 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local9) + (_local4.col2.x * _local10)); _local10 = ((_local4.col1.y * _local9) + (_local4.col2.y * _local10)); _local9 = _local23; _local13 = (_local2.m_sweep.c.x + _local9); _local14 = (_local2.m_sweep.c.y + _local10); m_u1.Set((_local13 - _local5), (_local14 - _local6)); _local17 = m_u1.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u1.x = (m_u1.x * (1 / _local17)); m_u1.y = (m_u1.y * (1 / _local17)); } else { m_u1.SetZero(); }; _local19 = (m_maxLength1 - _local17); _local24 = b2Math.Max(_local24, -(_local19)); _local19 = b2Math.Clamp((_local19 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local20 = (-(m_limitMass1) * _local19); _local13 = (-(_local20) * m_u1.x); _local14 = (-(_local20) * m_u1.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local13)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local14)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local9 * _local14) - (_local10 * _local13)))); _local2.SynchronizeTransform(); }; if (m_limitState2 == e_atUpperLimit){ _local4 = _local3.m_xf.R; _local11 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local11) + (_local4.col2.x * _local12)); _local12 = ((_local4.col1.y * _local11) + (_local4.col2.y * _local12)); _local11 = _local23; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); m_u2.Set((_local15 - _local7), (_local16 - _local8)); _local18 = m_u2.Length(); if (_local18 > b2Settings.b2_linearSlop){ m_u2.x = (m_u2.x * (1 / _local18)); m_u2.y = (m_u2.y * (1 / _local18)); } else { m_u2.SetZero(); }; _local19 = (m_maxLength2 - _local18); _local24 = b2Math.Max(_local24, -(_local19)); _local19 = b2Math.Clamp((_local19 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local20 = (-(m_limitMass2) * _local19); _local15 = (-(_local20) * m_u2.x); _local16 = (-(_local20) * m_u2.y); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local15)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local16)); _local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local11 * _local16) - (_local12 * _local15)))); _local3.SynchronizeTransform(); }; return ((_local24 < b2Settings.b2_linearSlop)); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local2 = m_bodyA; _local3 = m_bodyB; _local4 = _local2.m_xf.R; _local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; _local10 = (_local2.m_sweep.c.x + _local5); _local11 = (_local2.m_sweep.c.y + _local6); _local12 = (_local3.m_sweep.c.x + _local8); _local13 = (_local3.m_sweep.c.y + _local9); _local14 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local15 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local16 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local17 = (m_ground.m_xf.position.y + m_groundAnchor2.y); m_u1.Set((_local10 - _local14), (_local11 - _local15)); m_u2.Set((_local12 - _local16), (_local13 - _local17)); _local18 = m_u1.Length(); _local19 = m_u2.Length(); if (_local18 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local18)); } else { m_u1.SetZero(); }; if (_local19 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local19)); } else { m_u2.SetZero(); }; _local20 = ((m_constant - _local18) - (m_ratio * _local19)); if (_local20 > 0){ m_state = e_inactiveLimit; m_impulse = 0; } else { m_state = e_atUpperLimit; }; if (_local18 < m_maxLength1){ m_limitState1 = e_inactiveLimit; m_limitImpulse1 = 0; } else { m_limitState1 = e_atUpperLimit; }; if (_local19 < m_maxLength2){ m_limitState2 = e_inactiveLimit; m_limitImpulse2 = 0; } else { m_limitState2 = e_atUpperLimit; }; _local21 = ((_local5 * m_u1.y) - (_local6 * m_u1.x)); _local22 = ((_local8 * m_u2.y) - (_local9 * m_u2.x)); m_limitMass1 = (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21)); m_limitMass2 = (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22)); m_pulleyMass = (m_limitMass1 + ((m_ratio * m_ratio) * m_limitMass2)); m_limitMass1 = (1 / m_limitMass1); m_limitMass2 = (1 / m_limitMass2); m_pulleyMass = (1 / m_pulleyMass); if (_arg1.warmStarting){ m_impulse = (m_impulse * _arg1.dtRatio); m_limitImpulse1 = (m_limitImpulse1 * _arg1.dtRatio); m_limitImpulse2 = (m_limitImpulse2 * _arg1.dtRatio); _local23 = ((-(m_impulse) - m_limitImpulse1) * m_u1.x); _local24 = ((-(m_impulse) - m_limitImpulse1) * m_u1.y); _local25 = (((-(m_ratio) * m_impulse) - m_limitImpulse2) * m_u2.x); _local26 = (((-(m_ratio) * m_impulse) - m_limitImpulse2) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local24) - (_local6 * _local23)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local26) - (_local9 * _local25)))); } else { m_impulse = 0; m_limitImpulse1 = 0; m_limitImpulse2 = 0; }; } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetLength1():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_bodyA.GetWorldPoint(m_localAnchor1); _local2 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local3 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local4 = (_local1.x - _local2); _local5 = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } public function GetLength2():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_bodyB.GetWorldPoint(m_localAnchor2); _local2 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local3 = (m_ground.m_xf.position.y + m_groundAnchor2.y); _local4 = (_local1.x - _local2); _local5 = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local2 = m_bodyA; _local3 = m_bodyB; _local4 = _local2.m_xf.R; _local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; if (m_state == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = (-(((m_u1.x * _local10) + (m_u1.y * _local11))) - (m_ratio * ((m_u2.x * _local12) + (m_u2.y * _local13)))); _local19 = (m_pulleyMass * -(_local18)); _local20 = m_impulse; m_impulse = b2Math.Max(0, (m_impulse + _local19)); _local19 = (m_impulse - _local20); _local14 = (-(_local19) * m_u1.x); _local15 = (-(_local19) * m_u1.y); _local16 = ((-(m_ratio) * _local19) * m_u2.x); _local17 = ((-(m_ratio) * _local19) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; if (m_limitState1 == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local18 = -(((m_u1.x * _local10) + (m_u1.y * _local11))); _local19 = (-(m_limitMass1) * _local18); _local20 = m_limitImpulse1; m_limitImpulse1 = b2Math.Max(0, (m_limitImpulse1 + _local19)); _local19 = (m_limitImpulse1 - _local20); _local14 = (-(_local19) * m_u1.x); _local15 = (-(_local19) * m_u1.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); }; if (m_limitState2 == e_atUpperLimit){ _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = -(((m_u2.x * _local12) + (m_u2.y * _local13))); _local19 = (-(m_limitMass2) * _local18); _local20 = m_limitImpulse2; m_limitImpulse2 = b2Math.Max(0, (m_limitImpulse2 + _local19)); _local19 = (m_limitImpulse2 - _local20); _local16 = (-(_local19) * m_u2.x); _local17 = (-(_local19) * m_u2.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; } public function GetRatio():Number{ return (m_ratio); } } }//package Box2D.Dynamics.Joints
Section 75
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PulleyJointDef extends b2JointDef { public var localAnchorA:b2Vec2; public var localAnchorB:b2Vec2; public var ratio:Number; public var maxLengthA:Number; public var maxLengthB:Number; public var lengthA:Number; public var lengthB:Number; public var groundAnchorA:b2Vec2; public var groundAnchorB:b2Vec2; public function b2PulleyJointDef(){ groundAnchorA = new b2Vec2(); groundAnchorB = new b2Vec2(); localAnchorA = new b2Vec2(); localAnchorB = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundAnchorA.Set(-1, 1); groundAnchorB.Set(1, 1); localAnchorA.Set(-1, 0); localAnchorB.Set(1, 0); lengthA = 0; maxLengthA = 0; lengthB = 0; maxLengthB = 0; ratio = 1; collideConnected = true; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; bodyA = _arg1; bodyB = _arg2; groundAnchorA.SetV(_arg3); groundAnchorB.SetV(_arg4); localAnchorA = bodyA.GetLocalPoint(_arg5); localAnchorB = bodyB.GetLocalPoint(_arg6); _local8 = (_arg5.x - _arg3.x); _local9 = (_arg5.y - _arg3.y); lengthA = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local10 = (_arg6.x - _arg4.x); _local11 = (_arg6.y - _arg4.y); lengthB = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); ratio = _arg7; _local12 = (lengthA + (ratio * lengthB)); maxLengthA = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength)); maxLengthB = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio); } } }//package Box2D.Dynamics.Joints
Section 76
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2RevoluteJoint extends b2Joint { private var m_impulse:b2Vec3; private var m_enableLimit:Boolean; private var K1:b2Mat22; private var K2:b2Mat22; private var K3:b2Mat22; private var K:b2Mat22; private var m_motorImpulse:Number; private var m_referenceAngle:Number; private var m_upperAngle:Number; private var m_lowerAngle:Number; private var m_mass:b2Mat33; private var m_limitState:int; private var m_motorMass:Number; private var reduced:b2Vec2; b2internal var m_localAnchor1:b2Vec2; b2internal var m_localAnchor2:b2Vec2; private var impulse2:b2Vec2; private var m_enableMotor:Boolean; private var m_motorSpeed:Number; private var impulse3:b2Vec3; private var m_maxMotorTorque:Number; private static var tImpulse:b2Vec2 = new b2Vec2(); public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){ K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); K3 = new b2Mat22(); impulse3 = new b2Vec3(); impulse2 = new b2Vec2(); reduced = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_impulse = new b2Vec3(); m_mass = new b2Mat33(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchorA); m_localAnchor2.SetV(_arg1.localAnchorB); m_referenceAngle = _arg1.referenceAngle; m_impulse.SetZero(); m_motorImpulse = 0; m_lowerAngle = _arg1.lowerAngle; m_upperAngle = _arg1.upperAngle; m_maxMotorTorque = _arg1.maxMotorTorque; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; m_limitState = e_inactiveLimit; } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerAngle = _arg1; m_upperAngle = _arg2; } public function GetLowerLimit():Number{ return (m_lowerAngle); } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchor1)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchor2)); } public function GetUpperLimit():Number{ return (m_upperAngle); } public function GetJointAngle():Number{ return (((m_bodyB.m_sweep.a - m_bodyA.m_sweep.a) - m_referenceAngle)); } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_impulse.z)); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); return (m_enableMotor); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:b2Vec2; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; _local2 = m_bodyA; _local3 = m_bodyB; _local11 = _local2.m_linearVelocity; _local12 = _local2.m_angularVelocity; _local13 = _local3.m_linearVelocity; _local14 = _local3.m_angularVelocity; _local15 = _local2.m_invMass; _local16 = _local3.m_invMass; _local17 = _local2.m_invI; _local18 = _local3.m_invI; if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local19 = ((_local14 - _local12) - m_motorSpeed); _local20 = (m_motorMass * -(_local19)); _local21 = m_motorImpulse; _local22 = (_arg1.dt * m_maxMotorTorque); m_motorImpulse = b2Math.Clamp((m_motorImpulse + _local20), -(_local22), _local22); _local20 = (m_motorImpulse - _local21); _local12 = (_local12 - (_local17 * _local20)); _local14 = (_local14 + (_local18 * _local20)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local4 = _local2.m_xf.R; _local7 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local8 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local7) + (_local4.col2.x * _local8)); _local8 = ((_local4.col1.y * _local7) + (_local4.col2.y * _local8)); _local7 = _local5; _local4 = _local3.m_xf.R; _local9 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local10 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local9) + (_local4.col2.x * _local10)); _local10 = ((_local4.col1.y * _local9) + (_local4.col2.y * _local10)); _local9 = _local5; _local23 = (((_local13.x + (-(_local14) * _local10)) - _local11.x) - (-(_local12) * _local8)); _local24 = (((_local13.y + (_local14 * _local9)) - _local11.y) - (_local12 * _local7)); _local25 = (_local14 - _local12); m_mass.Solve33(impulse3, -(_local23), -(_local24), -(_local25)); if (m_limitState == e_equalLimits){ m_impulse.Add(impulse3); } else { if (m_limitState == e_atLowerLimit){ _local6 = (m_impulse.z + impulse3.z); if (_local6 < 0){ m_mass.Solve22(reduced, -(_local23), -(_local24)); impulse3.x = reduced.x; impulse3.y = reduced.y; impulse3.z = -(m_impulse.z); m_impulse.x = (m_impulse.x + reduced.x); m_impulse.y = (m_impulse.y + reduced.y); m_impulse.z = 0; }; } else { if (m_limitState == e_atUpperLimit){ _local6 = (m_impulse.z + impulse3.z); if (_local6 > 0){ m_mass.Solve22(reduced, -(_local23), -(_local24)); impulse3.x = reduced.x; impulse3.y = reduced.y; impulse3.z = -(m_impulse.z); m_impulse.x = (m_impulse.x + reduced.x); m_impulse.y = (m_impulse.y + reduced.y); m_impulse.z = 0; }; }; }; }; _local11.x = (_local11.x - (_local15 * impulse3.x)); _local11.y = (_local11.y - (_local15 * impulse3.y)); _local12 = (_local12 - (_local17 * (((_local7 * impulse3.y) - (_local8 * impulse3.x)) + impulse3.z))); _local13.x = (_local13.x + (_local16 * impulse3.x)); _local13.y = (_local13.y + (_local16 * impulse3.y)); _local14 = (_local14 + (_local18 * (((_local9 * impulse3.y) - (_local10 * impulse3.x)) + impulse3.z))); } else { _local4 = _local2.m_xf.R; _local7 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local8 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local7) + (_local4.col2.x * _local8)); _local8 = ((_local4.col1.y * _local7) + (_local4.col2.y * _local8)); _local7 = _local5; _local4 = _local3.m_xf.R; _local9 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local10 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local9) + (_local4.col2.x * _local10)); _local10 = ((_local4.col1.y * _local9) + (_local4.col2.y * _local10)); _local9 = _local5; _local26 = (((_local13.x + (-(_local14) * _local10)) - _local11.x) - (-(_local12) * _local8)); _local27 = (((_local13.y + (_local14 * _local9)) - _local11.y) - (_local12 * _local7)); m_mass.Solve22(impulse2, -(_local26), -(_local27)); m_impulse.x = (m_impulse.x + impulse2.x); m_impulse.y = (m_impulse.y + impulse2.y); _local11.x = (_local11.x - (_local15 * impulse2.x)); _local11.y = (_local11.y - (_local15 * impulse2.y)); _local12 = (_local12 - (_local17 * ((_local7 * impulse2.y) - (_local8 * impulse2.x)))); _local13.x = (_local13.x + (_local16 * impulse2.x)); _local13.y = (_local13.y + (_local16 * impulse2.y)); _local14 = (_local14 + (_local18 * ((_local9 * impulse2.y) - (_local10 * impulse2.x)))); }; _local2.m_linearVelocity.SetV(_local11); _local2.m_angularVelocity = _local12; _local3.m_linearVelocity.SetV(_local13); _local3.m_angularVelocity = _local14; } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * m_impulse.x), (_arg1 * m_impulse.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:Number; var _local4:b2Mat22; var _local5:b2Body; var _local6:b2Body; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; _local5 = m_bodyA; _local6 = m_bodyB; _local7 = 0; _local8 = 0; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local25 = ((_local6.m_sweep.a - _local5.m_sweep.a) - m_referenceAngle); _local26 = 0; if (m_limitState == e_equalLimits){ _local3 = b2Math.Clamp((_local25 - m_lowerAngle), -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local3); _local7 = b2Math.Abs(_local3); } else { if (m_limitState == e_atLowerLimit){ _local3 = (_local25 - m_lowerAngle); _local7 = -(_local3); _local3 = b2Math.Clamp((_local3 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0); _local26 = (-(m_motorMass) * _local3); } else { if (m_limitState == e_atUpperLimit){ _local3 = (_local25 - m_upperAngle); _local7 = _local3; _local3 = b2Math.Clamp((_local3 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local3); }; }; }; _local5.m_sweep.a = (_local5.m_sweep.a - (_local5.m_invI * _local26)); _local6.m_sweep.a = (_local6.m_sweep.a + (_local6.m_invI * _local26)); _local5.SynchronizeTransform(); _local6.SynchronizeTransform(); }; _local4 = _local5.m_xf.R; _local12 = (m_localAnchor1.x - _local5.m_sweep.localCenter.x); _local13 = (m_localAnchor1.y - _local5.m_sweep.localCenter.y); _local9 = ((_local4.col1.x * _local12) + (_local4.col2.x * _local13)); _local13 = ((_local4.col1.y * _local12) + (_local4.col2.y * _local13)); _local12 = _local9; _local4 = _local6.m_xf.R; _local14 = (m_localAnchor2.x - _local6.m_sweep.localCenter.x); _local15 = (m_localAnchor2.y - _local6.m_sweep.localCenter.y); _local9 = ((_local4.col1.x * _local14) + (_local4.col2.x * _local15)); _local15 = ((_local4.col1.y * _local14) + (_local4.col2.y * _local15)); _local14 = _local9; _local16 = (((_local6.m_sweep.c.x + _local14) - _local5.m_sweep.c.x) - _local12); _local17 = (((_local6.m_sweep.c.y + _local15) - _local5.m_sweep.c.y) - _local13); _local18 = ((_local16 * _local16) + (_local17 * _local17)); _local19 = Math.sqrt(_local18); _local8 = _local19; _local20 = _local5.m_invMass; _local21 = _local6.m_invMass; _local22 = _local5.m_invI; _local23 = _local6.m_invI; _local24 = (10 * b2Settings.b2_linearSlop); if (_local18 > (_local24 * _local24)){ _local27 = (_local16 / _local19); _local28 = (_local17 / _local19); _local29 = (_local20 + _local21); _local30 = (1 / _local29); _local10 = (_local30 * -(_local16)); _local11 = (_local30 * -(_local17)); _local31 = 0.5; _local5.m_sweep.c.x = (_local5.m_sweep.c.x - ((_local31 * _local20) * _local10)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y - ((_local31 * _local20) * _local11)); _local6.m_sweep.c.x = (_local6.m_sweep.c.x + ((_local31 * _local21) * _local10)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + ((_local31 * _local21) * _local11)); _local16 = (((_local6.m_sweep.c.x + _local14) - _local5.m_sweep.c.x) - _local12); _local17 = (((_local6.m_sweep.c.y + _local15) - _local5.m_sweep.c.y) - _local13); }; K1.col1.x = (_local20 + _local21); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local20 + _local21); K2.col1.x = ((_local22 * _local13) * _local13); K2.col2.x = ((-(_local22) * _local12) * _local13); K2.col1.y = ((-(_local22) * _local12) * _local13); K2.col2.y = ((_local22 * _local12) * _local12); K3.col1.x = ((_local23 * _local15) * _local15); K3.col2.x = ((-(_local23) * _local14) * _local15); K3.col1.y = ((-(_local23) * _local14) * _local15); K3.col2.y = ((_local23 * _local14) * _local14); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Solve(tImpulse, -(_local16), -(_local17)); _local10 = tImpulse.x; _local11 = tImpulse.y; _local5.m_sweep.c.x = (_local5.m_sweep.c.x - (_local5.m_invMass * _local10)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y - (_local5.m_invMass * _local11)); _local5.m_sweep.a = (_local5.m_sweep.a - (_local5.m_invI * ((_local12 * _local11) - (_local13 * _local10)))); _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_local6.m_invMass * _local10)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_local6.m_invMass * _local11)); _local6.m_sweep.a = (_local6.m_sweep.a + (_local6.m_invI * ((_local14 * _local11) - (_local15 * _local10)))); _local5.SynchronizeTransform(); _local6.SynchronizeTransform(); return ((((_local8 <= b2Settings.b2_linearSlop)) && ((_local7 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ return ((m_bodyB.m_angularVelocity - m_bodyA.m_angularVelocity)); } public function SetMotorSpeed(_arg1:Number):void{ m_bodyA.SetAwake(true); m_bodyB.SetAwake(true); m_motorSpeed = _arg1; } public function SetMaxMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local2 = m_bodyA; _local3 = m_bodyB; if (((m_enableMotor) || (m_enableLimit))){ }; _local4 = _local2.m_xf.R; _local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local10 = _local2.m_invMass; _local11 = _local3.m_invMass; _local12 = _local2.m_invI; _local13 = _local3.m_invI; m_mass.col1.x = (((_local10 + _local11) + ((_local7 * _local7) * _local12)) + ((_local9 * _local9) * _local13)); m_mass.col2.x = (((-(_local7) * _local6) * _local12) - ((_local9 * _local8) * _local13)); m_mass.col3.x = ((-(_local7) * _local12) - (_local9 * _local13)); m_mass.col1.y = m_mass.col2.x; m_mass.col2.y = (((_local10 + _local11) + ((_local6 * _local6) * _local12)) + ((_local8 * _local8) * _local13)); m_mass.col3.y = ((_local6 * _local12) + (_local8 * _local13)); m_mass.col1.z = m_mass.col3.x; m_mass.col2.z = m_mass.col3.y; m_mass.col3.z = (_local12 + _local13); m_motorMass = (1 / (_local12 + _local13)); if (m_enableMotor == false){ m_motorImpulse = 0; }; if (m_enableLimit){ _local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - m_referenceAngle); if (b2Math.Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){ m_limitState = e_equalLimits; } else { if (_local14 <= m_lowerAngle){ if (m_limitState != e_atLowerLimit){ m_impulse.z = 0; }; m_limitState = e_atLowerLimit; } else { if (_local14 >= m_upperAngle){ if (m_limitState != e_atUpperLimit){ m_impulse.z = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_impulse.z = 0; }; }; }; } else { m_limitState = e_inactiveLimit; }; if (_arg1.warmStarting){ m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); m_motorImpulse = (m_motorImpulse * _arg1.dtRatio); _local15 = m_impulse.x; _local16 = m_impulse.y; _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local10 * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local10 * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local12 * ((((_local6 * _local16) - (_local7 * _local15)) + m_motorImpulse) + m_impulse.z))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local15)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local16)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * ((((_local8 * _local16) - (_local9 * _local15)) + m_motorImpulse) + m_impulse.z))); } else { m_impulse.SetZero(); m_motorImpulse = 0; }; } public function GetMotorTorque():Number{ return (m_maxMotorTorque); } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } } }//package Box2D.Dynamics.Joints
Section 77
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2RevoluteJointDef extends b2JointDef { public var localAnchorA:b2Vec2; public var localAnchorB:b2Vec2; public var upperAngle:Number; public var lowerAngle:Number; public var referenceAngle:Number; public var motorSpeed:Number; public var maxMotorTorque:Number; public var enableMotor:Boolean; public var enableLimit:Boolean; public function b2RevoluteJointDef(){ localAnchorA = new b2Vec2(); localAnchorB = new b2Vec2(); super(); type = b2Joint.e_revoluteJoint; localAnchorA.Set(0, 0); localAnchorB.Set(0, 0); referenceAngle = 0; lowerAngle = 0; upperAngle = 0; maxMotorTorque = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{ bodyA = _arg1; bodyB = _arg2; localAnchorA = bodyA.GetLocalPoint(_arg3); localAnchorB = bodyB.GetLocalPoint(_arg3); referenceAngle = (bodyB.GetAngle() - bodyA.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 78
//b2WeldJoint (Box2D.Dynamics.Joints.b2WeldJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2WeldJoint extends b2Joint { private var m_mass:b2Mat33; private var m_impulse:b2Vec3; private var m_localAnchorB:b2Vec2; private var m_localAnchorA:b2Vec2; private var m_referenceAngle:Number; public function b2WeldJoint(_arg1:b2WeldJointDef){ m_localAnchorA = new b2Vec2(); m_localAnchorB = new b2Vec2(); m_impulse = new b2Vec3(); m_mass = new b2Mat33(); super(_arg1); m_localAnchorA.SetV(_arg1.localAnchorA); m_localAnchorB.SetV(_arg1.localAnchorB); m_referenceAngle = _arg1.referenceAngle; m_impulse.SetZero(); m_mass = new b2Mat33(); } override public function GetAnchorA():b2Vec2{ return (m_bodyA.GetWorldPoint(m_localAnchorA)); } override public function GetAnchorB():b2Vec2{ return (m_bodyB.GetWorldPoint(m_localAnchorB)); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * m_impulse.x), (_arg1 * m_impulse.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:b2Vec3; _local4 = m_bodyA; _local5 = m_bodyB; _local2 = _local4.m_xf.R; _local6 = (m_localAnchorA.x - _local4.m_sweep.localCenter.x); _local7 = (m_localAnchorA.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7)); _local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7)); _local6 = _local3; _local2 = _local5.m_xf.R; _local8 = (m_localAnchorB.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchorB.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local3; _local10 = _local4.m_invMass; _local11 = _local5.m_invMass; _local12 = _local4.m_invI; _local13 = _local5.m_invI; _local14 = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6); _local15 = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7); _local16 = ((_local5.m_sweep.a - _local4.m_sweep.a) - m_referenceAngle); _local17 = (10 * b2Settings.b2_linearSlop); _local18 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15))); _local19 = b2Math.Abs(_local16); if (_local18 > _local17){ _local12 = (_local12 * 1); _local13 = (_local13 * 1); }; m_mass.col1.x = (((_local10 + _local11) + ((_local7 * _local7) * _local12)) + ((_local9 * _local9) * _local13)); m_mass.col2.x = (((-(_local7) * _local6) * _local12) - ((_local9 * _local8) * _local13)); m_mass.col3.x = ((-(_local7) * _local12) - (_local9 * _local13)); m_mass.col1.y = m_mass.col2.x; m_mass.col2.y = (((_local10 + _local11) + ((_local6 * _local6) * _local12)) + ((_local8 * _local8) * _local13)); m_mass.col3.y = ((_local6 * _local12) + (_local8 * _local13)); m_mass.col1.z = m_mass.col3.x; m_mass.col2.z = m_mass.col3.y; m_mass.col3.z = (_local12 + _local13); _local20 = new b2Vec3(); m_mass.Solve33(_local20, -(_local14), -(_local15), -(_local16)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x - (_local10 * _local20.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y - (_local10 * _local20.y)); _local4.m_sweep.a = (_local4.m_sweep.a - (_local12 * (((_local6 * _local20.y) - (_local7 * _local20.x)) + _local20.z))); _local5.m_sweep.c.x = (_local5.m_sweep.c.x + (_local11 * _local20.x)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y + (_local11 * _local20.y)); _local5.m_sweep.a = (_local5.m_sweep.a + (_local13 * (((_local8 * _local20.y) - (_local9 * _local20.x)) + _local20.z))); _local4.SynchronizeTransform(); _local5.SynchronizeTransform(); return ((((_local18 <= b2Settings.b2_linearSlop)) && ((_local19 <= b2Settings.b2_angularSlop)))); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local4 = m_bodyA; _local5 = m_bodyB; _local2 = _local4.m_xf.R; _local6 = (m_localAnchorA.x - _local4.m_sweep.localCenter.x); _local7 = (m_localAnchorA.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7)); _local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7)); _local6 = _local3; _local2 = _local5.m_xf.R; _local8 = (m_localAnchorB.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchorB.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local3; _local10 = _local4.m_invMass; _local11 = _local5.m_invMass; _local12 = _local4.m_invI; _local13 = _local5.m_invI; m_mass.col1.x = (((_local10 + _local11) + ((_local7 * _local7) * _local12)) + ((_local9 * _local9) * _local13)); m_mass.col2.x = (((-(_local7) * _local6) * _local12) - ((_local9 * _local8) * _local13)); m_mass.col3.x = ((-(_local7) * _local12) - (_local9 * _local13)); m_mass.col1.y = m_mass.col2.x; m_mass.col2.y = (((_local10 + _local11) + ((_local6 * _local6) * _local12)) + ((_local8 * _local8) * _local13)); m_mass.col3.y = ((_local6 * _local12) + (_local8 * _local13)); m_mass.col1.z = m_mass.col3.x; m_mass.col2.z = m_mass.col3.y; m_mass.col3.z = (_local12 + _local13); if (_arg1.warmStarting){ m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); m_impulse.z = (m_impulse.z * _arg1.dtRatio); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local10 * m_impulse.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local10 * m_impulse.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity - (_local12 * (((_local6 * m_impulse.y) - (_local7 * m_impulse.x)) + m_impulse.z))); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local11 * m_impulse.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local11 * m_impulse.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + (_local13 * (((_local8 * m_impulse.y) - (_local9 * m_impulse.x)) + m_impulse.z))); } else { m_impulse.SetZero(); }; } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_impulse.z)); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:b2Vec2; var _local7:Number; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:b2Vec3; _local4 = m_bodyA; _local5 = m_bodyB; _local6 = _local4.m_linearVelocity; _local7 = _local4.m_angularVelocity; _local8 = _local5.m_linearVelocity; _local9 = _local5.m_angularVelocity; _local10 = _local4.m_invMass; _local11 = _local5.m_invMass; _local12 = _local4.m_invI; _local13 = _local5.m_invI; _local2 = _local4.m_xf.R; _local14 = (m_localAnchorA.x - _local4.m_sweep.localCenter.x); _local15 = (m_localAnchorA.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local14) + (_local2.col2.x * _local15)); _local15 = ((_local2.col1.y * _local14) + (_local2.col2.y * _local15)); _local14 = _local3; _local2 = _local5.m_xf.R; _local16 = (m_localAnchorB.x - _local5.m_sweep.localCenter.x); _local17 = (m_localAnchorB.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local16) + (_local2.col2.x * _local17)); _local17 = ((_local2.col1.y * _local16) + (_local2.col2.y * _local17)); _local16 = _local3; _local18 = (((_local8.x - (_local9 * _local17)) - _local6.x) + (_local7 * _local15)); _local19 = (((_local8.y + (_local9 * _local16)) - _local6.y) - (_local7 * _local14)); _local20 = (_local9 - _local7); _local21 = new b2Vec3(); m_mass.Solve33(_local21, -(_local18), -(_local19), -(_local20)); m_impulse.Add(_local21); _local6.x = (_local6.x - (_local10 * _local21.x)); _local6.y = (_local6.y - (_local10 * _local21.y)); _local7 = (_local7 - (_local12 * (((_local14 * _local21.y) - (_local15 * _local21.x)) + _local21.z))); _local8.x = (_local8.x + (_local11 * _local21.x)); _local8.y = (_local8.y + (_local11 * _local21.y)); _local9 = (_local9 + (_local13 * (((_local16 * _local21.y) - (_local17 * _local21.x)) + _local21.z))); _local4.m_angularVelocity = _local7; _local5.m_angularVelocity = _local9; } } }//package Box2D.Dynamics.Joints
Section 79
//b2WeldJointDef (Box2D.Dynamics.Joints.b2WeldJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2WeldJointDef extends b2JointDef { public var localAnchorA:b2Vec2; public var localAnchorB:b2Vec2; public var referenceAngle:Number; public function b2WeldJointDef(){ localAnchorA = new b2Vec2(); localAnchorB = new b2Vec2(); super(); type = b2Joint.e_weldJoint; referenceAngle = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{ bodyA = _arg1; bodyB = _arg2; localAnchorA.SetV(bodyA.GetLocalPoint(_arg3)); localAnchorB.SetV(bodyB.GetLocalPoint(_arg3)); referenceAngle = (bodyB.GetAngle() - bodyA.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 80
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Controllers.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2Body { b2internal var m_xf:b2Transform; b2internal var m_controllerCount:int; b2internal var m_contactList:b2ContactEdge; b2internal var m_invI:Number; b2internal var m_fixtureCount:int; b2internal var m_torque:Number; b2internal var m_angularVelocity:Number; b2internal var m_flags:uint; b2internal var m_linearVelocity:b2Vec2; b2internal var m_world:b2World; b2internal var m_inertiaScale:Number; b2internal var m_controllerList:b2ControllerEdge; b2internal var m_fixtureList:b2Fixture; b2internal var m_mass:Number; b2internal var m_next:b2Body; b2internal var m_force:b2Vec2; b2internal var m_sweep:b2Sweep; private var m_userData; b2internal var m_invMass:Number; b2internal var m_prev:b2Body; b2internal var m_linearDamping:Number; b2internal var m_type:int; b2internal var m_angularDamping:Number; b2internal var m_islandIndex:int; b2internal var m_jointList:b2JointEdge; b2internal var m_sleepTime:Number; b2internal var m_I:Number; b2internal static var e_fixedRotationFlag:uint = 16; public static var b2_kinematicBody:uint = 1; b2internal static var e_bulletFlag:uint = 8; b2internal static var e_activeFlag:uint = 32; b2internal static var e_allowSleepFlag:uint = 4; b2internal static var e_awakeFlag:uint = 2; public static var b2_dynamicBody:uint = 2; b2internal static var e_islandFlag:uint = 1; private static var s_xf1:b2Transform = new b2Transform(); public static var b2_staticBody:uint = 0; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ var _local3:b2Mat22; var _local4:b2Vec2; m_xf = new b2Transform(); m_sweep = new b2Sweep(); m_linearVelocity = new b2Vec2(); m_force = new b2Vec2(); super(); m_flags = 0; if (_arg1.bullet){ m_flags = (m_flags | e_bulletFlag); }; if (_arg1.fixedRotation){ m_flags = (m_flags | e_fixedRotationFlag); }; if (_arg1.allowSleep){ m_flags = (m_flags | e_allowSleepFlag); }; if (_arg1.awake){ m_flags = (m_flags | e_awakeFlag); }; if (_arg1.active){ m_flags = (m_flags | e_activeFlag); }; m_world = _arg2; m_xf.position.SetV(_arg1.position); m_xf.R.Set(_arg1.angle); m_sweep.localCenter.SetZero(); m_sweep.t0 = 1; m_sweep.a0 = (m_sweep.a = _arg1.angle); _local3 = m_xf.R; _local4 = m_sweep.localCenter; m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_jointList = null; m_controllerList = null; m_contactList = null; m_controllerCount = 0; m_prev = null; m_next = null; m_linearVelocity.SetV(_arg1.linearVelocity); m_angularVelocity = _arg1.angularVelocity; m_linearDamping = _arg1.linearDamping; m_angularDamping = _arg1.angularDamping; m_force.Set(0, 0); m_torque = 0; m_sleepTime = 0; m_type = _arg1.type; if (m_type == b2_dynamicBody){ m_mass = 1; m_invMass = 1; } else { m_mass = 0; m_invMass = 0; }; m_I = 0; m_invI = 0; m_inertiaScale = _arg1.inertiaScale; m_userData = _arg1.userData; m_fixtureList = null; m_fixtureCount = 0; } public function SetLinearVelocity(_arg1:b2Vec2):void{ if (m_type == b2_staticBody){ return; }; m_linearVelocity.SetV(_arg1); } public function ResetMassData():void{ var _local1:b2Vec2; var _local2:b2Fixture; var _local3:b2Vec2; var _local4:b2MassData; m_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; m_sweep.localCenter.SetZero(); if ((((m_type == b2_staticBody)) || ((m_type == b2_kinematicBody)))){ return; }; _local1 = b2Vec2.Make(0, 0); _local2 = m_fixtureList; while (_local2) { if (_local2.m_density == 0){ } else { _local4 = _local2.GetMassData(); m_mass = (m_mass + _local4.mass); _local1.x = (_local1.x + (_local4.center.x * _local4.mass)); _local1.y = (_local1.y + (_local4.center.y * _local4.mass)); m_I = (m_I + _local4.I); }; _local2 = _local2.m_next; }; if (m_mass > 0){ m_invMass = (1 / m_mass); _local1.x = (_local1.x * m_invMass); _local1.y = (_local1.y * m_invMass); } else { m_mass = 1; m_invMass = 1; }; if ((((m_I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){ m_I = (m_I - (m_mass * ((_local1.x * _local1.x) + (_local1.y * _local1.y)))); m_I = (m_I * m_inertiaScale); b2Settings.b2Assert((m_I > 0)); m_invI = (1 / m_I); } else { m_I = 0; m_invI = 0; }; _local3 = m_sweep.c.Copy(); m_sweep.localCenter.SetV(_local1); m_sweep.c0.SetV(b2Math.MulX(m_xf, m_sweep.localCenter)); m_sweep.c.SetV(m_sweep.c0); m_linearVelocity.x = (m_linearVelocity.x + (m_angularVelocity * -((m_sweep.c.y - _local3.y)))); m_linearVelocity.y = (m_linearVelocity.y + (m_angularVelocity * (m_sweep.c.x - _local3.x))); } public function GetMassData(_arg1:b2MassData):void{ _arg1.mass = m_mass; _arg1.I = m_I; _arg1.center.SetV(m_sweep.localCenter); } public function Merge(_arg1:b2Body):void{ var _local2:b2Fixture; var _local3:b2Body; var _local4:b2Body; var _local5:b2Vec2; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:b2Fixture; _local2 = _arg1.m_fixtureList; while (_local2) { _local11 = _local2.m_next; _arg1.m_fixtureCount--; _local2.m_next = m_fixtureList; m_fixtureList = _local2; m_fixtureCount++; _local2.m_body = _local4; _local2 = _local11; }; _local3.m_fixtureCount = 0; _local3 = this; _local4 = _arg1; _local5 = _local3.GetWorldCenter(); _local6 = _local4.GetWorldCenter(); _local7 = _local3.GetLinearVelocity().Copy(); _local8 = _local4.GetLinearVelocity().Copy(); _local9 = _local3.GetAngularVelocity(); _local10 = _local4.GetAngularVelocity(); _local3.ResetMassData(); SynchronizeFixtures(); } b2internal function SynchronizeTransform():void{ var _local1:b2Mat22; var _local2:b2Vec2; m_xf.R.Set(m_sweep.a); _local1 = m_xf.R; _local2 = m_sweep.localCenter; m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y))); m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y))); } public function SetMassData(_arg1:b2MassData):void{ var _local2:b2Vec2; b2Settings.b2Assert((m_world.IsLocked() == false)); if (m_world.IsLocked() == true){ return; }; if (m_type != b2_dynamicBody){ return; }; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.mass; if (m_mass <= 0){ m_mass = 1; }; m_invMass = (1 / m_mass); if ((((_arg1.I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){ m_I = (_arg1.I - (m_mass * ((_arg1.center.x * _arg1.center.x) + (_arg1.center.y * _arg1.center.y)))); m_invI = (1 / m_I); }; _local2 = m_sweep.c.Copy(); m_sweep.localCenter.SetV(_arg1.center); m_sweep.c0.SetV(b2Math.MulX(m_xf, m_sweep.localCenter)); m_sweep.c.SetV(m_sweep.c0); m_linearVelocity.x = (m_linearVelocity.x + (m_angularVelocity * -((m_sweep.c.y - _local2.y)))); m_linearVelocity.y = (m_linearVelocity.y + (m_angularVelocity * (m_sweep.c.x - _local2.x))); } public function GetDefinition():b2BodyDef{ var _local1:b2BodyDef; _local1 = new b2BodyDef(); _local1.type = GetType(); _local1.allowSleep = ((m_flags & e_allowSleepFlag) == e_allowSleepFlag); _local1.angle = GetAngle(); _local1.angularDamping = m_angularDamping; _local1.angularVelocity = m_angularVelocity; _local1.fixedRotation = ((m_flags & e_fixedRotationFlag) == e_fixedRotationFlag); _local1.bullet = ((m_flags & e_bulletFlag) == e_bulletFlag); _local1.awake = ((m_flags & e_awakeFlag) == e_awakeFlag); _local1.linearDamping = m_linearDamping; _local1.linearVelocity.SetV(GetLinearVelocity()); _local1.position = GetPosition(); _local1.userData = GetUserData(); return (_local1); } public function GetControllerList():b2ControllerEdge{ return (m_controllerList); } public function GetFixtureList():b2Fixture{ return (m_fixtureList); } public function SetAngularVelocity(_arg1:Number):void{ if (m_type == b2_staticBody){ return; }; m_angularVelocity = _arg1; } public function GetAngle():Number{ return (m_sweep.a); } public function GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22; var _local3:b2Vec2; _local2 = m_xf.R; _local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (new b2Vec2((m_linearVelocity.x - (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.y + (m_angularVelocity * (_local3.x - m_sweep.c.x))))); } public function GetNext():b2Body{ return (m_next); } public function SetTransform(_arg1:b2Transform):void{ SetPositionAndAngle(_arg1.position, _arg1.GetAngle()); } public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (m_type != b2_dynamicBody){ return; }; if (IsAwake() == false){ SetAwake(true); }; m_force.x = (m_force.x + _arg1.x); m_force.y = (m_force.y + _arg1.y); m_torque = (m_torque + (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x))); } public function CreateFixture(_arg1:b2FixtureDef):b2Fixture{ var _local2:b2Fixture; var _local3:IBroadPhase; if (m_world.IsLocked() == true){ return (null); }; _local2 = new b2Fixture(); _local2.Create(this, m_xf, _arg1); if ((m_flags & e_activeFlag)){ _local3 = m_world.m_contactManager.m_broadPhase; _local2.CreateProxy(_local3, m_xf); }; _local2.m_next = m_fixtureList; m_fixtureList = _local2; m_fixtureCount++; _local2.m_body = this; if (_local2.m_density > 0){ ResetMassData(); }; m_world.m_flags = (m_world.m_flags | b2World.e_newFixture); return (_local2); } public function GetMass():Number{ return (m_mass); } public function IsAwake():Boolean{ return (((m_flags & e_awakeFlag) == e_awakeFlag)); } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.MulMV(m_xf.R, _arg1)); } b2internal function Advance(_arg1:Number):void{ m_sweep.Advance(_arg1); m_sweep.c.SetV(m_sweep.c0); m_sweep.a = m_sweep.a0; SynchronizeTransform(); } public function SetAwake(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_awakeFlag); m_sleepTime = 0; } else { m_flags = (m_flags & ~(e_awakeFlag)); m_sleepTime = 0; m_linearVelocity.SetZero(); m_angularVelocity = 0; m_force.SetZero(); m_torque = 0; }; } public function GetUserData(){ return (m_userData); } public function GetWorldCenter():b2Vec2{ return (m_sweep.c); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.MulTMV(m_xf.R, _arg1)); } public function GetPosition():b2Vec2{ return (m_xf.position); } public function GetLinearVelocityFromWorldPoint(_arg1:b2Vec2):b2Vec2{ return (new b2Vec2((m_linearVelocity.x - (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.y + (m_angularVelocity * (_arg1.x - m_sweep.c.x))))); } public function CreateFixture2(_arg1:b2Shape, _arg2:Number=0):b2Fixture{ var _local3:b2FixtureDef; _local3 = new b2FixtureDef(); _local3.shape = _arg1; _local3.density = _arg2; return (CreateFixture(_local3)); } public function GetLinearDamping():Number{ return (m_linearDamping); } public function GetLocalCenter():b2Vec2{ return (m_sweep.localCenter); } public function SetPosition(_arg1:b2Vec2):void{ SetPositionAndAngle(_arg1, GetAngle()); } private function connectEdges(_arg1:b2EdgeShape, _arg2:b2EdgeShape, _arg3:Number):Number{ var _local4:Number; var _local5:Number; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:Boolean; _local4 = Math.atan2(_arg2.GetDirectionVector().y, _arg2.GetDirectionVector().x); _local5 = Math.tan(((_local4 - _arg3) * 0.5)); _local6 = b2Math.MulFV(_local5, _arg2.GetDirectionVector()); _local6 = b2Math.SubtractVV(_local6, _arg2.GetNormalVector()); _local6 = b2Math.MulFV(b2Settings.b2_toiSlop, _local6); _local6 = b2Math.AddVV(_local6, _arg2.GetVertex1()); _local7 = b2Math.AddVV(_arg1.GetDirectionVector(), _arg2.GetDirectionVector()); _local7.Normalize(); _local8 = (b2Math.Dot(_arg1.GetDirectionVector(), _arg2.GetNormalVector()) > 0); _arg1.SetNextEdge(_arg2, _local6, _local7, _local8); _arg2.SetPrevEdge(_arg1, _local6, _local7, _local8); return (_local4); } public function GetType():uint{ return (m_type); } public function GetAngularDamping():Number{ return (m_angularDamping); } public function SetType(_arg1:uint):void{ var _local2:b2ContactEdge; if (m_type == _arg1){ return; }; m_type = _arg1; ResetMassData(); if (m_type == b2_staticBody){ m_linearVelocity.SetZero(); m_angularVelocity = 0; }; SetAwake(true); m_force.SetZero(); m_torque = 0; _local2 = m_contactList; while (_local2) { _local2.contact.FlagForFiltering(); _local2 = _local2.next; }; } public function SetAngularDamping(_arg1:Number):void{ m_angularDamping = _arg1; } public function GetInertia():Number{ return (m_I); } public function SetAngle(_arg1:Number):void{ SetPositionAndAngle(GetPosition(), _arg1); } public function GetJointList():b2JointEdge{ return (m_jointList); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.MulXT(m_xf, _arg1)); } public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (m_type != b2_dynamicBody){ return; }; if (IsAwake() == false){ SetAwake(true); }; m_linearVelocity.x = (m_linearVelocity.x + (m_invMass * _arg1.x)); m_linearVelocity.y = (m_linearVelocity.y + (m_invMass * _arg1.y)); m_angularVelocity = (m_angularVelocity + (m_invI * (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x)))); } public function GetContactList():b2ContactEdge{ return (m_contactList); } public function GetAngularVelocity():Number{ return (m_angularVelocity); } public function DestroyFixture(_arg1:b2Fixture):void{ var _local2:b2Fixture; var _local3:b2Fixture; var _local4:Boolean; var _local5:b2ContactEdge; var _local6:b2Contact; var _local7:b2Fixture; var _local8:b2Fixture; var _local9:IBroadPhase; if (m_world.IsLocked() == true){ return; }; _local2 = m_fixtureList; _local3 = null; _local4 = false; while (_local2 != null) { if (_local2 == _arg1){ if (_local3){ _local3.m_next = _arg1.m_next; } else { m_fixtureList = _arg1.m_next; }; _local4 = true; break; }; _local3 = _local2; _local2 = _local2.m_next; }; _local5 = m_contactList; while (_local5) { _local6 = _local5.contact; _local5 = _local5.next; _local7 = _local6.GetFixtureA(); _local8 = _local6.GetFixtureB(); if ((((_arg1 == _local7)) || ((_arg1 == _local8)))){ m_world.m_contactManager.Destroy(_local6); }; }; if ((m_flags & e_activeFlag)){ _local9 = m_world.m_contactManager.m_broadPhase; _arg1.DestroyProxy(_local9); }; _arg1.Destroy(); _arg1.m_body = null; _arg1.m_next = null; m_fixtureCount--; ResetMassData(); } public function IsSleepingAllowed():Boolean{ return (((m_flags & e_allowSleepFlag) == e_allowSleepFlag)); } public function GetTransform():b2Transform{ return (m_xf); } b2internal function SynchronizeFixtures():void{ var _local1:b2Transform; var _local2:b2Mat22; var _local3:b2Vec2; var _local4:b2Fixture; var _local5:IBroadPhase; _local1 = s_xf1; _local1.R.Set(m_sweep.a0); _local2 = _local1.R; _local3 = m_sweep.localCenter; _local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y))); _local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y))); _local5 = m_world.m_contactManager.m_broadPhase; _local4 = m_fixtureList; while (_local4) { _local4.Synchronize(_local5, _local1, m_xf); _local4 = _local4.m_next; }; } public function SetSleepingAllowed(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); SetAwake(true); }; } public function SetBullet(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_bulletFlag); } else { m_flags = (m_flags & ~(e_bulletFlag)); }; } public function SetPositionAndAngle(_arg1:b2Vec2, _arg2:Number):void{ var _local3:b2Fixture; var _local4:b2Mat22; var _local5:b2Vec2; var _local6:IBroadPhase; if (m_world.IsLocked() == true){ return; }; m_xf.R.Set(_arg2); m_xf.position.SetV(_arg1); _local4 = m_xf.R; _local5 = m_sweep.localCenter; m_sweep.c.x = ((_local4.col1.x * _local5.x) + (_local4.col2.x * _local5.y)); m_sweep.c.y = ((_local4.col1.y * _local5.x) + (_local4.col2.y * _local5.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_sweep.a0 = (m_sweep.a = _arg2); _local6 = m_world.m_contactManager.m_broadPhase; _local3 = m_fixtureList; while (_local3) { _local3.Synchronize(_local6, m_xf, m_xf); _local3 = _local3.m_next; }; m_world.m_contactManager.FindNewContacts(); } public function IsFixedRotation():Boolean{ return (((m_flags & e_fixedRotationFlag) == e_fixedRotationFlag)); } public function SetActive(_arg1:Boolean):void{ var _local2:IBroadPhase; var _local3:b2Fixture; var _local4:b2ContactEdge; var _local5:b2ContactEdge; if (_arg1 == IsActive()){ return; }; if (_arg1){ m_flags = (m_flags | e_activeFlag); _local2 = m_world.m_contactManager.m_broadPhase; _local3 = m_fixtureList; while (_local3) { _local3.CreateProxy(_local2, m_xf); _local3 = _local3.m_next; }; } else { m_flags = (m_flags & ~(e_activeFlag)); _local2 = m_world.m_contactManager.m_broadPhase; _local3 = m_fixtureList; while (_local3) { _local3.DestroyProxy(_local2); _local3 = _local3.m_next; }; _local4 = m_contactList; while (_local4) { _local5 = _local4; _local4 = _local4.next; m_world.m_contactManager.Destroy(_local5.contact); }; m_contactList = null; }; } public function SetFixedRotation(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_fixedRotationFlag); } else { m_flags = (m_flags & ~(e_fixedRotationFlag)); }; ResetMassData(); } b2internal function ShouldCollide(_arg1:b2Body):Boolean{ var _local2:b2JointEdge; if (((!((m_type == b2_dynamicBody))) && (!((_arg1.m_type == b2_dynamicBody))))){ return (false); }; _local2 = m_jointList; while (_local2) { if (_local2.other == _arg1){ if (_local2.joint.m_collideConnected == false){ return (false); }; }; _local2 = _local2.next; }; return (true); } public function IsBullet():Boolean{ return (((m_flags & e_bulletFlag) == e_bulletFlag)); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22; var _local3:b2Vec2; _local2 = m_xf.R; _local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (_local3); } public function IsActive():Boolean{ return (((m_flags & e_activeFlag) == e_activeFlag)); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } public function Split(_arg1:Function):b2Body{ var _local2:b2Vec2; var _local3:Number; var _local4:b2Vec2; var _local5:b2Body; var _local6:b2Body; var _local7:b2Fixture; var _local8:b2Fixture; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Fixture; _local2 = GetLinearVelocity().Copy(); _local3 = GetAngularVelocity(); _local4 = GetWorldCenter(); _local5 = this; _local6 = m_world.CreateBody(GetDefinition()); _local8 = _local5.m_fixtureList; while (_local8) { if (_arg1(_local8)){ _local13 = _local8.m_next; if (_local7){ _local7.m_next = _local13; } else { _local5.m_fixtureList = _local13; }; _local5.m_fixtureCount--; _local8.m_next = _local6.m_fixtureList; _local6.m_fixtureList = _local8; _local6.m_fixtureCount++; _local8.m_body = _local6; _local8 = _local13; } else { _local7 = _local8; _local8 = _local8.m_next; }; }; _local5.ResetMassData(); _local6.ResetMassData(); _local9 = _local5.GetWorldCenter(); _local10 = _local6.GetWorldCenter(); _local11 = b2Math.AddVV(_local2, b2Math.CrossFV(_local3, b2Math.SubtractVV(_local9, _local4))); _local12 = b2Math.AddVV(_local2, b2Math.CrossFV(_local3, b2Math.SubtractVV(_local10, _local4))); _local5.SetLinearVelocity(_local11); _local6.SetLinearVelocity(_local12); _local5.SetAngularVelocity(_local3); _local6.SetAngularVelocity(_local3); _local5.SynchronizeFixtures(); _local6.SynchronizeFixtures(); return (_local6); } public function SetLinearDamping(_arg1:Number):void{ m_linearDamping = _arg1; } public function GetWorld():b2World{ return (m_world); } public function ApplyTorque(_arg1:Number):void{ if (m_type != b2_dynamicBody){ return; }; if (IsAwake() == false){ SetAwake(true); }; m_torque = (m_torque + _arg1); } } }//package Box2D.Dynamics
Section 81
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Common.Math.*; public class b2BodyDef { public var angularDamping:Number; public var bullet:Boolean; public var awake:Boolean; public var active:Boolean; public var allowSleep:Boolean; public var angle:Number; public var userData; public var fixedRotation:Boolean; public var linearDamping:Number; public var angularVelocity:Number; public var linearVelocity:b2Vec2; public var position:b2Vec2; public var inertiaScale:Number; public var type:uint; public function b2BodyDef(){ position = new b2Vec2(); linearVelocity = new b2Vec2(); super(); userData = null; position.Set(0, 0); angle = 0; linearVelocity.Set(0, 0); angularVelocity = 0; linearDamping = 0; angularDamping = 0; allowSleep = true; awake = true; fixedRotation = false; bullet = false; type = b2Body.b2_staticBody; active = true; inertiaScale = 1; } } }//package Box2D.Dynamics
Section 82
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Common.*; public class b2ContactFilter { b2internal static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter); ; public function RayCollide(_arg1, _arg2:b2Fixture):Boolean{ if (!_arg1){ return (true); }; return (ShouldCollide((_arg1 as b2Fixture), _arg2)); } public function ShouldCollide(_arg1:b2Fixture, _arg2:b2Fixture):Boolean{ var _local3:b2FilterData; var _local4:b2FilterData; var _local5:Boolean; _local3 = _arg1.GetFilterData(); _local4 = _arg2.GetFilterData(); if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){ return ((_local3.groupIndex > 0)); }; _local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0)))); return (_local5); } } }//package Box2D.Dynamics
Section 83
//b2ContactImpulse (Box2D.Dynamics.b2ContactImpulse) package Box2D.Dynamics { import Box2D.Common.*; public class b2ContactImpulse { public var tangentImpulses:Array; public var normalImpulses:Array; public function b2ContactImpulse(){ normalImpulses = new Array(b2Settings.b2_maxManifoldPoints); tangentImpulses = new Array(b2Settings.b2_maxManifoldPoints); super(); } } }//package Box2D.Dynamics
Section 84
//b2ContactListener (Box2D.Dynamics.b2ContactListener) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2ContactListener { b2internal static var b2_defaultListener:b2ContactListener = new (b2ContactListener); ; public function EndContact(_arg1:b2Contact):void{ } public function PostSolve(_arg1:b2Contact, _arg2:b2ContactImpulse):void{ } public function BeginContact(_arg1:b2Contact):void{ } public function PreSolve(_arg1:b2Contact, _arg2:b2Manifold):void{ } } }//package Box2D.Dynamics
Section 85
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2ContactManager { b2internal var m_world:b2World; b2internal var m_contactFactory:b2ContactFactory; b2internal var m_contactListener:b2ContactListener; b2internal var m_contactFilter:b2ContactFilter; b2internal var m_contactCount:int; b2internal var m_broadPhase:IBroadPhase; b2internal var m_contactList:b2Contact; b2internal var m_allocator; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2ContactManager(){ m_world = null; m_contactCount = 0; m_contactFilter = b2ContactFilter.b2_defaultFilter; m_contactListener = b2ContactListener.b2_defaultListener; m_contactFactory = new b2ContactFactory(m_allocator); m_broadPhase = new b2DynamicTreeBroadPhase(); } public function FindNewContacts():void{ m_broadPhase.UpdatePairs(AddPair); } public function Destroy(_arg1:b2Contact):void{ var _local2:b2Fixture; var _local3:b2Fixture; var _local4:b2Body; var _local5:b2Body; _local2 = _arg1.GetFixtureA(); _local3 = _arg1.GetFixtureB(); _local4 = _local2.GetBody(); _local5 = _local3.GetBody(); if (_arg1.m_manifold.m_pointCount > 0){ m_contactListener.EndContact(_arg1); }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_world.m_contactList){ m_world.m_contactList = _arg1.m_next; }; if (_arg1.m_nodeA.prev){ _arg1.m_nodeA.prev.next = _arg1.m_nodeA.next; }; if (_arg1.m_nodeA.next){ _arg1.m_nodeA.next.prev = _arg1.m_nodeA.prev; }; if (_arg1.m_nodeA == _local4.m_contactList){ _local4.m_contactList = _arg1.m_nodeA.next; }; if (_arg1.m_nodeB.prev){ _arg1.m_nodeB.prev.next = _arg1.m_nodeB.next; }; if (_arg1.m_nodeB.next){ _arg1.m_nodeB.next.prev = _arg1.m_nodeB.prev; }; if (_arg1.m_nodeB == _local5.m_contactList){ _local5.m_contactList = _arg1.m_nodeB.next; }; m_contactFactory.Destroy(_arg1); m_contactCount--; } public function AddPair(_arg1, _arg2):void{ var _local3:b2Fixture; var _local4:b2Fixture; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactEdge; var _local8:b2Contact; var _local9:b2Fixture; var _local10:b2Fixture; _local3 = (_arg1 as b2Fixture); _local4 = (_arg2 as b2Fixture); _local5 = _local3.GetBody(); _local6 = _local4.GetBody(); if (_local5 == _local6){ return; }; _local7 = _local6.GetContactList(); while (_local7) { if (_local7.other == _local5){ _local9 = _local7.contact.GetFixtureA(); _local10 = _local7.contact.GetFixtureB(); if ((((_local9 == _local3)) && ((_local10 == _local4)))){ return; }; if ((((_local9 == _local4)) && ((_local10 == _local3)))){ return; }; }; _local7 = _local7.next; }; if (_local6.ShouldCollide(_local5) == false){ return; }; if (m_contactFilter.ShouldCollide(_local3, _local4) == false){ return; }; _local8 = m_contactFactory.Create(_local3, _local4); _local3 = _local8.GetFixtureA(); _local4 = _local8.GetFixtureB(); _local5 = _local3.m_body; _local6 = _local4.m_body; _local8.m_prev = null; _local8.m_next = m_world.m_contactList; if (m_world.m_contactList != null){ m_world.m_contactList.m_prev = _local8; }; m_world.m_contactList = _local8; _local8.m_nodeA.contact = _local8; _local8.m_nodeA.other = _local6; _local8.m_nodeA.prev = null; _local8.m_nodeA.next = _local5.m_contactList; if (_local5.m_contactList != null){ _local5.m_contactList.prev = _local8.m_nodeA; }; _local5.m_contactList = _local8.m_nodeA; _local8.m_nodeB.contact = _local8; _local8.m_nodeB.other = _local5; _local8.m_nodeB.prev = null; _local8.m_nodeB.next = _local6.m_contactList; if (_local6.m_contactList != null){ _local6.m_contactList.prev = _local8.m_nodeB; }; _local6.m_contactList = _local8.m_nodeB; m_world.m_contactCount++; } public function Collide():void{ var _local1:b2Contact; var _local2:b2Fixture; var _local3:b2Fixture; var _local4:b2Body; var _local5:b2Body; var _local6:*; var _local7:*; var _local8:Boolean; var _local9:b2Contact; _local1 = m_world.m_contactList; while (_local1) { _local2 = _local1.GetFixtureA(); _local3 = _local1.GetFixtureB(); _local4 = _local2.GetBody(); _local5 = _local3.GetBody(); if ((((_local4.IsAwake() == false)) && ((_local5.IsAwake() == false)))){ _local1 = _local1.GetNext(); } else { if ((_local1.m_flags & b2Contact.e_filterFlag)){ if (_local5.ShouldCollide(_local4) == false){ _local9 = _local1; _local1 = _local9.GetNext(); Destroy(_local9); continue; }; if (m_contactFilter.ShouldCollide(_local2, _local3) == false){ _local9 = _local1; _local1 = _local9.GetNext(); Destroy(_local9); continue; }; _local1.m_flags = (_local1.m_flags & ~(b2Contact.e_filterFlag)); }; _local6 = _local2.m_proxy; _local7 = _local3.m_proxy; _local8 = m_broadPhase.TestOverlap(_local6, _local7); if (_local8 == false){ _local9 = _local1; _local1 = _local9.GetNext(); Destroy(_local9); } else { _local1.Update(m_contactListener); _local1 = _local1.GetNext(); }; }; }; } } }//package Box2D.Dynamics
Section 86
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; import flash.display.*; public class b2DebugDraw { private var m_xformScale:Number;// = 1 private var m_fillAlpha:Number;// = 1 private var m_alpha:Number;// = 1 private var m_lineThickness:Number;// = 1 private var m_drawFlags:uint; b2internal var m_sprite:Sprite; private var m_drawScale:Number;// = 1 public static var e_centerOfMassBit:uint = 16; public static var e_shapeBit:uint = 1; public static var e_aabbBit:uint = 4; public static var e_controllerBit:uint = 32; public static var e_pairBit:uint = 8; public static var e_jointBit:uint = 2; public function b2DebugDraw(){ m_drawScale = 1; m_lineThickness = 1; m_alpha = 1; m_fillAlpha = 1; m_xformScale = 1; super(); m_drawFlags = 0; } public function SetDrawScale(_arg1:Number):void{ m_drawScale = _arg1; } public function GetFillAlpha():Number{ return (m_fillAlpha); } public function GetAlpha():Number{ return (m_alpha); } public function GetLineThickness():Number{ return (m_lineThickness); } public function GetDrawScale():Number{ return (m_drawScale); } public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ var _local4:int; m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.beginFill(_arg3.color, m_fillAlpha); _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.endFill(); } public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); } public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg4.color, m_alpha); m_sprite.graphics.moveTo(0, 0); m_sprite.graphics.beginFill(_arg4.color, m_fillAlpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); m_sprite.graphics.endFill(); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * m_drawScale), ((_arg1.y + (_arg3.y * _arg2)) * m_drawScale)); } public function ClearFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags & ~(_arg1)); } public function GetSprite():Sprite{ return (m_sprite); } public function GetXFormScale():Number{ return (m_xformScale); } public function SetFlags(_arg1:uint):void{ m_drawFlags = _arg1; } public function SetSprite(_arg1:Sprite):void{ m_sprite = _arg1; } public function DrawTransform(_arg1:b2Transform):void{ m_sprite.graphics.lineStyle(m_lineThickness, 0xFF0000, m_alpha); m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col1.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col1.y)) * m_drawScale)); m_sprite.graphics.lineStyle(m_lineThickness, 0xFF00, m_alpha); m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col2.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col2.y)) * m_drawScale)); } public function AppendFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags | _arg1); } public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo((_arg2.x * m_drawScale), (_arg2.y * m_drawScale)); } public function SetXFormScale(_arg1:Number):void{ m_xformScale = _arg1; } public function GetFlags():uint{ return (m_drawFlags); } public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ var _local4:int; m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); } public function SetFillAlpha(_arg1:Number):void{ m_fillAlpha = _arg1; } public function SetAlpha(_arg1:Number):void{ m_alpha = _arg1; } public function SetLineThickness(_arg1:Number):void{ m_lineThickness = _arg1; } } }//package Box2D.Dynamics
Section 87
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener) package Box2D.Dynamics { import Box2D.Dynamics.Joints.*; public class b2DestructionListener { public function SayGoodbyeJoint(_arg1:b2Joint):void{ } public function SayGoodbyeFixture(_arg1:b2Fixture):void{ } } }//package Box2D.Dynamics
Section 88
//b2FilterData (Box2D.Dynamics.b2FilterData) package Box2D.Dynamics { public class b2FilterData { public var maskBits:uint;// = 0xFFFF public var groupIndex:int;// = 0 public var categoryBits:uint;// = 1 public function b2FilterData(){ categoryBits = 1; maskBits = 0xFFFF; groupIndex = 0; super(); } public function Copy():b2FilterData{ var _local1:b2FilterData; _local1 = new b2FilterData(); _local1.categoryBits = categoryBits; _local1.maskBits = maskBits; _local1.groupIndex = groupIndex; return (_local1); } } }//package Box2D.Dynamics
Section 89
//b2Fixture (Box2D.Dynamics.b2Fixture) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2Fixture { b2internal var m_next:b2Fixture; b2internal var m_friction:Number; b2internal var m_filter:b2FilterData; b2internal var m_restitution:Number; b2internal var m_proxy; b2internal var m_density:Number; b2internal var m_isSensor:Boolean; b2internal var m_userData; b2internal var m_body:b2Body; b2internal var m_shape:b2Shape; private var m_massData:b2MassData; b2internal var m_aabb:b2AABB; public function b2Fixture(){ m_filter = new b2FilterData(); super(); m_aabb = new b2AABB(); m_userData = null; m_body = null; m_next = null; m_shape = null; m_density = 0; m_friction = 0; m_restitution = 0; } public function GetShape():b2Shape{ return (m_shape); } public function GetType():int{ return (m_shape.GetType()); } public function GetMassData(_arg1:b2MassData=null):b2MassData{ if (_arg1 == null){ _arg1 = new b2MassData(); }; m_shape.ComputeMass(_arg1, m_density); return (_arg1); } public function GetAABB():b2AABB{ return (m_aabb); } public function GetFilterData():b2FilterData{ return (m_filter.Copy()); } b2internal function Create(_arg1:b2Body, _arg2:b2Transform, _arg3:b2FixtureDef):void{ m_userData = _arg3.userData; m_friction = _arg3.friction; m_restitution = _arg3.restitution; m_body = _arg1; m_next = null; m_filter = _arg3.filter.Copy(); m_isSensor = _arg3.isSensor; m_shape = _arg3.shape.Copy(); m_density = _arg3.density; } public function SetFilterData(_arg1:b2FilterData):void{ var _local2:b2ContactEdge; var _local3:b2Contact; var _local4:b2Fixture; var _local5:b2Fixture; m_filter = _arg1.Copy(); if (m_body){ return; }; _local2 = m_body.GetContactList(); while (_local2) { _local3 = _local2.contact; _local4 = _local3.GetFixtureA(); _local5 = _local3.GetFixtureB(); if ((((_local4 == this)) || ((_local5 == this)))){ _local3.FlagForFiltering(); }; _local2 = _local2.next; }; } public function IsSensor():Boolean{ return (m_isSensor); } b2internal function Synchronize(_arg1:IBroadPhase, _arg2:b2Transform, _arg3:b2Transform):void{ var _local4:b2AABB; var _local5:b2AABB; var _local6:b2Vec2; if (!m_proxy){ return; }; _local4 = new b2AABB(); _local5 = new b2AABB(); m_shape.ComputeAABB(_local4, _arg2); m_shape.ComputeAABB(_local5, _arg3); m_aabb.Combine(_local4, _local5); _local6 = b2Math.SubtractVV(_arg3.position, _arg2.position); _arg1.MoveProxy(m_proxy, m_aabb, _local6); } b2internal function CreateProxy(_arg1:IBroadPhase, _arg2:b2Transform):void{ m_shape.ComputeAABB(m_aabb, _arg2); m_proxy = _arg1.CreateProxy(m_aabb, this); } b2internal function DestroyProxy(_arg1:IBroadPhase):void{ if (m_proxy == null){ return; }; _arg1.DestroyProxy(m_proxy); m_proxy = null; } public function SetSensor(_arg1:Boolean):void{ var _local2:b2ContactEdge; var _local3:b2Contact; var _local4:b2Fixture; var _local5:b2Fixture; if (m_isSensor == _arg1){ return; }; m_isSensor = _arg1; if (m_body == null){ return; }; _local2 = m_body.GetContactList(); while (_local2) { _local3 = _local2.contact; _local4 = _local3.GetFixtureA(); _local5 = _local3.GetFixtureB(); if ((((_local4 == this)) || ((_local5 == this)))){ _local3.SetSensor(((_local4.IsSensor()) || (_local5.IsSensor()))); }; _local2 = _local2.next; }; } public function SetDensity(_arg1:Number):void{ m_density = _arg1; } public function SetRestitution(_arg1:Number):void{ m_restitution = _arg1; } public function GetNext():b2Fixture{ return (m_next); } public function GetFriction():Number{ return (m_friction); } public function GetDensity():Number{ return (m_density); } public function GetRestitution():Number{ return (m_restitution); } b2internal function Destroy():void{ m_shape = null; } public function SetFriction(_arg1:Number):void{ m_friction = _arg1; } public function RayCast(_arg1:b2RayCastOutput, _arg2:b2RayCastInput):Boolean{ return (m_shape.RayCast(_arg1, _arg2, m_body.GetTransform())); } public function GetUserData(){ return (m_userData); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetBody():b2Body{ return (m_body); } public function TestPoint(_arg1:b2Vec2):Boolean{ return (m_shape.TestPoint(m_body.GetTransform(), _arg1)); } } }//package Box2D.Dynamics
Section 90
//b2FixtureDef (Box2D.Dynamics.b2FixtureDef) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; public class b2FixtureDef { public var shape:b2Shape; public var isSensor:Boolean; public var restitution:Number; public var userData; public var density:Number; public var filter:b2FilterData; public var friction:Number; public function b2FixtureDef(){ filter = new b2FilterData(); super(); shape = null; userData = null; friction = 0.2; restitution = 0; density = 0; filter.categoryBits = 1; filter.maskBits = 0xFFFF; filter.groupIndex = 0; isSensor = false; } } }//package Box2D.Dynamics
Section 91
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2Island { private var m_listener:b2ContactListener; private var m_contactSolver:b2ContactSolver; private var m_bodyCapacity:int; b2internal var m_bodies:Array; b2internal var m_bodyCount:int; b2internal var m_jointCapacity:int; b2internal var m_contactCount:int; b2internal var m_contacts:Array; b2internal var m_contactCapacity:int; b2internal var m_jointCount:int; private var m_allocator; b2internal var m_joints:Array; private static var s_impulse:b2ContactImpulse = new b2ContactImpulse(); public function b2Island(){ m_bodies = new Array(); m_contacts = new Array(); m_joints = new Array(); } public function AddBody(_arg1:b2Body):void{ _arg1.m_islandIndex = m_bodyCount; var _local2 = m_bodyCount++; m_bodies[_local2] = _arg1; } public function AddJoint(_arg1:b2Joint):void{ var _local2 = m_jointCount++; m_joints[_local2] = _arg1; } public function Report(_arg1:Array):void{ var _local2:int; var _local3:b2Contact; var _local4:b2ContactConstraint; var _local5:int; if (m_listener == null){ return; }; _local2 = 0; while (_local2 < m_contactCount) { _local3 = m_contacts[_local2]; _local4 = _arg1[_local2]; _local5 = 0; while (_local5 < _local4.pointCount) { s_impulse.normalImpulses[_local5] = _local4.points[_local5].normalImpulse; s_impulse.tangentImpulses[_local5] = _local4.points[_local5].tangentImpulse; _local5++; }; m_listener.PostSolve(_local3, s_impulse); _local2++; }; } public function AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean):void{ var _local4:int; var _local5:int; var _local6:b2Body; var _local7:b2Joint; var _local8:b2ContactSolver; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Boolean; var _local13:Boolean; var _local14:Boolean; var _local15:Number; var _local16:Number; var _local17:Number; _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; if (_local6.GetType() != b2Body.b2_dynamicBody){ } else { _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x + (_arg1.dt * (_arg2.x + (_local6.m_invMass * _local6.m_force.x)))); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y + (_arg1.dt * (_arg2.y + (_local6.m_invMass * _local6.m_force.y)))); _local6.m_angularVelocity = (_local6.m_angularVelocity + ((_arg1.dt * _local6.m_invI) * _local6.m_torque)); _local6.m_linearVelocity.Multiply(b2Math.Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1)); _local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1)); }; _local4++; }; m_contactSolver.Initialize(_arg1, m_contacts, m_contactCount, m_allocator); _local8 = m_contactSolver; _local8.InitVelocityConstraints(_arg1); _local4 = 0; while (_local4 < m_jointCount) { _local7 = m_joints[_local4]; _local7.InitVelocityConstraints(_arg1); _local4++; }; _local4 = 0; while (_local4 < _arg1.velocityIterations) { _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.SolveVelocityConstraints(_arg1); _local5++; }; _local8.SolveVelocityConstraints(); _local4++; }; _local4 = 0; while (_local4 < m_jointCount) { _local7 = m_joints[_local4]; _local7.FinalizeVelocityConstraints(); _local4++; }; _local8.FinalizeVelocityConstraints(); _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; if (_local6.GetType() == b2Body.b2_staticBody){ } else { _local9 = (_arg1.dt * _local6.m_linearVelocity.x); _local10 = (_arg1.dt * _local6.m_linearVelocity.y); if (((_local9 * _local9) + (_local10 * _local10)) > b2Settings.b2_maxTranslationSquared){ _local6.m_linearVelocity.Normalize(); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * (b2Settings.b2_maxTranslation * _arg1.inv_dt)); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * (b2Settings.b2_maxTranslation * _arg1.inv_dt)); }; _local11 = (_arg1.dt * _local6.m_angularVelocity); if (((_arg1.dt * _local6.m_angularVelocity) * _local11) > b2Settings.b2_maxRotationSquared){ if (_local6.m_angularVelocity < 0){ _local6.m_angularVelocity = (-(b2Settings.b2_maxRotation) * _arg1.inv_dt); } else { _local6.m_angularVelocity = (b2Settings.b2_maxRotation * _arg1.inv_dt); }; }; _local6.m_sweep.c0.SetV(_local6.m_sweep.c); _local6.m_sweep.a0 = _local6.m_sweep.a; _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y)); _local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity)); _local6.SynchronizeTransform(); }; _local4++; }; _local4 = 0; while (_local4 < _arg1.positionIterations) { _local12 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local13 = true; _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local14 = _local7.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local13 = ((_local13) && (_local14)); _local5++; }; if (((_local12) && (_local13))){ break; }; _local4++; }; Report(_local8.m_constraints); if (_arg3){ _local15 = Number.MAX_VALUE; _local16 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local17 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; if (_local6.GetType() == b2Body.b2_staticBody){ } else { if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){ _local6.m_sleepTime = 0; _local15 = 0; }; if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local17)))) || ((b2Math.Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local16)))){ _local6.m_sleepTime = 0; _local15 = 0; } else { _local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt); _local15 = b2Math.Min(_local15, _local6.m_sleepTime); }; }; _local4++; }; if (_local15 >= b2Settings.b2_timeToSleep){ _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; _local6.SetAwake(false); _local4++; }; }; }; } public function Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:int; var _local3:int; var _local4:b2ContactSolver; var _local5:Number; var _local6:b2Body; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Boolean; var _local11:Boolean; var _local12:Boolean; m_contactSolver.Initialize(_arg1, m_contacts, m_contactCount, m_allocator); _local4 = m_contactSolver; _local2 = 0; while (_local2 < m_jointCount) { m_joints[_local2].InitVelocityConstraints(_arg1); _local2++; }; _local2 = 0; while (_local2 < _arg1.velocityIterations) { _local4.SolveVelocityConstraints(); _local3 = 0; while (_local3 < m_jointCount) { m_joints[_local3].SolveVelocityConstraints(_arg1); _local3++; }; _local2++; }; _local2 = 0; while (_local2 < m_bodyCount) { _local6 = m_bodies[_local2]; if (_local6.GetType() == b2Body.b2_staticBody){ } else { _local7 = (_arg1.dt * _local6.m_linearVelocity.x); _local8 = (_arg1.dt * _local6.m_linearVelocity.y); if (((_local7 * _local7) + (_local8 * _local8)) > b2Settings.b2_maxTranslationSquared){ _local6.m_linearVelocity.Normalize(); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * (b2Settings.b2_maxTranslation * _arg1.inv_dt)); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * (b2Settings.b2_maxTranslation * _arg1.inv_dt)); }; _local9 = (_arg1.dt * _local6.m_angularVelocity); if (((_arg1.dt * _local6.m_angularVelocity) * _local9) > b2Settings.b2_maxRotationSquared){ if (_local6.m_angularVelocity < 0){ _local6.m_angularVelocity = (-(b2Settings.b2_maxRotation) * _arg1.inv_dt); } else { _local6.m_angularVelocity = (b2Settings.b2_maxRotation * _arg1.inv_dt); }; }; _local6.m_sweep.c0.SetV(_local6.m_sweep.c); _local6.m_sweep.a0 = _local6.m_sweep.a; _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y)); _local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity)); _local6.SynchronizeTransform(); }; _local2++; }; _local5 = 0.75; _local2 = 0; while (_local2 < _arg1.positionIterations) { _local10 = _local4.SolvePositionConstraints(_local5); _local11 = true; _local3 = 0; while (_local3 < m_jointCount) { _local12 = m_joints[_local3].SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local11 = ((_local11) && (_local12)); _local3++; }; if (((_local10) && (_local11))){ break; }; _local2++; }; Report(_local4.m_constraints); } public function Initialize(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener, _arg6:b2ContactSolver):void{ var _local7:int; m_bodyCapacity = _arg1; m_contactCapacity = _arg2; m_jointCapacity = _arg3; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_allocator = _arg4; m_listener = _arg5; m_contactSolver = _arg6; _local7 = m_bodies.length; while (_local7 < _arg1) { m_bodies[_local7] = null; _local7++; }; _local7 = m_contacts.length; while (_local7 < _arg2) { m_contacts[_local7] = null; _local7++; }; _local7 = m_joints.length; while (_local7 < _arg3) { m_joints[_local7] = null; _local7++; }; } } }//package Box2D.Dynamics
Section 92
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var warmStarting:Boolean; public var dt:Number; public var velocityIterations:int; public var dtRatio:Number; public var inv_dt:Number; public var positionIterations:int; public function Set(_arg1:b2TimeStep):void{ dt = _arg1.dt; inv_dt = _arg1.inv_dt; positionIterations = _arg1.positionIterations; velocityIterations = _arg1.velocityIterations; warmStarting = _arg1.warmStarting; } } }//package Box2D.Dynamics
Section 93
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Controllers.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2World { private var m_inv_dt0:Number; private var m_controllerList:b2Controller; b2internal var m_contactList:b2Contact; private var m_contactSolver:b2ContactSolver; private var m_allowSleep:Boolean; private var m_controllerCount:int; private var m_island:b2Island; private var m_destructionListener:b2DestructionListener; b2internal var m_flags:int; private var m_jointCount:int; private var m_bodyCount:int; private var s_stack:Array; b2internal var m_groundBody:b2Body; b2internal var m_contactCount:int; private var m_debugDraw:b2DebugDraw; b2internal var m_bodyList:b2Body; private var m_jointList:b2Joint; private var m_gravity:b2Vec2; b2internal var m_contactManager:b2ContactManager; public static const e_newFixture:int = 1; public static const e_locked:int = 2; private static var s_timestep:b2TimeStep = new b2TimeStep(); private static var s_queue:Array = new Array(); private static var s_timestep2:b2TimeStep = new b2TimeStep(); private static var s_backupA:b2Sweep = new b2Sweep(); private static var m_continuousPhysics:Boolean; private static var m_warmStarting:Boolean; private static var s_xf:b2Transform = new b2Transform(); private static var s_backupB:b2Sweep = new b2Sweep(); private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8); public function b2World(_arg1:b2Vec2, _arg2:Boolean){ var _local3:b2BodyDef; s_stack = new Array(); m_contactManager = new b2ContactManager(); m_contactSolver = new b2ContactSolver(); m_island = new b2Island(); super(); m_destructionListener = null; m_debugDraw = null; m_bodyList = null; m_contactList = null; m_jointList = null; m_controllerList = null; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_controllerCount = 0; m_warmStarting = true; m_continuousPhysics = true; m_allowSleep = _arg2; m_gravity = _arg1; m_inv_dt0 = 0; m_contactManager.m_world = this; _local3 = new b2BodyDef(); m_groundBody = CreateBody(_local3); } public function GetJointCount():int{ return (m_jointCount); } b2internal function DrawJoint(_arg1:b2Joint):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Transform; var _local5:b2Transform; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Color; var _local11:b2PulleyJoint; var _local12:b2Vec2; var _local13:b2Vec2; _local2 = _arg1.GetBodyA(); _local3 = _arg1.GetBodyB(); _local4 = _local2.m_xf; _local5 = _local3.m_xf; _local6 = _local4.position; _local7 = _local5.position; _local8 = _arg1.GetAnchorA(); _local9 = _arg1.GetAnchorB(); _local10 = s_jointColor; switch (_arg1.m_type){ case b2Joint.e_distanceJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; case b2Joint.e_pulleyJoint: _local11 = (_arg1 as b2PulleyJoint); _local12 = _local11.GetGroundAnchorA(); _local13 = _local11.GetGroundAnchorB(); m_debugDraw.DrawSegment(_local12, _local8, _local10); m_debugDraw.DrawSegment(_local13, _local9, _local10); m_debugDraw.DrawSegment(_local12, _local13, _local10); break; case b2Joint.e_mouseJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; default: if (_local2 != m_groundBody){ m_debugDraw.DrawSegment(_local6, _local8, _local10); }; m_debugDraw.DrawSegment(_local8, _local9, _local10); if (_local3 != m_groundBody){ m_debugDraw.DrawSegment(_local7, _local9, _local10); }; }; } public function QueryAABB(_arg1:Function, _arg2:b2AABB):void{ var broadPhase:IBroadPhase; var WorldQueryWrapper:Function; var callback = _arg1; var aabb = _arg2; WorldQueryWrapper = function (_arg1):Boolean{ return (callback(broadPhase.GetUserData(_arg1))); }; broadPhase = m_contactManager.m_broadPhase; broadPhase.Query(WorldQueryWrapper, aabb); } public function SetDebugDraw(_arg1:b2DebugDraw):void{ m_debugDraw = _arg1; } public function SetContinuousPhysics(_arg1:Boolean):void{ m_continuousPhysics = _arg1; } public function GetProxyCount():int{ return (m_contactManager.m_broadPhase.GetProxyCount()); } public function DrawDebugData():void{ var _local1:uint; var _local2:int; var _local3:b2Body; var _local4:b2Fixture; var _local5:b2Shape; var _local6:b2Joint; var _local7:IBroadPhase; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Transform; var _local12:b2AABB; var _local13:b2AABB; var _local14:Array; var _local15:b2Color; var _local16:b2Controller; var _local17:b2Contact; var _local18:b2Fixture; var _local19:b2Fixture; var _local20:b2Vec2; var _local21:b2Vec2; var _local22:b2AABB; if (m_debugDraw == null){ return; }; m_debugDraw.m_sprite.graphics.clear(); _local1 = m_debugDraw.GetFlags(); _local8 = new b2Vec2(); _local9 = new b2Vec2(); _local10 = new b2Vec2(); _local12 = new b2AABB(); _local13 = new b2AABB(); _local14 = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()]; _local15 = new b2Color(0, 0, 0); if ((_local1 & b2DebugDraw.e_shapeBit)){ _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetFixtureList(); while (_local4) { _local5 = _local4.GetShape(); if (_local3.IsActive() == false){ _local15.Set(0.5, 0.5, 0.3); DrawShape(_local5, _local11, _local15); } else { if (_local3.GetType() == b2Body.b2_staticBody){ _local15.Set(0.5, 0.9, 0.5); DrawShape(_local5, _local11, _local15); } else { if (_local3.GetType() == b2Body.b2_kinematicBody){ _local15.Set(0.5, 0.5, 0.9); DrawShape(_local5, _local11, _local15); } else { if (_local3.IsAwake() == false){ _local15.Set(0.6, 0.6, 0.6); DrawShape(_local5, _local11, _local15); } else { _local15.Set(0.9, 0.7, 0.7); DrawShape(_local5, _local11, _local15); }; }; }; }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; if ((_local1 & b2DebugDraw.e_jointBit)){ _local6 = m_jointList; while (_local6) { DrawJoint(_local6); _local6 = _local6.m_next; }; }; if ((_local1 & b2DebugDraw.e_controllerBit)){ _local16 = m_controllerList; while (_local16) { _local16.Draw(m_debugDraw); _local16 = _local16.m_next; }; }; if ((_local1 & b2DebugDraw.e_pairBit)){ _local15.Set(0.3, 0.9, 0.9); _local17 = m_contactManager.m_contactList; while (_local17) { _local18 = _local17.GetFixtureA(); _local19 = _local17.GetFixtureB(); _local20 = _local18.GetAABB().GetCenter(); _local21 = _local19.GetAABB().GetCenter(); m_debugDraw.DrawSegment(_local20, _local21, _local15); _local17 = _local17.GetNext(); }; }; if ((_local1 & b2DebugDraw.e_aabbBit)){ _local7 = m_contactManager.m_broadPhase; _local14 = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()]; _local3 = m_bodyList; while (_local3) { if (_local3.IsActive() == false){ } else { _local4 = _local3.GetFixtureList(); while (_local4) { _local22 = _local7.GetFatAABB(_local4.m_proxy); _local14[0].Set(_local22.lowerBound.x, _local22.lowerBound.y); _local14[1].Set(_local22.upperBound.x, _local22.lowerBound.y); _local14[2].Set(_local22.upperBound.x, _local22.upperBound.y); _local14[3].Set(_local22.lowerBound.x, _local22.upperBound.y); m_debugDraw.DrawPolygon(_local14, 4, _local15); _local4 = _local4.GetNext(); }; }; _local3 = _local3.GetNext(); }; }; if ((_local1 & b2DebugDraw.e_centerOfMassBit)){ _local3 = m_bodyList; while (_local3) { _local11 = s_xf; _local11.R = _local3.m_xf.R; _local11.position = _local3.GetWorldCenter(); m_debugDraw.DrawTransform(_local11); _local3 = _local3.m_next; }; }; } public function RayCastAll(_arg1:b2Vec2, _arg2:b2Vec2):Array{ var result:Array; var RayCastAllWrapper:Function; var point1 = _arg1; var point2 = _arg2; RayCastAllWrapper = function (_arg1:b2Fixture, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Number):Number{ result[result.length] = _arg1; return (1); }; result = new Array(); RayCast(RayCastAllWrapper, point1, point2); return (result); } public function DestroyBody(_arg1:b2Body):void{ var _local2:b2JointEdge; var _local3:b2ControllerEdge; var _local4:b2ContactEdge; var _local5:b2Fixture; var _local6:b2JointEdge; var _local7:b2ControllerEdge; var _local8:b2ContactEdge; var _local9:b2Fixture; if (IsLocked() == true){ return; }; _local2 = _arg1.m_jointList; while (_local2) { _local6 = _local2; _local2 = _local2.next; if (m_destructionListener){ m_destructionListener.SayGoodbyeJoint(_local6.joint); }; DestroyJoint(_local6.joint); }; _local3 = _arg1.m_controllerList; while (_local3) { _local7 = _local3; _local3 = _local3.nextController; _local7.controller.RemoveBody(_arg1); }; _local4 = _arg1.m_contactList; while (_local4) { _local8 = _local4; _local4 = _local4.next; m_contactManager.Destroy(_local8.contact); }; _arg1.m_contactList = null; _local5 = _arg1.m_fixtureList; while (_local5) { _local9 = _local5; _local5 = _local5.m_next; if (m_destructionListener){ m_destructionListener.SayGoodbyeFixture(_local9); }; _local9.DestroyProxy(m_contactManager.m_broadPhase); _local9.Destroy(); }; _arg1.m_fixtureList = null; _arg1.m_fixtureCount = 0; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_bodyList){ m_bodyList = _arg1.m_next; }; m_bodyCount--; } b2internal function DrawShape(_arg1:b2Shape, _arg2:b2Transform, _arg3:b2Color):void{ var _local4:b2CircleShape; var _local5:b2Vec2; var _local6:Number; var _local7:b2Vec2; var _local8:int; var _local9:b2PolygonShape; var _local10:int; var _local11:Array; var _local12:Array; var _local13:b2EdgeShape; switch (_arg1.m_type){ case b2Shape.e_circleShape: _local4 = (_arg1 as b2CircleShape); _local5 = b2Math.MulX(_arg2, _local4.m_p); _local6 = _local4.m_radius; _local7 = _arg2.R.col1; m_debugDraw.DrawSolidCircle(_local5, _local6, _local7, _arg3); break; case b2Shape.e_polygonShape: _local9 = (_arg1 as b2PolygonShape); _local10 = _local9.GetVertexCount(); _local11 = _local9.GetVertices(); _local12 = new Array(_local10); _local8 = 0; while (_local8 < _local10) { _local12[_local8] = b2Math.MulX(_arg2, _local11[_local8]); _local8++; }; m_debugDraw.DrawSolidPolygon(_local12, _local10, _arg3); break; case b2Shape.e_edgeShape: _local13 = (_arg1 as b2EdgeShape); m_debugDraw.DrawSegment(b2Math.MulX(_arg2, _local13.GetVertex1()), b2Math.MulX(_arg2, _local13.GetVertex2()), _arg3); break; }; } b2internal function Solve(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Controller; var _local4:b2Island; var _local5:b2Contact; var _local6:b2Joint; var _local7:int; var _local8:Array; var _local9:b2Body; var _local10:int; var _local11:int; var _local12:b2Body; var _local13:b2ContactEdge; var _local14:b2JointEdge; _local3 = m_controllerList; while (_local3) { _local3.Step(_arg1); _local3 = _local3.m_next; }; _local4 = m_island; _local4.Initialize(m_bodyCount, m_contactCount, m_jointCount, null, m_contactManager.m_contactListener, m_contactSolver); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2 = _local2.m_next; }; _local5 = m_contactList; while (_local5) { _local5.m_flags = (_local5.m_flags & ~(b2Contact.e_islandFlag)); _local5 = _local5.m_next; }; _local6 = m_jointList; while (_local6) { _local6.m_islandFlag = false; _local6 = _local6.m_next; }; _local7 = m_bodyCount; _local8 = s_stack; _local9 = m_bodyList; while (_local9) { if ((_local9.m_flags & b2Body.e_islandFlag)){ } else { if ((((_local9.IsAwake() == false)) || ((_local9.IsActive() == false)))){ } else { if (_local9.GetType() == b2Body.b2_staticBody){ } else { _local4.Clear(); _local10 = 0; var _temp1 = _local10; _local10 = (_local10 + 1); var _local15 = _temp1; _local8[_local15] = _local9; _local9.m_flags = (_local9.m_flags | b2Body.e_islandFlag); while (_local10 > 0) { --_local10; _local2 = _local8[_local10]; _local4.AddBody(_local2); if (_local2.IsAwake() == false){ _local2.SetAwake(true); }; if (_local2.GetType() == b2Body.b2_staticBody){ } else { _local13 = _local2.m_contactList; while (_local13) { if ((_local13.contact.m_flags & b2Contact.e_islandFlag)){ } else { if ((((((_local13.contact.IsSensor() == true)) || ((_local13.contact.IsEnabled() == false)))) || ((_local13.contact.IsTouching() == false)))){ } else { _local4.AddContact(_local13.contact); _local13.contact.m_flags = (_local13.contact.m_flags | b2Contact.e_islandFlag); _local12 = _local13.other; if ((_local12.m_flags & b2Body.e_islandFlag)){ } else { var _temp2 = _local10; _local10 = (_local10 + 1); var _local16 = _temp2; _local8[_local16] = _local12; _local12.m_flags = (_local12.m_flags | b2Body.e_islandFlag); }; }; }; _local13 = _local13.next; }; _local14 = _local2.m_jointList; while (_local14) { if (_local14.joint.m_islandFlag == true){ } else { _local12 = _local14.other; if (_local12.IsActive() == false){ } else { _local4.AddJoint(_local14.joint); _local14.joint.m_islandFlag = true; if ((_local12.m_flags & b2Body.e_islandFlag)){ } else { var _temp3 = _local10; _local10 = (_local10 + 1); _local16 = _temp3; _local8[_local16] = _local12; _local12.m_flags = (_local12.m_flags | b2Body.e_islandFlag); }; }; }; _local14 = _local14.next; }; }; }; _local4.Solve(_arg1, m_gravity, m_allowSleep); _local11 = 0; while (_local11 < _local4.m_bodyCount) { _local2 = _local4.m_bodies[_local11]; if (_local2.GetType() == b2Body.b2_staticBody){ _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); }; _local11++; }; }; }; }; _local9 = _local9.m_next; }; _local11 = 0; while (_local11 < _local8.length) { if (!_local8[_local11]){ break; }; _local8[_local11] = null; _local11++; }; _local2 = m_bodyList; while (_local2) { if ((((_local2.IsAwake() == false)) || ((_local2.IsActive() == false)))){ } else { if (_local2.GetType() == b2Body.b2_staticBody){ } else { _local2.SynchronizeFixtures(); }; }; _local2 = _local2.m_next; }; m_contactManager.FindNewContacts(); } public function DestroyController(_arg1:b2Controller):void{ _arg1.Clear(); if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1 == m_controllerList){ m_controllerList = _arg1.m_next; }; m_controllerCount--; } public function GetGroundBody():b2Body{ return (m_groundBody); } public function GetContactCount():int{ return (m_contactCount); } public function SetContactFilter(_arg1:b2ContactFilter):void{ m_contactManager.m_contactFilter = _arg1; } b2internal function SolveTOI(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Fixture; var _local4:b2Fixture; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactEdge; var _local8:b2Joint; var _local9:b2Island; var _local10:Array; var _local11:b2Contact; var _local12:b2Contact; var _local13:Number; var _local14:b2Body; var _local15:int; var _local16:int; var _local17:b2JointEdge; var _local18:b2TimeStep; var _local19:int; var _local20:Number; var _local21:Number; var _local22:b2Body; _local9 = m_island; _local9.Initialize(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, b2Settings.b2_maxTOIJointsPerIsland, null, m_contactManager.m_contactListener, m_contactSolver); _local10 = s_queue; _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2.m_sweep.t0 = 0; _local2 = _local2.m_next; }; _local11 = m_contactList; while (_local11) { _local11.m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local11 = _local11.m_next; }; _local8 = m_jointList; while (_local8) { _local8.m_islandFlag = false; _local8 = _local8.m_next; }; while (true) { _local12 = null; _local13 = 1; _local11 = m_contactList; for (;_local11;(_local11 = _local11.m_next)) { if ((((((_local11.IsSensor() == true)) || ((_local11.IsEnabled() == false)))) || ((_local11.IsContinuous() == false)))){ } else { _local20 = 1; if ((_local11.m_flags & b2Contact.e_toiFlag)){ _local20 = _local11.m_toi; } else { _local3 = _local11.m_fixtureA; _local4 = _local11.m_fixtureB; _local5 = _local3.m_body; _local6 = _local4.m_body; if (((((!((_local5.GetType() == b2Body.b2_dynamicBody))) || ((_local5.IsAwake() == false)))) && (((!((_local6.GetType() == b2Body.b2_dynamicBody))) || ((_local6.IsAwake() == false)))))){ continue; }; _local21 = _local5.m_sweep.t0; if (_local5.m_sweep.t0 < _local6.m_sweep.t0){ _local21 = _local6.m_sweep.t0; _local5.m_sweep.Advance(_local21); } else { if (_local6.m_sweep.t0 < _local5.m_sweep.t0){ _local21 = _local5.m_sweep.t0; _local6.m_sweep.Advance(_local21); }; }; _local20 = _local11.ComputeTOI(_local5.m_sweep, _local6.m_sweep); b2Settings.b2Assert((((0 <= _local20)) && ((_local20 <= 1)))); if ((((_local20 > 0)) && ((_local20 < 1)))){ _local20 = (((1 - _local20) * _local21) + _local20); if (_local20 > 1){ _local20 = 1; }; }; _local11.m_toi = _local20; _local11.m_flags = (_local11.m_flags | b2Contact.e_toiFlag); }; if ((((Number.MIN_VALUE < _local20)) && ((_local20 < _local13)))){ _local12 = _local11; _local13 = _local20; }; }; }; if ((((_local12 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local13)))){ break; }; _local3 = _local12.m_fixtureA; _local4 = _local12.m_fixtureB; _local5 = _local3.m_body; _local6 = _local4.m_body; s_backupA.Set(_local5.m_sweep); s_backupB.Set(_local6.m_sweep); _local5.Advance(_local13); _local6.Advance(_local13); _local12.Update(m_contactManager.m_contactListener); _local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag)); if ((((_local12.IsSensor() == true)) || ((_local12.IsEnabled() == false)))){ _local5.m_sweep.Set(s_backupA); _local6.m_sweep.Set(s_backupB); _local5.SynchronizeTransform(); _local6.SynchronizeTransform(); } else { if (_local12.IsTouching() == false){ } else { _local14 = _local5; if (_local14.GetType() != b2Body.b2_dynamicBody){ _local14 = _local6; }; _local9.Clear(); _local15 = 0; _local16 = 0; var _temp1 = _local16; _local16 = (_local16 + 1); _local10[(_local15 + _temp1)] = _local14; _local14.m_flags = (_local14.m_flags | b2Body.e_islandFlag); while (_local16 > 0) { var _temp2 = _local15; _local15 = (_local15 + 1); _local2 = _local10[_temp2]; _local16--; _local9.AddBody(_local2); if (_local2.IsAwake() == false){ _local2.SetAwake(true); }; if (_local2.GetType() != b2Body.b2_dynamicBody){ } else { _local7 = _local2.m_contactList; while (_local7) { if (_local9.m_contactCount == _local9.m_contactCapacity){ break; }; if ((_local7.contact.m_flags & b2Contact.e_islandFlag)){ } else { if ((((((_local7.contact.IsSensor() == true)) || ((_local7.contact.IsEnabled() == false)))) || ((_local7.contact.IsTouching() == false)))){ } else { _local9.AddContact(_local7.contact); _local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag); _local22 = _local7.other; if ((_local22.m_flags & b2Body.e_islandFlag)){ } else { if (_local22.GetType() != b2Body.b2_dynamicBody){ _local22.Advance(_local13); _local22.SetAwake(true); }; _local10[(_local15 + _local16)] = _local22; _local16++; _local22.m_flags = (_local22.m_flags | b2Body.e_islandFlag); }; }; }; _local7 = _local7.next; }; }; }; _local17 = _local2.m_jointList; while (_local17) { if (_local9.m_jointCount == _local9.m_jointCapacity){ } else { if (_local17.joint.m_islandFlag == true){ } else { _local22 = _local17.other; if (_local22.IsActive() == false){ } else { _local9.AddJoint(_local17.joint); _local17.joint.m_islandFlag = true; if ((_local22.m_flags & b2Body.e_islandFlag)){ } else { if (_local22.GetType() != b2Body.b2_dynamicBody){ _local22.Advance(_local13); _local22.SetAwake(true); }; _local10[(_local15 + _local16)] = _local22; _local16++; _local22.m_flags = (_local22.m_flags | b2Body.e_islandFlag); }; }; }; }; _local17 = _local17.next; }; _local18 = s_timestep; _local18.warmStarting = false; _local18.dt = ((1 - _local13) * _arg1.dt); _local18.inv_dt = (1 / _local18.dt); _local18.dtRatio = 0; _local18.velocityIterations = _arg1.velocityIterations; _local18.positionIterations = _arg1.positionIterations; _local9.SolveTOI(_local18); _local19 = 0; while (_local19 < _local9.m_bodyCount) { _local2 = _local9.m_bodies[_local19]; _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); if (_local2.IsAwake() == false){ } else { if (_local2.GetType() != b2Body.b2_dynamicBody){ } else { _local2.SynchronizeFixtures(); _local7 = _local2.m_contactList; while (_local7) { _local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag)); _local7 = _local7.next; }; }; }; _local19++; }; _local19 = 0; while (_local19 < _local9.m_contactCount) { _local11 = _local9.m_contacts[_local19]; _local9.m_contacts[_local19].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local19++; }; _local19 = 0; while (_local19 < _local9.m_jointCount) { _local8 = _local9.m_joints[_local19]; _local8.m_islandFlag = false; _local19++; }; m_contactManager.FindNewContacts(); }; }; }; } public function GetJointList():b2Joint{ return (m_jointList); } public function SetGravity(_arg1:b2Vec2):void{ m_gravity = _arg1; } public function GetBodyList():b2Body{ return (m_bodyList); } public function GetGravity():b2Vec2{ return (m_gravity); } public function RayCastOne(_arg1:b2Vec2, _arg2:b2Vec2):b2Fixture{ var result:b2Fixture; var RayCastOneWrapper:Function; var point1 = _arg1; var point2 = _arg2; RayCastOneWrapper = function (_arg1:b2Fixture, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Number):Number{ result = _arg1; return (_arg4); }; RayCast(RayCastOneWrapper, point1, point2); return (result); } public function Validate():void{ m_contactManager.m_broadPhase.Validate(); } public function SetWarmStarting(_arg1:Boolean):void{ m_warmStarting = _arg1; } public function QueryPoint(_arg1:Function, _arg2:b2Vec2):void{ var broadPhase:IBroadPhase; var WorldQueryWrapper:Function; var aabb:b2AABB; var callback = _arg1; var p = _arg2; WorldQueryWrapper = function (_arg1):Boolean{ var _local2:b2Fixture; _local2 = (broadPhase.GetUserData(_arg1) as b2Fixture); if (_local2.TestPoint(p)){ return (callback(_local2)); }; return (true); }; broadPhase = m_contactManager.m_broadPhase; aabb = new b2AABB(); aabb.lowerBound.Set((p.x - b2Settings.b2_linearSlop), (p.y - b2Settings.b2_linearSlop)); aabb.upperBound.Set((p.x + b2Settings.b2_linearSlop), (p.y + b2Settings.b2_linearSlop)); broadPhase.Query(WorldQueryWrapper, aabb); } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local2:b2Joint; var _local3:b2Body; var _local4:b2Body; var _local5:b2ContactEdge; _local2 = b2Joint.Create(_arg1, null); _local2.m_prev = null; _local2.m_next = m_jointList; if (m_jointList){ m_jointList.m_prev = _local2; }; m_jointList = _local2; m_jointCount++; _local2.m_edgeA.joint = _local2; _local2.m_edgeA.other = _local2.m_bodyB; _local2.m_edgeA.prev = null; _local2.m_edgeA.next = _local2.m_bodyA.m_jointList; if (_local2.m_bodyA.m_jointList){ _local2.m_bodyA.m_jointList.prev = _local2.m_edgeA; }; _local2.m_bodyA.m_jointList = _local2.m_edgeA; _local2.m_edgeB.joint = _local2; _local2.m_edgeB.other = _local2.m_bodyA; _local2.m_edgeB.prev = null; _local2.m_edgeB.next = _local2.m_bodyB.m_jointList; if (_local2.m_bodyB.m_jointList){ _local2.m_bodyB.m_jointList.prev = _local2.m_edgeB; }; _local2.m_bodyB.m_jointList = _local2.m_edgeB; _local3 = _arg1.bodyA; _local4 = _arg1.bodyB; if (_arg1.collideConnected == false){ _local5 = _local4.GetContactList(); while (_local5) { if (_local5.other == _local3){ _local5.contact.FlagForFiltering(); }; _local5 = _local5.next; }; }; return (_local2); } public function GetContactList():b2Contact{ return (m_contactList); } public function DestroyJoint(_arg1:b2Joint):void{ var _local2:Boolean; var _local3:b2Body; var _local4:b2Body; var _local5:b2ContactEdge; _local2 = _arg1.m_collideConnected; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_jointList){ m_jointList = _arg1.m_next; }; _local3 = _arg1.m_bodyA; _local4 = _arg1.m_bodyB; _local3.SetAwake(true); _local4.SetAwake(true); if (_arg1.m_edgeA.prev){ _arg1.m_edgeA.prev.next = _arg1.m_edgeA.next; }; if (_arg1.m_edgeA.next){ _arg1.m_edgeA.next.prev = _arg1.m_edgeA.prev; }; if (_arg1.m_edgeA == _local3.m_jointList){ _local3.m_jointList = _arg1.m_edgeA.next; }; _arg1.m_edgeA.prev = null; _arg1.m_edgeA.next = null; if (_arg1.m_edgeB.prev){ _arg1.m_edgeB.prev.next = _arg1.m_edgeB.next; }; if (_arg1.m_edgeB.next){ _arg1.m_edgeB.next.prev = _arg1.m_edgeB.prev; }; if (_arg1.m_edgeB == _local4.m_jointList){ _local4.m_jointList = _arg1.m_edgeB.next; }; _arg1.m_edgeB.prev = null; _arg1.m_edgeB.next = null; b2Joint.Destroy(_arg1, null); m_jointCount--; if (_local2 == false){ _local5 = _local4.GetContactList(); while (_local5) { if (_local5.other == _local3){ _local5.contact.FlagForFiltering(); }; _local5 = _local5.next; }; }; } public function SetContactListener(_arg1:b2ContactListener):void{ m_contactManager.m_contactListener = _arg1; } public function CreateController(_arg1:b2Controller):b2Controller{ if (_arg1.m_world != this){ throw (new Error("Controller can only be a member of one world")); }; _arg1.m_next = m_controllerList; _arg1.m_prev = null; if (m_controllerList){ m_controllerList.m_prev = _arg1; }; m_controllerList = _arg1; m_controllerCount++; _arg1.m_world = this; return (_arg1); } public function QueryShape(_arg1:Function, _arg2:b2Shape, _arg3:b2Transform=null):void{ var broadPhase:IBroadPhase; var WorldQueryWrapper:Function; var aabb:b2AABB; var callback = _arg1; var shape = _arg2; var transform = _arg3; WorldQueryWrapper = function (_arg1):Boolean{ var _local2:b2Fixture; _local2 = (broadPhase.GetUserData(_arg1) as b2Fixture); if (b2Shape.TestOverlap(shape, transform, _local2.GetShape(), _local2.GetBody().GetTransform())){ return (callback(_local2)); }; return (true); }; if (transform == null){ transform = new b2Transform(); transform.SetIdentity(); }; broadPhase = m_contactManager.m_broadPhase; aabb = new b2AABB(); shape.ComputeAABB(aabb, transform); broadPhase.Query(WorldQueryWrapper, aabb); } public function CreateBody(_arg1:b2BodyDef):b2Body{ var _local2:b2Body; if (IsLocked() == true){ return (null); }; _local2 = new b2Body(_arg1, this); _local2.m_prev = null; _local2.m_next = m_bodyList; if (m_bodyList){ m_bodyList.m_prev = _local2; }; m_bodyList = _local2; m_bodyCount++; return (_local2); } public function RemoveController(_arg1:b2Controller):void{ if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (m_controllerList == _arg1){ m_controllerList = _arg1.m_next; }; m_controllerCount--; } public function SetDestructionListener(_arg1:b2DestructionListener):void{ m_destructionListener = _arg1; } public function RayCast(_arg1:Function, _arg2:b2Vec2, _arg3:b2Vec2):void{ var broadPhase:IBroadPhase; var output:b2RayCastOutput; var RayCastWrapper:Function; var input:b2RayCastInput; var callback = _arg1; var point1 = _arg2; var point2 = _arg3; RayCastWrapper = function (_arg1:b2RayCastInput, _arg2):Number{ var _local3:*; var _local4:b2Fixture; var _local5:Boolean; var _local6:Number; var _local7:b2Vec2; _local3 = broadPhase.GetUserData(_arg2); _local4 = (_local3 as b2Fixture); _local5 = _local4.RayCast(output, _arg1); if (_local5){ _local6 = output.fraction; _local7 = new b2Vec2((((1 - _local6) * point1.x) + (_local6 * point2.x)), (((1 - _local6) * point1.y) + (_local6 * point2.y))); return (callback(_local4, _local7, output.normal, _local6)); }; return (_arg1.maxFraction); }; broadPhase = m_contactManager.m_broadPhase; output = new b2RayCastOutput(); input = new b2RayCastInput(point1, point2); broadPhase.RayCast(RayCastWrapper, input); } public function Step(_arg1:Number, _arg2:int, _arg3:int):void{ var _local4:b2TimeStep; if ((m_flags & e_newFixture)){ m_contactManager.FindNewContacts(); m_flags = (m_flags & ~(e_newFixture)); }; m_flags = (m_flags | e_locked); _local4 = s_timestep2; _local4.dt = _arg1; _local4.velocityIterations = _arg2; _local4.positionIterations = _arg3; if (_arg1 > 0){ _local4.inv_dt = (1 / _arg1); } else { _local4.inv_dt = 0; }; _local4.dtRatio = (m_inv_dt0 * _arg1); _local4.warmStarting = m_warmStarting; m_contactManager.Collide(); if (_local4.dt > 0){ Solve(_local4); }; if (((m_continuousPhysics) && ((_local4.dt > 0)))){ SolveTOI(_local4); }; if (_local4.dt > 0){ m_inv_dt0 = _local4.inv_dt; }; m_flags = (m_flags & ~(e_locked)); } public function IsLocked():Boolean{ return (((m_flags & e_locked) > 0)); } public function ClearForces():void{ var _local1:b2Body; _local1 = m_bodyList; while (_local1) { _local1.m_force.SetZero(); _local1.m_torque = 0; _local1 = _local1.m_next; }; } public function GetBodyCount():int{ return (m_bodyCount); } public function SetBroadPhase(_arg1:IBroadPhase):void{ var _local2:IBroadPhase; var _local3:b2Body; var _local4:b2Fixture; _local2 = m_contactManager.m_broadPhase; m_contactManager.m_broadPhase = _arg1; _local3 = m_bodyList; while (_local3) { _local4 = _local3.m_fixtureList; while (_local4) { _local4.m_proxy = _arg1.CreateProxy(_local2.GetFatAABB(_local4.m_proxy), _local4); _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; } public function AddController(_arg1:b2Controller):b2Controller{ _arg1.m_next = m_controllerList; _arg1.m_prev = null; m_controllerList = _arg1; _arg1.m_world = this; m_controllerCount++; return (_arg1); } } }//package Box2D.Dynamics
Section 94
//between_fly_380 (game27Flashka_armor_fla.between_fly_380) package game27Flashka_armor_fla { import flash.display.*; import flash.text.*; public dynamic class between_fly_380 extends MovieClip { public var tf_total:TextField; public var playmore:SimpleButton; public var again:SimpleButton; public var tf_newmoney:TextField; public var extramoney:SimpleButton; public var facebook:SimpleButton; public var shop:MovieClip; } }//package game27Flashka_armor_fla
Section 95
//bl_01_mm_116 (game27Flashka_armor_fla.bl_01_mm_116) package game27Flashka_armor_fla { import flash.display.*; public dynamic class bl_01_mm_116 extends MovieClip { public function bl_01_mm_116(){ addFrameScript(14, frame15); } function frame15(){ stop(); } } }//package game27Flashka_armor_fla
Section 96
//bl_01_mm_245 (game27Flashka_armor_fla.bl_01_mm_245) package game27Flashka_armor_fla { import flash.display.*; public dynamic class bl_01_mm_245 extends MovieClip { public function bl_01_mm_245(){ addFrameScript(14, frame15); } function frame15(){ stop(); } } }//package game27Flashka_armor_fla
Section 97
//bon_360_371 (game27Flashka_armor_fla.bon_360_371) package game27Flashka_armor_fla { import flash.display.*; public dynamic class bon_360_371 extends MovieClip { public var bonus:MovieClip; public function bon_360_371(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 98
//bon_360_t_m_372 (game27Flashka_armor_fla.bon_360_t_m_372) package game27Flashka_armor_fla { import flash.display.*; import flash.text.*; public dynamic class bon_360_t_m_372 extends MovieClip { public var bonus_money:TextField; } }//package game27Flashka_armor_fla
Section 99
//bon_g_t_m_368 (game27Flashka_armor_fla.bon_g_t_m_368) package game27Flashka_armor_fla { import flash.display.*; import flash.text.*; public dynamic class bon_g_t_m_368 extends MovieClip { public var bonus_money:TextField; } }//package game27Flashka_armor_fla
Section 100
//bon_good_367 (game27Flashka_armor_fla.bon_good_367) package game27Flashka_armor_fla { import flash.display.*; public dynamic class bon_good_367 extends MovieClip { public var bonus:MovieClip; public function bon_good_367(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 101
//bon_p_t_m_370 (game27Flashka_armor_fla.bon_p_t_m_370) package game27Flashka_armor_fla { import flash.display.*; import flash.text.*; public dynamic class bon_p_t_m_370 extends MovieClip { public var bonus_money:TextField; } }//package game27Flashka_armor_fla
Section 102
//bon_perf_369 (game27Flashka_armor_fla.bon_perf_369) package game27Flashka_armor_fla { import flash.display.*; public dynamic class bon_perf_369 extends MovieClip { public var bonus:MovieClip; public function bon_perf_369(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 103
//boom1_6 (game27Flashka_armor_fla.boom1_6) package game27Flashka_armor_fla { import flash.display.*; public dynamic class boom1_6 extends MovieClip { public function boom1_6(){ addFrameScript(4, frame5); } function frame5(){ stop(); } } }//package game27Flashka_armor_fla
Section 104
//btn_q2_323 (game27Flashka_armor_fla.btn_q2_323) package game27Flashka_armor_fla { import flash.display.*; public dynamic class btn_q2_323 extends MovieClip { public function btn_q2_323(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 105
//btn_q2_411 (game27Flashka_armor_fla.btn_q2_411) package game27Flashka_armor_fla { import flash.display.*; public dynamic class btn_q2_411 extends MovieClip { public function btn_q2_411(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 106
//btn_q2_56 (game27Flashka_armor_fla.btn_q2_56) package game27Flashka_armor_fla { import flash.display.*; public dynamic class btn_q2_56 extends MovieClip { public function btn_q2_56(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 107
//com1_1mm_273 (game27Flashka_armor_fla.com1_1mm_273) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com1_1mm_273 extends MovieClip { public function com1_1mm_273(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 108
//com1_2mm_287 (game27Flashka_armor_fla.com1_2mm_287) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com1_2mm_287 extends MovieClip { public function com1_2mm_287(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 109
//com1_3mm_292 (game27Flashka_armor_fla.com1_3mm_292) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com1_3mm_292 extends MovieClip { public function com1_3mm_292(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 110
//com1_4mm_295 (game27Flashka_armor_fla.com1_4mm_295) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com1_4mm_295 extends MovieClip { public function com1_4mm_295(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 111
//com1_4mm_out_298 (game27Flashka_armor_fla.com1_4mm_out_298) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com1_4mm_out_298 extends MovieClip { public function com1_4mm_out_298(){ addFrameScript(11, frame12); } function frame12(){ stop(); } } }//package game27Flashka_armor_fla
Section 112
//com1_but_end_285 (game27Flashka_armor_fla.com1_but_end_285) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com1_but_end_285 extends MovieClip { public var next:SimpleButton; public function com1_but_end_285(){ addFrameScript(0, frame1, 44, frame45); } function frame1(){ stop(); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 113
//com1_buttons_282 (game27Flashka_armor_fla.com1_buttons_282) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com1_buttons_282 extends MovieClip { public var next:SimpleButton; public var skip:SimpleButton; public function com1_buttons_282(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 114
//com2_1mm_302 (game27Flashka_armor_fla.com2_1mm_302) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com2_1mm_302 extends MovieClip { public function com2_1mm_302(){ addFrameScript(30, frame31); } function frame31(){ stop(); } } }//package game27Flashka_armor_fla
Section 115
//com2_2mm_309 (game27Flashka_armor_fla.com2_2mm_309) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com2_2mm_309 extends MovieClip { public function com2_2mm_309(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 116
//com2_3mm_311 (game27Flashka_armor_fla.com2_3mm_311) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com2_3mm_311 extends MovieClip { public function com2_3mm_311(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 117
//com2_4mm_313 (game27Flashka_armor_fla.com2_4mm_313) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com2_4mm_313 extends MovieClip { public function com2_4mm_313(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 118
//com2_but_end_307 (game27Flashka_armor_fla.com2_but_end_307) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com2_but_end_307 extends MovieClip { public var next:SimpleButton; public function com2_but_end_307(){ addFrameScript(0, frame1, 44, frame45); } function frame1(){ stop(); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 119
//com2_buttons_306 (game27Flashka_armor_fla.com2_buttons_306) package game27Flashka_armor_fla { import flash.display.*; public dynamic class com2_buttons_306 extends MovieClip { public var next:SimpleButton; public function com2_buttons_306(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package game27Flashka_armor_fla
Section 120
//cred_pan_414 (game27Flashka_armor_fla.cred_pan_414) package game27Flashka_armor_fla { import flash.display.*; public dynamic class cred_pan_414 extends MovieClip { public var cred_panel_in:MovieClip; public function cred_pan_414(){ addFrameScript(0, frame1, 16, frame17); } function frame1(){ stop(); } function frame17(){ stop(); } } }//package game27Flashka_armor_fla
Section 121
//cred_pan_b_415 (game27Flashka_armor_fla.cred_pan_b_415) package game27Flashka_armor_fla { import flash.display.*; public dynamic class cred_pan_b_415 extends MovieClip { public var pitergames:SimpleButton; } }//package game27Flashka_armor_fla
Section 122
//en3_blood_263 (game27Flashka_armor_fla.en3_blood_263) package game27Flashka_armor_fla { import flash.display.*; public dynamic class en3_blood_263 extends MovieClip { public function en3_blood_263(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package game27Flashka_armor_fla
Section 123
//ep01_cro2mm_361 (game27Flashka_armor_fla.ep01_cro2mm_361) package game27Flashka_armor_fla { import flash.display.*; public dynamic class ep01_cro2mm_361 extends MovieClip { public function ep01_cro2mm_361(){ addFrameScript(14, frame15); } function frame15(){ stop(); } } }//package game27Flashka_armor_fla
Section 124
//ep02_hero_wings_mm_169 (game27Flashka_armor_fla.ep02_hero_wings_mm_169) package game27Flashka_armor_fla { import flash.display.*; public dynamic class ep02_hero_wings_mm_169 extends MovieClip { public function ep02_hero_wings_mm_169(){ addFrameScript(0, frame1, 76, frame77); } function frame77(){ stop(); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 125
//ep02_hero_wings_mm_99 (game27Flashka_armor_fla.ep02_hero_wings_mm_99) package game27Flashka_armor_fla { import flash.display.*; public dynamic class ep02_hero_wings_mm_99 extends MovieClip { public function ep02_hero_wings_mm_99(){ addFrameScript(0, frame1, 76, frame77); } function frame77(){ stop(); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 126
//ep02_mino_mm_40 (game27Flashka_armor_fla.ep02_mino_mm_40) package game27Flashka_armor_fla { import flash.display.*; public dynamic class ep02_mino_mm_40 extends MovieClip { public function ep02_mino_mm_40(){ addFrameScript(6, frame7); } function frame7(){ stop(); } } }//package game27Flashka_armor_fla
Section 127
//ep03_hero_hand_m_179 (game27Flashka_armor_fla.ep03_hero_hand_m_179) package game27Flashka_armor_fla { import flash.display.*; public dynamic class ep03_hero_hand_m_179 extends MovieClip { public function ep03_hero_hand_m_179(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 128
//ep03_hero_hand_m_192 (game27Flashka_armor_fla.ep03_hero_hand_m_192) package game27Flashka_armor_fla { import flash.display.*; public dynamic class ep03_hero_hand_m_192 extends MovieClip { public function ep03_hero_hand_m_192(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 129
//ep04_gidr_cap_mm_48 (game27Flashka_armor_fla.ep04_gidr_cap_mm_48) package game27Flashka_armor_fla { import flash.display.*; public dynamic class ep04_gidr_cap_mm_48 extends MovieClip { public function ep04_gidr_cap_mm_48(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package game27Flashka_armor_fla
Section 130
//epoques_417 (game27Flashka_armor_fla.epoques_417) package game27Flashka_armor_fla { import flash.display.*; public dynamic class epoques_417 extends MovieClip { public var e2:SimpleButton; public var e5:SimpleButton; public var e3:SimpleButton; public var e4:SimpleButton; public var e1:SimpleButton; public function epoques_417(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 131
//expl01slow_300 (game27Flashka_armor_fla.expl01slow_300) package game27Flashka_armor_fla { import flash.display.*; public dynamic class expl01slow_300 extends MovieClip { public function expl01slow_300(){ addFrameScript(32, frame33); } function frame33(){ stop(); } } }//package game27Flashka_armor_fla
Section 132
//hep01_hero_hair_mm_140 (game27Flashka_armor_fla.hep01_hero_hair_mm_140) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hep01_hero_hair_mm_140 extends MovieClip { public var hair:MovieClip; public function hep01_hero_hair_mm_140(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 133
//hep01_hero_hair_mm_206 (game27Flashka_armor_fla.hep01_hero_hair_mm_206) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hep01_hero_hair_mm_206 extends MovieClip { public var hair:MovieClip; public function hep01_hero_hair_mm_206(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 134
//her01sliv1_107 (game27Flashka_armor_fla.her01sliv1_107) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv1_107 extends MovieClip { public function her01sliv1_107(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 135
//her01sliv1_134 (game27Flashka_armor_fla.her01sliv1_134) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv1_134 extends MovieClip { public function her01sliv1_134(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 136
//her01sliv1_186 (game27Flashka_armor_fla.her01sliv1_186) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv1_186 extends MovieClip { public function her01sliv1_186(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 137
//her01sliv1_200 (game27Flashka_armor_fla.her01sliv1_200) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv1_200 extends MovieClip { public function her01sliv1_200(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 138
//her01sliv1_331 (game27Flashka_armor_fla.her01sliv1_331) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv1_331 extends MovieClip { public function her01sliv1_331(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 139
//her01sliv1_89 (game27Flashka_armor_fla.her01sliv1_89) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv1_89 extends MovieClip { public function her01sliv1_89(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 140
//her01sliv2_112 (game27Flashka_armor_fla.her01sliv2_112) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv2_112 extends MovieClip { public function her01sliv2_112(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 141
//her01sliv2_139 (game27Flashka_armor_fla.her01sliv2_139) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv2_139 extends MovieClip { public function her01sliv2_139(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 142
//her01sliv2_191 (game27Flashka_armor_fla.her01sliv2_191) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv2_191 extends MovieClip { public function her01sliv2_191(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 143
//her01sliv2_205 (game27Flashka_armor_fla.her01sliv2_205) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv2_205 extends MovieClip { public function her01sliv2_205(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 144
//her01sliv2_336 (game27Flashka_armor_fla.her01sliv2_336) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv2_336 extends MovieClip { public function her01sliv2_336(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 145
//her01sliv2_94 (game27Flashka_armor_fla.her01sliv2_94) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her01sliv2_94 extends MovieClip { public function her01sliv2_94(){ addFrameScript(0, frame1, 37, frame38); } function frame1(){ stop(); } function frame38(){ stop(); } } }//package game27Flashka_armor_fla
Section 146
//her2gol_101 (game27Flashka_armor_fla.her2gol_101) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her2gol_101 extends MovieClip { public function her2gol_101(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 147
//her2gol_171 (game27Flashka_armor_fla.her2gol_171) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her2gol_171 extends MovieClip { public function her2gol_171(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 148
//her5_blood_113 (game27Flashka_armor_fla.her5_blood_113) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her5_blood_113 extends MovieClip { public function her5_blood_113(){ addFrameScript(0, frame1, 17, frame18); } function frame18(){ stop(); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 149
//her5_blood_242 (game27Flashka_armor_fla.her5_blood_242) package game27Flashka_armor_fla { import flash.display.*; public dynamic class her5_blood_242 extends MovieClip { public function her5_blood_242(){ addFrameScript(0, frame1, 17, frame18); } function frame18(){ stop(); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 150
//hero2_164 (game27Flashka_armor_fla.hero2_164) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hero2_164 extends MovieClip { public var up2:MovieClip; public var wing:MovieClip; public var usk1:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; } }//package game27Flashka_armor_fla
Section 151
//hero3_178 (game27Flashka_armor_fla.hero3_178) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hero3_178 extends MovieClip { public var usk1:MovieClip; public var hand:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; } }//package game27Flashka_armor_fla
Section 152
//hero4_223 (game27Flashka_armor_fla.hero4_223) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hero4_223 extends MovieClip { public var usk1:MovieClip; public var plane:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; } }//package game27Flashka_armor_fla
Section 153
//hero5_241 (game27Flashka_armor_fla.hero5_241) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hero5_241 extends MovieClip { public var blood:MovieClip; public var up2:MovieClip; public var usk1:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; public var laser:MovieClip; } }//package game27Flashka_armor_fla
Section 154
//hero5_bezb_121 (game27Flashka_armor_fla.hero5_bezb_121) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hero5_bezb_121 extends MovieClip { public function hero5_bezb_121(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 155
//hero5_bezb_250 (game27Flashka_armor_fla.hero5_bezb_250) package game27Flashka_armor_fla { import flash.display.*; public dynamic class hero5_bezb_250 extends MovieClip { public function hero5_bezb_250(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 156
//i_1_1_389 (game27Flashka_armor_fla.i_1_1_389) package game27Flashka_armor_fla { import flash.display.*; import flash.text.*; public dynamic class i_1_1_389 extends MovieClip { public var item:MovieClip; public var price:TextField; public var buy:SimpleButton; public function i_1_1_389(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 157
//i_upgrades_m_390 (game27Flashka_armor_fla.i_upgrades_m_390) package game27Flashka_armor_fla { import flash.display.*; public dynamic class i_upgrades_m_390 extends MovieClip { public function i_upgrades_m_390(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30); } function frame10(){ stop(); } function frame14(){ stop(); } function frame18(){ stop(); } function frame12(){ stop(); } function frame3(){ stop(); } function frame6(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame19(){ stop(); } function frame25(){ stop(); } function frame13(){ stop(); } function frame17(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame9(){ stop(); } function frame22(){ stop(); } function frame16(){ stop(); } function frame8(){ stop(); } function frame21(){ stop(); } function frame2(){ stop(); } function frame15(){ stop(); } function frame23(){ stop(); } function frame24(){ stop(); } function frame28(){ stop(); } function frame20(){ stop(); } function frame30(){ stop(); } function frame27(){ stop(); } function frame11(){ stop(); } function frame29(){ stop(); } function frame26(){ stop(); } } }//package game27Flashka_armor_fla
Section 158
//laser_122 (game27Flashka_armor_fla.laser_122) package game27Flashka_armor_fla { import flash.display.*; public dynamic class laser_122 extends MovieClip { public function laser_122(){ addFrameScript(0, frame1, 25, frame26); } function frame1(){ stop(); } function frame26(){ stop(); } } }//package game27Flashka_armor_fla
Section 159
//laser_251 (game27Flashka_armor_fla.laser_251) package game27Flashka_armor_fla { import flash.display.*; public dynamic class laser_251 extends MovieClip { public function laser_251(){ addFrameScript(0, frame1, 25, frame26); } function frame1(){ stop(); } function frame26(){ stop(); } } }//package game27Flashka_armor_fla
Section 160
//main_her_mm_400 (game27Flashka_armor_fla.main_her_mm_400) package game27Flashka_armor_fla { import flash.display.*; public dynamic class main_her_mm_400 extends MovieClip { public function main_her_mm_400(){ addFrameScript(78, frame79); } function frame79(){ stop(); } } }//package game27Flashka_armor_fla
Section 161
//new_shop_m_363 (game27Flashka_armor_fla.new_shop_m_363) package game27Flashka_armor_fla { import flash.display.*; public dynamic class new_shop_m_363 extends MovieClip { public var shop:SimpleButton; public function new_shop_m_363(){ addFrameScript(0, frame1, 8, frame9); } function frame1(){ stop(); } function frame9(){ stop(); } } }//package game27Flashka_armor_fla
Section 162
//power_m_157 (game27Flashka_armor_fla.power_m_157) package game27Flashka_armor_fla { import flash.display.*; public dynamic class power_m_157 extends MovieClip { public function power_m_157(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 163
//pre_zatem_78 (game27Flashka_armor_fla.pre_zatem_78) package game27Flashka_armor_fla { import flash.display.*; import flash.text.*; public dynamic class pre_zatem_78 extends MovieClip { public var procent:TextField; } }//package game27Flashka_armor_fla
Section 164
//shop_388 (game27Flashka_armor_fla.shop_388) package game27Flashka_armor_fla { import flash.display.*; public dynamic class shop_388 extends MovieClip { public var up2:MovieClip; public var up5:MovieClip; public var up4:MovieClip; public var up1:MovieClip; public var up3:MovieClip; public function shop_388(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 165
//sound_322 (game27Flashka_armor_fla.sound_322) package game27Flashka_armor_fla { import flash.display.*; public dynamic class sound_322 extends MovieClip { public function sound_322(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 166
//sound_55 (game27Flashka_armor_fla.sound_55) package game27Flashka_armor_fla { import flash.display.*; public dynamic class sound_55 extends MovieClip { public function sound_55(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 167
//sound_menu_409 (game27Flashka_armor_fla.sound_menu_409) package game27Flashka_armor_fla { import flash.display.*; public dynamic class sound_menu_409 extends MovieClip { public var sound:MovieClip; public var quality:MovieClip; } }//package game27Flashka_armor_fla
Section 168
//sound2_410 (game27Flashka_armor_fla.sound2_410) package game27Flashka_armor_fla { import flash.display.*; public dynamic class sound2_410 extends MovieClip { public function sound2_410(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 169
//strel_besh_68 (game27Flashka_armor_fla.strel_besh_68) package game27Flashka_armor_fla { import flash.display.*; public dynamic class strel_besh_68 extends MovieClip { public var strelka:MovieClip; } }//package game27Flashka_armor_fla
Section 170
//t1_mm_402 (game27Flashka_armor_fla.t1_mm_402) package game27Flashka_armor_fla { import flash.display.*; public dynamic class t1_mm_402 extends MovieClip { public function t1_mm_402(){ addFrameScript(41, frame42); } function frame42(){ stop(); } } }//package game27Flashka_armor_fla
Section 171
//t2_mm_404 (game27Flashka_armor_fla.t2_mm_404) package game27Flashka_armor_fla { import flash.display.*; public dynamic class t2_mm_404 extends MovieClip { public function t2_mm_404(){ addFrameScript(49, frame50); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 172
//t3_mm_398 (game27Flashka_armor_fla.t3_mm_398) package game27Flashka_armor_fla { import flash.display.*; public dynamic class t3_mm_398 extends MovieClip { public function t3_mm_398(){ addFrameScript(58, frame59); } function frame59(){ stop(); } } }//package game27Flashka_armor_fla
Section 173
//tut2m_373 (game27Flashka_armor_fla.tut2m_373) package game27Flashka_armor_fla { import flash.display.*; public dynamic class tut2m_373 extends MovieClip { public function tut2m_373(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 174
//tut4m_374 (game27Flashka_armor_fla.tut4m_374) package game27Flashka_armor_fla { import flash.display.*; public dynamic class tut4m_374 extends MovieClip { public function tut4m_374(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 175
//tut5m_376 (game27Flashka_armor_fla.tut5m_376) package game27Flashka_armor_fla { import flash.display.*; public dynamic class tut5m_376 extends MovieClip { public function tut5m_376(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 176
//udar_mol2_52 (game27Flashka_armor_fla.udar_mol2_52) package game27Flashka_armor_fla { import flash.display.*; public dynamic class udar_mol2_52 extends MovieClip { public function udar_mol2_52(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package game27Flashka_armor_fla
Section 177
//up01baba_143 (game27Flashka_armor_fla.up01baba_143) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up01baba_143 extends MovieClip { public function up01baba_143(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 178
//up01baba_209 (game27Flashka_armor_fla.up01baba_209) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up01baba_209 extends MovieClip { public function up01baba_209(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 179
//up01dubina_152 (game27Flashka_armor_fla.up01dubina_152) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up01dubina_152 extends MovieClip { public function up01dubina_152(){ addFrameScript(0, frame1, 1, frame2, 9, frame10); } function frame10(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 180
//up01dubina_218 (game27Flashka_armor_fla.up01dubina_218) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up01dubina_218 extends MovieClip { public function up01dubina_218(){ addFrameScript(0, frame1, 1, frame2, 9, frame10); } function frame10(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package game27Flashka_armor_fla
Section 181
//up01usk1_145 (game27Flashka_armor_fla.up01usk1_145) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up01usk1_145 extends MovieClip { public function up01usk1_145(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 182
//up01usk1_211 (game27Flashka_armor_fla.up01usk1_211) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up01usk1_211 extends MovieClip { public function up01usk1_211(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 183
//up02baba_102 (game27Flashka_armor_fla.up02baba_102) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up02baba_102 extends MovieClip { public function up02baba_102(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 184
//up02baba_172 (game27Flashka_armor_fla.up02baba_172) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up02baba_172 extends MovieClip { public function up02baba_172(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 185
//up02usk1_165 (game27Flashka_armor_fla.up02usk1_165) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up02usk1_165 extends MovieClip { public function up02usk1_165(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 186
//up02usk1_95 (game27Flashka_armor_fla.up02usk1_95) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up02usk1_95 extends MovieClip { public function up02usk1_95(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 187
//up03_baba_180 (game27Flashka_armor_fla.up03_baba_180) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up03_baba_180 extends MovieClip { public function up03_baba_180(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 188
//up03_baba_193 (game27Flashka_armor_fla.up03_baba_193) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up03_baba_193 extends MovieClip { public function up03_baba_193(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 189
//up03usk1_182 (game27Flashka_armor_fla.up03usk1_182) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up03usk1_182 extends MovieClip { public function up03usk1_182(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 190
//up03usk1_195 (game27Flashka_armor_fla.up03usk1_195) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up03usk1_195 extends MovieClip { public function up03usk1_195(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 191
//up04_baba_228 (game27Flashka_armor_fla.up04_baba_228) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up04_baba_228 extends MovieClip { public function up04_baba_228(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 192
//up04_baba_341 (game27Flashka_armor_fla.up04_baba_341) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up04_baba_341 extends MovieClip { public function up04_baba_341(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 193
//up04plane_236 (game27Flashka_armor_fla.up04plane_236) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up04plane_236 extends MovieClip { public function up04plane_236(){ addFrameScript(0, frame1, 76, frame77); } function frame77(){ stop(); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 194
//up04plane_349 (game27Flashka_armor_fla.up04plane_349) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up04plane_349 extends MovieClip { public function up04plane_349(){ addFrameScript(0, frame1, 76, frame77); } function frame77(){ stop(); } function frame1(){ stop(); } } }//package game27Flashka_armor_fla
Section 195
//up04usk1_231 (game27Flashka_armor_fla.up04usk1_231) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up04usk1_231 extends MovieClip { public function up04usk1_231(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 196
//up04usk1_344 (game27Flashka_armor_fla.up04usk1_344) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up04usk1_344 extends MovieClip { public function up04usk1_344(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 197
//up05_baba_125 (game27Flashka_armor_fla.up05_baba_125) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up05_baba_125 extends MovieClip { public function up05_baba_125(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 198
//up05_baba_254 (game27Flashka_armor_fla.up05_baba_254) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up05_baba_254 extends MovieClip { public function up05_baba_254(){ addFrameScript(0, frame1, 1, frame2, 49, frame50); } function frame1(){ stop(); } function frame2(){ stop(); } function frame50(){ stop(); } } }//package game27Flashka_armor_fla
Section 199
//up05usk1_118 (game27Flashka_armor_fla.up05usk1_118) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up05usk1_118 extends MovieClip { public function up05usk1_118(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 200
//up05usk1_247 (game27Flashka_armor_fla.up05usk1_247) package game27Flashka_armor_fla { import flash.display.*; public dynamic class up05usk1_247 extends MovieClip { public function up05usk1_247(){ addFrameScript(0, frame1, 119, frame120); } function frame1(){ stop(); } function frame120(){ stop(); } } }//package game27Flashka_armor_fla
Section 201
//ag_intro_mc (ag_intro_mc) package { import flash.display.*; public dynamic class ag_intro_mc extends MovieClip { public function ag_intro_mc(){ addFrameScript(0, frame1, 224, frame225); } function frame1(){ gotoAndPlay(2); } function frame225(){ } } }//package
Section 202
//AllEvents (AllEvents) package { import flash.events.*; public class AllEvents extends Event { public static const AGAIN:String = "Again"; public static const OTRYZKA:String = "Otryzka"; public static const PEREZAPIS:String = "Perezapis"; public static const USKOR:String = "Uskor"; public static const START_PLAYING:String = "StartPlaying"; public static const COMICS_MELODY:String = "ComicsMelody"; public static const GOTOSHOP:String = "GoToShop"; public static const COMICS_SOUNDS:String = "ComicsSounds"; public static const CLEAR:String = "Clear"; public static const RESTARTING:String = "Restarting"; public static const PEREKLUCHENIE_MUSYKI:String = "PereklichenieMusyki"; public static const GOTOMAINMENU:String = "GoToMainMenu"; public static const SMENA_GRAFIKI:String = "SmenaGrafiki"; public function AllEvents(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("AllEvents", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new AllEvents(type, bubbles, cancelable)); } } }//package
Section 203
//ar_out (ar_out) package { import flash.display.*; public dynamic class ar_out extends MovieClip { } }//package
Section 204
//arrow_danger (arrow_danger) package { import flash.display.*; public dynamic class arrow_danger extends MovieClip { } }//package
Section 205
//arrow_out (arrow_out) package { import flash.display.*; public dynamic class arrow_out extends MovieClip { public function arrow_out(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 206
//avoid_but (avoid_but) package { import flash.display.*; public dynamic class avoid_but extends MovieClip { public var click_button:SimpleButton; } }//package
Section 207
//base_hero_all (base_hero_all) package { import flash.display.*; public dynamic class base_hero_all extends MovieClip { public var usk1:MovieClip; public var dubina:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; public var hair:MovieClip; } }//package
Section 208
//between (between) package { import flash.display.*; public dynamic class between extends MovieClip { public var between_fly:MovieClip; public function between(){ addFrameScript(12, frame13); } function frame13(){ stop(); } } }//package
Section 209
//blast_between (blast_between) package { import flash.display.*; public dynamic class blast_between extends MovieClip { public function blast_between(){ addFrameScript(179, frame180); } function frame180(){ stop(); } } }//package
Section 210
//blast_in (blast_in) package { import flash.display.*; public dynamic class blast_in extends MovieClip { public function blast_in(){ addFrameScript(19, frame20); } function frame20(){ stop(); } } }//package
Section 211
//blast_out (blast_out) package { import flash.display.*; public dynamic class blast_out extends MovieClip { public function blast_out(){ addFrameScript(79, frame80); } function frame80(){ stop(); } } }//package
Section 212
//blow_bomb (blow_bomb) package { import flash.display.*; public dynamic class blow_bomb extends MovieClip { } }//package
Section 213
//bomb_sound (bomb_sound) package { import flash.media.*; public dynamic class bomb_sound extends Sound { } }//package
Section 214
//BombContactListener (BombContactListener) package { import Box2D.Dynamics.*; import Box2D.Dynamics.Contacts.*; public class BombContactListener extends b2ContactListener { override public function BeginContact(_arg1:b2Contact):void{ if ((((_arg1.GetFixtureA().GetBody().GetUserData() is TheHero)) && ((_arg1.GetFixtureB().GetBody().GetUserData() is StaticPalka)))){ TheHero(_arg1.GetFixtureA().GetBody().GetUserData()).DEAD_TEST(); TheHero(_arg1.GetFixtureA().GetBody().GetUserData()).CHANGE_ROT(); } else { if ((((_arg1.GetFixtureB().GetBody().GetUserData() is TheHero)) && ((_arg1.GetFixtureA().GetBody().GetUserData() is StaticPalka)))){ TheHero(_arg1.GetFixtureB().GetBody().GetUserData()).DEAD_TEST(); TheHero(_arg1.GetFixtureB().GetBody().GetUserData()).CHANGE_ROT(); }; }; super.BeginContact(_arg1); } } }//package
Section 215
//bon_360 (bon_360) package { import flash.media.*; public dynamic class bon_360 extends Sound { } }//package
Section 216
//bon_good (bon_good) package { import flash.media.*; public dynamic class bon_good extends Sound { } }//package
Section 217
//bon_perf (bon_perf) package { import flash.media.*; public dynamic class bon_perf extends Sound { } }//package
Section 218
//bonus_uskor (bonus_uskor) package { import flash.display.*; public dynamic class bonus_uskor extends MovieClip { } }//package
Section 219
//c1_1 (c1_1) package { import flash.media.*; public dynamic class c1_1 extends Sound { } }//package
Section 220
//c1_2 (c1_2) package { import flash.media.*; public dynamic class c1_2 extends Sound { } }//package
Section 221
//c1_3 (c1_3) package { import flash.media.*; public dynamic class c1_3 extends Sound { } }//package
Section 222
//c1_4 (c1_4) package { import flash.media.*; public dynamic class c1_4 extends Sound { } }//package
Section 223
//c2_1 (c2_1) package { import flash.media.*; public dynamic class c2_1 extends Sound { } }//package
Section 224
//c2_2 (c2_2) package { import flash.media.*; public dynamic class c2_2 extends Sound { } }//package
Section 225
//c2_3 (c2_3) package { import flash.media.*; public dynamic class c2_3 extends Sound { } }//package
Section 226
//c2_4 (c2_4) package { import flash.media.*; public dynamic class c2_4 extends Sound { } }//package
Section 227
//clouds (clouds) package { import flash.display.*; public dynamic class clouds extends MovieClip { public function clouds(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15); } function frame10(){ stop(); } function frame14(){ stop(); } function frame12(){ stop(); } function frame3(){ stop(); } function frame6(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame13(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame9(){ stop(); } function frame8(){ stop(); } function frame2(){ stop(); } function frame15(){ stop(); } function frame11(){ stop(); } } }//package
Section 228
//comics (comics) package { import flash.display.*; public dynamic class comics extends MovieClip { public var com_buts:MovieClip; public var com_buts2:MovieClip; public var com3:MovieClip; public function comics(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 229
//comics2 (comics2) package { import flash.display.*; public dynamic class comics2 extends MovieClip { public var com_buts:MovieClip; public var com_buts2:MovieClip; public var com3:MovieClip; public function comics2(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package
Section 230
//cur_flush (cur_flush) package { import flash.display.*; public dynamic class cur_flush extends MovieClip { } }//package
Section 231
//cur_shoot (cur_shoot) package { import flash.display.*; public dynamic class cur_shoot extends MovieClip { } }//package
Section 232
//DocApplePreloadFirstFrame (DocApplePreloadFirstFrame) package { import flash.display.*; import flash.events.*; import flash.media.*; import flash.net.*; import flash.text.*; public dynamic class DocApplePreloadFirstFrame extends MovieClip { public var VIS:Boolean;// = false public var SMENA:int;// = 1 public var circleSlicePreloader:MovieClip; public var Armor:MovieClip;// = null private var k1:int;// = 0 public var razresh:Boolean;// = false private var ARMOR_INT:int;// = 225 public function DocApplePreloadFirstFrame(){ razresh = false; SMENA = 1; k1 = 0; VIS = false; Armor = null; ARMOR_INT = 225; super(); addFrameScript(1, frame2); stop(); stage.showDefaultContextMenu = false; if (isUrl(["pitergames.com", "flashgamelicense.com"])){ razresh = true; }; razresh = true; if (razresh){ addChild((circleSlicePreloader = new preloader())); circleSlicePreloader.x = 0; circleSlicePreloader.y = 0; circleSlicePreloader.armor.addEventListener(MouseEvent.MOUSE_DOWN, mdLis3); loaderInfo.addEventListener(ProgressEvent.PROGRESS, piListener); loaderInfo.addEventListener(Event.COMPLETE, completeHandler); }; } private function renderArmor(_arg1:Event):void{ var _local2:SoundTransform; ARMOR_INT--; if (ARMOR_INT == 0){ Armor.gotoAndStop(1); removeChild(Armor); Armor.removeEventListener(MouseEvent.MOUSE_DOWN, mdLis3); _local2 = new SoundTransform(); _local2.volume = 0; Armor.soundTransform = _local2; Armor = null; removeEventListener(Event.ENTER_FRAME, renderArmor); stage.frameRate = 50; gotoAndStop(2); }; } private function render1(_arg1:Event):void{ k1++; if (k1 == 10){ circleSlicePreloader.armor.removeEventListener(MouseEvent.MOUSE_DOWN, mdLis3); } else { if (k1 == 20){ removeEventListener(Event.ENTER_FRAME, render1); removeChild(circleSlicePreloader); circleSlicePreloader.stop(); circleSlicePreloader = null; Armor_SPLASH(); }; }; } private function Armor_SPLASH():void{ stage.frameRate = 45; Armor = new ag_intro_mc(); Armor.x = 322; Armor.y = 245; Armor.buttonMode = true; Armor.addEventListener(MouseEvent.MOUSE_DOWN, mdLis3); addChild(Armor); addEventListener(Event.ENTER_FRAME, renderArmor); } private function mdLis3(_arg1:MouseEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://armorgames.com"); navigateToURL(_local2); } function frame2(){ stop(); } private function piListener(_arg1:ProgressEvent):void{ var _local2:uint; var _local3:uint; var _local4:uint; _local2 = _arg1.bytesLoaded; _local3 = _arg1.bytesTotal; _local4 = int(((_local2 / _local3) * 100)); if (Math.floor(_local4) > SMENA){ SMENA = Math.floor(_local4); circleSlicePreloader.procent.text = (SMENA + "%"); }; if ((((VIS == false)) && ((circleSlicePreloader.enabled == true)))){ VIS = true; trace(_local4); }; } private function completeHandler(_arg1:Event):void{ loaderInfo.removeEventListener(ProgressEvent.PROGRESS, piListener); loaderInfo.removeEventListener(Event.COMPLETE, completeHandler); circleSlicePreloader.gotoAndPlay(2); addEventListener(Event.ENTER_FRAME, render1); } public function isUrl(_arg1:Array):Boolean{ var _local2:String; var _local3:Number; var _local4:Number; var _local5:String; var _local6:Number; var _local7:Number; var _local8:int; _local2 = stage.loaderInfo.loaderURL; _local3 = (_local2.indexOf("://") + 3); _local4 = _local2.indexOf("/", _local3); _local5 = _local2.substring(_local3, _local4); _local6 = (_local5.lastIndexOf(".") - 1); _local7 = (_local5.lastIndexOf(".", _local6) + 1); _local5 = _local5.substring(_local7, _local5.length); _local8 = 0; while (_local8 < _arg1.length) { if (_local5 == _arg1[_local8]){ return (true); }; _local8++; }; return (false); } } }//package
Section 233
//enemy_duck (enemy_duck) package { import flash.display.*; public dynamic class enemy_duck extends MovieClip { public function enemy_duck(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 234
//entershop_sound (entershop_sound) package { import flash.media.*; public dynamic class entershop_sound extends Sound { } }//package
Section 235
//ep1_alarm (ep1_alarm) package { import flash.media.*; public dynamic class ep1_alarm extends Sound { } }//package
Section 236
//ep1_baba (ep1_baba) package { import flash.media.*; public dynamic class ep1_baba extends Sound { } }//package
Section 237
//ep1_croc (ep1_croc) package { import flash.media.*; public dynamic class ep1_croc extends Sound { } }//package
Section 238
//ep1_en_earth1 (ep1_en_earth1) package { import flash.display.*; public dynamic class ep1_en_earth1 extends MovieClip { public function ep1_en_earth1(){ addFrameScript(0, frame1, 9, frame10, 10, frame11, 19, frame20, 20, frame21, 29, frame30, 30, frame31, 39, frame40); } function frame10(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame20(){ stop(); } function frame30(){ stop(); } function frame31(){ stop(); } function frame11(){ stop(); } function frame40(){ stop(); } } }//package
Section 239
//ep1_en_sky1 (ep1_en_sky1) package { import flash.display.*; public dynamic class ep1_en_sky1 extends MovieClip { public function ep1_en_sky1(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11); } function frame10(){ stop(); } function frame3(){ stop(); } function frame6(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame9(){ stop(); } function frame8(){ stop(); } function frame2(){ stop(); } function frame11(){ stop(); } } }//package
Section 240
//ep1_flush1 (ep1_flush1) package { import flash.media.*; public dynamic class ep1_flush1 extends Sound { } }//package
Section 241
//ep1_flush2 (ep1_flush2) package { import flash.media.*; public dynamic class ep1_flush2 extends Sound { } }//package
Section 242
//ep1_meteor (ep1_meteor) package { import flash.media.*; public dynamic class ep1_meteor extends Sound { } }//package
Section 243
//ep1_prestart (ep1_prestart) package { import flash.media.*; public dynamic class ep1_prestart extends Sound { } }//package
Section 244
//ep1_ptero (ep1_ptero) package { import flash.media.*; public dynamic class ep1_ptero extends Sound { } }//package
Section 245
//ep1_shoot (ep1_shoot) package { import flash.media.*; public dynamic class ep1_shoot extends Sound { } }//package
Section 246
//ep1_tree (ep1_tree) package { import flash.media.*; public dynamic class ep1_tree extends Sound { } }//package
Section 247
//ep1_uskor (ep1_uskor) package { import flash.media.*; public dynamic class ep1_uskor extends Sound { } }//package
Section 248
//ep1_water (ep1_water) package { import flash.media.*; public dynamic class ep1_water extends Sound { } }//package
Section 249
//ep1_volcano (ep1_volcano) package { import flash.media.*; public dynamic class ep1_volcano extends Sound { } }//package
Section 250
//ep2_baba (ep2_baba) package { import flash.media.*; public dynamic class ep2_baba extends Sound { } }//package
Section 251
//ep2_en_earth1 (ep2_en_earth1) package { import flash.display.*; public dynamic class ep2_en_earth1 extends MovieClip { public function ep2_en_earth1(){ addFrameScript(0, frame1, 9, frame10, 10, frame11, 19, frame20, 20, frame21, 29, frame30, 30, frame31, 39, frame40, 40, frame41, 49, frame50); } function frame10(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame20(){ stop(); } function frame30(){ stop(); } function frame31(){ stop(); } function frame11(){ stop(); } function frame40(){ stop(); } function frame41(){ stop(); } function frame50(){ stop(); } } }//package
Section 252
//ep2_gin (ep2_gin) package { import flash.media.*; public dynamic class ep2_gin extends Sound { } }//package
Section 253
//ep2_minos (ep2_minos) package { import flash.media.*; public dynamic class ep2_minos extends Sound { } }//package
Section 254
//ep2_prestart (ep2_prestart) package { import flash.media.*; public dynamic class ep2_prestart extends Sound { } }//package
Section 255
//ep2_statue (ep2_statue) package { import flash.media.*; public dynamic class ep2_statue extends Sound { } }//package
Section 256
//ep2_stone (ep2_stone) package { import flash.media.*; public dynamic class ep2_stone extends Sound { } }//package
Section 257
//ep2_uskor (ep2_uskor) package { import flash.media.*; public dynamic class ep2_uskor extends Sound { } }//package
Section 258
//ep2_wings (ep2_wings) package { import flash.media.*; public dynamic class ep2_wings extends Sound { } }//package
Section 259
//ep3_baba (ep3_baba) package { import flash.media.*; public dynamic class ep3_baba extends Sound { } }//package
Section 260
//ep3_en_earth1 (ep3_en_earth1) package { import flash.display.*; public dynamic class ep3_en_earth1 extends MovieClip { public function ep3_en_earth1(){ addFrameScript(0, frame1, 9, frame10, 10, frame11, 19, frame20, 20, frame21, 29, frame30); } function frame10(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame20(){ stop(); } function frame30(){ stop(); } function frame11(){ stop(); } } }//package
Section 261
//ep3_fire (ep3_fire) package { import flash.media.*; public dynamic class ep3_fire extends Sound { } }//package
Section 262
//ep3_prestart (ep3_prestart) package { import flash.media.*; public dynamic class ep3_prestart extends Sound { } }//package
Section 263
//ep3_rycar (ep3_rycar) package { import flash.media.*; public dynamic class ep3_rycar extends Sound { } }//package
Section 264
//ep3_skull (ep3_skull) package { import flash.media.*; public dynamic class ep3_skull extends Sound { } }//package
Section 265
//ep3_uskor (ep3_uskor) package { import flash.media.*; public dynamic class ep3_uskor extends Sound { } }//package
Section 266
//ep3_visel (ep3_visel) package { import flash.media.*; public dynamic class ep3_visel extends Sound { } }//package
Section 267
//ep3_witch (ep3_witch) package { import flash.media.*; public dynamic class ep3_witch extends Sound { } }//package
Section 268
//ep4_baba (ep4_baba) package { import flash.media.*; public dynamic class ep4_baba extends Sound { } }//package
Section 269
//ep4_diri (ep4_diri) package { import flash.media.*; public dynamic class ep4_diri extends Sound { } }//package
Section 270
//ep4_en_earth1 (ep4_en_earth1) package { import flash.display.*; public dynamic class ep4_en_earth1 extends MovieClip { public function ep4_en_earth1(){ addFrameScript(0, frame1, 9, frame10, 10, frame11, 19, frame20); } function frame10(){ stop(); } function frame1(){ stop(); } function frame20(){ stop(); } function frame11(){ stop(); } } }//package
Section 271
//ep4_gidrant (ep4_gidrant) package { import flash.media.*; public dynamic class ep4_gidrant extends Sound { } }//package
Section 272
//ep4_man1 (ep4_man1) package { import flash.media.*; public dynamic class ep4_man1 extends Sound { } }//package
Section 273
//ep4_man2 (ep4_man2) package { import flash.media.*; public dynamic class ep4_man2 extends Sound { } }//package
Section 274
//ep4_plane (ep4_plane) package { import flash.media.*; public dynamic class ep4_plane extends Sound { } }//package
Section 275
//ep4_prestart (ep4_prestart) package { import flash.media.*; public dynamic class ep4_prestart extends Sound { } }//package
Section 276
//ep4_uskor (ep4_uskor) package { import flash.media.*; public dynamic class ep4_uskor extends Sound { } }//package
Section 277
//ep5_baba (ep5_baba) package { import flash.media.*; public dynamic class ep5_baba extends Sound { } }//package
Section 278
//ep5_blood (ep5_blood) package { import flash.media.*; public dynamic class ep5_blood extends Sound { } }//package
Section 279
//ep5_chip (ep5_chip) package { import flash.media.*; public dynamic class ep5_chip extends Sound { } }//package
Section 280
//ep5_en_earth1 (ep5_en_earth1) package { import flash.display.*; public dynamic class ep5_en_earth1 extends MovieClip { public function ep5_en_earth1(){ addFrameScript(0, frame1, 9, frame10, 10, frame11, 19, frame20); } function frame10(){ stop(); } function frame1(){ stop(); } function frame20(){ stop(); } function frame11(){ stop(); } } }//package
Section 281
//ep5_laser (ep5_laser) package { import flash.media.*; public dynamic class ep5_laser extends Sound { } }//package
Section 282
//ep5_man1 (ep5_man1) package { import flash.media.*; public dynamic class ep5_man1 extends Sound { } }//package
Section 283
//ep5_man2 (ep5_man2) package { import flash.media.*; public dynamic class ep5_man2 extends Sound { } }//package
Section 284
//ep5_prestart (ep5_prestart) package { import flash.media.*; public dynamic class ep5_prestart extends Sound { } }//package
Section 285
//ep5_ship (ep5_ship) package { import flash.media.*; public dynamic class ep5_ship extends Sound { } }//package
Section 286
//ep5_uskor (ep5_uskor) package { import flash.media.*; public dynamic class ep5_uskor extends Sound { } }//package
Section 287
//fade_in (fade_in) package { import flash.display.*; public dynamic class fade_in extends MovieClip { public function fade_in(){ addFrameScript(19, frame20); } function frame20(){ stop(); } } }//package
Section 288
//fade_out (fade_out) package { import flash.display.*; public dynamic class fade_out extends MovieClip { public function fade_out(){ addFrameScript(19, frame20); } function frame20(){ stop(); } } }//package
Section 289
//fon01_1 (fon01_1) package { import flash.display.*; public dynamic class fon01_1 extends MovieClip { public function fon01_1(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 290
//fon01_2 (fon01_2) package { import flash.display.*; public dynamic class fon01_2 extends MovieClip { public function fon01_2(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 291
//fon01_3 (fon01_3) package { import flash.display.*; public dynamic class fon01_3 extends MovieClip { public function fon01_3(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 292
//game_menu (game_menu) package { import flash.display.*; import flash.text.*; public dynamic class game_menu extends MovieClip { public var tf_heigth:TextField; public var restart:SimpleButton; public var t2:MovieClip; public var t5:MovieClip; public var tf_maxheigth:TextField; public var tf_length:TextField; public var bon_good:MovieClip; public var bon_360:MovieClip; public var t4:MovieClip; public var tf_money:TextField; public var tf_maxlength:TextField; public var newitem:MovieClip; public var bon_perf:MovieClip; public function game_menu(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 293
//game27 (game27) package { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.media.*; import flash.net.*; public class game27 extends MovieClip { private const GRAVITY:Number = 5; var polschetchik:SharedObject; var _fon:MovieClip;// = null var _city21:MovieClip;// = null var _city22:MovieClip;// = null var _city31:MovieClip;// = null var _city32:MovieClip;// = null var _palka:MovieClip;// = null var _camera:Sprite;// = null var _navodkaMov:Sprite;// = null var change_era:Boolean;// = false var _city32Koord:int;// = 0 var _allClouds:Array; var _camera2:Sprite;// = null var _city21Koord:int;// = 0 var _allThings_int:Array; var _fades:Sprite;// = null var _allGrounds:Array; var alarmCh:SoundChannel; var _blow:MovieClip;// = null var _promezMenu:PromezMenu;// = null var _tutSliv:MovieClip;// = null var _allThings:Array; var _meteor:MovieClip;// = null var palevoGidranta:int;// = 0 var _launch:MovieClip;// = null var _hero:TheHero;// = null var Meteor_Int:int;// = 0 var _menumain:MAIN_MENU;// = null var _sila_starta:int;// = 0 var _city22Koord:int;// = 0 var _city11Koord:int;// = 0 var _last_Vysota:Number;// = 0 var triaska:int;// = 0 var _tutStart:MovieClip;// = null var melodyCh:SoundChannel; var _currentLevelMoney:Number;// = 0 var _startMovie:MovieClip;// = null var _startOtloz:int;// = 0 var _city31Koord:int;// = 0 var _gameMenu:NadpisiNaUrovne;// = null var _city12Koord:int;// = 0 var _allToRemove:Array; var _currentVysota:Number;// = 0 var _city12:MovieClip;// = null var palevoZvezd:int;// = 0 var _city11:MovieClip;// = null var distance:Number;// = 0 var _Fcomics:MovieClip;// = null public static var _money:Number = 0; public static var _info:Array = []; public function game27(){ _camera = null; _camera2 = null; _fon = null; _hero = null; _menumain = null; _currentVysota = 0; _last_Vysota = 0; palevoZvezd = 0; palevoGidranta = 0; _city11 = null; _city11Koord = 0; _city12Koord = 0; _city12 = null; _city21 = null; _city21Koord = 0; _city22Koord = 0; _city22 = null; _city31 = null; _city31Koord = 0; _city32Koord = 0; _city32 = null; _allGrounds = []; _allToRemove = []; _sila_starta = 0; _startOtloz = 0; _currentLevelMoney = 0; distance = 0; _launch = null; _palka = null; _startMovie = null; _navodkaMov = null; _gameMenu = null; _promezMenu = null; _allThings = []; _allThings_int = []; _meteor = null; Meteor_Int = 0; _allClouds = []; _fades = null; alarmCh = new SoundChannel(); melodyCh = new SoundChannel(); triaska = 0; change_era = false; _blow = null; _Fcomics = null; polschetchik = SharedObject.getLocal("rt2pervonah13"); _tutStart = null; _tutSliv = null; super(); stage.frameRate = 50; stage.quality = StageQuality.HIGH; stage.showDefaultContextMenu = false; _camera = new Sprite(); addChild(_camera); _camera2 = new Sprite(); addChild(_camera2); if (!polschetchik.data.info){ _info = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]; } else { _info = polschetchik.data.info; PROVERKA(); }; PhisicConstants.SET_SHOP(); Starting_Menu(); } private function Starting_Menu():void{ if (_menumain == null){ _menumain = new MAIN_MENU(_camera2); } else { _menumain.Vosstanovlenie_Menu(); }; ZVUKI(1); ZVUKI(11); _menumain.addEventListener(AllEvents.START_PLAYING, startGame); _menumain.addEventListener(AllEvents.PEREKLUCHENIE_MUSYKI, smenaMusyki1); _menumain.addEventListener(AllEvents.SMENA_GRAFIKI, perekluchenieGraphiki); _menumain.addEventListener(AllEvents.CLEAR, ClearData); _menumain.addEventListener(AllEvents.COMICS_MELODY, ComicsMelody); _menumain.addEventListener(AllEvents.COMICS_SOUNDS, StartComicsSounds); } private function NextKadrFinalComic(_arg1:MouseEvent):void{ var _local2:Sound; ZVUKI((23 + _Fcomics.currentFrame)); if (PhisicConstants.SOUND){ _local2 = new transp_sound(); _local2.play(); }; if (_Fcomics.currentFrame < 3){ _Fcomics.gotoAndStop((_Fcomics.currentFrame + 1)); _Fcomics.com_buts.gotoAndPlay(1); } else { _Fcomics.com_buts.next.removeEventListener(MouseEvent.MOUSE_DOWN, NextKadrFinalComic); _Fcomics.gotoAndStop((_Fcomics.currentFrame + 1)); _Fcomics.com_buts2.gotoAndPlay(1); _Fcomics.com_buts2.next.addEventListener(MouseEvent.MOUSE_DOWN, LastKadrFinalComic); }; } private function mouseMove(_arg1:MouseEvent):void{ var _local2:Number; var _local3:Number; _local2 = (_arg1.stageX - _palka.x); _local3 = (_arg1.stageY - _palka.y); if (_local2 <= 0){ if (_local3 > 0){ _palka.rotation = 30; } else { _palka.rotation = -50; }; } else { if (_local3 > 0){ _palka.rotation = Math.min(30, ((180 * Math.atan((_local3 / _local2))) / Math.PI)); } else { _palka.rotation = Math.max(-50, ((180 * Math.atan((_local3 / _local2))) / Math.PI)); }; }; _startMovie.x = _arg1.stageX; _startMovie.y = _arg1.stageY; _arg1.updateAfterEvent(); } private function StartComicsSounds(_arg1:AllEvents):void{ ZVUKI((_menumain.SOUND_NUMBER() + 17)); } private function LastKadrFinalComic(_arg1:MouseEvent):void{ var _local2:Sound; _Fcomics.com_buts2.next.removeEventListener(MouseEvent.MOUSE_DOWN, LastKadrFinalComic); _fades = new fade_in(); _camera2.addChild(_fades); _sila_starta = 20; if (PhisicConstants.SOUND){ _local2 = new gui_click(); _local2.play(); }; addEventListener(Event.ENTER_FRAME, renderEndGame); } private function PROMEZ_MELODY():void{ var _local1:Sound; if (PhisicConstants.SOUND){ melodyCh.stop(); if (PhisicConstants.AGE == 0){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("ep1_prestart") as Class)); } else { if (PhisicConstants.AGE == 1){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("ep2_prestart") as Class)); } else { if (PhisicConstants.AGE == 2){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("ep3_prestart") as Class)); } else { if (PhisicConstants.AGE == 3){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("ep4_prestart") as Class)); } else { if (PhisicConstants.AGE == 4){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("ep5_prestart") as Class)); }; }; }; }; }; melodyCh = _local1.play(0, 1000); }; } private function SozdanieNovyhZvezd():void{ var _local1:Number; var _local2:MovieClip; var _local3:int; var _local4:Number; var _local5:MovieClip; _local1 = _hero.Vysota(); if (_local1 < -9280){ _local1 = -9280; }; _local2 = new ep1_en_sky1(); _local2.gotoAndStop(((PhisicConstants.AGE * 2) + 1)); _allThings_int.push(3); if (_local1 < -8000){ _local2.y = Math.max(Math.min(((_local1 + 750) - (Math.random() * 1500)), -8000), -9900); } else { _local2.y = Math.max(Math.min(((_local1 + 750) - (Math.random() * 1500)), 250), -8000); }; _local2.x = ((palevoZvezd + 500) + (Math.random() * 1000)); _camera.addChild(_local2); _allThings.push(_local2); if (_local1 > -2000){ _local3 = 0; while (_local3 < 2) { _local4 = (Math.random() * 3); _local5 = new clouds(); _local4 = Math.min(3, (1 + Math.floor(_local4))); _local5.gotoAndStop(((3 * PhisicConstants.AGE) + _local4)); _local5.x = ((palevoZvezd + 1000) + (Math.random() * 500)); _local5.y = (-1600 + (1700 * Math.random())); _camera.addChild(_local5); _allClouds.push(_local5); _local3++; }; }; } private function GOROD_MOV(_arg1:Number, _arg2:Number):void{ if (_city11.visible){ if (_arg1 > 200){ _city11.x = (_arg1 - ((_arg1 - _city11Koord) / 30)); }; if (_city11.x < (_arg1 - 1300)){ _city11.visible = false; _city11Koord = (_city11Koord + 60000); }; if ((((_arg2 < -2500)) && (!((_city11.y == -2250))))){ _city11.y = -2250; } else { if ((((_arg2 >= -2500)) && ((_arg2 < 0)))){ _city11.y = (_arg2 * 0.9); } else { if ((((_arg2 >= 0)) && (!((_city11.y == 0))))){ _city11.y = 0; }; }; }; } else { if (_arg1 > (_city11Koord - 18000)){ _city11.visible = true; _city11.x = (_arg1 - ((_arg1 - _city11Koord) / 30)); }; }; if (_city12.visible){ if (_arg1 > 200){ _city12.x = (_arg1 - ((_arg1 - _city12Koord) / 30)); }; if (_city12.x < (_arg1 - 1300)){ _city12.visible = false; _city12Koord = (_city12Koord + 60000); }; if ((((_arg2 < -2500)) && (!((_city12.y == -2250))))){ _city12.y = -2250; } else { if ((((_arg2 >= -2500)) && ((_arg2 < 0)))){ _city12.y = (_arg2 * 0.9); } else { if ((((_arg2 >= 0)) && (!((_city12.y == 0))))){ _city12.y = 0; }; }; }; } else { if (_arg1 > (_city12Koord - 18000)){ _city12.visible = true; _city12.x = (_arg1 - ((_arg1 - _city12Koord) / 30)); }; }; if (_city21.visible){ if (_arg1 > 200){ _city21.x = (_arg1 - ((_arg1 - _city21Koord) / 20)); }; if (_city21.x < (_arg1 - 1300)){ _city21.visible = false; _city21Koord = (_city21Koord + 40000); }; if ((((_arg2 < -2500)) && (!((_city21.y == -2250))))){ _city21.y = -2250; } else { if ((((_arg2 >= -2500)) && ((_arg2 < 0)))){ _city21.y = (_arg2 * 0.9); } else { if ((((_arg2 >= 0)) && (!((_city21.y == 0))))){ _city21.y = 0; }; }; }; } else { if (_arg1 > (_city21Koord - 12000)){ _city21.visible = true; _city21.x = (_arg1 - ((_arg1 - _city21Koord) / 20)); }; }; if (_city22.visible){ if (_arg1 > 200){ _city22.x = (_arg1 - ((_arg1 - _city22Koord) / 20)); }; if (_city22.x < (_arg1 - 1300)){ _city22.visible = false; _city22Koord = (_city22Koord + 40000); }; if ((((_arg2 < -2500)) && (!((_city22.y == -2250))))){ _city22.y = -2250; } else { if ((((_arg2 >= -2500)) && ((_arg2 < 0)))){ _city22.y = (_arg2 * 0.9); } else { if ((((_arg2 >= 0)) && (!((_city22.y == 0))))){ _city22.y = 0; }; }; }; } else { if (_arg1 > (_city22Koord - 12000)){ _city22.visible = true; _city22.x = (_arg1 - ((_arg1 - _city22Koord) / 20)); }; }; if (_city31.visible){ if (_arg1 > 200){ _city31.x = (_arg1 - ((_arg1 - _city31Koord) / 10)); }; if (_city31.x < (_arg1 - 1300)){ _city31.visible = false; _city31Koord = (_city31Koord + 20000); }; if ((((_arg2 < -2500)) && (!((_city31.y == -2250))))){ _city31.y = -2250; } else { if ((((_arg2 >= -2500)) && ((_arg2 < 0)))){ _city31.y = (_arg2 * 0.9); } else { if ((((_arg2 >= 0)) && (!((_city31.y == 0))))){ _city31.y = 0; }; }; }; } else { if (_arg1 > (_city31Koord - 6000)){ _city31.visible = true; _city31.x = (_arg1 - ((_arg1 - _city31Koord) / 10)); }; }; if (_city32.visible){ if (_arg1 > 200){ _city32.x = (_arg1 - ((_arg1 - _city32Koord) / 10)); }; if (_city32.x < (_arg1 - 1300)){ _city32.visible = false; _city32Koord = (_city32Koord + 20000); }; if ((((_arg2 < -2500)) && (!((_city32.y == -2250))))){ _city32.y = -2250; } else { if ((((_arg2 >= -2500)) && ((_arg2 < 0)))){ _city32.y = (_arg2 * 0.9); } else { if ((((_arg2 >= 0)) && (!((_city32.y == 0))))){ _city32.y = 0; }; }; }; } else { if (_arg1 > (_city32Koord - 6000)){ _city32.visible = true; _city32.x = (_arg1 - ((_arg1 - _city32Koord) / 10)); }; }; } private function KONEC_UROVNIA():void{ removeEventListener(Event.ENTER_FRAME, render); stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, keyUp); alarmCh.stop(); PROMEZ_MELODY(); ZVUKI(12); if (_promezMenu == null){ _promezMenu = new PromezMenu(_camera2, _money, (_money - _currentLevelMoney), _hero.Rasstojanie()); } else { _promezMenu.vosstanovleniePROMEZ(_money, (_money - _currentLevelMoney), _hero.Rasstojanie()); }; if (PhisicConstants.METEOR){ _gameMenu.end_METEOR(); }; if (_navodkaMov != null){ _navodkaMov.visible = false; }; _gameMenu.removeEventListener(AllEvents.GOTOSHOP, fromGameToShop); _gameMenu.ARROW_INVISIBLE(); _promezMenu.addEventListener(AllEvents.AGAIN, restartInPromez); _promezMenu.addEventListener(AllEvents.PEREZAPIS, PokupkaVpromez); _gameMenu.PEREZAPIS(); _info[0] = _money; PEREZAPIS(); } private function FINAL_COMICS():void{ var _local1:Sound; PhisicConstants.PEREHOD = false; if (PhisicConstants.SOUND){ melodyCh.stop(); _local1 = new ((loaderInfo.applicationDomain.getDefinition("track_comics") as Class)); melodyCh = _local1.play(0, 1000); }; PhisicConstants.GAME_COMPLETE = true; _info[12] = 1; PEREZAPIS(); OBNULENIE_BLAG(); ZVUKI(23); _Fcomics = new comics2(); _Fcomics.gotoAndStop(1); _camera2.addChild(_Fcomics); _fades = new blast_out(); _camera2.addChild(_fades); _sila_starta = 0; addEventListener(Event.ENTER_FRAME, renderFinalComics); _Fcomics.com_buts.next.addEventListener(MouseEvent.MOUSE_DOWN, NextKadrFinalComic); } private function SUPER_DEF_EFFECT():void{ if (PhisicConstants.AGE == 4){ ZVUKI(17); _hero.LAZER(); }; } private function SozdanieGidrantaISobaki():void{ var _local1:Number; var _local2:int; var _local3:MovieClip; var _local4:MovieClip; var _local5:MovieClip; _local1 = Math.random(); if (_local1 < 0.5){ _local3 = new gidrant(); _local3.y = 420; _local3.x = ((palevoGidranta + 500) + (2500 * Math.random())); _camera.addChild(_local3); _local3.gotoAndStop(((PhisicConstants.AGE * 2) + 1)); _allThings.push(_local3); _allThings_int.push(1); } else { if (PhisicConstants.AGE == 0){ _local4 = new ep1_en_earth1(); } else { if (PhisicConstants.AGE == 1){ _local4 = new ep2_en_earth1(); } else { if (PhisicConstants.AGE == 2){ _local4 = new ep3_en_earth1(); } else { if (PhisicConstants.AGE == 3){ _local4 = new ep4_en_earth1(); } else { if (PhisicConstants.AGE == 4){ _local4 = new ep5_en_earth1(); }; }; }; }; }; _local4.y = 434; _local4.x = ((palevoGidranta + 500) + (2500 * Math.random())); _allThings.push(_local4); if (PhisicConstants.AGE == 0){ if (_local1 < 0.7){ _allThings_int.push(4); _camera.addChildAt(_local4, (_camera.getChildIndex(_city32) + 1)); } else { if (_local1 < 0.9){ _allThings_int.push(5); _camera.addChildAt(_local4, (_camera.getChildIndex(_city32) + 1)); _local4.gotoAndStop(11); } else { _allThings_int.push(7); _local4.gotoAndStop(31); _camera.addChild(_local4); }; }; } else { if (PhisicConstants.AGE == 1){ _local1 = Math.floor((_local1 * 10)); if (_local1 < 9){ _allThings_int.push(4); _local4.gotoAndStop((((_local1 - 5) * 10) + 1)); _camera.addChildAt(_local4, (_camera.getChildIndex(_city32) + 1)); } else { _allThings_int.push(8); _local4.gotoAndStop(41); _camera.addChild(_local4); }; } else { if (PhisicConstants.AGE == 2){ if (_local1 < 0.7){ _allThings_int.push(4); _camera.addChildAt(_local4, (_camera.getChildIndex(_city32) + 1)); } else { if (_local1 < 0.9){ _allThings_int.push(5); _camera.addChildAt(_local4, (_camera.getChildIndex(_city32) + 1)); _local4.gotoAndStop(11); } else { _allThings_int.push(8); _local4.gotoAndStop(21); _camera.addChild(_local4); }; }; } else { if (_local1 < 0.75){ _allThings_int.push(4); } else { _allThings_int.push(5); _local4.gotoAndStop(11); }; _camera.addChildAt(_local4, (_camera.getChildIndex(_city32) + 1)); }; }; }; }; _local2 = 0; while (_local2 < 2) { _local5 = new bonus_uskor(); _local5.y = (-9200 + (Math.random() * 9600)); _local5.x = ((palevoGidranta + 500) + (2500 * Math.random())); _camera.addChild(_local5); _allThings.push(_local5); _allThings_int.push(2); _local2++; }; } private function renderBeforeStart(_arg1:Event):void{ _sila_starta++; if ((((((((((_sila_starta == 20)) && ((PhisicConstants.PEREHOD == false)))) || ((((_sila_starta == 30)) && ((PhisicConstants.PEREHOD == true)))))) && (!((_fades == null))))) && ((PhisicConstants.KADR4 == false)))){ _fades.parent.removeChild(_fades); _fades = null; PhisicConstants.PEREHOD = false; addEventListener(MouseEvent.MOUSE_DOWN, mouseClick); }; if (_sila_starta == 50){ _sila_starta = 0; }; if (PhisicConstants.COMICS_OTCHET > 0){ PhisicConstants.COMICS_OTCHET++; if (PhisicConstants.COMICS_OTCHET == 16){ PhisicConstants.COMICS_OTCHET = 0; PhisicConstants.KADR4 = false; _menumain.UDALENIE_COMICSA(); PROMEZ_MELODY(); }; }; } private function ComicsMelody(_arg1:AllEvents):void{ var _local2:Sound; if (PhisicConstants.SOUND){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("track_comics") as Class)); melodyCh = _local2.play(0, 1000); }; ZVUKI(18); } private function restartInPromez(_arg1:AllEvents):void{ if (((!((_promezMenu == null))) && (_promezMenu.VISIBLE))){ _fades = new fade_in(); _camera2.addChild(_fades); _fades.x = (_hero.Rasstojanie() - 210); _fades.y = -(_camera2.y); _sila_starta = 20; addEventListener(Event.ENTER_FRAME, renderPromez); } else { OchistkaUrovnia(); if ((((PhisicConstants.AGE < 4)) || ((PhisicConstants.PEREHOD == false)))){ setupLevel(); } else { FINAL_COMICS(); }; }; } private function OchisktaPromez():void{ _promezMenu.removeEventListener(AllEvents.AGAIN, restartInPromez); _promezMenu.destroy(); } private function startUskor(_arg1:AllEvents):void{ _hero.SUPERUSKORITEL(); ZVUKI(5); } private function renderEndGame(_arg1:Event):void{ _sila_starta--; if (_sila_starta == 0){ removeEventListener(Event.ENTER_FRAME, renderEndGame); _camera2.removeChild(_fades); _fades = null; _camera2.removeChild(_Fcomics); _Fcomics = null; melodyCh.stop(); Starting_Menu(); }; } private function PEREZAPIS():void{ polschetchik.data.info = _info; polschetchik.flush(); } private function setupLevel():void{ var _local1:StaticPalka; var _local2:StaticPalka; var _local3:MovieClip; setupWorld1(); triaska = 0; if (PhisicConstants.PEREHOD){ PhisicConstants.AGE++; if (PhisicConstants.TUT_PEREHOD == 1){ PhisicConstants.TUT_PEREHOD = 0; _info[16] = 0; PEREZAPIS(); }; OBNULENIE_BLAG(); }; if (PhisicConstants.KADR4 == false){ PROMEZ_MELODY(); }; if ((((((((PhisicConstants.AGE == 1)) || ((PhisicConstants.AGE == 2)))) || ((PhisicConstants.AGE == 4)))) && ((PhisicConstants.WHEEL == false)))){ PhisicConstants.WHEEL = true; }; PhisicConstants.BONUS_PRIZEM = false; PhisicConstants.PREZEM = 0; PhisicConstants.VRASCH = 0; PhisicConstants.VRASCH_PAYPAL = 0; Meteor_Int = (750 + Math.floor((Math.random() * 250))); _currentVysota = 0; _last_Vysota = 0; palevoZvezd = 1000; palevoGidranta = 750; PhisicConstants.METEOR_INT = 0; PhisicConstants.METEOR = false; _fon = new sky01(); _camera.addChild(_fon); _fon.gotoAndStop((PhisicConstants.AGE + 1)); _city11 = new fon01_1(); _city11.gotoAndStop((PhisicConstants.AGE + 1)); _camera.addChild(_city11); _city11Koord = 0; _city11.x = 200; _city12Koord = -30000; _city12 = new fon01_1(); _city12.gotoAndStop((PhisicConstants.AGE + 1)); _city12.x = -800; _camera.addChild(_city12); _city21 = new fon01_2(); _city21.gotoAndStop((PhisicConstants.AGE + 1)); _camera.addChild(_city21); _city21Koord = 0; _city21.x = 200; _city22Koord = -20000; _city22 = new fon01_2(); _city22.gotoAndStop((PhisicConstants.AGE + 1)); _city22.x = -800; _camera.addChild(_city22); _city31 = new fon01_3(); _city31.gotoAndStop((PhisicConstants.AGE + 1)); _camera.addChild(_city31); _city31Koord = 0; _city31.x = 200; _city32Koord = -10000; _city32 = new fon01_3(); _city32.gotoAndStop((PhisicConstants.AGE + 1)); _city32.x = -800; _camera.addChild(_city32); _local1 = new StaticPalka(_camera, 1, new Point(500, 475)); _allGrounds.push(_local1); _local2 = new StaticPalka(_camera, 1, new Point(1500, 475)); _allGrounds.push(_local2); _sila_starta = 0; _currentLevelMoney = _money; distance = 0; PhisicConstants.KOEF_DALNOSTI = 1; PhisicConstants.NUMBER_SLIV = 3; _launch = new launcher(); _launch.gotoAndStop((PhisicConstants.AGE + 1)); _camera.addChild(_launch); if (PhisicConstants.AGE == 0){ _palka = new pulyalka(); } else { if (PhisicConstants.AGE == 1){ _palka = new pulyalka2(); } else { if (PhisicConstants.AGE == 2){ _palka = new pulyalka3(); } else { if (PhisicConstants.AGE == 3){ _palka = new pulyalka4(); } else { if (PhisicConstants.AGE == 4){ _palka = new pulyalka5(); }; }; }; }; }; _palka.x = 50; _palka.y = 287; _camera.addChild(_palka); _palka.gotoAndStop(1); _palka.hero.gotoAndStop(1); if (PhisicConstants.BABA){ _palka.hero.baba.gotoAndStop(2); }; if (PhisicConstants.AGE == 0){ if (PhisicConstants.DEF){ _palka.hero.dubina.gotoAndStop(2); }; } else { if (PhisicConstants.AGE == 1){ if (PhisicConstants.DEF){ _palka.hero.up2.gotoAndStop(2); }; } else { if (PhisicConstants.AGE == 2){ if (PhisicConstants.SUPER_DEF){ _palka.hero.hand.gotoAndStop(2); }; } else { if (PhisicConstants.AGE == 4){ if (PhisicConstants.SUPER_DEF){ _palka.hero.up2.gotoAndStop(2); }; }; }; }; }; if (PhisicConstants.MAXPOWER){ _palka.power.gotoAndStop(2); }; addEventListener(MouseEvent.MOUSE_MOVE, mouseMove); _local3 = new ep1_en_sky1(); _local3.gotoAndStop(((PhisicConstants.AGE * 2) + 1)); _allThings_int.push(3); _local3.x = (640 + (Math.random() * 800)); _local3.y = ((-(Math.random()) * 4300) + 200); _camera.addChild(_local3); _allThings.push(_local3); if (PhisicConstants.TUT_START == 1){ _tutStart = new tut1m(); _camera.addChild(_tutStart); }; _startMovie = new cur_shoot(); _camera.addChild(_startMovie); _startMovie.x = mouseX; _startMovie.y = mouseY; addEventListener(Event.ENTER_FRAME, renderBeforeStart); if (PhisicConstants.PEREHOD == false){ _fades = new fade_out(); } else { _fades = new blast_out(); }; _camera2.addChildAt(_fades, 0); } private function renderFinalComics(_arg1:Event):void{ _sila_starta++; if (_sila_starta == 30){ removeEventListener(Event.ENTER_FRAME, renderFinalComics); _camera2.removeChild(_fades); _fades = null; }; } private function renderPromez(_arg1:Event):void{ _sila_starta--; if (_sila_starta == 0){ removeEventListener(Event.ENTER_FRAME, renderPromez); _camera2.removeChild(_fades); _fades = null; OchistkaUrovnia(); setupLevel(); }; } private function perekluchenieGraphiki(_arg1:AllEvents):void{ if (PhisicConstants.GRAFIKA == 1){ stage.quality = StageQuality.HIGH; } else { if (PhisicConstants.GRAFIKA == 2){ stage.quality = StageQuality.MEDIUM; } else { if (PhisicConstants.GRAFIKA == 3){ stage.quality = StageQuality.LOW; }; }; }; } private function keyUp(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 39){ PhisicConstants.PO4AC = false; } else { if (_arg1.keyCode == 37){ PhisicConstants.PROTIV4AC = false; }; }; } private function ClearData(_arg1:AllEvents):void{ PhisicConstants.WHEEL = false; PhisicConstants.DEF = false; PhisicConstants.SLIV = false; PhisicConstants.BABA = false; PhisicConstants.SUPER = false; PhisicConstants.START = false; PhisicConstants.SUPER_DEF = false; PhisicConstants.MAXPOWER = false; PhisicConstants.KOEF_ARMOR = 1; PhisicConstants.POKUPKI = [0, 0, 0, 0, 0]; PhisicConstants.AGE = 0; PhisicConstants._MAXLENGTH = 0; PhisicConstants._MAXHEIGHT = 0; PhisicConstants.GAME_COMPLETE = false; PhisicConstants.SET_SHOP(); _money = 0; _info = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PhisicConstants.TUT_START, PhisicConstants.TUT_SLIV, PhisicConstants.TUT_DOPSLIV, PhisicConstants.TUT_PEREHOD, PhisicConstants.TUT_STRELKI]; PEREZAPIS(); if (_promezMenu != null){ _promezMenu.TEXT_1(); }; _menumain.STOP_COMPLETE(); } private function startGame(_arg1:AllEvents):void{ _menumain.destroy(); _menumain.removeEventListener(AllEvents.START_PLAYING, startGame); _menumain.removeEventListener(AllEvents.PEREKLUCHENIE_MUSYKI, smenaMusyki1); _menumain.removeEventListener(AllEvents.SMENA_GRAFIKI, perekluchenieGraphiki); _menumain.removeEventListener(AllEvents.CLEAR, ClearData); _menumain.removeEventListener(AllEvents.COMICS_MELODY, ComicsMelody); _menumain.removeEventListener(AllEvents.COMICS_SOUNDS, StartComicsSounds); setupLevel(); } private function gameStart():void{ GAME_MELODY(); _hero = new TheHero(_camera, new Point((88 + (230 * Math.cos(((_palka.rotation * Math.PI) / 180)))), (253 + (230 * Math.sin(((_palka.rotation * Math.PI) / 180))))), ((_palka.rotation * Math.PI) / 180), _sila_starta); distance = _hero.Rasstojanie(); if (PhisicConstants.TUT_SLIV == 1){ _tutSliv = new tut3(); _camera.addChild(_tutSliv); _tutSliv.x = _hero.KOORD_SPRITE().x; _tutSliv.y = _hero.KOORD_SPRITE().y; }; if (_gameMenu == null){ _gameMenu = new NadpisiNaUrovne(_camera2, _money); } else { _gameMenu.vosstanovlenieMENU(_money); }; _gameMenu.addEventListener(AllEvents.PEREKLUCHENIE_MUSYKI, smenaMusyki); _gameMenu.addEventListener(AllEvents.SMENA_GRAFIKI, perekluchenieGraphiki); _gameMenu.addEventListener(AllEvents.RESTARTING, restartInPromez); _gameMenu.addEventListener(AllEvents.USKOR, startUskor); _gameMenu.addEventListener(AllEvents.GOTOSHOP, fromGameToShop); addEventListener(Event.ENTER_FRAME, render); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown); stage.addEventListener(KeyboardEvent.KEY_UP, keyUp); } private function renderPul(_arg1:Event):void{ _startOtloz--; if (_startOtloz == 0){ removeEventListener(Event.ENTER_FRAME, renderPul); gameStart(); }; } private function TUT_STRELKO():void{ if ((((((PhisicConstants.TUT_STRELKI == 1)) && (!((_hero == null))))) && ((_hero.KOORD_SPRITE().y < 250)))){ PhisicConstants.STRELKI_INT--; if (PhisicConstants.STRELKI_INT == 0){ PhisicConstants.TUT_STRELKI = 0; _info[17] = 0; PEREZAPIS(); }; }; } private function keyDown(_arg1:KeyboardEvent):void{ if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){ if (PhisicConstants.PROTIV4AC){ PhisicConstants.PROTIV4AC = false; }; PhisicConstants.PO4AC = true; TUT_STRELKO(); } else { if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){ if (PhisicConstants.PO4AC){ PhisicConstants.PO4AC = false; }; PhisicConstants.PROTIV4AC = true; TUT_STRELKO(); }; }; } private function smenaMusyki1(_arg1:AllEvents):void{ if (PhisicConstants.SOUND == false){ SoundMixer.stopAll(); }; } private function PROVERKA():void{ _money = _info[0]; PhisicConstants.AGE = _info[1]; PhisicConstants._MAXHEIGHT = _info[2]; PhisicConstants._MAXLENGTH = _info[3]; if (_info[4] == 1){ PhisicConstants.WHEEL = true; if ((((PhisicConstants.AGE == 0)) || ((PhisicConstants.AGE == 3)))){ PhisicConstants.POKUPKI[0] = 1; }; }; if (_info[5] == 1){ PhisicConstants.DEF = true; PhisicConstants.KOEF_ARMOR = 1.2; PhisicConstants.POKUPKI[1] = 1; }; if (_info[6] == 1){ PhisicConstants.SLIV = true; if ((((PhisicConstants.AGE == 2)) || ((PhisicConstants.AGE == 3)))){ PhisicConstants.POKUPKI[1] = 1; } else { PhisicConstants.POKUPKI[2] = 1; }; }; if (_info[7] == 1){ PhisicConstants.BABA = true; if ((((PhisicConstants.AGE == 2)) || ((PhisicConstants.AGE == 3)))){ PhisicConstants.POKUPKI[2] = 1; } else { PhisicConstants.POKUPKI[3] = 1; }; }; if (_info[8] == 1){ PhisicConstants.SUPER = true; PhisicConstants.POKUPKI = [1, 1, 1, 1, 1]; }; if (_info[9] == 1){ PhisicConstants.START = true; if (PhisicConstants.AGE == 1){ PhisicConstants.POKUPKI[0] = 1; } else { if (PhisicConstants.AGE == 3){ PhisicConstants.POKUPKI[3] = 1; }; }; }; if (_info[10] == 1){ PhisicConstants.SUPER_DEF = true; if (PhisicConstants.AGE == 2){ PhisicConstants.POKUPKI[3] = 1; } else { if (PhisicConstants.AGE == 4){ PhisicConstants.POKUPKI[1] = 1; }; }; }; if (_info[11] == 1){ PhisicConstants.MAXPOWER = true; PhisicConstants.POKUPKI[0] = 1; }; if (_info[12] == 1){ PhisicConstants.GAME_COMPLETE = true; }; PhisicConstants.TUT_START = _info[13]; PhisicConstants.TUT_SLIV = _info[14]; PhisicConstants.TUT_DOPSLIV = _info[15]; PhisicConstants.TUT_PEREHOD = _info[16]; PhisicConstants.TUT_STRELKI = _info[17]; } private function OchistkaUrovnia():void{ var _local1:MovieClip; var _local2:StaticPalka; var _local3:MovieClip; var _local4:MovieClip; removeEventListener(Event.ENTER_FRAME, render); stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, keyUp); PhisicConstants.PO4AC = false; PhisicConstants.PROTIV4AC = false; if (((!((_promezMenu == null))) && (_promezMenu.VISIBLE))){ OchisktaPromez(); }; if (_meteor != null){ _camera.removeChild(_meteor); _meteor = null; }; if (_tutSliv != null){ _tutSliv.parent.removeChild(_tutSliv); _tutSliv = null; }; _gameMenu.PEREZAPIS(); _info[0] = _money; PEREZAPIS(); _gameMenu.destroy(); _gameMenu.removeEventListener(AllEvents.PEREKLUCHENIE_MUSYKI, smenaMusyki); _gameMenu.removeEventListener(AllEvents.SMENA_GRAFIKI, perekluchenieGraphiki); _gameMenu.removeEventListener(AllEvents.RESTARTING, restartInPromez); _gameMenu.removeEventListener(AllEvents.USKOR, startUskor); _gameMenu.removeEventListener(AllEvents.GOTOSHOP, fromGameToShop); _camera.removeChild(_fon); _fon = null; _city11.parent.removeChild(_city11); _city12.parent.removeChild(_city12); _city21.parent.removeChild(_city21); _city22.parent.removeChild(_city22); _city31.parent.removeChild(_city31); _city32.parent.removeChild(_city32); _city11 = null; _city12 = null; _city21 = null; _city22 = null; _city31 = null; _city32 = null; if (_navodkaMov != null){ _navodkaMov.parent.removeChild(_navodkaMov); _navodkaMov = null; }; if (_blow != null){ _blow.parent.removeChild(_blow); _blow = null; }; for each (_local1 in _allToRemove) { _camera.removeChild(_local1); _local1 = null; }; _allToRemove = []; for each (_local2 in _allGrounds) { _local2.destroy(); _local2 = null; }; _allGrounds = []; for each (_local3 in _allThings) { _camera.removeChild(_local3); _local3 = null; }; _allThings = []; _allThings_int = []; for each (_local4 in _allClouds) { _camera.removeChild(_local4); _local4 = null; }; _allClouds = []; _hero.destroy(); _hero = null; _camera.x = 0; _camera2.x = 0; _camera.y = 0; _camera2.y = 0; _camera.rotation = 0; _camera2.rotation = 0; melodyCh.stop(); alarmCh.stop(); if (PhisicConstants.PEREHOD == false){ SoundMixer.stopAll(); }; trace(_camera.numChildren, _camera2.numChildren, PhisicConstants.world.GetBodyCount()); } public function ZVUKI(_arg1:int):void{ var _local2:Sound; if (PhisicConstants.SOUND){ if (_arg1 == 1){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("gui_menu_fly") as Class)); } else { if (_arg1 == 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("gui_buy") as Class)); } else { if (_arg1 == 3){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("gui_new_usk") as Class)); } else { if (_arg1 == 4){ if (PhisicConstants.AGE == 0){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_volcano") as Class)); } else { if (PhisicConstants.AGE == 1){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep2_minos") as Class)); } else { if (PhisicConstants.AGE == 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep3_fire") as Class)); } else { if (PhisicConstants.AGE == 3){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep4_gidrant") as Class)); } else { if (PhisicConstants.AGE == 4){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep5_chip") as Class)); }; }; }; }; }; } else { if (_arg1 == 5){ if (PhisicConstants.AGE == 0){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_uskor") as Class)); } else { if (PhisicConstants.AGE == 1){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep2_uskor") as Class)); } else { if (PhisicConstants.AGE == 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep3_uskor") as Class)); } else { if (PhisicConstants.AGE == 3){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep4_uskor") as Class)); } else { if (PhisicConstants.AGE == 4){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep5_uskor") as Class)); }; }; }; }; }; } else { if (_arg1 == 6){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_water") as Class)); } else { if (_arg1 == 7){ if (PhisicConstants.AGE < 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_tree") as Class)); } else { if (PhisicConstants.AGE == 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep3_rycar") as Class)); } else { if (PhisicConstants.AGE == 3){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep4_man1") as Class)); } else { if (PhisicConstants.AGE == 4){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep5_man1") as Class)); }; }; }; }; } else { if (_arg1 == 8){ if (PhisicConstants.AGE == 0){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_ptero") as Class)); } else { if (PhisicConstants.AGE == 1){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep2_gin") as Class)); } else { if (PhisicConstants.AGE == 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep3_witch") as Class)); } else { if (PhisicConstants.AGE == 3){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep4_diri") as Class)); } else { if (PhisicConstants.AGE == 4){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep5_ship") as Class)); }; }; }; }; }; } else { if (_arg1 == 9){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_croc") as Class)); } else { if (_arg1 == 10){ if (PhisicConstants.AGE == 0){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_meteor") as Class)); } else { if (PhisicConstants.AGE == 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("met03") as Class)); } else { if (PhisicConstants.AGE == 3){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("met04") as Class)); }; }; }; } else { if (_arg1 == 11){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("track_menu") as Class)); } else { if (_arg1 == 12){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("gui_between") as Class)); } else { if (_arg1 == 13){ if (PhisicConstants.AGE == 1){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep2_statue") as Class)); } else { if (PhisicConstants.AGE == 2){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep3_visel") as Class)); } else { if (PhisicConstants.AGE == 3){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep4_man2") as Class)); } else { if (PhisicConstants.AGE == 4){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep5_man2") as Class)); }; }; }; }; } else { if (_arg1 == 14){ if (PhisicConstants.AGE == 1){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep2_stone") as Class)); } else { _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep3_skull") as Class)); }; } else { if (_arg1 == 15){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("gui_blast") as Class)); } else { if (_arg1 == 16){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep5_blood") as Class)); } else { if (_arg1 == 17){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep5_laser") as Class)); } else { if (_arg1 == 18){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c1_1") as Class)); } else { if (_arg1 == 19){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c1_2") as Class)); } else { if (_arg1 == 20){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c1_3") as Class)); } else { if (_arg1 == 21){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c1_4") as Class)); } else { if (_arg1 == 22){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("bomb_sound") as Class)); } else { if (_arg1 == 23){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c2_1") as Class)); } else { if (_arg1 == 24){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c2_2") as Class)); } else { if (_arg1 == 25){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c2_3") as Class)); } else { if (_arg1 == 26){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("c2_4") as Class)); }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; _local2.play(); }; } private function setupWorld1():void{ var _local1:b2Vec2; var _local2:Boolean; _local1 = new b2Vec2(0, GRAVITY); _local2 = true; PhisicConstants.world = new b2World(_local1, _local2); PhisicConstants.world.SetContactListener(new BombContactListener()); } private function render(_arg1:Event):void{ var _local2:Number; var _local3:StaticPalka; var _local4:MovieClip; var _local5:MovieClip; var _local6:MovieClip; var _local7:Sound; var _local8:int; var _local9:int; var _local10:int; PhisicConstants.world.Step((1 / PhisicConstants.FRAME_RATE), 20, 20); PhisicConstants.world.ClearForces(); _hero.updateEveryFrame(); if (_tutSliv != null){ if (PhisicConstants.TUT_SLIV == 0){ _tutSliv.parent.removeChild(_tutSliv); _tutSliv = null; _info[14] = PhisicConstants.TUT_SLIV; PEREZAPIS(); } else { _tutSliv.x = _hero.KOORD_SPRITE().x; _tutSliv.y = _hero.KOORD_SPRITE().y; }; }; _local2 = _hero.Rasstojanie(); if (_local2 > 200){ _camera.x = (200 - _local2); _fon.x = (_local2 - 200); }; _money = (_money + (((PhisicConstants.UMNOZITEL * Math.abs((_local2 - distance))) * PhisicConstants.KOEF_DALNOSTI) / 10)); if ((((_local2 > 5000)) && ((PhisicConstants.KOEF_DALNOSTI < 1.2)))){ PhisicConstants.KOEF_DALNOSTI = 1.2; } else { if ((((_local2 > 10000)) && ((PhisicConstants.KOEF_DALNOSTI < 1.5)))){ PhisicConstants.KOEF_DALNOSTI = 1.5; } else { if ((((_local2 > 20000)) && ((PhisicConstants.KOEF_DALNOSTI < 1.8)))){ PhisicConstants.KOEF_DALNOSTI = 1.8; } else { if ((((_local2 > 35000)) && ((PhisicConstants.KOEF_DALNOSTI < 2.1)))){ PhisicConstants.KOEF_DALNOSTI = 2.1; } else { if ((((_local2 > 50000)) && ((PhisicConstants.KOEF_DALNOSTI < 2.5)))){ PhisicConstants.KOEF_DALNOSTI = 2.5; } else { if ((((_local2 > 100000)) && ((PhisicConstants.KOEF_DALNOSTI < 3)))){ PhisicConstants.KOEF_DALNOSTI = 3; } else { if ((((_local2 > 125000)) && ((PhisicConstants.KOEF_DALNOSTI < 3.5)))){ PhisicConstants.KOEF_DALNOSTI = 3.5; } else { if ((((_local2 > 150000)) && ((PhisicConstants.KOEF_DALNOSTI < 4)))){ PhisicConstants.KOEF_DALNOSTI = 4; } else { if ((((_local2 > 200000)) && ((PhisicConstants.KOEF_DALNOSTI < 5)))){ PhisicConstants.KOEF_DALNOSTI = 5; }; }; }; }; }; }; }; }; }; _currentVysota = _hero.Vysota(); if ((((_currentVysota < 240)) && ((_currentVysota > -9280)))){ _camera.y = (240 - _currentVysota); } else { if (_currentVysota <= -9280){ _camera.y = 9520; } else { if (_camera.y > 0){ _camera.y = 0; }; }; }; if (_camera.y > 0){ if ((((_camera.y == 9520)) && (!((_fon.y == -8080))))){ _fon.y = -8080; } else { if (_camera.y < 9520){ _fon.y = ((-(_camera.y) * 101) / 119); }; }; } else { if ((((_camera.y == 0)) && (!((_fon.y == 0))))){ _fon.y = 0; }; }; _camera2.x = _camera.x; _camera2.y = _camera.y; if (PhisicConstants.PEREHOD){ triaska++; if (triaska == 1){ ZVUKI(15); } else { if (triaska == 135){ _hero.NEVIDIM(); } else { if (triaska == 160){ _gameMenu.B_IN_START(); }; }; }; if (((((((triaska / 4) == Math.floor((triaska / 4)))) && ((triaska > 0)))) && ((triaska < 150)))){ _camera.rotation = (-0.2 * Math.max(0.1, (1 - Math.abs((_camera.x / 100000))))); _camera2.rotation = (-0.2 * Math.max(0.1, (1 - Math.abs((_camera.x / 100000))))); }; if ((((((triaska + 2) / 4) == Math.floor(((triaska + 2) / 4)))) && ((triaska < 150)))){ _camera.rotation = (0.2 * Math.max(0.1, (1 - Math.abs((_camera.x / 100000))))); _camera2.rotation = (0.2 * Math.max(0.1, (1 - Math.abs((_camera.x / 100000))))); }; if (triaska == 150){ _camera.rotation = 0; _camera2.rotation = 0; }; }; if ((((((PhisicConstants.AGE == 0)) || ((PhisicConstants.AGE == 2)))) || ((PhisicConstants.AGE == 3)))){ Meteor_Int--; if ((((Meteor_Int > 200)) && ((PhisicConstants.METEOR_INT > 0)))){ PhisicConstants.METEOR_INT = (PhisicConstants.METEOR_INT - 0.1); }; if ((((Meteor_Int == 220)) && ((PhisicConstants.PEREHOD == false)))){ _gameMenu.ARROW_SHOW(); PhisicConstants.METEOR = true; _gameMenu.METEOR_START(); if (PhisicConstants.SOUND){ _local7 = new ((loaderInfo.applicationDomain.getDefinition("ep1_alarm") as Class)); alarmCh = _local7.play(0, 1000); }; } else { if (Meteor_Int == 70){ _gameMenu.ARROW_DESTROY(); if (PhisicConstants.AGE == 0){ _meteor = new meteor01(); } else { if (PhisicConstants.AGE == 2){ _meteor = new meteor03(); } else { if (PhisicConstants.AGE == 3){ _meteor = new meteor04(); }; }; }; _meteor.x = _local2; if (_currentVysota < 190){ _meteor.y = (_currentVysota - 350); } else { _meteor.y = -160; }; _camera.addChild(_meteor); ZVUKI(10); alarmCh.stop(); } else { if (Meteor_Int == 0){ _camera.removeChild(_meteor); _meteor = null; Meteor_Int = (800 + Math.floor((Math.random() * 700))); PhisicConstants.METEOR = false; _gameMenu.end_METEOR(); } else { if (Meteor_Int < 70){ _meteor.x = _local2; _meteor.y = (_currentVysota - 400); if ((((((((PhisicConstants.METEOR_INT < 10)) && (!(_hero.RETURN_KUVYRK())))) && ((PhisicConstants.PEREHOD == false)))) && ((_hero.RETURN_DEAD() == false)))){ if ((((((PhisicConstants.AGE == 0)) && (_meteor.meteor.hitTestObject(_hero.teloSprite)))) || ((((PhisicConstants.AGE > 0)) && (_meteor.hitTestObject(_hero.teloSprite)))))){ _hero.METEOR_HEADSHOT(); Meteor_Int = 51; _blow = new blow_bomb(); _blow.x = _hero.KOORD_SPRITE().x; _blow.y = _hero.KOORD_SPRITE().y; _camera2.addChild(_blow); ZVUKI(22); }; }; }; }; }; }; }; for each (_local3 in _allGrounds) { if ((_local2 - 1000) > _local3.getSpriteLoc().x){ _local3.MOVING(); }; }; if (_local2 > palevoZvezd){ SozdanieNovyhZvezd(); palevoZvezd = (palevoZvezd + 1000); }; if (_local2 > palevoGidranta){ SozdanieGidrantaISobaki(); palevoGidranta = (palevoGidranta + 2500); }; _gameMenu.CurrentUpdate(_local2, _currentVysota, _money, _hero.GET_XSPEED(), _last_Vysota); _last_Vysota = _currentVysota; if (_hero._NAVEDENIE){ if (_navodkaMov == null){ _navodkaMov = new cur_flush(); _camera2.addChild(_navodkaMov); }; _navodkaMov.y = (_gameMenu.menu1.y + mouseY); _navodkaMov.x = (_gameMenu.menu1.x + mouseX); } else { if (_navodkaMov != null){ _camera2.removeChild(_navodkaMov); _navodkaMov = null; }; }; for each (_local4 in _allToRemove) { if (_local4.x < (_local2 - 350)){ _camera.removeChild(_local4); _local8 = _allToRemove.indexOf(_local4); _allToRemove.splice(_local8, 1); _local4 = null; }; }; for each (_local5 in _allThings) { if (_local5.x < (_local2 - 300)){ _camera.removeChild(_local5); _local9 = _allThings.indexOf(_local5); _allThings.splice(_local9, 1); _allThings_int.splice(_local9, 1); _local5 = null; }; }; for each (_local6 in _allClouds) { _local6.x = (_local6.x - (_local2 - distance)); if (_local6.x < (_local2 - 350)){ _camera.removeChild(_local6); _local10 = _allClouds.indexOf(_local6); _allClouds.splice(_local10, 1); _local6 = null; }; }; GOROD_MOV(_local2, _currentVysota); distance = _local2; if (PhisicConstants.PEREHOD == false){ KASANIE_VSEGO(); }; if ((((((((((((_hero.GET_XSPEED() < 0.2)) && ((_currentVysota > 395)))) && ((_hero.GET_SPEED() < 0.2)))) && ((Meteor_Int > 220)))) && ((_hero.RETURN_DEAD() == false)))) || (((_hero.RETURN_DEAD()) && ((Meteor_Int == 1)))))){ KONEC_UROVNIA(); }; if (((PhisicConstants.PEREHOD) && ((triaska == 180)))){ restartInPromez(new AllEvents(AllEvents.RESTARTING)); }; if (((!((_hero == null))) && ((_hero.KOORD_SPRITE().y > 1000)))){ KONEC_UROVNIA(); }; } private function smenaMusyki(_arg1:AllEvents):void{ var _local2:Sound; if (PhisicConstants.SOUND == false){ SoundMixer.stopAll(); alarmCh.stop(); melodyCh.stop(); } else { if (((!((_promezMenu == null))) && (_promezMenu.VISIBLE))){ PROMEZ_MELODY(); } else { if ((((Meteor_Int > 70)) && ((Meteor_Int < 200)))){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_alarm") as Class)); alarmCh = _local2.play(0, 1000); }; GAME_MELODY(); }; }; } private function KASANIE_VSEGO():void{ var _local1:MovieClip; var _local2:int; for each (_local1 in _allThings) { if (_local1.hitTestObject(_hero.teloSprite)){ _local2 = _allThings.indexOf(_local1); if (_allThings_int[_local2] == 3){ _money = (_money + (200 * PhisicConstants.UMNOZITEL)); if ((((((PhisicConstants.AGE == 0)) && (PhisicConstants.DEF))) || ((((PhisicConstants.AGE == 2)) && (PhisicConstants.SUPER_DEF))))){ _local1.gotoAndStop(11); } else { _local1.gotoAndStop((_local1.currentFrame + 1)); }; ZVUKI(8); if (PhisicConstants.SUPER_DEF){ SUPER_DEF_EFFECT(); } else { _hero.UDAR_OB_MUHU(1); if (PhisicConstants.AGE == 4){ _hero.BLOOD(); ZVUKI(16); }; }; } else { if (_allThings_int[_local2] == 1){ _money = (_money + (500 * PhisicConstants.UMNOZITEL)); _hero.UDAR_OB_GIDRANT(); _local1.gotoAndStop((_local1.currentFrame + 1)); ZVUKI(4); } else { if (_allThings_int[_local2] == 2){ _money = (_money + (1000 * PhisicConstants.UMNOZITEL)); _local1.visible = false; ZVUKI(3); _gameMenu.TAKE_SLIV(); _hero.DOP_SLIV(); if (PhisicConstants.TUT_DOPSLIV == 1){ PhisicConstants.TUT_DOPSLIV = 0; _info[15] = 0; PEREZAPIS(); }; } else { if ((((_allThings_int[_local2] == 4)) || ((_allThings_int[_local2] == 5)))){ _money = (_money + (200 * PhisicConstants.UMNOZITEL)); if ((((PhisicConstants.AGE == 0)) || ((_local1.currentFrame == 1)))){ ZVUKI(7); } else { ZVUKI(13); }; _local1.gotoAndPlay((_local1.currentFrame + 1)); if (PhisicConstants.SUPER_DEF){ SUPER_DEF_EFFECT(); } else { _hero.UDAR_OB_MUHU(1); if (PhisicConstants.AGE == 4){ _hero.BLOOD(); ZVUKI(16); }; }; } else { if (_allThings_int[_local2] == 6){ _money = (_money + (150 * PhisicConstants.UMNOZITEL)); _hero.UDAR_OB_MUHU(1.2); _local1.gotoAndPlay((_local1.currentFrame + 1)); ZVUKI(6); } else { if (_allThings_int[_local2] == 7){ _money = (_money + (150 * PhisicConstants.UMNOZITEL)); _local1.gotoAndPlay((_local1.currentFrame + 1)); ZVUKI(9); if (PhisicConstants.SUPER_DEF){ SUPER_DEF_EFFECT(); } else { _hero.UDAR_OB_MUHU(0.7); if (PhisicConstants.AGE == 4){ _hero.BLOOD(); ZVUKI(16); }; }; } else { if (_allThings_int[_local2] == 8){ _money = (_money + (150 * PhisicConstants.UMNOZITEL)); _local1.gotoAndStop((_local1.currentFrame + 1)); _hero.UDAR_O_KAMEN(); ZVUKI(14); }; }; }; }; }; }; }; _allThings.splice(_local2, 1); _allThings_int.splice(_local2, 1); _allToRemove.push(_local1); }; }; } private function GAME_MELODY():void{ var _local1:Sound; if (PhisicConstants.SOUND){ melodyCh.stop(); if (PhisicConstants.AGE == 0){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("track_01") as Class)); } else { if (PhisicConstants.AGE == 1){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("track_02") as Class)); } else { if (PhisicConstants.AGE == 2){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("track_03") as Class)); } else { if (PhisicConstants.AGE == 3){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("track_04") as Class)); } else { if (PhisicConstants.AGE == 4){ _local1 = new ((loaderInfo.applicationDomain.getDefinition("track_05") as Class)); }; }; }; }; }; melodyCh = _local1.play(0, 1000); }; } private function mouseClick(_arg1:MouseEvent):void{ var _local2:Sound; if (_tutStart != null){ _tutStart.parent.removeChild(_tutStart); _tutStart = null; PhisicConstants.TUT_START = 0; _info[13] = 0; PEREZAPIS(); }; removeEventListener(MouseEvent.MOUSE_DOWN, mouseClick); removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove); removeEventListener(Event.ENTER_FRAME, renderBeforeStart); _camera.removeChild(_startMovie); _startMovie = null; _palka.gotoAndPlay(2); _allToRemove.push(_launch); _allToRemove.push(_palka); if (PhisicConstants.SOUND){ _local2 = new ((loaderInfo.applicationDomain.getDefinition("ep1_shoot") as Class)); _local2.play(0, 0, new SoundTransform((1 - (Math.abs((25 - _sila_starta)) / 50)), 0)); }; _startOtloz = 10; addEventListener(Event.ENTER_FRAME, renderPul); } private function fromGameToShop(_arg1:AllEvents):void{ KONEC_UROVNIA(); } private function OBNULENIE_BLAG():void{ PhisicConstants.WHEEL = false; PhisicConstants.DEF = false; PhisicConstants.SLIV = false; PhisicConstants.BABA = false; PhisicConstants.SUPER = false; PhisicConstants.START = false; PhisicConstants.SUPER_DEF = false; PhisicConstants.MAXPOWER = false; PhisicConstants.KOEF_ARMOR = 1; PhisicConstants.POKUPKI = [0, 0, 0, 0, 0]; PhisicConstants.SET_SHOP(); _money = 0; if (_promezMenu != null){ _promezMenu.TEXT_1(); }; _info = [0, PhisicConstants.AGE, PhisicConstants._MAXHEIGHT, PhisicConstants._MAXLENGTH, 0, 0, 0, 0, 0, 0, 0, 0, 0, PhisicConstants.TUT_START, PhisicConstants.TUT_SLIV]; if (PhisicConstants.GAME_COMPLETE){ _info[12] = 1; }; PEREZAPIS(); } private function PokupkaVpromez(_arg1:AllEvents):void{ PEREZAPIS(); ZVUKI(2); } } }//package
Section 294
//gidrant (gidrant) package { import flash.display.*; public dynamic class gidrant extends MovieClip { public function gidrant(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10); } function frame10(){ stop(); } function frame3(){ stop(); } function frame6(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame9(){ stop(); } function frame8(){ stop(); } function frame2(){ stop(); } } }//package
Section 295
//ground1000 (ground1000) package { import flash.display.*; public dynamic class ground1000 extends MovieClip { public function ground1000(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 296
//gui_between (gui_between) package { import flash.media.*; public dynamic class gui_between extends Sound { } }//package
Section 297
//gui_blast (gui_blast) package { import flash.media.*; public dynamic class gui_blast extends Sound { } }//package
Section 298
//gui_buy (gui_buy) package { import flash.media.*; public dynamic class gui_buy extends Sound { } }//package
Section 299
//gui_click (gui_click) package { import flash.media.*; public dynamic class gui_click extends Sound { } }//package
Section 300
//gui_menu_click (gui_menu_click) package { import flash.media.*; public dynamic class gui_menu_click extends Sound { } }//package
Section 301
//gui_menu_fly (gui_menu_fly) package { import flash.media.*; public dynamic class gui_menu_fly extends Sound { } }//package
Section 302
//gui_new_usk (gui_new_usk) package { import flash.media.*; public dynamic class gui_new_usk extends Sound { } }//package
Section 303
//her01_panel_usk1 (her01_panel_usk1) package { import flash.display.*; public dynamic class her01_panel_usk1 extends MovieClip { public var but_usk1:SimpleButton; public function her01_panel_usk1(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package
Section 304
//her02_panel_usk1 (her02_panel_usk1) package { import flash.display.*; public dynamic class her02_panel_usk1 extends MovieClip { public var but_usk1:SimpleButton; public function her02_panel_usk1(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package
Section 305
//her02wheel16 (her02wheel16) package { import flash.display.*; public dynamic class her02wheel16 extends MovieClip { } }//package
Section 306
//her03wheel16 (her03wheel16) package { import flash.display.*; public dynamic class her03wheel16 extends MovieClip { } }//package
Section 307
//her04wheel10 (her04wheel10) package { import flash.display.*; public dynamic class her04wheel10 extends MovieClip { } }//package
Section 308
//her04wheel16 (her04wheel16) package { import flash.display.*; public dynamic class her04wheel16 extends MovieClip { } }//package
Section 309
//her05wheel16 (her05wheel16) package { import flash.display.*; public dynamic class her05wheel16 extends MovieClip { } }//package
Section 310
//hero01 (hero01) package { import flash.display.*; public dynamic class hero01 extends MovieClip { public var usk1:MovieClip; public var dubina:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; public var hair:MovieClip; } }//package
Section 311
//hero2 (hero2) package { import flash.display.*; public dynamic class hero2 extends MovieClip { public var up2:MovieClip; public var wing:MovieClip; public var usk1:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; } }//package
Section 312
//hero3 (hero3) package { import flash.display.*; public dynamic class hero3 extends MovieClip { public var usk1:MovieClip; public var hand:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; } }//package
Section 313
//hero4 (hero4) package { import flash.display.*; public dynamic class hero4 extends MovieClip { public var usk1:MovieClip; public var plane:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; } }//package
Section 314
//hero5 (hero5) package { import flash.display.*; public dynamic class hero5 extends MovieClip { public var blood:MovieClip; public var up2:MovieClip; public var usk1:MovieClip; public var sliv2:MovieClip; public var sliv1:MovieClip; public var baba:MovieClip; public var laser:MovieClip; } }//package
Section 315
//launcher (launcher) package { import flash.display.*; public dynamic class launcher extends MovieClip { public function launcher(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 316
//main_menu (main_menu) package { import flash.display.*; public dynamic class main_menu extends MovieClip { public var armor:SimpleButton; public var pitergames:SimpleButton; public var start:MovieClip; public var playmore:SimpleButton; public var clear:SimpleButton; public var sound_menu:MovieClip; public var facebook:SimpleButton; public var govno:MovieClip; public var cred_panel:MovieClip; public var epoques:MovieClip; public function main_menu(){ addFrameScript(69, frame70); } function frame70(){ stop(); } } }//package
Section 317
//MAIN_MENU (MAIN_MENU) package { import flash.display.*; import flash.events.*; import flash.media.*; import flash.net.*; public class MAIN_MENU extends EventDispatcher { private var _parent:DisplayObjectContainer; private var _fade_int:int;// = 0 private var _comics:MovieClip;// = null private var SoundNumber:int;// = 0 private var _fade:Sprite;// = null private var table:MovieClip; public function MAIN_MENU(_arg1:DisplayObjectContainer){ _fade = null; _fade_int = 0; _comics = null; SoundNumber = 0; super(); _parent = _arg1; table = new main_menu(); _parent.addChild(table); if (PhisicConstants.GAME_COMPLETE){ table.epoques.gotoAndStop(2); }; table.addEventListener(MouseEvent.CLICK, mdLis); table.sound_menu.sound.buttonMode = true; table.sound_menu.quality.buttonMode = true; table.start.buttonMode = true; CORRECT_SOUND_PANEL(); table.armor.addEventListener(MouseEvent.MOUSE_DOWN, armor1); table.playmore.addEventListener(MouseEvent.MOUSE_DOWN, armor1); table.facebook.addEventListener(MouseEvent.MOUSE_DOWN, armor2); } public function UDALENIE_COMICSA():void{ if (_comics != null){ _parent.removeChild(_comics); _comics = null; }; } private function armor2(_arg1:MouseEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://www.facebook.com/ArmorGames"); navigateToURL(_local2); } private function armor1(_arg1:MouseEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://armorgames.com"); navigateToURL(_local2); } private function nextComics(_arg1:MouseEvent):void{ var _local2:Sound; if (PhisicConstants.SOUND){ _local2 = new transp_sound(); _local2.play(); SoundNumber = (_comics.currentFrame + 1); dispatchEvent(new AllEvents(AllEvents.COMICS_SOUNDS)); }; if (_comics.currentFrame < 3){ if (_comics.currentFrame == 1){ table.visible = false; }; _comics.gotoAndStop((_comics.currentFrame + 1)); _comics.com_buts.gotoAndPlay(1); } else { PhisicConstants.KADR4 = true; _comics.com_buts.skip.removeEventListener(MouseEvent.MOUSE_DOWN, skipComics); _comics.com_buts.next.removeEventListener(MouseEvent.MOUSE_DOWN, nextComics); _comics.gotoAndStop(4); _comics.com_buts2.gotoAndPlay(2); _comics.com_buts2.next.addEventListener(MouseEvent.MOUSE_DOWN, endComics); dispatchEvent(new AllEvents(AllEvents.START_PLAYING)); }; } private function skipComics(_arg1:MouseEvent):void{ var _local2:Sound; SoundMixer.stopAll(); if (PhisicConstants.SOUND){ _local2 = new gui_menu_click(); _local2.play(); }; _comics.com_buts.skip.removeEventListener(MouseEvent.MOUSE_DOWN, skipComics); _comics.com_buts.next.removeEventListener(MouseEvent.MOUSE_DOWN, nextComics); FADES(); } private function CORRECT_SOUND_PANEL():void{ if (PhisicConstants.SOUND){ table.sound_menu.sound.gotoAndStop(1); } else { table.sound_menu.sound.gotoAndStop(2); }; table.sound_menu.quality.gotoAndStop(PhisicConstants.GRAFIKA); } private function SoundClick():void{ var _local1:Sound; if (PhisicConstants.SOUND){ _local1 = new gui_click(); _local1.play(); }; } private function TRANS_S():void{ var _local1:Sound; SoundMixer.stopAll(); if (PhisicConstants.SOUND){ if (PhisicConstants.AGE == 0){ _local1 = new transp_sound(); } else { _local1 = new gui_menu_click(); }; _local1.play(); }; } public function STOP_COMPLETE():void{ if (table.epoques.currentFrame == 2){ table.epoques.gotoAndStop(1); }; } private function FADES():void{ table.removeEventListener(MouseEvent.CLICK, mdLis); table.armor.removeEventListener(MouseEvent.MOUSE_DOWN, armor1); table.playmore.removeEventListener(MouseEvent.MOUSE_DOWN, armor1); table.facebook.removeEventListener(MouseEvent.MOUSE_DOWN, armor2); _fade_int = 20; _fade = new fade_in(); _parent.addChild(_fade); table.addEventListener(Event.ENTER_FRAME, renderFade); } public function destroy():void{ table.removeEventListener(MouseEvent.CLICK, mdLis); table.armor.removeEventListener(MouseEvent.MOUSE_DOWN, armor1); table.playmore.removeEventListener(MouseEvent.MOUSE_DOWN, armor1); table.facebook.removeEventListener(MouseEvent.MOUSE_DOWN, armor2); _parent.removeChild(table); if (_fade != null){ _parent.removeChild(_fade); _fade = null; }; if (((!((_comics == null))) && ((PhisicConstants.KADR4 == false)))){ _parent.removeChild(_comics); _comics = null; }; } public function SOUND_NUMBER():int{ return (SoundNumber); } private function renderFade(_arg1:Event):void{ _fade_int--; if (_fade_int == 0){ table.removeEventListener(Event.ENTER_FRAME, renderFade); dispatchEvent(new AllEvents(AllEvents.START_PLAYING)); }; } private function Start_Comics():void{ dispatchEvent(new AllEvents(AllEvents.COMICS_MELODY)); table.armor.removeEventListener(MouseEvent.MOUSE_DOWN, armor1); table.playmore.removeEventListener(MouseEvent.MOUSE_DOWN, armor1); table.facebook.removeEventListener(MouseEvent.MOUSE_DOWN, armor2); _comics = new comics(); _parent.addChild(_comics); _comics.gotoAndStop(1); _comics.com_buts.skip.addEventListener(MouseEvent.MOUSE_DOWN, skipComics); _comics.com_buts.next.addEventListener(MouseEvent.MOUSE_DOWN, nextComics); } private function endComics(_arg1:MouseEvent):void{ var _local2:Sound; if (PhisicConstants.SOUND){ _local2 = new gui_menu_click(); _local2.play(); }; _comics.com_buts2.next.removeEventListener(MouseEvent.MOUSE_DOWN, endComics); _comics.gotoAndStop(5); PhisicConstants.COMICS_OTCHET = 1; } public function Vosstanovlenie_Menu():void{ _parent.addChild(table); table.visible = true; table.gotoAndPlay(1); table.govno.gotoAndPlay(1); if (PhisicConstants.GAME_COMPLETE){ table.epoques.gotoAndStop(2); }; table.addEventListener(MouseEvent.CLICK, mdLis); table.armor.addEventListener(MouseEvent.MOUSE_DOWN, armor1); table.playmore.addEventListener(MouseEvent.MOUSE_DOWN, armor1); table.facebook.addEventListener(MouseEvent.MOUSE_DOWN, armor2); CORRECT_SOUND_PANEL(); } private function mdLis(_arg1:MouseEvent):void{ var _local2:Sound; var _local3:Sound; var _local4:Sound; var _local5:URLRequest; if (((table.start.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((_comics == null)))){ if (PhisicConstants.AGE == 0){ SoundMixer.stopAll(); if (PhisicConstants.SOUND){ _local2 = new transp_sound(); _local2.play(); }; Start_Comics(); } else { SoundMixer.stopAll(); if (PhisicConstants.SOUND){ _local3 = new gui_menu_click(); _local3.play(); }; FADES(); }; } else { if (((table.clear.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((_comics == null)))){ dispatchEvent(new AllEvents(AllEvents.CLEAR)); SoundClick(); } else { if (((PhisicConstants.GAME_COMPLETE) && (table.epoques.e1.hitTestPoint(_arg1.stageX, _arg1.stageY, false)))){ PhisicConstants.AGE = 0; PhisicConstants.SET_SHOP(); TRANS_S(); Start_Comics(); } else { if (((PhisicConstants.GAME_COMPLETE) && (table.epoques.e2.hitTestPoint(_arg1.stageX, _arg1.stageY, false)))){ PhisicConstants.AGE = 1; PhisicConstants.SET_SHOP(); TRANS_S(); FADES(); } else { if (((PhisicConstants.GAME_COMPLETE) && (table.epoques.e3.hitTestPoint(_arg1.stageX, _arg1.stageY, false)))){ PhisicConstants.AGE = 2; PhisicConstants.SET_SHOP(); TRANS_S(); FADES(); } else { if (((PhisicConstants.GAME_COMPLETE) && (table.epoques.e4.hitTestPoint(_arg1.stageX, _arg1.stageY, false)))){ PhisicConstants.AGE = 3; PhisicConstants.SET_SHOP(); TRANS_S(); FADES(); } else { if (((PhisicConstants.GAME_COMPLETE) && (table.epoques.e5.hitTestPoint(_arg1.stageX, _arg1.stageY, false)))){ PhisicConstants.AGE = 4; PhisicConstants.SET_SHOP(); TRANS_S(); FADES(); } else { if (((table.sound_menu.sound.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((_comics == null)))){ if (PhisicConstants.SOUND){ PhisicConstants.SOUND = false; table.sound_menu.sound.gotoAndStop(2); } else { PhisicConstants.SOUND = true; table.sound_menu.sound.gotoAndStop(1); }; dispatchEvent(new AllEvents(AllEvents.PEREKLUCHENIE_MUSYKI)); } else { if (((table.sound_menu.quality.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((_comics == null)))){ PhisicConstants.GRAFIKA++; if (PhisicConstants.GRAFIKA == 4){ PhisicConstants.GRAFIKA = 1; }; table.sound_menu.quality.gotoAndStop(PhisicConstants.GRAFIKA); dispatchEvent(new AllEvents(AllEvents.SMENA_GRAFIKI)); } else { if (((table.pitergames.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((_comics == null)))){ if (table.cred_panel.currentFrame == 1){ table.cred_panel.gotoAndPlay(2); } else { table.cred_panel.gotoAndPlay(18); }; if (PhisicConstants.SOUND){ _local4 = new transp_sound(); _local4.play(); }; } else { if (((table.cred_panel.cred_panel_in.pitergames.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((_comics == null)))){ _local5 = new URLRequest("http://www.pitergames.com"); navigateToURL(_local5); SoundClick(); }; }; }; }; }; }; }; }; }; }; }; } } }//package
Section 318
//menu_sliv2 (menu_sliv2) package { import flash.display.*; public dynamic class menu_sliv2 extends MovieClip { public var sound:MovieClip; public var quality:MovieClip; public function menu_sliv2(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package
Section 319
//met03 (met03) package { import flash.media.*; public dynamic class met03 extends Sound { } }//package
Section 320
//met04 (met04) package { import flash.media.*; public dynamic class met04 extends Sound { } }//package
Section 321
//meteor01 (meteor01) package { import flash.display.*; public dynamic class meteor01 extends MovieClip { public var meteor:MovieClip; public function meteor01(){ addFrameScript(69, frame70); } function frame70(){ stop(); } } }//package
Section 322
//meteor03 (meteor03) package { import flash.display.*; public dynamic class meteor03 extends MovieClip { public function meteor03(){ addFrameScript(69, frame70); } function frame70(){ stop(); stop(); } } }//package
Section 323
//meteor04 (meteor04) package { import flash.display.*; public dynamic class meteor04 extends MovieClip { public function meteor04(){ addFrameScript(69, frame70); } function frame70(){ stop(); stop(); } } }//package
Section 324
//NadpisiNaUrovne (NadpisiNaUrovne) package { import flash.display.*; import flash.events.*; import flash.media.*; public class NadpisiNaUrovne extends EventDispatcher { private var _outMov:MovieClip;// = null public var _maxheight:Number;// = 0 private var b_in:Sprite;// = null private var _menuSliv:MovieClip; private var _numSliv:int;// = 3 public var menu1:MovieClip; private var _outBoo:Boolean;// = false private var Spidometr:MovieClip;// = null private var Meteor_Click:MovieClip;// = null private var b_betv:Sprite;// = null private var _parent:DisplayObjectContainer; public var _maxlength:Number;// = 0 private var Uskor_mov:MovieClip;// = null private var Arrow:MovieClip;// = null public function NadpisiNaUrovne(_arg1:DisplayObjectContainer, _arg2:Number){ _numSliv = 3; _maxlength = 0; _maxheight = 0; Uskor_mov = null; Arrow = null; Meteor_Click = null; Spidometr = null; b_betv = null; b_in = null; _outBoo = false; _outMov = null; super(); _parent = _arg1; menu1 = new game_menu(); _menuSliv = new menu_sliv2(); _menuSliv.sound.buttonMode = true; _menuSliv.quality.buttonMode = true; vosstanovlenieMENU(_arg2); } public function CurrentUpdate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{ var _local6:int; var _local7:Sound; var _local8:int; var _local9:Sound; var _local10:Sound; if (b_betv != null){ b_betv.x = (_arg1 - 60); b_betv.y = (_arg2 - 60); }; if (_arg2 < -9520){ if (_outBoo == false){ _outBoo = true; _outMov = new arrow_out(); _parent.addChild(_outMov); }; if (((((_arg2 - _arg5) > 0)) && ((_outMov.currentFrame == 1)))){ _outMov.gotoAndPlay(2); } else { if (((((_arg2 - _arg5) < 0)) && ((_outMov.currentFrame == 2)))){ _outMov.gotoAndPlay(1); }; }; } else { if (_outBoo){ _outBoo = false; _parent.removeChild(_outMov); _outMov = null; }; }; if ((((_arg2 < -300)) && ((PhisicConstants.BONUS_PRIZEM == false)))){ PhisicConstants.BONUS_PRIZEM = true; }; menu1.tf_length.text = (Math.floor((_arg1 / 5)) + ""); menu1.tf_heigth.text = (Math.floor(((-(_arg2) + 396) / 5)) + ""); if (((-(_arg2) + 396) / 5) > _maxheight){ _maxheight = Math.floor(((-(_arg2) + 396) / 5)); menu1.tf_maxheigth.text = (_maxheight + ""); }; if (_arg2 > 396){ _arg2 = 396; menu1.tf_heigth.text = (Math.floor((-(_arg2) + 396)) + ""); } else { if (_arg2 < -9280){ _arg2 = -9280; }; }; if ((_arg1 / 5) > _maxlength){ _maxlength = Math.floor((_arg1 / 5)); menu1.tf_maxlength.text = (_maxlength + ""); }; menu1.tf_money.text = ("$" + Math.floor(_arg3)); if (_arg1 > 200){ menu1.x = (_arg1 - 200); }; if (_arg2 < 240){ menu1.y = (_arg2 - 240); } else { if (menu1.y != 0){ menu1.y = 0; }; }; if (_outBoo){ _outMov.x = menu1.x; _outMov.y = menu1.y; }; if (b_in != null){ b_in.x = menu1.x; b_in.y = menu1.y; }; Spidometr.x = menu1.x; Spidometr.y = menu1.y; if (PhisicConstants.PEREHOD == false){ if ((Spidometr.currentFrame + 1) < ((_arg4 * 100) / PhisicConstants.SPEED_ARR[PhisicConstants.AGE])){ Spidometr.gotoAndStop((Spidometr.currentFrame + 1)); } else { if ((Spidometr.currentFrame - 1) > ((_arg4 * 100) / PhisicConstants.SPEED_ARR[PhisicConstants.AGE])){ Spidometr.gotoAndStop((Spidometr.currentFrame - 1)); }; }; if ((((Spidometr.currentFrame == 100)) && ((PhisicConstants.PEREHOD == false)))){ trace("newEra"); PhisicConstants.PEREHOD = true; Spidometr.gotoAndStop(101); b_betv = new blast_between(); _parent.addChild(b_betv); }; }; _menuSliv.x = menu1.x; _menuSliv.y = menu1.y; if (_numSliv > PhisicConstants.NUMBER_SLIV){ _numSliv = PhisicConstants.NUMBER_SLIV; _menuSliv.gotoAndStop((4 - _numSliv)); }; if (!(((Uskor_mov == null)) || ((Uskor_mov.visible == false)))){ Uskor_mov.x = menu1.x; Uskor_mov.y = menu1.y; }; if (Arrow != null){ Arrow.y = menu1.y; Arrow.x = _arg1; }; if (((!((Meteor_Click == null))) && (PhisicConstants.METEOR))){ Meteor_Click.x = menu1.x; Meteor_Click.y = menu1.y; }; if (PhisicConstants.PREZEM > 0){ if (PhisicConstants.SOUND){ if (PhisicConstants.PREZEM == 1){ _local7 = new bon_good(); } else { _local7 = new bon_perf(); }; _local7.play(); }; if (PhisicConstants.PREZEM == 1){ _local6 = (500 * (PhisicConstants.AGE + 1)); menu1.bon_good.gotoAndPlay(2); menu1.bon_good.bonus.bonus_money.text = ("+$" + _local6); game27._money = (game27._money + _local6); } else { if (PhisicConstants.PREZEM == 2){ _local6 = (1000 * (PhisicConstants.AGE + 1)); menu1.bon_perf.gotoAndPlay(2); menu1.bon_perf.bonus.bonus_money.text = ("+$" + _local6); game27._money = (game27._money + _local6); }; }; PhisicConstants.PREZEM = 0; }; if (PhisicConstants.VRASCH_PAYPAL > 0){ PhisicConstants.VRASCH_PAYPAL = 0; _local8 = (2500 * (PhisicConstants.AGE + 1)); game27._money = (game27._money + _local8); menu1.bon_360.gotoAndPlay(2); menu1.bon_360.bonus.bonus_money.text = ("+$" + _local8); if (PhisicConstants.SOUND){ _local9 = new bon_360(); _local9.play(); }; }; if ((((((PhisicConstants.MINIMUM_COST < game27._money)) && ((PhisicConstants.MINIMUM_COST > 0)))) && ((menu1.newitem.currentFrame == 1)))){ menu1.newitem.gotoAndPlay(2); if (PhisicConstants.SOUND){ _local10 = new entershop_sound(); _local10.play(); }; }; if ((((menu1.t2.currentFrame == 2)) && ((PhisicConstants.TUT_STRELKI == 0)))){ menu1.t2.gotoAndStop(1); }; } private function clickUskor(_arg1:MouseEvent):void{ if (PhisicConstants.PEREHOD == false){ Uskor_mov.but_usk1.removeEventListener(MouseEvent.MOUSE_DOWN, clickUskor); dispatchEvent(new AllEvents(AllEvents.USKOR)); Uskor_mov.visible = false; }; } public function PEREZAPIS():void{ if (_maxheight > PhisicConstants._MAXHEIGHT){ PhisicConstants._MAXHEIGHT = _maxheight; game27._info[2] = _maxheight; }; if (_maxlength > PhisicConstants._MAXLENGTH){ PhisicConstants._MAXLENGTH = _maxlength; game27._info[3] = _maxlength; }; } public function end_METEOR():void{ if (Meteor_Click.visible == true){ Meteor_Click.click_button.removeEventListener(MouseEvent.MOUSE_DOWN, clickMeteor); Meteor_Click.visible = false; }; } public function ARROW_SHOW():void{ Arrow = new arrow_danger(); Arrow.x = (menu1.x + 200); Arrow.y = menu1.y; _parent.addChild(Arrow); } public function B_IN_START():void{ b_in = new blast_in(); _parent.addChild(b_in); } private function restartInTable(_arg1:MouseEvent):void{ var _local2:Sound; if (PhisicConstants.PEREHOD == false){ if (PhisicConstants.SOUND){ _local2 = new gui_click(); _local2.play(); }; dispatchEvent(new AllEvents(AllEvents.RESTARTING)); }; } public function ARROW_DESTROY():void{ if (Arrow != null){ _parent.removeChild(Arrow); Arrow = null; }; } private function CORRECT_SOUND_PANEL():void{ if (PhisicConstants.SOUND){ _menuSliv.sound.gotoAndStop(1); } else { _menuSliv.sound.gotoAndStop(2); }; _menuSliv.quality.gotoAndStop(PhisicConstants.GRAFIKA); } public function vosstanovlenieMENU(_arg1:Number):void{ _parent.addChild(menu1); menu1.x = 0; menu1.y = 0; menu1.tf_length.text = (0 + ""); menu1.tf_heigth.text = (0 + ""); menu1.tf_money.text = ("$" + Math.floor(_arg1)); menu1.restart.addEventListener(MouseEvent.CLICK, restartInTable); menu1.newitem.shop.addEventListener(MouseEvent.CLICK, endLevel); _maxheight = PhisicConstants._MAXHEIGHT; _maxlength = PhisicConstants._MAXLENGTH; menu1.tf_maxlength.text = (_maxlength + ""); menu1.tf_maxheigth.text = (_maxheight + ""); _numSliv = 3; _menuSliv.x = 0; _menuSliv.y = 0; _parent.addChild(_menuSliv); _menuSliv.gotoAndStop(1); _menuSliv.addEventListener(MouseEvent.MOUSE_DOWN, mdLis); Spidometr = new speedometr01(); Spidometr.x = 0; Spidometr.y = 0; _parent.addChild(Spidometr); CORRECT_SOUND_PANEL(); if (PhisicConstants.SUPER){ Uskor_mov = new her01_panel_usk1(); Uskor_mov.x = 0; Uskor_mov.y = 0; _parent.addChild(Uskor_mov); Uskor_mov.but_usk1.addEventListener(MouseEvent.MOUSE_DOWN, clickUskor); if (PhisicConstants.TUT_PEREHOD == 1){ }; }; if (PhisicConstants.TUT_STRELKI == 1){ menu1.t2.gotoAndStop(2); }; } public function MOZNO_NEW_USKOR():Boolean{ if ((((Uskor_mov == null)) || ((Uskor_mov.visible == false)))){ return (true); }; return (false); } public function ARROW_INVISIBLE():void{ if (Arrow != null){ Arrow.visible = false; }; } public function TAKE_USKOR():void{ if (Uskor_mov.visible == false){ if (PhisicConstants.AGE == 0){ Uskor_mov.but_usk1.addEventListener(MouseEvent.MOUSE_DOWN, clickUskor); Uskor_mov.gotoAndPlay(1); Uskor_mov.visible = true; }; }; } private function clickMeteor(_arg1:MouseEvent):void{ var _local2:Sound; if (PhisicConstants.SOUND){ _local2 = new gui_click(); _local2.play(); }; if (PhisicConstants.METEOR_INT < 10){ PhisicConstants.METEOR_INT++; if (PhisicConstants.METEOR_INT == 10){ Meteor_Click.click_button.removeEventListener(MouseEvent.MOUSE_DOWN, clickMeteor); Meteor_Click.visible = false; }; }; } public function METEOR_START():void{ if (Meteor_Click == null){ Meteor_Click = new avoid_but(); _parent.addChild(Meteor_Click); } else { Meteor_Click.visible = true; }; PhisicConstants.METEOR_INT = 0; Meteor_Click.x = menu1.x; Meteor_Click.y = menu1.y; Meteor_Click.click_button.addEventListener(MouseEvent.MOUSE_DOWN, clickMeteor); } private function endLevel(_arg1:MouseEvent):void{ if (menu1.newitem.currentFrame > 1){ menu1.newitem.shop.removeEventListener(MouseEvent.CLICK, endLevel); dispatchEvent(new AllEvents(AllEvents.GOTOSHOP)); }; } public function destroy():void{ _parent.removeChild(menu1); _parent.removeChild(_menuSliv); _menuSliv.removeEventListener(MouseEvent.MOUSE_DOWN, mdLis); menu1.restart.removeEventListener(MouseEvent.CLICK, restartInTable); menu1.newitem.shop.removeEventListener(MouseEvent.CLICK, endLevel); menu1.newitem.gotoAndStop(1); if (Uskor_mov != null){ Uskor_mov.but_usk1.removeEventListener(MouseEvent.MOUSE_DOWN, clickUskor); Uskor_mov.parent.removeChild(Uskor_mov); Uskor_mov = null; }; ARROW_DESTROY(); if (Meteor_Click != null){ _parent.removeChild(Meteor_Click); Meteor_Click.click_button.removeEventListener(MouseEvent.MOUSE_DOWN, clickMeteor); Meteor_Click = null; }; _parent.removeChild(Spidometr); Spidometr = null; if (b_betv != null){ _parent.removeChild(b_betv); b_betv = null; }; if (b_in != null){ _parent.removeChild(b_in); b_in = null; }; if (_outBoo){ _outBoo = false; _parent.removeChild(_outMov); _outMov = null; }; menu1.t2.gotoAndStop(1); } public function TAKE_SLIV():void{ PhisicConstants.NUMBER_SLIV = 3; _numSliv = 3; _menuSliv.gotoAndStop(1); if (PhisicConstants.TUT_DOPSLIV == 1){ menu1.t4.gotoAndStop(2); }; } private function mdLis(_arg1:MouseEvent):void{ if (_menuSliv.sound.hitTestPoint(_arg1.stageX, _arg1.stageY, false)){ if (PhisicConstants.SOUND){ PhisicConstants.SOUND = false; _menuSliv.sound.gotoAndStop(2); } else { PhisicConstants.SOUND = true; _menuSliv.sound.gotoAndStop(1); }; dispatchEvent(new AllEvents(AllEvents.PEREKLUCHENIE_MUSYKI)); }; if (_menuSliv.quality.hitTestPoint(_arg1.stageX, _arg1.stageY, false)){ PhisicConstants.GRAFIKA++; if (PhisicConstants.GRAFIKA == 4){ PhisicConstants.GRAFIKA = 1; }; _menuSliv.quality.gotoAndStop(PhisicConstants.GRAFIKA); dispatchEvent(new AllEvents(AllEvents.SMENA_GRAFIKI)); }; } } }//package
Section 325
//PhisicConstants (PhisicConstants) package { import Box2D.Dynamics.*; public class PhisicConstants { public static const WHEEL_COST:Array = [2000, 0, 0, 10000, 0]; public static const FRAME_RATE:Number = 25; public static const KOEFF:Number = 0.5; public static const RATIO:Number = 50; public static var SUPER_DEF:Boolean = false; public static var PROTIV4AC:Boolean = false; public static var MUSIC:Boolean = true; public static var GRAFIKA:int = 1; public static var TUT_SLIV:int = 1; public static var PREZEM:int = 0; public static var MAXPOWER:Boolean = false; public static var SPEED_ARR:Array = [45, 50, 55, 60, 65]; public static var MAXPOWER_COST:Array = [0, 0, 5000, 0, 20000]; public static var SLIV_COST:Array = [4000, 7000, 15000, 20000, 30000]; public static var SUPER_COST:Array = [10000, 25000, 50000, 60000, 100000]; public static var PEREHOD:Boolean = false; public static var UDAR_ARRAY:Array = [5, 6, 7, 8, 9]; public static var WHEEL:Boolean = false; public static var START:Boolean = false; public static var SLIV:Boolean = false; public static var SUPER_DEF_COST:Array = [0, 0, 20000, 0, 40000]; public static var KADR4:Boolean = false; public static var SUPER:Boolean = false; public static var POKUPKI:Array = [0, 0, 0, 0, 0]; public static var KOEF_ARMOR:Number = 1; public static var MAX_SPEED:Number = 0; public static var MINIMUM_COST:int = 0; public static var NUMBER_SLIV:int = 3; public static var TUT_STRELKI:int = 1; private static var _world:b2World; public static var KOEF_DALNOSTI:Number = 1; public static var ANGLE_SPEED:Number = 1; public static var TUT_DOPSLIV:int = 1; public static var ZERO:Boolean = true; public static var START_COST:Array = [0, 4000, 0, 45000, 0]; public static var _MAXLENGTH:Number = 0; public static var METEOR:Boolean = false; public static var BABA_COST:Array = [7000, 15000, 25000, 30000, 50000]; public static var UMNOZITEL:int = 1; public static var KOEF_STARTA:Number = 5; public static var METEOR_INT:Number = 0; public static var BABA:Boolean = false; public static var VRASCH:int = 0; public static var BONUS_PRIZEM:Boolean = false; public static var VRASCH_PAYPAL:int = 0; public static var COMICS_OTCHET:int = 0; public static var DEF:Boolean = false; public static var AGE:int = 0; public static var DEF_COST:Array = [6000, 8000, 30000, 0, 50000]; public static var TUT_PEREHOD:int = 1; public static var _MAXHEIGHT:Number = 0; public static var GAME_COMPLETE:Boolean = false; public static var SOUND:Boolean = true; public static var STRELKI_INT:int = 5; public static var SHOP:Array = [0, 0, 0, 0, 0]; public static var PO4AC:Boolean = false; public static var TUT_START:int = 1; public static function MINIMUM_COST_FUN():void{ var _local1:int; if (((((POKUPKI[0] + POKUPKI[1]) + POKUPKI[2]) + POKUPKI[3]) + POKUPKI[4]) == 5){ PhisicConstants.MINIMUM_COST = 0; } else { PhisicConstants.MINIMUM_COST = 9999999; _local1 = 0; while (_local1 < 5) { if (POKUPKI[_local1] == 0){ PhisicConstants.MINIMUM_COST = Math.min(PhisicConstants.MINIMUM_COST, SHOP[_local1]); }; _local1++; }; }; } public static function set world(_arg1:b2World):void{ _world = _arg1; } public static function get world():b2World{ return (_world); } public static function SET_SHOP():void{ var _local1:int; if (PhisicConstants.AGE == 0){ PhisicConstants.SHOP = [PhisicConstants.WHEEL_COST[0], PhisicConstants.DEF_COST[0], PhisicConstants.SLIV_COST[0], PhisicConstants.BABA_COST[0], PhisicConstants.SUPER_COST[0]]; } else { if (PhisicConstants.AGE == 1){ PhisicConstants.SHOP = [PhisicConstants.START_COST[1], PhisicConstants.DEF_COST[1], PhisicConstants.SLIV_COST[1], PhisicConstants.BABA_COST[1], PhisicConstants.SUPER_COST[1]]; } else { if (PhisicConstants.AGE == 2){ PhisicConstants.SHOP = [PhisicConstants.MAXPOWER_COST[2], PhisicConstants.SLIV_COST[2], PhisicConstants.BABA_COST[2], PhisicConstants.SUPER_DEF_COST[2], PhisicConstants.SUPER_COST[2]]; } else { if (PhisicConstants.AGE == 3){ PhisicConstants.SHOP = [PhisicConstants.WHEEL_COST[3], PhisicConstants.SLIV_COST[3], PhisicConstants.BABA_COST[3], PhisicConstants.START_COST[3], PhisicConstants.SUPER_COST[3]]; } else { if (PhisicConstants.AGE == 4){ PhisicConstants.SHOP = [PhisicConstants.MAXPOWER_COST[4], PhisicConstants.SUPER_DEF_COST[4], PhisicConstants.SLIV_COST[4], PhisicConstants.BABA_COST[4], PhisicConstants.SUPER_COST[4]]; }; }; }; }; }; _local1 = 0; while (_local1 < 5) { if (PhisicConstants.POKUPKI[_local1] == 1){ PhisicConstants.SHOP[_local1] = 0; }; _local1++; }; MINIMUM_COST_FUN(); } } }//package
Section 326
//preloader (preloader) package { import flash.display.*; import flash.text.*; public dynamic class preloader extends MovieClip { public var armor:SimpleButton; public var procent:TextField; public function preloader(){ addFrameScript(0, frame1, 20, frame21); } function frame1(){ stop(); } function frame21(){ stop(); } } }//package
Section 327
//PromezMenu (PromezMenu) package { import flash.display.*; import flash.events.*; import flash.media.*; import flash.net.*; public class PromezMenu extends EventDispatcher { private var _parent:DisplayObjectContainer; public var VISIBLE:Boolean;// = false private var table:MovieClip; public function PromezMenu(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:Number){ VISIBLE = false; super(); _parent = _arg1; table = new between(); vosstanovleniePROMEZ(_arg2, _arg3, _arg4); } private function armor2(_arg1:MouseEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://www.facebook.com/ArmorGames"); navigateToURL(_local2); } public function vosstanovleniePROMEZ(_arg1:int, _arg2:int, _arg3:Number):void{ _parent.addChild(table); table.gotoAndPlay(1); table.x = (_arg3 - 210); table.y = (-10 - _parent.y); table.between_fly.again.addEventListener(MouseEvent.MOUSE_UP, Again); table.between_fly.tf_newmoney.text = (_arg2 + ""); table.between_fly.tf_total.text = ("$ " + _arg1); VISIBLE = true; NASTROJKA_KARTINKI(); NASTROJKA(_arg1); table.addEventListener(MouseEvent.MOUSE_DOWN, Buy); table.between_fly.playmore.addEventListener(MouseEvent.MOUSE_DOWN, armor1); table.between_fly.facebook.addEventListener(MouseEvent.MOUSE_DOWN, armor2); } private function Again(_arg1:MouseEvent):void{ var _local2:Sound; if (PhisicConstants.SOUND){ _local2 = new gui_click(); _local2.play(); }; dispatchEvent(new AllEvents(AllEvents.AGAIN)); } public function TEXT_1():void{ NASTROJKA(game27._money); } private function armor1(_arg1:MouseEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://armorgames.com"); navigateToURL(_local2); } private function Buy(_arg1:MouseEvent):void{ if (((table.between_fly.shop.up1.buy.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((table.between_fly.shop.up1.currentFrame == 2)))){ PhisicConstants.POKUPKI[0] = 1; Pokupka(PhisicConstants.SHOP[0]); if ((((PhisicConstants.AGE == 0)) || ((PhisicConstants.AGE == 3)))){ PhisicConstants.WHEEL = true; game27._info[4] = 1; } else { if (PhisicConstants.AGE == 1){ PhisicConstants.START = true; game27._info[9] = 1; } else { if ((((PhisicConstants.AGE == 2)) || ((PhisicConstants.AGE == 4)))){ PhisicConstants.MAXPOWER = true; game27._info[11] = 1; }; }; }; } else { if (((table.between_fly.shop.up2.buy.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((table.between_fly.shop.up2.currentFrame == 2)))){ PhisicConstants.POKUPKI[1] = 1; Pokupka(PhisicConstants.SHOP[1]); if ((((PhisicConstants.AGE == 0)) || ((PhisicConstants.AGE == 1)))){ PhisicConstants.DEF = true; PhisicConstants.KOEF_ARMOR = 1.2; game27._info[5] = 1; } else { if ((((PhisicConstants.AGE == 2)) || ((PhisicConstants.AGE == 3)))){ PhisicConstants.SLIV = true; game27._info[6] = 1; } else { if (PhisicConstants.AGE == 4){ PhisicConstants.SUPER_DEF = true; game27._info[10] = 1; }; }; }; } else { if (((table.between_fly.shop.up3.buy.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((table.between_fly.shop.up3.currentFrame == 2)))){ PhisicConstants.POKUPKI[2] = 1; Pokupka(PhisicConstants.SHOP[2]); if ((((((PhisicConstants.AGE == 0)) || ((PhisicConstants.AGE == 1)))) || ((PhisicConstants.AGE == 4)))){ PhisicConstants.SLIV = true; game27._info[6] = 1; } else { if ((((PhisicConstants.AGE == 2)) || ((PhisicConstants.AGE == 3)))){ PhisicConstants.BABA = true; game27._info[7] = 1; table.between_fly.shop.up3.item.gotoAndStop((PhisicConstants.AGE + 26)); }; }; } else { if (((table.between_fly.shop.up4.buy.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((table.between_fly.shop.up4.currentFrame == 2)))){ PhisicConstants.POKUPKI[3] = 1; Pokupka(PhisicConstants.SHOP[3]); if ((((((PhisicConstants.AGE == 0)) || ((PhisicConstants.AGE == 1)))) || ((PhisicConstants.AGE == 4)))){ PhisicConstants.BABA = true; game27._info[7] = 1; table.between_fly.shop.up4.item.gotoAndStop((PhisicConstants.AGE + 26)); } else { if (PhisicConstants.AGE == 2){ PhisicConstants.SUPER_DEF = true; game27._info[10] = 1; } else { if (PhisicConstants.AGE == 3){ PhisicConstants.START = true; game27._info[9] = 1; }; }; }; } else { if (((table.between_fly.shop.up5.buy.hitTestPoint(_arg1.stageX, _arg1.stageY, false)) && ((table.between_fly.shop.up5.currentFrame == 2)))){ PhisicConstants.POKUPKI[4] = 1; Pokupka(PhisicConstants.SHOP[4]); PhisicConstants.SUPER = true; game27._info[8] = 1; } else { if (table.between_fly.extramoney.hitTestPoint(_arg1.stageX, _arg1.stageY, false)){ Pokupka(-50000); }; }; }; }; }; }; } private function NASTROJKA_KARTINKI():void{ table.between_fly.shop.up1.item.gotoAndStop(((PhisicConstants.AGE * 5) + 1)); table.between_fly.shop.up2.item.gotoAndStop(((PhisicConstants.AGE * 5) + 2)); table.between_fly.shop.up3.item.gotoAndStop(((PhisicConstants.AGE * 5) + 3)); table.between_fly.shop.up4.item.gotoAndStop(((PhisicConstants.AGE * 5) + 4)); table.between_fly.shop.up5.item.gotoAndStop(((PhisicConstants.AGE * 5) + 5)); } private function NASTROJKA(_arg1:int):void{ if (PhisicConstants.POKUPKI[0] == 1){ table.between_fly.shop.up1.gotoAndStop(3); } else { if (_arg1 < PhisicConstants.SHOP[0]){ table.between_fly.shop.up1.gotoAndStop(1); } else { table.between_fly.shop.up1.gotoAndStop(2); }; table.between_fly.shop.up1.price.text = (("$" + PhisicConstants.SHOP[0]) + ""); }; if (PhisicConstants.POKUPKI[1] == 1){ table.between_fly.shop.up2.gotoAndStop(3); } else { if (_arg1 < PhisicConstants.SHOP[1]){ table.between_fly.shop.up2.gotoAndStop(1); } else { table.between_fly.shop.up2.gotoAndStop(2); }; table.between_fly.shop.up2.price.text = (("$" + PhisicConstants.SHOP[1]) + ""); }; if (PhisicConstants.POKUPKI[2] == 1){ table.between_fly.shop.up3.gotoAndStop(3); } else { if (_arg1 < PhisicConstants.SHOP[2]){ table.between_fly.shop.up3.gotoAndStop(1); } else { table.between_fly.shop.up3.gotoAndStop(2); }; table.between_fly.shop.up3.price.text = (("$" + PhisicConstants.SHOP[2]) + ""); }; if (PhisicConstants.POKUPKI[3] == 1){ table.between_fly.shop.up4.gotoAndStop(3); } else { if (_arg1 < PhisicConstants.SHOP[3]){ table.between_fly.shop.up4.gotoAndStop(1); } else { table.between_fly.shop.up4.gotoAndStop(2); }; table.between_fly.shop.up4.price.text = (("$" + PhisicConstants.SHOP[3]) + ""); }; if (PhisicConstants.POKUPKI[4] == 1){ table.between_fly.shop.up5.gotoAndStop(3); } else { if ((((_arg1 < PhisicConstants.SHOP[4])) || (((((PhisicConstants.POKUPKI[0] + PhisicConstants.POKUPKI[1]) + PhisicConstants.POKUPKI[2]) + PhisicConstants.POKUPKI[3]) < 4)))){ table.between_fly.shop.up5.gotoAndStop(1); } else { table.between_fly.shop.up5.gotoAndStop(2); }; table.between_fly.shop.up5.price.text = (("$" + PhisicConstants.SHOP[4]) + ""); }; if (PhisicConstants.BABA){ if ((((((PhisicConstants.AGE == 0)) || ((PhisicConstants.AGE == 1)))) || ((PhisicConstants.AGE == 4)))){ table.between_fly.shop.up4.item.gotoAndStop((PhisicConstants.AGE + 26)); } else { table.between_fly.shop.up3.item.gotoAndStop((PhisicConstants.AGE + 26)); }; }; } private function Pokupka(_arg1:int):void{ game27._money = (game27._money - _arg1); game27._info[0] = game27._money; NASTROJKA(game27._money); dispatchEvent(new AllEvents(AllEvents.PEREZAPIS)); table.between_fly.tf_total.text = ("$" + Math.floor(game27._money)); } public function destroy():void{ table.between_fly.again.removeEventListener(MouseEvent.MOUSE_UP, Again); table.removeEventListener(MouseEvent.MOUSE_DOWN, Buy); table.between_fly.playmore.removeEventListener(MouseEvent.MOUSE_DOWN, armor1); table.between_fly.facebook.removeEventListener(MouseEvent.MOUSE_DOWN, armor2); _parent.removeChild(table); VISIBLE = false; PhisicConstants.MINIMUM_COST_FUN(); } } }//package
Section 328
//pulyalka (pulyalka) package { import flash.display.*; public dynamic class pulyalka extends MovieClip { public var hero:base_hero_all; public var power:MovieClip; public function pulyalka(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); } } }//package
Section 329
//pulyalka2 (pulyalka2) package { import flash.display.*; public dynamic class pulyalka2 extends MovieClip { public var hero:MovieClip; public var power:MovieClip; public function pulyalka2(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); } } }//package
Section 330
//pulyalka3 (pulyalka3) package { import flash.display.*; public dynamic class pulyalka3 extends MovieClip { public var hero:MovieClip; public var power:MovieClip; public function pulyalka3(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); } } }//package
Section 331
//pulyalka4 (pulyalka4) package { import flash.display.*; public dynamic class pulyalka4 extends MovieClip { public var hero:MovieClip; public var power:MovieClip; public function pulyalka4(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); } } }//package
Section 332
//pulyalka5 (pulyalka5) package { import flash.display.*; public dynamic class pulyalka5 extends MovieClip { public var hero:MovieClip; public var power:MovieClip; public function pulyalka5(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); } } }//package
Section 333
//sky01 (sky01) package { import flash.display.*; public dynamic class sky01 extends MovieClip { public function sky01(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 334
//sound_menu (sound_menu) package { import flash.display.*; public dynamic class sound_menu extends MovieClip { public var sound:MovieClip; public var quality:MovieClip; } }//package
Section 335
//speedometr01 (speedometr01) package { import flash.display.*; public dynamic class speedometr01 extends MovieClip { public var strelka:MovieClip; public function speedometr01(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 81, frame82, 82, frame83, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 87, frame88, 88, frame89, 89, frame90, 90, frame91, 91, frame92, 92, frame93, 93, frame94, 94, frame95, 95, frame96, 96, frame97, 97, frame98, 98, frame99, 99, frame100, 100, frame101); } function frame10(){ stop(); } function frame14(){ stop(); } function frame16(){ stop(); } function frame15(){ stop(); } function frame18(){ stop(); } function frame19(){ stop(); } function frame12(){ stop(); } function frame17(){ stop(); } function frame3(){ stop(); } function frame13(){ stop(); } function frame5(){ stop(); } function frame6(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame22(){ stop(); } function frame4(){ stop(); } function frame24(){ stop(); } function frame25(){ stop(); } function frame26(){ stop(); } function frame9(){ stop(); } function frame2(){ stop(); } function frame23(){ stop(); } function frame21(){ stop(); } function frame8(){ stop(); } function frame11(){ stop(); } function frame30(){ stop(); } function frame29(){ stop(); } function frame35(){ stop(); } function frame36(){ stop(); } function frame37(){ stop(); } function frame27(){ stop(); } function frame28(){ stop(); } function frame20(){ stop(); } function frame38(){ stop(); } function frame31(){ stop(); } function frame32(){ stop(); } function frame34(){ stop(); } function frame33(){ stop(); } function frame40(){ stop(); } function frame39(){ stop(); } function frame43(){ stop(); } function frame44(){ stop(); } function frame45(){ stop(); } function frame46(){ stop(); } function frame47(){ stop(); } function frame41(){ stop(); } function frame48(){ stop(); } function frame49(){ stop(); } function frame42(){ stop(); } function frame51(){ stop(); } function frame52(){ stop(); } function frame53(){ stop(); } function frame54(){ stop(); } function frame55(){ stop(); } function frame56(){ stop(); } function frame50(){ stop(); } function frame58(){ stop(); } function frame59(){ stop(); } function frame57(){ stop(); } function frame60(){ stop(); } function frame61(){ stop(); } function frame62(){ stop(); } function frame63(){ stop(); } function frame64(){ stop(); } function frame65(){ stop(); } function frame66(){ stop(); } function frame67(){ stop(); } function frame68(){ stop(); } function frame69(){ stop(); } function frame70(){ stop(); } function frame72(){ stop(); } function frame73(){ stop(); } function frame75(){ stop(); } function frame77(){ stop(); } function frame71(){ stop(); } function frame76(){ stop(); } function frame78(){ stop(); } function frame74(){ stop(); } function frame79(){ stop(); } function frame80(){ stop(); } function frame81(){ stop(); } function frame84(){ stop(); } function frame85(){ stop(); } function frame86(){ stop(); } function frame87(){ stop(); } function frame88(){ stop(); } function frame82(){ stop(); } function frame83(){ stop(); } function frame89(){ stop(); } function frame90(){ stop(); } function frame91(){ stop(); } function frame93(){ stop(); } function frame94(){ stop(); } function frame95(){ stop(); } function frame98(){ stop(); } function frame92(){ stop(); } function frame97(){ stop(); } function frame99(){ stop(); } function frame96(){ stop(); } function frame100(){ stop(); } function frame101(){ stop(); } } }//package
Section 336
//StaticPalka (StaticPalka) package { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import flash.display.*; import flash.geom.*; public class StaticPalka extends VseActor { private var VYSOTA:int; private var SHIRINA:int; public function StaticPalka(_arg1:DisplayObjectContainer, _arg2:int, _arg3:Point){ var _local4:MovieClip; var _local5:b2FixtureDef; var _local6:b2PolygonShape; var _local7:b2BodyDef; var _local8:b2Body; if (_arg2 == 1){ SHIRINA = 1000; VYSOTA = 100; _local4 = new ground1000(); _local4.gotoAndStop((PhisicConstants.AGE + 1)); }; _arg1.addChild(_local4); _local5 = new b2FixtureDef(); _local5.density = 0; if ((((PhisicConstants.WHEEL == false)) || ((PhisicConstants.SUPER_DEF == true)))){ _local5.friction = 0.05; } else { if (PhisicConstants.WHEEL == true){ _local5.friction = 0.035; }; }; _local5.restitution = 0.4; _local6 = new b2PolygonShape(); _local6.SetAsBox((SHIRINA / (2 * PhisicConstants.RATIO)), (VYSOTA / (2 * PhisicConstants.RATIO))); _local5.shape = _local6; _local7 = new b2BodyDef(); _local7.position.Set((_arg3.x / PhisicConstants.RATIO), ((_arg3.y + 25) / PhisicConstants.RATIO)); _local7.type = b2Body.b2_staticBody; _local8 = PhisicConstants.world.CreateBody(_local7); _local8.CreateFixture(_local5); super(_local8, _local4); _local4.y = (_local4.y - 25); } public function MOVING():void{ _body.SetPosition(new b2Vec2((_body.GetPosition().x + (2000 / PhisicConstants.RATIO)), _body.GetPosition().y)); updateMyLook1(); } public function updateMyLook1():void{ _costume.x = (_body.GetPosition().x * PhisicConstants.RATIO); _costume.y = ((_body.GetPosition().y * PhisicConstants.RATIO) - 25); _costume.rotation = ((_body.GetAngle() * 180) / Math.PI); } } }//package
Section 337
//TheHero (TheHero) package { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.media.*; public class TheHero extends EventDispatcher { private const vysota:int = 98; private const radius:int = 5; private const shirina:int = 52; public var j2:b2RevoluteJointDef; public var j1:b2RevoluteJointDef; var _wheel2Body:b2Body; private var otschet_SuperUskoritelia:int;// = 0 private var rot_dlia_bonusa:int;// = 0 private var TEST_SPEED:int;// = 0 private var ROT_INT:int;// = 100 private var babaInt:int;// = 0 private var DEAD:Boolean;// = false private var UP_SPEED:int;// = 0 private var ROT_NAPR:int;// = 1 var _wheel1Body:b2Body; var teloSprite:MovieClip; var wheel1Sprite:MovieClip; private var KUVYRK:Boolean;// = false private var Alpha1:Number; private var Alpha2:Number; private var KUVYRK_INT:int;// = 0 private var otschet_Start:int;// = 0 private var ROT_O:int;// = 0 private var _parent:DisplayObjectContainer; var _teloBody:b2Body; var wheel2Sprite:MovieClip; private var Rad2:Number; private var Rad1:Number; private var perehod_speed:b2Vec2;// = null public var _NAVEDENIE:Boolean;// = false public function TheHero(_arg1:DisplayObjectContainer, _arg2:Point, _arg3:Number, _arg4:int){ var _local5:Number; var _local6:b2Vec2; var _local7:Number; j1 = new b2RevoluteJointDef(); j2 = new b2RevoluteJointDef(); otschet_SuperUskoritelia = 0; otschet_Start = 0; _NAVEDENIE = false; ROT_INT = 100; ROT_NAPR = 1; Alpha1 = (Math.atan((11 / 49)) + (Math.PI / 2)); Rad1 = Math.sqrt(2522); Alpha2 = (Math.atan((-15 / 49)) + (Math.PI / 2)); Rad2 = Math.sqrt(2626); DEAD = false; KUVYRK = false; KUVYRK_INT = 0; ROT_O = 0; babaInt = 0; perehod_speed = null; rot_dlia_bonusa = 0; TEST_SPEED = 0; UP_SPEED = 0; super(); if ((((((PhisicConstants.AGE == 1)) || ((PhisicConstants.AGE == 2)))) || ((PhisicConstants.AGE == 4)))){ PhisicConstants.WHEEL = true; }; DEAD = false; PhisicConstants.NUMBER_SLIV = 3; _parent = _arg1; if (PhisicConstants.AGE == 0){ teloSprite = new hero01(); } else { if (PhisicConstants.AGE == 1){ teloSprite = new hero2(); } else { if (PhisicConstants.AGE == 2){ teloSprite = new hero3(); } else { if (PhisicConstants.AGE == 3){ teloSprite = new hero4(); } else { if (PhisicConstants.AGE == 4){ teloSprite = new hero5(); }; }; }; }; }; teloSprite.gotoAndStop(1); _arg1.addChild(teloSprite); DOP_SLIV(); if (PhisicConstants.AGE == 0){ teloSprite.hair.gotoAndStop(2); }; _teloBody = CreateTelo(_arg2); _teloBody.SetUserData(this); updateNow(_teloBody, teloSprite); if (PhisicConstants.WHEEL){ if (PhisicConstants.AGE == 0){ wheel1Sprite = new wheel16(); } else { if (PhisicConstants.AGE == 1){ wheel1Sprite = new her02wheel16(); } else { if (PhisicConstants.AGE == 2){ wheel1Sprite = new her03wheel16(); } else { if (PhisicConstants.AGE == 3){ wheel1Sprite = new her04wheel16(); } else { if (PhisicConstants.AGE == 4){ wheel1Sprite = new her05wheel16(); }; }; }; }; }; Alpha1 = (Math.atan((11 / 46)) + (Math.PI / 2)); Rad1 = Math.sqrt(2237); } else { if (PhisicConstants.AGE == 0){ wheel1Sprite = new wheel_10(); } else { if (PhisicConstants.AGE == 3){ wheel1Sprite = new her04wheel10(); }; }; }; _arg1.addChild(wheel1Sprite); _wheel1Body = CreateCrug(new Point((_arg2.x - 11), (_arg2.y + 49))); _wheel1Body.SetUserData(this); updateNow(_wheel1Body, wheel1Sprite); if (PhisicConstants.WHEEL){ if (PhisicConstants.AGE == 0){ wheel2Sprite = new wheel16(); } else { if (PhisicConstants.AGE == 1){ wheel2Sprite = new her02wheel16(); } else { if (PhisicConstants.AGE == 2){ wheel2Sprite = new her03wheel16(); } else { if (PhisicConstants.AGE == 3){ wheel2Sprite = new her04wheel16(); } else { if (PhisicConstants.AGE == 4){ wheel2Sprite = new her05wheel16(); }; }; }; }; }; Alpha2 = (Math.atan((-15 / 46)) + (Math.PI / 2)); Rad2 = Math.sqrt(2341); } else { if (PhisicConstants.AGE == 0){ wheel2Sprite = new wheel_10(); } else { if (PhisicConstants.AGE == 3){ wheel2Sprite = new her04wheel10(); }; }; }; _arg1.addChild(wheel2Sprite); _wheel2Body = CreateCrug(new Point((_arg2.x + 15), (_arg2.y + 49))); _wheel2Body.SetUserData(this); updateNow(_wheel2Body, wheel2Sprite); j1.lowerAngle = (-1 / (180 / Math.PI)); j1.upperAngle = (1 / (180 / Math.PI)); j1.Initialize(_wheel1Body, _teloBody, new b2Vec2(((_arg2.x - 11) / PhisicConstants.RATIO), ((_arg2.y + 49) / PhisicConstants.RATIO))); PhisicConstants.world.CreateJoint(j1); j2.lowerAngle = (-1 / (180 / Math.PI)); j2.upperAngle = (1 / (180 / Math.PI)); j2.Initialize(_wheel2Body, _teloBody, new b2Vec2(((_arg2.x + 15) / PhisicConstants.RATIO), ((_arg2.y + 49) / PhisicConstants.RATIO))); PhisicConstants.world.CreateJoint(j2); _local5 = Math.abs((25 - _arg4)); if (PhisicConstants.MAXPOWER){ _local5 = 0; }; _local5 = (2 + (8 * (1 - (0.04 * _local5)))); _local5 = (_local5 * Math.pow(PhisicConstants.KOEFF, 1)); _local6 = new b2Vec2(((_local5 * Math.cos(_arg3)) * PhisicConstants.KOEF_STARTA), ((_local5 * Math.sin(_arg3)) * PhisicConstants.KOEF_STARTA)); _teloBody.ApplyImpulse(_local6, _teloBody.GetWorldCenter()); _local7 = Math.random(); if (_local7 < 0.5){ ROT_NAPR = -1; }; UPGRADES(); } public function Rasstojanie():Number{ return ((_teloBody.GetPosition().x * PhisicConstants.RATIO)); } public function UDAR_OB_GIDRANT():void{ var _local1:b2Vec2; if (_teloBody.GetLinearVelocity().y > 0){ _teloBody.SetLinearVelocity(new b2Vec2(_teloBody.GetLinearVelocity().x, 0)); }; _local1 = new b2Vec2(1, (-2.5 - (PhisicConstants.AGE / 10))); _local1.Multiply(((20 * PhisicConstants.KOEF_ARMOR) * Math.pow(PhisicConstants.KOEFF, 1.5))); _teloBody.ApplyImpulse(_local1, _teloBody.GetWorldCenter()); KUV_FAL(); } public function METEOR_HEADSHOT():void{ DEAD = true; _teloBody.SetLinearVelocity(new b2Vec2(0, 0)); _wheel1Body.SetLinearVelocity(new b2Vec2(0, 0)); _wheel2Body.SetLinearVelocity(new b2Vec2(0, 0)); _teloBody.SetType(b2Body.b2_staticBody); teloSprite.visible = false; wheel1Sprite.visible = false; wheel2Sprite.visible = false; } public function RETURN_DEAD():Boolean{ return (DEAD); } public function DOP_SLIV():void{ teloSprite.buttonMode = true; teloSprite.addEventListener(MouseEvent.MOUSE_DOWN, startSliv); teloSprite.addEventListener(MouseEvent.MOUSE_OVER, over); teloSprite.addEventListener(MouseEvent.ROLL_OUT, outtt); } public function SUPERUSKORITEL():void{ otschet_SuperUskoritelia = 1; teloSprite.usk1.gotoAndPlay(2); if (_teloBody.GetLinearVelocity().y > 0){ _teloBody.SetLinearVelocity(new b2Vec2(_teloBody.GetLinearVelocity().x, 0)); }; teloSprite.rotation = 0; if (PhisicConstants.VRASCH != 0){ PhisicConstants.VRASCH = 0; }; ROT_O = 111; KUV_FAL(); } public function Vysota():Number{ return ((_teloBody.GetPosition().y * PhisicConstants.RATIO)); } private function outtt(_arg1:MouseEvent):void{ if (_NAVEDENIE){ _NAVEDENIE = false; }; } private function updateNow(_arg1:b2Body, _arg2:DisplayObject):void{ _arg2.x = (_arg1.GetPosition().x * PhisicConstants.RATIO); _arg2.y = (_arg1.GetPosition().y * PhisicConstants.RATIO); _arg2.rotation = ((_arg1.GetAngle() * 180) / Math.PI); } private function KUV_FAL():void{ KUVYRK = false; KUVYRK_INT = 0; } public function UDAR_OB_MUHU(_arg1:Number):void{ var _local2:b2Vec2; var _local3:Number; var _local4:Number; if ((((otschet_SuperUskoritelia < 10)) || ((otschet_SuperUskoritelia > 110)))){ _local2 = _teloBody.GetLinearVelocity(); _local3 = PhisicConstants.UDAR_ARRAY[PhisicConstants.AGE]; if (_teloBody.GetLinearVelocity().Length() < (2 * _local3)){ if (PhisicConstants.KOEF_ARMOR == 1){ _teloBody.SetLinearVelocity(new b2Vec2(((_local2.x * 0.5) * _arg1), (_local2.y * 0.5))); } else { _teloBody.SetLinearVelocity(new b2Vec2(((_local2.x * 0.75) * _arg1), (_local2.y * 0.8))); }; } else { _local3 = (_local3 / (_arg1 * PhisicConstants.KOEF_ARMOR)); _local4 = (1 - (_local3 / _teloBody.GetLinearVelocity().Length())); _teloBody.SetLinearVelocity(new b2Vec2((_local2.x * _local4), (_local2.y * _local4))); }; if ((((((PhisicConstants.AGE == 0)) && (PhisicConstants.DEF))) && ((_arg1 == 1)))){ teloSprite.dubina.gotoAndPlay(3); }; }; } public function KOORD_SPRITE():Point{ return (new Point(teloSprite.x, teloSprite.y)); } private function Updating():void{ var _local1:b2Vec2; if (!KUVYRK){ if (ROT_INT > 100){ ROT_INT--; } else { if (ROT_O > 0){ ROT_O--; teloSprite.rotation = -15; } else { if (teloSprite.y < 250){ if (PhisicConstants.PO4AC){ ROT_NAPR = 1; teloSprite.rotation = (teloSprite.rotation + ((ROT_NAPR * PhisicConstants.ANGLE_SPEED) * 2)); } else { if (PhisicConstants.PROTIV4AC){ ROT_NAPR = -1; teloSprite.rotation = (teloSprite.rotation + ((ROT_NAPR * PhisicConstants.ANGLE_SPEED) * 2)); } else { if (PhisicConstants.BABA){ teloSprite.rotation = (teloSprite.rotation + ((ROT_NAPR * PhisicConstants.ANGLE_SPEED) / 3)); } else { teloSprite.rotation = (teloSprite.rotation + (ROT_NAPR * PhisicConstants.ANGLE_SPEED)); }; }; }; } else { if ((((teloSprite.y >= 250)) && ((Math.abs(teloSprite.rotation) < 30)))){ if (teloSprite.rotation != 0){ rot_dlia_bonusa = teloSprite.rotation; }; teloSprite.rotation = 0; PhisicConstants.VRASCH = 0; if (_teloBody.IsFixedRotation() == false){ _teloBody.SetAngle(0); }; }; }; }; }; } else { if (KUVYRK_INT == 0){ KUVYRK_INT = 1; _teloBody.SetAngle(((teloSprite.rotation * Math.PI) / 180)); _teloBody.SetAngularVelocity(10); } else { teloSprite.rotation = ((_teloBody.GetAngle() * 180) / Math.PI); _local1 = _teloBody.GetLinearVelocity(); _local1.x = (0.97 * _local1.x); _local1.y = (0.9 * _local1.y); _teloBody.SetLinearVelocity(_local1); }; }; SPRITE_CORRECT(); } public function UDAR_O_KAMEN():void{ KUVYRK = true; KUVYRK_INT = 0; _teloBody.SetFixedRotation(false); _teloBody.ApplyTorque(10); } private function CreateCrug(_arg1:Point):b2Body{ var _local2:b2FixtureDef; var _local3:b2BodyDef; var _local4:b2Body; _local2 = new b2FixtureDef(); _local2.density = 1; _local2.friction = 0.7; _local2.restitution = 0.3; _local2.shape = new b2CircleShape((radius / PhisicConstants.RATIO)); _local3 = new b2BodyDef(); _local3.position.Set((_arg1.x / PhisicConstants.RATIO), (_arg1.y / PhisicConstants.RATIO)); _local3.type = b2Body.b2_dynamicBody; _local4 = PhisicConstants.world.CreateBody(_local3); _local4.CreateFixture(_local2); return (_local4); } public function NEVIDIM():void{ teloSprite.visible = false; wheel1Sprite.visible = false; wheel2Sprite.visible = false; } public function DEAD_TEST():void{ var _local1:Sound; if (((((((PhisicConstants.BABA) && (PhisicConstants.SOUND))) && ((_teloBody.GetLinearVelocity().y > 10)))) && ((babaInt == 0)))){ babaInt = 10; if (PhisicConstants.AGE == 0){ _local1 = new ep1_baba(); } else { if (PhisicConstants.AGE == 1){ _local1 = new ep2_baba(); } else { if (PhisicConstants.AGE == 2){ _local1 = new ep3_baba(); } else { if (PhisicConstants.AGE == 3){ _local1 = new ep4_baba(); } else { if (PhisicConstants.AGE == 4){ _local1 = new ep5_baba(); }; }; }; }; }; _local1.play(); teloSprite.baba.gotoAndPlay(3); }; if ((((((teloSprite.y > 370)) && ((Math.abs(teloSprite.rotation) >= 30)))) && ((KUVYRK == false)))){ KUVYRK = true; _teloBody.SetFixedRotation(false); } else { if (((((PhisicConstants.BONUS_PRIZEM) && ((KUVYRK == false)))) && ((Math.abs(teloSprite.rotation) < 30)))){ PhisicConstants.BONUS_PRIZEM = false; if (Math.abs(rot_dlia_bonusa) < 5){ PhisicConstants.PREZEM = 2; } else { PhisicConstants.PREZEM = 1; }; rot_dlia_bonusa = 0; }; }; } public function RETURN_KUVYRK():Boolean{ return (KUVYRK); } public function CHANGE_ROT():void{ var _local1:Number; _local1 = Math.random(); if (_local1 < 0.5){ ROT_NAPR = -(ROT_NAPR); }; if (PhisicConstants.VRASCH != 2){ PhisicConstants.VRASCH = 2; }; } public function UDAR_OB_SOBAKU():void{ var _local1:b2Vec2; _local1 = _teloBody.GetLinearVelocity(); _teloBody.SetLinearVelocity(new b2Vec2(((_local1.x * 0.6) * PhisicConstants.KOEF_ARMOR), ((_local1.y * 0.6) * PhisicConstants.KOEF_ARMOR))); } public function updateEveryFrame():void{ var _local1:b2Vec2; var _local2:b2Vec2; if (otschet_Start > 0){ otschet_Start++; if (otschet_Start == 90){ otschet_Start = 0; }; if ((((otschet_SuperUskoritelia < 9)) || ((otschet_SuperUskoritelia > 110)))){ if (PhisicConstants.AGE == 0){ _local1 = new b2Vec2(0.7, -0.7); } else { if (PhisicConstants.AGE == 1){ _local1 = new b2Vec2(0.5, -0.5); } else { _local1 = new b2Vec2(0.5, -0.5); }; }; _teloBody.ApplyImpulse(_local1, _teloBody.GetWorldCenter()); }; }; if ((((((Math.abs(teloSprite.rotation) > 20)) && ((PhisicConstants.VRASCH == 0)))) && ((KUVYRK == false)))){ PhisicConstants.VRASCH = ROT_NAPR; } else { if ((((((((Math.abs(teloSprite.rotation) < 20)) && ((PhisicConstants.VRASCH == 2)))) && ((KUVYRK == false)))) && ((teloSprite.y < 250)))){ PhisicConstants.VRASCH = 0; }; }; if ((((PhisicConstants.VRASCH == -(ROT_NAPR))) || (((KUVYRK) && ((PhisicConstants.VRASCH < 2)))))){ PhisicConstants.VRASCH = 2; }; if ((((((((PhisicConstants.VRASCH == -1)) && ((teloSprite.rotation < 10)))) && ((teloSprite.rotation > -10)))) || ((((((PhisicConstants.VRASCH == 1)) && ((teloSprite.rotation > -10)))) && ((teloSprite.rotation < 10)))))){ PhisicConstants.VRASCH = 0; PhisicConstants.VRASCH_PAYPAL = 1; }; if (otschet_SuperUskoritelia > 0){ otschet_SuperUskoritelia++; if ((((((otschet_SuperUskoritelia > 9)) && ((otschet_SuperUskoritelia < 111)))) && ((PhisicConstants.PEREHOD == false)))){ _local2 = new b2Vec2(2, -1); _local2.Multiply((0.55 * (PhisicConstants.AGE + 1))); if (otschet_Start > 0){ _local2.Multiply(1.5); }; _teloBody.ApplyImpulse(_local2, _teloBody.GetWorldCenter()); } else { if (otschet_SuperUskoritelia == 111){ otschet_SuperUskoritelia = 0; }; }; }; if ((((((((PhisicConstants.SUPER == false)) || ((otschet_SuperUskoritelia < 10)))) || ((otschet_SuperUskoritelia > 110)))) && ((_teloBody.GetLinearVelocity().x > (PhisicConstants.SPEED_ARR[PhisicConstants.AGE] - 1))))){ _teloBody.SetLinearVelocity(new b2Vec2((PhisicConstants.SPEED_ARR[PhisicConstants.AGE] - 1), _teloBody.GetLinearVelocity().y)); }; if (PhisicConstants.PEREHOD == false){ Updating(); } else { if (perehod_speed == null){ perehod_speed = new b2Vec2(_teloBody.GetLinearVelocity().x, 0); teloSprite.rotation = 0; _teloBody.SetAngle(0); }; _teloBody.SetLinearVelocity(perehod_speed); SPRITE_CORRECT(); }; if (teloSprite.y > 390){ _wheel1Body.SetAngularDamping(100); _wheel2Body.SetAngularDamping(100); }; if (babaInt > 0){ babaInt--; }; } private function startSliv(_arg1:MouseEvent):void{ var _local2:b2Vec2; var _local3:Sound; if (PhisicConstants.PEREHOD == false){ PhisicConstants.NUMBER_SLIV--; if (PhisicConstants.NUMBER_SLIV == 0){ teloSprite.removeEventListener(MouseEvent.MOUSE_DOWN, startSliv); teloSprite.removeEventListener(MouseEvent.MOUSE_OVER, over); teloSprite.removeEventListener(MouseEvent.ROLL_OUT, outtt); _NAVEDENIE = false; teloSprite.buttonMode = false; }; if (_teloBody.GetLinearVelocity().y > 0){ _teloBody.SetLinearVelocity(new b2Vec2(_teloBody.GetLinearVelocity().x, 0)); }; PhisicConstants.VRASCH = 0; if (PhisicConstants.TUT_SLIV == 1){ PhisicConstants.TUT_SLIV = 0; }; TEST_SPEED = _teloBody.GetLinearVelocity().x; UP_SPEED = 2; _local2 = new b2Vec2((1 + (PhisicConstants.AGE / 5)), (-1.2 - (PhisicConstants.AGE / 5))); _local2.Multiply((15 * Math.pow(PhisicConstants.KOEFF, 0.5))); if (PhisicConstants.SLIV){ teloSprite.sliv2.gotoAndPlay(2); _local2.Multiply(1.5); } else { teloSprite.sliv1.gotoAndPlay(2); }; if (PhisicConstants.SOUND){ if (PhisicConstants.SLIV){ _local3 = new ep1_flush2(); } else { _local3 = new ep1_flush1(); }; _local3.play(); }; ROT_O = Math.max(ROT_O, 37); _teloBody.ApplyImpulse(_local2, _teloBody.GetWorldCenter()); teloSprite.rotation = -15; KUV_FAL(); }; } private function over(_arg1:MouseEvent):void{ if ((((_NAVEDENIE == false)) && ((PhisicConstants.NUMBER_SLIV > 0)))){ _NAVEDENIE = true; }; } private function UPGRADES():void{ var _local1:Sound; if ((((PhisicConstants.AGE == 0)) && (PhisicConstants.DEF))){ teloSprite.dubina.gotoAndStop(2); }; if (PhisicConstants.BABA){ teloSprite.baba.gotoAndStop(2); }; if (PhisicConstants.START){ if (PhisicConstants.AGE == 1){ teloSprite.wing.gotoAndPlay(2); } else { if (PhisicConstants.AGE == 3){ teloSprite.plane.gotoAndPlay(2); }; }; otschet_Start = 1; teloSprite.rotation = 0; ROT_O = 88; if (PhisicConstants.SOUND){ if (PhisicConstants.AGE == 1){ _local1 = new ep2_wings(); } else { _local1 = new ep4_plane(); }; _local1.play(); }; }; if (PhisicConstants.SUPER_DEF){ if (PhisicConstants.AGE == 2){ teloSprite.hand.gotoAndStop(2); } else { if (PhisicConstants.AGE == 4){ teloSprite.up2.gotoAndStop(2); }; }; }; if ((((PhisicConstants.AGE == 1)) && (PhisicConstants.DEF))){ teloSprite.up2.gotoAndStop(2); }; } public function BLOOD():void{ teloSprite.blood.gotoAndPlay(2); } private function SPRITE_CORRECT():void{ var _local1:Number; teloSprite.x = ((_teloBody.GetPosition().x * PhisicConstants.RATIO) + (PhisicConstants.METEOR_INT * 5)); teloSprite.y = (_teloBody.GetPosition().y * PhisicConstants.RATIO); _local1 = ((teloSprite.rotation * Math.PI) / 180); wheel1Sprite.x = (teloSprite.x + (Rad1 * Math.cos((Alpha1 + _local1)))); wheel1Sprite.y = (teloSprite.y + (Rad1 * Math.sin((Alpha1 + _local1)))); if ((((_wheel1Body.GetAngularVelocity() == 0)) && ((teloSprite.y < 250)))){ wheel1Sprite.rotation = (wheel1Sprite.rotation + 50); } else { wheel1Sprite.rotation = ((_wheel1Body.GetAngle() * 180) / Math.PI); }; wheel2Sprite.x = (teloSprite.x + (Rad2 * Math.cos((Alpha2 + _local1)))); wheel2Sprite.y = (teloSprite.y + (Rad2 * Math.sin((Alpha2 + _local1)))); wheel2Sprite.rotation = wheel1Sprite.rotation; } public function GET_SPEED():Number{ if (DEAD){ return (0); }; return (_teloBody.GetLinearVelocity().Length()); } private function CreateTelo(_arg1:Point):b2Body{ var _local2:Boolean; var _local3:b2FixtureDef; var _local4:b2PolygonShape; var _local5:b2BodyDef; var _local6:b2Body; var _local7:b2FixtureDef; var _local8:b2PolygonShape; _local2 = false; if ((((PhisicConstants.AGE == 4)) && ((PhisicConstants.SUPER_DEF == false)))){ _local2 = true; }; _local3 = new b2FixtureDef(); _local3.density = 1; _local3.friction = 0.4; _local3.restitution = 0.3; if (_local2){ _local7 = new b2FixtureDef(); _local7.density = 1; _local7.friction = 0.4; _local7.restitution = 0.3; _local7.isSensor = true; }; _local4 = new b2PolygonShape(); if (_local2 == false){ _local4.SetAsBox((shirina / (2 * PhisicConstants.RATIO)), (vysota / (2 * PhisicConstants.RATIO))); _local3.shape = _local4; } else { _local4.SetAsOrientedBox((shirina / (2 * PhisicConstants.RATIO)), ((vysota - 20) / (2 * PhisicConstants.RATIO)), new b2Vec2(0, (10 / PhisicConstants.RATIO))); _local3.shape = _local4; _local8 = new b2PolygonShape(); _local8.SetAsOrientedBox((shirina / (2 * PhisicConstants.RATIO)), (10 / PhisicConstants.RATIO), new b2Vec2(0, (-10 / PhisicConstants.RATIO))); _local7.shape = _local8; }; _local5 = new b2BodyDef(); _local5.position.Set((_arg1.x / PhisicConstants.RATIO), (_arg1.y / PhisicConstants.RATIO)); _local5.fixedRotation = true; _local5.type = b2Body.b2_dynamicBody; _local6 = PhisicConstants.world.CreateBody(_local5); _local6.SetBullet(true); _local6.CreateFixture(_local3); if (_local2){ _local6.CreateFixture(_local7); }; return (_local6); } public function LAZER():void{ teloSprite.laser.gotoAndPlay(2); } public function GET_XSPEED():Number{ if (DEAD){ return (0); }; return (_teloBody.GetLinearVelocity().x); } public function destroy():void{ _parent.removeChild(teloSprite); _parent.removeChild(wheel1Sprite); _parent.removeChild(wheel2Sprite); if (PhisicConstants.NUMBER_SLIV > 0){ teloSprite.removeEventListener(MouseEvent.MOUSE_OVER, over); teloSprite.removeEventListener(MouseEvent.ROLL_OUT, outtt); teloSprite.removeEventListener(MouseEvent.MOUSE_DOWN, startSliv); }; PhisicConstants.world.DestroyBody(_teloBody); PhisicConstants.world.DestroyBody(_wheel1Body); PhisicConstants.world.DestroyBody(_wheel2Body); teloSprite = null; wheel1Sprite = null; wheel2Sprite = null; _teloBody = null; _wheel1Body = null; _wheel2Body = null; } } }//package
Section 338
//track_01 (track_01) package { import flash.media.*; public dynamic class track_01 extends Sound { } }//package
Section 339
//track_02 (track_02) package { import flash.media.*; public dynamic class track_02 extends Sound { } }//package
Section 340
//track_03 (track_03) package { import flash.media.*; public dynamic class track_03 extends Sound { } }//package
Section 341
//track_04 (track_04) package { import flash.media.*; public dynamic class track_04 extends Sound { } }//package
Section 342
//track_05 (track_05) package { import flash.media.*; public dynamic class track_05 extends Sound { } }//package
Section 343
//track_comics (track_comics) package { import flash.media.*; public dynamic class track_comics extends Sound { } }//package
Section 344
//track_menu (track_menu) package { import flash.media.*; public dynamic class track_menu extends Sound { } }//package
Section 345
//transp_sound (transp_sound) package { import flash.media.*; public dynamic class transp_sound extends Sound { } }//package
Section 346
//tut1m (tut1m) package { import flash.display.*; public dynamic class tut1m extends MovieClip { public function tut1m(){ addFrameScript(13, frame14); } function frame14(){ stop(); } } }//package
Section 347
//tut3 (tut3) package { import flash.display.*; public dynamic class tut3 extends MovieClip { } }//package
Section 348
//wheel_10 (wheel_10) package { import flash.display.*; public dynamic class wheel_10 extends MovieClip { } }//package
Section 349
//wheel16 (wheel16) package { import flash.display.*; public dynamic class wheel16 extends MovieClip { } }//package
Section 350
//VseActor (VseActor) package { import Box2D.Dynamics.*; import flash.display.*; import flash.events.*; import flash.geom.*; public class VseActor extends EventDispatcher { protected var _body:b2Body; protected var _costume:DisplayObject; public var navodBOO:Boolean;// = false public var SDUV:Number;// = 0 public var clicker:int;// = 0 public function VseActor(_arg1:b2Body, _arg2:DisplayObject){ clicker = 0; navodBOO = false; SDUV = 0; super(); _body = _arg1; _body.SetUserData(this); _costume = _arg2; updateMyLook(); } protected function cleanUpBeforeRemoving():void{ } public function getSpriteLoc():Point{ return (new Point(_costume.x, _costume.y)); } public function getSprite():DisplayObject{ return (_costume); } protected function childSpecificUpdating():void{ } public function updateMyLook():void{ _costume.x = (_body.GetPosition().x * PhisicConstants.RATIO); _costume.y = (_body.GetPosition().y * PhisicConstants.RATIO); _costume.rotation = ((_body.GetAngle() * 180) / Math.PI); } public function updateNow():void{ if (_body.IsAwake()){ updateMyLook(); }; childSpecificUpdating(); } public function destroy():void{ cleanUpBeforeRemoving(); _costume.parent.removeChild(_costume); PhisicConstants.world.DestroyBody(_body); } } }//package

Library Items

Symbol 1 Sound {transp_sound}
Symbol 2 Sound {gui_menu_click}
Symbol 3 Sound {gui_click}
Symbol 4 Sound {ep5_baba}
Symbol 5 Sound {ep4_plane}
Symbol 6 Sound {ep4_baba}
Symbol 7 Sound {ep3_baba}
Symbol 8 Sound {ep2_wings}
Symbol 9 Sound {ep2_baba}
Symbol 10 Sound {ep1_flush2}
Symbol 11 Sound {ep1_flush1}
Symbol 12 Sound {ep1_baba}
Symbol 13 Sound {entershop_sound}
Symbol 14 Sound {bon_perf}
Symbol 15 Sound {bon_good}
Symbol 16 Sound {bon_360}
Symbol 17 BitmapUsed by:18
Symbol 18 GraphicUses:17Used by:97
Symbol 19 FontUsed by:20 27 30 316 317 930
Symbol 20 TextUses:19Used by:21 926
Symbol 21 MovieClipUses:20Used by:22
Symbol 22 MovieClip {game27Flashka_armor_fla.t3_mm_398}Uses:21Used by:97
Symbol 23 BitmapUsed by:24
Symbol 24 GraphicUses:23Used by:25 26
Symbol 25 MovieClipUses:24Used by:26
Symbol 26 MovieClip {game27Flashka_armor_fla.main_her_mm_400}Uses:25 24Used by:97
Symbol 27 TextUses:19Used by:28
Symbol 28 MovieClipUses:27Used by:29
Symbol 29 MovieClip {game27Flashka_armor_fla.t1_mm_402}Uses:28Used by:97
Symbol 30 TextUses:19Used by:31
Symbol 31 MovieClipUses:30Used by:32
Symbol 32 MovieClip {game27Flashka_armor_fla.t2_mm_404}Uses:31Used by:97
Symbol 33 GraphicUsed by:40 42 53 55 96 142
Symbol 34 FontUsed by:35 36 37 38 41 47 48 49 52 54 57 58 59 60 62 66 69 71 73 75 93 124 125 126 127 130 132 133 138 139 140 141 149 150 151 152 156 157 158 159 160 161 162 163 164 165 166 167 169 171 173 174 183 184 192 193 194 195 196 197 198 199 200 201 203 204 205 208 209 212 213 214 254 255 256 309 310 331 332 333 352 355 357 360 361 362 363 369 375 381 423 431 432 435 436 509 511 921 922 923 924 927 928 929 940 945 951
Symbol 35 TextUses:34Used by:39
Symbol 36 TextUses:34Used by:39
Symbol 37 TextUses:34Used by:39
Symbol 38 TextUses:34Used by:39
Symbol 39 MovieClipUses:35 36 37 38Used by:40
Symbol 40 MovieClipUses:33 39Used by:97
Symbol 41 TextUses:34Used by:42
Symbol 42 ButtonUses:33 41Used by:97
Symbol 43 GraphicUsed by:45
Symbol 44 GraphicUsed by:45
Symbol 45 MovieClip {game27Flashka_armor_fla.sound2_410}Uses:43 44Used by:51
Symbol 46 GraphicUsed by:50 74 76 202 334 990
Symbol 47 TextUses:34Used by:50
Symbol 48 TextUses:34Used by:50
Symbol 49 TextUses:34Used by:50
Symbol 50 MovieClip {game27Flashka_armor_fla.btn_q2_411}Uses:46 47 48 49Used by:51
Symbol 51 MovieClip {game27Flashka_armor_fla.sound_menu_409}Uses:45 50Used by:97
Symbol 52 TextUses:34Used by:53
Symbol 53 ButtonUses:33 52Used by:97
Symbol 54 TextUses:34Used by:55 142
Symbol 55 ButtonUses:33 54Used by:97
Symbol 56 GraphicUsed by:64
Symbol 57 TextUses:34Used by:64
Symbol 58 TextUses:34Used by:64
Symbol 59 TextUses:34Used by:64
Symbol 60 TextUses:34Used by:63
Symbol 61 GraphicUsed by:63
Symbol 62 TextUses:34Used by:63
Symbol 63 ButtonUses:60 61 62Used by:64
Symbol 64 MovieClip {game27Flashka_armor_fla.cred_pan_b_415}Uses:56 57 58 59 63Used by:65
Symbol 65 MovieClip {game27Flashka_armor_fla.cred_pan_414}Uses:64Used by:97
Symbol 66 TextUses:34Used by:68
Symbol 67 GraphicUsed by:68 70 72
Symbol 68 ButtonUses:66 67Used by:78
Symbol 69 TextUses:34Used by:70
Symbol 70 ButtonUses:69 67Used by:78
Symbol 71 TextUses:34Used by:72
Symbol 72 ButtonUses:71 67Used by:78
Symbol 73 TextUses:34Used by:74
Symbol 74 ButtonUses:73 46Used by:78
Symbol 75 TextUses:34Used by:76
Symbol 76 ButtonUses:75 46Used by:78
Symbol 77 GraphicUsed by:78 118 1125
Symbol 78 MovieClip {game27Flashka_armor_fla.epoques_417}Uses:68 70 72 74 76 77Used by:97
Symbol 79 GraphicUsed by:88 90
Symbol 80 BitmapUsed by:81
Symbol 81 GraphicUses:80Used by:82 90
Symbol 82 MovieClipUses:81Used by:88
Symbol 83 GraphicUsed by:88 90 938 939
Symbol 84 GraphicUsed by:85 90 936 939
Symbol 85 MovieClipUses:84Used by:88
Symbol 86 GraphicUsed by:87 90 937 939
Symbol 87 MovieClipUses:86Used by:88
Symbol 88 MovieClipUses:79 82 83 85 87Used by:90
Symbol 89 GraphicUsed by:90 939
Symbol 90 ButtonUses:88 89 79 81 83 84 86Used by:97
Symbol 91 BitmapUsed by:92 95
Symbol 92 GraphicUses:91Used by:96
Symbol 93 TextUses:34Used by:94
Symbol 94 ButtonUses:93Used by:96
Symbol 95 GraphicUses:91Used by:96
Symbol 96 ButtonUses:92 94 33 95Used by:97 177
Symbol 97 MovieClip {main_menu}Uses:18 22 26 29 32 40 42 51 53 55 65 78 90 96
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:98Used by:117
Symbol 100 GraphicUsed by:117
Symbol 101 GraphicUsed by:117
Symbol 102 BitmapUsed by:103
Symbol 103 GraphicUses:102Used by:117
Symbol 104 SoundUsed by:117
Symbol 105 SoundUsed by:117
Symbol 106 GraphicUsed by:117
Symbol 107 GraphicUsed by:108
Symbol 108 MovieClipUses:107Used by:117
Symbol 109 SoundUsed by:117
Symbol 110 SoundUsed by:117
Symbol 111 SoundUsed by:117
Symbol 112 SoundUsed by:117
Symbol 113 SoundUsed by:117
Symbol 114 GraphicUsed by:115
Symbol 115 MovieClipUses:114Used by:117
Symbol 116 SoundUsed by:117
Symbol 117 MovieClip {ag_intro_mc}Uses:99 100 101 103 104 105 106 108 109 110 111 112 113 115 116
Symbol 118 MovieClipUses:77Used by:178
Symbol 119 GraphicUsed by:120
Symbol 120 MovieClipUses:119Used by:121
Symbol 121 MovieClipUses:120Used by:177
Symbol 122 GraphicUsed by:177
Symbol 123 GraphicUsed by:129
Symbol 124 TextUses:34Used by:129
Symbol 125 TextUses:34Used by:129
Symbol 126 TextUses:34Used by:129
Symbol 127 TextUses:34Used by:129 510 512
Symbol 128 GraphicUsed by:129
Symbol 129 ButtonUses:123 124 125 126 127 128Used by:177
Symbol 130 TextUses:34Used by:177
Symbol 131 GraphicUsed by:135
Symbol 132 TextUses:34Used by:135
Symbol 133 TextUses:34Used by:135
Symbol 134 GraphicUsed by:135
Symbol 135 ButtonUses:131 132 133 134Used by:177
Symbol 136 BitmapUsed by:137
Symbol 137 GraphicUses:136Used by:177
Symbol 138 EditableTextUses:34Used by:177
Symbol 139 TextUses:34Used by:177
Symbol 140 EditableTextUses:34Used by:177
Symbol 141 TextUses:34Used by:177
Symbol 142 ButtonUses:33 54Used by:177
Symbol 143 GraphicUsed by:177
Symbol 144 BitmapUsed by:145
Symbol 145 GraphicUses:144Used by:168 175
Symbol 146 BitmapUsed by:147
Symbol 147 GraphicUses:146Used by:148
Symbol 148 MovieClipUses:147Used by:168
Symbol 149 TextUses:34Used by:168
Symbol 150 TextUses:34Used by:168
Symbol 151 TextUses:34Used by:168
Symbol 152 TextUses:34Used by:168
Symbol 153 BitmapUsed by:154
Symbol 154 GraphicUses:153Used by:155
Symbol 155 MovieClipUses:154Used by:168
Symbol 156 TextUses:34Used by:168
Symbol 157 TextUses:34Used by:168
Symbol 158 TextUses:34Used by:168
Symbol 159 TextUses:34Used by:168
Symbol 160 TextUses:34Used by:168
Symbol 161 TextUses:34Used by:168
Symbol 162 TextUses:34Used by:168
Symbol 163 TextUses:34Used by:168
Symbol 164 TextUses:34Used by:168
Symbol 165 TextUses:34Used by:168
Symbol 166 TextUses:34Used by:168
Symbol 167 TextUses:34Used by:168
Symbol 168 MovieClip {game27Flashka_armor_fla.i_upgrades_m_390}Uses:145 148 149 150 151 152 155 156 157 158 159 160 161 162 163 164 165 166 167Used by:175
Symbol 169 EditableTextUses:34Used by:175
Symbol 170 GraphicUsed by:172
Symbol 171 TextUses:34Used by:172
Symbol 172 ButtonUses:170 171Used by:175
Symbol 173 EditableTextUses:34Used by:175
Symbol 174 EditableTextUses:34Used by:175
Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389}Uses:145 168 169 172 173 174Used by:176
Symbol 176 MovieClip {game27Flashka_armor_fla.shop_388}Uses:175Used by:177
Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380}Uses:121 122 129 130 135 137 138 139 140 141 142 96 143 176Used by:178
Symbol 178 MovieClip {between}Uses:118 177
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClipUses:179Used by:181 1084 1101
Symbol 181 MovieClip {blast_in}Uses:180
Symbol 182 GraphicUsed by:187
Symbol 183 TextUses:34Used by:187
Symbol 184 TextUses:34Used by:187
Symbol 185 GraphicUsed by:187
Symbol 186 GraphicUsed by:187
Symbol 187 ButtonUses:182 183 184 185 186Used by:188
Symbol 188 MovieClip {game27Flashka_armor_fla.new_shop_m_363}Uses:187Used by:227
Symbol 189 BitmapUsed by:190
Symbol 190 GraphicUses:189Used by:191
Symbol 191 MovieClipUses:190Used by:227
Symbol 192 TextUses:34Used by:227
Symbol 193 TextUses:34Used by:227
Symbol 194 TextUses:34Used by:227
Symbol 195 EditableTextUses:34Used by:227
Symbol 196 EditableTextUses:34Used by:227
Symbol 197 EditableTextUses:34Used by:227
Symbol 198 TextUses:34Used by:227
Symbol 199 EditableTextUses:34Used by:227
Symbol 200 EditableTextUses:34Used by:227
Symbol 201 TextUses:34Used by:202
Symbol 202 ButtonUses:46 201Used by:227
Symbol 203 TextUses:34Used by:206
Symbol 204 TextUses:34Used by:206 210
Symbol 205 EditableTextUses:34Used by:206
Symbol 206 MovieClip {game27Flashka_armor_fla.bon_g_t_m_368}Uses:203 204 205Used by:207
Symbol 207 MovieClip {game27Flashka_armor_fla.bon_good_367}Uses:206Used by:227
Symbol 208 TextUses:34Used by:210
Symbol 209 EditableTextUses:34Used by:210
Symbol 210 MovieClip {game27Flashka_armor_fla.bon_p_t_m_370}Uses:208 204 209Used by:211
Symbol 211 MovieClip {game27Flashka_armor_fla.bon_perf_369}Uses:210Used by:227
Symbol 212 TextUses:34Used by:215
Symbol 213 TextUses:34Used by:215
Symbol 214 EditableTextUses:34Used by:215
Symbol 215 MovieClip {game27Flashka_armor_fla.bon_360_t_m_372}Uses:212 213 214Used by:216
Symbol 216 MovieClip {game27Flashka_armor_fla.bon_360_371}Uses:215Used by:227
Symbol 217 BitmapUsed by:218
Symbol 218 GraphicUses:217Used by:219
Symbol 219 MovieClip {game27Flashka_armor_fla.tut2m_373}Uses:218Used by:227
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:222
Symbol 222 MovieClipUses:221Used by:223
Symbol 223 MovieClip {game27Flashka_armor_fla.tut4m_374}Uses:222Used by:227
Symbol 224 BitmapUsed by:225
Symbol 225 GraphicUses:224Used by:226
Symbol 226 MovieClip {game27Flashka_armor_fla.tut5m_376}Uses:225Used by:227
Symbol 227 MovieClip {game_menu}Uses:188 191 192 193 194 195 196 197 198 199 200 202 207 211 216 219 223 226
Symbol 228 BitmapUsed by:229
Symbol 229 GraphicUses:228Used by:230
Symbol 230 MovieClipUses:229Used by:249
Symbol 231 BitmapUsed by:232
Symbol 232 GraphicUses:231Used by:233
Symbol 233 MovieClipUses:232Used by:249
Symbol 234 BitmapUsed by:235 236
Symbol 235 GraphicUses:234Used by:249
Symbol 236 GraphicUses:234Used by:249
Symbol 237 BitmapUsed by:238
Symbol 238 GraphicUses:237Used by:239
Symbol 239 MovieClipUses:238Used by:240 994 995
Symbol 240 MovieClipUses:239Used by:249
Symbol 241 BitmapUsed by:242
Symbol 242 GraphicUses:241Used by:249
Symbol 243 BitmapUsed by:244
Symbol 244 GraphicUses:243Used by:245
Symbol 245 MovieClipUses:244Used by:248 249
Symbol 246 BitmapUsed by:247
Symbol 247 GraphicUses:246Used by:249
Symbol 248 MovieClip {game27Flashka_armor_fla.ep01_cro2mm_361}Uses:245Used by:249
Symbol 249 MovieClip {ep1_en_earth1}Uses:230 233 235 236 240 242 245 247 248
Symbol 250 BitmapUsed by:251
Symbol 251 GraphicUses:250Used by:252
Symbol 252 MovieClip {tut3}Uses:251
Symbol 253 GraphicUsed by:259
Symbol 254 TextUses:34Used by:259
Symbol 255 TextUses:34Used by:259
Symbol 256 TextUses:34Used by:259
Symbol 257 GraphicUsed by:259
Symbol 258 GraphicUsed by:259
Symbol 259 ButtonUses:253 254 255 256 257 258Used by:260 1109
Symbol 260 MovieClip {her01_panel_usk1}Uses:259
Symbol 261 BitmapUsed by:262
Symbol 262 GraphicUses:261Used by:263
Symbol 263 MovieClip {her04wheel10}Uses:262
Symbol 264 BitmapUsed by:265
Symbol 265 GraphicUses:264Used by:266
Symbol 266 MovieClip {her04wheel16}Uses:265
Symbol 267 BitmapUsed by:268
Symbol 268 GraphicUses:267Used by:269
Symbol 269 MovieClipUses:268Used by:270
Symbol 270 MovieClipUses:269Used by:275 276
Symbol 271 BitmapUsed by:272
Symbol 272 GraphicUses:271Used by:273
Symbol 273 MovieClipUses:272Used by:274
Symbol 274 MovieClipUses:273Used by:275 276
Symbol 275 MovieClip {game27Flashka_armor_fla.her01sliv1_331}Uses:270 274Used by:307
Symbol 276 MovieClip {game27Flashka_armor_fla.her01sliv2_336}Uses:270 274Used by:307
Symbol 277 BitmapUsed by:278
Symbol 278 GraphicUses:277Used by:279
Symbol 279 MovieClipUses:278Used by:280 281
Symbol 280 MovieClipUses:279Used by:282
Symbol 281 MovieClipUses:279Used by:282
Symbol 282 MovieClipUses:280 281Used by:307
Symbol 283 BitmapUsed by:284
Symbol 284 GraphicUses:283Used by:307
Symbol 285 BitmapUsed by:287 289
Symbol 286 BitmapUsed by:287 288
Symbol 287 GraphicUses:285 286Used by:292
Symbol 288 GraphicUses:286Used by:292
Symbol 289 GraphicUses:285Used by:290
Symbol 290 MovieClipUses:289Used by:291
Symbol 291 MovieClipUses:290Used by:292
Symbol 292 MovieClip {game27Flashka_armor_fla.up04_baba_341}Uses:287 288 291Used by:307
Symbol 293 BitmapUsed by:294
Symbol 294 GraphicUses:293Used by:299
Symbol 295 BitmapUsed by:296
Symbol 296 GraphicUses:295Used by:297
Symbol 297 MovieClipUses:296Used by:298
Symbol 298 MovieClipUses:297Used by:299
Symbol 299 MovieClipUses:294 298Used by:300
Symbol 300 MovieClipUses:299Used by:301
Symbol 301 MovieClip {game27Flashka_armor_fla.up04usk1_344}Uses:300Used by:307
Symbol 302 BitmapUsed by:303
Symbol 303 GraphicUses:302Used by:304
Symbol 304 MovieClipUses:303Used by:305
Symbol 305 MovieClipUses:304Used by:306
Symbol 306 MovieClip {game27Flashka_armor_fla.up04plane_349}Uses:305Used by:307
Symbol 307 MovieClip {hero4}Uses:275 276 282 284 292 301 306
Symbol 308 GraphicUsed by:311
Symbol 309 TextUses:34Used by:311
Symbol 310 TextUses:34Used by:311
Symbol 311 MovieClipUses:308 309 310Used by:312
Symbol 312 MovieClip {tut1m}Uses:311
Symbol 313 GraphicUsed by:314
Symbol 314 MovieClipUses:313Used by:315
Symbol 315 MovieClipUses:314Used by:319
Symbol 316 TextUses:19Used by:319
Symbol 317 TextUses:19Used by:319
Symbol 318 GraphicUsed by:319
Symbol 319 ButtonUses:315 316 317 318Used by:320
Symbol 320 MovieClip {avoid_but}Uses:319
Symbol 321 BitmapUsed by:322
Symbol 322 GraphicUses:321Used by:323
Symbol 323 MovieClipUses:322Used by:335
Symbol 324 BitmapUsed by:325
Symbol 325 GraphicUses:324Used by:326
Symbol 326 MovieClipUses:325Used by:327
Symbol 327 MovieClipUses:326Used by:335
Symbol 328 GraphicUsed by:330
Symbol 329 GraphicUsed by:330
Symbol 330 MovieClip {game27Flashka_armor_fla.sound_322}Uses:328 329Used by:335
Symbol 331 TextUses:34Used by:334
Symbol 332 TextUses:34Used by:334
Symbol 333 TextUses:34Used by:334
Symbol 334 MovieClip {game27Flashka_armor_fla.btn_q2_323}Uses:46 331 332 333Used by:335
Symbol 335 MovieClip {menu_sliv2}Uses:323 327 330 334
Symbol 336 GraphicUsed by:337
Symbol 337 MovieClip {ar_out}Uses:336Used by:338
Symbol 338 MovieClipUses:337Used by:339
Symbol 339 MovieClip {arrow_out}Uses:338
Symbol 340 BitmapUsed by:342 367 373 379 420 440 448 452
Symbol 341 BitmapUsed by:342
Symbol 342 GraphicUses:340 341Used by:347
Symbol 343 BitmapUsed by:344
Symbol 344 GraphicUses:343Used by:345
Symbol 345 MovieClipUses:344Used by:346
Symbol 346 MovieClipUses:345Used by:347
Symbol 347 MovieClipUses:342 346Used by:354
Symbol 348 BitmapUsed by:349
Symbol 349 GraphicUses:348Used by:350
Symbol 350 MovieClipUses:349Used by:351
Symbol 351 MovieClipUses:350Used by:354 371 377 383 430 446 450 454
Symbol 352 TextUses:34Used by:353
Symbol 353 MovieClipUses:352Used by:354 430
Symbol 354 MovieClip {game27Flashka_armor_fla.com2_1mm_302}Uses:347 351 353Used by:384
Symbol 355 TextUses:34Used by:358
Symbol 356 GraphicUsed by:358 364 433 437
Symbol 357 TextUses:34Used by:358
Symbol 358 ButtonUses:355 356 357Used by:359 434
Symbol 359 MovieClip {game27Flashka_armor_fla.com2_buttons_306}Uses:358Used by:384
Symbol 360 TextUses:34Used by:364
Symbol 361 TextUses:34Used by:364 437
Symbol 362 TextUses:34Used by:364
Symbol 363 TextUses:34Used by:364 437
Symbol 364 ButtonUses:360 361 356 362 363Used by:365
Symbol 365 MovieClip {game27Flashka_armor_fla.com2_but_end_307}Uses:364Used by:384
Symbol 366 BitmapUsed by:367
Symbol 367 GraphicUses:340 366Used by:368
Symbol 368 MovieClipUses:367Used by:371
Symbol 369 TextUses:34Used by:370
Symbol 370 MovieClipUses:369Used by:371 446
Symbol 371 MovieClip {game27Flashka_armor_fla.com2_2mm_309}Uses:368 351 370Used by:384
Symbol 372 BitmapUsed by:373
Symbol 373 GraphicUses:340 372Used by:374
Symbol 374 MovieClipUses:373Used by:377
Symbol 375 TextUses:34Used by:376
Symbol 376 MovieClipUses:375Used by:377 450
Symbol 377 MovieClip {game27Flashka_armor_fla.com2_3mm_311}Uses:374 351 376Used by:384
Symbol 378 BitmapUsed by:379
Symbol 379 GraphicUses:340 378Used by:380
Symbol 380 MovieClipUses:379Used by:383
Symbol 381 TextUses:34Used by:382
Symbol 382 MovieClipUses:381Used by:383 454
Symbol 383 MovieClip {game27Flashka_armor_fla.com2_4mm_313}Uses:380 351 382Used by:384
Symbol 384 MovieClip {comics2}Uses:354 359 365 371 377 383
Symbol 385 BitmapUsed by:386
Symbol 386 GraphicUses:385Used by:417
Symbol 387 BitmapUsed by:388
Symbol 388 GraphicUses:387Used by:417
Symbol 389 BitmapUsed by:390
Symbol 390 GraphicUses:389Used by:417
Symbol 391 BitmapUsed by:392
Symbol 392 GraphicUses:391Used by:417
Symbol 393 BitmapUsed by:394
Symbol 394 GraphicUses:393Used by:417
Symbol 395 BitmapUsed by:396
Symbol 396 GraphicUses:395Used by:417
Symbol 397 BitmapUsed by:398
Symbol 398 GraphicUses:397Used by:417
Symbol 399 BitmapUsed by:400
Symbol 400 GraphicUses:399Used by:417
Symbol 401 BitmapUsed by:402
Symbol 402 GraphicUses:401Used by:417
Symbol 403 BitmapUsed by:404
Symbol 404 GraphicUses:403Used by:417
Symbol 405 BitmapUsed by:406
Symbol 406 GraphicUses:405Used by:417
Symbol 407 BitmapUsed by:408
Symbol 408 GraphicUses:407Used by:417
Symbol 409 BitmapUsed by:410
Symbol 410 GraphicUses:409Used by:417
Symbol 411 BitmapUsed by:412
Symbol 412 GraphicUses:411Used by:417
Symbol 413 BitmapUsed by:414
Symbol 414 GraphicUses:413Used by:417
Symbol 415 BitmapUsed by:416
Symbol 416 GraphicUses:415Used by:417
Symbol 417 MovieClip {game27Flashka_armor_fla.expl01slow_300}Uses:386 388 390 392 394 396 398 400 402 404 406 408 410 412 414 416Used by:418
Symbol 418 MovieClip {blow_bomb}Uses:417
Symbol 419 BitmapUsed by:420
Symbol 420 GraphicUses:340 419Used by:429
Symbol 421 BitmapUsed by:422
Symbol 422 GraphicUses:421Used by:424
Symbol 423 TextUses:34Used by:424
Symbol 424 MovieClipUses:422 423Used by:425
Symbol 425 MovieClipUses:424Used by:429
Symbol 426 GraphicUsed by:427
Symbol 427 MovieClipUses:426Used by:428
Symbol 428 MovieClipUses:427Used by:429 445
Symbol 429 MovieClipUses:420 425 428Used by:430
Symbol 430 MovieClip {game27Flashka_armor_fla.com1_1mm_273}Uses:429 351 353Used by:456
Symbol 431 TextUses:34Used by:433
Symbol 432 TextUses:34Used by:433
Symbol 433 ButtonUses:431 356 432Used by:434
Symbol 434 MovieClip {game27Flashka_armor_fla.com1_buttons_282}Uses:433 358Used by:456
Symbol 435 TextUses:34Used by:437
Symbol 436 TextUses:34Used by:437
Symbol 437 ButtonUses:435 361 356 436 363Used by:438
Symbol 438 MovieClip {game27Flashka_armor_fla.com1_but_end_285}Uses:437Used by:456
Symbol 439 BitmapUsed by:440
Symbol 440 GraphicUses:340 439Used by:445
Symbol 441 BitmapUsed by:442
Symbol 442 GraphicUses:441Used by:443
Symbol 443 MovieClipUses:442Used by:444
Symbol 444 MovieClipUses:443Used by:445
Symbol 445 MovieClipUses:440 428 444Used by:446
Symbol 446 MovieClip {game27Flashka_armor_fla.com1_2mm_287}Uses:445 351 370Used by:456
Symbol 447 BitmapUsed by:448
Symbol 448 GraphicUses:340 447Used by:449
Symbol 449 MovieClipUses:448Used by:450
Symbol 450 MovieClip {game27Flashka_armor_fla.com1_3mm_292}Uses:449 351 376Used by:456
Symbol 451 BitmapUsed by:452
Symbol 452 GraphicUses:340 451Used by:453
Symbol 453 MovieClipUses:452Used by:454 455
Symbol 454 MovieClip {game27Flashka_armor_fla.com1_4mm_295}Uses:453 351 382Used by:456
Symbol 455 MovieClip {game27Flashka_armor_fla.com1_4mm_out_298}Uses:453Used by:456
Symbol 456 MovieClip {comics}Uses:430 434 438 446 450 454 455
Symbol 457 BitmapUsed by:459 462
Symbol 458 BitmapUsed by:459 461
Symbol 459 GraphicUses:457 458Used by:460
Symbol 460 MovieClipUses:459Used by:487
Symbol 461 GraphicUses:458Used by:487
Symbol 462 GraphicUses:457Used by:463
Symbol 463 MovieClipUses:462Used by:487
Symbol 464 BitmapUsed by:465
Symbol 465 GraphicUses:464Used by:476
Symbol 466 BitmapUsed by:467
Symbol 467 GraphicUses:466Used by:476
Symbol 468 BitmapUsed by:469
Symbol 469 GraphicUses:468Used by:476
Symbol 470 BitmapUsed by:471
Symbol 471 GraphicUses:470Used by:476
Symbol 472 BitmapUsed by:473
Symbol 473 GraphicUses:472Used by:476
Symbol 474 BitmapUsed by:475
Symbol 475 GraphicUses:474Used by:476
Symbol 476 MovieClipUses:465 467 469 471 473 475Used by:487 491 1130
Symbol 477 BitmapUsed by:478 479 480
Symbol 478 GraphicUses:477Used by:481
Symbol 479 GraphicUses:477Used by:481
Symbol 480 GraphicUses:477Used by:481
Symbol 481 MovieClipUses:478 479 480Used by:487
Symbol 482 BitmapUsed by:483 484 485
Symbol 483 GraphicUses:482Used by:486
Symbol 484 GraphicUses:482Used by:486
Symbol 485 GraphicUses:482Used by:486
Symbol 486 MovieClipUses:483 484 485Used by:487
Symbol 487 MovieClip {meteor04}Uses:460 461 463 476 481 486
Symbol 488 BitmapUsed by:489
Symbol 489 GraphicUses:488Used by:490
Symbol 490 MovieClipUses:489Used by:491
Symbol 491 MovieClip {meteor03}Uses:490 476
Symbol 492 BitmapUsed by:493
Symbol 493 GraphicUses:492Used by:508
Symbol 494 GraphicUsed by:495
Symbol 495 MovieClip {game27Flashka_armor_fla.boom1_6}Uses:494Used by:508 1143
Symbol 496 BitmapUsed by:497
Symbol 497 GraphicUses:496Used by:508
Symbol 498 BitmapUsed by:499
Symbol 499 GraphicUses:498Used by:508
Symbol 500 BitmapUsed by:501
Symbol 501 GraphicUses:500Used by:508
Symbol 502 BitmapUsed by:503
Symbol 503 GraphicUses:502Used by:508
Symbol 504 BitmapUsed by:505
Symbol 505 GraphicUses:504Used by:506
Symbol 506 MovieClipUses:505Used by:507
Symbol 507 MovieClip {game27Flashka_armor_fla.en3_blood_263}Uses:506Used by:508
Symbol 508 MovieClip {ep1_en_sky1}Uses:493 495 497 499 501 503 507
Symbol 509 TextUses:34Used by:510
Symbol 510 MovieClip {cur_flush}Uses:509 127
Symbol 511 TextUses:34Used by:512
Symbol 512 MovieClip {cur_shoot}Uses:511 127
Symbol 513 BitmapUsed by:514
Symbol 514 GraphicUses:513Used by:579
Symbol 515 BitmapUsed by:516 695
Symbol 516 GraphicUses:515Used by:517
Symbol 517 MovieClipUses:516Used by:579 619
Symbol 518 BitmapUsed by:519
Symbol 519 GraphicUses:518Used by:579
Symbol 520 BitmapUsed by:521
Symbol 521 GraphicUses:520Used by:522
Symbol 522 MovieClipUses:521Used by:579
Symbol 523 GraphicUsed by:526 527
Symbol 524 GraphicUsed by:525
Symbol 525 MovieClipUses:524Used by:526 527
Symbol 526 MovieClipUses:523 525Used by:528
Symbol 527 MovieClipUses:523 525Used by:528
Symbol 528 MovieClip {game27Flashka_armor_fla.power_m_157}Uses:526 527Used by:579 619 719 760 801
Symbol 529 BitmapUsed by:530
Symbol 530 GraphicUses:529Used by:531
Symbol 531 MovieClipUses:530Used by:532
Symbol 532 MovieClipUses:531Used by:537 538
Symbol 533 BitmapUsed by:534
Symbol 534 GraphicUses:533Used by:535
Symbol 535 MovieClipUses:534Used by:536
Symbol 536 MovieClipUses:535Used by:537 538
Symbol 537 MovieClip {game27Flashka_armor_fla.her01sliv1_134}Uses:532 536Used by:576 617 716 757 798
Symbol 538 MovieClip {game27Flashka_armor_fla.her01sliv2_139}Uses:532 536Used by:576 617 716 757 798
Symbol 539 BitmapUsed by:540
Symbol 540 GraphicUses:539Used by:541
Symbol 541 MovieClipUses:540Used by:542
Symbol 542 MovieClipUses:541Used by:547
Symbol 543 BitmapUsed by:544
Symbol 544 GraphicUses:543Used by:545
Symbol 545 MovieClipUses:544Used by:546
Symbol 546 MovieClip {game27Flashka_armor_fla.bl_01_mm_245}Uses:545Used by:547
Symbol 547 MovieClip {game27Flashka_armor_fla.her5_blood_242}Uses:542 546Used by:576
Symbol 548 BitmapUsed by:549
Symbol 549 GraphicUses:548Used by:550
Symbol 550 MovieClipUses:549Used by:551
Symbol 551 MovieClipUses:550Used by:552
Symbol 552 MovieClip {game27Flashka_armor_fla.up05usk1_247}Uses:551Used by:576
Symbol 553 GraphicUsed by:557 838
Symbol 554 BitmapUsed by:555
Symbol 555 GraphicUses:554Used by:557
Symbol 556 GraphicUsed by:557 838
Symbol 557 MovieClip {game27Flashka_armor_fla.hero5_bezb_250}Uses:553 555 556Used by:576
Symbol 558 GraphicUsed by:563 839
Symbol 559 GraphicUsed by:563 839
Symbol 560 GraphicUsed by:563 839
Symbol 561 GraphicUsed by:563 839
Symbol 562 GraphicUsed by:563 839
Symbol 563 MovieClipUses:558 559 560 561 562Used by:564
Symbol 564 MovieClipUses:563Used by:565
Symbol 565 MovieClip {game27Flashka_armor_fla.laser_251}Uses:564Used by:576
Symbol 566 BitmapUsed by:567
Symbol 567 GraphicUses:566Used by:573 575
Symbol 568 BitmapUsed by:569
Symbol 569 GraphicUses:568Used by:570 571
Symbol 570 MovieClipUses:569Used by:575
Symbol 571 MovieClipUses:569Used by:572
Symbol 572 MovieClipUses:571Used by:573
Symbol 573 MovieClipUses:567 572Used by:574
Symbol 574 MovieClipUses:573Used by:575
Symbol 575 MovieClip {game27Flashka_armor_fla.up05_baba_254}Uses:567 570 574Used by:576
Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241}Uses:537 538 547 552 557 565 575Used by:579
Symbol 577 BitmapUsed by:578 807
Symbol 578 GraphicUses:577Used by:579
Symbol 579 MovieClip {pulyalka5}Uses:514 517 519 522 528 576 578
Symbol 580 BitmapUsed by:581 618 806
Symbol 581 GraphicUses:580Used by:619
Symbol 582 BitmapUsed by:583
Symbol 583 GraphicUses:582Used by:619
Symbol 584 BitmapUsed by:585
Symbol 585 GraphicUses:584Used by:586
Symbol 586 MovieClipUses:585Used by:619
Symbol 587 BitmapUsed by:588
Symbol 588 GraphicUses:587Used by:589
Symbol 589 MovieClipUses:588Used by:590 591
Symbol 590 MovieClipUses:589Used by:592
Symbol 591 MovieClipUses:589Used by:592
Symbol 592 MovieClipUses:590 591Used by:617
Symbol 593 BitmapUsed by:594
Symbol 594 GraphicUses:593Used by:617
Symbol 595 BitmapUsed by:597 599
Symbol 596 BitmapUsed by:597 598
Symbol 597 GraphicUses:595 596Used by:602
Symbol 598 GraphicUses:596Used by:602
Symbol 599 GraphicUses:595Used by:600
Symbol 600 MovieClipUses:599Used by:601
Symbol 601 MovieClipUses:600Used by:602
Symbol 602 MovieClip {game27Flashka_armor_fla.up04_baba_228}Uses:597 598 601Used by:617
Symbol 603 BitmapUsed by:604
Symbol 604 GraphicUses:603Used by:609
Symbol 605 BitmapUsed by:606
Symbol 606 GraphicUses:605Used by:607
Symbol 607 MovieClipUses:606Used by:608
Symbol 608 MovieClipUses:607Used by:609
Symbol 609 MovieClipUses:604 608Used by:610
Symbol 610 MovieClipUses:609Used by:611
Symbol 611 MovieClip {game27Flashka_armor_fla.up04usk1_231}Uses:610Used by:617
Symbol 612 BitmapUsed by:613
Symbol 613 GraphicUses:612Used by:614
Symbol 614 MovieClipUses:613Used by:615
Symbol 615 MovieClipUses:614Used by:616
Symbol 616 MovieClip {game27Flashka_armor_fla.up04plane_236}Uses:615Used by:617
Symbol 617 MovieClip {game27Flashka_armor_fla.hero4_223}Uses:537 538 592 594 602 611 616Used by:619
Symbol 618 GraphicUses:580Used by:619
Symbol 619 MovieClip {pulyalka4}Uses:581 517 583 586 528 617 618
Symbol 620 BitmapUsed by:621
Symbol 621 GraphicUses:620Used by:622
Symbol 622 MovieClipUses:621Used by:623
Symbol 623 MovieClipUses:622Used by:628 629
Symbol 624 BitmapUsed by:625
Symbol 625 GraphicUses:624Used by:626
Symbol 626 MovieClipUses:625Used by:627
Symbol 627 MovieClipUses:626Used by:628 629
Symbol 628 MovieClip {game27Flashka_armor_fla.her01sliv1_200}Uses:623 627Used by:661
Symbol 629 MovieClip {game27Flashka_armor_fla.her01sliv2_205}Uses:623 627Used by:661
Symbol 630 BitmapUsed by:631
Symbol 631 GraphicUses:630Used by:661
Symbol 632 BitmapUsed by:633
Symbol 633 GraphicUses:632Used by:634 636
Symbol 634 MovieClipUses:633Used by:635
Symbol 635 MovieClipUses:634Used by:636
Symbol 636 MovieClip {game27Flashka_armor_fla.hep01_hero_hair_mm_206}Uses:633 635Used by:661
Symbol 637 BitmapUsed by:638
Symbol 638 GraphicUses:637Used by:639 640
Symbol 639 MovieClipUses:638Used by:640
Symbol 640 MovieClip {game27Flashka_armor_fla.up01baba_209}Uses:638 639Used by:661
Symbol 641 GraphicUsed by:654 791
Symbol 642 BitmapUsed by:643
Symbol 643 GraphicUses:642Used by:644
Symbol 644 MovieClipUses:643Used by:645
Symbol 645 MovieClipUses:644Used by:652
Symbol 646 BitmapUsed by:647
Symbol 647 GraphicUses:646Used by:652
Symbol 648 BitmapUsed by:649
Symbol 649 GraphicUses:648Used by:650
Symbol 650 MovieClipUses:649Used by:651
Symbol 651 MovieClipUses:650Used by:652
Symbol 652 MovieClipUses:645 647 651Used by:653
Symbol 653 MovieClipUses:652Used by:654
Symbol 654 MovieClip {game27Flashka_armor_fla.up01usk1_211}Uses:641 653Used by:661
Symbol 655 BitmapUsed by:656
Symbol 656 GraphicUses:655Used by:660
Symbol 657 BitmapUsed by:658
Symbol 658 GraphicUses:657Used by:659
Symbol 659 MovieClipUses:658Used by:660
Symbol 660 MovieClip {game27Flashka_armor_fla.up01dubina_218}Uses:656 659Used by:661
Symbol 661 MovieClip {hero01}Uses:628 629 631 636 640 654 660
Symbol 662 BitmapUsed by:663
Symbol 663 GraphicUses:662Used by:664
Symbol 664 MovieClip {her03wheel16}Uses:663
Symbol 665 BitmapUsed by:666
Symbol 666 GraphicUses:665Used by:667
Symbol 667 MovieClipUses:666Used by:668
Symbol 668 MovieClipUses:667Used by:673 674
Symbol 669 BitmapUsed by:670
Symbol 670 GraphicUses:669Used by:671
Symbol 671 MovieClipUses:670Used by:672
Symbol 672 MovieClipUses:671Used by:673 674
Symbol 673 MovieClip {game27Flashka_armor_fla.her01sliv1_186}Uses:668 672Used by:691
Symbol 674 MovieClip {game27Flashka_armor_fla.her01sliv2_191}Uses:668 672Used by:691
Symbol 675 BitmapUsed by:676
Symbol 676 GraphicUses:675Used by:691
Symbol 677 BitmapUsed by:678
Symbol 678 GraphicUses:677Used by:681
Symbol 679 BitmapUsed by:680
Symbol 680 GraphicUses:679Used by:681
Symbol 681 MovieClip {game27Flashka_armor_fla.ep03_hero_hand_m_192}Uses:678 680Used by:691
Symbol 682 BitmapUsed by:683
Symbol 683 GraphicUses:682Used by:684 685
Symbol 684 MovieClipUses:683Used by:685
Symbol 685 MovieClip {game27Flashka_armor_fla.up03_baba_193}Uses:683 684Used by:691
Symbol 686 BitmapUsed by:687
Symbol 687 GraphicUses:686Used by:688
Symbol 688 MovieClipUses:687Used by:689
Symbol 689 MovieClipUses:688Used by:690
Symbol 690 MovieClip {game27Flashka_armor_fla.up03usk1_195}Uses:689Used by:691
Symbol 691 MovieClip {hero3}Uses:673 674 676 681 685 690
Symbol 692 BitmapUsed by:693
Symbol 693 GraphicUses:692Used by:719
Symbol 694 BitmapUsed by:695 763
Symbol 695 GraphicUses:694 515Used by:696
Symbol 696 MovieClipUses:695Used by:719
Symbol 697 BitmapUsed by:698
Symbol 698 GraphicUses:697Used by:699
Symbol 699 MovieClipUses:698Used by:719
Symbol 700 BitmapUsed by:701
Symbol 701 GraphicUses:700Used by:716
Symbol 702 BitmapUsed by:703
Symbol 703 GraphicUses:702Used by:706
Symbol 704 BitmapUsed by:705
Symbol 705 GraphicUses:704Used by:706
Symbol 706 MovieClip {game27Flashka_armor_fla.ep03_hero_hand_m_179}Uses:703 705Used by:716
Symbol 707 BitmapUsed by:708
Symbol 708 GraphicUses:707Used by:709 710
Symbol 709 MovieClipUses:708Used by:710
Symbol 710 MovieClip {game27Flashka_armor_fla.up03_baba_180}Uses:708 709Used by:716
Symbol 711 BitmapUsed by:712
Symbol 712 GraphicUses:711Used by:713
Symbol 713 MovieClipUses:712Used by:714
Symbol 714 MovieClipUses:713Used by:715
Symbol 715 MovieClip {game27Flashka_armor_fla.up03usk1_182}Uses:714Used by:716
Symbol 716 MovieClip {game27Flashka_armor_fla.hero3_178}Uses:537 538 701 706 710 715Used by:719
Symbol 717 BitmapUsed by:718 805
Symbol 718 GraphicUses:717Used by:719
Symbol 719 MovieClip {pulyalka3}Uses:693 696 699 528 716 718
Symbol 720 BitmapUsed by:721
Symbol 721 GraphicUses:720Used by:760
Symbol 722 BitmapUsed by:723
Symbol 723 GraphicUses:722Used by:724
Symbol 724 MovieClipUses:723Used by:760
Symbol 725 BitmapUsed by:726
Symbol 726 GraphicUses:725Used by:727
Symbol 727 MovieClipUses:726Used by:760
Symbol 728 BitmapUsed by:729 730
Symbol 729 GraphicUses:728Used by:731
Symbol 730 GraphicUses:728Used by:731
Symbol 731 MovieClipUses:729 730Used by:742
Symbol 732 BitmapUsed by:733 734 735
Symbol 733 GraphicUses:732Used by:736
Symbol 734 GraphicUses:732Used by:736
Symbol 735 GraphicUses:732Used by:736
Symbol 736 MovieClipUses:733 734 735Used by:742
Symbol 737 BitmapUsed by:738 739 740
Symbol 738 GraphicUses:737Used by:741
Symbol 739 GraphicUses:737Used by:741
Symbol 740 GraphicUses:737Used by:741
Symbol 741 MovieClipUses:738 739 740Used by:742
Symbol 742 MovieClip {game27Flashka_armor_fla.up02usk1_165}Uses:731 736 741Used by:757
Symbol 743 BitmapUsed by:744
Symbol 744 GraphicUses:743Used by:745
Symbol 745 MovieClipUses:744Used by:746
Symbol 746 MovieClip {game27Flashka_armor_fla.ep02_hero_wings_mm_169}Uses:745Used by:757
Symbol 747 BitmapUsed by:748
Symbol 748 GraphicUses:747Used by:751
Symbol 749 BitmapUsed by:750
Symbol 750 GraphicUses:749Used by:751
Symbol 751 MovieClip {game27Flashka_armor_fla.her2gol_171}Uses:748 750Used by:757
Symbol 752 BitmapUsed by:753
Symbol 753 GraphicUses:752Used by:754 756
Symbol 754 MovieClipUses:753Used by:755
Symbol 755 MovieClipUses:754Used by:756
Symbol 756 MovieClip {game27Flashka_armor_fla.up02baba_172}Uses:753 755Used by:757
Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164}Uses:537 538 742 746 751 756Used by:760
Symbol 758 BitmapUsed by:759 804
Symbol 759 GraphicUses:758Used by:760
Symbol 760 MovieClip {pulyalka2}Uses:721 724 727 528 757 759
Symbol 761 BitmapUsed by:762
Symbol 762 GraphicUses:761Used by:801
Symbol 763 GraphicUses:694Used by:764
Symbol 764 MovieClipUses:763Used by:801
Symbol 765 BitmapUsed by:766
Symbol 766 GraphicUses:765Used by:767
Symbol 767 MovieClipUses:766Used by:801
Symbol 768 BitmapUsed by:769
Symbol 769 GraphicUses:768Used by:798
Symbol 770 BitmapUsed by:771
Symbol 771 GraphicUses:770Used by:772 774
Symbol 772 MovieClipUses:771Used by:773
Symbol 773 MovieClipUses:772Used by:774
Symbol 774 MovieClip {game27Flashka_armor_fla.hep01_hero_hair_mm_140}Uses:771 773Used by:798
Symbol 775 BitmapUsed by:776
Symbol 776 GraphicUses:775Used by:777 778
Symbol 777 MovieClipUses:776Used by:778
Symbol 778 MovieClip {game27Flashka_armor_fla.up01baba_143}Uses:776 777Used by:798
Symbol 779 BitmapUsed by:780
Symbol 780 GraphicUses:779Used by:781
Symbol 781 MovieClipUses:780Used by:782
Symbol 782 MovieClipUses:781Used by:789
Symbol 783 BitmapUsed by:784
Symbol 784 GraphicUses:783Used by:789
Symbol 785 BitmapUsed by:786
Symbol 786 GraphicUses:785Used by:787
Symbol 787 MovieClipUses:786Used by:788
Symbol 788 MovieClipUses:787Used by:789
Symbol 789 MovieClipUses:782 784 788Used by:790
Symbol 790 MovieClipUses:789Used by:791
Symbol 791 MovieClip {game27Flashka_armor_fla.up01usk1_145}Uses:641 790Used by:798
Symbol 792 BitmapUsed by:793
Symbol 793 GraphicUses:792Used by:797
Symbol 794 BitmapUsed by:795
Symbol 795 GraphicUses:794Used by:796
Symbol 796 MovieClipUses:795Used by:797
Symbol 797 MovieClip {game27Flashka_armor_fla.up01dubina_152}Uses:793 796Used by:798
Symbol 798 MovieClip {base_hero_all}Uses:537 538 769 774 778 791 797Used by:801
Symbol 799 BitmapUsed by:800 803
Symbol 800 GraphicUses:799Used by:801
Symbol 801 MovieClip {pulyalka}Uses:762 764 767 528 798 800
Symbol 802 GraphicUsed by:808
Symbol 803 GraphicUses:799Used by:808
Symbol 804 GraphicUses:758Used by:808
Symbol 805 GraphicUses:717Used by:808
Symbol 806 GraphicUses:580Used by:808
Symbol 807 GraphicUses:577Used by:808
Symbol 808 MovieClip {launcher}Uses:802 803 804 805 806 807
Symbol 809 BitmapUsed by:810
Symbol 810 GraphicUses:809Used by:811
Symbol 811 MovieClip {her05wheel16}Uses:810
Symbol 812 BitmapUsed by:813
Symbol 813 GraphicUses:812Used by:814
Symbol 814 MovieClipUses:813Used by:815
Symbol 815 MovieClipUses:814Used by:820 821
Symbol 816 BitmapUsed by:817
Symbol 817 GraphicUses:816Used by:818
Symbol 818 MovieClipUses:817Used by:819
Symbol 819 MovieClipUses:818Used by:820 821
Symbol 820 MovieClip {game27Flashka_armor_fla.her01sliv1_107}Uses:815 819Used by:852
Symbol 821 MovieClip {game27Flashka_armor_fla.her01sliv2_112}Uses:815 819Used by:852
Symbol 822 BitmapUsed by:823
Symbol 823 GraphicUses:822Used by:824
Symbol 824 MovieClipUses:823Used by:825
Symbol 825 MovieClipUses:824Used by:830
Symbol 826 BitmapUsed by:827
Symbol 827 GraphicUses:826Used by:828
Symbol 828 MovieClipUses:827Used by:829
Symbol 829 MovieClip {game27Flashka_armor_fla.bl_01_mm_116}Uses:828Used by:830
Symbol 830 MovieClip {game27Flashka_armor_fla.her5_blood_113}Uses:825 829Used by:852
Symbol 831 BitmapUsed by:832
Symbol 832 GraphicUses:831Used by:833
Symbol 833 MovieClipUses:832Used by:834
Symbol 834 MovieClipUses:833Used by:835
Symbol 835 MovieClip {game27Flashka_armor_fla.up05usk1_118}Uses:834Used by:852
Symbol 836 BitmapUsed by:837
Symbol 837 GraphicUses:836Used by:838
Symbol 838 MovieClip {game27Flashka_armor_fla.hero5_bezb_121}Uses:553 837 556Used by:852
Symbol 839 MovieClipUses:558 559 560 561 562Used by:840
Symbol 840 MovieClipUses:839Used by:841
Symbol 841 MovieClip {game27Flashka_armor_fla.laser_122}Uses:840Used by:852
Symbol 842 BitmapUsed by:843
Symbol 843 GraphicUses:842Used by:849 851
Symbol 844 BitmapUsed by:845
Symbol 845 GraphicUses:844Used by:846 847
Symbol 846 MovieClipUses:845Used by:851
Symbol 847 MovieClipUses:845Used by:848
Symbol 848 MovieClipUses:847Used by:849
Symbol 849 MovieClipUses:843 848Used by:850
Symbol 850 MovieClipUses:849Used by:851
Symbol 851 MovieClip {game27Flashka_armor_fla.up05_baba_125}Uses:843 846 850Used by:852
Symbol 852 MovieClip {hero5}Uses:820 821 830 835 838 841 851
Symbol 853 BitmapUsed by:854
Symbol 854 GraphicUses:853Used by:855
Symbol 855 MovieClip {her02wheel16}Uses:854
Symbol 856 BitmapUsed by:857
Symbol 857 GraphicUses:856Used by:858
Symbol 858 MovieClipUses:857Used by:859
Symbol 859 MovieClipUses:858Used by:864 865
Symbol 860 BitmapUsed by:861
Symbol 861 GraphicUses:860Used by:862
Symbol 862 MovieClipUses:861Used by:863
Symbol 863 MovieClipUses:862Used by:864 865
Symbol 864 MovieClip {game27Flashka_armor_fla.her01sliv1_89}Uses:859 863Used by:895
Symbol 865 MovieClip {game27Flashka_armor_fla.her01sliv2_94}Uses:859 863Used by:895
Symbol 866 BitmapUsed by:867 868
Symbol 867 GraphicUses:866Used by:869
Symbol 868 GraphicUses:866Used by:869
Symbol 869 MovieClipUses:867 868Used by:880
Symbol 870 BitmapUsed by:871 872 873
Symbol 871 GraphicUses:870Used by:874
Symbol 872 GraphicUses:870Used by:874
Symbol 873 GraphicUses:870Used by:874
Symbol 874 MovieClipUses:871 872 873Used by:880
Symbol 875 BitmapUsed by:876 877 878
Symbol 876 GraphicUses:875Used by:879
Symbol 877 GraphicUses:875Used by:879
Symbol 878 GraphicUses:875Used by:879
Symbol 879 MovieClipUses:876 877 878Used by:880
Symbol 880 MovieClip {game27Flashka_armor_fla.up02usk1_95}Uses:869 874 879Used by:895
Symbol 881 BitmapUsed by:882
Symbol 882 GraphicUses:881Used by:883
Symbol 883 MovieClipUses:882Used by:884
Symbol 884 MovieClip {game27Flashka_armor_fla.ep02_hero_wings_mm_99}Uses:883Used by:895
Symbol 885 BitmapUsed by:886
Symbol 886 GraphicUses:885Used by:889
Symbol 887 BitmapUsed by:888
Symbol 888 GraphicUses:887Used by:889
Symbol 889 MovieClip {game27Flashka_armor_fla.her2gol_101}Uses:886 888Used by:895
Symbol 890 BitmapUsed by:891
Symbol 891 GraphicUses:890Used by:892 894
Symbol 892 MovieClipUses:891Used by:893
Symbol 893 MovieClipUses:892Used by:894
Symbol 894 MovieClip {game27Flashka_armor_fla.up02baba_102}Uses:891 893Used by:895
Symbol 895 MovieClip {hero2}Uses:864 865 880 884 889 894
Symbol 896 BitmapUsed by:897
Symbol 897 GraphicUses:896Used by:898
Symbol 898 MovieClipUses:897Used by:902
Symbol 899 BitmapUsed by:900
Symbol 900 GraphicUses:899Used by:901
Symbol 901 MovieClipUses:900Used by:902
Symbol 902 MovieClip {ep5_en_earth1}Uses:898 901
Symbol 903 BitmapUsed by:904
Symbol 904 GraphicUses:903Used by:905
Symbol 905 MovieClipUses:904Used by:909
Symbol 906 BitmapUsed by:907
Symbol 907 GraphicUses:906Used by:908
Symbol 908 MovieClipUses:907Used by:909
Symbol 909 MovieClip {ep4_en_earth1}Uses:905 908
Symbol 910 BitmapUsed by:911
Symbol 911 GraphicUses:910Used by:912
Symbol 912 MovieClipUses:911Used by:918
Symbol 913 BitmapUsed by:914
Symbol 914 GraphicUses:913Used by:915
Symbol 915 MovieClipUses:914Used by:918
Symbol 916 BitmapUsed by:917
Symbol 917 GraphicUses:916Used by:918
Symbol 918 MovieClip {ep3_en_earth1}Uses:912 915 917
Symbol 919 BitmapUsed by:920
Symbol 920 GraphicUses:919Used by:942
Symbol 921 TextUses:34Used by:925
Symbol 922 TextUses:34Used by:925
Symbol 923 TextUses:34Used by:925
Symbol 924 TextUses:34Used by:925
Symbol 925 MovieClipUses:921 922 923 924Used by:941 942
Symbol 926 MovieClipUses:20Used by:941 942
Symbol 927 TextUses:34Used by:941 942
Symbol 928 TextUses:34Used by:941 942
Symbol 929 EditableTextUses:34Used by:942
Symbol 930 TextUses:19Used by:931
Symbol 931 MovieClipUses:930Used by:941 942
Symbol 932 GraphicUsed by:938 939
Symbol 933 BitmapUsed by:934
Symbol 934 GraphicUses:933Used by:935 939
Symbol 935 MovieClipUses:934Used by:938
Symbol 936 MovieClipUses:84Used by:938
Symbol 937 MovieClipUses:86Used by:938
Symbol 938 MovieClipUses:932 935 83 936 937Used by:939
Symbol 939 ButtonUses:938 89 932 934 83 84 86Used by:942
Symbol 940 EditableTextUses:34Used by:941
Symbol 941 MovieClip {game27Flashka_armor_fla.pre_zatem_78}Uses:925 926 927 928 940 931Used by:942
Symbol 942 MovieClip {preloader}Uses:920 925 926 927 928 929 931 939 941
Symbol 943 GraphicUsed by:967
Symbol 944 GraphicUsed by:967
Symbol 945 TextUses:34Used by:953 967
Symbol 946 GraphicUsed by:947
Symbol 947 MovieClipUses:946Used by:948 967
Symbol 948 MovieClipUses:947Used by:966 967
Symbol 949 GraphicUsed by:967
Symbol 950 GraphicUsed by:953
Symbol 951 TextUses:34Used by:953
Symbol 952 GraphicUsed by:953
Symbol 953 MovieClipUses:950 951 952 945Used by:967
Symbol 954 GraphicUsed by:965
Symbol 955 GraphicUsed by:965
Symbol 956 GraphicUsed by:965
Symbol 957 GraphicUsed by:965
Symbol 958 GraphicUsed by:965
Symbol 959 GraphicUsed by:965
Symbol 960 GraphicUsed by:965
Symbol 961 GraphicUsed by:965
Symbol 962 GraphicUsed by:965
Symbol 963 GraphicUsed by:965
Symbol 964 GraphicUsed by:965
Symbol 965 MovieClipUses:954 955 956 957 958 959 960 961 962 963 964Used by:967
Symbol 966 MovieClip {game27Flashka_armor_fla.strel_besh_68}Uses:948Used by:967
Symbol 967 MovieClip {speedometr01}Uses:943 944 945 947 948 949 953 965 966
Symbol 968 GraphicUsed by:977
Symbol 969 GraphicUsed by:970 971 972
Symbol 970 MovieClipUses:969Used by:977
Symbol 971 MovieClipUses:969Used by:977
Symbol 972 MovieClipUses:969Used by:977
Symbol 973 GraphicUsed by:977
Symbol 974 GraphicUsed by:977
Symbol 975 GraphicUsed by:977
Symbol 976 GraphicUsed by:977
Symbol 977 MovieClip {sky01}Uses:968 970 971 972 973 974 975 976
Symbol 978 GraphicUsed by:980
Symbol 979 GraphicUsed by:980
Symbol 980 MovieClipUses:978 979Used by:981
Symbol 981 MovieClip {arrow_danger}Uses:980
Symbol 982 GraphicUsed by:991
Symbol 983 GraphicUsed by:985
Symbol 984 GraphicUsed by:985
Symbol 985 MovieClip {game27Flashka_armor_fla.sound_55}Uses:983 984Used by:991
Symbol 986 FontUsed by:987 988 989
Symbol 987 TextUses:986Used by:990
Symbol 988 TextUses:986Used by:990
Symbol 989 TextUses:986Used by:990
Symbol 990 MovieClip {game27Flashka_armor_fla.btn_q2_56}Uses:46 987 988 989Used by:991
Symbol 991 MovieClip {sound_menu}Uses:982 985 990
Symbol 992 BitmapUsed by:993
Symbol 993 GraphicUses:992Used by:1039
Symbol 994 MovieClipUses:239Used by:1039
Symbol 995 MovieClipUses:239Used by:1039
Symbol 996 BitmapUsed by:997
Symbol 997 GraphicUses:996Used by:1039
Symbol 998 BitmapUsed by:999
Symbol 999 GraphicUses:998Used by:1039
Symbol 1000 BitmapUsed by:1001
Symbol 1001 GraphicUses:1000Used by:1002
Symbol 1002 MovieClipUses:1001Used by:1003 1004
Symbol 1003 MovieClipUses:1002Used by:1004
Symbol 1004 MovieClip {game27Flashka_armor_fla.ep02_mino_mm_40}Uses:1002 1003Used by:1039
Symbol 1005 BitmapUsed by:1006
Symbol 1006 GraphicUses:1005Used by:1039
Symbol 1007 BitmapUsed by:1009 1023
Symbol 1008 BitmapUsed by:1009 1022
Symbol 1009 GraphicUses:1007 1008Used by:1039
Symbol 1010 BitmapUsed by:1011
Symbol 1011 GraphicUses:1010Used by:1021
Symbol 1012 BitmapUsed by:1013
Symbol 1013 GraphicUses:1012Used by:1014
Symbol 1014 MovieClipUses:1013Used by:1021
Symbol 1015 GraphicUsed by:1016 1017 1018 1085
Symbol 1016 MovieClipUses:1015Used by:1021
Symbol 1017 MovieClipUses:1015Used by:1021
Symbol 1018 MovieClipUses:1015Used by:1021
Symbol 1019 BitmapUsed by:1020
Symbol 1020 GraphicUses:1019Used by:1021
Symbol 1021 MovieClipUses:1011 1014 1016 1017 1018 1020Used by:1039
Symbol 1022 GraphicUses:1008Used by:1039
Symbol 1023 GraphicUses:1007Used by:1024
Symbol 1024 MovieClipUses:1023Used by:1025
Symbol 1025 MovieClip {game27Flashka_armor_fla.ep04_gidr_cap_mm_48}Uses:1024Used by:1039
Symbol 1026 BitmapUsed by:1027
Symbol 1027 GraphicUses:1026Used by:1039
Symbol 1028 BitmapUsed by:1029 1030
Symbol 1029 GraphicUses:1028Used by:1031
Symbol 1030 GraphicUses:1028Used by:1031
Symbol 1031 MovieClipUses:1029 1030Used by:1037 1039
Symbol 1032 BitmapUsed by:1033 1034 1035
Symbol 1033 GraphicUses:1032Used by:1036
Symbol 1034 GraphicUses:1032Used by:1036
Symbol 1035 GraphicUses:1032Used by:1036
Symbol 1036 MovieClipUses:1033 1034 1035Used by:1037 1039
Symbol 1037 MovieClipUses:1031 1036Used by:1038
Symbol 1038 MovieClip {game27Flashka_armor_fla.udar_mol2_52}Uses:1037Used by:1039
Symbol 1039 MovieClip {gidrant}Uses:993 994 995 997 999 1004 1006 1009 1021 1022 1025 1027 1031 1036 1038
Symbol 1040 BitmapUsed by:1041
Symbol 1041 GraphicUses:1040Used by:1050
Symbol 1042 BitmapUsed by:1043
Symbol 1043 GraphicUses:1042Used by:1050
Symbol 1044 BitmapUsed by:1045
Symbol 1045 GraphicUses:1044Used by:1050
Symbol 1046 BitmapUsed by:1047
Symbol 1047 GraphicUses:1046Used by:1050
Symbol 1048 BitmapUsed by:1049
Symbol 1049 GraphicUses:1048Used by:1050
Symbol 1050 MovieClip {fon01_3}Uses:1041 1043 1045 1047 1049
Symbol 1051 BitmapUsed by:1052
Symbol 1052 GraphicUses:1051Used by:1061
Symbol 1053 BitmapUsed by:1054
Symbol 1054 GraphicUses:1053Used by:1061
Symbol 1055 BitmapUsed by:1056
Symbol 1056 GraphicUses:1055Used by:1061
Symbol 1057 BitmapUsed by:1058
Symbol 1058 GraphicUses:1057Used by:1061
Symbol 1059 BitmapUsed by:1060
Symbol 1060 GraphicUses:1059Used by:1061
Symbol 1061 MovieClip {fon01_1}Uses:1052 1054 1056 1058 1060
Symbol 1062 BitmapUsed by:1063
Symbol 1063 GraphicUses:1062Used by:1072
Symbol 1064 BitmapUsed by:1065
Symbol 1065 GraphicUses:1064Used by:1072
Symbol 1066 BitmapUsed by:1067
Symbol 1067 GraphicUses:1066Used by:1072
Symbol 1068 BitmapUsed by:1069
Symbol 1069 GraphicUses:1068Used by:1072
Symbol 1070 BitmapUsed by:1071
Symbol 1071 GraphicUses:1070Used by:1072
Symbol 1072 MovieClip {fon01_2}Uses:1063 1065 1067 1069 1071
Symbol 1073 BitmapUsed by:1074
Symbol 1074 GraphicUses:1073Used by:1083
Symbol 1075 BitmapUsed by:1076
Symbol 1076 GraphicUses:1075Used by:1083
Symbol 1077 BitmapUsed by:1078
Symbol 1078 GraphicUses:1077Used by:1083
Symbol 1079 BitmapUsed by:1080
Symbol 1080 GraphicUses:1079Used by:1083
Symbol 1081 BitmapUsed by:1082
Symbol 1082 GraphicUses:1081Used by:1083
Symbol 1083 MovieClip {ground1000}Uses:1074 1076 1078 1080 1082
Symbol 1084 MovieClip {blast_out}Uses:180
Symbol 1085 MovieClipUses:1015Used by:1100 1101
Symbol 1086 BitmapUsed by:1087 1088
Symbol 1087 GraphicUses:1086Used by:1089
Symbol 1088 GraphicUses:1086Used by:1089
Symbol 1089 MovieClipUses:1087 1088Used by:1101
Symbol 1090 BitmapUsed by:1091 1092 1093
Symbol 1091 GraphicUses:1090Used by:1094
Symbol 1092 GraphicUses:1090Used by:1094
Symbol 1093 GraphicUses:1090Used by:1094
Symbol 1094 MovieClipUses:1091 1092 1093Used by:1101
Symbol 1095 BitmapUsed by:1096 1097 1098
Symbol 1096 GraphicUses:1095Used by:1099
Symbol 1097 GraphicUses:1095Used by:1099
Symbol 1098 GraphicUses:1095Used by:1099
Symbol 1099 MovieClipUses:1096 1097 1098Used by:1101
Symbol 1100 MovieClipUses:1085Used by:1101
Symbol 1101 MovieClip {blast_between}Uses:1085 1089 1094 1099 1100 180
Symbol 1102 BitmapUsed by:1103
Symbol 1103 GraphicUses:1102Used by:1108
Symbol 1104 BitmapUsed by:1105
Symbol 1105 GraphicUses:1104Used by:1108
Symbol 1106 BitmapUsed by:1107
Symbol 1107 GraphicUses:1106Used by:1108
Symbol 1108 MovieClip {clouds}Uses:1103 1105 1107
Symbol 1109 MovieClip {her02_panel_usk1}Uses:259
Symbol 1110 BitmapUsed by:1111
Symbol 1111 GraphicUses:1110Used by:1112
Symbol 1112 MovieClipUses:1111Used by:1124
Symbol 1113 BitmapUsed by:1114
Symbol 1114 GraphicUses:1113Used by:1115
Symbol 1115 MovieClipUses:1114Used by:1124
Symbol 1116 BitmapUsed by:1117
Symbol 1117 GraphicUses:1116Used by:1118
Symbol 1118 MovieClipUses:1117Used by:1124
Symbol 1119 BitmapUsed by:1120
Symbol 1120 GraphicUses:1119Used by:1121
Symbol 1121 MovieClipUses:1120Used by:1124
Symbol 1122 BitmapUsed by:1123
Symbol 1123 GraphicUses:1122Used by:1124
Symbol 1124 MovieClip {ep2_en_earth1}Uses:1112 1115 1118 1121 1123
Symbol 1125 MovieClipUses:77Used by:1126 1127
Symbol 1126 MovieClip {fade_out}Uses:1125
Symbol 1127 MovieClip {fade_in}Uses:1125
Symbol 1128 BitmapUsed by:1129
Symbol 1129 GraphicUses:1128Used by:1130
Symbol 1130 MovieClipUses:1129 476Used by:1131
Symbol 1131 MovieClip {meteor01}Uses:1130
Symbol 1132 BitmapUsed by:1133
Symbol 1133 GraphicUses:1132Used by:1134
Symbol 1134 MovieClip {wheel16}Uses:1133
Symbol 1135 BitmapUsed by:1136
Symbol 1136 GraphicUses:1135Used by:1137
Symbol 1137 MovieClip {wheel_10}Uses:1136
Symbol 1138 GraphicUsed by:1139
Symbol 1139 MovieClip {bonus_uskor}Uses:1138
Symbol 1140 GraphicUsed by:1141
Symbol 1141 MovieClipUses:1140Used by:1142
Symbol 1142 MovieClipUses:1141Used by:1143
Symbol 1143 MovieClip {enemy_duck}Uses:1142 495
Symbol 1144 MovieClip {game27}Used by:Timeline
Symbol 1145 Sound {c2_4}Used by:1205
Symbol 1146 Sound {c2_3}Used by:1205
Symbol 1147 Sound {c2_2}Used by:1205
Symbol 1148 Sound {c2_1}Used by:1205
Symbol 1149 Sound {bomb_sound}Used by:1205
Symbol 1150 Sound {met04}Used by:1205
Symbol 1151 Sound {met03}Used by:1205
Symbol 1152 Sound {c1_4}Used by:1205
Symbol 1153 Sound {c1_3}Used by:1205
Symbol 1154 Sound {c1_2}Used by:1205
Symbol 1155 Sound {c1_1}Used by:1205
Symbol 1156 Sound {ep5_laser}Used by:1205
Symbol 1157 Sound {ep5_blood}Used by:1205
Symbol 1158 Sound {track_comics}Used by:1205
Symbol 1159 Sound {ep5_uskor}Used by:1205
Symbol 1160 Sound {ep4_uskor}Used by:1205
Symbol 1161 Sound {ep5_man2}Used by:1205
Symbol 1162 Sound {ep5_man1}Used by:1205
Symbol 1163 Sound {ep4_man2}Used by:1205
Symbol 1164 Sound {ep4_man1}Used by:1205
Symbol 1165 Sound {ep5_chip}Used by:1205
Symbol 1166 Sound {ep5_ship}Used by:1205
Symbol 1167 Sound {ep4_gidrant}Used by:1205
Symbol 1168 Sound {ep4_diri}Used by:1205
Symbol 1169 Sound {ep5_prestart}Used by:1205
Symbol 1170 Sound {track_05}Used by:1205
Symbol 1171 Sound {ep4_prestart}Used by:1205
Symbol 1172 Sound {track_04}Used by:1205
Symbol 1173 Sound {ep3_uskor}Used by:1205
Symbol 1174 Sound {ep3_visel}Used by:1205
Symbol 1175 Sound {ep3_rycar}Used by:1205
Symbol 1176 Sound {ep3_skull}Used by:1205
Symbol 1177 Sound {ep3_fire}Used by:1205
Symbol 1178 Sound {ep3_witch}Used by:1205
Symbol 1179 Sound {ep3_prestart}Used by:1205
Symbol 1180 Sound {track_03}Used by:1205
Symbol 1181 Sound {gui_blast}Used by:1205
Symbol 1182 Sound {ep2_uskor}Used by:1205
Symbol 1183 Sound {ep2_stone}Used by:1205
Symbol 1184 Sound {ep2_minos}Used by:1205
Symbol 1185 Sound {ep2_gin}Used by:1205
Symbol 1186 Sound {ep2_statue}Used by:1205
Symbol 1187 Sound {ep2_prestart}Used by:1205
Symbol 1188 Sound {track_02}Used by:1205
Symbol 1189 Sound {ep1_shoot}Used by:1205
Symbol 1190 Sound {gui_between}Used by:1205
Symbol 1191 Sound {track_menu}Used by:1205
Symbol 1192 Sound {track_01}Used by:1205
Symbol 1193 Sound {ep1_prestart}Used by:1205
Symbol 1194 Sound {ep1_alarm}Used by:1205
Symbol 1195 Sound {ep1_meteor}Used by:1205
Symbol 1196 Sound {ep1_croc}Used by:1205
Symbol 1197 Sound {ep1_ptero}Used by:1205
Symbol 1198 Sound {ep1_tree}Used by:1205
Symbol 1199 Sound {ep1_water}Used by:1205
Symbol 1200 Sound {ep1_uskor}Used by:1205
Symbol 1201 Sound {ep1_volcano}Used by:1205
Symbol 1202 Sound {gui_new_usk}Used by:1205
Symbol 1203 Sound {gui_buy}Used by:1205
Symbol 1204 Sound {gui_menu_fly}Used by:1205
Symbol 1205 MovieClipUses:1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204Used by:Timeline

Instance Names

"sound"Symbol 51 MovieClip {game27Flashka_armor_fla.sound_menu_409} Frame 1Symbol 45 MovieClip {game27Flashka_armor_fla.sound2_410}
"quality"Symbol 51 MovieClip {game27Flashka_armor_fla.sound_menu_409} Frame 1Symbol 50 MovieClip {game27Flashka_armor_fla.btn_q2_411}
"pitergames"Symbol 64 MovieClip {game27Flashka_armor_fla.cred_pan_b_415} Frame 1Symbol 63 Button
"cred_panel_in"Symbol 65 MovieClip {game27Flashka_armor_fla.cred_pan_414} Frame 1Symbol 64 MovieClip {game27Flashka_armor_fla.cred_pan_b_415}
"e2"Symbol 78 MovieClip {game27Flashka_armor_fla.epoques_417} Frame 1Symbol 68 Button
"e3"Symbol 78 MovieClip {game27Flashka_armor_fla.epoques_417} Frame 1Symbol 70 Button
"e1"Symbol 78 MovieClip {game27Flashka_armor_fla.epoques_417} Frame 1Symbol 72 Button
"e4"Symbol 78 MovieClip {game27Flashka_armor_fla.epoques_417} Frame 1Symbol 74 Button
"e5"Symbol 78 MovieClip {game27Flashka_armor_fla.epoques_417} Frame 1Symbol 76 Button
"govno"Symbol 97 MovieClip {main_menu} Frame 1Symbol 26 MovieClip {game27Flashka_armor_fla.main_her_mm_400}
"start"Symbol 97 MovieClip {main_menu} Frame 1Symbol 40 MovieClip
"clear"Symbol 97 MovieClip {main_menu} Frame 1Symbol 42 Button
"sound_menu"Symbol 97 MovieClip {main_menu} Frame 1Symbol 51 MovieClip {game27Flashka_armor_fla.sound_menu_409}
"pitergames"Symbol 97 MovieClip {main_menu} Frame 1Symbol 53 Button
"playmore"Symbol 97 MovieClip {main_menu} Frame 1Symbol 55 Button
"cred_panel"Symbol 97 MovieClip {main_menu} Frame 1Symbol 65 MovieClip {game27Flashka_armor_fla.cred_pan_414}
"epoques"Symbol 97 MovieClip {main_menu} Frame 1Symbol 78 MovieClip {game27Flashka_armor_fla.epoques_417}
"armor"Symbol 97 MovieClip {main_menu} Frame 1Symbol 90 Button
"facebook"Symbol 97 MovieClip {main_menu} Frame 1Symbol 96 Button
"item"Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389} Frame 1Symbol 168 MovieClip {game27Flashka_armor_fla.i_upgrades_m_390}
"price"Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389} Frame 1Symbol 169 EditableText
"buy"Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389} Frame 1Symbol 172 Button
"price"Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389} Frame 3Symbol 173 EditableText
"up1"Symbol 176 MovieClip {game27Flashka_armor_fla.shop_388} Frame 1Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389}
"up2"Symbol 176 MovieClip {game27Flashka_armor_fla.shop_388} Frame 1Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389}
"up3"Symbol 176 MovieClip {game27Flashka_armor_fla.shop_388} Frame 1Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389}
"up4"Symbol 176 MovieClip {game27Flashka_armor_fla.shop_388} Frame 1Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389}
"up5"Symbol 176 MovieClip {game27Flashka_armor_fla.shop_388} Frame 1Symbol 175 MovieClip {game27Flashka_armor_fla.i_1_1_389}
"again"Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380} Frame 1Symbol 129 Button
"extramoney"Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380} Frame 1Symbol 135 Button
"tf_newmoney"Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380} Frame 1Symbol 138 EditableText
"tf_total"Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380} Frame 1Symbol 140 EditableText
"playmore"Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380} Frame 1Symbol 142 Button
"facebook"Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380} Frame 1Symbol 96 Button
"shop"Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380} Frame 1Symbol 176 MovieClip {game27Flashka_armor_fla.shop_388}
"between_fly"Symbol 178 MovieClip {between} Frame 1Symbol 177 MovieClip {game27Flashka_armor_fla.between_fly_380}
"shop"Symbol 188 MovieClip {game27Flashka_armor_fla.new_shop_m_363} Frame 1Symbol 187 Button
"bonus_money"Symbol 206 MovieClip {game27Flashka_armor_fla.bon_g_t_m_368} Frame 1Symbol 205 EditableText
"bonus"Symbol 207 MovieClip {game27Flashka_armor_fla.bon_good_367} Frame 1Symbol 206 MovieClip {game27Flashka_armor_fla.bon_g_t_m_368}
"bonus_money"Symbol 210 MovieClip {game27Flashka_armor_fla.bon_p_t_m_370} Frame 1Symbol 209 EditableText
"bonus"Symbol 211 MovieClip {game27Flashka_armor_fla.bon_perf_369} Frame 1Symbol 210 MovieClip {game27Flashka_armor_fla.bon_p_t_m_370}
"bonus_money"Symbol 215 MovieClip {game27Flashka_armor_fla.bon_360_t_m_372} Frame 1Symbol 214 EditableText
"bonus"Symbol 216 MovieClip {game27Flashka_armor_fla.bon_360_371} Frame 1Symbol 215 MovieClip {game27Flashka_armor_fla.bon_360_t_m_372}
"newitem"Symbol 227 MovieClip {game_menu} Frame 1Symbol 188 MovieClip {game27Flashka_armor_fla.new_shop_m_363}
"tf_heigth"Symbol 227 MovieClip {game_menu} Frame 1Symbol 195 EditableText
"tf_length"Symbol 227 MovieClip {game_menu} Frame 1Symbol 196 EditableText
"tf_money"Symbol 227 MovieClip {game_menu} Frame 1Symbol 197 EditableText
"tf_maxlength"Symbol 227 MovieClip {game_menu} Frame 1Symbol 199 EditableText
"tf_maxheigth"Symbol 227 MovieClip {game_menu} Frame 1Symbol 200 EditableText
"restart"Symbol 227 MovieClip {game_menu} Frame 1Symbol 202 Button
"bon_good"Symbol 227 MovieClip {game_menu} Frame 1Symbol 207 MovieClip {game27Flashka_armor_fla.bon_good_367}
"bon_perf"Symbol 227 MovieClip {game_menu} Frame 1Symbol 211 MovieClip {game27Flashka_armor_fla.bon_perf_369}
"bon_360"Symbol 227 MovieClip {game_menu} Frame 1Symbol 216 MovieClip {game27Flashka_armor_fla.bon_360_371}
"t2"Symbol 227 MovieClip {game_menu} Frame 1Symbol 219 MovieClip {game27Flashka_armor_fla.tut2m_373}
"t4"Symbol 227 MovieClip {game_menu} Frame 1Symbol 223 MovieClip {game27Flashka_armor_fla.tut4m_374}
"t5"Symbol 227 MovieClip {game_menu} Frame 1Symbol 226 MovieClip {game27Flashka_armor_fla.tut5m_376}
"but_usk1"Symbol 260 MovieClip {her01_panel_usk1} Frame 1Symbol 259 Button
"sliv1"Symbol 307 MovieClip {hero4} Frame 1Symbol 275 MovieClip {game27Flashka_armor_fla.her01sliv1_331}
"sliv2"Symbol 307 MovieClip {hero4} Frame 1Symbol 276 MovieClip {game27Flashka_armor_fla.her01sliv2_336}
"baba"Symbol 307 MovieClip {hero4} Frame 1Symbol 292 MovieClip {game27Flashka_armor_fla.up04_baba_341}
"usk1"Symbol 307 MovieClip {hero4} Frame 1Symbol 301 MovieClip {game27Flashka_armor_fla.up04usk1_344}
"plane"Symbol 307 MovieClip {hero4} Frame 1Symbol 306 MovieClip {game27Flashka_armor_fla.up04plane_349}
"click_button"Symbol 320 MovieClip {avoid_but} Frame 1Symbol 319 Button
"sound"Symbol 335 MovieClip {menu_sliv2} Frame 1Symbol 330 MovieClip {game27Flashka_armor_fla.sound_322}
"quality"Symbol 335 MovieClip {menu_sliv2} Frame 1Symbol 334 MovieClip {game27Flashka_armor_fla.btn_q2_323}
"next"Symbol 359 MovieClip {game27Flashka_armor_fla.com2_buttons_306} Frame 1Symbol 358 Button
"next"Symbol 365 MovieClip {game27Flashka_armor_fla.com2_but_end_307} Frame 1Symbol 364 Button
"com_buts"Symbol 384 MovieClip {comics2} Frame 1Symbol 359 MovieClip {game27Flashka_armor_fla.com2_buttons_306}
"com_buts2"Symbol 384 MovieClip {comics2} Frame 1Symbol 365 MovieClip {game27Flashka_armor_fla.com2_but_end_307}
"com3"Symbol 384 MovieClip {comics2} Frame 3Symbol 377 MovieClip {game27Flashka_armor_fla.com2_3mm_311}
"skip"Symbol 434 MovieClip {game27Flashka_armor_fla.com1_buttons_282} Frame 1Symbol 433 Button
"next"Symbol 434 MovieClip {game27Flashka_armor_fla.com1_buttons_282} Frame 1Symbol 358 Button
"next"Symbol 438 MovieClip {game27Flashka_armor_fla.com1_but_end_285} Frame 1Symbol 437 Button
"com_buts"Symbol 456 MovieClip {comics} Frame 1Symbol 434 MovieClip {game27Flashka_armor_fla.com1_buttons_282}
"com_buts2"Symbol 456 MovieClip {comics} Frame 1Symbol 438 MovieClip {game27Flashka_armor_fla.com1_but_end_285}
"com3"Symbol 456 MovieClip {comics} Frame 3Symbol 450 MovieClip {game27Flashka_armor_fla.com1_3mm_292}
"sliv1"Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241} Frame 1Symbol 537 MovieClip {game27Flashka_armor_fla.her01sliv1_134}
"sliv2"Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241} Frame 1Symbol 538 MovieClip {game27Flashka_armor_fla.her01sliv2_139}
"blood"Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241} Frame 1Symbol 547 MovieClip {game27Flashka_armor_fla.her5_blood_242}
"usk1"Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241} Frame 1Symbol 552 MovieClip {game27Flashka_armor_fla.up05usk1_247}
"up2"Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241} Frame 1Symbol 557 MovieClip {game27Flashka_armor_fla.hero5_bezb_250}
"laser"Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241} Frame 1Symbol 565 MovieClip {game27Flashka_armor_fla.laser_251}
"baba"Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241} Frame 1Symbol 575 MovieClip {game27Flashka_armor_fla.up05_baba_254}
"power"Symbol 579 MovieClip {pulyalka5} Frame 1Symbol 528 MovieClip {game27Flashka_armor_fla.power_m_157}
"hero"Symbol 579 MovieClip {pulyalka5} Frame 1Symbol 576 MovieClip {game27Flashka_armor_fla.hero5_241}
"sliv1"Symbol 617 MovieClip {game27Flashka_armor_fla.hero4_223} Frame 1Symbol 537 MovieClip {game27Flashka_armor_fla.her01sliv1_134}
"sliv2"Symbol 617 MovieClip {game27Flashka_armor_fla.hero4_223} Frame 1Symbol 538 MovieClip {game27Flashka_armor_fla.her01sliv2_139}
"baba"Symbol 617 MovieClip {game27Flashka_armor_fla.hero4_223} Frame 1Symbol 602 MovieClip {game27Flashka_armor_fla.up04_baba_228}
"usk1"Symbol 617 MovieClip {game27Flashka_armor_fla.hero4_223} Frame 1Symbol 611 MovieClip {game27Flashka_armor_fla.up04usk1_231}
"plane"Symbol 617 MovieClip {game27Flashka_armor_fla.hero4_223} Frame 1Symbol 616 MovieClip {game27Flashka_armor_fla.up04plane_236}
"power"Symbol 619 MovieClip {pulyalka4} Frame 1Symbol 528 MovieClip {game27Flashka_armor_fla.power_m_157}
"hero"Symbol 619 MovieClip {pulyalka4} Frame 1Symbol 617 MovieClip {game27Flashka_armor_fla.hero4_223}
"hair"Symbol 636 MovieClip {game27Flashka_armor_fla.hep01_hero_hair_mm_206} Frame 2Symbol 635 MovieClip
"sliv1"Symbol 661 MovieClip {hero01} Frame 1Symbol 628 MovieClip {game27Flashka_armor_fla.her01sliv1_200}
"sliv2"Symbol 661 MovieClip {hero01} Frame 1Symbol 629 MovieClip {game27Flashka_armor_fla.her01sliv2_205}
"hair"Symbol 661 MovieClip {hero01} Frame 1Symbol 636 MovieClip {game27Flashka_armor_fla.hep01_hero_hair_mm_206}
"baba"Symbol 661 MovieClip {hero01} Frame 1Symbol 640 MovieClip {game27Flashka_armor_fla.up01baba_209}
"usk1"Symbol 661 MovieClip {hero01} Frame 1Symbol 654 MovieClip {game27Flashka_armor_fla.up01usk1_211}
"dubina"Symbol 661 MovieClip {hero01} Frame 1Symbol 660 MovieClip {game27Flashka_armor_fla.up01dubina_218}
"sliv1"Symbol 691 MovieClip {hero3} Frame 1Symbol 673 MovieClip {game27Flashka_armor_fla.her01sliv1_186}
"sliv2"Symbol 691 MovieClip {hero3} Frame 1Symbol 674 MovieClip {game27Flashka_armor_fla.her01sliv2_191}
"hand"Symbol 691 MovieClip {hero3} Frame 1Symbol 681 MovieClip {game27Flashka_armor_fla.ep03_hero_hand_m_192}
"baba"Symbol 691 MovieClip {hero3} Frame 1Symbol 685 MovieClip {game27Flashka_armor_fla.up03_baba_193}
"usk1"Symbol 691 MovieClip {hero3} Frame 1Symbol 690 MovieClip {game27Flashka_armor_fla.up03usk1_195}
"sliv1"Symbol 716 MovieClip {game27Flashka_armor_fla.hero3_178} Frame 1Symbol 537 MovieClip {game27Flashka_armor_fla.her01sliv1_134}
"sliv2"Symbol 716 MovieClip {game27Flashka_armor_fla.hero3_178} Frame 1Symbol 538 MovieClip {game27Flashka_armor_fla.her01sliv2_139}
"hand"Symbol 716 MovieClip {game27Flashka_armor_fla.hero3_178} Frame 1Symbol 706 MovieClip {game27Flashka_armor_fla.ep03_hero_hand_m_179}
"baba"Symbol 716 MovieClip {game27Flashka_armor_fla.hero3_178} Frame 1Symbol 710 MovieClip {game27Flashka_armor_fla.up03_baba_180}
"usk1"Symbol 716 MovieClip {game27Flashka_armor_fla.hero3_178} Frame 1Symbol 715 MovieClip {game27Flashka_armor_fla.up03usk1_182}
"power"Symbol 719 MovieClip {pulyalka3} Frame 1Symbol 528 MovieClip {game27Flashka_armor_fla.power_m_157}
"hero"Symbol 719 MovieClip {pulyalka3} Frame 1Symbol 716 MovieClip {game27Flashka_armor_fla.hero3_178}
"sliv1"Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164} Frame 1Symbol 537 MovieClip {game27Flashka_armor_fla.her01sliv1_134}
"sliv2"Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164} Frame 1Symbol 538 MovieClip {game27Flashka_armor_fla.her01sliv2_139}
"usk1"Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164} Frame 1Symbol 742 MovieClip {game27Flashka_armor_fla.up02usk1_165}
"wing"Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164} Frame 1Symbol 746 MovieClip {game27Flashka_armor_fla.ep02_hero_wings_mm_169}
"up2"Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164} Frame 1Symbol 751 MovieClip {game27Flashka_armor_fla.her2gol_171}
"baba"Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164} Frame 1Symbol 756 MovieClip {game27Flashka_armor_fla.up02baba_172}
"power"Symbol 760 MovieClip {pulyalka2} Frame 1Symbol 528 MovieClip {game27Flashka_armor_fla.power_m_157}
"hero"Symbol 760 MovieClip {pulyalka2} Frame 1Symbol 757 MovieClip {game27Flashka_armor_fla.hero2_164}
"hair"Symbol 774 MovieClip {game27Flashka_armor_fla.hep01_hero_hair_mm_140} Frame 2Symbol 773 MovieClip
"sliv1"Symbol 798 MovieClip {base_hero_all} Frame 1Symbol 537 MovieClip {game27Flashka_armor_fla.her01sliv1_134}
"sliv2"Symbol 798 MovieClip {base_hero_all} Frame 1Symbol 538 MovieClip {game27Flashka_armor_fla.her01sliv2_139}
"hair"Symbol 798 MovieClip {base_hero_all} Frame 1Symbol 774 MovieClip {game27Flashka_armor_fla.hep01_hero_hair_mm_140}
"baba"Symbol 798 MovieClip {base_hero_all} Frame 1Symbol 778 MovieClip {game27Flashka_armor_fla.up01baba_143}
"usk1"Symbol 798 MovieClip {base_hero_all} Frame 1Symbol 791 MovieClip {game27Flashka_armor_fla.up01usk1_145}
"dubina"Symbol 798 MovieClip {base_hero_all} Frame 1Symbol 797 MovieClip {game27Flashka_armor_fla.up01dubina_152}
"power"Symbol 801 MovieClip {pulyalka} Frame 1Symbol 528 MovieClip {game27Flashka_armor_fla.power_m_157}
"hero"Symbol 801 MovieClip {pulyalka} Frame 1Symbol 798 MovieClip {base_hero_all}
"sliv1"Symbol 852 MovieClip {hero5} Frame 1Symbol 820 MovieClip {game27Flashka_armor_fla.her01sliv1_107}
"sliv2"Symbol 852 MovieClip {hero5} Frame 1Symbol 821 MovieClip {game27Flashka_armor_fla.her01sliv2_112}
"blood"Symbol 852 MovieClip {hero5} Frame 1Symbol 830 MovieClip {game27Flashka_armor_fla.her5_blood_113}
"usk1"Symbol 852 MovieClip {hero5} Frame 1Symbol 835 MovieClip {game27Flashka_armor_fla.up05usk1_118}
"up2"Symbol 852 MovieClip {hero5} Frame 1Symbol 838 MovieClip {game27Flashka_armor_fla.hero5_bezb_121}
"laser"Symbol 852 MovieClip {hero5} Frame 1Symbol 841 MovieClip {game27Flashka_armor_fla.laser_122}
"baba"Symbol 852 MovieClip {hero5} Frame 1Symbol 851 MovieClip {game27Flashka_armor_fla.up05_baba_125}
"sliv1"Symbol 895 MovieClip {hero2} Frame 1Symbol 864 MovieClip {game27Flashka_armor_fla.her01sliv1_89}
"sliv2"Symbol 895 MovieClip {hero2} Frame 1Symbol 865 MovieClip {game27Flashka_armor_fla.her01sliv2_94}
"usk1"Symbol 895 MovieClip {hero2} Frame 1Symbol 880 MovieClip {game27Flashka_armor_fla.up02usk1_95}
"wing"Symbol 895 MovieClip {hero2} Frame 1Symbol 884 MovieClip {game27Flashka_armor_fla.ep02_hero_wings_mm_99}
"up2"Symbol 895 MovieClip {hero2} Frame 1Symbol 889 MovieClip {game27Flashka_armor_fla.her2gol_101}
"baba"Symbol 895 MovieClip {hero2} Frame 1Symbol 894 MovieClip {game27Flashka_armor_fla.up02baba_102}
"procent"Symbol 941 MovieClip {game27Flashka_armor_fla.pre_zatem_78} Frame 1Symbol 940 EditableText
"procent"Symbol 942 MovieClip {preloader} Frame 1Symbol 929 EditableText
"armor"Symbol 942 MovieClip {preloader} Frame 1Symbol 939 Button
"strelka"Symbol 966 MovieClip {game27Flashka_armor_fla.strel_besh_68} Frame 1Symbol 948 MovieClip
"strelka"Symbol 967 MovieClip {speedometr01} Frame 2Symbol 948 MovieClip
"sound"Symbol 991 MovieClip {sound_menu} Frame 1Symbol 985 MovieClip {game27Flashka_armor_fla.sound_55}
"quality"Symbol 991 MovieClip {sound_menu} Frame 1Symbol 990 MovieClip {game27Flashka_armor_fla.btn_q2_56}
"but_usk1"Symbol 1109 MovieClip {her02_panel_usk1} Frame 1Symbol 259 Button
"meteor"Symbol 1131 MovieClip {meteor01} Frame 1Symbol 1130 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.
Protect (24)Timeline Frame 131 bytes "..$1$UB$nGYhL4ex3B8Ieh4QkOo7v1."




http://swfchan.com/27/131769/info.shtml
Created: 21/2 -2019 01:01:47 Last modified: 21/2 -2019 01:01:47 Server time: 22/12 -2024 20:40:51