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

swfchan turned sixteen years old yesterday! (5may2024)

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

Days2Die.swf

This is the info page for
Flash #52797

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


Text
COOLBUDDY.COM GAMES

COOLBUDDY.COM GAMES

Ad Space
contact us for more info

100%

WARNING
THIS GAME CONTAINS SCENES
OF EXPLICIT VIOLENCE & GORE

V. CB 1.4.5

SAVING..

Name:

Scores:

232151

Your Name Here

SUBMIT

PLEASE WAIT

PLEASE WAIT.

PLEASE WAIT..

PLEASE WAIT...

LOADING

LOADING.

LOADING..

LOADING...

SKIP

SKIP

SKIP

65

3

1

PRIMARY

PRIMARY

12g

.357

.45

9mm

.50

7.62

5.56

.50cal

HE

x 12

x 12

x 12

x 12

x 12

x 12

x 12

x 12

PRIMARY

PRIMARY

Explosive

Melee

Fire Arms

Dmg :

RPS :

Price :

Owned :

Reload :

Clip :

Acc :

1

press [ i ] to open/close this window

Drag & Drop items into the slots below to equip

NEW GAME

NEW GAME

PLAY MORE GAMES

PLAY MORE GAMES

HIGHSCORES

HIGHSCORES

CONTINUE

CONTINUE

/

00

00

Stay Alive for

:

102

10200

4

Home Sweet Home

1 more days to advance

10200

COOLBUDDY.COM GAMES

BACK TO MAIN MENU

BACK TO MAIN MENU

asa

Esc (Options)

GRAPHIC QUALITY

LOW

LOW

MEDIUM

MEDIUM

HIGH

HIGH

GAME CONTROLS

A/LEFT  - MOVE LEFT
D/RIGHT - MOVE RIGHT
W/UP    - CLIMB UP
S/DOWN  - CLIMB DOWN
E - FIX BARRICADES
I - INVENTORY
SPACE - JUMP
SHIFT - RUN
MOUSE - AIM
- SHOOT
- MOVE BARRICADES
1 - PRIMARY WEAPON
2 - SECONDARY WEAPON
3 - MELEE WEAPON
4 - EXPLOSIVES

SOUND

Mike...
are YOU gonna sit
there ALL DAY?!

Yeah...

SO !?

Geez...
can't you do
anything usefull ?

AT LEAST answer
the door will ya?

FINE!

The CITY is in CHAOS!!!
Bodies are starting to pile up!

this is no longer an isolated
incident!

If you are watching this...STAY
HOME and LOCK ALL DOORS

Durability :

Price :

$ 2000

100 dmg

Durability :

Price :

$ 2000

100 dmg

Barricade Limit

2

Stay

Follow

Merc

10000000

Name Here

Accuracy :

Speed :

Health :

Price :

Salary :

x 12

x 12

x 12

x 12

x 12

x 12

x 12

x 12

You can only hire 2 Mercs max

DAY 1

The number
of Barricades
you can buy

Barricades,
click to buy

Demolish,
click this then
click on the
barricade you
wish to remove

Barricade price
and durability

click and drag
Barricades to
move them around

Click START when you're
done setting up

SHOP

MONEY,
Your money

ITEM INFO,
Price, Damage,
Rounds per Second,
Ammo type

Ammo Stock
click on + / - to
buy/sell ammo

BUY, click to buy item

CATEGORY TABS,
click to view items
in different categories

ITEM LIST,
click on icon to
view info

PAGE NUMBER,
click Prev or Next to
browse pages

INVENTORY

PRIMARY
WEAPON

SECONDARY
WEAPON

EXPLOSIVES

MELEE
WEAPONS

AMMO STOCK,
Your ammo stock

INVENTORY,
Shows all of the
weapons that you
have bought.
Drag & Drop them
into the Weapon Slot
to equip them

PAGE,
Click Prev or Next
to cycle pages

ITEM INFO

WEAPON SLOTS
Drag & Drop item into
these slots to equip

SWITCH,
click to switch
Primary & Secondary

MERCENARY INFO,
Price, Salary, Health,
Accuracy, Speed,
Weapon equiped

HIRE,
click to hire merc

MERC POOL,
available mercs are
listed here

A/LEFT  - MOVE LEFT
D/RIGHT - MOVE RIGHT
W/UP    - CLIMB UP
S/DOWN  - CLIMB DOWN
E - FIX BARRICADES
I - INVENTORY
SHIFT - RUN
MOUSE - AIM
- SHOOT
- MOVE BARRICADES
1 - PRIMARY WEAPON
2 - SECONDARY WEAPON
3 - MELEE WEAPON
4 - EXPLOSIVES

Programming
Sudarmin Then
Graphics & Animations
Kris Antoni
Music
William Oktavianus
Official Bug Testers
Fanny Khioe
Hansley Kasih
Jonathan H. Nurwono
Liu Willy Budiman
Melisa Chandra
Inspired from
Dawn of The Dead (2004)
Left 4 Dead
Resident Evil Series
The Last Stand Series

THE HARBOR...

City Harbor
RESTRICTED AREA

IS GONE...

WHAT SHOULD I DO?...

TO BE CONTINUED...

Programming
Sudarmin Then

Graphics & Animation
Kris Antoni

Music
William Oktavianus

Continue Playing?

YES

NO

SUBMIT
HIGHSCORE

There's no point coming here
Watch ending movie?

ActionScript [AS3]

Section 1
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2CircleDef extends b2ShapeDef { public var localPosition:b2Vec2; public var radius:Number; public function b2CircleDef(){ localPosition = new b2Vec2(0, 0); super(); type = b2Shape.e_circleShape; radius = 1; } } }//package Box2D.Collision.Shapes
Section 2
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleShape extends b2Shape { public var m_radius:Number; public var m_localPosition:b2Vec2; public function b2CircleShape(_arg1:b2ShapeDef){ var _local2:b2CircleDef; m_localPosition = new b2Vec2(); super(_arg1); _local2 = (_arg1 as b2CircleDef); m_type = e_circleShape; m_localPosition.SetV(_local2.localPosition); m_radius = _local2.radius; } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg1.R; _local4 = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); _local5 = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _local4 = (_arg2.x - _local4); _local5 = (_arg2.y - _local5); return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius))); } public function GetLocalPosition():b2Vec2{ return (m_localPosition); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ var _local6:b2Mat22; 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; _local6 = _arg1.R; _local7 = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y))); _local8 = (_arg1.position.x + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y))); _local9 = (_arg4.p1.x - _local7); _local10 = (_arg4.p1.y - _local8); _local11 = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius)); if (_local11 < 0){ return (false); }; _local12 = (_arg4.p2.x - _arg4.p1.x); _local13 = (_arg4.p2.y - _arg4.p1.y); _local14 = ((_local9 * _local12) + (_local10 * _local13)); _local15 = ((_local12 * _local12) + (_local13 * _local13)); _local16 = ((_local14 * _local14) - (_local15 * _local11)); if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){ return (false); }; _local17 = -((_local14 + Math.sqrt(_local16))); if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local15))))){ _local17 = (_local17 / _local15); _arg2[0] = _local17; _arg3.x = (_local9 + (_local17 * _local12)); _arg3.y = (_local10 + (_local17 * _local13)); _arg3.Normalize(); return (true); }; return (false); } override public function ComputeMass(_arg1:b2MassData):void{ _arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius); _arg1.center.SetV(m_localPosition); _arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y)))); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = _arg2.R; _local5 = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); _local6 = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _local4 = _arg3.R; _local7 = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); _local8 = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((((_local5 < _local7)) ? _local5 : _local7 - m_radius), (((_local6 < _local8)) ? _local6 : _local8 - m_radius)); _arg1.upperBound.Set((((_local5 > _local7)) ? _local5 : _local7 + m_radius), (((_local6 > _local8)) ? _local6 : _local8 + m_radius)); } public function GetRadius():Number{ return (m_radius); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:Number; var _local3:Number; _local2 = (m_localPosition.x - _arg1.x); _local3 = (m_localPosition.y - _arg1.y); _local2 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); m_sweepRadius = ((_local2 + m_radius) - b2Settings.b2_toiSlop); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg2.R; _local4 = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); _local5 = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius)); _arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius)); } } }//package Box2D.Collision.Shapes
Section 3
//b2FilterData (Box2D.Collision.Shapes.b2FilterData) package Box2D.Collision.Shapes { 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.Collision.Shapes
Section 4
//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 5
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolygonDef extends b2ShapeDef { public var vertexCount:int; public var vertices:Array; private static var s_mat:b2Mat22 = new b2Mat22(); public function b2PolygonDef(){ var _local1:int; vertices = new Array(b2Settings.b2_maxPolygonVertices); super(); type = b2Shape.e_polygonShape; vertexCount = 0; _local1 = 0; while (_local1 < b2Settings.b2_maxPolygonVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } public function SetAsOrientedBox(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{ var _local5:b2Vec2; var _local6:b2Mat22; var _local7:int; vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); if (_arg3){ _local5 = _arg3; _local6 = s_mat; _local6.Set(_arg4); _local7 = 0; while (_local7 < vertexCount) { _arg3 = vertices[_local7]; _arg1 = (_local5.x + ((_local6.col1.x * _arg3.x) + (_local6.col2.x * _arg3.y))); _arg3.y = (_local5.y + ((_local6.col1.y * _arg3.x) + (_local6.col2.y * _arg3.y))); _arg3.x = _arg1; _local7++; }; }; } public function SetAsBox(_arg1:Number, _arg2:Number):void{ vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); } } }//package Box2D.Collision.Shapes
Section 6
//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 { public var m_vertices:Array; public var m_normals:Array; private var s_supportVec:b2Vec2; public var m_obb:b2OBB; public var m_coreVertices:Array; public var m_centroid:b2Vec2; public var m_vertexCount:int; private static var s_computeMat:b2Mat22 = new b2Mat22(); private static var s_sweptAABB1:b2AABB = new b2AABB(); private static var s_sweptAABB2:b2AABB = new b2AABB(); public function b2PolygonShape(_arg1:b2ShapeDef){ var _local2:b2PolygonDef; var _local3:int; var _local4:int; var _local5:int; 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; s_supportVec = new b2Vec2(); m_obb = new b2OBB(); m_vertices = new Array(b2Settings.b2_maxPolygonVertices); m_normals = new Array(b2Settings.b2_maxPolygonVertices); m_coreVertices = new Array(b2Settings.b2_maxPolygonVertices); super(_arg1); m_type = e_polygonShape; _local2 = (_arg1 as b2PolygonDef); m_vertexCount = _local2.vertexCount; _local4 = _local3; _local5 = _local3; _local3 = 0; while (_local3 < m_vertexCount) { m_vertices[_local3] = _local2.vertices[_local3].Copy(); _local3++; }; _local3 = 0; while (_local3 < m_vertexCount) { _local4 = _local3; _local5 = (((_local3 + 1) < m_vertexCount)) ? (_local3 + 1) : 0; _local6 = (m_vertices[_local5].x - m_vertices[_local4].x); _local7 = (m_vertices[_local5].y - m_vertices[_local4].y); _local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); m_normals[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8)); _local3++; }; m_centroid = ComputeCentroid(_local2.vertices, _local2.vertexCount); ComputeOBB(m_obb, m_vertices, m_vertexCount); _local3 = 0; while (_local3 < m_vertexCount) { _local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : (m_vertexCount - 1); _local5 = _local3; _local9 = m_normals[_local4].x; _local10 = m_normals[_local4].y; _local11 = m_normals[_local5].x; _local12 = m_normals[_local5].y; _local13 = (m_vertices[_local3].x - m_centroid.x); _local14 = (m_vertices[_local3].y - m_centroid.y); _local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop); _local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop); _local17 = (1 / ((_local9 * _local12) - (_local10 * _local11))); m_coreVertices[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) + m_centroid.x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) + m_centroid.y)); _local3++; }; } override public function TestPoint(_arg1:b2XForm, _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); } public function GetCoreVertices():Array{ return (m_coreVertices); } public function GetCentroid():b2Vec2{ return (m_centroid); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ 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; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:int; var _local20:Number; var _local21:Number; _local6 = 0; _local7 = _arg5; _local8 = (_arg4.p1.x - _arg1.position.x); _local9 = (_arg4.p1.y - _arg1.position.y); _local10 = _arg1.R; _local12 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local13 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local8 = (_arg4.p2.x - _arg1.position.x); _local9 = (_arg4.p2.y - _arg1.position.y); _local10 = _arg1.R; _local14 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local15 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local16 = (_local14 - _local12); _local17 = (_local15 - _local13); _local18 = -1; _local19 = 0; while (_local19 < m_vertexCount) { _local11 = m_vertices[_local19]; _local8 = (_local11.x - _local12); _local9 = (_local11.y - _local13); _local11 = m_normals[_local19]; _local20 = ((_local11.x * _local8) + (_local11.y * _local9)); _local21 = ((_local11.x * _local16) + (_local11.y * _local17)); if ((((_local21 < 0)) && ((_local20 < (_local6 * _local21))))){ _local6 = (_local20 / _local21); _local18 = _local19; } else { if ((((_local21 > 0)) && ((_local20 < (_local7 * _local21))))){ _local7 = (_local20 / _local21); }; }; if (_local7 < _local6){ return (false); }; _local19++; }; if (_local18 >= 0){ _arg2[0] = _local6; _local10 = _arg1.R; _local11 = m_normals[_local18]; _arg3.x = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _arg3.y = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); return (true); }; return (false); } override public function ComputeMass(_arg1:b2MassData):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:b2Vec2; var _local11:b2Vec2; 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; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = (1 / 3); _local9 = 0; while (_local9 < m_vertexCount) { _local10 = m_vertices[_local9]; _local11 = (((_local9 + 1) < m_vertexCount)) ? m_vertices[int((_local9 + 1))] : m_vertices[0]; _local12 = (_local10.x - _local6); _local13 = (_local10.y - _local7); _local14 = (_local11.x - _local6); _local15 = (_local11.y - _local7); _local16 = ((_local12 * _local15) - (_local13 * _local14)); _local17 = (0.5 * _local16); _local4 = (_local4 + _local17); _local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x))); _local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y))); _local18 = _local6; _local19 = _local7; _local20 = _local12; _local21 = _local13; _local22 = _local14; _local23 = _local15; _local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18)); _local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local5 = (_local5 + (_local16 * (_local24 + _local25))); _local9++; }; _arg1.mass = (m_density * _local4); _local2 = (_local2 * (1 / _local4)); _local3 = (_local3 * (1 / _local4)); _arg1.center.Set(_local2, _local3); _arg1.I = (m_density * _local5); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Vec2; var _local5:b2Mat22; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:int; var _local11:Number; _local5 = _arg1.R; _local6 = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y)); _local7 = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y)); _local8 = 0; _local4 = m_coreVertices[0]; _local9 = ((_local4.x * _local6) + (_local4.y * _local7)); _local10 = 1; while (_local10 < m_vertexCount) { _local4 = m_coreVertices[_local10]; _local11 = ((_local4.x * _local6) + (_local4.y * _local7)); if (_local11 > _local9){ _local8 = _local10; _local9 = _local11; }; _local10++; }; _local5 = _arg1.R; _local4 = m_coreVertices[_local8]; s_supportVec.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y))); s_supportVec.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y))); return (s_supportVec); } public function GetVertexCount():int{ return (m_vertexCount); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2AABB; var _local5:b2AABB; _local4 = s_sweptAABB1; _local5 = s_sweptAABB2; ComputeAABB(_local4, _arg2); ComputeAABB(_local5, _arg3); _arg1.lowerBound.Set(((_local4.lowerBound.x < _local5.lowerBound.x)) ? _local4.lowerBound.x : _local5.lowerBound.x, ((_local4.lowerBound.y < _local5.lowerBound.y)) ? _local4.lowerBound.y : _local5.lowerBound.y); _arg1.upperBound.Set(((_local4.upperBound.x > _local5.upperBound.x)) ? _local4.upperBound.x : _local5.upperBound.x, ((_local4.upperBound.y > _local5.upperBound.y)) ? _local4.upperBound.y : _local5.upperBound.y); } public function GetVertices():Array{ return (m_vertices); } public function GetNormals():Array{ return (m_normals); } public function GetOBB():b2OBB{ return (m_obb); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_coreVertices[0])); } public function Centroid(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_centroid)); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:b2Vec2; var _local3:int; var _local4:Number; var _local5:Number; m_sweepRadius = 0; _local3 = 0; while (_local3 < m_vertexCount) { _local2 = m_coreVertices[_local3]; _local4 = (_local2.x - _arg1.x); _local5 = (_local2.y - _arg1.y); _local4 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5))); if (_local4 > m_sweepRadius){ m_sweepRadius = _local4; }; _local3++; }; } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Mat22; var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local5 = s_computeMat; _local3 = _arg2.R; _local4 = m_obb.R.col1; _local5.col1.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col1.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local4 = m_obb.R.col2; _local5.col2.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col2.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local5.Abs(); _local6 = _local5; _local4 = m_obb.extents; _local7 = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y)); _local8 = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y)); _local3 = _arg2.R; _local4 = m_obb.center; _local9 = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y))); _local10 = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y))); _arg1.lowerBound.Set((_local9 - _local7), (_local10 - _local8)); _arg1.upperBound.Set((_local9 + _local7), (_local10 + _local8)); } public static function ComputeCentroid(_arg1:Array, _arg2:int):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 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((b2Settings.b2_maxPolygonVertices + 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++; }; } } }//package Box2D.Collision.Shapes
Section 7
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; public class b2Shape { public var m_type:int; public var m_sweepRadius:Number; public var m_density:Number; public var m_filter:b2FilterData; public var id:String;// = "unidentified" public var m_next:b2Shape; public var m_restitution:Number; public var m_userData; public var m_isSensor:Boolean; public var m_proxyId:uint; public var m_friction:Number; public var m_body:b2Body; public static const e_polygonShape:int = 1; public static const e_unknownShape:int = -1; public static const e_circleShape:int = 0; public static const e_shapeTypeCount:int = 2; private static var s_resetAABB:b2AABB = new b2AABB(); private static var s_syncAABB:b2AABB = new b2AABB(); private static var s_proxyAABB:b2AABB = new b2AABB(); public function b2Shape(_arg1:b2ShapeDef){ id = "unidentified"; super(); m_userData = _arg1.userData; m_friction = _arg1.friction; m_restitution = _arg1.restitution; m_density = _arg1.density; m_body = null; m_sweepRadius = 0; m_next = null; m_proxyId = b2Pair.b2_nullProxy; m_filter = _arg1.filter.Copy(); m_isSensor = _arg1.isSensor; } public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ return (false); } public function GetSweepRadius():Number{ return (m_sweepRadius); } public function GetNext():b2Shape{ return (m_next); } public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ } public function GetType():int{ return (m_type); } public function GetRestitution():Number{ return (m_restitution); } public function GetFriction():Number{ return (m_friction); } public function GetFilterData():b2FilterData{ return (m_filter.Copy()); } public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ return (false); } public function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB; var _local4:Boolean; if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _arg1.DestroyProxy(m_proxyId); _local3 = s_resetAABB; ComputeAABB(_local3, _arg2); _local4 = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function SetFilterData(_arg1:b2FilterData):void{ m_filter = _arg1.Copy(); } public function GetUserData(){ return (m_userData); } public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{ var _local4:b2AABB; if (m_proxyId == b2Pair.b2_nullProxy){ return (false); }; _local4 = s_syncAABB; ComputeSweptAABB(_local4, _arg2, _arg3); if (_arg1.InRange(_local4)){ _arg1.MoveProxy(m_proxyId, _local4); return (true); }; return (false); } public function ComputeMass(_arg1:b2MassData):void{ } public function IsSensor():Boolean{ return (m_isSensor); } public function DestroyProxy(_arg1:b2BroadPhase):void{ if (m_proxyId != b2Pair.b2_nullProxy){ _arg1.DestroyProxy(m_proxyId); m_proxyId = b2Pair.b2_nullProxy; }; } public function UpdateSweepRadius(_arg1:b2Vec2):void{ } public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ } public function GetBody():b2Body{ return (m_body); } public function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB; var _local4:Boolean; _local3 = s_proxyAABB; ComputeAABB(_local3, _arg2); _local4 = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function SetUserData(_arg1):void{ m_userData = _arg1; } public static function Destroy(_arg1:b2Shape, _arg2):void{ } public static function Create(_arg1:b2ShapeDef, _arg2):b2Shape{ switch (_arg1.type){ case e_circleShape: return (new b2CircleShape(_arg1)); case e_polygonShape: return (new b2PolygonShape(_arg1)); default: return (null); }; } } }//package Box2D.Collision.Shapes
Section 8
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { public class b2ShapeDef { public var id:String;// = "unidentified" public var isSensor:Boolean;// = false public var density:Number;// = 0 public var type:int; public var restitution:Number;// = 0 public var userData;// = null public var filter:b2FilterData; public var friction:Number;// = 0.2 public function b2ShapeDef(){ id = "unidentified"; type = b2Shape.e_unknownShape; userData = null; friction = 0.2; restitution = 0; density = 0; isSensor = false; filter = new b2FilterData(); super(); } } }//package Box2D.Collision.Shapes
Section 9
//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 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); } } }//package Box2D.Collision
Section 10
//b2Bound (Box2D.Collision.b2Bound) package Box2D.Collision { public class b2Bound { public var proxyId:uint; public var stabbingCount:uint; public var value:uint; public function Swap(_arg1:b2Bound):void{ var _local2:uint; var _local3:uint; var _local4:uint; _local2 = value; _local3 = proxyId; _local4 = stabbingCount; value = _arg1.value; proxyId = _arg1.proxyId; stabbingCount = _arg1.stabbingCount; _arg1.value = _local2; _arg1.proxyId = _local3; _arg1.stabbingCount = _local4; } public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } } }//package Box2D.Collision
Section 11
//b2BoundValues (Box2D.Collision.b2BoundValues) package Box2D.Collision { public class b2BoundValues { public var lowerValues:Array; public var upperValues:Array; public function b2BoundValues(){ lowerValues = [0, 0]; upperValues = [0, 0]; super(); } } }//package Box2D.Collision
Section 12
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { public var m_quantizationFactor:b2Vec2; public var m_worldAABB:b2AABB; public var m_bounds:Array; public var m_freeProxy:uint; public var m_proxyCount:int; public var m_proxyPool:Array; public var m_queryResultCount:int; public var m_pairManager:b2PairManager; public var m_timeStamp:uint; public var m_queryResults:Array; public static const b2_nullEdge:uint = b2Settings.USHRT_MAX; public static const b2_invalid:uint = b2Settings.USHRT_MAX; public static var s_validate:Boolean = false; public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){ var _local3:int; var _local4:Number; var _local5:Number; var _local6:b2Proxy; var _local7:int; m_pairManager = new b2PairManager(); m_proxyPool = new Array(b2Settings.b2_maxPairs); m_bounds = new Array((2 * b2Settings.b2_maxProxies)); m_queryResults = new Array(b2Settings.b2_maxProxies); m_quantizationFactor = new b2Vec2(); super(); m_pairManager.Initialize(this, _arg2); m_worldAABB = _arg1; m_proxyCount = 0; _local3 = 0; while (_local3 < b2Settings.b2_maxProxies) { m_queryResults[_local3] = 0; _local3++; }; m_bounds = new Array(2); _local3 = 0; while (_local3 < 2) { m_bounds[_local3] = new Array((2 * b2Settings.b2_maxProxies)); _local7 = 0; while (_local7 < (2 * b2Settings.b2_maxProxies)) { m_bounds[_local3][_local7] = new b2Bound(); _local7++; }; _local3++; }; _local4 = (_arg1.upperBound.x - _arg1.lowerBound.x); _local5 = (_arg1.upperBound.y - _arg1.lowerBound.y); m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4); m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5); _local3 = 0; while (_local3 < (b2Settings.b2_maxProxies - 1)) { _local6 = new b2Proxy(); m_proxyPool[_local3] = _local6; _local6.SetNext((_local3 + 1)); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; _local3++; }; _local6 = new b2Proxy(); m_proxyPool[int((b2Settings.b2_maxProxies - 1))] = _local6; _local6.SetNext(b2Pair.b2_nullProxy); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; m_freeProxy = 0; m_timeStamp = 1; m_queryResultCount = 0; } public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _local4:Array; var _local5:Array; var _local6:uint; var _local7:uint; var _local8:Array; var _local9:Array; var _local10:int; var _local11:int; var _local12:b2Proxy; _local4 = new Array(); _local5 = new Array(); ComputeBounds(_local4, _local5, _arg1); _local8 = [_local6]; _local9 = [_local7]; Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0); Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1); _local10 = 0; _local11 = 0; while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) { _local12 = m_proxyPool[m_queryResults[_local11]]; _arg2[_local11] = _local12.userData; _local11++; _local10++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local10); } public function Commit():void{ m_pairManager.Commit(); } public function GetProxy(_arg1:int):b2Proxy{ var _local2:b2Proxy; _local2 = m_proxyPool[_arg1]; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){ return (null); }; return (_local2); } private function IncrementTimeStamp():void{ var _local1:uint; if (m_timeStamp == b2Settings.USHRT_MAX){ _local1 = 0; while (_local1 < b2Settings.b2_maxProxies) { (m_proxyPool[_local1] as b2Proxy).timeStamp = 0; _local1++; }; m_timeStamp = 1; } else { m_timeStamp++; }; } private function Query(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{ var _local8:uint; var _local9:uint; var _local10:b2Bound; var _local11:uint; var _local12:int; var _local13:int; var _local14:b2Proxy; _local8 = BinarySearch(_arg5, _arg6, _arg3); _local9 = BinarySearch(_arg5, _arg6, _arg4); _local11 = _local8; while (_local11 < _local9) { _local10 = _arg5[_local11]; if (_local10.IsLower()){ IncrementOverlapCount(_local10.proxyId); }; _local11++; }; if (_local8 > 0){ _local12 = (_local8 - 1); _local10 = _arg5[_local12]; _local13 = _local10.stabbingCount; while (_local13) { _local10 = _arg5[_local12]; if (_local10.IsLower()){ _local14 = m_proxyPool[_local10.proxyId]; if (_local8 <= _local14.upperBounds[_arg7]){ IncrementOverlapCount(_local10.proxyId); _local13--; }; }; _local12--; }; }; _arg1[0] = _local8; _arg2[0] = _local9; } private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{ var _local3:int; var _local4:Array; var _local5:b2Bound; var _local6:b2Bound; _local3 = 0; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg1.lowerBounds[_local3]]; _local6 = _local4[_arg2.upperBounds[_local3]]; if (_local5.value > _local6.value){ return (false); }; _local5 = _local4[_arg1.upperBounds[_local3]]; _local6 = _local4[_arg2.lowerBounds[_local3]]; if (_local5.value < _local6.value){ return (false); }; _local3++; }; return (true); } private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local4 = _arg3.lowerBound.x; _local5 = _arg3.lowerBound.y; _local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x); _local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y); _local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x); _local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y); _local6 = _arg3.upperBound.x; _local7 = _arg3.upperBound.y; _local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x); _local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y); _local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x); _local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y); _arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1)); _arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1); _arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1)); _arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1); } public function CreateProxy(_arg1:b2AABB, _arg2):uint{ var _local3:uint; var _local4:b2Proxy; var _local5:uint; var _local6:uint; var _local7:Array; var _local8:Array; var _local9:int; var _local10:int; var _local11:Array; var _local12:uint; var _local13:uint; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:int; var _local18:int; var _local19:b2Bound; var _local20:b2Bound; var _local21:b2Bound; var _local22:int; var _local23:b2Proxy; _local5 = m_freeProxy; _local4 = m_proxyPool[_local5]; m_freeProxy = _local4.GetNext(); _local4.overlapCount = 0; _local4.userData = _arg2; _local6 = (2 * m_proxyCount); _local7 = new Array(); _local8 = new Array(); ComputeBounds(_local7, _local8, _arg1); _local9 = 0; while (_local9 < 2) { _local11 = m_bounds[_local9]; _local14 = [_local12]; _local15 = [_local13]; Query(_local14, _local15, _local7[_local9], _local8[_local9], _local11, _local6, _local9); _local12 = _local14[0]; _local13 = _local15[0]; _local16 = new Array(); _local18 = (_local6 - _local13); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[int((_local13 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local22 = (_local13 + 2); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[int((_local22 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local16 = new Array(); _local18 = (_local13 - _local12); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[int((_local12 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local22 = (_local12 + 1); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[int((_local22 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local13++; _local19 = _local11[_local12]; _local20 = _local11[_local13]; _local19.value = _local7[_local9]; _local19.proxyId = _local5; _local20.value = _local8[_local9]; _local20.proxyId = _local5; _local21 = _local11[int((_local12 - 1))]; _local19.stabbingCount = ((_local12 == 0)) ? 0 : _local21.stabbingCount; _local21 = _local11[int((_local13 - 1))]; _local20.stabbingCount = _local21.stabbingCount; _local3 = _local12; while (_local3 < _local13) { _local21 = _local11[_local3]; _local21.stabbingCount++; _local3++; }; _local3 = _local12; while (_local3 < (_local6 + 2)) { _local19 = _local11[_local3]; _local23 = m_proxyPool[_local19.proxyId]; if (_local19.IsLower()){ _local23.lowerBounds[_local9] = _local3; } else { _local23.upperBounds[_local9] = _local3; }; _local3++; }; _local9++; }; m_proxyCount++; _local10 = 0; while (_local10 < m_queryResultCount) { m_pairManager.AddBufferedPair(_local5, m_queryResults[_local10]); _local10++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); return (_local5); } public function DestroyProxy(_arg1:uint):void{ var _local2:b2Bound; var _local3:b2Bound; var _local4:b2Proxy; var _local5:int; var _local6:int; var _local7:int; var _local8:Array; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:Array; var _local14:int; var _local15:int; var _local16:int; var _local17:uint; var _local18:int; var _local19:b2Proxy; _local4 = m_proxyPool[_arg1]; _local5 = (2 * m_proxyCount); _local6 = 0; while (_local6 < 2) { _local8 = m_bounds[_local6]; _local9 = _local4.lowerBounds[_local6]; _local10 = _local4.upperBounds[_local6]; _local2 = _local8[_local9]; _local11 = _local2.value; _local3 = _local8[_local10]; _local12 = _local3.value; _local13 = new Array(); _local15 = ((_local10 - _local9) - 1); _local14 = 0; while (_local14 < _local15) { _local13[_local14] = new b2Bound(); _local2 = _local13[_local14]; _local3 = _local8[int(((_local9 + 1) + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = _local13.length; _local16 = _local9; _local14 = 0; while (_local14 < _local15) { _local3 = _local13[_local14]; _local2 = _local8[int((_local16 + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local13 = new Array(); _local15 = ((_local5 - _local10) - 1); _local14 = 0; while (_local14 < _local15) { _local13[_local14] = new b2Bound(); _local2 = _local13[_local14]; _local3 = _local8[int(((_local10 + 1) + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = _local13.length; _local16 = (_local10 - 1); _local14 = 0; while (_local14 < _local15) { _local3 = _local13[_local14]; _local2 = _local8[int((_local16 + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = (_local5 - 2); _local17 = _local9; while (_local17 < _local15) { _local2 = _local8[_local17]; _local19 = m_proxyPool[_local2.proxyId]; if (_local2.IsLower()){ _local19.lowerBounds[_local6] = _local17; } else { _local19.upperBounds[_local6] = _local17; }; _local17++; }; _local15 = (_local10 - 1); _local18 = _local9; while (_local18 < _local15) { _local2 = _local8[_local18]; _local2.stabbingCount--; _local18++; }; Query([0], [0], _local11, _local12, _local8, (_local5 - 2), _local6); _local6++; }; _local7 = 0; while (_local7 < m_queryResultCount) { m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local7]); _local7++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); _local4.userData = null; _local4.overlapCount = b2_invalid; _local4.lowerBounds[0] = b2_invalid; _local4.lowerBounds[1] = b2_invalid; _local4.upperBounds[0] = b2_invalid; _local4.upperBounds[1] = b2_invalid; _local4.SetNext(m_freeProxy); m_freeProxy = _arg1; m_proxyCount--; } public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{ var _local3:int; var _local4:Array; var _local5:b2Bound; _local3 = 0; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg2.upperBounds[_local3]]; if (_arg1.lowerValues[_local3] > _local5.value){ return (false); }; _local5 = _local4[_arg2.lowerBounds[_local3]]; if (_arg1.upperValues[_local3] < _local5.value){ return (false); }; _local3++; }; return (true); } public function Validate():void{ var _local1:b2Pair; var _local2:b2Proxy; var _local3:b2Proxy; var _local4:Boolean; var _local5:int; var _local6:b2Bound; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Bound; _local5 = 0; while (_local5 < 2) { _local6 = m_bounds[_local5]; _local7 = (2 * m_proxyCount); _local8 = 0; _local9 = 0; while (_local9 < _local7) { _local10 = _local6[_local9]; if (_local10.IsLower() == true){ _local8++; } else { _local8--; }; _local9++; }; _local5++; }; } private function IncrementOverlapCount(_arg1:uint):void{ var _local2:b2Proxy; _local2 = m_proxyPool[_arg1]; if (_local2.timeStamp < m_timeStamp){ _local2.timeStamp = m_timeStamp; _local2.overlapCount = 1; } else { _local2.overlapCount = 2; m_queryResults[m_queryResultCount] = _arg1; m_queryResultCount++; }; } public function InRange(_arg1:b2AABB):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = _arg1.lowerBound.x; _local3 = _arg1.lowerBound.y; _local2 = (_local2 - m_worldAABB.upperBound.x); _local3 = (_local3 - m_worldAABB.upperBound.y); _local4 = m_worldAABB.lowerBound.x; _local5 = m_worldAABB.lowerBound.y; _local4 = (_local4 - _arg1.upperBound.x); _local5 = (_local5 - _arg1.upperBound.y); _local2 = b2Math.b2Max(_local2, _local4); _local3 = b2Math.b2Max(_local3, _local5); return ((b2Math.b2Max(_local2, _local3) < 0)); } public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{ var _local3:Array; var _local4:int; var _local5:uint; var _local6:uint; var _local7:b2Bound; var _local8:b2Bound; var _local9:b2Bound; var _local10:uint; var _local11:b2Proxy; var _local12:uint; var _local13:b2Proxy; var _local14:b2BoundValues; var _local15:b2BoundValues; var _local16:Array; var _local17:uint; var _local18:uint; var _local19:uint; var _local20:uint; var _local21:int; var _local22:int; var _local23:uint; var _local24:b2Proxy; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){ return; }; if (_arg2.IsValid() == false){ return; }; _local12 = (2 * m_proxyCount); _local13 = m_proxyPool[_arg1]; _local14 = new b2BoundValues(); ComputeBounds(_local14.lowerValues, _local14.upperValues, _arg2); _local15 = new b2BoundValues(); _local5 = 0; while (_local5 < 2) { _local7 = m_bounds[_local5][_local13.lowerBounds[_local5]]; _local15.lowerValues[_local5] = _local7.value; _local7 = m_bounds[_local5][_local13.upperBounds[_local5]]; _local15.upperValues[_local5] = _local7.value; _local5++; }; _local5 = 0; while (_local5 < 2) { _local16 = m_bounds[_local5]; _local17 = _local13.lowerBounds[_local5]; _local18 = _local13.upperBounds[_local5]; _local19 = _local14.lowerValues[_local5]; _local20 = _local14.upperValues[_local5]; _local7 = _local16[_local17]; _local21 = (_local19 - _local7.value); _local7.value = _local19; _local7 = _local16[_local18]; _local22 = (_local20 - _local7.value); _local7.value = _local20; if (_local21 < 0){ _local6 = _local17; while ((((_local6 > 0)) && ((_local19 < (_local16[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local16[_local6]; _local8 = _local16[int((_local6 - 1))]; _local23 = _local8.proxyId; _local24 = m_proxyPool[_local8.proxyId]; _local8.stabbingCount++; if (_local8.IsUpper() == true){ if (TestOverlap(_local14, _local24)){ m_pairManager.AddBufferedPair(_arg1, _local23); }; _local3 = _local24.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; } else { _local3 = _local24.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; }; _local3 = _local13.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.Swap(_local8); _local6--; }; }; if (_local22 > 0){ _local6 = _local18; while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local20)))) { _local7 = _local16[_local6]; _local9 = _local16[int((_local6 + 1))]; _local10 = _local9.proxyId; _local11 = m_proxyPool[_local10]; _local9.stabbingCount++; if (_local9.IsLower() == true){ if (TestOverlap(_local14, _local11)){ m_pairManager.AddBufferedPair(_arg1, _local10); }; _local3 = _local11.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount++; } else { _local3 = _local11.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount--; }; _local3 = _local13.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local21 > 0){ _local6 = _local17; while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local19)))) { _local7 = _local16[_local6]; _local9 = _local16[int((_local6 + 1))]; _local10 = _local9.proxyId; _local11 = m_proxyPool[_local10]; _local9.stabbingCount--; if (_local9.IsUpper()){ if (TestOverlap(_local15, _local11)){ m_pairManager.RemoveBufferedPair(_arg1, _local10); }; _local3 = _local11.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount--; } else { _local3 = _local11.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount++; }; _local3 = _local13.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local22 < 0){ _local6 = _local18; while ((((_local6 > 0)) && ((_local20 < (_local16[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local16[_local6]; _local8 = _local16[int((_local6 - 1))]; _local23 = _local8.proxyId; _local24 = m_proxyPool[_local23]; _local8.stabbingCount--; if (_local8.IsLower() == true){ if (TestOverlap(_local15, _local24)){ m_pairManager.RemoveBufferedPair(_arg1, _local23); }; _local3 = _local24.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; } else { _local3 = _local24.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; }; _local3 = _local13.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.Swap(_local8); _local6--; }; }; _local5++; }; } public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{ var _local4:int; var _local5:int; var _local6:int; var _local7:b2Bound; _local4 = 0; _local5 = (_arg2 - 1); while (_local4 <= _local5) { _local6 = ((_local4 + _local5) / 2); _local7 = _arg1[_local6]; if (_local7.value > _arg3){ _local5 = (_local6 - 1); } else { if (_local7.value < _arg3){ _local4 = (_local6 + 1); } else { return (uint(_local6)); }; }; }; return (uint(_local4)); } } }//package Box2D.Collision
Section 13
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 14
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Collision { public static const b2_nullFeature:uint = 0xFF; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):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 b2TestOverlap(_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); } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):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 b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{ var _local6:ClipVertex; var _local7:int; var _local8:Array; var _local9:Number; var _local10:int; var _local11:Array; var _local12:Number; var _local13:b2PolygonShape; var _local14:b2PolygonShape; var _local15:b2XForm; var _local16:b2XForm; var _local17:int; var _local18:uint; var _local19:Number; var _local20:Number; 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:Number; var _local30:Number; var _local31:Number; var _local32:Array; var _local33:Array; var _local34:int; var _local35:int; var _local36:int; var _local37:b2Vec2; var _local38:Number; var _local39:b2ManifoldPoint; _arg1.pointCount = 0; _local7 = 0; _local8 = [_local7]; _local9 = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5); _local7 = _local8[0]; if (_local9 > 0){ return; }; _local10 = 0; _local11 = [_local10]; _local12 = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3); _local10 = _local11[0]; if (_local12 > 0){ return; }; _local15 = new b2XForm(); _local16 = new b2XForm(); _local19 = 0.98; _local20 = 0.001; if (_local12 > ((_local19 * _local9) + _local20)){ _local13 = _arg4; _local14 = _arg2; _local15.Set(_arg5); _local16.Set(_arg3); _local17 = _local10; _local18 = 1; } else { _local13 = _arg2; _local14 = _arg4; _local15.Set(_arg3); _local16.Set(_arg5); _local17 = _local7; _local18 = 0; }; _local21 = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16); _local22 = _local13.m_vertexCount; _local23 = _local13.m_vertices; _local24 = _local23[_local17]; _local25 = _local24.Copy(); if ((_local17 + 1) < _local22){ _local24 = _local23[int((_local17 + 1))]; _local37 = _local24.Copy(); } else { _local24 = _local23[0]; _local37 = _local24.Copy(); }; _local26 = b2Math.SubtractVV(_local37, _local25); _local27 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25)); _local27.Normalize(); _local28 = b2Math.b2CrossVF(_local27, 1); _local25 = b2Math.b2MulX(_local15, _local25); _local37 = b2Math.b2MulX(_local15, _local37); _local29 = b2Math.b2Dot(_local28, _local25); _local30 = -(b2Math.b2Dot(_local27, _local25)); _local31 = b2Math.b2Dot(_local27, _local37); _local32 = [new ClipVertex(), new ClipVertex()]; _local33 = [new ClipVertex(), new ClipVertex()]; _local34 = ClipSegmentToLine(_local32, _local21, _local27.Negative(), _local30); if (_local34 < 2){ return; }; _local34 = ClipSegmentToLine(_local33, _local32, _local27, _local31); if (_local34 < 2){ return; }; _arg1.normal = (_local18) ? _local28.Negative() : _local28.Copy(); _local35 = 0; _local36 = 0; while (_local36 < b2Settings.b2_maxManifoldPoints) { _local6 = _local33[_local36]; _local38 = (b2Math.b2Dot(_local28, _local6.v) - _local29); if (_local38 <= 0){ _local39 = _arg1.points[_local35]; _local39.separation = _local38; _local39.localPoint1 = b2Math.b2MulXT(_arg3, _local6.v); _local39.localPoint2 = b2Math.b2MulXT(_arg5, _local6.v); _local39.id.key = _local6.id._key; _local39.id.features.flip = _local18; _local35++; }; _local36++; }; _arg1.pointCount = _local35; } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):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); if (_local17 > 0){ return (_local17); }; _local18 = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1); _local19 = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5); if (_local19 > 0){ return (_local19); }; _local20 = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0; _local21 = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5); if (_local21 > 0){ return (_local21); }; 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 > 0){ return (_local17); }; if (_local17 > _local23){ _local22 = _local14; _local23 = _local17; } else { break; }; }; _arg1[0] = _local22; return (_local23); } 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 = (b2Math.b2Dot(_arg3, _local7) - _arg4); _local10 = (b2Math.b2Dot(_arg3, _local8) - _arg4); if (_local9 <= 0){ var _temp1 = _local6; _local6 = (_local6 + 1); var _local14 = _temp1; _arg1[_local14] = _arg2[0]; }; if (_local10 <= 0){ var _temp2 = _local6; _local6 = (_local6 + 1); _local14 = _temp2; _arg1[_local14] = _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); } public static function b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):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; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:b2ManifoldPoint; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _arg1.pointCount = 0; _local6 = _arg3.R; _local7 = _arg2.m_localPosition; _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_localPosition; _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; _local16 = _arg4.m_radius; _local17 = (_local15 + _local16); if (_local14 > (_local17 * _local17)){ return; }; if (_local14 < Number.MIN_VALUE){ _local18 = -(_local17); _arg1.normal.Set(0, 1); } else { _local24 = Math.sqrt(_local14); _local18 = (_local24 - _local17); _local25 = (1 / _local24); _arg1.normal.x = (_local25 * _local12); _arg1.normal.y = (_local25 * _local13); }; _arg1.pointCount = 1; _local19 = _arg1.points[0]; _local19.id.key = 0; _local19.separation = _local18; _local8 = (_local8 + (_local15 * _arg1.normal.x)); _local9 = (_local9 + (_local15 * _arg1.normal.y)); _local10 = (_local10 - (_local16 * _arg1.normal.x)); _local11 = (_local11 - (_local16 * _arg1.normal.y)); _local20 = (0.5 * (_local8 + _local10)); _local21 = (0.5 * (_local9 + _local11)); _local22 = (_local20 - _arg3.position.x); _local23 = (_local21 - _arg3.position.y); _local19.localPoint1.x = ((_local22 * _arg3.R.col1.x) + (_local23 * _arg3.R.col1.y)); _local19.localPoint1.y = ((_local22 * _arg3.R.col2.x) + (_local23 * _arg3.R.col2.y)); _local22 = (_local20 - _arg5.position.x); _local23 = (_local21 - _arg5.position.y); _local19.localPoint2.x = ((_local22 * _arg5.R.col1.x) + (_local23 * _arg5.R.col1.y)); _local19.localPoint2.y = ((_local22 * _arg5.R.col2.x) + (_local23 * _arg5.R.col2.y)); } public static function b2CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):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:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; _arg1.pointCount = 0; _local12 = _arg5.R; _local11 = _arg4.m_localPosition; _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 = _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]; _local34 = ((_local11.x * _local7) + (_local11.y * _local8)); if (_local34 > _local20){ return; }; if (_local34 > _local19){ _local19 = _local34; _local18 = _local24; }; _local24++; }; if (_local19 < Number.MIN_VALUE){ _arg1.pointCount = 1; _local11 = _local23[_local18]; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y)); _arg1.normal.y = ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y)); _local6 = _arg1.points[0]; _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = b2_nullFeature; _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local19 - _local20); return; }; _local25 = _local18; _local26 = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0; _local11 = _local22[_local25]; _local27 = _local22[_local26]; _local28 = (_local27.x - _local11.x); _local29 = (_local27.y - _local11.y); _local30 = Math.sqrt(((_local28 * _local28) + (_local29 * _local29))); _local28 = (_local28 / _local30); _local29 = (_local29 / _local30); _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); _local31 = ((_local7 * _local28) + (_local8 * _local29)); _local6 = _arg1.points[0]; if (_local31 <= 0){ _local32 = _local11.x; _local33 = _local11.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local25; } else { if (_local31 >= _local30){ _local32 = _local27.x; _local33 = _local27.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local26; } else { _local32 = ((_local28 * _local31) + _local11.x); _local33 = ((_local29 * _local31) + _local11.y); _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = 0; }; }; _local7 = (_local15 - _local32); _local8 = (_local16 - _local33); _local17 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8))); _local7 = (_local7 / _local17); _local8 = (_local8 / _local17); if (_local17 > _local20){ return; }; _arg1.pointCount = 1; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local7) + (_local12.col2.x * _local8)); _arg1.normal.y = ((_local12.col1.y * _local7) + (_local12.col2.y * _local8)); _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local17 - _local20); _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; } } }//package Box2D.Collision
Section 15
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { public class b2ContactID { public 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 16
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 17
//b2Distance (Box2D.Collision.b2Distance) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Distance { private static var s_p2s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_points:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var gPoint:b2Point = new b2Point(); public static var g_GJK_Iterations:int = 0; public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{ var _local4:Number; var _local5:int; var _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local4 = (100 * Number.MIN_VALUE); _local5 = 0; while (_local5 < _arg3) { _local6 = _arg2[_local5]; _local7 = Math.abs((_arg1.x - _local6.x)); _local8 = Math.abs((_arg1.y - _local6.y)); _local9 = Math.max(Math.abs(_arg1.x), Math.abs(_local6.x)); _local10 = Math.max(Math.abs(_arg1.y), Math.abs(_local6.y)); if ((((_local7 < (_local4 * (_local9 + 1)))) && ((_local8 < (_local4 * (_local10 + 1)))))){ return (true); }; _local5++; }; return (false); } public static function DistanceGeneric(_arg1:b2Vec2, _arg2:b2Vec2, _arg3, _arg4:b2XForm, _arg5, _arg6:b2XForm):Number{ var _local7:b2Vec2; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:int; var _local12:Number; var _local13:int; var _local14:int; var _local15:Number; var _local16:Number; var _local17:b2Vec2; var _local18:b2Vec2; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:int; _local8 = s_p1s; _local9 = s_p2s; _local10 = s_points; _local11 = 0; _arg1.SetV(_arg3.GetFirstVertex(_arg4)); _arg2.SetV(_arg5.GetFirstVertex(_arg6)); _local12 = 0; _local13 = 20; _local14 = 0; while (_local14 < _local13) { _local15 = (_arg2.x - _arg1.x); _local16 = (_arg2.y - _arg1.y); _local17 = _arg3.Support(_arg4, _local15, _local16); _local18 = _arg5.Support(_arg6, -(_local15), -(_local16)); _local12 = ((_local15 * _local15) + (_local16 * _local16)); _local19 = (_local18.x - _local17.x); _local20 = (_local18.y - _local17.y); _local21 = ((_local15 * _local19) + (_local16 * _local20)); if ((_local12 - ((_local15 * _local19) + (_local16 * _local20))) <= (0.01 * _local12)){ if (_local11 == 0){ _arg1.SetV(_local17); _arg2.SetV(_local18); }; g_GJK_Iterations = _local14; return (Math.sqrt(_local12)); }; switch (_local11){ case 0: _local7 = _local8[0]; _local7.SetV(_local17); _local7 = _local9[0]; _local7.SetV(_local18); _local7 = _local10[0]; _local7.x = _local19; _local7.y = _local20; _arg1.SetV(_local8[0]); _arg2.SetV(_local9[0]); _local11++; break; case 1: _local7 = _local8[1]; _local7.SetV(_local17); _local7 = _local9[1]; _local7.SetV(_local18); _local7 = _local10[1]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessTwo(_arg1, _arg2, _local8, _local9, _local10); break; case 2: _local7 = _local8[2]; _local7.SetV(_local17); _local7 = _local9[2]; _local7.SetV(_local18); _local7 = _local10[2]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessThree(_arg1, _arg2, _local8, _local9, _local10); break; }; if (_local11 == 3){ g_GJK_Iterations = _local14; return (0); }; _local22 = -(Number.MAX_VALUE); _local23 = 0; while (_local23 < _local11) { _local7 = _local10[_local23]; _local22 = b2Math.b2Max(_local22, ((_local7.x * _local7.x) + (_local7.y * _local7.y))); _local23++; }; if ((((_local11 == 3)) || ((_local12 <= ((100 * Number.MIN_VALUE) * _local22))))){ g_GJK_Iterations = _local14; _local15 = (_arg2.x - _arg1.x); _local16 = (_arg2.y - _arg1.y); _local12 = ((_local15 * _local15) + (_local16 * _local16)); return (Math.sqrt(_local12)); }; _local14++; }; g_GJK_Iterations = _local13; return (Math.sqrt(_local12)); } public static function DistanceCC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2CircleShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; 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; _local7 = _arg4.R; _local8 = _arg3.m_localPosition; _local9 = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local10 = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local7 = _arg6.R; _local8 = _arg5.m_localPosition; _local11 = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local12 = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = ((_local13 * _local13) + (_local14 * _local14)); _local16 = (_arg3.m_radius - b2Settings.b2_toiSlop); _local17 = (_arg5.m_radius - b2Settings.b2_toiSlop); _local18 = (_local16 + _local17); if (_local15 > (_local18 * _local18)){ _local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _local20 = (_local19 - _local18); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = (_local11 - (_local17 * _local13)); _arg2.y = (_local12 - (_local17 * _local14)); return (_local20); }; if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){ _local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); }; _arg1.x = _local9; _arg1.y = _local10; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); } public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Vec2; 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; var _local27:Number; var _local28:Number; 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:Number; var _local40:Number; var _local41:Number; _local6 = _arg5[0]; _local7 = _arg5[1]; _local8 = _arg5[2]; _local9 = _arg3[0]; _local10 = _arg3[1]; _local11 = _arg3[2]; _local12 = _arg4[0]; _local13 = _arg4[1]; _local14 = _arg4[2]; _local15 = _local6.x; _local16 = _local6.y; _local17 = _local7.x; _local18 = _local7.y; _local19 = _local8.x; _local20 = _local8.y; _local21 = (_local17 - _local15); _local22 = (_local18 - _local16); _local23 = (_local19 - _local15); _local24 = (_local20 - _local16); _local25 = (_local19 - _local17); _local26 = (_local20 - _local18); _local27 = -(((_local15 * _local21) + (_local16 * _local22))); _local28 = ((_local17 * _local21) + (_local18 * _local22)); _local29 = -(((_local15 * _local23) + (_local16 * _local24))); _local30 = ((_local19 * _local23) + (_local20 * _local24)); _local31 = -(((_local17 * _local25) + (_local18 * _local26))); _local32 = ((_local19 * _local25) + (_local20 * _local26)); if ((((_local30 <= 0)) && ((_local32 <= 0)))){ _arg1.SetV(_local11); _arg2.SetV(_local14); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (1); }; _local33 = ((_local21 * _local24) - (_local22 * _local23)); _local34 = (_local33 * ((_local15 * _local18) - (_local16 * _local17))); _local36 = (_local33 * ((_local17 * _local20) - (_local18 * _local19))); if ((((((((_local36 <= 0)) && ((_local31 >= 0)))) && ((_local32 >= 0)))) && (((_local31 + _local32) > 0)))){ _local35 = (_local31 / (_local31 + _local32)); _arg1.x = (_local10.x + (_local35 * (_local11.x - _local10.x))); _arg1.y = (_local10.y + (_local35 * (_local11.y - _local10.y))); _arg2.x = (_local13.x + (_local35 * (_local14.x - _local13.x))); _arg2.y = (_local13.y + (_local35 * (_local14.y - _local13.y))); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (2); }; _local37 = (_local33 * ((_local19 * _local16) - (_local20 * _local15))); if ((((((((_local37 <= 0)) && ((_local29 >= 0)))) && ((_local30 >= 0)))) && (((_local29 + _local30) > 0)))){ _local35 = (_local29 / (_local29 + _local30)); _arg1.x = (_local9.x + (_local35 * (_local11.x - _local9.x))); _arg1.y = (_local9.y + (_local35 * (_local11.y - _local9.y))); _arg2.x = (_local12.x + (_local35 * (_local14.x - _local12.x))); _arg2.y = (_local12.y + (_local35 * (_local14.y - _local12.y))); _local10.SetV(_local11); _local13.SetV(_local14); _local7.SetV(_local8); return (2); }; _local38 = ((_local36 + _local37) + _local34); _local38 = (1 / _local38); _local39 = (_local36 * _local38); _local40 = (_local37 * _local38); _local41 = ((1 - _local39) - _local40); _arg1.x = (((_local39 * _local9.x) + (_local40 * _local10.x)) + (_local41 * _local11.x)); _arg1.y = (((_local39 * _local9.y) + (_local40 * _local10.y)) + (_local41 * _local11.y)); _arg2.x = (((_local39 * _local12.x) + (_local40 * _local13.x)) + (_local41 * _local14.x)); _arg2.y = (((_local39 * _local12.y) + (_local40 * _local13.y)) + (_local41 * _local14.y)); return (3); } public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local9:b2Point; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local9 = gPoint; _local8 = _arg5.m_localPosition; _local7 = _arg6.R; _local9.p.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local9.p.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local10 = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity); _local11 = (_arg5.m_radius - b2Settings.b2_toiSlop); if (_local10 > _local11){ _local10 = (_local10 - _local11); _local12 = (_arg2.x - _arg1.x); _local13 = (_arg2.y - _arg1.y); _local14 = Math.sqrt(((_local12 * _local12) + (_local13 * _local13))); _local12 = (_local12 / _local14); _local13 = (_local13 / _local14); _arg2.x = (_arg2.x - (_local11 * _local12)); _arg2.y = (_arg2.y - (_local11 * _local13)); } else { _local10 = 0; _arg2.x = _arg1.x; _arg2.y = _arg1.y; }; return (_local10); } public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Shape, _arg4:b2XForm, _arg5:b2Shape, _arg6:b2XForm):Number{ var _local7:int; var _local8:int; _local7 = _arg3.m_type; _local8 = _arg5.m_type; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6)); }; return (0); } public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local6 = _arg5[0]; _local7 = _arg5[1]; _local8 = _arg3[0]; _local9 = _arg3[1]; _local10 = _arg4[0]; _local11 = _arg4[1]; _local12 = -(_local7.x); _local13 = -(_local7.y); _local14 = (_local6.x - _local7.x); _local15 = (_local6.y - _local7.y); _local16 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15))); _local14 = (_local14 / _local16); _local15 = (_local15 / _local16); _local17 = ((_local12 * _local14) + (_local13 * _local15)); if ((((_local17 <= 0)) || ((_local16 < Number.MIN_VALUE)))){ _arg1.SetV(_local9); _arg2.SetV(_local11); _local8.SetV(_local9); _local10.SetV(_local11); _local6.SetV(_local7); return (1); }; _local17 = (_local17 / _local16); _arg1.x = (_local9.x + (_local17 * (_local8.x - _local9.x))); _arg1.y = (_local9.y + (_local17 * (_local8.y - _local9.y))); _arg2.x = (_local11.x + (_local17 * (_local10.x - _local11.x))); _arg2.y = (_local11.y + (_local17 * (_local10.y - _local11.y))); return (2); } } }//package Box2D.Collision
Section 18
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var points:Array; public var pointCount:int;// = 0 public var normal:b2Vec2; public function b2Manifold(){ var _local1:int; pointCount = 0; super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ManifoldPoint(); _local1++; }; normal = new b2Vec2(); } public function Set(_arg1:b2Manifold):void{ var _local2:int; pointCount = _arg1.pointCount; _local2 = 0; while (_local2 < b2Settings.b2_maxManifoldPoints) { (points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]); _local2++; }; normal.SetV(_arg1.normal); } public function Reset():void{ var _local1:int; _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { (points[_local1] as b2ManifoldPoint).Reset(); _local1++; }; normal.SetZero(); pointCount = 0; } } }//package Box2D.Collision
Section 19
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ManifoldPoint { public var separation:Number; public var localPoint2:b2Vec2; public var normalImpulse:Number; public var tangentImpulse:Number; public var localPoint1:b2Vec2; public var id:b2ContactID; public function b2ManifoldPoint(){ localPoint1 = new b2Vec2(); localPoint2 = new b2Vec2(); id = new b2ContactID(); super(); } public function Set(_arg1:b2ManifoldPoint):void{ localPoint1.SetV(_arg1.localPoint1); localPoint2.SetV(_arg1.localPoint2); separation = _arg1.separation; normalImpulse = _arg1.normalImpulse; tangentImpulse = _arg1.tangentImpulse; id.key = _arg1.id.key; } public function Reset():void{ localPoint1.SetZero(); localPoint2.SetZero(); separation = 0; normalImpulse = 0; tangentImpulse = 0; 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
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { import Box2D.Common.*; public class b2Pair { public var userData;// = null public var proxyId1:uint; public var proxyId2:uint; public var status:uint; public var next:uint; public static var e_pairFinal:uint = 4; public static var b2_tableMask:int = (b2_tableCapacity - 1); public static var e_pairRemoved:uint = 2; public static var b2_nullPair:uint = b2Settings.USHRT_MAX; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = b2Settings.USHRT_MAX; public static var b2_tableCapacity:int = b2Settings.b2_maxPairs; public function b2Pair(){ userData = null; super(); } public function SetBuffered():void{ status = (status | e_pairBuffered); } public function IsBuffered():Boolean{ return (((status & e_pairBuffered) == e_pairBuffered)); } public function IsFinal():Boolean{ return (((status & e_pairFinal) == e_pairFinal)); } public function ClearRemoved():void{ status = (status & ~(e_pairRemoved)); } public function SetFinal():void{ status = (status | e_pairFinal); } public function IsRemoved():Boolean{ return (((status & e_pairRemoved) == e_pairRemoved)); } public function ClearBuffered():void{ status = (status & ~(e_pairBuffered)); } public function SetRemoved():void{ status = (status | e_pairRemoved); } } }//package Box2D.Collision
Section 22
//b2PairCallback (Box2D.Collision.b2PairCallback) package Box2D.Collision { public class b2PairCallback { public function PairRemoved(_arg1, _arg2, _arg3):void{ } public function PairAdded(_arg1, _arg2){ return (null); } } }//package Box2D.Collision
Section 23
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { public var m_pairCount:int; public var m_pairBuffer:Array; public var m_callback:b2PairCallback; public var m_pairs:Array; public var m_pairBufferCount:int; public var m_hashTable:Array; public var m_broadPhase:b2BroadPhase; public var m_freePair:uint; public function b2PairManager(){ var _local1:uint; super(); m_hashTable = new Array(b2Pair.b2_tableCapacity); _local1 = 0; while (_local1 < b2Pair.b2_tableCapacity) { m_hashTable[_local1] = b2Pair.b2_nullPair; _local1++; }; m_pairs = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1] = new b2Pair(); _local1++; }; m_pairBuffer = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairBuffer[_local1] = new b2BufferedPair(); _local1++; }; _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy; m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy; m_pairs[_local1].userData = null; m_pairs[_local1].status = 0; m_pairs[_local1].next = (_local1 + 1); _local1++; }; m_pairs[int((b2Settings.b2_maxPairs - 1))].next = b2Pair.b2_nullPair; m_pairCount = 0; m_pairBufferCount = 0; } private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{ var _local4:b2Pair; var _local5:uint; _local5 = m_hashTable[_arg3]; _local4 = m_pairs[_local5]; while (((!((_local5 == b2Pair.b2_nullPair))) && ((Equals(_local4, _arg1, _arg2) == false)))) { _local5 = _local4.next; _local4 = m_pairs[_local5]; }; if (_local5 == b2Pair.b2_nullPair){ return (null); }; return (_local4); } private function Find(_arg1:uint, _arg2:uint):b2Pair{ var _local3:uint; var _local4:uint; if (_arg1 > _arg2){ _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); return (FindHash(_arg1, _arg2, _local3)); } private function ValidateBuffer():void{ } public function Commit():void{ var _local1:b2BufferedPair; var _local2:int; var _local3:int; var _local4:Array; var _local5:b2Pair; var _local6:b2Proxy; var _local7:b2Proxy; _local3 = 0; _local4 = m_broadPhase.m_proxyPool; _local2 = 0; while (_local2 < m_pairBufferCount) { _local1 = m_pairBuffer[_local2]; _local5 = Find(_local1.proxyId1, _local1.proxyId2); _local5.ClearBuffered(); _local6 = _local4[_local5.proxyId1]; _local7 = _local4[_local5.proxyId2]; if (_local5.IsRemoved()){ if (_local5.IsFinal() == true){ m_callback.PairRemoved(_local6.userData, _local7.userData, _local5.userData); }; _local1 = m_pairBuffer[_local3]; _local1.proxyId1 = _local5.proxyId1; _local1.proxyId2 = _local5.proxyId2; _local3++; } else { if (_local5.IsFinal() == false){ _local5.userData = m_callback.PairAdded(_local6.userData, _local7.userData); _local5.SetFinal(); }; }; _local2++; }; _local2 = 0; while (_local2 < _local3) { _local1 = m_pairBuffer[_local2]; RemovePair(_local1.proxyId1, _local1.proxyId2); _local2++; }; m_pairBufferCount = 0; if (b2BroadPhase.s_validate){ ValidateTable(); }; } public function RemoveBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2BufferedPair; var _local4:b2Pair; _local4 = Find(_arg1, _arg2); if (_local4 == null){ return; }; if (_local4.IsBuffered() == false){ _local4.SetBuffered(); _local3 = m_pairBuffer[m_pairBufferCount]; _local3.proxyId1 = _local4.proxyId1; _local3.proxyId2 = _local4.proxyId2; m_pairBufferCount++; }; _local4.SetRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function RemovePair(_arg1:uint, _arg2:uint){ var _local3:b2Pair; var _local4:uint; var _local5:uint; var _local6:b2Pair; var _local7:uint; var _local8:uint; var _local9:*; if (_arg1 > _arg2){ _local7 = _arg1; _arg1 = _arg2; _arg2 = _local7; }; _local4 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local5 = m_hashTable[_local4]; _local6 = null; while (_local5 != b2Pair.b2_nullPair) { if (Equals(m_pairs[_local5], _arg1, _arg2)){ _local8 = _local5; _local3 = m_pairs[_local5]; if (_local6){ _local6.next = _local3.next; } else { m_hashTable[_local4] = _local3.next; }; _local3 = m_pairs[_local8]; _local9 = _local3.userData; _local3.next = m_freePair; _local3.proxyId1 = b2Pair.b2_nullProxy; _local3.proxyId2 = b2Pair.b2_nullProxy; _local3.userData = null; _local3.status = 0; m_freePair = _local8; m_pairCount--; return (_local9); } else { _local6 = m_pairs[_local5]; _local5 = _local6.next; }; }; return (null); } public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{ m_broadPhase = _arg1; m_callback = _arg2; } public function AddBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2BufferedPair; var _local4:b2Pair; _local4 = AddPair(_arg1, _arg2); if (_local4.IsBuffered() == false){ _local4.SetBuffered(); _local3 = m_pairBuffer[m_pairBufferCount]; _local3.proxyId1 = _local4.proxyId1; _local3.proxyId2 = _local4.proxyId2; m_pairBufferCount++; }; _local4.ClearRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function AddPair(_arg1:uint, _arg2:uint):b2Pair{ var _local3:uint; var _local4:b2Pair; var _local5:uint; var _local6:uint; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local4 = FindHash(_arg1, _arg2, _local3); if (_local4 != null){ return (_local4); }; _local5 = m_freePair; _local4 = m_pairs[_local5]; m_freePair = _local4.next; _local4.proxyId1 = _arg1; _local4.proxyId2 = _arg2; _local4.status = 0; _local4.userData = null; _local4.next = m_hashTable[_local3]; m_hashTable[_local3] = _local5; m_pairCount++; return (_local4); } private function ValidateTable():void{ } public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{ return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))); } public static function Hash(_arg1:uint, _arg2:uint):uint{ var _local3:uint; _local3 = (((_arg2 << 16) & 4294901760) | _arg1); _local3 = (~(_local3) + ((_local3 << 15) & 4294934528)); _local3 = (_local3 ^ ((_local3 >> 12) & 1048575)); _local3 = (_local3 + ((_local3 << 2) & 4294967292)); _local3 = (_local3 ^ ((_local3 >> 4) & 268435455)); _local3 = (_local3 * 2057); _local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF)); return (_local3); } public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{ return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3)))); } } }//package Box2D.Collision
Section 24
//b2Point (Box2D.Collision.b2Point) package Box2D.Collision { import Box2D.Common.Math.*; public class b2Point { public var p:b2Vec2; public function b2Point(){ p = new b2Vec2(); super(); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (p); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ return (p); } } }//package Box2D.Collision
Section 25
//b2Proxy (Box2D.Collision.b2Proxy) package Box2D.Collision { public class b2Proxy { public var overlapCount:uint; public var lowerBounds:Array; public var upperBounds:Array; public var userData;// = null public var timeStamp:uint; public function b2Proxy(){ lowerBounds = [uint(0), uint(0)]; upperBounds = [uint(0), uint(0)]; userData = null; super(); } public function GetNext():uint{ return (lowerBounds[0]); } public function IsValid():Boolean{ return (!((overlapCount == b2BroadPhase.b2_invalid))); } public function SetNext(_arg1:uint):void{ lowerBounds[0] = (_arg1 & 0xFFFF); } } }//package Box2D.Collision
Section 26
//b2Segment (Box2D.Collision.b2Segment) package Box2D.Collision { import Box2D.Common.Math.*; public class b2Segment { public var p1:b2Vec2; public var p2:b2Vec2; public function b2Segment(){ p1 = new b2Vec2(); p2 = new b2Vec2(); super(); } public function TestSegment(_arg1:Array, _arg2:b2Vec2, _arg3:b2Segment, _arg4:Number):Boolean{ var _local5:b2Vec2; 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; _local5 = _arg3.p1; _local6 = (_arg3.p2.x - _local5.x); _local7 = (_arg3.p2.y - _local5.y); _local8 = (p2.x - p1.x); _local9 = (p2.y - p1.y); _local10 = _local9; _local11 = -(_local8); _local12 = (100 * Number.MIN_VALUE); _local13 = -(((_local6 * _local10) + (_local7 * _local11))); if (_local13 > _local12){ _local14 = (_local5.x - p1.x); _local15 = (_local5.y - p1.y); _local16 = ((_local14 * _local10) + (_local15 * _local11)); if ((((0 <= _local16)) && ((_local16 <= (_arg4 * _local13))))){ _local17 = ((-(_local7) * _local15) + (_local7 * _local14)); if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){ _local16 = (_local16 / _local13); _local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); _local10 = (_local10 / _local18); _local11 = (_local11 / _local18); _arg1[0] = _local16; _arg2.Set(_local10, _local11); return (true); }; }; }; return (false); } } }//package Box2D.Collision
Section 27
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2TimeOfImpact { public static var s_xf1:b2XForm = new b2XForm(); public static var s_xf2:b2XForm = new b2XForm(); public static var s_p1:b2Vec2 = new b2Vec2(); public static var s_p2:b2Vec2 = new b2Vec2(); public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):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:b2Vec2; var _local18:b2Vec2; var _local19:int; var _local20:int; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2XForm; var _local27:b2XForm; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; _local7 = _arg1.m_sweepRadius; _local8 = _arg3.m_sweepRadius; _local9 = _arg2.t0; _local10 = (_arg2.c.x - _arg2.c0.x); _local11 = (_arg2.c.y - _arg2.c0.y); _local12 = (_arg4.c.x - _arg4.c0.x); _local13 = (_arg4.c.y - _arg4.c0.y); _local14 = (_arg2.a - _arg2.a0); _local15 = (_arg4.a - _arg4.a0); _local16 = 0; _local17 = s_p1; _local18 = s_p2; _local19 = 20; _local20 = 0; _local21 = 0; _local22 = 0; _local23 = 0; _local24 = 0; while (true) { _local25 = (((1 - _local16) * _local9) + _local16); _local26 = s_xf1; _local27 = s_xf2; _arg2.GetXForm(_local26, _local25); _arg4.GetXForm(_local27, _local25); _local23 = b2Distance.Distance(_local17, _local18, _arg1, _local26, _arg3, _local27); if (_local20 == 0){ if (_local23 > (2 * b2Settings.b2_toiSlop)){ _local24 = (1.5 * b2Settings.b2_toiSlop); } else { _local5 = (0.05 * b2Settings.b2_toiSlop); _local6 = (_local23 - (0.5 * b2Settings.b2_toiSlop)); _local24 = ((_local5 > _local6)) ? _local5 : _local6; }; }; if (((((_local23 - _local24) < (0.05 * b2Settings.b2_toiSlop))) || ((_local20 == _local19)))){ break; }; _local21 = (_local18.x - _local17.x); _local22 = (_local18.y - _local17.y); _local28 = Math.sqrt(((_local21 * _local21) + (_local22 * _local22))); _local21 = (_local21 / _local28); _local22 = (_local22 / _local28); _local29 = ((((_local21 * (_local10 - _local12)) + (_local22 * (_local11 - _local13))) + (((_local14 < 0)) ? -(_local14) : _local14 * _local7)) + (((_local15 < 0)) ? -(_local15) : _local15 * _local8)); if (_local29 == 0){ _local16 = 1; break; }; _local30 = ((_local23 - _local24) / _local29); _local31 = (_local16 + _local30); if ((((_local31 < 0)) || ((1 < _local31)))){ _local16 = 1; break; }; if (_local31 < ((1 + (100 * Number.MIN_VALUE)) * _local16)){ break; }; _local16 = _local31; _local20++; }; return (_local16); } } }//package Box2D.Collision
Section 28
//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(); } } }//package Box2D.Collision
Section 29
//Features (Box2D.Collision.Features) package Box2D.Collision { public class Features { public var _referenceEdge:int; public var _incidentEdge:int; public var _flip:int; public var _incidentVertex:int; public 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 set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Box2D.Collision
Section 30
//b2Mat22 (Box2D.Common.Math.b2Mat22) package Box2D.Common.Math { public class b2Mat22 { public var col1:b2Vec2; public var col2:b2Vec2; public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){ var _local4:Number; var _local5:Number; col1 = new b2Vec2(); col2 = new b2Vec2(); super(); if (((!((_arg2 == null))) && (!((_arg3 == null))))){ col1.SetV(_arg2); col2.SetV(_arg3); } else { _local4 = Math.cos(_arg1); _local5 = Math.sin(_arg1); col1.x = _local4; col2.x = -(_local5); col1.y = _local5; col2.y = _local4; }; } 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{ return (new b2Mat22(0, col1, col2)); } public function Invert(_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)); _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)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } } }//package Box2D.Common.Math
Section 31
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { public static const b2Mat22_identity:b2Mat22 = new b2Mat22(0, new b2Vec2(1, 0), new b2Vec2(0, 1)); public static const b2XForm_identity:b2XForm = new b2XForm(b2Vec2_zero, b2Mat22_identity); public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0); public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } 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 b2IsValid(_arg1:Number):Boolean{ return (isFinite(_arg1)); } public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y)); return (_local3); } public static function b2MulX(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = b2MulMV(_arg1.R, _arg2); _local3.x = (_local3.x + _arg1.position.x); _local3.y = (_local3.y + _arg1.position.y); return (_local3); } public static function b2DistanceSquared(_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 b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:*; _local3 = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22; _local2 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_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 b2MulXT(_arg1:b2XForm, _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 b2Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (b2Max(_arg2, b2Min(_arg1, _arg3))); } public static function b2AbsV(_arg1:b2Vec2):b2Vec2{ var _local2:b2Vec2; _local2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } 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 b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function degreesToRadians(_arg1:Number):Number{ return (((_arg1 / 180) * Math.PI)); } public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function b2Distance(_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 b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Mat22; _local3 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); _local4 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); _local5 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean; _local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (b2MaxV(_arg2, b2MinV(_arg1, _arg3))); } public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = Math.random(); _local3 = (((_arg2 - _arg1) * _local3) + _arg1); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function b2Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function b2Random():Number{ return (((Math.random() * 2) - 1)); } public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2)); return (_local3); } public static function b2NextPowerOfTwo(_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 b2Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function radiansToDegrees(_arg1:Number):Number{ return (((_arg1 / Math.PI) * 180)); } public static function b2MulMV(_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); } } }//package Box2D.Common.Math
Section 32
//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 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 GetXForm(_arg1:b2XForm, _arg2:Number):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; if ((1 - t0) > Number.MIN_VALUE){ _local4 = ((_arg2 - t0) / (1 - t0)); _arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x)); _arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y)); _local5 = (((1 - _local4) * a0) + (_local4 * a)); _arg1.R.Set(_local5); } else { _arg1.position.SetV(c); _arg1.R.Set(a); }; _local3 = _arg1.R; _arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y))); _arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y))); } } }//package Box2D.Common.Math
Section 33
//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 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 Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.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 Negative():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 Abs():void{ if (x < 0){ x = -(x); }; if (y < 0){ y = -(y); }; } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number; _local2 = b2Math.b2Dot(this, _arg1.col1); y = b2Math.b2Dot(this, _arg1.col2); x = _local2; } public function IsValid():Boolean{ return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(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 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 Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function CrossFV(_arg1:Number):void{ var _local2:Number; _local2 = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public static function vectorTransform(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:b2Vec2; _local3 = b2Math.degreesToRadians(_arg1); _local4 = ((_arg2.x * Math.cos(_local3)) - (_arg2.y * Math.sin(_local3))); _local5 = ((_arg2.x * Math.sin(_local3)) + (_arg2.y * Math.cos(_local3))); _local6 = new (b2Vec2); _local6.x = _local4; _local6.y = _local5; return (_local6); } public static function vectorToRotation(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local3 = _arg1.Length(); _local4 = _arg2.Length(); _local5 = _arg1.Normalize(); _local6 = _arg2.Normalize(); _local7 = b2Math.b2Dot(_arg1, _arg2); _local8 = (_local3 * _local4); _local9 = Math.acos((_local7 / _local8)); _local10 = b2Math.radiansToDegrees(_local9); return (_local10); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 34
//b2XForm (Box2D.Common.Math.b2XForm) package Box2D.Common.Math { public class b2XForm { public var R:b2Mat22; public var position:b2Vec2; public function b2XForm(_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:b2XForm):void{ position.SetV(_arg1.position); R.SetM(_arg1.R); } public function SetIdentity():void{ position.SetZero(); R.SetIdentity(); } } }//package Box2D.Common.Math
Section 35
//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.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function get color():uint{ return (((_r | (_g << 8)) | (_b << 16))); } public function set r(_arg1:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set b(_arg1:Number):void{ _b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set g(_arg1:Number):void{ _g = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } } }//package Box2D.Common
Section 36
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const b2_angularSleepTolerance:Number = 0.0111111111111111; public static const b2_linearSleepTolerance:Number = 0.01; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_linearSlop:Number = 0.005; public static const b2_pi:Number = 3.14159265358979; public static const b2_maxProxies:int = 0x0200; public static const b2_maxAngularVelocitySquared:Number = 62500; public static const b2_maxPolygonVertices:int = 8; public static const b2_velocityThreshold:Number = 1; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_maxPairs:int = 4096; public static const b2_maxTOIContactsPerIsland:int = 32; public static const b2_timeToSleep:Number = 0.5; public static const b2_maxManifoldPoints:int = 2; public static const b2_maxAngularVelocity:Number = 250; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const USHRT_MAX:int = 0xFFFF; public static const b2_maxLinearVelocity:Number = 200; public static const b2_maxLinearCorrection:Number = 0.2; public static const b2_toiSlop:Number = 0.04; public static const b2_maxLinearVelocitySquared:Number = 40000; public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 37
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; public class b2CircleContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){ var _local3:b2ManifoldPoint; m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; _local3 = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactPoint; var _local8:b2ManifoldPoint; _local5 = m_shape1.m_body; _local6 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf); _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = m_friction; _local7.restitution = m_restitution; if (m_manifold.pointCount > 0){ m_manifoldCount = 1; _local8 = m_manifold.points[0]; if (m0.pointCount == 0){ _local8.normalImpulse = 0; _local8.tangentImpulse = 0; if (_arg1){ _local7.position = _local5.GetWorldPoint(_local8.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local8.separation; _local7.id.key = _local8.id._key; _arg1.Add(_local7, this); }; } else { _local4 = m0.points[0]; _local8.normalImpulse = _local4.normalImpulse; _local8.tangentImpulse = _local4.tangentImpulse; if (_arg1){ _local7.position = _local5.GetWorldPoint(_local8.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local8.separation; _local7.id.key = _local8.id._key; _arg1.Persist(_local7, this); }; }; } else { m_manifoldCount = 0; if ((((m0.pointCount > 0)) && (_arg1))){ _local4 = m0.points[0]; _local7.position = _local5.GetWorldPoint(_local4.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m0.normal); _local7.separation = _local4.separation; _local7.id.key = _local4.id._key; _arg1.Remove(_local7, this); }; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2CircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 38
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Contact { public var m_shape1:b2Shape; public var m_shape2:b2Shape; public var m_prev:b2Contact; public var m_toi:Number; public var m_next:b2Contact; public var m_friction:Number; public var m_manifoldCount:int; public var m_node1:b2ContactEdge; public var m_node2:b2ContactEdge; public var m_restitution:Number; public var m_flags:uint; public static var e_toiFlag:uint = 8; public static var e_nonSolidFlag:uint = 1; public static var e_slowFlag:uint = 2; public static var e_islandFlag:uint = 4; public static var s_registers:Array; public static var s_initialized:Boolean = false; public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){ m_node1 = new b2ContactEdge(); m_node2 = new b2ContactEdge(); super(); m_flags = 0; if (((!(_arg1)) || (!(_arg2)))){ m_shape1 = null; m_shape2 = null; return; }; if (((_arg1.IsSensor()) || (_arg2.IsSensor()))){ m_flags = (m_flags | e_nonSolidFlag); }; m_shape1 = _arg1; m_shape2 = _arg2; m_manifoldCount = 0; m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction)); m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution); m_prev = null; m_next = null; m_node1.contact = null; m_node1.prev = null; m_node1.next = null; m_node1.other = null; m_node2.contact = null; m_node2.prev = null; m_node2.next = null; m_node2.other = null; } public function GetShape1():b2Shape{ return (m_shape1); } public function IsSolid():Boolean{ return (((m_flags & e_nonSolidFlag) == 0)); } public function GetNext():b2Contact{ return (m_next); } public function GetManifolds():Array{ return (null); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function Update(_arg1:b2ContactListener):void{ var _local2:int; var _local3:int; var _local4:b2Body; var _local5:b2Body; _local2 = m_manifoldCount; Evaluate(_arg1); _local3 = m_manifoldCount; _local4 = m_shape1.m_body; _local5 = m_shape2.m_body; if ((((_local3 == 0)) && ((_local2 > 0)))){ _local4.WakeUp(); _local5.WakeUp(); }; if (((((((_local4.IsStatic()) || (_local4.IsBullet()))) || (_local5.IsStatic()))) || (_local5.IsBullet()))){ m_flags = (m_flags & ~(e_slowFlag)); } else { m_flags = (m_flags | e_slowFlag); }; } public function Evaluate(_arg1:b2ContactListener):void{ } public static function InitializeRegisters():void{ var _local1:int; var _local2:int; s_registers = new Array(b2Shape.e_shapeTypeCount); _local1 = 0; while (_local1 < b2Shape.e_shapeTypeCount) { s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount); _local2 = 0; while (_local2 < b2Shape.e_shapeTypeCount) { s_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); } public static function Destroy(_arg1:b2Contact, _arg2):void{ var _local3:int; var _local4:int; var _local5:b2ContactRegister; var _local6:Function; if (_arg1.m_manifoldCount > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; _local3 = _arg1.m_shape1.m_type; _local4 = _arg1.m_shape2.m_type; _local5 = s_registers[_local3][_local4]; _local6 = _local5.destroyFcn; _local6(_arg1, _arg2); } public static function AddType(_arg1:Function, _arg2:Function, _arg3:int, _arg4:int):void{ s_registers[_arg3][_arg4].createFcn = _arg1; s_registers[_arg3][_arg4].destroyFcn = _arg2; s_registers[_arg3][_arg4].primary = true; if (_arg3 != _arg4){ s_registers[_arg4][_arg3].createFcn = _arg1; s_registers[_arg4][_arg3].destroyFcn = _arg2; s_registers[_arg4][_arg3].primary = false; }; } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ var _local4:int; var _local5:int; var _local6:b2ContactRegister; var _local7:Function; var _local8:b2Contact; var _local9:int; var _local10:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; _local4 = _arg1.m_type; _local5 = _arg2.m_type; _local6 = s_registers[_local4][_local5]; _local7 = _local6.createFcn; if (_local7 != null){ if (_local6.primary){ return (_local7(_arg1, _arg2, _arg3)); }; _local8 = _local7(_arg2, _arg1, _arg3); _local9 = 0; while (_local9 < _local8.m_manifoldCount) { _local10 = _local8.GetManifolds()[_local9]; _local8.GetManifolds()[_local9].normal = _local10.normal.Negative(); _local9++; }; return (_local8); //unresolved jump }; return (null); } } }//package Box2D.Dynamics.Contacts
Section 39
//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 points:Array; public var restitution:Number; public var body1:b2Body; public var manifold:b2Manifold; public var normal:b2Vec2; public var body2:b2Body; public var friction:Number; public var pointCount:int; public function b2ContactConstraint(){ var _local1:int; normal = new b2Vec2(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 40
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var r2:b2Vec2; public var separation:Number; public var positionImpulse:Number; public var normalImpulse:Number; public var equalizedMass:Number; public var tangentMass:Number; public var tangentImpulse:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var normalMass:Number; public var velocityBias:Number; public var r1:b2Vec2; public function b2ContactConstraintPoint(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); r1 = new b2Vec2(); r2 = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 41
//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 42
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister) package Box2D.Dynamics.Contacts { public class b2ContactRegister { public var primary:Boolean; public var createFcn:Function; public var destroyFcn:Function; } }//package Box2D.Dynamics.Contacts
Section 43
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Collision.*; public class b2ContactResult { public var normal:b2Vec2; public var position:b2Vec2; public var shape1:b2Shape; public var shape2:b2Shape; public var normalImpulse:Number; public var tangentImpulse:Number; public var id:b2ContactID; public function b2ContactResult(){ position = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Dynamics.Contacts
Section 44
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactSolver { public var m_constraintCount:int; public var m_constraints:Array; public var m_allocator; public var m_step:b2TimeStep; public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){ var _local5:b2Contact; var _local6:int; var _local7:b2Vec2; var _local8:b2Mat22; var _local9:int; var _local10:b2Body; var _local11:b2Body; var _local12:int; var _local13:Array; 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:int; var _local23:b2Manifold; var _local24:Number; var _local25:Number; var _local26:b2ContactConstraint; var _local27:uint; var _local28:b2ManifoldPoint; var _local29:b2ContactConstraintPoint; 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: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; m_step = new b2TimeStep(); m_constraints = new Array(); super(); m_step.dt = _arg1.dt; m_step.inv_dt = _arg1.inv_dt; m_step.maxIterations = _arg1.maxIterations; m_allocator = _arg4; m_constraintCount = 0; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; m_constraintCount = (m_constraintCount + _local5.m_manifoldCount); _local6++; }; _local6 = 0; while (_local6 < m_constraintCount) { m_constraints[_local6] = new b2ContactConstraint(); _local6++; }; _local9 = 0; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; _local10 = _local5.m_shape1.m_body; _local11 = _local5.m_shape2.m_body; _local12 = _local5.m_manifoldCount; _local13 = _local5.GetManifolds(); _local14 = _local5.m_friction; _local15 = _local5.m_restitution; _local16 = _local10.m_linearVelocity.x; _local17 = _local10.m_linearVelocity.y; _local18 = _local11.m_linearVelocity.x; _local19 = _local11.m_linearVelocity.y; _local20 = _local10.m_angularVelocity; _local21 = _local11.m_angularVelocity; _local22 = 0; while (_local22 < _local12) { _local23 = _local13[_local22]; _local24 = _local23.normal.x; _local25 = _local23.normal.y; _local26 = m_constraints[_local9]; _local26.body1 = _local10; _local26.body2 = _local11; _local26.manifold = _local23; _local26.normal.x = _local24; _local26.normal.y = _local25; _local26.pointCount = _local23.pointCount; _local26.friction = _local14; _local26.restitution = _local15; _local27 = 0; while (_local27 < _local26.pointCount) { _local28 = _local23.points[_local27]; _local29 = _local26.points[_local27]; _local29.normalImpulse = _local28.normalImpulse; _local29.tangentImpulse = _local28.tangentImpulse; _local29.separation = _local28.separation; _local29.positionImpulse = 0; _local29.localAnchor1.SetV(_local28.localPoint1); _local29.localAnchor2.SetV(_local28.localPoint2); _local8 = _local10.m_xf.R; _local32 = (_local28.localPoint1.x - _local10.m_sweep.localCenter.x); _local33 = (_local28.localPoint1.y - _local10.m_sweep.localCenter.y); _local30 = ((_local8.col1.x * _local32) + (_local8.col2.x * _local33)); _local33 = ((_local8.col1.y * _local32) + (_local8.col2.y * _local33)); _local32 = _local30; _local29.r1.Set(_local32, _local33); _local8 = _local11.m_xf.R; _local34 = (_local28.localPoint2.x - _local11.m_sweep.localCenter.x); _local35 = (_local28.localPoint2.y - _local11.m_sweep.localCenter.y); _local30 = ((_local8.col1.x * _local34) + (_local8.col2.x * _local35)); _local35 = ((_local8.col1.y * _local34) + (_local8.col2.y * _local35)); _local34 = _local30; _local29.r2.Set(_local34, _local35); _local36 = ((_local32 * _local32) + (_local33 * _local33)); _local37 = ((_local34 * _local34) + (_local35 * _local35)); _local38 = ((_local32 * _local24) + (_local33 * _local25)); _local39 = ((_local34 * _local24) + (_local35 * _local25)); _local40 = (_local10.m_invMass + _local11.m_invMass); _local40 = (_local40 + ((_local10.m_invI * (_local36 - (_local38 * _local38))) + (_local11.m_invI * (_local37 - (_local39 * _local39))))); _local29.normalMass = (1 / _local40); _local41 = ((_local10.m_mass * _local10.m_invMass) + (_local11.m_mass * _local11.m_invMass)); _local41 = (_local41 + (((_local10.m_mass * _local10.m_invI) * (_local36 - (_local38 * _local38))) + ((_local11.m_mass * _local11.m_invI) * (_local37 - (_local39 * _local39))))); _local29.equalizedMass = (1 / _local41); _local42 = _local25; _local43 = -(_local24); _local44 = ((_local32 * _local42) + (_local33 * _local43)); _local45 = ((_local34 * _local42) + (_local35 * _local43)); _local46 = (_local10.m_invMass + _local11.m_invMass); _local46 = (_local46 + ((_local10.m_invI * (_local36 - (_local44 * _local44))) + (_local11.m_invI * (_local37 - (_local45 * _local45))))); _local29.tangentMass = (1 / _local46); _local29.velocityBias = 0; if (_local29.separation > 0){ _local29.velocityBias = (-60 * _local29.separation); }; _local30 = (((_local18 + (-(_local21) * _local35)) - _local16) - (-(_local20) * _local33)); _local31 = (((_local19 + (_local21 * _local34)) - _local17) - (_local20 * _local32)); _local47 = ((_local26.normal.x * _local30) + (_local26.normal.y * _local31)); if (_local47 < -(b2Settings.b2_velocityThreshold)){ _local29.velocityBias = (_local29.velocityBias + (-(_local26.restitution) * _local47)); }; _local27++; }; _local9++; _local22++; }; _local6++; }; } 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.body1; _local8 = _local6.body2; _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.r1.x * _local22) - (_local20.r1.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.r2.x * _local22) - (_local20.r2.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:b2Mat22; var _local4:b2Vec2; var _local5:int; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:b2Vec2; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:int; var _local20:int; var _local21:b2ContactConstraintPoint; 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; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; _local2 = 0; _local5 = 0; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_sweep.c; _local10 = _local7.m_sweep.a; _local11 = _local8.m_sweep.c; _local12 = _local8.m_sweep.a; _local13 = (_local7.m_mass * _local7.m_invMass); _local14 = (_local7.m_mass * _local7.m_invI); _local15 = (_local8.m_mass * _local8.m_invMass); _local16 = (_local8.m_mass * _local8.m_invI); _local17 = _local6.normal.x; _local18 = _local6.normal.y; _local19 = _local6.pointCount; _local20 = 0; while (_local20 < _local19) { _local21 = _local6.points[_local20]; _local3 = _local7.m_xf.R; _local4 = _local7.m_sweep.localCenter; _local22 = (_local21.localAnchor1.x - _local4.x); _local23 = (_local21.localAnchor1.y - _local4.y); _local26 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23)); _local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23)); _local22 = _local26; _local3 = _local8.m_xf.R; _local4 = _local8.m_sweep.localCenter; _local24 = (_local21.localAnchor2.x - _local4.x); _local25 = (_local21.localAnchor2.y - _local4.y); _local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25)); _local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25)); _local24 = _local26; _local27 = (_local9.x + _local22); _local28 = (_local9.y + _local23); _local29 = (_local11.x + _local24); _local30 = (_local11.y + _local25); _local31 = (_local29 - _local27); _local32 = (_local30 - _local28); _local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation); _local2 = b2Math.b2Min(_local2, _local33); _local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0)); _local35 = (-(_local21.equalizedMass) * _local34); _local36 = _local21.positionImpulse; _local21.positionImpulse = b2Math.b2Max((_local36 + _local35), 0); _local35 = (_local21.positionImpulse - _local36); _local37 = (_local35 * _local17); _local38 = (_local35 * _local18); _local9.x = (_local9.x - (_local13 * _local37)); _local9.y = (_local9.y - (_local13 * _local38)); _local10 = (_local10 - (_local14 * ((_local22 * _local38) - (_local23 * _local37)))); _local7.m_sweep.a = _local10; _local7.SynchronizeTransform(); _local11.x = (_local11.x + (_local15 * _local37)); _local11.y = (_local11.y + (_local15 * _local38)); _local12 = (_local12 + (_local16 * ((_local24 * _local38) - (_local25 * _local37)))); _local8.m_sweep.a = _local12; _local8.SynchronizeTransform(); _local20++; }; _local5++; }; return ((_local2 >= (-1.5 * b2Settings.b2_linearSlop))); } 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:b2Mat22; var _local18:b2Vec2; var _local19:int; var _local20:b2ContactConstraint; var _local21:b2Body; var _local22:b2Body; var _local23:Number; var _local24:Number; var _local25:b2Vec2; var _local26:b2Vec2; var _local27:Number; var _local28:Number; 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:int; var _local38:Number; _local19 = 0; while (_local19 < m_constraintCount) { _local20 = m_constraints[_local19]; _local21 = _local20.body1; _local22 = _local20.body2; _local23 = _local21.m_angularVelocity; _local24 = _local22.m_angularVelocity; _local25 = _local21.m_linearVelocity; _local26 = _local22.m_linearVelocity; _local27 = _local21.m_invMass; _local28 = _local21.m_invI; _local29 = _local22.m_invMass; _local30 = _local22.m_invI; _local31 = _local20.normal.x; _local32 = _local20.normal.y; _local33 = _local32; _local34 = -(_local31); _local35 = _local20.friction; _local37 = _local20.pointCount; _local1 = 0; while (_local1 < _local37) { _local2 = _local20.points[_local1]; _local7 = (((_local26.x + (-(_local24) * _local2.r2.y)) - _local25.x) - (-(_local23) * _local2.r1.y)); _local8 = (((_local26.y + (_local24 * _local2.r2.x)) - _local25.y) - (_local23 * _local2.r1.x)); _local9 = ((_local7 * _local31) + (_local8 * _local32)); _local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias)); _local10 = ((_local7 * _local33) + (_local8 * _local34)); _local12 = (_local2.tangentMass * -(_local10)); _local13 = b2Math.b2Max((_local2.normalImpulse + _local11), 0); _local11 = (_local13 - _local2.normalImpulse); _local38 = (_local35 * _local2.normalImpulse); _local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local38), _local38); _local12 = (_local14 - _local2.tangentImpulse); _local15 = ((_local11 * _local31) + (_local12 * _local33)); _local16 = ((_local11 * _local32) + (_local12 * _local34)); _local25.x = (_local25.x - (_local27 * _local15)); _local25.y = (_local25.y - (_local27 * _local16)); _local23 = (_local23 - (_local28 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15)))); _local26.x = (_local26.x + (_local29 * _local15)); _local26.y = (_local26.y + (_local29 * _local16)); _local24 = (_local24 + (_local30 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15)))); _local2.normalImpulse = _local13; _local2.tangentImpulse = _local14; _local1++; }; _local21.m_angularVelocity = _local23; _local22.m_angularVelocity = _local24; _local19++; }; } 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.points[_local4]; _local6 = _local2.points[_local4]; _local5.normalImpulse = _local6.normalImpulse; _local5.tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 45
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2NullContact extends b2Contact { override public function GetManifolds():Array{ return (null); } override public function Evaluate(_arg1:b2ContactListener):void{ } } }//package Box2D.Dynamics.Contacts
Section 46
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ var _local3:b2ManifoldPoint; m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polygonShape)); b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape)); m_manifold.pointCount = 0; _local3 = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:int; var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2ManifoldPoint; var _local6:b2Body; var _local7:b2Body; var _local8:Array; var _local9:b2ContactPoint; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; _local6 = m_shape1.m_body; _local7 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2CircleShape), _local7.m_xf); _local8 = [false, false]; _local9 = s_evalCP; _local9.shape1 = m_shape1; _local9.shape2 = m_shape2; _local9.friction = m_friction; _local9.restitution = m_restitution; if (m_manifold.pointCount > 0){ _local2 = 0; while (_local2 < m_manifold.pointCount) { _local10 = m_manifold.points[_local2]; _local10.normalImpulse = 0; _local10.tangentImpulse = 0; _local11 = false; _local12 = _local10.id._key; _local13 = 0; while (_local13 < m0.pointCount) { if (_local8[_local13] == true){ } else { _local5 = m0.points[_local13]; if (_local5.id._key == _local12){ _local8[_local13] = true; _local10.normalImpulse = _local5.normalImpulse; _local10.tangentImpulse = _local5.tangentImpulse; _local11 = true; if (_arg1 != null){ _local9.position = _local6.GetWorldPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m_manifold.normal); _local9.separation = _local10.separation; _local9.id.key = _local12; _arg1.Persist(_local9, this); }; break; }; }; _local13++; }; if ((((_local11 == false)) && (!((_arg1 == null))))){ _local9.position = _local6.GetWorldPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m_manifold.normal); _local9.separation = _local10.separation; _local9.id.key = _local12; _arg1.Add(_local9, this); }; _local2++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; if (_arg1 == null){ return; }; _local2 = 0; while (_local2 < m0.pointCount) { if (_local8[_local2]){ } else { _local5 = m0.points[_local2]; _local9.position = _local6.GetWorldPoint(_local5.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local5.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local5.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m0.normal); _local9.separation = _local5.separation; _local9.id.key = _local5.id._key; _arg1.Remove(_local9, this); }; _local2++; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyAndCircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 47
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; public class b2PolygonContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolygonContact(_arg1:b2Shape, _arg2:b2Shape):void{ m0 = new b2Manifold(); m_manifolds = [new b2Manifold()]; super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactPoint; var _local8:int; var _local9:Array; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; _local5 = m_shape1.m_body; _local6 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local5.m_xf, (m_shape2 as b2PolygonShape), _local6.m_xf); _local9 = [false, false]; _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = m_friction; _local7.restitution = m_restitution; if (m_manifold.pointCount > 0){ _local8 = 0; while (_local8 < m_manifold.pointCount) { _local10 = m_manifold.points[_local8]; _local10.normalImpulse = 0; _local10.tangentImpulse = 0; _local11 = false; _local12 = _local10.id._key; _local13 = 0; while (_local13 < m0.pointCount) { if (_local9[_local13] == true){ } else { _local4 = m0.points[_local13]; if (_local4.id._key == _local12){ _local9[_local13] = true; _local10.normalImpulse = _local4.normalImpulse; _local10.tangentImpulse = _local4.tangentImpulse; _local11 = true; if (_arg1 != null){ _local7.position = _local5.GetWorldPoint(_local10.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local10.separation; _local7.id.key = _local12; _arg1.Persist(_local7, this); }; break; }; }; _local13++; }; if ((((_local11 == false)) && (!((_arg1 == null))))){ _local7.position = _local5.GetWorldPoint(_local10.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local10.separation; _local7.id.key = _local12; _arg1.Add(_local7, this); }; _local8++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; if (_arg1 == null){ return; }; _local8 = 0; while (_local8 < m0.pointCount) { if (_local9[_local8]){ } else { _local4 = m0.points[_local8]; _local7.position = _local5.GetWorldPoint(_local4.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m0.normal); _local7.separation = _local4.separation; _local7.id.key = _local4.id._key; _arg1.Remove(_local7, this); }; _local8++; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolygonContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 48
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2DistanceJoint extends b2Joint { public var m_mass:Number; public var m_u:b2Vec2; public var m_impulse:Number; public var m_dampingRatio:Number; public var m_frequencyHz:Number; public var m_localAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_bias:Number; public var m_gamma:Number; public var m_length: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.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_length = _arg1.length; m_frequencyHz = _arg1.frequencyHz; m_dampingRatio = _arg1.dampingRatio; m_impulse = 0; m_gamma = 0; m_bias = 0; m_inv_dt = 0; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = new b2Vec2(); _local1.SetV(m_u); _local1.Multiply((m_inv_dt * m_impulse)); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; var _local2:b2Body; var _local3:b2Body; 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; if (m_frequencyHz > 0){ return (true); }; _local2 = m_body1; _local3 = m_body2; _local1 = _local2.m_xf.R; _local4 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local5 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local6 = ((_local1.col1.x * _local4) + (_local1.col2.x * _local5)); _local5 = ((_local1.col1.y * _local4) + (_local1.col2.y * _local5)); _local4 = _local6; _local1 = _local3.m_xf.R; _local7 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local8 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local6 = ((_local1.col1.x * _local7) + (_local1.col2.x * _local8)); _local8 = ((_local1.col1.y * _local7) + (_local1.col2.y * _local8)); _local7 = _local6; _local9 = (((_local3.m_sweep.c.x + _local7) - _local2.m_sweep.c.x) - _local4); _local10 = (((_local3.m_sweep.c.y + _local8) - _local2.m_sweep.c.y) - _local5); _local11 = Math.sqrt(((_local9 * _local9) + (_local10 * _local10))); _local9 = (_local9 / _local11); _local10 = (_local10 / _local11); _local12 = (_local11 - m_length); _local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local13 = (-(m_mass) * _local12); m_u.Set(_local9, _local10); _local14 = (_local13 * m_u.x); _local15 = (_local13 * m_u.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x - (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y - (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a - (_local2.m_invI * ((_local4 * _local15) - (_local5 * _local14)))); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local14)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local15)); _local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local7 * _local15) - (_local8 * _local14)))); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); return ((b2Math.b2Abs(_local12) < b2Settings.b2_linearSlop)); } override public 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; m_inv_dt = _arg1.inv_dt; _local4 = m_body1; _local5 = m_body2; _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 = (1 / _local13); 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 = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17)))); m_bias = (((_local14 * _arg1.dt) * _local17) * m_gamma); m_mass = (1 / (_local13 + m_gamma)); }; 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():Number{ return (0); } override public 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_body1; _local4 = m_body2; _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 49
//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 dampingRatio:Number; public var frequencyHz:Number; public var localAnchor2:b2Vec2; public var localAnchor1:b2Vec2; public function b2DistanceJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = 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; body1 = _arg1; body2 = _arg2; localAnchor1.SetV(body1.GetLocalPoint(_arg3)); localAnchor2.SetV(body2.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 50
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2GearJoint extends b2Joint { public var m_force:Number; public var m_mass:Number; public var m_prismatic1:b2PrismaticJoint; public var m_prismatic2:b2PrismaticJoint; public var m_ground1:b2Body; public var m_ground2:b2Body; public var m_constant:Number; public var m_revolute1:b2RevoluteJoint; public var m_revolute2:b2RevoluteJoint; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_ratio:Number; public var m_J:b2Jacobian; 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.m_body1; m_body1 = _arg1.joint1.m_body2; 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.m_body1; m_body2 = _arg1.joint2.m_body2; 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_force = 0; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = new b2Vec2((m_force * m_J.linear2.x), (m_force * m_J.linear2.y)); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local1 = 0; _local2 = m_body1; _local3 = m_body2; if (m_revolute1){ _local4 = m_revolute1.GetJointAngle(); } else { _local4 = m_prismatic1.GetJointTranslation(); }; if (m_revolute2){ _local5 = m_revolute2.GetJointAngle(); } else { _local5 = m_prismatic2.GetJointTranslation(); }; _local6 = (m_constant - (_local4 + (m_ratio * _local5))); _local7 = (-(m_mass) * _local6); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + ((_local2.m_invMass * _local7) * m_J.linear1.x)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + ((_local2.m_invMass * _local7) * m_J.linear1.y)); _local2.m_sweep.a = (_local2.m_sweep.a + ((_local2.m_invI * _local7) * m_J.angular1)); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local7) * m_J.linear2.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local7) * m_J.linear2.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local7) * m_J.angular2)); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); return ((_local1 < b2Settings.b2_linearSlop)); } override public 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; var _local15:Number; _local2 = m_ground1; _local3 = m_ground2; _local4 = m_body1; _local5 = m_body2; _local14 = 0; m_J.SetZero(); if (m_revolute1){ m_J.angular1 = -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.linear1.Set(-(_local6), -(_local7)); m_J.angular1 = -(_local12); _local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12))); }; if (m_revolute2){ m_J.angular2 = -(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.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7)); m_J.angular2 = (-(m_ratio) * _local12); _local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12)))); }; m_mass = (1 / _local14); if (_arg1.warmStarting){ _local15 = (_arg1.dt * m_force); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * _local15) * m_J.linear1.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * m_J.linear1.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * m_J.angular1)); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * m_J.linear2.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * m_J.linear2.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * m_J.angular2)); } else { m_force = 0; }; } override public function GetReactionTorque():Number{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; _local1 = m_body2.m_xf.R; _local2 = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x); _local3 = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y); _local4 = ((_local1.col1.x * _local2) + (_local1.col2.x * _local3)); _local3 = ((_local1.col1.y * _local2) + (_local1.col2.y * _local3)); _local2 = _local4; _local4 = ((m_force * m_J.angular2) - ((_local2 * (m_force * m_J.linear2.y)) - (_local3 * (m_force * m_J.linear2.x)))); return (_local4); } public function GetRatio():Number{ return (m_ratio); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = m_body1; _local3 = m_body2; _local4 = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local5 = ((-(_arg1.inv_dt) * m_mass) * _local4); m_force = (m_force + _local5); _local6 = (_arg1.dt * _local5); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local6) * m_J.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local6) * m_J.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local6) * m_J.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local6) * m_J.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local6) * m_J.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local6) * m_J.angular2)); } } }//package Box2D.Dynamics.Joints
Section 51
//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 52
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2Jacobian { public var linear1:b2Vec2; public var linear2:b2Vec2; public var angular2:Number; public var angular1:Number; public function b2Jacobian(){ linear1 = new b2Vec2(); linear2 = new b2Vec2(); super(); } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{ linear1.SetV(_arg1); angular1 = _arg2; linear2.SetV(_arg3); angular2 = _arg4; } public function SetZero():void{ linear1.SetZero(); angular1 = 0; linear2.SetZero(); angular2 = 0; } public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{ return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4))); } } }//package Box2D.Dynamics.Joints
Section 53
//b2Joint (Box2D.Dynamics.Joints.b2Joint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2Joint { public var m_islandFlag:Boolean; public var m_body1:b2Body; public var m_prev:b2Joint; public var m_next:b2Joint; public var m_type:int; public var m_collideConnected:Boolean; public var m_node1:b2JointEdge; public var m_node2:b2JointEdge; public var m_inv_dt:Number; public var m_userData; public var m_body2:b2Body; public static const e_unknownJoint:int = 0; public static const e_inactiveLimit:int = 0; public static const e_atUpperLimit:int = 2; public static const e_atLowerLimit:int = 1; public static const e_gearJoint:int = 6; public static const e_revoluteJoint:int = 1; public static const e_equalLimits:int = 3; public static const e_distanceJoint:int = 3; public static const e_pulleyJoint:int = 4; public static const e_prismaticJoint:int = 2; public static const e_mouseJoint:int = 5; public function b2Joint(_arg1:b2JointDef){ m_node1 = new b2JointEdge(); m_node2 = new b2JointEdge(); super(); m_type = _arg1.type; m_prev = null; m_next = null; m_body1 = _arg1.body1; m_body2 = _arg1.body2; m_collideConnected = _arg1.collideConnected; m_islandFlag = false; m_userData = _arg1.userData; } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ } public function GetType():int{ return (m_type); } public function GetBody2():b2Body{ return (m_body2); } public function GetNext():b2Joint{ return (m_next); } public function GetReactionTorque():Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce():b2Vec2{ return (null); } public function SolvePositionConstraints():Boolean{ return (false); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetBody1():b2Body{ return (m_body1); } public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } public function InitPositionConstraints():void{ } public static function Destroy(_arg1:b2Joint, _arg2):void{ } public 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; default: break; }; return (_local3); } } }//package Box2D.Dynamics.Joints
Section 54
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointDef { public var collideConnected:Boolean; public var body1:b2Body; public var body2:b2Body; public var userData; public var type:int; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 55
//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 56
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { public var m_beta:Number; public var m_mass:b2Mat22; public var m_target:b2Vec2; public var m_impulse:b2Vec2; public var m_localAnchor:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K:b2Mat22; public var m_gamma:Number; public var m_C:b2Vec2; public var m_maxForce:Number; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local2:Number; var _local3:Number; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; 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_body2.m_xf.position.x); _local3 = (m_target.y - m_body2.m_xf.position.y); _local4 = m_body2.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(); _local5 = m_body2.m_mass; _local6 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz); _local7 = (((2 * _local5) * _arg1.dampingRatio) * _local6); _local8 = ((_arg1.timeStep * _local5) * (_local6 * _local6)); m_gamma = (1 / (_local7 + _local8)); m_beta = (_local8 / (_local7 + _local8)); } override public function GetAnchor1():b2Vec2{ return (m_target); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor)); } override public function GetReactionForce():b2Vec2{ return (m_impulse); } override public function SolvePositionConstraints():Boolean{ return (true); } override public function InitVelocityConstraints(_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; _local2 = m_body2; _local3 = _local2.m_xf.R; _local4 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local5 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local7 = _local2.m_invMass; _local8 = _local2.m_invI; K1.col1.x = _local7; K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = _local7; K2.col1.x = ((_local8 * _local5) * _local5); K2.col2.x = ((-(_local8) * _local4) * _local5); K2.col1.y = ((-(_local8) * _local4) * _local5); K2.col2.y = ((_local8 * _local4) * _local4); K.SetM(K1); K.AddM(K2); K.col1.x = (K.col1.x + m_gamma); K.col2.y = (K.col2.y + m_gamma); K.Invert(m_mass); m_C.x = ((_local2.m_sweep.c.x + _local4) - m_target.x); m_C.y = ((_local2.m_sweep.c.y + _local5) - m_target.y); _local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98); _local9 = (_arg1.dt * m_impulse.x); _local10 = (_arg1.dt * m_impulse.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local7 * _local9)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local7 * _local10)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local8 * ((_local4 * _local10) - (_local5 * _local9)))); } override public function GetReactionTorque():Number{ return (0); } public function SetTarget(_arg1:b2Vec2):void{ if (m_body2.IsSleeping()){ m_body2.WakeUp(); }; m_target = _arg1; } override public 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; var _local15:Number; var _local16:Number; _local2 = m_body2; _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 * _arg1.inv_dt) * m_C.x)) + ((m_gamma * _arg1.dt) * m_impulse.x)); _local5 = ((_local9 + ((m_beta * _arg1.inv_dt) * m_C.y)) + ((m_gamma * _arg1.dt) * m_impulse.y)); _local10 = (-(_arg1.inv_dt) * ((_local3.col1.x * _local4) + (_local3.col2.x * _local5))); _local11 = (-(_arg1.inv_dt) * ((_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 = m_impulse.Length(); if (_local14 > m_maxForce){ m_impulse.Multiply((m_maxForce / _local14)); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); _local15 = (_arg1.dt * _local10); _local16 = (_arg1.dt * _local11); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15)))); } } }//package Box2D.Dynamics.Joints
Section 57
//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 var timeStep:Number; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; timeStep = (1 / 60); } } }//package Box2D.Dynamics.Joints
Section 58
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PrismaticJoint extends b2Joint { public var m_limitForce:Number; public var m_refAngle:Number; public var m_lowerTranslation:Number; public var m_localXAxis1:b2Vec2; public var m_torque:Number; public var m_enableLimit:Boolean; public var m_motorForce:Number; public var m_force:Number; public var m_localYAxis1:b2Vec2; public var m_motorMass:Number; public var m_maxMotorForce:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_angularMass:Number; public var m_limitState:int; public var m_linearMass:Number; public var m_upperTranslation:Number; public var m_motorJacobian:b2Jacobian; public var m_limitPositionImpulse:Number; public var m_motorSpeed:Number; public var m_linearJacobian:b2Jacobian; public var m_enableMotor:Boolean; 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_linearJacobian = new b2Jacobian(); m_motorJacobian = new b2Jacobian(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_localXAxis1.SetV(_arg1.localAxis1); m_localYAxis1.x = -(m_localXAxis1.y); m_localYAxis1.y = m_localXAxis1.x; m_refAngle = _arg1.referenceAngle; m_linearJacobian.SetZero(); m_linearMass = 0; m_force = 0; m_angularMass = 0; m_torque = 0; m_motorJacobian.SetZero(); m_motorMass = 0; m_motorForce = 0; m_limitForce = 0; m_limitPositionImpulse = 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; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetLowerLimit():Number{ return (m_lowerTranslation); } 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_body1; _local2 = m_body2; _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 SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():b2Vec2{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body1.m_xf.R; _local2 = (m_limitForce * ((_local1.col1.x * m_localXAxis1.x) + (_local1.col2.x * m_localXAxis1.y))); _local3 = (m_limitForce * ((_local1.col1.y * m_localXAxis1.x) + (_local1.col2.y * m_localXAxis1.y))); _local4 = (m_force * ((_local1.col1.x * m_localYAxis1.x) + (_local1.col2.x * m_localYAxis1.y))); _local5 = (m_force * ((_local1.col1.y * m_localYAxis1.x) + (_local1.col2.y * m_localYAxis1.y))); return (new b2Vec2(((m_limitForce * _local2) + (m_force * _local4)), ((m_limitForce * _local3) + (m_force * _local5)))); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Mat22; 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; var _local32:Number; _local3 = m_body1; _local4 = m_body2; _local5 = _local3.m_invMass; _local6 = _local4.m_invMass; _local7 = _local3.m_invI; _local8 = _local4.m_invI; _local9 = _local3.m_xf.R; _local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12)); _local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12)); _local11 = _local10; _local9 = _local4.m_xf.R; _local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14)); _local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14)); _local13 = _local10; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); _local17 = (_local4.m_sweep.c.x + _local13); _local18 = (_local4.m_sweep.c.y + _local14); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local9 = _local3.m_xf.R; _local21 = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y)); _local22 = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y)); _local23 = ((_local21 * _local19) + (_local22 * _local20)); _local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local24 = (-(m_linearMass) * _local23); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local24) * m_linearJacobian.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local24) * m_linearJacobian.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local24) * m_linearJacobian.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local24) * m_linearJacobian.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local24) * m_linearJacobian.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local24) * m_linearJacobian.angular2)); _local25 = b2Math.b2Abs(_local23); _local26 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_refAngle); _local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local27 = (-(m_angularMass) * _local26); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local27)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local27)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); _local28 = b2Math.b2Abs(_local26); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local9 = _local3.m_xf.R; _local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12)); _local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12)); _local11 = _local10; _local9 = _local4.m_xf.R; _local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14)); _local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14)); _local13 = _local10; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); _local17 = (_local4.m_sweep.c.x + _local13); _local18 = (_local4.m_sweep.c.y + _local14); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local9 = _local3.m_xf.R; _local29 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y)); _local30 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y)); _local31 = ((_local29 * _local19) + (_local30 * _local20)); _local32 = 0; if (m_limitState == e_equalLimits){ _local1 = b2Math.b2Clamp(_local31, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local25 = b2Math.b2Max(_local25, b2Math.b2Abs(_local26)); } else { if (m_limitState == e_atLowerLimit){ _local1 = (_local31 - m_lowerTranslation); _local25 = b2Math.b2Max(_local25, -(_local1)); _local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); } else { if (m_limitState == e_atUpperLimit){ _local1 = (_local31 - m_upperTranslation); _local25 = b2Math.b2Max(_local25, _local1); _local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); }; }; }; _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local32) * m_motorJacobian.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) * m_motorJacobian.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) * m_motorJacobian.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) * m_motorJacobian.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) * m_motorJacobian.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) * m_motorJacobian.angular2)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); }; return ((((_local25 <= b2Settings.b2_linearSlop)) && ((_local28 <= 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_body1; _local2 = m_body2; _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_motorSpeed = _arg1; } override public 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; var _local27:Number; var _local28:Number; _local2 = m_body1; _local3 = m_body2; _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; _local4 = _local2.m_xf.R; _local14 = ((_local4.col1.x * m_localYAxis1.x) + (_local4.col2.x * m_localYAxis1.y)); _local15 = ((_local4.col1.y * m_localYAxis1.x) + (_local4.col2.y * m_localYAxis1.y)); _local16 = ((_local3.m_sweep.c.x + _local8) - _local2.m_sweep.c.x); _local17 = ((_local3.m_sweep.c.y + _local9) - _local2.m_sweep.c.y); m_linearJacobian.linear1.x = -(_local14); m_linearJacobian.linear1.y = -(_local15); m_linearJacobian.linear2.x = _local14; m_linearJacobian.linear2.y = _local15; m_linearJacobian.angular1 = -(((_local16 * _local15) - (_local17 * _local14))); m_linearJacobian.angular2 = ((_local8 * _local15) - (_local9 * _local14)); m_linearMass = (((_local10 + ((_local12 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local11) + ((_local13 * m_linearJacobian.angular2) * m_linearJacobian.angular2)); m_linearMass = (1 / m_linearMass); m_angularMass = (_local12 + _local13); if (m_angularMass > Number.MIN_VALUE){ m_angularMass = (1 / m_angularMass); }; if (((m_enableLimit) || (m_enableMotor))){ _local4 = _local2.m_xf.R; _local18 = ((_local4.col1.x * m_localXAxis1.x) + (_local4.col2.x * m_localXAxis1.y)); _local19 = ((_local4.col1.y * m_localXAxis1.x) + (_local4.col2.y * m_localXAxis1.y)); m_motorJacobian.linear1.x = -(_local18); m_motorJacobian.linear1.y = -(_local19); m_motorJacobian.linear2.x = _local18; m_motorJacobian.linear2.y = _local19; m_motorJacobian.angular1 = -(((_local16 * _local19) - (_local17 * _local18))); m_motorJacobian.angular2 = ((_local8 * _local19) - (_local9 * _local18)); m_motorMass = (((_local10 + ((_local12 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local11) + ((_local13 * m_motorJacobian.angular2) * m_motorJacobian.angular2)); m_motorMass = (1 / m_motorMass); if (m_enableLimit){ _local20 = (_local16 - _local6); _local21 = (_local17 - _local7); _local22 = ((_local18 * _local20) + (_local19 * _local21)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local22 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitForce = 0; }; m_limitState = e_atLowerLimit; } else { if (_local22 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitForce = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitForce = 0; }; }; }; }; }; if (m_enableMotor == false){ m_motorForce = 0; }; if (m_enableLimit == false){ m_limitForce = 0; }; if (_arg1.warmStarting){ _local23 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.x))); _local24 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.y))); _local25 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.x))); _local26 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.y))); _local27 = (_arg1.dt * (((m_force * m_linearJacobian.angular1) - m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular1))); _local28 = (_arg1.dt * (((m_force * m_linearJacobian.angular2) + m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular2))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local10 * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local10 * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * _local27)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * _local28)); } else { m_force = 0; m_torque = 0; m_limitForce = 0; m_motorForce = 0; }; m_limitPositionImpulse = 0; } public function GetMotorForce():Number{ return (m_motorForce); } public function SetMaxMotorForce(_arg1:Number):void{ m_maxMotorForce = _arg1; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } override public function GetReactionTorque():Number{ return (m_torque); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; 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; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_invMass; _local5 = _local3.m_invMass; _local6 = _local2.m_invI; _local7 = _local3.m_invI; _local9 = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local10 = ((-(_arg1.inv_dt) * m_linearMass) * _local9); m_force = (m_force + _local10); _local11 = (_arg1.dt * _local10); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_linearJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_linearJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_linearJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_linearJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_linearJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_linearJacobian.angular2)); _local12 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local13 = ((-(_arg1.inv_dt) * m_angularMass) * _local12); m_torque = (m_torque + _local13); _local14 = (_arg1.dt * _local13); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local14)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local14)); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local15 = (m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed); _local16 = ((-(_arg1.inv_dt) * m_motorMass) * _local15); _local17 = m_motorForce; m_motorForce = b2Math.b2Clamp((m_motorForce + _local16), -(m_maxMotorForce), m_maxMotorForce); _local16 = (m_motorForce - _local17); _local11 = (_arg1.dt * _local16); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local18 = m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local19 = ((-(_arg1.inv_dt) * m_motorMass) * _local18); if (m_limitState == e_equalLimits){ m_limitForce = (m_limitForce + _local19); } else { if (m_limitState == e_atLowerLimit){ _local8 = m_limitForce; m_limitForce = b2Math.b2Max((m_limitForce + _local19), 0); _local19 = (m_limitForce - _local8); } else { if (m_limitState == e_atUpperLimit){ _local8 = m_limitForce; m_limitForce = b2Math.b2Min((m_limitForce + _local19), 0); _local19 = (m_limitForce - _local8); }; }; }; _local11 = (_arg1.dt * _local19); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2)); }; } } }//package Box2D.Dynamics.Joints
Section 59
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PrismaticJointDef extends b2JointDef { public var localAxis1:b2Vec2; public var referenceAngle:Number; public var maxMotorForce:Number; public var motorSpeed:Number; public var upperTranslation:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public var lowerTranslation:Number; public function b2PrismaticJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); localAxis1 = new b2Vec2(); super(); type = b2Joint.e_prismaticJoint; localAxis1.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{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); localAxis1 = body1.GetLocalVector(_arg4); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 60
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PulleyJoint extends b2Joint { public var m_ground:b2Body; public var m_maxLength2:Number; public var m_limitForce1:Number; public var m_maxLength1:Number; public var m_limitState1:int; public var m_limitState2:int; public var m_limitPositionImpulse2:Number; public var m_force:Number; public var m_limitPositionImpulse1:Number; public var m_constant:Number; public var m_state:int; public var m_ratio:Number; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_positionImpulse:Number; public var m_limitMass2:Number; public var m_limitMass1:Number; public var m_pulleyMass:Number; public var m_u1:b2Vec2; public var m_u2:b2Vec2; public var m_limitForce2:Number; public 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_body1.m_world.m_groundBody; m_groundAnchor1.x = (_arg1.groundAnchor1.x - m_ground.m_xf.position.x); m_groundAnchor1.y = (_arg1.groundAnchor1.y - m_ground.m_xf.position.y); m_groundAnchor2.x = (_arg1.groundAnchor2.x - m_ground.m_xf.position.x); m_groundAnchor2.y = (_arg1.groundAnchor2.y - m_ground.m_xf.position.y); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_ratio = _arg1.ratio; m_constant = (_arg1.length1 + (m_ratio * _arg1.length2)); m_maxLength1 = b2Math.b2Min(_arg1.maxLength1, (m_constant - (m_ratio * b2_minPulleyLength))); m_maxLength2 = b2Math.b2Min(_arg1.maxLength2, ((m_constant - b2_minPulleyLength) / m_ratio)); m_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; } public function GetGroundAnchor2():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor2); return (_local1); } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = m_u2.Copy(); _local1.Multiply(m_force); return (_local1); } override public function SolvePositionConstraints():Boolean{ 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: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; _local1 = m_body1; _local2 = m_body2; _local4 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local5 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local6 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local7 = (m_ground.m_xf.position.y + m_groundAnchor2.y); _local23 = 0; if (m_state == e_atUpperLimit){ _local3 = _local1.m_xf.R; _local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9)); _local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9)); _local8 = _local22; _local3 = _local2.m_xf.R; _local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11)); _local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11)); _local10 = _local22; _local12 = (_local1.m_sweep.c.x + _local8); _local13 = (_local1.m_sweep.c.y + _local9); _local14 = (_local2.m_sweep.c.x + _local10); _local15 = (_local2.m_sweep.c.y + _local11); m_u1.Set((_local12 - _local4), (_local13 - _local5)); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local16 = m_u1.Length(); _local17 = m_u2.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local16)); } else { m_u1.SetZero(); }; if (_local17 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local17)); } else { m_u2.SetZero(); }; _local18 = ((m_constant - _local16) - (m_ratio * _local17)); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_pulleyMass) * _local18); _local20 = m_positionImpulse; m_positionImpulse = b2Math.b2Max(0, (m_positionImpulse + _local19)); _local19 = (m_positionImpulse - _local20); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local14 = ((-(m_ratio) * _local19) * m_u2.x); _local15 = ((-(m_ratio) * _local19) * m_u2.y); _local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12)); _local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13)); _local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local1.SynchronizeTransform(); _local2.SynchronizeTransform(); }; if (m_limitState1 == e_atUpperLimit){ _local3 = _local1.m_xf.R; _local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9)); _local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9)); _local8 = _local22; _local12 = (_local1.m_sweep.c.x + _local8); _local13 = (_local1.m_sweep.c.y + _local9); m_u1.Set((_local12 - _local4), (_local13 - _local5)); _local16 = m_u1.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.x = (m_u1.x * (1 / _local16)); m_u1.y = (m_u1.y * (1 / _local16)); } else { m_u1.SetZero(); }; _local18 = (m_maxLength1 - _local16); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass1) * _local18); _local21 = m_limitPositionImpulse1; m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19)); _local19 = (m_limitPositionImpulse1 - _local21); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12)); _local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13)); _local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local1.SynchronizeTransform(); }; if (m_limitState2 == e_atUpperLimit){ _local3 = _local2.m_xf.R; _local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11)); _local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11)); _local10 = _local22; _local14 = (_local2.m_sweep.c.x + _local10); _local15 = (_local2.m_sweep.c.y + _local11); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local17 = m_u2.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u2.x = (m_u2.x * (1 / _local17)); m_u2.y = (m_u2.y * (1 / _local17)); } else { m_u2.SetZero(); }; _local18 = (m_maxLength2 - _local17); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass2) * _local18); _local21 = m_limitPositionImpulse2; m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19)); _local19 = (m_limitPositionImpulse2 - _local21); _local14 = (-(_local19) * m_u2.x); _local15 = (-(_local19) * m_u2.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local2.SynchronizeTransform(); }; return ((_local23 < b2Settings.b2_linearSlop)); } override public 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_body1; _local3 = m_body2; _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_force = 0; } else { m_state = e_atUpperLimit; m_positionImpulse = 0; }; if (_local18 < m_maxLength1){ m_limitState1 = e_inactiveLimit; m_limitForce1 = 0; } else { m_limitState1 = e_atUpperLimit; m_limitPositionImpulse1 = 0; }; if (_local19 < m_maxLength2){ m_limitState2 = e_inactiveLimit; m_limitForce2 = 0; } else { m_limitState2 = e_atUpperLimit; m_limitPositionImpulse2 = 0; }; _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){ _local23 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.x); _local24 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.y); _local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.x); _local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * 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_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; }; } override public function GetReactionTorque():Number{ return (0); } public function GetRatio():Number{ return (m_ratio); } public function GetLength2():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body2.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 public 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_body1; _local3 = m_body2; _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 = ((-(_arg1.inv_dt) * m_pulleyMass) * _local18); _local20 = m_force; m_force = b2Math.b2Max(0, (m_force + _local19)); _local19 = (m_force - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _local19) * m_u1.y); _local16 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.x); _local17 = (((-(_arg1.dt) * 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 = ((-(_arg1.inv_dt) * m_limitMass1) * _local18); _local20 = m_limitForce1; m_limitForce1 = b2Math.b2Max(0, (m_limitForce1 + _local19)); _local19 = (m_limitForce1 - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _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 = ((-(_arg1.inv_dt) * m_limitMass2) * _local18); _local20 = m_limitForce2; m_limitForce2 = b2Math.b2Max(0, (m_limitForce2 + _local19)); _local19 = (m_limitForce2 - _local20); _local16 = ((-(_arg1.dt) * _local19) * m_u2.x); _local17 = ((-(_arg1.dt) * _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 GetLength1():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body1.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 GetGroundAnchor1():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor1); return (_local1); } } }//package Box2D.Dynamics.Joints
Section 61
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PulleyJointDef extends b2JointDef { public var maxLength2:Number; public var length1:Number; public var length2:Number; public var maxLength1:Number; public var ratio:Number; public var groundAnchor1:b2Vec2; public var groundAnchor2:b2Vec2; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public function b2PulleyJointDef(){ groundAnchor1 = new b2Vec2(); groundAnchor2 = new b2Vec2(); localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundAnchor1.Set(-1, 1); groundAnchor2.Set(1, 1); localAnchor1.Set(-1, 0); localAnchor2.Set(1, 0); length1 = 0; maxLength1 = 0; length2 = 0; maxLength2 = 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; body1 = _arg1; body2 = _arg2; groundAnchor1.SetV(_arg3); groundAnchor2.SetV(_arg4); localAnchor1 = body1.GetLocalPoint(_arg5); localAnchor2 = body2.GetLocalPoint(_arg6); _local8 = (_arg5.x - _arg3.x); _local9 = (_arg5.y - _arg3.y); length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local10 = (_arg6.x - _arg4.x); _local11 = (_arg6.y - _arg4.y); length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); ratio = _arg7; _local12 = (length1 + (ratio * length2)); maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength)); maxLength2 = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio); } } }//package Box2D.Dynamics.Joints
Section 62
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2RevoluteJoint extends b2Joint { public var m_limitForce:Number; public var m_motorForce:Number; public var m_pivotMass:b2Mat22; public var m_enableLimit:Boolean; public var m_limitState:int; public var m_motorMass:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K3:b2Mat22; private var K:b2Mat22; public var m_pivotForce:b2Vec2; public var m_motorSpeed:Number; public var m_enableMotor:Boolean; public var m_limitPositionImpulse:Number; public var m_maxMotorTorque:Number; public var m_referenceAngle:Number; public var m_lowerAngle:Number; public var m_upperAngle:Number; public static var tImpulse:b2Vec2 = new b2Vec2(); public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){ K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); K3 = new b2Mat22(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_pivotForce = new b2Vec2(); m_pivotMass = new b2Mat22(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_referenceAngle = _arg1.referenceAngle; m_pivotForce.Set(0, 0); m_motorForce = 0; m_limitForce = 0; m_limitPositionImpulse = 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; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetUpperLimit():Number{ return (m_upperAngle); } public function GetLowerLimit():Number{ return (m_lowerAngle); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerAngle = _arg1; m_upperAngle = _arg2; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():b2Vec2{ return (m_pivotForce); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:b2Mat22; 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; _local3 = m_body1; _local4 = m_body2; _local5 = 0; _local6 = _local3.m_xf.R; _local7 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local8 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local9 = ((_local6.col1.x * _local7) + (_local6.col2.x * _local8)); _local8 = ((_local6.col1.y * _local7) + (_local6.col2.y * _local8)); _local7 = _local9; _local6 = _local4.m_xf.R; _local10 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local9 = ((_local6.col1.x * _local10) + (_local6.col2.x * _local11)); _local11 = ((_local6.col1.y * _local10) + (_local6.col2.y * _local11)); _local10 = _local9; _local12 = (_local3.m_sweep.c.x + _local7); _local13 = (_local3.m_sweep.c.y + _local8); _local14 = (_local4.m_sweep.c.x + _local10); _local15 = (_local4.m_sweep.c.y + _local11); _local16 = (_local14 - _local12); _local17 = (_local15 - _local13); _local5 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17))); _local18 = _local3.m_invMass; _local19 = _local4.m_invMass; _local20 = _local3.m_invI; _local21 = _local4.m_invI; K1.col1.x = (_local18 + _local19); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local18 + _local19); K2.col1.x = ((_local20 * _local8) * _local8); K2.col2.x = ((-(_local20) * _local7) * _local8); K2.col1.y = ((-(_local20) * _local7) * _local8); K2.col2.y = ((_local20 * _local7) * _local7); K3.col1.x = ((_local21 * _local11) * _local11); K3.col2.x = ((-(_local21) * _local10) * _local11); K3.col1.y = ((-(_local21) * _local10) * _local11); K3.col2.y = ((_local21 * _local10) * _local10); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Solve(tImpulse, -(_local16), -(_local17)); _local22 = tImpulse.x; _local23 = tImpulse.y; _local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local22)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local23)); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local7 * _local23) - (_local8 * _local22)))); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local22)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local23)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local10 * _local23) - (_local11 * _local22)))); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); _local24 = 0; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local25 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_referenceAngle); _local26 = 0; if (m_limitState == e_equalLimits){ _local2 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local2); _local24 = b2Math.b2Abs(_local2); } else { if (m_limitState == e_atLowerLimit){ _local2 = (_local25 - m_lowerAngle); _local24 = b2Math.b2Max(0, -(_local2)); _local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0); _local26 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local26), 0); _local26 = (m_limitPositionImpulse - _local1); } else { if (m_limitState == e_atUpperLimit){ _local2 = (_local25 - m_upperAngle); _local24 = b2Math.b2Max(0, _local2); _local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local26), 0); _local26 = (m_limitPositionImpulse - _local1); }; }; }; _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local26)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local26)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); }; return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local24 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function SetMaxMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } public function GetJointAngle():Number{ return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - m_referenceAngle)); } override public 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; _local2 = m_body1; _local3 = m_body2; _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; K1.col1.x = (_local10 + _local11); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local10 + _local11); K2.col1.x = ((_local12 * _local7) * _local7); K2.col2.x = ((-(_local12) * _local6) * _local7); K2.col1.y = ((-(_local12) * _local6) * _local7); K2.col2.y = ((_local12 * _local6) * _local6); K3.col1.x = ((_local13 * _local9) * _local9); K3.col2.x = ((-(_local13) * _local8) * _local9); K3.col1.y = ((-(_local13) * _local8) * _local9); K3.col2.y = ((_local13 * _local8) * _local8); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Invert(m_pivotMass); m_motorMass = (1 / (_local12 + _local13)); if (m_enableMotor == false){ m_motorForce = 0; }; if (m_enableLimit){ _local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - m_referenceAngle); if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){ m_limitState = e_equalLimits; } else { if (_local14 <= m_lowerAngle){ if (m_limitState != e_atLowerLimit){ m_limitForce = 0; }; m_limitState = e_atLowerLimit; } else { if (_local14 >= m_upperAngle){ if (m_limitState != e_atUpperLimit){ m_limitForce = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitForce = 0; }; }; }; } else { m_limitForce = 0; }; if (_arg1.warmStarting){ _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - ((_arg1.dt * _local10) * m_pivotForce.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * m_pivotForce.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * m_pivotForce.y) - (_local7 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * m_pivotForce.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * m_pivotForce.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * m_pivotForce.y) - (_local9 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); } else { m_pivotForce.SetZero(); m_motorForce = 0; m_limitForce = 0; }; m_limitPositionImpulse = 0; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } public function GetMotorTorque():Number{ return (m_motorForce); } override public function GetReactionTorque():Number{ return (m_limitForce); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override public 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; var _local21:Number; _local2 = m_body1; _local3 = m_body2; _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; _local11 = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local7)); _local12 = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local6)); _local13 = (-(_arg1.inv_dt) * ((m_pivotMass.col1.x * _local11) + (m_pivotMass.col2.x * _local12))); _local14 = (-(_arg1.inv_dt) * ((m_pivotMass.col1.y * _local11) + (m_pivotMass.col2.y * _local12))); m_pivotForce.x = (m_pivotForce.x + _local13); m_pivotForce.y = (m_pivotForce.y + _local14); _local15 = (_arg1.dt * _local13); _local16 = (_arg1.dt * _local14); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local16) - (_local9 * _local15)))); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local17 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed); _local18 = ((-(_arg1.inv_dt) * m_motorMass) * _local17); _local19 = m_motorForce; m_motorForce = b2Math.b2Clamp((m_motorForce + _local18), -(m_maxMotorTorque), m_maxMotorTorque); _local18 = (m_motorForce - _local19); _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local18)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local18)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local20 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local21 = ((-(_arg1.inv_dt) * m_motorMass) * _local20); if (m_limitState == e_equalLimits){ m_limitForce = (m_limitForce + _local21); } else { if (m_limitState == e_atLowerLimit){ _local10 = m_limitForce; m_limitForce = b2Math.b2Max((m_limitForce + _local21), 0); _local21 = (m_limitForce - _local10); } else { if (m_limitState == e_atUpperLimit){ _local10 = m_limitForce; m_limitForce = b2Math.b2Min((m_limitForce + _local21), 0); _local21 = (m_limitForce - _local10); }; }; }; _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local21)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local21)); }; } } }//package Box2D.Dynamics.Joints
Section 63
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2RevoluteJointDef extends b2JointDef { public var referenceAngle:Number; public var upperAngle:Number; public var lowerAngle:Number; public var motorSpeed:Number; public var maxMotorTorque:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public function b2RevoluteJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_revoluteJoint; localAnchor1.Set(0, 0); localAnchor2.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{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 64
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; public class b2Body { public var m_xf:b2XForm; public var m_contactList:b2ContactEdge; public var m_angularVelocity:Number; public var m_invI:Number; public var bodyState:String;// = "Unidentified" public var id:String;// = "Unidentified" public var m_shapeCount:int; public var m_torque:Number; public var legShot:Boolean;// = false public var touchedSolid:Boolean;// = false public var m_flags:uint; public var m_linearVelocity:b2Vec2; public var m_world:b2World; public var type:int;// = 0 public var bulletType:String;// = "Unidentified" public var touchedBarricade:Boolean;// = false public var damage:Number; public var pointCollision:b2Vec2; public var m_next:b2Body; public var shouldJump:Boolean;// = false public var m_shapeList:b2Shape; public var touchedChar:Boolean;// = false public var m_force:b2Vec2; public var m_sweep:b2Sweep; public var m_mass:Number; public var gotShot:Boolean;// = false public var m_userData; public var m_invMass:Number; public var bodyShot:Boolean;// = false public var faceRight:Boolean;// = false public var m_prev:b2Body; public var impulseApplied:b2Vec2; public var m_linearDamping:Number; public var m_type:int; public var m_angularDamping:Number; public var touchedTheGround:Boolean;// = false public var normal:b2Vec2; public var m_sleepTime:Number; public var m_jointList:b2JointEdge; public var m_I:Number; public var headShot:Boolean;// = false public static var e_fixedRotationFlag:uint = 64; public static var e_frozenFlag:uint = 2; public static var e_maxTypes:uint = 3; public static var e_sleepFlag:uint = 8; private static var s_massData:b2MassData = new b2MassData(); public static var e_bulletFlag:uint = 32; public static var e_staticType:uint = 1; public static var e_islandFlag:uint = 4; public static var e_allowSleepFlag:uint = 16; private static var s_xf1:b2XForm = new b2XForm(); public static var e_dynamicType:uint = 2; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ var _local3:b2Mat22; var _local4:b2Vec2; id = "Unidentified"; type = 0; normal = new b2Vec2(0, 1); touchedSolid = false; touchedTheGround = false; bodyState = "Unidentified"; gotShot = false; headShot = false; bodyShot = false; legShot = false; shouldJump = false; touchedBarricade = false; faceRight = false; touchedChar = false; bulletType = "Unidentified"; m_xf = new b2XForm(); m_sweep = new b2Sweep(); m_linearVelocity = new b2Vec2(); m_force = new b2Vec2(); super(); m_flags = 0; if (_arg1.isBullet){ 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.isSleeping){ m_flags = (m_flags | e_sleepFlag); }; m_world = _arg2; m_xf.position.SetV(_arg1.position); m_xf.R.Set(_arg1.angle); m_sweep.localCenter.SetV(_arg1.massData.center); 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_contactList = null; m_prev = null; m_next = null; m_linearDamping = _arg1.linearDamping; m_angularDamping = _arg1.angularDamping; m_force.Set(0, 0); m_torque = 0; m_linearVelocity.SetZero(); m_angularVelocity = 0; m_sleepTime = 0; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.massData.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.massData.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; m_userData = _arg1.userData; m_shapeList = null; m_shapeCount = 0; } public function SetLinearVelocity(_arg1:b2Vec2):void{ m_linearVelocity.SetV(_arg1); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public 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 SetMassFromShapes():void{ var _local1:b2Shape; var _local2:Number; var _local3:Number; var _local4:b2MassData; var _local5:b2Mat22; var _local6:b2Vec2; var _local7:int; if (m_world.m_lock == true){ return; }; m_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; _local2 = 0; _local3 = 0; _local4 = s_massData; _local1 = m_shapeList; while (_local1) { _local1.ComputeMass(_local4); m_mass = (m_mass + _local4.mass); _local2 = (_local2 + (_local4.mass * _local4.center.x)); _local3 = (_local3 + (_local4.mass * _local4.center.y)); m_I = (m_I + _local4.I); _local1 = _local1.m_next; }; if (m_mass > 0){ m_invMass = (1 / m_mass); _local2 = (_local2 * m_invMass); _local3 = (_local3 * m_invMass); }; if ((((m_I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){ m_I = (m_I - (m_mass * ((_local2 * _local2) + (_local3 * _local3)))); m_invI = (1 / m_I); } else { m_I = 0; m_invI = 0; }; m_sweep.localCenter.Set(_local2, _local3); _local5 = m_xf.R; _local6 = m_sweep.localCenter; m_sweep.c.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y)); m_sweep.c.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.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); _local1 = m_shapeList; while (_local1) { _local1.UpdateSweepRadius(m_sweep.localCenter); _local1 = _local1.m_next; }; _local7 = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local7 != m_type){ _local1 = m_shapeList; while (_local1) { _local1.RefilterProxy(m_world.m_broadPhase, m_xf); _local1 = _local1.m_next; }; }; } public function SetXForm(_arg1:b2Vec2, _arg2:Number):Boolean{ var _local3:b2Shape; var _local4:b2Mat22; var _local5:b2Vec2; var _local6:Boolean; var _local7:Boolean; if (m_world.m_lock == true){ return (true); }; if (IsFrozen()){ return (false); }; 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 = false; _local3 = m_shapeList; while (_local3) { _local7 = _local3.Synchronize(m_world.m_broadPhase, m_xf, m_xf); if (_local7 == false){ _local6 = true; break; }; _local3 = _local3.m_next; }; if (_local6 == true){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local3 = m_shapeList; while (_local3) { _local3.DestroyProxy(m_world.m_broadPhase); _local3 = _local3.m_next; }; return (false); }; m_world.m_broadPhase.Commit(); return (true); } public function PutToSleep():void{ m_flags = (m_flags | e_sleepFlag); m_sleepTime = 0; m_linearVelocity.SetZero(); m_angularVelocity = 0; m_force.SetZero(); m_torque = 0; } public function GetAngle():Number{ return (m_sweep.a); } public function SynchronizeShapes():Boolean{ var _local1:b2XForm; var _local2:b2Mat22; var _local3:b2Vec2; var _local4:b2Shape; var _local5:Boolean; _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 = true; _local4 = m_shapeList; while (_local4) { _local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf); if (_local5 == false){ break; }; _local4 = _local4.m_next; }; if (_local5 == false){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local4 = m_shapeList; while (_local4) { _local4.DestroyProxy(m_world.m_broadPhase); _local4 = _local4.m_next; }; return (false); }; return (true); } public function SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } 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.x - (m_angularVelocity * (_local3.x - m_sweep.c.x))))); } public function GetNext():b2Body{ return (m_next); } public function GetMass():Number{ return (m_mass); } public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping()){ WakeUp(); }; 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 SetMass(_arg1:b2MassData):void{ var _local2:b2Shape; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:int; if (m_world.m_lock == true){ return; }; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; m_sweep.localCenter.SetV(_arg1.center); _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); _local2 = m_shapeList; while (_local2) { _local2.UpdateSweepRadius(m_sweep.localCenter); _local2 = _local2.m_next; }; _local5 = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local5 != m_type){ _local2 = m_shapeList; while (_local2) { _local2.RefilterProxy(m_world.m_broadPhase, m_xf); _local2 = _local2.m_next; }; }; } public function IsStatic():Boolean{ return ((m_type == e_staticType)); } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulMV(m_xf.R, _arg1)); } public function GetShapeList():b2Shape{ return (m_shapeList); } public 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 GetWorldCenter():b2Vec2{ return (m_sweep.c); } public function GetUserData(){ return (m_userData); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function WakeUp():void{ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } public function GetLinearVelocityFromWorldPoint(_arg1:b2Vec2):b2Vec2{ return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_arg1.x - m_sweep.c.x))))); } public function GetPosition():b2Vec2{ return (m_xf.position); } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_xf.R, _arg1)); } public function GetLocalCenter():b2Vec2{ return (m_sweep.localCenter); } public function IsFrozen():Boolean{ return (((m_flags & e_frozenFlag) == e_frozenFlag)); } public function IsDynamic():Boolean{ return ((m_type == e_dynamicType)); } public function GetInertia():Number{ return (m_I); } public function GetJointList():b2JointEdge{ return (m_jointList); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulXT(m_xf, _arg1)); } public function GetXForm():b2XForm{ return (m_xf); } public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping()){ WakeUp(); }; 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 GetAngularVelocity():Number{ return (m_angularVelocity); } public function IsConnected(_arg1:b2Body):Boolean{ var _local2:b2JointEdge; _local2 = m_jointList; while (_local2) { if (_local2.other == _arg1){ return ((_local2.joint.m_collideConnected == false)); }; _local2 = _local2.next; }; return (false); } public function SetBullet(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_bulletFlag); } else { m_flags = (m_flags & ~(e_bulletFlag)); }; } public function CreateShape(_arg1:b2ShapeDef):b2Shape{ var _local2:b2Shape; if (m_world.m_lock == true){ return (null); }; _local2 = b2Shape.Create(_arg1, m_world.m_blockAllocator); _local2.id = _arg1.id; _local2.m_next = m_shapeList; m_shapeList = _local2; m_shapeCount++; _local2.m_body = this; _local2.CreateProxy(m_world.m_broadPhase, m_xf); _local2.UpdateSweepRadius(m_sweep.localCenter); return (_local2); } public function IsBullet():Boolean{ return (((m_flags & e_bulletFlag) == e_bulletFlag)); } public function DestroyShape(_arg1:b2Shape):void{ var _local2:b2Shape; var _local3:b2Shape; var _local4:Boolean; if (m_world.m_lock == true){ return; }; _arg1.DestroyProxy(m_world.m_broadPhase); _local2 = m_shapeList; _local3 = null; _local4 = false; while (_local2 != null) { if (_local2 == _arg1){ if (_local3){ _local3.m_next = _arg1.m_next; } else { m_shapeList = _arg1.m_next; }; _local4 = true; break; }; _local3 = _local2; _local2 = _local2.m_next; }; _arg1.m_body = null; _arg1.m_next = null; m_shapeCount--; b2Shape.Destroy(_arg1, m_world.m_blockAllocator); } 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 ApplyTorque(_arg1:Number):void{ if (IsSleeping()){ WakeUp(); }; m_torque = (m_torque + _arg1); } public function AllowSleeping(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function GetWorld():b2World{ return (m_world); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } } }//package Box2D.Dynamics
Section 65
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; public class b2BodyDef { public var isSleeping:Boolean; public var position:b2Vec2; public var isBullet:Boolean; public var allowSleep:Boolean; public var userData; public var angularDamping:Number; public var fixedRotation:Boolean; public var angle:Number; public var linearDamping:Number; public var massData:b2MassData; public function b2BodyDef(){ massData = new b2MassData(); position = new b2Vec2(); super(); massData.center.SetZero(); massData.mass = 0; massData.I = 0; userData = null; position.Set(0, 0); angle = 0; linearDamping = 0; angularDamping = 0; allowSleep = true; isSleeping = false; fixedRotation = false; isBullet = false; } } }//package Box2D.Dynamics
Section 66
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener) package Box2D.Dynamics { public class b2BoundaryListener { public function Violation(_arg1:b2Body):void{ } } }//package Box2D.Dynamics
Section 67
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; public class b2ContactFilter { public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter); ; public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):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 68
//b2ContactListener (Box2D.Dynamics.b2ContactListener) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; public class b2ContactListener { public function Add(_arg1:b2ContactPoint, _arg2:b2Contact):void{ } public function Remove(_arg1:b2ContactPoint, _arg2:b2Contact):void{ } public function Persist(_arg1:b2ContactPoint, _arg2:b2Contact):void{ } public function Result(_arg1:b2ContactResult, _arg2:b2Contact):void{ } } }//package Box2D.Dynamics
Section 69
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; public class b2ContactManager extends b2PairCallback { public var m_world:b2World; public var m_destroyImmediate:Boolean; public var m_nullContact:b2NullContact; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2ContactManager(){ m_nullContact = new b2NullContact(); super(); m_world = null; m_destroyImmediate = false; } override public function PairAdded(_arg1, _arg2){ var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2Contact; _local3 = (_arg1 as b2Shape); _local4 = (_arg2 as b2Shape); _local5 = _local3.m_body; _local6 = _local4.m_body; if (((_local5.IsStatic()) && (_local6.IsStatic()))){ return (m_nullContact); }; if (_local3.m_body == _local4.m_body){ return (m_nullContact); }; if (_local6.IsConnected(_local5)){ return (m_nullContact); }; if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){ return (m_nullContact); }; _local7 = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator); if (_local7 == null){ return (m_nullContact); }; _local3 = _local7.m_shape1; _local4 = _local7.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local7.m_prev = null; _local7.m_next = m_world.m_contactList; if (m_world.m_contactList != null){ m_world.m_contactList.m_prev = _local7; }; m_world.m_contactList = _local7; _local7.m_node1.contact = _local7; _local7.m_node1.other = _local6; _local7.m_node1.prev = null; _local7.m_node1.next = _local5.m_contactList; if (_local5.m_contactList != null){ _local5.m_contactList.prev = _local7.m_node1; }; _local5.m_contactList = _local7.m_node1; _local7.m_node2.contact = _local7; _local7.m_node2.other = _local5; _local7.m_node2.prev = null; _local7.m_node2.next = _local6.m_contactList; if (_local6.m_contactList != null){ _local6.m_contactList.prev = _local7.m_node2; }; _local6.m_contactList = _local7.m_node2; m_world.m_contactCount++; return (_local7); } override public function PairRemoved(_arg1, _arg2, _arg3):void{ var _local4:b2Contact; if (_arg3 == null){ return; }; _local4 = (_arg3 as b2Contact); if (_local4 == m_nullContact){ return; }; Destroy(_local4); } public function Destroy(_arg1:b2Contact):void{ var _local2:b2Shape; var _local3:b2Shape; var _local4:int; var _local5:b2Body; var _local6:b2Body; var _local7:b2Body; var _local8:b2Body; var _local9:Array; var _local10:b2ContactPoint; var _local11:int; var _local12:b2Manifold; var _local13:int; var _local14:b2ManifoldPoint; var _local15:b2Vec2; var _local16:b2Vec2; _local2 = _arg1.m_shape1; _local3 = _arg1.m_shape2; _local4 = _arg1.m_manifoldCount; if ((((_local4 > 0)) && (m_world.m_contactListener))){ _local7 = _local2.m_body; _local8 = _local3.m_body; _local9 = _arg1.GetManifolds(); _local10 = s_evalCP; _local10.shape1 = _arg1.m_shape1; _local10.shape2 = _arg1.m_shape2; _local10.friction = _arg1.m_friction; _local10.restitution = _arg1.m_restitution; _local11 = 0; while (_local11 < _local4) { _local12 = _local9[_local11]; _local10.normal.SetV(_local12.normal); _local13 = 0; while (_local13 < _local12.pointCount) { _local14 = _local12.points[_local13]; _local10.position = _local7.GetWorldPoint(_local14.localPoint1); _local15 = _local7.GetLinearVelocityFromLocalPoint(_local14.localPoint1); _local16 = _local8.GetLinearVelocityFromLocalPoint(_local14.localPoint2); _local10.velocity.Set((_local16.x - _local15.x), (_local16.y - _local15.y)); _local10.separation = _local14.separation; _local10.id.key = _local14.id._key; m_world.m_contactListener.Remove(_local10, _arg1); _local13++; }; _local11++; }; }; 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; }; _local5 = _local2.m_body; _local6 = _local3.m_body; if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local5.m_contactList){ _local5.m_contactList = _arg1.m_node1.next; }; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local6.m_contactList){ _local6.m_contactList = _arg1.m_node2.next; }; b2Contact.Destroy(_arg1, m_world.m_blockAllocator); m_world.m_contactCount--; } public function Collide():void{ var _local1:b2Contact; var _local2:b2Body; var _local3:b2Body; _local1 = m_world.m_contactList; while (_local1) { _local2 = _local1.m_shape1.m_body; _local3 = _local1.m_shape2.m_body; if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){ } else { _local1.Update(m_world.m_contactListener); }; _local1 = _local1.m_next; }; } } }//package Box2D.Dynamics
Section 70
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; import flash.display.*; public class b2DebugDraw { public var m_xformScale:Number;// = 1 public var m_fillAlpha:Number;// = 1 public var m_alpha:Number;// = 1 public var m_lineThickness:Number;// = 1 public var m_drawFlags:uint; public var m_sprite:Sprite; public var m_drawScale:Number;// = 1 public static var e_coreShapeBit:uint = 4; public static var e_shapeBit:uint = 1; public static var e_centerOfMassBit:uint = 64; public static var e_aabbBit:uint = 8; public static var e_obbBit:uint = 16; public static var e_pairBit:uint = 32; 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 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 DrawXForm(_arg1:b2XForm):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 ClearFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags & ~(_arg1)); } 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 SetFlags(_arg1:uint):void{ m_drawFlags = _arg1; } 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 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)); } } }//package Box2D.Dynamics
Section 71
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; public class b2DestructionListener { public function SayGoodbyeJoint(_arg1:b2Joint):void{ } public function SayGoodbyeShape(_arg1:b2Shape):void{ } } }//package Box2D.Dynamics
Section 72
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Island { public var m_joints:Array; public var m_listener:b2ContactListener; public var m_positionIterationCount:int; public var m_bodyCapacity:int; public var m_bodies:Array; public var m_jointCapacity:int; public var m_contactCount:int; public var m_contacts:Array; public var m_contactCapacity:int; public var m_jointCount:int; public var m_allocator; public var m_bodyCount:int; private static var s_reportCR:b2ContactResult = new b2ContactResult(); public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener){ var _local6:int; super(); 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_bodies = new Array(_arg1); _local6 = 0; while (_local6 < _arg1) { m_bodies[_local6] = null; _local6++; }; m_contacts = new Array(_arg2); _local6 = 0; while (_local6 < _arg2) { m_contacts[_local6] = null; _local6++; }; m_joints = new Array(_arg3); _local6 = 0; while (_local6 < _arg3) { m_joints[_local6] = null; _local6++; }; m_positionIterationCount = 0; } public function AddBody(_arg1:b2Body):void{ 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:b2Mat22; var _local3:b2Vec2; var _local4:int; var _local5:b2Contact; var _local6:b2ContactConstraint; var _local7:b2ContactResult; var _local8:b2Body; var _local9:int; var _local10:Array; var _local11:int; var _local12:b2Manifold; var _local13:int; var _local14:b2ManifoldPoint; var _local15:b2ContactConstraintPoint; if (m_listener == null){ return; }; _local4 = 0; while (_local4 < m_contactCount) { _local5 = m_contacts[_local4]; _local6 = _arg1[_local4]; _local7 = s_reportCR; _local7.shape1 = _local5.m_shape1; _local7.shape2 = _local5.m_shape2; _local8 = _local7.shape1.m_body; _local9 = _local5.m_manifoldCount; _local10 = _local5.GetManifolds(); _local11 = 0; while (_local11 < _local9) { _local12 = _local10[_local11]; _local7.normal.SetV(_local12.normal); _local13 = 0; while (_local13 < _local12.pointCount) { _local14 = _local12.points[_local13]; _local15 = _local6.points[_local13]; _local7.position = _local8.GetWorldPoint(_local14.localPoint1); _local7.normalImpulse = _local15.normalImpulse; _local7.tangentImpulse = _local15.tangentImpulse; _local7.id.key = _local14.id.key; m_listener.Result(_local7, _local5); _local13++; }; _local11++; }; _local4++; }; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{ var _local5:int; var _local6:b2Body; var _local7:b2Joint; var _local8:b2ContactSolver; var _local9:int; var _local10:Boolean; var _local11:Boolean; var _local12:Boolean; var _local13:Number; var _local14:Number; var _local15:Number; _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } 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_force.SetZero(); _local6.m_torque = 0; _local6.m_linearVelocity.Multiply(b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1)); _local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1)); if (_local6.m_linearVelocity.LengthSquared() > b2Settings.b2_maxLinearVelocitySquared){ _local6.m_linearVelocity.Normalize(); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * b2Settings.b2_maxLinearVelocity); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * b2Settings.b2_maxLinearVelocity); }; if ((_local6.m_angularVelocity * _local6.m_angularVelocity) > b2Settings.b2_maxAngularVelocitySquared){ if (_local6.m_angularVelocity < 0){ _local6.m_angularVelocity = -(b2Settings.b2_maxAngularVelocity); } else { _local6.m_angularVelocity = b2Settings.b2_maxAngularVelocity; }; }; }; _local5++; }; _local8 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local8.InitVelocityConstraints(_arg1); _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitVelocityConstraints(_arg1); _local5++; }; _local5 = 0; while (_local5 < _arg1.maxIterations) { _local8.SolveVelocityConstraints(); _local9 = 0; while (_local9 < m_jointCount) { _local7 = m_joints[_local9]; _local7.SolveVelocityConstraints(_arg1); _local9++; }; _local5++; }; _local8.FinalizeVelocityConstraints(); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } else { _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(); }; _local5++; }; if (_arg3){ _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitPositionConstraints(); _local5++; }; m_positionIterationCount = 0; while (m_positionIterationCount < _arg1.maxIterations) { _local10 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local11 = true; _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local12 = _local7.SolvePositionConstraints(); _local11 = ((_local11) && (_local12)); _local5++; }; if (((_local10) && (_local11))){ break; }; m_positionIterationCount++; }; }; Report(_local8.m_constraints); if (_arg4){ _local13 = Number.MAX_VALUE; _local14 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local15 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.m_invMass == 0){ } else { if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){ _local6.m_sleepTime = 0; _local13 = 0; }; if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local15)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local14)))){ _local6.m_sleepTime = 0; _local13 = 0; } else { _local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt); _local13 = b2Math.b2Min(_local13, _local6.m_sleepTime); }; }; _local5++; }; if (_local13 >= b2Settings.b2_timeToSleep){ _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; m_bodies[_local5].m_flags = (_local6.m_flags | b2Body.e_sleepFlag); _local6.m_linearVelocity.SetZero(); _local6.m_angularVelocity = 0; _local5++; }; }; }; } public function AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:int; var _local3:b2ContactSolver; var _local4:Number; var _local5:b2Body; var _local6:Boolean; _local3 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local2 = 0; while (_local2 < _arg1.maxIterations) { _local3.SolveVelocityConstraints(); _local2++; }; _local2 = 0; while (_local2 < m_bodyCount) { _local5 = m_bodies[_local2]; if (_local5.IsStatic()){ } else { _local5.m_sweep.c0.SetV(_local5.m_sweep.c); _local5.m_sweep.a0 = _local5.m_sweep.a; _local5.m_sweep.c.x = (_local5.m_sweep.c.x + (_arg1.dt * _local5.m_linearVelocity.x)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y + (_arg1.dt * _local5.m_linearVelocity.y)); _local5.m_sweep.a = (_local5.m_sweep.a + (_arg1.dt * _local5.m_angularVelocity)); _local5.SynchronizeTransform(); }; _local2++; }; _local4 = 0.75; _local2 = 0; while (_local2 < _arg1.maxIterations) { _local6 = _local3.SolvePositionConstraints(_local4); if (_local6){ break; }; _local2++; }; Report(_local3.m_constraints); } } }//package Box2D.Dynamics
Section 73
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var warmStarting:Boolean; public var positionCorrection:Boolean; public var dt:Number; public var maxIterations:int; public var dtRatio:Number; public var inv_dt:Number; } }//package Box2D.Dynamics
Section 74
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2World { public var m_inv_dt0:Number; public var m_boundaryListener:b2BoundaryListener; public var m_contactList:b2Contact; public var m_blockAllocator; public var m_contactListener:b2ContactListener; public var m_allowSleep:Boolean; public var m_broadPhase:b2BroadPhase; public var m_destructionListener:b2DestructionListener; public var m_jointCount:int; public var m_bodyCount:int; public var m_lock:Boolean; public var m_positionIterationCount:int; public var m_groundBody:b2Body; public var m_contactCount:int; public var m_debugDraw:b2DebugDraw; public var m_contactFilter:b2ContactFilter; public var m_bodyList:b2Body; public var m_stackAllocator; public var m_jointList:b2Joint; public var m_gravity:b2Vec2; public var m_contactManager:b2ContactManager; private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8); public static var m_continuousPhysics:Boolean; public static var m_warmStarting:Boolean; private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6); public static var m_positionCorrection:Boolean; private static var s_xf:b2XForm = new b2XForm(); public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){ var _local4:b2BodyDef; m_contactManager = new b2ContactManager(); super(); m_destructionListener = null; m_boundaryListener = null; m_contactFilter = b2ContactFilter.b2_defaultFilter; m_contactListener = null; m_debugDraw = null; m_bodyList = null; m_contactList = null; m_jointList = null; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_positionCorrection = true; m_warmStarting = true; m_continuousPhysics = true; m_allowSleep = _arg3; m_gravity = _arg2; m_lock = false; m_inv_dt0 = 0; m_contactManager.m_world = this; m_broadPhase = new b2BroadPhase(_arg1, m_contactManager); _local4 = new b2BodyDef(); m_groundBody = CreateBody(_local4); } public function DrawJoint(_arg1:b2Joint):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2XForm; var _local5:b2XForm; 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.m_body1; _local3 = _arg1.m_body2; _local4 = _local2.m_xf; _local5 = _local3.m_xf; _local6 = _local4.position; _local7 = _local5.position; _local8 = _arg1.GetAnchor1(); _local9 = _arg1.GetAnchor2(); _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.GetGroundAnchor1(); _local13 = _local11.GetGroundAnchor2(); 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 Refilter(_arg1:b2Shape):void{ _arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf); } public function SetDebugDraw(_arg1:b2DebugDraw):void{ m_debugDraw = _arg1; } public function SetContinuousPhysics(_arg1:Boolean):void{ m_continuousPhysics = _arg1; } public function GetProxyCount():int{ return (m_broadPhase.m_proxyCount); } public function DrawDebugData():void{ var _local1:uint; var _local2:int; var _local3:b2Body; var _local4:b2Shape; var _local5:b2Joint; var _local6:b2BroadPhase; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Color; var _local11:b2XForm; var _local12:b2AABB; var _local13:b2AABB; var _local14:Array; var _local15:Boolean; var _local16:uint; var _local17:b2Pair; var _local18:b2Proxy; var _local19:b2Proxy; var _local20:b2Vec2; var _local21:b2Vec2; var _local22:b2Proxy; var _local23:b2PolygonShape; var _local24:b2OBB; var _local25:b2Vec2; var _local26:b2Mat22; var _local27:b2Vec2; var _local28:Number; if (m_debugDraw == null){ return; }; m_debugDraw.m_sprite.graphics.clear(); _local1 = m_debugDraw.GetFlags(); _local7 = new b2Vec2(); _local8 = new b2Vec2(); _local9 = new b2Vec2(); _local10 = new b2Color(0, 0, 0); _local12 = new b2AABB(); _local13 = new b2AABB(); _local14 = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()]; if ((_local1 & b2DebugDraw.e_shapeBit)){ _local15 = ((_local1 & b2DebugDraw.e_coreShapeBit) == b2DebugDraw.e_coreShapeBit); _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetShapeList(); while (_local4) { if (_local3.IsStatic()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15); } else { if (_local3.IsSleeping()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15); } else { DrawShape(_local4, _local11, new b2Color(0.9, 0.9, 0.9), _local15); }; }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; if ((_local1 & b2DebugDraw.e_jointBit)){ _local5 = m_jointList; while (_local5) { DrawJoint(_local5); _local5 = _local5.m_next; }; }; if ((_local1 & b2DebugDraw.e_pairBit)){ _local6 = m_broadPhase; _local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y)); _local10.Set(0.9, 0.9, 0.3); _local2 = 0; while (_local2 < b2Pair.b2_tableCapacity) { _local16 = _local6.m_pairManager.m_hashTable[_local2]; while (_local16 != b2Pair.b2_nullPair) { _local17 = _local6.m_pairManager.m_pairs[_local16]; _local18 = _local6.m_proxyPool[_local17.proxyId1]; _local19 = _local6.m_proxyPool[_local17.proxyId2]; _local12.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.lowerBounds[0]].value)); _local12.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.lowerBounds[1]].value)); _local12.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.upperBounds[0]].value)); _local12.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.upperBounds[1]].value)); _local13.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.lowerBounds[0]].value)); _local13.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.lowerBounds[1]].value)); _local13.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.upperBounds[0]].value)); _local13.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.upperBounds[1]].value)); _local8.x = (0.5 * (_local12.lowerBound.x + _local12.upperBound.x)); _local8.y = (0.5 * (_local12.lowerBound.y + _local12.upperBound.y)); _local9.x = (0.5 * (_local13.lowerBound.x + _local13.upperBound.x)); _local9.y = (0.5 * (_local13.lowerBound.y + _local13.upperBound.y)); m_debugDraw.DrawSegment(_local8, _local9, _local10); _local16 = _local17.next; }; _local2++; }; }; if ((_local1 & b2DebugDraw.e_aabbBit)){ _local6 = m_broadPhase; _local20 = _local6.m_worldAABB.lowerBound; _local21 = _local6.m_worldAABB.upperBound; _local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y)); _local10.Set(0.9, 0.3, 0.9); _local2 = 0; while (_local2 < b2Settings.b2_maxProxies) { _local22 = _local6.m_proxyPool[_local2]; if (_local22.IsValid() == false){ } else { _local12.lowerBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.lowerBounds[0]].value)); _local12.lowerBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.lowerBounds[1]].value)); _local12.upperBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.upperBounds[0]].value)); _local12.upperBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.upperBounds[1]].value)); _local14[0].Set(_local12.lowerBound.x, _local12.lowerBound.y); _local14[1].Set(_local12.upperBound.x, _local12.lowerBound.y); _local14[2].Set(_local12.upperBound.x, _local12.upperBound.y); _local14[3].Set(_local12.lowerBound.x, _local12.upperBound.y); m_debugDraw.DrawPolygon(_local14, 4, _local10); }; _local2++; }; _local14[0].Set(_local20.x, _local20.y); _local14[1].Set(_local21.x, _local20.y); _local14[2].Set(_local21.x, _local21.y); _local14[3].Set(_local20.x, _local21.y); m_debugDraw.DrawPolygon(_local14, 4, new b2Color(0.3, 0.9, 0.9)); }; if ((_local1 & b2DebugDraw.e_obbBit)){ _local10.Set(0.5, 0.3, 0.5); _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetShapeList(); while (_local4) { if (_local4.m_type != b2Shape.e_polygonShape){ } else { _local23 = (_local4 as b2PolygonShape); _local24 = _local23.GetOBB(); _local25 = _local24.extents; _local14[0].Set(-(_local25.x), -(_local25.y)); _local14[1].Set(_local25.x, -(_local25.y)); _local14[2].Set(_local25.x, _local25.y); _local14[3].Set(-(_local25.x), _local25.y); _local2 = 0; while (_local2 < 4) { _local26 = _local24.R; _local27 = _local14[_local2]; _local28 = (_local24.center.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y))); _local14[_local2].y = (_local24.center.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y))); _local14[_local2].x = _local28; _local26 = _local11.R; _local28 = (_local11.position.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y))); _local14[_local2].y = (_local11.position.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y))); _local14[_local2].x = _local28; _local2++; }; m_debugDraw.DrawPolygon(_local14, 4, _local10); }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; 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.DrawXForm(_local11); _local3 = _local3.m_next; }; }; } public function DestroyBody(_arg1:b2Body):void{ var _local2:b2JointEdge; var _local3:b2Shape; var _local4:b2JointEdge; var _local5:b2Shape; if (m_lock == true){ return; }; _local2 = _arg1.m_jointList; while (_local2) { _local4 = _local2; _local2 = _local2.next; if (m_destructionListener){ m_destructionListener.SayGoodbyeJoint(_local4.joint); }; DestroyJoint(_local4.joint); }; _local3 = _arg1.m_shapeList; while (_local3) { _local5 = _local3; _local3 = _local3.m_next; if (m_destructionListener){ m_destructionListener.SayGoodbyeShape(_local5); }; _local5.DestroyProxy(m_broadPhase); b2Shape.Destroy(_local5, m_blockAllocator); }; 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--; } public function SetContactFilter(_arg1:b2ContactFilter):void{ m_contactFilter = _arg1; } public function GetGroundBody():b2Body{ return (m_groundBody); } public function DrawShape(_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{ var _local5:b2Color; var _local6:b2CircleShape; var _local7:b2Vec2; var _local8:Number; var _local9:b2Vec2; var _local10:int; var _local11:b2PolygonShape; var _local12:int; var _local13:Array; var _local14:Array; var _local15:Array; _local5 = s_coreColor; switch (_arg1.m_type){ case b2Shape.e_circleShape: _local6 = (_arg1 as b2CircleShape); _local7 = b2Math.b2MulX(_arg2, _local6.m_localPosition); _local8 = _local6.m_radius; _local9 = _arg2.R.col1; m_debugDraw.DrawSolidCircle(_local7, _local8, _local9, _arg3); if (_arg4){ m_debugDraw.DrawCircle(_local7, (_local8 - b2Settings.b2_toiSlop), _local5); }; break; case b2Shape.e_polygonShape: _local11 = (_arg1 as b2PolygonShape); _local12 = _local11.GetVertexCount(); _local13 = _local11.GetVertices(); _local14 = new Array(b2Settings.b2_maxPolygonVertices); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local13[_local10]); _local10++; }; m_debugDraw.DrawSolidPolygon(_local14, _local12, _arg3); if (_arg4){ _local15 = _local11.GetCoreVertices(); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]); _local10++; }; m_debugDraw.DrawPolygon(_local14, _local12, _local5); }; break; }; } public function GetContactCount():int{ return (m_contactCount); } public function Solve(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Island; var _local4:b2Contact; var _local5:b2Joint; var _local6:int; var _local7:Array; var _local8:b2Body; var _local9:int; var _local10:int; var _local11:b2Body; var _local12:b2ContactEdge; var _local13:b2JointEdge; var _local14:Boolean; m_positionIterationCount = 0; _local3 = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator, m_contactListener); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2 = _local2.m_next; }; _local4 = m_contactList; while (_local4) { _local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag)); _local4 = _local4.m_next; }; _local5 = m_jointList; while (_local5) { _local5.m_islandFlag = false; _local5 = _local5.m_next; }; _local6 = m_bodyCount; _local7 = new Array(_local6); _local8 = m_bodyList; while (_local8) { if ((_local8.m_flags & ((b2Body.e_islandFlag | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){ } else { if (_local8.IsStatic()){ } else { _local3.Clear(); _local9 = 0; var _temp1 = _local9; _local9 = (_local9 + 1); var _local15 = _temp1; _local7[_local15] = _local8; _local8.m_flags = (_local8.m_flags | b2Body.e_islandFlag); while (_local9 > 0) { --_local9; _local2 = _local7[_local9]; _local3.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local12 = _local2.m_contactList; while (_local12) { if ((_local12.contact.m_flags & (b2Contact.e_islandFlag | b2Contact.e_nonSolidFlag))){ } else { if (_local12.contact.m_manifoldCount == 0){ } else { _local3.AddContact(_local12.contact); _local12.contact.m_flags = (_local12.contact.m_flags | b2Contact.e_islandFlag); _local11 = _local12.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp2 = _local9; _local9 = (_local9 + 1); var _local16 = _temp2; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; }; _local12 = _local12.next; }; _local13 = _local2.m_jointList; while (_local13) { if (_local13.joint.m_islandFlag == true){ } else { _local3.AddJoint(_local13.joint); _local13.joint.m_islandFlag = true; _local11 = _local13.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp3 = _local9; _local9 = (_local9 + 1); _local16 = _temp3; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; _local13 = _local13.next; }; }; }; _local3.Solve(_arg1, m_gravity, m_positionCorrection, m_allowSleep); if (_local3.m_positionIterationCount > m_positionIterationCount){ m_positionIterationCount = _local3.m_positionIterationCount; }; _local10 = 0; while (_local10 < _local3.m_bodyCount) { _local2 = _local3.m_bodies[_local10]; if (_local2.IsStatic()){ _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); }; _local10++; }; }; }; _local8 = _local8.m_next; }; _local2 = m_bodyList; while (_local2) { if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local14 = _local2.SynchronizeShapes(); if ((((_local14 == false)) && (!((m_boundaryListener == null))))){ m_boundaryListener.Violation(_local2); }; }; }; _local2 = _local2.m_next; }; m_broadPhase.Commit(); } public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{ var _local4:Array; var _local5:int; var _local6:int; _local4 = new Array(_arg3); _local5 = m_broadPhase.QueryAABB(_arg1, _local4, _arg3); _local6 = 0; while (_local6 < _local5) { _arg2[_local6] = _local4[_local6]; _local6++; }; return (_local5); } public function SetGravity(_arg1:b2Vec2):void{ m_gravity = _arg1; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactEdge; var _local8:b2Island; var _local9:int; var _local10:Array; var _local11:b2Contact; var _local12:b2Contact; var _local13:Number; var _local14:b2Body; var _local15:int; var _local16:b2TimeStep; var _local17:int; var _local18:Number; var _local19:Number; var _local20:b2Body; var _local21:Boolean; _local8 = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, 0, m_stackAllocator, m_contactListener); _local9 = m_bodyCount; _local10 = new Array(_local9); _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; }; while (true) { _local12 = null; _local13 = 1; _local11 = m_contactList; for (;_local11;(_local11 = _local11.m_next)) { if ((_local11.m_flags & (b2Contact.e_slowFlag | b2Contact.e_nonSolidFlag))){ } else { _local18 = 1; if ((_local11.m_flags & b2Contact.e_toiFlag)){ _local18 = _local11.m_toi; } else { _local3 = _local11.m_shape1; _local4 = _local11.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; if (((((_local5.IsStatic()) || (_local5.IsSleeping()))) && (((_local6.IsStatic()) || (_local6.IsSleeping()))))){ continue; }; _local19 = _local5.m_sweep.t0; if (_local5.m_sweep.t0 < _local6.m_sweep.t0){ _local19 = _local6.m_sweep.t0; _local5.m_sweep.Advance(_local19); } else { if (_local6.m_sweep.t0 < _local5.m_sweep.t0){ _local19 = _local5.m_sweep.t0; _local6.m_sweep.Advance(_local19); }; }; _local18 = b2TimeOfImpact.TimeOfImpact(_local11.m_shape1, _local5.m_sweep, _local11.m_shape2, _local6.m_sweep); if ((((_local18 > 0)) && ((_local18 < 1)))){ _local18 = (((1 - _local18) * _local19) + _local18); if (_local18 > 1){ _local18 = 1; }; }; _local11.m_toi = _local18; _local11.m_flags = (_local11.m_flags | b2Contact.e_toiFlag); }; if ((((Number.MIN_VALUE < _local18)) && ((_local18 < _local13)))){ _local12 = _local11; _local13 = _local18; }; }; }; if ((((_local12 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local13)))){ break; }; _local3 = _local12.m_shape1; _local4 = _local12.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local5.Advance(_local13); _local6.Advance(_local13); _local12.Update(m_contactListener); _local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag)); if (_local12.m_manifoldCount == 0){ } else { _local14 = _local5; if (_local14.IsStatic()){ _local14 = _local6; }; _local8.Clear(); _local15 = 0; var _temp1 = _local15; _local15 = (_local15 + 1); var _local22 = _temp1; _local10[_local22] = _local14; _local14.m_flags = (_local14.m_flags | b2Body.e_islandFlag); while (_local15 > 0) { --_local15; _local2 = _local10[_local15]; _local8.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local7 = _local2.m_contactList; while (_local7) { if (_local8.m_contactCount == _local8.m_contactCapacity){ } else { if ((_local7.contact.m_flags & ((b2Contact.e_islandFlag | b2Contact.e_slowFlag) | b2Contact.e_nonSolidFlag))){ } else { if (_local7.contact.m_manifoldCount == 0){ } else { _local8.AddContact(_local7.contact); _local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag); _local20 = _local7.other; if ((_local20.m_flags & b2Body.e_islandFlag)){ } else { if (_local20.IsStatic() == false){ _local20.Advance(_local13); _local20.WakeUp(); }; var _temp2 = _local15; _local15 = (_local15 + 1); var _local23 = _temp2; _local10[_local23] = _local20; _local20.m_flags = (_local20.m_flags | b2Body.e_islandFlag); }; }; }; }; _local7 = _local7.next; }; }; }; _local16 = new b2TimeStep(); _local16.dt = ((1 - _local13) * _arg1.dt); _local16.inv_dt = (1 / _local16.dt); _local16.maxIterations = _arg1.maxIterations; _local8.SolveTOI(_local16); _local17 = 0; while (_local17 < _local8.m_bodyCount) { _local2 = _local8.m_bodies[_local17]; _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local21 = _local2.SynchronizeShapes(); if ((((_local21 == false)) && (!((m_boundaryListener == null))))){ m_boundaryListener.Violation(_local2); }; _local7 = _local2.m_contactList; while (_local7) { _local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag)); _local7 = _local7.next; }; }; }; _local17++; }; _local17 = 0; while (_local17 < _local8.m_contactCount) { _local11 = _local8.m_contacts[_local17]; _local8.m_contacts[_local17].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local17++; }; m_broadPhase.Commit(); }; }; } public function GetJointList():b2Joint{ return (m_jointList); } public function Validate():void{ m_broadPhase.Validate(); } public function GetPairCount():int{ return (m_broadPhase.m_pairManager.m_pairCount); } public function GetBodyList():b2Body{ return (m_bodyList); } public function SetWarmStarting(_arg1:Boolean):void{ m_warmStarting = _arg1; } public function SetPositionCorrection(_arg1:Boolean):void{ m_positionCorrection = _arg1; } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local2:b2Joint; var _local3:b2Body; var _local4:b2Shape; _local2 = b2Joint.Create(_arg1, m_blockAllocator); _local2.m_prev = null; _local2.m_next = m_jointList; if (m_jointList){ m_jointList.m_prev = _local2; }; m_jointList = _local2; m_jointCount++; _local2.m_node1.joint = _local2; _local2.m_node1.other = _local2.m_body2; _local2.m_node1.prev = null; _local2.m_node1.next = _local2.m_body1.m_jointList; if (_local2.m_body1.m_jointList){ _local2.m_body1.m_jointList.prev = _local2.m_node1; }; _local2.m_body1.m_jointList = _local2.m_node1; _local2.m_node2.joint = _local2; _local2.m_node2.other = _local2.m_body1; _local2.m_node2.prev = null; _local2.m_node2.next = _local2.m_body2.m_jointList; if (_local2.m_body2.m_jointList){ _local2.m_body2.m_jointList.prev = _local2.m_node2; }; _local2.m_body2.m_jointList = _local2.m_node2; if (_arg1.collideConnected == false){ _local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2; _local4 = _local3.m_shapeList; while (_local4) { _local4.RefilterProxy(m_broadPhase, _local3.m_xf); _local4 = _local4.m_next; }; }; return (_local2); } public function DestroyJoint(_arg1:b2Joint):void{ var _local2:Boolean; var _local3:b2Body; var _local4:b2Body; var _local5:b2Body; var _local6:b2Shape; _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_body1; _local4 = _arg1.m_body2; _local3.WakeUp(); _local4.WakeUp(); if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local3.m_jointList){ _local3.m_jointList = _arg1.m_node1.next; }; _arg1.m_node1.prev = null; _arg1.m_node1.next = null; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local4.m_jointList){ _local4.m_jointList = _arg1.m_node2.next; }; _arg1.m_node2.prev = null; _arg1.m_node2.next = null; b2Joint.Destroy(_arg1, m_blockAllocator); m_jointCount--; if (_local2 == false){ _local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4; _local6 = _local5.m_shapeList; while (_local6) { _local6.RefilterProxy(m_broadPhase, _local5.m_xf); _local6 = _local6.m_next; }; }; } public function SetContactListener(_arg1:b2ContactListener):void{ m_contactListener = _arg1; } public function CreateBody(_arg1:b2BodyDef):b2Body{ var _local2:b2Body; if (m_lock == 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 SetBoundaryListener(_arg1:b2BoundaryListener):void{ m_boundaryListener = _arg1; } public function SetDestructionListener(_arg1:b2DestructionListener):void{ m_destructionListener = _arg1; } public function Step(_arg1:Number, _arg2:int):void{ var _local3:b2TimeStep; m_lock = true; _local3 = new b2TimeStep(); _local3.dt = _arg1; _local3.maxIterations = _arg2; if (_arg1 > 0){ _local3.inv_dt = (1 / _arg1); } else { _local3.inv_dt = 0; }; _local3.dtRatio = (m_inv_dt0 * _arg1); _local3.positionCorrection = m_positionCorrection; _local3.warmStarting = m_warmStarting; m_contactManager.Collide(); if (_local3.dt > 0){ Solve(_local3); }; if (((m_continuousPhysics) && ((_local3.dt > 0)))){ SolveTOI(_local3); }; DrawDebugData(); m_inv_dt0 = _local3.inv_dt; m_lock = false; } public function GetBodyCount():int{ return (m_bodyCount); } public function GetJointCount():int{ return (m_jointCount); } } }//package Box2D.Dynamics
Section 75
//ammoTypeSign_87 (Days2Die_fla.ammoTypeSign_87) package Days2Die_fla { import flash.display.*; public dynamic class ammoTypeSign_87 extends MovieClip { public function ammoTypeSign_87(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package Days2Die_fla
Section 76
//bloodSign_112 (Days2Die_fla.bloodSign_112) package Days2Die_fla { import flash.display.*; public dynamic class bloodSign_112 extends MovieClip { public var redBlood:MovieClip; } }//package Days2Die_fla
Section 77
//buldozerButton_276 (Days2Die_fla.buldozerButton_276) package Days2Die_fla { import flash.display.*; public dynamic class buldozerButton_276 extends MovieClip { public function buldozerButton_276(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package Days2Die_fla
Section 78
//buttonSound_124 (Days2Die_fla.buttonSound_124) package Days2Die_fla { import flash.display.*; public dynamic class buttonSound_124 extends MovieClip { public function buttonSound_124(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package Days2Die_fla
Section 79
//chooserBox_94 (Days2Die_fla.chooserBox_94) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class chooserBox_94 extends MovieClip { public var nextButton:SimpleButton; public var prevButton:SimpleButton; public var pageNumber:TextField; } }//package Days2Die_fla
Section 80
//chooserBoxcopy_275 (Days2Die_fla.chooserBoxcopy_275) package Days2Die_fla { import flash.display.*; public dynamic class chooserBoxcopy_275 extends MovieClip { public var nextButton:SimpleButton; public var prevButton:SimpleButton; } }//package Days2Die_fla
Section 81
//days2dieintro_13 (Days2Die_fla.days2dieintro_13) package Days2Die_fla { import flash.display.*; public dynamic class days2dieintro_13 extends MovieClip { public var endOfAnimation:Boolean; public function days2dieintro_13(){ addFrameScript(0, frame1, 418, frame419); } function frame1(){ endOfAnimation = false; } function frame419(){ endOfAnimation = true; stop(); } } }//package Days2Die_fla
Section 82
//equipBox_84 (Days2Die_fla.equipBox_84) package Days2Die_fla { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.ui.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.printing.*; import flash.xml.*; public dynamic class equipBox_84 extends MovieClip { public var ammo9mmText:TextField; public var ammo556:MovieClip; public var ammo9mm:MovieClip; public var ammo50calText:TextField; public var slotType0:TextField; public var ammoHEText:TextField; public var ammo12gaugeText:TextField; public var ammo50cal:MovieClip; public var ammo357Text:TextField; public var ammoHE:MovieClip; public var ammo556Text:TextField; public var explosiveWeapon:MovieClip; public var ammo357:MovieClip; public var ammo762Text:TextField; public var switchButton:SimpleButton; public var ammo762:MovieClip; public var meleeWeapon:MovieClip; public var ammo45Text:TextField; public var primaryWeapon:MovieClip; public var ammo45:MovieClip; public var secondaryWeapon:MovieClip; public var slotType1:TextField; public var slotType2:TextField; public var slotType3:TextField; public var ammo12gauge:MovieClip; public function equipBox_84(){ addFrameScript(0, frame1); } function frame1(){ ammo12gauge.gotoAndStop("ammo12gauge"); ammo357.gotoAndStop("ammo357"); ammo45.gotoAndStop("ammo45"); ammo9mm.gotoAndStop("ammo9mm"); ammo762.gotoAndStop("ammo762"); ammo556.gotoAndStop("ammo556"); ammo50cal.gotoAndStop("ammo50cal"); ammoHE.gotoAndStop("ammoHE"); primaryWeapon.num.text = "1"; secondaryWeapon.num.text = "2"; meleeWeapon.num.text = "3"; explosiveWeapon.num.text = "4"; slotType0.text = "PRIMARY"; slotType1.text = "SECONDARY"; slotType2.text = "MELEE"; slotType3.text = "EXPLOSIVE"; } } }//package Days2Die_fla
Section 83
//explanationBox_92 (Days2Die_fla.explanationBox_92) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class explanationBox_92 extends MovieClip { public var accLabel:TextField; public var priceText:TextField; public var priceLabel:TextField; public var damageText:TextField; public var accText:TextField; public var reloadText:TextField; public var ownedLabel:TextField; public var ammoType:MovieClip; public var ownedText:TextField; public var clipText:TextField; public var clipLabel:TextField; public var rpsText:TextField; public var weaponName:TextField; public var weaponPic:MovieClip; public var reloadLabel:TextField; } }//package Days2Die_fla
Section 84
//expSign_134 (Days2Die_fla.expSign_134) package Days2Die_fla { import flash.display.*; public dynamic class expSign_134 extends MovieClip { public var expBar:MovieClip; } }//package Days2Die_fla
Section 85
//gameOverMenu_145 (Days2Die_fla.gameOverMenu_145) package Days2Die_fla { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; public dynamic class gameOverMenu_145 extends MovieClip { public var retryButton:SimpleButton; public var sponsor:SimpleButton; public var submitButton:SimpleButton; public var scoreText:TextField; public function gameOverMenu_145(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package Days2Die_fla
Section 86
//gamePerkMenu_151 (Days2Die_fla.gamePerkMenu_151) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class gamePerkMenu_151 extends MovieClip { public var next:SimpleButton; public var info:TextField; } }//package Days2Die_fla
Section 87
//gameScoreMenu_144 (Days2Die_fla.gameScoreMenu_144) package Days2Die_fla { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; public dynamic class gameScoreMenu_144 extends MovieClip { public var nextButton:SimpleButton; public var sponsor:SimpleButton; public var killText:TextField; public var adSpace:MovieClip; public var advanceText:TextField; public var locationName:TextField; public var scoreText:TextField; public var dayText:TextField; public function gameScoreMenu_144(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package Days2Die_fla
Section 88
//hideButton_277 (Days2Die_fla.hideButton_277) package Days2Die_fla { import flash.display.*; public dynamic class hideButton_277 extends MovieClip { public function hideButton_277(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 89
//infoBarricade_271 (Days2Die_fla.infoBarricade_271) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class infoBarricade_271 extends MovieClip { public var durability:TextField; public var infoMenu:MovieClip; public var price:TextField; public function infoBarricade_271(){ addFrameScript(0, frame1, 11, frame12, 20, frame21); } function frame12(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } } }//package Days2Die_fla
Section 90
//infoBox_154 (Days2Die_fla.infoBox_154) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class infoBox_154 extends MovieClip { public var infoBox:TextField; } }//package Days2Die_fla
Section 91
//insideInfoBarricade_272 (Days2Die_fla.insideInfoBarricade_272) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class insideInfoBarricade_272 extends MovieClip { public var durability:TextField; public var price:TextField; } }//package Days2Die_fla
Section 92
//Ladder_341 (Days2Die_fla.Ladder_341) package Days2Die_fla { import flash.display.*; public dynamic class Ladder_341 extends MovieClip { public var center:MovieClip; } }//package Days2Die_fla
Section 93
//loadingText_405 (Days2Die_fla.loadingText_405) package Days2Die_fla { import flash.display.*; public dynamic class loadingText_405 extends MovieClip { public var playBtn:SimpleButton; public function loadingText_405(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); playBtn.visible = false; } function frame2(){ stop(); playBtn.visible = true; } } }//package Days2Die_fla
Section 94
//mainBody_104 (Days2Die_fla.mainBody_104) package Days2Die_fla { import flash.display.*; public dynamic class mainBody_104 extends MovieClip { public function mainBody_104(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6); } function frame3(){ stop(); } function frame6(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 95
//maincharBody_103 (Days2Die_fla.maincharBody_103) package Days2Die_fla { import flash.display.*; public dynamic class maincharBody_103 extends MovieClip { public var torso:MovieClip; public var animationDone:Boolean; public function maincharBody_103(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 64, frame65, 65, frame66, 84, frame85, 85, frame86, 108, frame109); } function frame65(){ animationDone = true; } function frame86(){ animationDone = false; } function frame85(){ animationDone = true; } function frame1(){ animationDone = false; } function frame109(){ animationDone = true; stop(); } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame66(){ animationDone = false; } } }//package Days2Die_fla
Section 96
//maincharHead_105 (Days2Die_fla.maincharHead_105) package Days2Die_fla { import flash.display.*; public dynamic class maincharHead_105 extends MovieClip { public var animationDone:Boolean; public var head:mainHead; public function maincharHead_105(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 64, frame65, 65, frame66, 84, frame85, 85, frame86, 108, frame109); } function frame65(){ animationDone = true; } function frame86(){ animationDone = false; head.eye.gotoAndStop(21); } function frame85(){ animationDone = true; } function frame1(){ animationDone = false; head.eye.play(); } function frame109(){ animationDone = true; stop(); } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame66(){ animationDone = false; } } }//package Days2Die_fla
Section 97
//maincharLegs_102 (Days2Die_fla.maincharLegs_102) package Days2Die_fla { import flash.display.*; public dynamic class maincharLegs_102 extends MovieClip { public var animationDone:Boolean; public function maincharLegs_102(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 64, frame65, 65, frame66, 84, frame85, 85, frame86, 108, frame109); } function frame65(){ animationDone = true; } function frame86(){ animationDone = false; } function frame85(){ animationDone = true; } function frame1(){ animationDone = false; } function frame109(){ animationDone = true; stop(); } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame66(){ animationDone = false; } } }//package Days2Die_fla
Section 98
//mapWorld_409 (Days2Die_fla.mapWorld_409) package Days2Die_fla { import flash.display.*; public dynamic class mapWorld_409 extends MovieClip { public var place0:MovieClip; public var place2:MovieClip; public var place4:MovieClip; public var place5:MovieClip; public var place1:MovieClip; public var place3:MovieClip; } }//package Days2Die_fla
Section 99
//meleeWeapon_85 (Days2Die_fla.meleeWeapon_85) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class meleeWeapon_85 extends MovieClip { public var num:TextField; } }//package Days2Die_fla
Section 100
//mercHireBox_304 (Days2Die_fla.mercHireBox_304) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class mercHireBox_304 extends MovieClip { public var mercPic:mainHead; public var salaryText:TextField; public var speedText:TextField; public var priceText:TextField; public var mercName:TextField; public var accText:TextField; public var healthText:TextField; public var weaponPic:MovieClip; } }//package Days2Die_fla
Section 101
//primWeapon_86 (Days2Die_fla.primWeapon_86) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class primWeapon_86 extends MovieClip { public var num:TextField; } }//package Days2Die_fla
Section 102
//ResultScreen_140 (Days2Die_fla.ResultScreen_140) package Days2Die_fla { import flash.display.*; public dynamic class ResultScreen_140 extends MovieClip { public var gameScoreMenu:MovieClip; public var backToMainMenuButton:SimpleButton; public var gameOverMenu:MovieClip; public function ResultScreen_140(){ addFrameScript(0, frame1, 1, frame2, 9, frame10); } function frame10(){ stop(); } function frame1(){ stop(); gameOverMenu.visible = true; backToMainMenuButton.visible = true; } function frame2(){ gameOverMenu.visible = false; backToMainMenuButton.visible = false; } } }//package Days2Die_fla
Section 103
//sc2ly2_201 (Days2Die_fla.sc2ly2_201) package Days2Die_fla { import flash.display.*; public dynamic class sc2ly2_201 extends MovieClip { public function sc2ly2_201(){ addFrameScript(39, frame40); } function frame40(){ stop(); } } }//package Days2Die_fla
Section 104
//sc2ly4_204 (Days2Die_fla.sc2ly4_204) package Days2Die_fla { import flash.display.*; public dynamic class sc2ly4_204 extends MovieClip { public function sc2ly4_204(){ addFrameScript(39, frame40); } function frame40(){ stop(); } } }//package Days2Die_fla
Section 105
//sc2ly5_207 (Days2Die_fla.sc2ly5_207) package Days2Die_fla { import flash.display.*; public dynamic class sc2ly5_207 extends MovieClip { public function sc2ly5_207(){ addFrameScript(44, frame45); } function frame45(){ stop(); } } }//package Days2Die_fla
Section 106
//sc3ly3_214 (Days2Die_fla.sc3ly3_214) package Days2Die_fla { import flash.display.*; public dynamic class sc3ly3_214 extends MovieClip { public function sc3ly3_214(){ addFrameScript(39, frame40); } function frame40(){ stop(); } } }//package Days2Die_fla
Section 107
//sc3ly4_213 (Days2Die_fla.sc3ly4_213) package Days2Die_fla { import flash.display.*; public dynamic class sc3ly4_213 extends MovieClip { public function sc3ly4_213(){ addFrameScript(39, frame40); } function frame40(){ stop(); } } }//package Days2Die_fla
Section 108
//shopWarning_307 (Days2Die_fla.shopWarning_307) package Days2Die_fla { import flash.display.*; import flash.text.*; public dynamic class shopWarning_307 extends MovieClip { public var message:TextField; public var closeButton:SimpleButton; } }//package Days2Die_fla
Section 109
//signAd_120 (Days2Die_fla.signAd_120) package Days2Die_fla { import flash.display.*; public dynamic class signAd_120 extends MovieClip { public var adSpace:MovieClip; } }//package Days2Die_fla
Section 110
//signBaloon_114 (Days2Die_fla.signBaloon_114) package Days2Die_fla { import flash.display.*; public dynamic class signBaloon_114 extends MovieClip { public function signBaloon_114(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package Days2Die_fla
Section 111
//signBullets_139 (Days2Die_fla.signBullets_139) package Days2Die_fla { import flash.display.*; public dynamic class signBullets_139 extends MovieClip { public var ammoType:MovieClip; public function signBullets_139(){ 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); } function frame10(){ stop(); ammoType.gotoAndStop("ammo762"); } function frame14(){ stop(); ammoType.gotoAndStop("ammoHE"); } function frame18(){ stop(); ammoType.gotoAndStop("other"); } function frame12(){ stop(); ammoType.gotoAndStop("ammo762"); } function frame3(){ stop(); ammoType.gotoAndStop("ammo9mm"); } function frame6(){ stop(); ammoType.gotoAndStop("ammo9mm"); } function frame7(){ stop(); ammoType.gotoAndStop("ammo9mm"); } function frame1(){ ammoType.gotoAndStop("ammo12gauge"); } function frame19(){ stop(); ammoType.gotoAndStop("other"); } function frame13(){ stop(); ammoType.gotoAndStop("ammo50cal"); } function frame17(){ stop(); ammoType.gotoAndStop("other"); } function frame4(){ stop(); ammoType.gotoAndStop("ammo9mm"); } function frame5(){ stop(); ammoType.gotoAndStop("ammo357"); } function frame9(){ stop(); ammoType.gotoAndStop("ammo9mm"); } function frame16(){ stop(); ammoType.gotoAndStop("other"); } function frame8(){ stop(); ammoType.gotoAndStop("ammo45"); } function frame21(){ stop(); ammoType.gotoAndStop("other"); } function frame2(){ stop(); ammoType.gotoAndStop("ammo45"); } function frame15(){ stop(); ammoType.gotoAndStop("ammo762"); } function frame20(){ stop(); ammoType.gotoAndStop("other"); } function frame11(){ stop(); ammoType.gotoAndStop("ammo556"); } } }//package Days2Die_fla
Section 112
//upperBar_155 (Days2Die_fla.upperBar_155) package Days2Die_fla { import flash.display.*; public dynamic class upperBar_155 extends MovieClip { public var pauseButton:SimpleButton; } }//package Days2Die_fla
Section 113
//weaponOptions_93 (Days2Die_fla.weaponOptions_93) package Days2Die_fla { import flash.display.*; public dynamic class weaponOptions_93 extends MovieClip { public var holder0:MovieClip; public var holder1:MovieClip; public var holder2:MovieClip; public var holder5:MovieClip; public var holder3:MovieClip; public var holder4:MovieClip; } }//package Days2Die_fla
Section 114
//weaponShop_298 (Days2Die_fla.weaponShop_298) package Days2Die_fla { import flash.display.*; public dynamic class weaponShop_298 extends MovieClip { public var holder0:MovieClip; public var holder1:MovieClip; public var holder2:MovieClip; public var holder5:MovieClip; public var holder7:MovieClip; public var holder9:MovieClip; public var holder3:MovieClip; public var holder4:MovieClip; public var holder6:MovieClip; public var holder8:MovieClip; } }//package Days2Die_fla
Section 115
//zombieBodies_179 (Days2Die_fla.zombieBodies_179) package Days2Die_fla { import flash.display.*; public dynamic class zombieBodies_179 extends MovieClip { public function zombieBodies_179(){ 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 Days2Die_fla
Section 116
//zombieBody02_180 (Days2Die_fla.zombieBody02_180) package Days2Die_fla { import flash.display.*; public dynamic class zombieBody02_180 extends MovieClip { public function zombieBody02_180(){ addFrameScript(0, frame1, 7, frame8, 13, frame14, 20, frame21); } function frame14(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame8(){ stop(); } } }//package Days2Die_fla
Section 117
//zombieBody03_181 (Days2Die_fla.zombieBody03_181) package Days2Die_fla { import flash.display.*; public dynamic class zombieBody03_181 extends MovieClip { public function zombieBody03_181(){ addFrameScript(0, frame1, 7, frame8, 13, frame14, 20, frame21); } function frame14(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame8(){ stop(); } } }//package Days2Die_fla
Section 118
//zombieBody04_182 (Days2Die_fla.zombieBody04_182) package Days2Die_fla { import flash.display.*; public dynamic class zombieBody04_182 extends MovieClip { public function zombieBody04_182(){ addFrameScript(0, frame1, 7, frame8, 13, frame14, 20, frame21); } function frame14(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame8(){ stop(); } } }//package Days2Die_fla
Section 119
//zombieBody05_183 (Days2Die_fla.zombieBody05_183) package Days2Die_fla { import flash.display.*; public dynamic class zombieBody05_183 extends MovieClip { public function zombieBody05_183(){ addFrameScript(0, frame1, 7, frame8, 13, frame14, 20, frame21); } function frame14(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame8(){ stop(); } } }//package Days2Die_fla
Section 120
//zombieBody06_184 (Days2Die_fla.zombieBody06_184) package Days2Die_fla { import flash.display.*; public dynamic class zombieBody06_184 extends MovieClip { public function zombieBody06_184(){ addFrameScript(0, frame1, 7, frame8, 13, frame14, 20, frame21); } function frame14(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame8(){ stop(); } } }//package Days2Die_fla
Section 121
//zombieHead01_175 (Days2Die_fla.zombieHead01_175) package Days2Die_fla { import flash.display.*; public dynamic class zombieHead01_175 extends MovieClip { public function zombieHead01_175(){ addFrameScript(0, frame1, 1, frame2, 6, frame7, 11, frame12, 12, frame13); } function frame12(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame13(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 122
//zombieHead02_187 (Days2Die_fla.zombieHead02_187) package Days2Die_fla { import flash.display.*; public dynamic class zombieHead02_187 extends MovieClip { public function zombieHead02_187(){ addFrameScript(0, frame1, 1, frame2, 6, frame7, 11, frame12, 12, frame13); } function frame12(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame13(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 123
//zombieHead03_188 (Days2Die_fla.zombieHead03_188) package Days2Die_fla { import flash.display.*; public dynamic class zombieHead03_188 extends MovieClip { public function zombieHead03_188(){ addFrameScript(0, frame1, 1, frame2, 6, frame7, 11, frame12, 12, frame13); } function frame12(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame13(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 124
//zombieHead04_189 (Days2Die_fla.zombieHead04_189) package Days2Die_fla { import flash.display.*; public dynamic class zombieHead04_189 extends MovieClip { public function zombieHead04_189(){ addFrameScript(0, frame1, 1, frame2, 6, frame7, 11, frame12, 12, frame13); } function frame12(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame13(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 125
//zombieHead05_190 (Days2Die_fla.zombieHead05_190) package Days2Die_fla { import flash.display.*; public dynamic class zombieHead05_190 extends MovieClip { public function zombieHead05_190(){ addFrameScript(0, frame1, 1, frame2, 6, frame7, 11, frame12, 12, frame13); } function frame12(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame13(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 126
//zombieHead06_191 (Days2Die_fla.zombieHead06_191) package Days2Die_fla { import flash.display.*; public dynamic class zombieHead06_191 extends MovieClip { public function zombieHead06_191(){ addFrameScript(0, frame1, 1, frame2, 6, frame7, 11, frame12, 12, frame13); } function frame12(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame13(){ stop(); } function frame2(){ stop(); } } }//package Days2Die_fla
Section 127
//zombieHeads_186 (Days2Die_fla.zombieHeads_186) package Days2Die_fla { import flash.display.*; public dynamic class zombieHeads_186 extends MovieClip { public var head:MovieClip; public function zombieHeads_186(){ 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 Days2Die_fla
Section 128
//zombieLegs01_177 (Days2Die_fla.zombieLegs01_177) package Days2Die_fla { import flash.display.*; public dynamic class zombieLegs01_177 extends MovieClip { public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieLegs01_177(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package Days2Die_fla
Section 129
//zombieMainBody_178 (Days2Die_fla.zombieMainBody_178) package Days2Die_fla { import flash.display.*; public dynamic class zombieMainBody_178 extends MovieClip { public var torso:MovieClip; public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieMainBody_178(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package Days2Die_fla
Section 130
//zombieMainHead_185 (Days2Die_fla.zombieMainHead_185) package Days2Die_fla { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.ui.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.printing.*; import flash.xml.*; public dynamic class zombieMainHead_185 extends MovieClip { public var animationDone:Boolean; public var attackingDone:Boolean; public var head:MovieClip; public function zombieMainHead_185(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; head.head.gotoAndStop("attack"); } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; head.head.gotoAndStop("idle"); } function frame25(){ animationDone = false; head.head.gotoAndStop("attack"); } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame58(){ animationDone = false; head.head.gotoAndStop("attack"); } function frame57(){ animationDone = true; } } }//package Days2Die_fla
Section 131
//KeyPoll (input.KeyPoll) package input { import flash.events.*; import flash.display.*; import flash.utils.*; public class KeyPoll { private var states:ByteArray; private var dispObj:DisplayObject; public function KeyPoll(_arg1:DisplayObject){ states = new ByteArray(); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); dispObj = _arg1; dispObj.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true); dispObj.addEventListener(KeyboardEvent.KEY_UP, keyUpListener, false, 1, true); dispObj.addEventListener(Event.ACTIVATE, activateListener, false, 0, true); dispObj.addEventListener(Event.DEACTIVATE, deactivateListener, false, 0, true); } public function isUp(_arg1:uint):Boolean{ return (((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0)); } private function activateListener(_arg1:Event):void{ var _local2:int; _local2 = 0; while (_local2 < 32) { states[_local2] = 0; _local2++; }; } private function deactivateListener(_arg1:Event=null):void{ var _local2:int; _local2 = 0; while (_local2 < 32) { states[_local2] = 0; _local2++; }; } public function isDown(_arg1:uint):Boolean{ return (!(((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0))); } public function destroy():void{ if (dispObj){ dispObj.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownListener); dispObj.removeEventListener(KeyboardEvent.KEY_UP, keyUpListener); dispObj.removeEventListener(Event.ACTIVATE, activateListener); dispObj.removeEventListener(Event.DEACTIVATE, deactivateListener); }; } private function keyDownListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] | (1 << (_arg1.keyCode & 7))); } private function keyUpListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] & ~((1 << (_arg1.keyCode & 7)))); } } }//package input
Section 132
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("3.0 as3"); } public static function showClickAwayAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_timeout:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var sendHostProgress:Boolean; var options = _arg1; DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_timeout = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; sendHostProgress = false; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (_local2); }; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var idx:Number; var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; idx = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; //unresolved jump }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ }); loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array; var _local4:Number; _local3 = _arg2.split("."); _local4 = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; MochiAd._cleanup(mc); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 133
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function set value(_arg1:Number):void{ setValue(_arg1); } public function reencode():void{ var _local1:uint; _local1 = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function toString():String{ var _local1:String; _local1 = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function get value():Number{ return (Number(this.toString())); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String; _local3 = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 134
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ } else { if (Math.floor(n) != n){ }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); //unresolved jump }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); //unresolved jump }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); //unresolved jump }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; _local2 = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ } else { if (Math.floor(_arg1) != _arg1){ }; _arg1 = Number(_arg1); }; }; MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 135
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__ms_"; private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; public static var netup:Boolean = true; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local3:Array; var _local4:int; var _local5:Array; var _local6:Array; var _local7:MovieClip; var _local8:LocalConnection; var _local9:String; var _local10:ByteArray; var _local11:ByteArray; var _local12:uint; var _local13:uint; var _local14:Loader; _local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; _local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; _local6 = [0, 64, 0, 0, 0]; _local7 = new MovieClip(); _local8 = new LocalConnection(); _local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime())); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); _local10 = new ByteArray(); _local11 = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); _local12 = ((_local3.length + _local11.length) + 4); _local13 = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var vars:Object; var avm1Click:DisplayObject; var s:String; var i:Number; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; vars = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); s = "?"; i = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ var _local2:Rectangle; if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); _local2 = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.0"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } public static function get id():String{ return (_id); } private static function urlOptions(_arg1:Object):Object{ var _local2:Object; var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; _local2 = {}; _local3 = _arg1.loaderInfo.parameters.mochiad_options; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var methodName:String; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = this.client._callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; methodName = ""; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; //unresolved jump }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; _connecting = false; _connected = true; while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var clipname:String; var f:Function; var req:URLRequest; var vars:URLVariables; var id = _arg1; var clip = _arg2; clipname = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servicesURL != undefined){ _servicesURL = urlOptions(clip).servicesURL; }; MochiServices.allowDomains(_servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); f = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; MochiServices.disconnect(); MochiServices.onError("IOError"); }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999)))); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); req = new URLRequest(_servicesURL); vars = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; if (widget){ vars.widget = true; }; req.data = vars; listen(); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ _connecting = true; init(id, clip); }; //unresolved jump }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var mc:MovieClip; var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; mc = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 136
//ConcurrentModificationException (org.idmedia.as3commons.lang.ConcurrentModificationException) package org.idmedia.as3commons.lang { public class ConcurrentModificationException extends Exception { public function ConcurrentModificationException(_arg1:String=""){ super(_arg1); } } }//package org.idmedia.as3commons.lang
Section 137
//Exception (org.idmedia.as3commons.lang.Exception) package org.idmedia.as3commons.lang { public class Exception extends Throwable { public function Exception(_arg1:String){ super(_arg1); } } }//package org.idmedia.as3commons.lang
Section 138
//IllegalStateException (org.idmedia.as3commons.lang.IllegalStateException) package org.idmedia.as3commons.lang { public class IllegalStateException extends Exception { public function IllegalStateException(_arg1:String=""){ super(_arg1); } } }//package org.idmedia.as3commons.lang
Section 139
//IndexOutOfBoundsException (org.idmedia.as3commons.lang.IndexOutOfBoundsException) package org.idmedia.as3commons.lang { public class IndexOutOfBoundsException extends Exception { public function IndexOutOfBoundsException(_arg1:String=""){ super(_arg1); } } }//package org.idmedia.as3commons.lang
Section 140
//NoSuchElementException (org.idmedia.as3commons.lang.NoSuchElementException) package org.idmedia.as3commons.lang { public class NoSuchElementException extends Exception { public function NoSuchElementException(_arg1:String=""){ super(_arg1); } } }//package org.idmedia.as3commons.lang
Section 141
//NullPointerException (org.idmedia.as3commons.lang.NullPointerException) package org.idmedia.as3commons.lang { public class NullPointerException extends Exception { public function NullPointerException(_arg1:String=""){ super(_arg1); } } }//package org.idmedia.as3commons.lang
Section 142
//Throwable (org.idmedia.as3commons.lang.Throwable) package org.idmedia.as3commons.lang { import flash.utils.*; public class Throwable extends Error { public function Throwable(_arg1:String){ super(_arg1); } public function getName():String{ return (getQualifiedClassName(this)); } public function getMessage():String{ return (message); } } }//package org.idmedia.as3commons.lang
Section 143
//UnsupportedOperationException (org.idmedia.as3commons.lang.UnsupportedOperationException) package org.idmedia.as3commons.lang { public class UnsupportedOperationException extends Exception { public function UnsupportedOperationException(_arg1:String=""){ super(_arg1); } } }//package org.idmedia.as3commons.lang
Section 144
//AbstractCollection (org.idmedia.as3commons.util.AbstractCollection) package org.idmedia.as3commons.util { import org.idmedia.as3commons.lang.*; public class AbstractCollection implements Collection { public function addAll(_arg1:Collection):Boolean{ var _local2:Boolean; var _local3:Iterator; _local2 = false; _local3 = _arg1.iterator(); while (_local3.hasNext()) { if (add(_local3.next())){ _local2 = true; }; }; return (_local2); } public function containsAll(_arg1:Collection):Boolean{ var _local2:Iterator; _local2 = _arg1.iterator(); while (_local2.hasNext()) { if (!contains(_local2.next())){ return (false); }; }; return (true); } public function isEmpty():Boolean{ return ((size() == 0)); } public function remove(_arg1=null):Boolean{ var _local2:Iterator; _local2 = iterator(); while (_local2.hasNext()) { if (_local2.next() == _arg1){ _local2.remove(); return (true); }; }; return (false); } public function size():int{ return (0); } public function clear():void{ var _local1:Iterator; _local1 = iterator(); while (_local1.hasNext()) { _local1.next(); _local1.remove(); }; } public function add(_arg1):Boolean{ throw (new UnsupportedOperationException()); } public function toArray():Array{ var _local1:Array; var _local2:Iterator; _local1 = new Array(); _local2 = iterator(); while (_local2.hasNext()) { _local1.push(_local2.next()); }; return (_local1); } public function contains(_arg1):Boolean{ return ((toArray().indexOf(_arg1) > -1)); } public function iterator():Iterator{ return (null); } public function equals(_arg1):Boolean{ return ((_arg1 === this)); } } }//package org.idmedia.as3commons.util
Section 145
//AbstractList (org.idmedia.as3commons.util.AbstractList) package org.idmedia.as3commons.util { import org.idmedia.as3commons.lang.*; public class AbstractList extends AbstractCollection implements List { private var modCount:int;// = 0 public function AbstractList(){ modCount = 0; super(); } override public function addAll(_arg1:Collection):Boolean{ throw (new UnsupportedOperationException()); } override public function clear():void{ removeRange(0, size()); } public function get(_arg1:int){ return (null); } public function indexOf(_arg1=null):int{ return (toArray().indexOf(_arg1)); } private function removeRange(_arg1:int, _arg2:int):void{ var _local3:ListIterator; var _local4:int; var _local5:int; _local3 = indexedListIterator(_arg1); _local4 = 0; _local5 = (_arg2 - _arg1); while (_local4 < _local5) { _local3.next(); _local3.remove(); _local4++; }; } override public function add(_arg1):Boolean{ return (addAt(size(), _arg1)); } public function removeAtTo(_arg1:int, _arg2:int):Boolean{ throw (new UnsupportedOperationException()); } public function listIterator():ListIterator{ return (new ListIteratorImpl(this)); } override public function iterator():Iterator{ return (new ListIteratorImpl(this)); } public function removeAt(_arg1:int):Boolean{ throw (new UnsupportedOperationException()); } public function removeAtAndReturn(_arg1:int){ throw (new UnsupportedOperationException()); } public function addAt(_arg1:int, _arg2):Boolean{ throw (new UnsupportedOperationException()); } public function setAt(_arg1:int, _arg2):Boolean{ throw (new UnsupportedOperationException()); } public function indexedListIterator(_arg1:uint):ListIterator{ var _local2:ListIterator; if ((((_arg1 < 0)) || ((_arg1 > size())))){ throw (new IndexOutOfBoundsException(("Index: " + _arg1))); }; _local2 = listIterator(); _local2.setIndex(_arg1); return (_local2); } } }//package org.idmedia.as3commons.util import org.idmedia.as3commons.lang.*; class ListIteratorImpl extends IteratorImpl implements ListIterator { private function ListIteratorImpl(_arg1:List){ super(_arg1); } public function setIndex(_arg1:int):void{ if ((((_arg1 < 0)) || ((_arg1 >= list.size())))){ throw (new IndexOutOfBoundsException(("Index: " + _arg1))); }; cursor = _arg1; } public function add(_arg1):void{ var object = _arg1; try { list.addAt(cursor++, object); lastRet = -1; } catch(e:IndexOutOfBoundsException) { throw (new ConcurrentModificationException()); }; } public function previousIndex():int{ return ((cursor - 1)); } public function nextIndex():int{ return (cursor); } public function setValue(_arg1):void{ var object = _arg1; if (lastRet == -1){ throw (new IllegalStateException()); }; try { list.setAt(lastRet, object); } catch(e:IndexOutOfBoundsException) { throw (new ConcurrentModificationException()); }; } public function hasPrevious():Boolean{ return (!((cursor == 0))); } public function previous(){ var i:int; var previousValue:*; try { i = (cursor - 1); previousValue = list.get(i); lastRet = (cursor = i); return (previousValue); } catch(e:IndexOutOfBoundsException) { throw (new NoSuchElementException()); }; } } class IteratorImpl implements Iterator { protected var lastRet:int;// = -1 protected var cursor:int;// = 0 protected var list:List; private function IteratorImpl(_arg1:List){ cursor = 0; lastRet = -1; super(); this.list = _arg1; } public function next(){ var nextValue:*; try { nextValue = list.get(cursor); lastRet = cursor; cursor++; return (nextValue); } catch(e:IndexOutOfBoundsException) { throw (new NoSuchElementException()); }; } public function remove():void{ if (lastRet == -1){ throw (new IllegalStateException()); }; try { list.removeAt(lastRet); if (lastRet < cursor){ cursor--; }; lastRet = -1; } catch(e:IndexOutOfBoundsException) { throw (new ConcurrentModificationException(e.getMessage())); }; } public function hasNext():Boolean{ return ((cursor < list.size())); } }
Section 146
//ArrayList (org.idmedia.as3commons.util.ArrayList) package org.idmedia.as3commons.util { import org.idmedia.as3commons.lang.*; public class ArrayList extends AbstractList implements List { private var elementData:Array; private var elementSize:int; public function ArrayList(_arg1:Collection=null){ elementData = new Array(); elementSize = 0; if (_arg1 != null){ elementData = elementData.concat(_arg1.toArray()); elementSize = elementData.length; }; } override public function addAll(_arg1:Collection):Boolean{ var _local2:Array; var _local3:int; if (_arg1 == null){ throw (new NullPointerException()); }; _local2 = _arg1.toArray(); _local3 = (elementSize + _local2.length); elementData = elementData.concat(_local2); elementSize = elementData.length; return ((elementSize === _local3)); } override public function isEmpty():Boolean{ return ((elementSize == 0)); } override public function size():int{ return (((elementSize) || (0))); } override public function clear():void{ elementData = new Array(); elementSize = 0; } private function rangeCheck(_arg1:int):void{ if ((((_arg1 >= elementSize)) || ((_arg1 < 0)))){ throw (new IndexOutOfBoundsException((((("Index: " + _arg1) + ", ") + "Size: ") + elementSize))); }; } public function removeAtToAndReturn(_arg1:int, _arg2:int){ var _local3:*; rangeCheck(_arg1); _local3 = get(_arg1); removeAtTo(_arg1, _arg2); return (_local3); } override public function get(_arg1:int){ rangeCheck(_arg1); return (elementData[_arg1]); } override public function toArray():Array{ return ([].concat(elementData)); } override public function add(_arg1):Boolean{ var _local2 = elementSize++; elementData[_local2] = _arg1; return (true); } override public function removeAtAndReturn(_arg1:int){ return (removeAtToAndReturn(_arg1, 1)); } override public function removeAt(_arg1:int):Boolean{ return (removeAtTo(_arg1, 1)); } override public function removeAtTo(_arg1:int, _arg2:int):Boolean{ rangeCheck(_arg1); elementData.splice(_arg1, _arg2); elementSize = elementData.length; return (true); } override public function addAt(_arg1:int, _arg2):Boolean{ var _local3:Array; var _local4:Array; rangeCheck(_arg1); _local3 = elementData.slice(0, _arg1); _local4 = elementData.slice(_arg1); elementData = _local3.concat(_arg2).concat(_local4); elementSize = elementData.length; return (true); } override public function setAt(_arg1:int, _arg2):Boolean{ rangeCheck(_arg1); elementData[_arg1] = _arg2; return (true); } } }//package org.idmedia.as3commons.util
Section 147
//Collection (org.idmedia.as3commons.util.Collection) package org.idmedia.as3commons.util { public interface Collection { function addAll(_arg1:Collection):Boolean; function add(_arg1):Boolean; function containsAll(_arg1:Collection):Boolean; function isEmpty():Boolean; function remove(_arg1=null):Boolean; function clear():void; function iterator():Iterator; function size():int; function toArray():Array; function contains(_arg1):Boolean; } }//package org.idmedia.as3commons.util
Section 148
//Iterator (org.idmedia.as3commons.util.Iterator) package org.idmedia.as3commons.util { public interface Iterator { function next(); function remove():void; function hasNext():Boolean; } }//package org.idmedia.as3commons.util
Section 149
//List (org.idmedia.as3commons.util.List) package org.idmedia.as3commons.util { public interface List extends Collection { function indexOf(_arg1=null):int; function listIterator():ListIterator; function removeAtAndReturn(_arg1:int); function addAt(_arg1:int, _arg2):Boolean; function setAt(_arg1:int, _arg2):Boolean; function get(_arg1:int); function removeAt(_arg1:int):Boolean; function removeAtTo(_arg1:int, _arg2:int):Boolean; function indexedListIterator(_arg1:uint):ListIterator; } }//package org.idmedia.as3commons.util
Section 150
//ListIterator (org.idmedia.as3commons.util.ListIterator) package org.idmedia.as3commons.util { public interface ListIterator extends Iterator { function add(_arg1):void; function setValue(_arg1):void; function setIndex(_arg1:int):void; function hasPrevious():Boolean; function previous(); function previousIndex():int; function nextIndex():int; } }//package org.idmedia.as3commons.util
Section 151
//Ammo (p_ammo.Ammo) package p_ammo { public class Ammo { public var amount:int; public var id:String; public function Ammo(_arg1:int){ this.amount = _arg1; } } }//package p_ammo
Section 152
//Ammo12Gauge (p_ammo.Ammo12Gauge) package p_ammo { public class Ammo12Gauge extends Ammo { public function Ammo12Gauge(_arg1:int){ super(_arg1); id = AmmoType.AMMO_12_GAUGE; } } }//package p_ammo
Section 153
//Ammo357 (p_ammo.Ammo357) package p_ammo { public class Ammo357 extends Ammo { public function Ammo357(_arg1:int){ super(_arg1); id = AmmoType.AMMO_357; } } }//package p_ammo
Section 154
//Ammo45 (p_ammo.Ammo45) package p_ammo { public class Ammo45 extends Ammo { public function Ammo45(_arg1:int){ super(_arg1); id = AmmoType.AMMO_45; } } }//package p_ammo
Section 155
//Ammo50Cal (p_ammo.Ammo50Cal) package p_ammo { public class Ammo50Cal extends Ammo { public function Ammo50Cal(_arg1:int){ super(_arg1); id = AmmoType.AMMO_50CAL; } } }//package p_ammo
Section 156
//Ammo556 (p_ammo.Ammo556) package p_ammo { public class Ammo556 extends Ammo { public function Ammo556(_arg1:int){ super(_arg1); id = AmmoType.AMMO_556; } } }//package p_ammo
Section 157
//Ammo762 (p_ammo.Ammo762) package p_ammo { public class Ammo762 extends Ammo { public function Ammo762(_arg1:int){ super(_arg1); id = AmmoType.AMMO_762; } } }//package p_ammo
Section 158
//Ammo9mm (p_ammo.Ammo9mm) package p_ammo { public class Ammo9mm extends Ammo { public function Ammo9mm(_arg1:int){ super(_arg1); id = AmmoType.AMMO_9MM; } } }//package p_ammo
Section 159
//AmmoHE (p_ammo.AmmoHE) package p_ammo { public class AmmoHE extends Ammo { public function AmmoHE(_arg1:int){ super(_arg1); id = AmmoType.AMMO_HE; } } }//package p_ammo
Section 160
//AmmoType (p_ammo.AmmoType) package p_ammo { public class AmmoType { public static var AMMO_762:String = "7.62"; public static var AMMO_556:String = "5.56"; public static var AMMO_9MM:String = "9mm"; public static var AMMO_357:String = ".357"; public static var AMMO_12_GAUGE:String = "12 Gauge"; public static var AMMO_HE:String = "HE"; public static var AMMO_50CAL:String = ".50cal"; public static var AMMO_45:String = ".45"; } }//package p_ammo
Section 161
//Barricade (p_barricade.Barricade) package p_barricade { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.display.*; import flash.utils.*; public class Barricade extends MovieClip { public var friction:Number; public var bodyType:int; public var active:Boolean; public var bodyDef:b2BodyDef; public var position:b2Vec2; public var deathTimer:Timer; public var health:Number; public var polygonDef:b2PolygonDef; public var deathTime:int; public var direction:b2Vec2; public var restitution:Number; public var body:b2Body; public var localPrice:int; public var screenPosition:b2Vec2; public var angle:Number; public var maxHealth:Number; public var density:Number; public static var price:int = 200; public function Barricade(){ angle = 0; density = 1; friction = 0.5; restitution = 0; bodyType = BodyType.BARRICADE; health = 20; position = new b2Vec2(); screenPosition = new b2Vec2(); deathTime = 1; active = true; } public function destroy():void{ if (body){ World.getSingleton().physicWorld.DestroyBody(body); body = null; deathTimer.start(); }; if (World.getSingleton().barricades.contains(this)){ World.getSingleton().barricades.remove(this); }; } public function animateDeath(_arg1:TimerEvent):void{ if (deathTime <= 0){ deathTimer.stop(); deathTimer.removeEventListener(TimerEvent.TIMER, animateDeath); if (this.parent){ if (this.parent.contains(this)){ this.parent.removeChild(this); World.getSingleton().setFocusToStage(); }; }; } else { deathTime--; }; } public function initTimer():void{ deathTimer = new Timer(100); deathTimer.addEventListener(TimerEvent.TIMER, animateDeath); } public function initRigidBody():void{ var _local1:b2World; var _local2:Number; _local1 = World.getSingleton().physicWorld; if (_local1){ _local2 = rotation; rotation = 0; polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((this.width / (2 * 30)), (this.height / (2 * 30))); polygonDef.filter.groupIndex = BodyType.PLAYER; rotation = _local2; polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; bodyDef = new b2BodyDef(); bodyDef.userData = this; bodyDef.position.Set((x / World.physScale), (y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(rotation); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; }; } public function calculateDamage():void{ if (body.gotShot){ body.gotShot = false; body.m_linearDamping = 0; body.ApplyImpulse(body.impulseApplied, body.pointCollision); health = (health - body.damage); }; if (health <= 0){ destroy(); } else { if (health <= (maxHealth * 0.25)){ gotoAndStop(4); } else { if (health <= (maxHealth * 0.5)){ gotoAndStop(3); } else { if (health <= (maxHealth * 0.75)){ gotoAndStop(2); } else { if (health <= maxHealth){ gotoAndStop(1); }; }; }; }; }; } public function update():void{ this.x = position.x; this.y = position.y; this.rotation = angle; calculateDamage(); } } }//package p_barricade
Section 162
//TestBox (p_barricade.TestBox) package p_barricade { public class TestBox extends Barricade { } }//package p_barricade
Section 163
//TestTriangle (p_barricade.TestTriangle) package p_barricade { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import p_singleton.*; public class TestTriangle extends Barricade { override public function initRigidBody():void{ var _local1:b2World; var _local2:Number; _local1 = World.getSingleton().physicWorld; if (_local1){ _local2 = rotation; rotation = 0; polygonDef = new b2PolygonDef(); polygonDef.vertexCount = 3; polygonDef.vertices[0] = new b2Vec2((width / (2 * 30)), (height / (2 * 30))); polygonDef.vertices[1] = new b2Vec2((-(width) / (2 * 30)), (height / (2 * 30))); polygonDef.vertices[2] = new b2Vec2((-(width) / (2 * 30)), (-(height) / (2 * 30))); rotation = _local2; polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = this; bodyDef.position.Set((x / World.physScale), (y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(rotation); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; }; } } }//package p_barricade
Section 164
//TestTriangle2 (p_barricade.TestTriangle2) package p_barricade { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import p_singleton.*; public class TestTriangle2 extends Barricade { override public function initRigidBody():void{ var _local1:b2World; var _local2:Number; _local1 = World.getSingleton().physicWorld; if (_local1){ _local2 = rotation; rotation = 0; polygonDef = new b2PolygonDef(); polygonDef.vertexCount = 3; polygonDef.vertices[0] = new b2Vec2((width / (2 * 30)), (height / (2 * 30))); polygonDef.vertices[1] = new b2Vec2((-(width) / (2 * 30)), (height / (2 * 30))); polygonDef.vertices[2] = new b2Vec2(0, (-(height) / (2 * 30))); rotation = _local2; polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = this; bodyDef.position.Set((x / World.physScale), (y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(rotation); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; }; } } }//package p_barricade
Section 165
//Billboard (p_billboard.Billboard) package p_billboard { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.display.*; import flash.utils.*; import flash.text.*; public class Billboard { public var timer:Timer; public var lifeTime:Number; public var speed:int; public var contents:TextField; public var image:MovieClip; public var counter:Number; public var direction:b2Vec2; public function Billboard(_arg1:String, _arg2:int, _arg3:int, _arg4:int=20){ image = new billboard_text(); MovieClip(image).content.text = _arg1; this.lifeTime = _arg4; image.x = _arg2; image.y = _arg3; timer = new Timer(100); timer.addEventListener(TimerEvent.TIMER, reduceAlpha); counter = _arg4; World.getSingleton().sceneRoot.addChild(image); timer.start(); speed = 5; direction = new b2Vec2(); direction.x = (Math.random() - Math.random()); direction.y = (Math.random() - Math.random()); } public function reduceAlpha(_arg1:TimerEvent):void{ counter--; image.alpha = (counter / lifeTime); image.x = (image.x + (speed * direction.x)); image.y = (image.y + (speed * direction.y)); if (image.alpha <= 0){ World.getSingleton().sceneRoot.removeChild(image); timer.stop(); World.getSingleton().setFocusToStage(); timer.removeEventListener(TimerEvent.TIMER, reduceAlpha); }; } } }//package p_billboard
Section 166
//BloodOnScreen (p_billboard.BloodOnScreen) package p_billboard { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.display.*; import flash.utils.*; import flash.text.*; public class BloodOnScreen { public var timer:Timer; public var lifeTime:Number; public var speed:int; public var contents:TextField; public var image:MovieClip; public var counter:Number; public var direction:b2Vec2; public function BloodOnScreen(_arg1:int=20){ image = new bloodScreen(); this.lifeTime = _arg1; timer = new Timer(100); timer.addEventListener(TimerEvent.TIMER, reduceAlpha); counter = _arg1; World.getSingleton().menuRoot.addChild(image); timer.start(); } public function reduceAlpha(_arg1:TimerEvent):void{ counter--; image.alpha = (counter / lifeTime); if (image.alpha <= 0){ World.getSingleton().menuRoot.removeChild(image); timer.stop(); World.getSingleton().setFocusToStage(); timer.removeEventListener(TimerEvent.TIMER, reduceAlpha); }; } } }//package p_billboard
Section 167
//MiddleBillboard (p_billboard.MiddleBillboard) package p_billboard { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.display.*; import flash.utils.*; import flash.text.*; public class MiddleBillboard { public var timer:Timer; public var lifeTime:Number; public var speed:int; public var contents:TextField; public var image:MovieClip; public var counter:Number; public var direction:b2Vec2; public function MiddleBillboard(_arg1:String, _arg2:int=20){ image = new middleBillboard(); MovieClip(image).content.text = _arg1; this.lifeTime = _arg2; timer = new Timer(100); timer.addEventListener(TimerEvent.TIMER, reduceAlpha); counter = _arg2; World.getSingleton().menuRoot.addChild(image); timer.start(); } public function reduceAlpha(_arg1:TimerEvent):void{ counter--; image.alpha = (counter / lifeTime); if (image.alpha <= 0){ World.getSingleton().menuRoot.removeChild(image); timer.stop(); World.getSingleton().setFocusToStage(); timer.removeEventListener(TimerEvent.TIMER, reduceAlpha); }; } } }//package p_billboard
Section 168
//SaveShow (p_billboard.SaveShow) package p_billboard { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.display.*; import flash.utils.*; import flash.text.*; public class SaveShow { public var timer:Timer; public var lifeTime:Number; public var speed:int; public var contents:TextField; public var image:MovieClip; public var counter:Number; public var direction:b2Vec2; public function SaveShow(_arg1:int=10){ image = new saveClip(); this.lifeTime = _arg1; timer = new Timer(100); timer.addEventListener(TimerEvent.TIMER, reduceAlpha); counter = _arg1; World.getSingleton().menuRoot.addChild(image); timer.start(); } public function reduceAlpha(_arg1:TimerEvent):void{ counter--; image.alpha = (counter / lifeTime); if (image.alpha <= 0){ World.getSingleton().menuRoot.removeChild(image); timer.stop(); World.getSingleton().setFocusToStage(); timer.removeEventListener(TimerEvent.TIMER, reduceAlpha); }; } } }//package p_billboard
Section 169
//Blood (p_blood.Blood) package p_blood { import flash.events.*; import flash.utils.*; import p_entity.*; public class Blood extends Entity { public var lifeTimer:Timer; public var numOfBloodType:int; public var lifeTime:int; public function Blood(){ lifeTimer = new Timer(50); lifeTimer.addEventListener(TimerEvent.TIMER, die); } public function die(_arg1:TimerEvent):void{ if (lifeTime > 0){ lifeTime--; } else { if (image){ if (image.parent){ image.parent.removeChild(image); lifeTimer.stop(); lifeTimer.removeEventListener(TimerEvent.TIMER, die); }; }; }; } } }//package p_blood
Section 170
//BloodFloor (p_blood.BloodFloor) package p_blood { import flash.events.*; import p_singleton.*; import flash.utils.*; public class BloodFloor extends Blood { public function BloodFloor(){ var _local1:int; var _local2:Class; super(); lifeTime = 20; numOfBloodType = 3; _local1 = (Math.round(((Math.random() * 10) + 1)) % numOfBloodType); _local2 = (getDefinitionByName(("blood_floor" + _local1)) as Class); image = new (_local2); lifeTimer.start(); World.getSingleton().bloods.add(this); } override public function die(_arg1:TimerEvent):void{ if (lifeTime > 0){ lifeTime--; } else { if (image){ if (image.parent){ image.parent.removeChild(image); lifeTimer.stop(); lifeTimer.removeEventListener(TimerEvent.TIMER, die); World.getSingleton().bloods.remove(this); }; }; }; } private function typedClass():void{ var _local1:blood_floor0; var _local2:blood_floor1; var _local3:blood_floor2; } } }//package p_blood
Section 171
//BloodShoot (p_blood.BloodShoot) package p_blood { import flash.events.*; import flash.utils.*; public class BloodShoot extends Blood { public function BloodShoot(){ var _local1:int; var _local2:Class; super(); lifeTimer.addEventListener(TimerEvent.TIMER, die); lifeTime = 1; numOfBloodType = 3; _local1 = (Math.round(((Math.random() * 10) + 1)) % numOfBloodType); _local2 = (getDefinitionByName(("blood_shoot" + _local1)) as Class); image = new (_local2); lifeTimer.start(); } private function typedClass():void{ var _local1:blood_shoot0; var _local2:blood_shoot1; var _local3:blood_shoot2; } } }//package p_blood
Section 172
//AxeBullet (p_bullet.AxeBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import p_particle.*; public class AxeBullet extends Bullet { public var polygonDef:b2PolygonDef; public function AxeBullet(){ density = 1; friction = 1; restitution = 0; lifeTime = 20; image = new weaponAxe(); image.scaleX = (image.scaleX * 0.75); image.scaleY = (image.scaleY * 0.75); image.cacheAsBitmap = true; World.getSingleton().level.backGround.addChild(image); bulletType = BulletType.THROWBULLET; soundHitWall = new hitWallSound(); soundHitBody = new handGunHitBody(); } override public function die():void{ if (lifeTime <= 0){ if (body){ World.getSingleton().physicWorld.DestroyBody(body); body = null; }; if (image){ if (World.getSingleton().level.backGround.contains(image)){ World.getSingleton().level.backGround.removeChild(image); World.getSingleton().setFocusToStage(); image = null; }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; if (body){ if ((((lifeTime > 0)) && (body.touchedChar))){ if (body){ World.getSingleton().physicWorld.DestroyBody(body); body = null; }; if (image){ if (World.getSingleton().level.backGround.contains(image)){ World.getSingleton().level.backGround.removeChild(image); World.getSingleton().setFocusToStage(); image = null; }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; } else { if ((((lifeTime > 0)) && (body.touchedSolid))){ if (body){ World.getSingleton().physicWorld.DestroyBody(body); body = null; }; }; }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.body.width / (2 * 30)), (image.body.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.SetBullet(true); body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; var _local2:Particle; if (body){ super.update(); if (body.touchedSolid){ _local1 = 0; while (_local1 < 10) { _local2 = new StarParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; if (!World.getSingleton().muted){ soundHitWall.play(); }; } else { if (body.touchedChar){ body.GetLinearVelocity().x = 0; body.GetLinearVelocity().y = 0; _local1 = 0; while (_local1 < 10) { _local2 = new BloodParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitBody.play(); }; }; }; }; die(); } override public function away():void{ body.damage = damage; body.ApplyImpulse(new b2Vec2((speed * direction.x), (speed * direction.y)), body.GetPosition()); body.ApplyTorque((speed * direction.x)); } } }//package p_bullet
Section 173
//BarretBullet (p_bullet.BarretBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import p_particle.*; public class BarretBullet extends Bullet { public var polygonDef:b2PolygonDef; public function BarretBullet(){ density = 1; friction = 1; restitution = 0; lifeTime = 2; image = new handGunBullet(); image.cacheAsBitmap = true; World.getSingleton().level.backGround.addChild(image); bulletType = BulletType.MAGNUM; soundHitWall = new hitWallSound(); soundHitBody = new handGunHitBody(); } override public function die():void{ if (lifeTime <= 0){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.backGround.contains(image)){ World.getSingleton().level.backGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; if ((((lifeTime > 0)) && (body.touchedSolid))){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.backGround.contains(image)){ World.getSingleton().level.backGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.body.width / (2 * 30)), (image.body.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.SetBullet(true); body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; var _local2:Particle; super.update(); if (body.touchedSolid){ _local1 = 0; while (_local1 < 10) { _local2 = new StarParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitWall.play(); }; } else { if (body.touchedChar){ _local1 = 0; while (_local1 < 10) { _local2 = new BloodParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; if (!World.getSingleton().muted){ soundHitBody.play(); }; }; }; die(); } } }//package p_bullet
Section 174
//Bullet (p_bullet.Bullet) package p_bullet { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import flash.media.*; import flash.utils.*; import p_entity.*; public class Bullet extends Entity { public var bodyDef:b2BodyDef; public var soundHitBody:Sound; public var speed:Number; public var bulletType:String; public var radius:int; public var body:b2Body; public var lifeTimeTimer:Timer; public var density:Number; public var soundHitWall:Sound; public var damage:Number; public var lifeTime:Number; public var restitution:Number; public var friction:Number; public var bodyType:int; public function Bullet(){ lifeTimeTimer = new Timer(100); lifeTimeTimer.addEventListener(TimerEvent.TIMER, reduceLifeTime); lifeTimeTimer.start(); } public function die():void{ if (lifeTime <= 0){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; } override public function update():void{ if (body){ position.x = (body.GetPosition().x * World.physScale); position.y = (body.GetPosition().y * World.physScale); angle = b2Math.radiansToDegrees(body.GetAngle()); }; super.update(); } public function reduceLifeTime(_arg1:TimerEvent):void{ lifeTime--; if (lifeTime <= 0){ lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); }; } public function away():void{ body.damage = damage; body.ApplyImpulse(new b2Vec2((speed * direction.x), (speed * direction.y)), body.GetPosition()); } } }//package p_bullet
Section 175
//BulletType (p_bullet.BulletType) package p_bullet { public class BulletType { public static var MAGS:String = "Mags"; public static var KNIFE:String = "knife"; public static var M4:String = "M4"; public static var SHELL:String = "Shell"; public static var MAGNUM:String = "Magnum"; public static var WALTHER_P99:String = "Walther P99"; public static var STEYR_TMP:String = "Steyr TMP"; public static var GLBULLET:String = "GLBullet"; public static var THROWBULLET:String = "ThrowBullet"; public static var GRENADE:String = "Grenade"; } }//package p_bullet
Section 176
//ChainSawBullet (p_bullet.ChainSawBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import p_particle.*; public class ChainSawBullet extends Bullet { public var polygonDef:b2PolygonDef; public function ChainSawBullet(){ density = 1; friction = 1; restitution = 0; lifeTime = 1; image = new chainsawBullet(); image.alpha = 0; World.getSingleton().level.playerGround.addChild(image); bulletType = BulletType.KNIFE; soundHitWall = new hitWallSound2(); soundHitBody = new knifeHit(); } override public function die():void{ super.die(); if ((((lifeTime > 0)) && (((body.touchedSolid) || (body.touchedChar))))){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; var _local2:Particle; super.update(); if (body.touchedSolid){ _local1 = 0; while (_local1 < 10) { _local2 = new StarParticle(); _local2.position = position.Copy(); _local2.screenPosition = position.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); } else { if (body.touchedChar){ body.GetLinearVelocity().x = 0; body.GetLinearVelocity().y = 0; _local1 = 0; while (_local1 < 10) { _local2 = new BloodParticle(); _local2.position = position.Copy(); _local2.screenPosition = position.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitBody.play(); }; }; }; die(); } } }//package p_bullet
Section 177
//DynamiteBullet (p_bullet.DynamiteBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import flash.media.*; import p_effect.*; import p_particle.*; public class DynamiteBullet extends Bullet { public var explosionSound:Sound; public var powerImpulse:Number; public var polygonDef:b2PolygonDef; public function DynamiteBullet(){ density = 1; friction = 1; restitution = 0.5; lifeTime = 20; image = new dynamiteBullet(); World.getSingleton().level.playerGround.addChild(image); powerImpulse = 300; bulletType = BulletType.GRENADE; explosionSound = new explodeSound(); } override public function die():void{ var _local1:Explosion; var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Particle; var _local12:int; if ((((((lifeTime <= 0)) && (body.touchedTheGround))) || ((lifeTime <= -5)))){ _local1 = new Explosion(20, position); if (!World.getSingleton().muted){ explosionSound.play(); }; World.getSingleton().shakeScreen(); if (lifeTime <= -5){ _local1.image.crack.alpha = 0; }; _local2 = 0; while (_local2 < 50) { _local11 = new ExplosionParticle(); _local11.position = position.Copy(); _local11.screenPosition = screenPosition.Copy(); _local2++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; _local3 = (World.getSingleton().enemies.size() - 1); while (_local3 >= 0) { _local4 = (World.getSingleton().enemies.get(_local3).position.x - position.x); _local5 = (World.getSingleton().enemies.get(_local3).position.y - position.y); _local6 = ((_local4 >= 0)) ? 1 : -1; _local7 = ((_local5 >= 0)) ? 1 : -1; _local8 = (_local4 * _local4); _local9 = (_local5 * _local5); _local10 = Math.sqrt((_local8 + _local9)); if (_local10 < radius){ World.getSingleton().enemies.get(_local3).body.impulseApplied = new b2Vec2((powerImpulse * _local6), (powerImpulse * _local7)); World.getSingleton().enemies.get(_local3).body.pointCollision = position.Copy(); World.getSingleton().enemies.get(_local3).body.damage = damage; World.getSingleton().enemies.get(_local3).body.gotShot = true; _local12 = ((Math.floor((Math.random() * 10)) + 1) % 3); if (_local12 == 0){ World.getSingleton().enemies.get(_local3).body.bodyShot = true; } else { if (_local12 == 1){ World.getSingleton().enemies.get(_local3).body.headShot = true; } else { World.getSingleton().enemies.get(_local3).body.legShot = true; }; }; }; _local3--; }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.filter.groupIndex = bodyType; polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; super.update(); die(); } override public function away():void{ body.damage = damage; body.ApplyImpulse(new b2Vec2((speed * direction.x), (speed * direction.y)), body.GetPosition()); body.ApplyTorque((speed * direction.x)); } override public function reduceLifeTime(_arg1:TimerEvent):void{ lifeTime--; } } }//package p_bullet
Section 178
//GlBullet (p_bullet.GlBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import flash.media.*; import p_effect.*; import p_particle.*; public class GlBullet extends Bullet { public var explosionSound:Sound; public var powerImpulse:Number; public var polygonDef:b2PolygonDef; public function GlBullet(){ density = 1; friction = 1; restitution = 0.5; lifeTime = 20; image = new GLbullet(); World.getSingleton().level.playerGround.addChild(image); powerImpulse = 300; bulletType = BulletType.GLBULLET; explosionSound = new explodeSound(); } override public function die():void{ var _local1:Explosion; var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Particle; var _local12:int; if ((((((lifeTime <= 0)) || (body.touchedSolid))) || (body.touchedChar))){ _local1 = new Explosion(20, position); if (!World.getSingleton().muted){ explosionSound.play(); }; World.getSingleton().shakeScreen(); if (!body.touchedTheGround){ _local1.image.crack.alpha = 0; }; _local2 = 0; while (_local2 < 50) { _local11 = new ExplosionParticle(); _local11.position = position.Copy(); _local11.screenPosition = screenPosition.Copy(); _local2++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; _local3 = (World.getSingleton().enemies.size() - 1); while (_local3 >= 0) { _local4 = (World.getSingleton().enemies.get(_local3).position.x - position.x); _local5 = (World.getSingleton().enemies.get(_local3).position.y - position.y); _local6 = ((_local4 >= 0)) ? 1 : -1; _local7 = ((_local5 >= 0)) ? 1 : -1; _local8 = (_local4 * _local4); _local9 = (_local5 * _local5); _local10 = Math.sqrt((_local8 + _local9)); if (_local10 < radius){ World.getSingleton().enemies.get(_local3).body.impulseApplied = new b2Vec2((powerImpulse * _local6), (powerImpulse * _local7)); World.getSingleton().enemies.get(_local3).body.pointCollision = position.Copy(); World.getSingleton().enemies.get(_local3).body.damage = damage; World.getSingleton().enemies.get(_local3).body.gotShot = true; _local12 = ((Math.floor((Math.random() * 10)) + 1) % 3); if (_local12 == 0){ World.getSingleton().enemies.get(_local3).body.bodyShot = true; } else { if (_local12 == 1){ World.getSingleton().enemies.get(_local3).body.headShot = true; } else { World.getSingleton().enemies.get(_local3).body.legShot = true; }; }; }; _local3--; }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; super.update(); die(); } override public function away():void{ body.damage = damage; body.ApplyImpulse(new b2Vec2((speed * direction.x), (speed * direction.y)), body.GetPosition()); } override public function reduceLifeTime(_arg1:TimerEvent):void{ lifeTime--; } } }//package p_bullet
Section 179
//GrenadeBullet (p_bullet.GrenadeBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import flash.media.*; import p_effect.*; import p_particle.*; public class GrenadeBullet extends Bullet { public var explosionSound:Sound; public var circleDef:b2CircleDef; public var powerImpulse:Number; public function GrenadeBullet(){ density = 1; friction = 1; restitution = 0.5; lifeTime = 10; image = new grenadeBullet(); World.getSingleton().level.playerGround.addChild(image); powerImpulse = 300; bulletType = BulletType.GRENADE; explosionSound = new explodeSound(); } override public function die():void{ var _local1:Explosion; var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Particle; var _local12:int; if ((((((lifeTime <= 0)) && (body.touchedTheGround))) || ((lifeTime <= -5)))){ _local1 = new Explosion(20, position); if (!World.getSingleton().muted){ explosionSound.play(); }; World.getSingleton().shakeScreen(); if (lifeTime <= -5){ _local1.image.crack.alpha = 0; }; _local2 = 0; while (_local2 < 50) { _local11 = new ExplosionParticle(); _local11.position = position.Copy(); _local11.screenPosition = screenPosition.Copy(); _local2++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; _local3 = (World.getSingleton().enemies.size() - 1); while (_local3 >= 0) { _local4 = (World.getSingleton().enemies.get(_local3).position.x - position.x); _local5 = (World.getSingleton().enemies.get(_local3).position.y - position.y); _local6 = ((_local4 >= 0)) ? 1 : -1; _local7 = ((_local5 >= 0)) ? 1 : -1; _local8 = (_local4 * _local4); _local9 = (_local5 * _local5); _local10 = Math.sqrt((_local8 + _local9)); if (_local10 < radius){ World.getSingleton().enemies.get(_local3).body.impulseApplied = new b2Vec2((powerImpulse * _local6), (powerImpulse * _local7)); World.getSingleton().enemies.get(_local3).body.pointCollision = position.Copy(); World.getSingleton().enemies.get(_local3).body.damage = damage; World.getSingleton().enemies.get(_local3).body.gotShot = true; _local12 = ((Math.floor((Math.random() * 10)) + 1) % 3); if (_local12 == 0){ World.getSingleton().enemies.get(_local3).body.bodyShot = true; } else { if (_local12 == 1){ World.getSingleton().enemies.get(_local3).body.headShot = true; } else { World.getSingleton().enemies.get(_local3).body.legShot = true; }; }; }; _local3--; }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ circleDef = new b2CircleDef(); circleDef.radius = (image.width / (2 * 30)); circleDef.density = density; circleDef.friction = friction; circleDef.restitution = restitution; circleDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(circleDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; super.update(); die(); } override public function away():void{ body.damage = damage; body.ApplyImpulse(new b2Vec2((speed * direction.x), (speed * direction.y)), body.GetPosition()); body.ApplyTorque((speed * direction.x)); } override public function reduceLifeTime(_arg1:TimerEvent):void{ lifeTime--; } } }//package p_bullet
Section 180
//GrenadeSafety (p_bullet.GrenadeSafety) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import p_char.*; import p_singleton.*; public class GrenadeSafety extends Shell { public var polygonDef1:b2PolygonDef; public var polygonDef2:b2PolygonDef; public function GrenadeSafety(){ density = 1; friction = 1; restitution = 0.3; lifeTime = 3; image = new grenadeSafety(); bodyType = BodyType.SHELL; World.getSingleton().level.playerGround.addChild(image); bulletType = BulletType.SHELL; } override public function die():void{ if (lifeTime <= 0){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().shells.contains(this)){ World.getSingleton().shells.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsOrientedBox((image.body0.width / (2 * 30)), (image.body0.height / (2 * 30)), new b2Vec2((image.body0.x / (2 * 30)), (image.body0.y / (2 * 30)))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; polygonDef1 = new b2PolygonDef(); polygonDef1.SetAsOrientedBox((image.body1.width / (2 * 30)), (image.body1.height / (2 * 30)), new b2Vec2((image.body1.x / (2 * 30)), (image.body1.y / (2 * 30)))); polygonDef1.density = density; polygonDef1.friction = friction; polygonDef1.restitution = restitution; polygonDef1.filter.groupIndex = bodyType; polygonDef2 = new b2PolygonDef(); polygonDef2.SetAsOrientedBox((image.body2.width / (2 * 30)), (image.body2.height / (2 * 30)), new b2Vec2((image.body2.x / (2 * 30)), (image.body2.y / (2 * 30)))); polygonDef2.density = density; polygonDef2.friction = friction; polygonDef2.restitution = restitution; polygonDef2.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.CreateShape(polygonDef1); body.CreateShape(polygonDef2); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } } }//package p_bullet
Section 181
//HandGunBullet (p_bullet.HandGunBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import p_particle.*; public class HandGunBullet extends Bullet { public var polygonDef:b2PolygonDef; public function HandGunBullet(){ density = 1; friction = 1; restitution = 0; lifeTime = 2; image = new handGunBullet(); image.cacheAsBitmap = true; World.getSingleton().level.backGround.addChild(image); bulletType = BulletType.WALTHER_P99; soundHitWall = new hitWallSound(); soundHitBody = new handGunHitBody(); } override public function die():void{ if (lifeTime <= 0){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.backGround.contains(image)){ World.getSingleton().level.backGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; if ((((lifeTime > 0)) && (((body.touchedSolid) || (body.touchedChar))))){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.backGround.contains(image)){ World.getSingleton().level.backGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.body.width / (2 * 30)), (image.body.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; var _local2:Particle; super.update(); if (body.touchedSolid){ _local1 = 0; while (_local1 < 10) { _local2 = new StarParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitWall.play(); }; } else { if (body.touchedChar){ body.GetLinearVelocity().x = 0; body.GetLinearVelocity().y = 0; _local1 = 0; while (_local1 < 10) { _local2 = new BloodParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitBody.play(); }; }; }; die(); } } }//package p_bullet
Section 182
//HandGunShell (p_bullet.HandGunShell) package p_bullet { import p_char.*; import p_singleton.*; public class HandGunShell extends Shell { public function HandGunShell(){ density = 1; friction = 1; restitution = 0; lifeTime = 10; image = new shell01(); bodyType = BodyType.SHELL; World.getSingleton().level.playerGround.addChild(image); bulletType = BulletType.SHELL; } } }//package p_bullet
Section 183
//KnifeBullet (p_bullet.KnifeBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import p_particle.*; public class KnifeBullet extends Bullet { public var polygonDef:b2PolygonDef; public function KnifeBullet(){ density = 1; friction = 1; restitution = 0; lifeTime = 1; image = new knifeBullet(); image.alpha = 0; World.getSingleton().level.playerGround.addChild(image); bulletType = BulletType.KNIFE; soundHitWall = new hitWallSound3(); soundHitBody = new knifeHit(); } override public function die():void{ super.die(); if ((((lifeTime > 0)) && (((body.touchedSolid) || (body.touchedChar))))){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; var _local2:Particle; super.update(); if (body.touchedSolid){ _local1 = 0; while (_local1 < 10) { _local2 = new StarParticle(); _local2.position = position.Copy(); _local2.screenPosition = position.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitWall.play(); }; } else { if (body.touchedChar){ body.GetLinearVelocity().x = 0; body.GetLinearVelocity().y = 0; _local1 = 0; while (_local1 < 10) { _local2 = new BloodParticle(); _local2.position = position.Copy(); _local2.screenPosition = position.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitBody.play(); }; }; }; die(); } } }//package p_bullet
Section 184
//MagBarret (p_bullet.MagBarret) package p_bullet { import p_char.*; import p_singleton.*; public class MagBarret extends Mags { public function MagBarret(){ density = 1; friction = 1; restitution = 0; image = new magBarretM82(); image.width = (image.width * 0.75); image.height = (image.height * 0.75); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 185
//Mags (p_bullet.Mags) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import p_char.*; import p_singleton.*; public class Mags extends Bullet { public var polygonDef:b2PolygonDef; public function Mags(){ density = 1; friction = 1; restitution = 0; lifeTime = 50; bodyType = BodyType.MAGZ; bulletType = BulletType.MAGS; } override public function die():void{ if (lifeTime <= 0){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().mags.contains(this)){ World.getSingleton().mags.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ super.update(); die(); } } }//package p_bullet
Section 186
//MagsAK (p_bullet.MagsAK) package p_bullet { import p_char.*; import p_singleton.*; public class MagsAK extends Mags { public function MagsAK(){ density = 1; friction = 1; restitution = 0; image = new magAK(); image.width = (image.width * 0.75); image.height = (image.height * 0.75); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 187
//MagsM4 (p_bullet.MagsM4) package p_bullet { import p_char.*; import p_singleton.*; public class MagsM4 extends Mags { public function MagsM4(){ density = 1; friction = 1; restitution = 0; image = new magM4(); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 188
//MagsMinigun (p_bullet.MagsMinigun) package p_bullet { import p_char.*; import p_singleton.*; public class MagsMinigun extends Mags { public function MagsMinigun(){ density = 1; friction = 1; restitution = 0; image = new magMinigun(); image.width = (image.width * 0.75); image.height = (image.height * 0.75); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 189
//MagsMP5 (p_bullet.MagsMP5) package p_bullet { import p_char.*; import p_singleton.*; public class MagsMP5 extends Mags { public function MagsMP5(){ density = 1; friction = 1; restitution = 0; image = new magMP5(); image.width = (image.width * 0.75); image.height = (image.height * 0.75); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 190
//MagsSteyrTMP (p_bullet.MagsSteyrTMP) package p_bullet { import p_char.*; import p_singleton.*; public class MagsSteyrTMP extends Mags { public function MagsSteyrTMP(){ density = 1; friction = 1; restitution = 0; image = new magSMG(); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 191
//MagsUMP (p_bullet.MagsUMP) package p_bullet { import p_char.*; import p_singleton.*; public class MagsUMP extends Mags { public function MagsUMP(){ density = 1; friction = 1; restitution = 0; image = new magUMP(); image.width = (image.width * 0.75); image.height = (image.height * 0.75); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 192
//MagsWaltherP99 (p_bullet.MagsWaltherP99) package p_bullet { import p_char.*; import p_singleton.*; public class MagsWaltherP99 extends Mags { public function MagsWaltherP99(){ density = 1; friction = 1; restitution = 0; image = new magPistol(); bodyType = BodyType.MAGZ; World.getSingleton().level.playerGround.addChild(image); } } }//package p_bullet
Section 193
//MinigunShell (p_bullet.MinigunShell) package p_bullet { import p_char.*; import p_singleton.*; public class MinigunShell extends Shell { public function MinigunShell(){ density = 1; friction = 1; restitution = 0; lifeTime = 20; image = new shell01(); image.width = (image.width * 1.5); bodyType = BodyType.SHELL; World.getSingleton().level.playerGround.addChild(image); bulletType = BulletType.SHELL; } } }//package p_bullet
Section 194
//Shell (p_bullet.Shell) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import p_singleton.*; public class Shell extends Bullet { public var polygonDef:b2PolygonDef; override public function die():void{ if (lifeTime <= 0){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().shells.contains(this)){ World.getSingleton().shells.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.bulletType = bulletType; }; } override public function update():void{ super.update(); die(); } } }//package p_bullet
Section 195
//ShotGunShell (p_bullet.ShotGunShell) package p_bullet { import p_char.*; import p_singleton.*; public class ShotGunShell extends Shell { public function ShotGunShell(){ density = 1; friction = 1; restitution = 0; lifeTime = 20; image = new shell02(); bodyType = BodyType.SHELL; World.getSingleton().level.playerGround.addChild(image); bulletType = BulletType.SHELL; } } }//package p_bullet
Section 196
//ZombieBullet (p_bullet.ZombieBullet) package p_bullet { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_singleton.*; import p_particle.*; public class ZombieBullet extends Bullet { public var polygonDef:b2PolygonDef; public function ZombieBullet(){ density = 1; friction = 1; restitution = 0; lifeTime = 1; this.image = new zombieBullet1(); image.alpha = 0; speed = 100; damage = 10; World.getSingleton().level.playerGround.addChild(image); bulletType = BulletType.KNIFE; soundHitWall = new hitWallSound3(); soundHitBody = new knifeHit(); } override public function die():void{ super.die(); if ((((lifeTime > 0)) && (((body.touchedSolid) || (body.touchedChar))))){ World.getSingleton().physicWorld.DestroyBody(body); body = null; if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; if (World.getSingleton().playerBullets.contains(this)){ World.getSingleton().playerBullets.remove(this); } else { World.getSingleton().enemyBullets.remove(this); }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(angle); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; body.m_angularDamping = 10000; body.m_linearDamping = 10000; body.bulletType = bulletType; }; } override public function update():void{ var _local1:int; var _local2:Particle; super.update(); if (body.touchedSolid){ _local1 = 0; while (_local1 < 10) { _local2 = new StarParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitWall.play(); }; } else { if (body.touchedChar){ body.GetLinearVelocity().x = 0; body.GetLinearVelocity().y = 0; _local1 = 0; while (_local1 < 10) { _local2 = new BloodParticle(); _local2.position = position.Copy(); _local2.screenPosition = screenPosition.Copy(); _local1++; }; lifeTimeTimer.stop(); lifeTimeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (!World.getSingleton().muted){ soundHitBody.play(); }; }; }; die(); } } }//package p_bullet
Section 197
//Andrew (p_char.p_nonplayable.Andrew) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Andrew extends NPCFriend { public function Andrew(){ jumpPower = 9; speed = 8; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 100; health = 50; image = new femaleChar(); image.head.head.gotoAndStop("Andrew"); image.torso.torso.gotoAndStop("male01"); Name = "Andrew"; price = 17000; salary = 700; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new SteyrTMP(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGuy1(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieSound1(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 198
//Bill (p_char.p_nonplayable.Bill) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Bill extends NPCFriend { public function Bill(){ jumpPower = 9; speed = 6; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 50; health = 50; image = new femaleChar(); image.head.head.gotoAndStop("Bill"); image.torso.torso.gotoAndStop("male02"); Name = "Bill"; price = 25000; salary = 1100; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new M4(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGuy1(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieSound1(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 199
//Darmin (p_char.p_nonplayable.Darmin) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Darmin extends NPCFriend { public function Darmin(){ jumpPower = 9; speed = 7; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 50; health = 50; image = new femaleChar(); image.head.head.gotoAndStop("Darmin"); Name = "Darmin"; image.torso.torso.gotoAndStop("male03"); price = 25000; salary = 5000; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new Dynamite(); ExplosiveWeapon(currentWeapon).ammo = 1; ExplosiveWeapon(currentWeapon).reloadAmmo = 2; currentWeapon.position = position; ExplosiveWeapon(currentWeapon).setDelaySpeed(5000); image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 600; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGuy2(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieSound2(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 200
//Francis (p_char.p_nonplayable.Francis) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Francis extends NPCFriend { public function Francis(){ jumpPower = 9; speed = 9; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 75; health = 75; image = new femaleChar(); image.head.head.gotoAndStop("Francis"); image.torso.torso.gotoAndStop("male01"); Name = "Francis"; price = 15000; salary = 500; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new MPU(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGuy1(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieSound1(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 201
//Ivy (p_char.p_nonplayable.Ivy) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Ivy extends NPCFriend { public function Ivy(){ jumpPower = 9; speed = 8.5; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 100; health = 100; image = new femaleChar(); image.head.head.gotoAndStop("Ivy"); image.torso.torso.gotoAndStop("female02"); Name = "Ivy"; price = 5500; salary = 200; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new Beretta(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGirl1(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieGirl2(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 202
//Kris (p_char.p_nonplayable.Kris) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Kris extends NPCFriend { public function Kris(){ jumpPower = 9; speed = 11; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 50; health = 50; image = new femaleChar(); image.head.head.gotoAndStop("Kris"); image.torso.torso.gotoAndStop("male02"); Name = "Kris"; price = 17500; salary = 750; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new SM5(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGuy1(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieSound1(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 203
//Louis (p_char.p_nonplayable.Louis) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Louis extends NPCFriend { public function Louis(){ jumpPower = 9; speed = 9.5; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 50; health = 50; image = new femaleChar(); image.head.head.gotoAndStop("Louis"); image.torso.torso.gotoAndStop("male03"); Name = "Louis"; price = 7500; salary = 200; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new Deagle(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGuy2(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieSound2(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 204
//Melisa (p_char.p_nonplayable.Melisa) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Melisa extends NPCFriend { public function Melisa(){ jumpPower = 9; speed = 9.2; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 50; health = 50; image = new femaleChar(); image.head.head.gotoAndStop("Melisa"); image.torso.torso.gotoAndStop("female03"); Name = "Melisa"; price = 12500; salary = 650; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new SteyrTMP(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGirl2(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieGirl(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 205
//NonPlayableCharacter (p_char.p_nonplayable.NonPlayableCharacter) package p_char.p_nonplayable { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.display.*; import flash.geom.*; import p_state.p_enemyState.*; import p_gamelevel.*; import p_item.*; import flash.media.*; import p_billboard.*; import p_blood.*; import p_gibs.*; public class NonPlayableCharacter extends Character { public var rangeIsReached:Boolean; public var billBoard:Billboard; public var sound:Sound; public var isMovingLeft:Boolean; public var previousLantai:Number; public var nearestDistance:Number; public var level:GameLevel; public var arrived:Boolean; public var soundChannel:SoundChannel; public var run:Boolean; public var point:int; public var state:StateEnemy; public var ladderDestination:int; public var nearestTarget:Character; public var soundTransform:SoundTransform; public var itemDrop:ItemPickUp; public var distanceLimit:Number; public var killPoint:int; public var isMovingDown:Boolean; public var isMovingRight:Boolean; public var isMovingUp:Boolean; public function NonPlayableCharacter(){ bodyType = BodyType.ENEMY; health = 10; position = new b2Vec2(1, 0); direction = new b2Vec2(1, 0); speed = 2; level = World.getSingleton().level; isMovingUp = false; isMovingDown = false; arrived = false; previousLantai = -1; lantai = -1; distanceLimit = 150; rangeIsReached = false; isMovingRight = true; isMovingLeft = false; run = false; itemDrop = new ItemPickUp(); deathTime = 20; soundTransform = new SoundTransform(); } override public function animateWalkForward():void{ bodyPartsGotoAndStop((initialWalkFrame + walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } override public function animateDeath(_arg1:TimerEvent):void{ if (deathTime <= 0){ deathTimer.stop(); deathTimer.removeEventListener(TimerEvent.TIMER, animateDeath); if (image){ if (World.getSingleton().level.enemyGround.contains(image)){ World.getSingleton().level.enemyGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; } else { deathTime--; }; } override public function animateWalkBackward():void{ var _local1:int; _local1 = (walkFrame + initialWalkFrame); bodyPartsGotoAndStop((_local1 - walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } override public function moveUp():void{ var _local1:b2Vec2; if (ableToMoveUp){ _local1 = body.GetPosition(); _local1.x = (MovieClip(level.middleGround)[("ladder" + onTheLadderUp)].x / World.physScale); _local1.y = (_local1.y - (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); image.head.gotoAndStop("walk"); }; onTheGround = false; if (body){ body.touchedTheGround = false; }; }; } override public function setIdle():void{ if (walkTimer.running){ walkTimer.stop(); walkCounter = 0; }; if (runTimer.running){ runTimer.stop(); runCounter = 0; }; if (characterState != CharacterState.IDLE){ bodyPartsGotoAndPlay("idle"); }; characterState = CharacterState.IDLE; } public function bodyPartsGotoAndStop(_arg1:int):void{ image.head.gotoAndStop(_arg1); image.torso.gotoAndStop(_arg1); image.leg.gotoAndStop(_arg1); image.weaponHolderf.getChildAt(0).gotoAndStop(_arg1); image.weaponHolderb.getChildAt(0).gotoAndStop(_arg1); } override public function moveDown():void{ var _local1:b2Vec2; if (ableToMoveDown){ _local1 = body.GetPosition(); _local1.x = (MovieClip(level.middleGround)[("ladder" + onTheLadderDown)].x / World.physScale); _local1.y = (_local1.y + (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); image.head.gotoAndStop("walk"); }; onTheGround = false; if (body){ body.touchedTheGround = false; }; }; } override public function calculateDamage():void{ var _local1:Sound; var _local2:int; var _local3:Point; var _local4:b2Vec2; var _local5:int; var _local6:int; var _local7:int; if (body.gotShot){ body.gotShot = false; body.m_linearDamping = 0; if (!body.impulseApplied){ body.impulseApplied = new b2Vec2(); }; if (!body.pointCollision){ body.pointCollision = new b2Vec2(); }; body.ApplyImpulse(body.impulseApplied, body.pointCollision); body.impulseApplied.Multiply(0.75); _local2 = (Math.floor((Math.random() * 10)) % 3); if (_local2 == 0){ _local1 = new gotShot1(); } else { if (_local2 == 1){ _local1 = new gotShot2(); } else { _local1 = new gotShot3(); }; }; if (image){ if (body.touchedTheGround){ blood = new BloodFloor(); if (World.getSingleton().bloods.size() > 10){ World.getSingleton().bloods.get(0).lifeTime = 0; }; World.getSingleton().level.backGround.addChild(blood.image); _local3 = new Point(image.shadow.x, image.shadow.y); _local3 = image.localToGlobal(_local3); _local4 = position.Copy(); _local4.Subtract(screenPosition); blood.position.x = (_local4.x + _local3.x); blood.position.y = (_local4.y + _local3.y); blood.image.x = blood.position.x; blood.image.y = blood.position.y; if (faceState == FaceState.FACE_LEFT){ blood.image.scaleX = (blood.image.scaleX * -1); }; }; blood = new BloodShoot(); World.getSingleton().level.playerGround.addChild(blood.image); blood.image.x = (body.pointCollision.x * 30); blood.image.y = (body.pointCollision.y * 30); if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.position.x < position.x){ blood.image.scaleX = (blood.image.scaleX * -1); }; }; }; if (body.headShot){ body.headShot = false; health = (health - (body.damage * 2)); if (health <= 0){ if (!World.getSingleton().muted){ _local1.play(); }; image.head.gotoAndPlay("death01"); image.head.head.head.gotoAndPlay("headshot1"); image.torso.gotoAndPlay("death01"); image.leg.gotoAndPlay("death01"); image.weaponHolderf.getChildAt(0).gotoAndPlay("death01"); image.weaponHolderb.getChildAt(0).gotoAndPlay("death01"); gibs = new GibsBrain(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5 = 0; _local6 = 2; while (_local5 < _local6) { gibs = new GibsBone(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); gibs = new GibsMeat(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5++; }; _local7 = ((Math.random() * 10) % 2); if (_local7 == 1){ if (image.head){ image.head.alpha = 0; }; }; }; } else { if (body.bodyShot){ body.bodyShot = false; health = (health - body.damage); if (health <= 0){ if (!World.getSingleton().muted){ _local1.play(); }; image.head.gotoAndPlay("death01"); image.torso.gotoAndPlay("death01"); image.leg.gotoAndPlay("death01"); image.weaponHolderf.getChildAt(0).gotoAndPlay("death01"); image.weaponHolderb.getChildAt(0).gotoAndPlay("death01"); _local5 = 0; _local6 = 3; while (_local5 < _local6) { gibs = new GibsMeat(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5++; }; if (image.head){ gibs = new GibsHead(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.image = image.head.head.head; gibs.image.gotoAndPlay("headshot1"); gibs.image.width = image.head.width; gibs.image.height = image.head.height; World.getSingleton().level.backGround.addChild(gibs.image); gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); }; }; } else { if (body.legShot){ body.legShot = false; health = (health - (body.damage * 0.5)); if (health <= 0){ if (!World.getSingleton().muted){ _local1.play(); }; image.head.gotoAndPlay("death01"); image.torso.gotoAndPlay("death01"); image.leg.gotoAndPlay("death01"); image.weaponHolderf.getChildAt(0).gotoAndPlay("death01"); image.weaponHolderb.getChildAt(0).gotoAndPlay("death01"); _local5 = 0; _local6 = 2; while (_local5 < _local6) { gibs = new GibsMeat(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); gibs = new GibsBone(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5++; }; if (image){ image.alpha = 0; }; }; }; }; }; }; } override public function animateRunForward():void{ bodyPartsGotoAndStop((initialRunFrame + runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } override public function die():void{ var _local1:Number; super.die(); if (health <= 0){ if (soundChannel){ soundChannel.stop(); }; if (World.getSingleton().level){ _local1 = World.getSingleton().level.getLevelRandomItemNumber(); if (_local1 != -1){ itemDrop = itemDrop.getItem(_local1); itemDrop.position = position.Copy(); itemDrop.screenPosition = screenPosition.Copy(); itemDrop.initRigidBody(); World.getSingleton().itemPickUps.add(itemDrop); }; }; if (image){ image.bloodSign.alpha = 0; }; walkTimer.stop(); runTimer.stop(); if (currentWeapon){ currentWeapon.timerOff(); }; billBoard = new Billboard(("" + point), position.x, position.y); if (World.getSingleton().playedCharacter){ World.getSingleton().kills = (World.getSingleton().kills + killPoint); World.getSingleton().score = (World.getSingleton().score + point); World.getSingleton().money = (World.getSingleton().money + point); if (World.getSingleton().level){ World.getSingleton().level.enemyKilled++; }; }; World.getSingleton().physicWorld.DestroyBody(body); body = null; World.getSingleton().enemies.remove(this); deathTimer.start(); }; } public function initState(_arg1:StateEnemy):void{ this.state = _arg1; } public function bodyPartsGotoAndPlay(_arg1:String):void{ image.head.gotoAndPlay(_arg1); image.torso.gotoAndPlay(_arg1); image.weaponHolderf.getChildAt(0).gotoAndPlay(_arg1); image.weaponHolderb.getChildAt(0).gotoAndPlay(_arg1); } override public function update():void{ var _local1:Number; var _local2:Number; state = state.update(); super.update(); if (image){ _local1 = (health / maxHealth); image.bloodSign.redBlood.width = (100 * _local1); }; if (soundChannel){ _local2 = screenPosition.x; _local2 = (_local2 - World.getSingleton().gameWidth); soundTransform.pan = ((_local2 < 0)) ? -1 : 1; _local2 = Math.abs(_local2); _local2 = (_local2 * 0.001); soundTransform.volume = (1 - _local2); if (soundTransform.volume < 0){ soundTransform.volume = 0; }; soundChannel.soundTransform = soundTransform; }; } public function getRandomSound():Sound{ var _local1:int; _local1 = (Math.floor((Math.random() * 10)) % 9); if (_local1 == 0){ return (new zombieSound1()); }; if (_local1 == 1){ return (new zombieSound2()); }; if (_local1 == 2){ return (new zombieSound3()); }; if (_local1 == 3){ return (new zombieSound4()); }; if (_local1 == 4){ return (new zombieSound5()); }; if (_local1 == 5){ return (new zombieSound6()); }; if (_local1 == 6){ return (new zombieSound7()); }; if (_local1 == 7){ return (new zombieSound8()); }; if (_local1 == 8){ return (new zombieSound9()); }; return (new zombieSound1()); } override public function animateRunBackward():void{ var _local1:int; _local1 = (walkFrame + initialRunFrame); bodyPartsGotoAndStop((_local1 - runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } } }//package p_char.p_nonplayable
Section 206
//NPCFriend (p_char.p_nonplayable.NPCFriend) package p_char.p_nonplayable { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.display.*; import org.idmedia.as3commons.util.*; import p_state.p_npcFriendState.*; import p_gamelevel.*; import p_item.*; import p_ammo.*; import p_billboard.*; import p_gibs.*; public class NPCFriend extends Character { public var isMovingLeft:Boolean; public var playerOwned:Boolean;// = false public var arrived:Boolean; public var nearestDistance:Number; public var run:Boolean; public var state:StateNPCFriend; public var ladderDestination:int; public var itemDrop:ItemPickUp; public var Name:String; public var distanceLimit:Number; public var ammo:Ammo; public var isMovingDown:Boolean; public var isMovingUp:Boolean; public var isMovingRight:Boolean; public var charDistanceLimit:Number; public var billBoard:Billboard; public var previousLantai:Number; public var price:int; public var charToFollow:Character; public var level:GameLevel; public var nearestTarget:Character; public var point:int; public var follow:Boolean; public var enemyRangeIsReached:Boolean; public var salaryPaid:Boolean;// = true public var salary:int; public function NPCFriend(){ salaryPaid = true; playerOwned = false; super(); jumpPower = 10; bodyType = BodyType.PLAYER; health = 10; position = new b2Vec2(1, 0); direction = new b2Vec2(1, 0); speed = 2; level = World.getSingleton().level; isMovingUp = false; isMovingDown = false; arrived = false; previousLantai = -1; distanceLimit = 400; charDistanceLimit = 50; enemyRangeIsReached = false; isMovingRight = true; isMovingLeft = false; ammoInventory = new ArrayList(); ammo = new Ammo12Gauge(1000); ammoInventory.add(ammo); ammo = new Ammo357(2000); ammoInventory.add(ammo); ammo = new Ammo45(3000); ammoInventory.add(ammo); ammo = new Ammo556(4000); ammoInventory.add(ammo); ammo = new Ammo762(5000); ammoInventory.add(ammo); ammo = new Ammo9mm(6000); ammoInventory.add(ammo); run = false; follow = true; itemDrop = new ItemPickUp(); if (World.getSingleton().players.size() > 0){ charToFollow = World.getSingleton().playedCharacter; }; deathTime = 20; } override public function animateDeath(_arg1:TimerEvent):void{ if (deathTime <= 0){ deathTimer.stop(); deathTimer.removeEventListener(TimerEvent.TIMER, animateDeath); if (image){ if (World.getSingleton().level.enemyGround.contains(image)){ World.getSingleton().level.enemyGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; deathTime = 100; image.head.visible = true; } else { deathTime--; }; } override public function moveDown():void{ var _local1:b2Vec2; if (ableToMoveDown){ _local1 = body.GetPosition(); _local1.x = (MovieClip(World.getSingleton().level.middleGround)[("ladder" + onTheLadderDown)].x / World.physScale); _local1.y = (_local1.y + (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); }; onTheGround = false; if (body){ body.touchedTheGround = false; }; }; } override public function moveUp():void{ var _local1:b2Vec2; if (ableToMoveUp){ _local1 = body.GetPosition(); _local1.x = (MovieClip(World.getSingleton().level.middleGround)[("ladder" + onTheLadderUp)].x / World.physScale); _local1.y = (_local1.y - (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); }; onTheGround = false; if (body){ body.touchedTheGround = false; }; }; } override public function animateWalkBackward():void{ var _local1:int; _local1 = (walkFrame + initialWalkFrame); bodyPartsGotoAndStop((_local1 - walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } public function bodyPartsGotoAndStop(_arg1:int):void{ image.torso.gotoAndStop(_arg1); image.leg.gotoAndStop(_arg1); } override public function calculateDamage():void{ if (body.gotShot){ body.gotShot = false; body.m_linearDamping = 0; if (body.headShot){ body.headShot = false; health = (health - (body.damage * 2)); }; if (body.bodyShot){ body.bodyShot = false; health = (health - body.damage); }; if (body.legShot){ body.legShot = false; health = (health - (body.damage * 0.5)); }; }; } override public function die():void{ var _local1:int; var _local2:int; var _local3:Number; super.die(); if (health <= 0){ walkTimer.stop(); runTimer.stop(); if (currentWeapon){ currentWeapon.timerOff(); }; image.head.rotation = 0; image.head.gotoAndPlay("death"); image.torso.gotoAndPlay("death"); image.leg.gotoAndPlay("death"); image.weaponHolderb.alpha = 0; image.weaponHolderf.alpha = 0; if (!body.impulseApplied){ body.impulseApplied = new b2Vec2(0, 0); }; gibs = new GibsBrain(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local1 = 0; _local2 = 4; while (_local1 < _local2) { gibs = new GibsBone(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); gibs = new GibsMeat(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local1++; }; if (World.getSingleton().level){ _local3 = World.getSingleton().level.getLevelRandomItemNumber(); if (_local3 != -1){ itemDrop = itemDrop.getItem(_local3); itemDrop.position = position.Copy(); itemDrop.screenPosition = screenPosition.Copy(); itemDrop.initRigidBody(); World.getSingleton().itemPickUps.add(itemDrop); }; }; if (image){ image.bloodSign.alpha = 0; }; walkTimer.stop(); runTimer.stop(); if (currentWeapon){ currentWeapon.timerOff(); currentWeapon.initTimer(); }; World.getSingleton().physicWorld.DestroyBody(body); body = null; salaryPaid = true; playerOwned = false; World.getSingleton().npcs.remove(this); deathTimer.start(); health = maxHealth; }; } override public function update():void{ var _local1:Number; state = state.update(); super.update(); if (image){ _local1 = (health / maxHealth); image.bloodSign.redBlood.width = (100 * _local1); }; } override public function animateWalkForward():void{ bodyPartsGotoAndStop((initialWalkFrame + walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } override public function setIdle():void{ if (walkTimer.running){ walkTimer.stop(); walkCounter = 0; }; if (runTimer.running){ runTimer.stop(); runCounter = 0; }; if (characterState != CharacterState.IDLE){ bodyPartsGotoAndPlay("idle"); }; characterState = CharacterState.IDLE; } public function initState(_arg1:StateNPCFriend):void{ this.state = _arg1; } override public function animateRunForward():void{ bodyPartsGotoAndStop((initialRunFrame + runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } public function bodyPartsGotoAndPlay(_arg1:String):void{ image.head.gotoAndPlay(_arg1); image.torso.gotoAndPlay(_arg1); } public function goThroughWithPlayer():void{ if (World.getSingleton().playedCharacter){ position.x = World.getSingleton().playedCharacter.position.x; position.y = World.getSingleton().playedCharacter.position.y; if (body){ body.SetXForm(new b2Vec2((position.x / World.physScale), (position.y / World.physScale)), body.GetAngle()); }; }; } override public function animateRunBackward():void{ var _local1:int; _local1 = (walkFrame + initialRunFrame); bodyPartsGotoAndStop((_local1 - runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } } }//package p_char.p_nonplayable
Section 207
//NPCFriendTest (p_char.p_nonplayable.NPCFriendTest) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; public class NPCFriendTest extends NPCFriend { public function NPCFriendTest(){ jumpPower = 10; speed = 10; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 50; health = 50; deathTime = 5; image = new femaleChar(); Name = "Lisa"; price = 1000; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 200; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new WaltherP99(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 800; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); World.getSingleton().mercInventory.add(new NPCFriendTest()); } } }//package p_char.p_nonplayable
Section 208
//Wendy (p_char.p_nonplayable.Wendy) package p_char.p_nonplayable { import flash.events.*; import p_weapon.*; import p_singleton.*; import p_state.p_npcFriendState.*; import flash.media.*; public class Wendy extends NPCFriend { public function Wendy(){ jumpPower = 9; speed = 10; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 50; health = 50; image = new femaleChar(); image.head.head.gotoAndStop("Wendy"); image.torso.torso.gotoAndStop("female02"); Name = "Wendy"; price = 20000; salary = 1000; initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 150; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; currentWeapon = new AK(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); distanceLimit = 700; charDistanceLimit = 100; point = (1000 + ((Math.random() * 10) + 1)); initTimer(); initState(new StateNPCFriendIdle(this)); run = false; } override public function animateDeath(_arg1:TimerEvent):void{ super.animateDeath(_arg1); } override public function calculateDamage():void{ var _local1:Sound; if (body.gotShot){ _local1 = new hurtGirl2(); if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieGirl2(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_nonplayable
Section 209
//Zombie01 (p_char.p_nonplayable.Zombie01) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie01 extends NonPlayableCharacter { public function Zombie01(){ var _local1:int; super(); maxHealth = 100; health = 100; jumpPower = 5; speed = 4; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal01Image(); image.head.head.gotoAndStop("head01"); image.torso.torso.gotoAndStop("body01"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (20 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie01Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 210
//Zombie02 (p_char.p_nonplayable.Zombie02) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie02 extends NonPlayableCharacter { public function Zombie02(){ var _local1:int; super(); maxHealth = 100; health = 100; jumpPower = 5; speed = 4; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal01Image(); image.head.head.gotoAndStop("head02"); image.torso.torso.gotoAndStop("body02"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (20 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie02Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 211
//Zombie03 (p_char.p_nonplayable.Zombie03) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie03 extends NonPlayableCharacter { public function Zombie03(){ var _local1:int; super(); maxHealth = 100; health = 100; jumpPower = 5; speed = 4.2; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal01Image(); image.head.head.gotoAndStop("head03"); image.torso.torso.gotoAndStop("body03"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (20 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie01Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 212
//Zombie04 (p_char.p_nonplayable.Zombie04) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie04 extends NonPlayableCharacter { public function Zombie04(){ var _local1:int; super(); maxHealth = 100; health = 100; jumpPower = 5; speed = 4; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal01Image(); image.head.head.gotoAndStop("head04"); image.torso.torso.gotoAndStop("body04"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (20 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie01Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 213
//Zombie05 (p_char.p_nonplayable.Zombie05) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie05 extends NonPlayableCharacter { public function Zombie05(){ var _local1:int; super(); maxHealth = 100; health = 100; jumpPower = 5; speed = 4; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal01Image(); image.head.head.gotoAndStop("head05"); image.torso.torso.gotoAndStop("body04"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (20 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie01Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 214
//Zombie06 (p_char.p_nonplayable.Zombie06) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie06 extends NonPlayableCharacter { public function Zombie06(){ var _local1:int; super(); maxHealth = 300; health = 300; jumpPower = 5; speed = 3; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal02Image(); image.head.head.gotoAndStop("head01"); image.torso.torso.gotoAndStop("body05"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (55 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie03Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 215
//Zombie07 (p_char.p_nonplayable.Zombie07) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie07 extends NonPlayableCharacter { public function Zombie07(){ var _local1:int; super(); maxHealth = 300; health = 300; jumpPower = 5; speed = 2; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal02Image(); image.head.head.gotoAndStop("head02"); image.torso.torso.gotoAndStop("body05"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (55 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie03Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 216
//Zombie08 (p_char.p_nonplayable.Zombie08) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie08 extends NonPlayableCharacter { public function Zombie08(){ var _local1:int; super(); maxHealth = 300; health = 300; jumpPower = 5; speed = 3.5; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal02Image(); image.head.head.gotoAndStop("head03"); image.torso.torso.gotoAndStop("body05"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (55 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie03Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 217
//Zombie09 (p_char.p_nonplayable.Zombie09) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie09 extends NonPlayableCharacter { public function Zombie09(){ var _local1:int; super(); maxHealth = 320; health = 320; jumpPower = 5; speed = 3; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal02Image(); image.head.head.gotoAndStop("head04"); image.torso.torso.gotoAndStop("body05"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (55 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie03Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 218
//Zombie10 (p_char.p_nonplayable.Zombie10) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class Zombie10 extends NonPlayableCharacter { public function Zombie10(){ var _local1:int; super(); maxHealth = 300; health = 300; jumpPower = 5; speed = 3; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal02Image(); image.head.head.gotoAndStop("head05"); image.torso.torso.gotoAndStop("body05"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (55 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie03Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local1 = (Math.floor((Math.random() * 10)) % 2); if (_local1 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 219
//ZombieAxe (p_char.p_nonplayable.ZombieAxe) package p_char.p_nonplayable { import p_weapon.*; import p_char.*; import p_singleton.*; import p_state.p_enemyState.*; public class ZombieAxe extends NonPlayableCharacter { public function ZombieAxe(){ var _local1:int; var _local2:String; var _local3:int; super(); maxHealth = 200; health = 200; jumpPower = 5; speed = 3; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal02Image(); _local1 = (Math.floor((Math.random() * 10)) % 5); _local1++; _local2 = ("head0" + _local1); image.head.gotoAndStop(_local2); image.head.head.gotoAndStop("head06"); image.torso.torso.gotoAndStop("body06"); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 350; point = (70 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new ZombieWeaponAxe(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); _local3 = (Math.floor((Math.random() * 10)) % 2); if (_local3 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function attack(_arg1:Boolean):void{ if (faceState == FaceState.FACE_LEFT){ direction.x = -1; } else { direction.x = 1; }; if (currentWeapon){ currentWeapon.direction.x = direction.x; currentWeapon.faceState = faceState; }; super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 220
//ZombieCrawler01 (p_char.p_nonplayable.ZombieCrawler01) package p_char.p_nonplayable { import Box2D.Common.Math.*; import p_weapon.*; import p_char.*; import p_singleton.*; import flash.display.*; import flash.geom.*; import p_state.p_enemyState.*; import flash.media.*; import p_blood.*; import p_gibs.*; public class ZombieCrawler01 extends NonPlayableCharacter { public function ZombieCrawler01(){ var _local1:int; var _local2:String; var _local3:int; var _local4:String; var _local5:int; super(); maxHealth = 75; health = 75; jumpPower = 5; speed = 1; runSpeed = (speed * 1.2); density = 1; friction = 1; restitution = 0; image = new zombieCrawl01(); _local1 = (Math.floor((Math.random() * 10)) % 5); _local1++; _local2 = ("head0" + _local1); image.head.gotoAndStop(_local2); _local3 = (Math.floor((Math.random() * 10)) % 4); _local3++; _local4 = ("body0" + _local3); image.torso.torso.gotoAndStop(_local4); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 60; point = (30 + ((Math.random() * 10) + 1)); killPoint = 1; if (_local3 == 5){ currentWeapon = new Zombie03Weapon(); } else { currentWeapon = new Zombie04Weapon(); }; currentWeapon.position = position; image.weaponHolderf.addChild(currentWeapon.image); image.weaponHolderb.addChild(currentWeapon.image2); initTimer(); _local5 = (Math.floor((Math.random() * 10)) % 2); if (_local5 == 0){ run = false; } else { run = true; }; initState(new StateEnemyIdle(this)); sound = getRandomSound(); if (!World.getSingleton().muted){ soundChannel = sound.play(0, 9999); }; } override public function animateWalkForward():void{ if (currentWeapon){ currentWeapon.image.gotoAndStop((initialWalkFrame + walkCounter)); currentWeapon.image2.gotoAndStop((initialWalkFrame + walkCounter)); }; walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } override public function runLeft():void{ var _local1:b2Vec2; if (ableToMoveLeft){ if (faceState == FaceState.FACE_RIGHT){ moveForward = false; moveBackward = true; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = true; moveBackward = false; }; }; body.SetLinearVelocity(new b2Vec2(-(runSpeed), body.GetLinearVelocity().y)); walkTimer.stop(); if (characterState != CharacterState.RUN){ if (!runTimer.running){ runTimer.start(); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x - (runSpeed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.RUN; }; } override public function animateWalkBackward():void{ var _local1:int; _local1 = (walkFrame + initialWalkFrame); if (currentWeapon){ currentWeapon.image.gotoAndStop((_local1 - walkCounter)); currentWeapon.image2.gotoAndStop((_local1 - walkCounter)); }; walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } override public function runRight():void{ var _local1:b2Vec2; if (ableToMoveRight){ if (faceState == FaceState.FACE_RIGHT){ moveForward = true; moveBackward = false; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = false; moveBackward = true; }; }; body.SetLinearVelocity(new b2Vec2(runSpeed, body.GetLinearVelocity().y)); walkTimer.stop(); if (characterState != CharacterState.RUN){ if (!runTimer.running){ runTimer.start(); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x + (runSpeed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.RUN; }; } override public function moveUp():void{ var _local1:b2Vec2; if (ableToMoveUp){ _local1 = body.GetPosition(); _local1.x = (MovieClip(level.middleGround)[("ladder" + onTheLadderUp)].x / World.physScale); _local1.y = (_local1.y - (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); }; }; } override public function setIdle():void{ if (walkTimer.running){ walkTimer.stop(); walkCounter = 0; }; if (runTimer.running){ runTimer.stop(); runCounter = 0; }; if (characterState != CharacterState.IDLE){ if (currentWeapon){ currentWeapon.image.gotoAndPlay("idle"); }; }; characterState = CharacterState.IDLE; } override public function moveDown():void{ var _local1:b2Vec2; if (ableToMoveDown){ _local1 = body.GetPosition(); _local1.x = (MovieClip(level.middleGround)[("ladder" + onTheLadderDown)].x / World.physScale); _local1.y = (_local1.y + (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); }; }; } override public function animateRunBackward():void{ var _local1:int; _local1 = (walkFrame + initialRunFrame); if (currentWeapon){ currentWeapon.image.gotoAndStop((_local1 - runCounter)); currentWeapon.image2.gotoAndStop((_local1 - runCounter)); }; runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } override public function walkLeft():void{ var _local1:b2Vec2; if (ableToMoveLeft){ if (faceState == FaceState.FACE_RIGHT){ moveForward = false; moveBackward = true; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = true; moveBackward = false; }; }; body.SetLinearVelocity(new b2Vec2(-(speed), body.GetLinearVelocity().y)); runTimer.stop(); if (characterState != CharacterState.WALK){ if (!walkTimer.running){ walkTimer.start(); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x - (speed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.WALK; }; } override public function calculateDamage():void{ var _local1:Sound; var _local2:int; var _local3:Point; var _local4:b2Vec2; var _local5:int; var _local6:int; var _local7:int; if (body.gotShot){ body.gotShot = false; body.m_linearDamping = 0; body.ApplyImpulse(body.impulseApplied, body.pointCollision); body.impulseApplied.Multiply(0.75); _local2 = (Math.floor((Math.random() * 10)) % 3); if (_local2 == 0){ _local1 = new gotShot1(); } else { if (_local2 == 1){ _local1 = new gotShot2(); } else { _local1 = new gotShot3(); }; }; if (image){ if (body.touchedTheGround){ blood = new BloodFloor(); if (World.getSingleton().bloods.size() > 10){ World.getSingleton().bloods.get(0).lifeTime = 0; }; World.getSingleton().level.backGround.addChild(blood.image); _local3 = new Point(image.shadow.x, image.shadow.y); _local3 = image.localToGlobal(_local3); _local4 = position.Copy(); _local4.Subtract(screenPosition); blood.position.x = (_local4.x + _local3.x); blood.position.y = (_local4.y + _local3.y); blood.image.x = blood.position.x; blood.image.y = blood.position.y; if (faceState == FaceState.FACE_LEFT){ blood.image.scaleX = (blood.image.scaleX * -1); }; }; blood = new BloodShoot(); World.getSingleton().level.playerGround.addChild(blood.image); blood.image.x = (body.pointCollision.x * 30); blood.image.y = (body.pointCollision.y * 30); if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.position.x < position.x){ blood.image.scaleX = (blood.image.scaleX * -1); }; }; }; if (body.headShot){ body.headShot = false; health = (health - (body.damage * 2)); if (health <= 0){ if (!World.getSingleton().muted){ _local1.play(); }; image.head.head.gotoAndPlay("headshot1"); image.weaponHolderf.getChildAt(0).gotoAndPlay("death01"); image.weaponHolderb.getChildAt(0).gotoAndPlay("death01"); gibs = new GibsBrain(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5 = 0; _local6 = 2; while (_local5 < _local6) { gibs = new GibsBone(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); gibs = new GibsMeat(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5++; }; _local7 = ((Math.random() * 10) % 2); if (_local7 == 1){ if (image.head){ image.head.alpha = 0; }; }; }; } else { if (body.bodyShot){ body.bodyShot = false; health = (health - body.damage); if (health <= 0){ if (!World.getSingleton().muted){ _local1.play(); }; image.torso.torso.gotoAndPlay("bodyshot0"); image.weaponHolderf.getChildAt(0).gotoAndPlay("death01"); image.weaponHolderb.getChildAt(0).gotoAndPlay("death01"); _local5 = 0; _local6 = 3; while (_local5 < _local6) { gibs = new GibsMeat(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5++; }; if (image.head){ gibs = new GibsHead(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.image = image.head.head; gibs.image.gotoAndPlay("headshot1"); gibs.image.width = 71; gibs.image.height = 78; World.getSingleton().level.backGround.addChild(gibs.image); gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); }; }; } else { if (body.legShot){ body.legShot = false; health = (health - (body.damage * 0.5)); if (health <= 0){ if (!World.getSingleton().muted){ _local1.play(); }; image.torso.torso.gotoAndPlay("bodyshot1"); image.weaponHolderf.getChildAt(0).gotoAndPlay("death01"); image.weaponHolderb.getChildAt(0).gotoAndPlay("death01"); _local5 = 0; _local6 = 2; while (_local5 < _local6) { gibs = new GibsMeat(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); gibs = new GibsBone(); gibs.position.x = position.x; gibs.position.y = position.y; gibs.initRigidBody(); gibs.body.ApplyImpulse(body.impulseApplied, gibs.body.GetWorldCenter()); World.getSingleton().level.backGround.addChild(gibs.image); _local5++; }; if (image){ image.alpha = 0; }; }; }; }; }; }; } override public function animateRunForward():void{ if (currentWeapon){ currentWeapon.image.gotoAndStop((initialRunFrame + runCounter)); currentWeapon.image2.gotoAndStop((initialRunFrame + runCounter)); }; runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } override public function walkRight():void{ var _local1:b2Vec2; if (ableToMoveRight){ if (faceState == FaceState.FACE_RIGHT){ moveForward = true; moveBackward = false; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = false; moveBackward = true; }; }; body.SetLinearVelocity(new b2Vec2(speed, body.GetLinearVelocity().y)); runTimer.stop(); if (characterState != CharacterState.WALK){ if (!walkTimer.running){ walkTimer.start(); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x + (speed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.WALK; }; } } }//package p_char.p_nonplayable
Section 221
//ZombieNormal01 (p_char.p_nonplayable.ZombieNormal01) package p_char.p_nonplayable { import p_weapon.*; import p_singleton.*; import p_state.p_enemyState.*; public class ZombieNormal01 extends NonPlayableCharacter { public function ZombieNormal01(){ maxHealth = 100; health = 100; jumpPower = 5; speed = 4; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; image = new zombieNormal01Image(); World.getSingleton().level.enemyGround.addChild(image); initialWalkFrame = 25; walkFrame = 32; walkAnimationSpeed = 400; initialRunFrame = 58; runFrame = 19; runAnimationSpeed = 300; distanceLimit = 100; point = (60 + ((Math.random() * 10) + 1)); killPoint = 1; currentWeapon = new Zombie01Weapon(); currentWeapon.position = position; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); initTimer(); run = false; initState(new StateEnemyIdle(this)); } override public function attack(_arg1:Boolean):void{ super.attack(_arg1); if (walkTimer.running){ walkTimer.stop(); }; if (runTimer.running){ runTimer.stop(); }; } } }//package p_char.p_nonplayable
Section 222
//FemaleChar (p_char.p_playable.FemaleChar) package p_char.p_playable { import p_singleton.*; import flash.media.*; public class FemaleChar extends PlayableCharacter { public function FemaleChar(){ jumpPower = 20; speed = 10; runSpeed = (speed * 1.5); density = 1; friction = 1; restitution = 0; accuracy = 15; maxHealth = 100; health = 100; image = new femaleChar(); initialWalkFrame = 25; walkFrame = 40; walkAnimationSpeed = 200; initialRunFrame = 66; runFrame = 19; runAnimationSpeed = 400; rangeWeaponInventory.add(World.getSingleton().rangeWeaponInventory.get(0)); currentWeapon = rangeWeaponInventory.get(0); currentWeapon.position = position; checkCurrentWeaponAmmo(); image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); meleeWeaponInventory.add(World.getSingleton().meleeWeaponInventory.get(0)); primaryWeapon = rangeWeaponInventory.get(0); meleeWeapon = meleeWeaponInventory.get(0); primaryWeapon.playerOwned = true; meleeWeapon.playerOwned = true; initTimer(); changeWeapon(currentWeapon); } override public function calculateDamage():void{ var _local1:Sound; var _local2:int; if (body.gotShot){ _local2 = (Math.floor((Math.random() * 10)) % 2); if (_local2 == 0){ _local1 = new hurtGirl1(); } else { _local1 = new hurtGirl2(); }; if (!World.getSingleton().muted){ _local1.play(); }; }; super.calculateDamage(); } override public function die():void{ var _local1:Sound; super.die(); if (health <= 0){ _local1 = new dieGirl(); if (!World.getSingleton().muted){ _local1.play(); }; }; } } }//package p_char.p_playable
Section 223
//PlayableCharacter (p_char.p_playable.PlayableCharacter) package p_char.p_playable { import Box2D.Common.Math.*; import flash.events.*; import p_weapon.*; import p_char.*; import p_singleton.*; import flash.display.*; import org.idmedia.as3commons.util.*; import p_ammo.*; public class PlayableCharacter extends Character { public var lastKillLimit:int;// = 0 public var exp:Number; public var perkBag:ArrayList; public var perks:ArrayList; public var explosiveWeapon:ExplosiveWeapon; public var level:int; public var itemInventory:ArrayList; public var currentWeaponNumber:int; public var meleeWeapon:MeleeWeapon; public var secondaryWeapon:RangeWeapon; public var primaryWeapon:RangeWeapon; public var ammo:Ammo; public var destinationDoor:String; public function PlayableCharacter(){ lastKillLimit = 0; super(); bodyType = BodyType.PLAYER; health = 100; position = new b2Vec2(1, 0); direction = new b2Vec2(1, 0); rangeWeaponInventory = new ArrayList(); meleeWeaponInventory = new ArrayList(); explosiveWeaponInventory = new ArrayList(); speed = 5; score = 0; deathTime = 50; destinationDoor = "none"; itemInventory = new ArrayList(); ammoInventory = new ArrayList(); ammo = new Ammo12Gauge(90); ammoInventory.add(ammo); ammo = new Ammo357(90); ammoInventory.add(ammo); ammo = new Ammo45(90); ammoInventory.add(ammo); ammo = new Ammo556(90); ammoInventory.add(ammo); ammo = new Ammo762(90); ammoInventory.add(ammo); ammo = new Ammo9mm(300); ammoInventory.add(ammo); ammo = new Ammo50Cal(90); ammoInventory.add(ammo); ammo = new AmmoHE(6); ammoInventory.add(ammo); perkBag = new ArrayList(); perks = new ArrayList(); level = 1; exp = 0; lastKillLimit = 0; } override public function animateWalkForward():void{ bodyPartsGotoAndStop((initialWalkFrame + walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } override public function animateDeath(_arg1:TimerEvent):void{ if (deathTime <= 0){ deathTimer.stop(); if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; } else { deathTime--; }; } public function goThroughDoor():void{ if (destinationDoor != "none"){ position.x = (MovieClip(World.getSingleton().level.middleGround)[("" + destinationDoor)].x + World.getSingleton().level.middleGround.x); position.y = (MovieClip(World.getSingleton().level.middleGround)[("" + destinationDoor)].y + World.getSingleton().level.middleGround.y); if (body){ body.SetXForm(new b2Vec2((position.x / World.physScale), (position.y / World.physScale)), body.GetAngle()); }; }; } override public function animateWalkBackward():void{ var _local1:int; _local1 = (walkFrame + initialWalkFrame); bodyPartsGotoAndStop((_local1 - walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } override public function setIdle():void{ if (walkTimer.running){ walkTimer.stop(); walkCounter = 0; }; if (runTimer.running){ runTimer.stop(); runCounter = 0; }; if (characterState != CharacterState.IDLE){ if (health > 0){ bodyPartsGotoAndPlay("idle"); }; }; characterState = CharacterState.IDLE; } public function bodyPartsGotoAndStop(_arg1:int):void{ image.torso.gotoAndStop(_arg1); image.leg.gotoAndStop(_arg1); } public function revive():void{ score = 0; health = maxHealth; image.weaponHolderb.alpha = 1; image.weaponHolderf.alpha = 1; image.weaponHolderb.rotation = 0; image.weaponHolderf.rotation = 0; reset(); setIdle(); bodyPartsGotoAndPlay("idle"); image.leg.gotoAndStop("idle"); initTimer(); if (currentWeapon){ currentWeapon.initTimer(); if (currentWeapon.weaponType == WeaponType.MELEE){ changeWeapon(meleeWeapon); } else { if (currentWeapon.weaponType == WeaponType.RANGE){ if (primaryWeapon){ changeWeapon(primaryWeapon); } else { if (secondaryWeapon){ changeWeapon(secondaryWeapon); } else { changeWeapon(meleeWeapon); }; }; } else { if (currentWeapon.weaponType == WeaponType.EXPLOSIVE){ if (explosiveWeapon){ changeWeapon(explosiveWeapon); } else { changeWeapon(meleeWeapon); }; }; }; }; currentWeapon.image.gotoAndStop(1); currentWeapon.image2.gotoAndStop(1); }; World.getSingleton().players.add(this); } override public function animateRunForward():void{ bodyPartsGotoAndStop((initialRunFrame + runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } override public function die():void{ super.die(); if (health <= 0){ walkTimer.stop(); runTimer.stop(); if (currentWeapon){ currentWeapon.timerOff(); }; image.head.rotation = 0; image.head.gotoAndPlay("death"); image.torso.gotoAndPlay("death"); image.leg.gotoAndPlay("death"); image.weaponHolderb.alpha = 0; image.weaponHolderf.alpha = 0; World.getSingleton().physicWorld.DestroyBody(body); body = null; World.getSingleton().players.remove(this); World.getSingleton().playedCharacter = null; }; } public function bodyPartsGotoAndPlay(_arg1:String):void{ image.head.gotoAndPlay(_arg1); image.torso.gotoAndPlay(_arg1); } override public function update():void{ super.update(); if (currentWeapon.weaponType == WeaponType.EXPLOSIVE){ if ((((ExplosiveWeapon(currentWeapon).reloadAmmo <= 0)) && ((ExplosiveWeapon(currentWeapon).ammo <= 0)))){ currentWeapon.playerOwned = false; explosiveWeaponInventory.remove(currentWeapon); changeWeapon(meleeWeapon); explosiveWeapon = null; }; }; } public function copyTo(_arg1:PlayableCharacter):void{ var _local2:int; var _local3:int; _arg1.health = this.health; _arg1.maxHealth = this.maxHealth; _arg1.score = this.score; _arg1.accuracy = this.accuracy; _arg1.speed = this.speed; _local2 = 0; _local3 = this.ammoInventory.size(); while (_local2 < _local3) { _arg1.ammoInventory.get(_local2).amount = this.ammoInventory.get(_local2).amount; _local2++; }; _arg1.rangeWeaponInventory.clear(); _arg1.meleeWeaponInventory.clear(); _arg1.explosiveWeaponInventory.clear(); _arg1.perkBag.clear(); _arg1.perks.clear(); _arg1.itemInventory.clear(); _arg1.primaryWeapon = null; _arg1.secondaryWeapon = null; _arg1.meleeWeapon = null; _arg1.explosiveWeapon = null; _local2 = 0; _local3 = this.rangeWeaponInventory.size(); while (_local2 < _local3) { _arg1.rangeWeaponInventory.add(this.rangeWeaponInventory.get(_local2)); _arg1.rangeWeaponInventory.get(_local2).ammo = _arg1.rangeWeaponInventory.get(_local2).maxAmmo; _local2++; }; _local2 = 0; _local3 = this.meleeWeaponInventory.size(); while (_local2 < _local3) { _arg1.meleeWeaponInventory.add(this.meleeWeaponInventory.get(_local2)); _local2++; }; _local2 = 0; _local3 = this.explosiveWeaponInventory.size(); while (_local2 < _local3) { _arg1.explosiveWeaponInventory.add(this.explosiveWeaponInventory.get(_local2)); _arg1.explosiveWeaponInventory.get(_local2).reloadAmmo = this.explosiveWeaponInventory.get(_local2).reloadAmmo; _arg1.explosiveWeaponInventory.get(_local2).ammo = _arg1.explosiveWeaponInventory.get(_local2).maxAmmo; _local2++; }; if (this.primaryWeapon){ _arg1.primaryWeapon = this.primaryWeapon; }; if (this.secondaryWeapon){ _arg1.secondaryWeapon = this.secondaryWeapon; }; if (this.meleeWeapon){ _arg1.meleeWeapon = this.meleeWeapon; }; if (this.explosiveWeapon){ _arg1.explosiveWeapon = this.explosiveWeapon; }; } override public function animateRunBackward():void{ var _local1:int; _local1 = (runFrame + initialRunFrame); bodyPartsGotoAndStop((_local1 - runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } } }//package p_char.p_playable
Section 224
//BodyType (p_char.BodyType) package p_char { public class BodyType { public static var MAGZ:int = 9; public static var BARRICADE:int = 11; public static var WALL:int = 6; public static var ITEM_PICK_UP:int = 5; public static var ITEM:int = 10; public static var SHELL:int = 8; public static var PLAYER_BULLET:int = 1; public static var PLAYER:int = 3; public static var ENEMY:int = 4; public static var PLAYERLIMIT:int = 13; public static var FLOOR:int = 7; public static var GIBS:int = 12; public static var ENEMY_BULLET:int = 2; } }//package p_char
Section 225
//Character (p_char.Character) package p_char { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import p_weapon.*; import p_singleton.*; import org.idmedia.as3commons.util.*; import flash.geom.*; import flash.utils.*; import p_entity.*; import p_billboard.*; import p_blood.*; import p_gibs.*; import p_particle.*; public class Character extends Entity { public var blood:Blood; public var bodyDef:b2BodyDef; public var headDef:b2PolygonDef; public var walkTimer:Timer; public var ableToMoveLeft:Boolean; public var torsoDef:b2PolygonDef; public var initialRunFrame:int; public var legDef:b2CircleDef; public var ableToAttack:Boolean; public var ableToMoveUp:Boolean; public var active:Boolean;// = true public var deathTimer:Timer; public var walkFrame:int; public var faceState:String; public var ammoInventory:ArrayList; public var onTheGround:Boolean; public var initialWalkFrame:int; public var ableToJump:Boolean; public var speed:Number; public var walkAnimationSpeed:Number; public var health:int; public var deathTime:Number;// = 200 public var lantai:int; public var restitution:Number; public var jumpPower:Number; public var runTimer:Timer; public var runSpeed:Number; public var meleeWeaponInventory:ArrayList; public var onTheLadderUp:int; public var score:int; public var runAnimationSpeed:Number; public var onTheLadderDown:int; public var body:b2Body; public var rangeWeaponInventory:ArrayList; public var ableToMoveDown:Boolean; public var runFrame:int; public var floorDetectorDef:b2CircleDef; public var moveForward:Boolean; public var gibs:Gibs; public var touchedTheCeiling:Boolean; public var ableToMoveRight:Boolean; public var moveBackward:Boolean; public var maxHealth:int; public var stageNumber:int; public var density:Number; public var characterState:String; public var runCounter:int; public var walkCounter:int; public var currentWeapon:Weapon; public var accuracy:int; public var friction:Number; public var explosiveWeaponInventory:ArrayList; public var bodyType:int; public function Character(){ active = true; deathTime = 200; super(); faceState = FaceState.FACE_RIGHT; characterState = CharacterState.IDLE; onTheGround = false; reset(); lantai = 0; onTheLadderUp = -1; onTheLadderDown = -1; accuracy = 0; walkCounter = 0; moveForward = false; moveBackward = false; walkAnimationSpeed = 1000; runCounter = 0; runAnimationSpeed = 1000; deathTimer = new Timer(100); deathTimer.addEventListener(TimerEvent.TIMER, animateDeath); } public function animateRun(_arg1:TimerEvent):void{ var _local2:int; var _local3:Particle; var _local4:Point; var _local5:b2Vec2; if (image){ if ((runCounter % 9) == 0){ _local2 = 0; while (_local2 < 1) { _local3 = new SmokeParticle(); _local3.position = position.Copy(); _local3.screenPosition = screenPosition.Copy(); _local4 = new Point(image.smokeOut.x, image.smokeOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); _local3.position.x = (_local5.x + _local4.x); _local3.position.y = (_local5.y + _local4.y); _local3.screenPosition.x = _local4.x; _local3.screenPosition.y = _local4.y; _local2++; }; }; }; if (moveForward){ animateRunForward(); } else { if (moveBackward){ animateRunBackward(); }; }; if (body){ if (body.normal){ }; }; } public function setSpeed(_arg1:Number, _arg2:Number):void{ if (walkTimer.running){ walkTimer.stop(); }; this.speed = _arg1; this.walkAnimationSpeed = _arg2; walkTimer.removeEventListener(TimerEvent.TIMER, animateWalk); initTimer(); } public function animateWalkForward():void{ image.head.gotoAndStop((initialWalkFrame + walkCounter)); image.torso.gotoAndStop((initialWalkFrame + walkCounter)); image.leg.gotoAndStop((initialWalkFrame + walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } public function setRunSpeed(_arg1:Number, _arg2:Number):void{ if (runTimer.running){ runTimer.stop(); }; this.runSpeed = _arg1; this.runAnimationSpeed = _arg2; runTimer.removeEventListener(TimerEvent.TIMER, animateRun); initTimer(); } public function animateDeath(_arg1:TimerEvent):void{ if (deathTime <= 0){ deathTimer.stop(); if (image){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); World.getSingleton().setFocusToStage(); }; }; } else { deathTime--; }; } public function climbing():Boolean{ if (characterState == CharacterState.CLIMB){ if (((!(ableToMoveUp)) && (!(ableToMoveDown)))){ characterState = CharacterState.FALL; body.m_linearDamping = 0; return (true); }; }; return (false); } public function runLeft():void{ var _local1:b2Vec2; if (ableToMoveLeft){ if (faceState == FaceState.FACE_RIGHT){ moveForward = false; moveBackward = true; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = true; moveBackward = false; }; }; body.SetLinearVelocity(new b2Vec2(-(runSpeed), body.GetLinearVelocity().y)); walkTimer.stop(); if (characterState != CharacterState.RUN){ if (!runTimer.running){ runTimer.start(); image.head.gotoAndStop("run"); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x - (runSpeed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.RUN; }; } public function initTimer():void{ walkTimer = new Timer((walkAnimationSpeed / walkFrame)); walkTimer.addEventListener(TimerEvent.TIMER, animateWalk); runTimer = new Timer((runAnimationSpeed / runFrame)); runTimer.addEventListener(TimerEvent.TIMER, animateRun); } public function checkCurrentWeaponAmmo():void{ var _local1:int; var _local2:int; if (currentWeapon.weaponType == WeaponType.RANGE){ _local1 = 0; _local2 = ammoInventory.size(); while (_local1 < _local2) { if (RangeWeapon(currentWeapon).ammoType.id == ammoInventory.get(_local1).id){ RangeWeapon(currentWeapon).ammoType = ammoInventory.get(_local1); }; _local1++; }; }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ headDef = new b2PolygonDef(); headDef.SetAsOrientedBox((image.kepala.width / (2 * 30)), (image.kepala.height / (2 * 30)), new b2Vec2((image.kepala.x / (1 * 30)), (image.kepala.y / (1 * 30)))); headDef.density = density; headDef.friction = 0; headDef.restitution = restitution; headDef.filter.groupIndex = bodyType; headDef.id = "head"; torsoDef = new b2PolygonDef(); torsoDef.SetAsOrientedBox((image.badan.width / (2 * 30)), (image.badan.height / (2 * 30)), new b2Vec2((image.badan.x / (1 * 30)), (image.badan.y / (1 * 30)))); torsoDef.density = density; torsoDef.friction = 0; torsoDef.restitution = restitution; torsoDef.filter.groupIndex = bodyType; torsoDef.id = "body"; legDef = new b2CircleDef(); legDef.radius = (image.kaki.width / (2 * 30)); legDef.localPosition.Set((image.kaki.x / (1 * 30)), (image.kaki.y / (1 * 30))); legDef.friction = 0; legDef.restitution = restitution; legDef.density = density; legDef.filter.groupIndex = bodyType; legDef.id = "leg"; floorDetectorDef = new b2CircleDef(); floorDetectorDef.radius = (image.floorDetector.width / (2 * 30)); floorDetectorDef.localPosition.Set((image.floorDetector.x / (1 * 30)), (image.floorDetector.y / (1 * 30))); floorDetectorDef.density = density; floorDetectorDef.friction = friction; floorDetectorDef.restitution = restitution; floorDetectorDef.filter.groupIndex = bodyType; floorDetectorDef.id = "floorDetector"; bodyDef = new b2BodyDef(); bodyDef.fixedRotation = true; bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); body = _local1.CreateBody(bodyDef); body.CreateShape(headDef); body.CreateShape(torsoDef); body.CreateShape(legDef); body.CreateShape(floorDetectorDef); body.SetMassFromShapes(); body.AllowSleeping(false); body.m_angularDamping = 10000; body.m_linearDamping = 0; body.type = bodyType; }; } public function aim(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; if (currentWeapon){ if (currentWeapon.image){ _local3 = (_arg1 - currentWeapon.screenPosition.x); _local4 = (_arg2 - currentWeapon.screenPosition.y); _local5 = b2Math.radiansToDegrees(Math.atan2(_local4, _local3)); _local6 = currentWeapon.image.rotation; if ((((_local5 > 90)) || ((_local5 < -90)))){ if (faceState == FaceState.FACE_RIGHT){ turnFace(); }; } else { if (faceState == FaceState.FACE_LEFT){ turnFace(); }; }; currentWeapon.direction = b2Vec2.vectorTransform(_local5, new b2Vec2(1, 0)); currentWeapon.angle = _local5; if (faceState == FaceState.FACE_LEFT){ if (_local5 > 0){ _local5 = (180 - _local5); } else { if (_local5 < 0){ _local5 = (-180 - _local5); }; }; }; if ((((_local5 < 30)) && ((_local5 > -30)))){ image.head.rotation = _local5; }; currentWeapon.image.rotation = _local5; currentWeapon.image2.rotation = _local5; currentWeapon.faceState = faceState; }; }; } public function animateWalk(_arg1:TimerEvent):void{ if (moveForward){ animateWalkForward(); } else { if (moveBackward){ animateWalkBackward(); }; }; } public function animateWalkBackward():void{ var _local1:int; _local1 = (walkFrame + initialWalkFrame); image.head.gotoAndStop((_local1 - walkCounter)); image.torso.gotoAndStop((_local1 - walkCounter)); image.leg.gotoAndStop((_local1 - walkCounter)); walkCounter++; if (walkCounter > walkFrame){ walkCounter = 0; }; } public function attack(_arg1:Boolean):void{ if (ableToAttack){ if (currentWeapon){ characterState = CharacterState.ATTACK; if (currentWeapon.weaponType == WeaponType.RANGE){ RangeWeapon(currentWeapon).attack(_arg1); } else { if (currentWeapon.weaponType == WeaponType.MELEE){ MeleeWeapon(currentWeapon).attack(_arg1); } else { if (currentWeapon.weaponType == WeaponType.THROW){ ThrowWeapon(currentWeapon).attack(_arg1); } else { if (currentWeapon.weaponType == WeaponType.EXPLOSIVE){ ExplosiveWeapon(currentWeapon).attack(_arg1); }; }; }; }; }; }; } public function runRight():void{ var _local1:b2Vec2; if (ableToMoveRight){ if (faceState == FaceState.FACE_RIGHT){ moveForward = true; moveBackward = false; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = false; moveBackward = true; }; }; body.SetLinearVelocity(new b2Vec2(runSpeed, body.GetLinearVelocity().y)); walkTimer.stop(); if (characterState != CharacterState.RUN){ if (!runTimer.running){ runTimer.start(); image.head.gotoAndStop("run"); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x + (runSpeed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.RUN; }; } public function moveUp():void{ var _local1:b2Vec2; if (ableToMoveUp){ _local1 = body.GetPosition(); _local1.y = (_local1.y - (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); image.head.gotoAndStop("walk"); }; onTheGround = false; if (body){ body.touchedTheGround = false; }; }; } public function setIdle():void{ if (walkTimer.running){ walkTimer.stop(); walkCounter = 0; }; if (runTimer.running){ runTimer.stop(); runCounter = 0; }; if (characterState != CharacterState.IDLE){ image.head.gotoAndPlay("idle"); image.torso.gotoAndPlay("idle"); }; characterState = CharacterState.IDLE; } public function moveDown():void{ var _local1:b2Vec2; if (ableToMoveDown){ _local1 = body.GetPosition(); _local1.y = (_local1.y + (speed / World.physScale)); body.SetXForm(_local1, 0); characterState = CharacterState.CLIMB; body.m_angularDamping = 10000; body.m_linearDamping = 10000; runTimer.stop(); moveForward = true; if (!walkTimer.running){ walkTimer.start(); image.head.gotoAndStop("walk"); }; onTheGround = false; if (body){ body.touchedTheGround = false; }; }; } public function reset():void{ ableToAttack = true; ableToJump = true; ableToMoveRight = true; ableToMoveLeft = true; ableToMoveUp = false; ableToMoveDown = false; touchedTheCeiling = false; } public function checkShadow():void{ if (image){ if (image.shadow){ if (body){ if (body.touchedTheGround){ image.shadow.visible = true; } else { image.shadow.visible = false; }; }; }; }; } public function jump():void{ if (ableToJump){ if (this.onTheGround){ onTheGround = false; if (body){ body.touchedTheGround = false; }; body.GetLinearVelocity().y = (body.GetLinearVelocity().y - jumpPower); characterState = CharacterState.JUMP; body.m_angularDamping = 10000; body.m_linearDamping = 0; walkTimer.stop(); runTimer.stop(); }; }; } public function walkLeft():void{ var _local1:b2Vec2; if (ableToMoveLeft){ if (faceState == FaceState.FACE_RIGHT){ moveForward = false; moveBackward = true; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = true; moveBackward = false; }; }; body.SetLinearVelocity(new b2Vec2(-(speed), body.GetLinearVelocity().y)); runTimer.stop(); if (characterState != CharacterState.WALK){ if (!walkTimer.running){ walkTimer.start(); image.head.gotoAndStop("walk"); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x - (speed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.WALK; }; } public function deactivate():void{ active = false; if (body){ body.PutToSleep(); }; } public function calculateDamage():void{ var _local1:BloodOnScreen; if (body.gotShot){ body.gotShot = false; body.m_linearDamping = 0; _local1 = new BloodOnScreen(5); if (body.headShot){ body.headShot = false; health = (health - (body.damage * 2)); }; if (body.bodyShot){ body.bodyShot = false; health = (health - body.damage); }; if (body.legShot){ body.legShot = false; health = (health - (body.damage * 0.5)); }; }; } public function animateRunForward():void{ image.head.gotoAndStop((initialRunFrame + runCounter)); image.torso.gotoAndStop((initialRunFrame + runCounter)); image.leg.gotoAndStop((initialRunFrame + runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } public function die():void{ if (health <= 0){ ableToAttack = false; ableToJump = false; ableToMoveRight = false; ableToMoveLeft = false; ableToMoveUp = false; ableToMoveDown = false; walkTimer.removeEventListener(TimerEvent.TIMER, animateWalk); runTimer.removeEventListener(TimerEvent.TIMER, animateRun); }; } public function turnFace():void{ if (image){ image.scaleX = (image.scaleX * -1); }; if (faceState == FaceState.FACE_LEFT){ faceState = FaceState.FACE_RIGHT; direction.x = 1; } else { faceState = FaceState.FACE_LEFT; direction.x = -1; }; } public function reload():void{ if (currentWeapon){ if (currentWeapon.weaponType == WeaponType.RANGE){ RangeWeapon(currentWeapon).reload(); } else { if (currentWeapon.weaponType == WeaponType.EXPLOSIVE){ ExplosiveWeapon(currentWeapon).reload(); }; }; }; } public function activate():void{ active = true; if (body){ body.WakeUp(); }; } public function falling():Boolean{ if (onTheGround){ return (false); }; if (((((!(onTheGround)) && (!((characterState == CharacterState.CLIMB))))) || (((((!(onTheGround)) && ((onTheLadderUp == -1)))) && ((onTheLadderDown == -1)))))){ body.m_linearDamping = 0; return (true); }; return (false); } override public function update():void{ onTheGround = body.touchedTheGround; position.x = (body.GetPosition().x * World.physScale); position.y = (body.GetPosition().y * World.physScale); angle = b2Math.radiansToDegrees(body.GetAngle()); body.bodyState = characterState; super.update(); if (characterState != CharacterState.DIE){ body.SetXForm(body.GetPosition(), 0); }; calculateDamage(); die(); if (currentWeapon){ currentWeapon.update(); }; checkShadow(); } public function walkRight():void{ var _local1:b2Vec2; if (ableToMoveRight){ if (faceState == FaceState.FACE_RIGHT){ moveForward = true; moveBackward = false; } else { if (faceState == FaceState.FACE_LEFT){ moveForward = false; moveBackward = true; }; }; body.SetLinearVelocity(new b2Vec2(speed, body.GetLinearVelocity().y)); runTimer.stop(); if (characterState != CharacterState.WALK){ if (!walkTimer.running){ walkTimer.start(); image.head.gotoAndStop("walk"); }; }; if (body.m_linearDamping > 0){ _local1 = body.GetPosition().Copy(); _local1.x = (_local1.x + (speed / 30)); body.SetXForm(_local1, body.GetAngle()); }; characterState = CharacterState.WALK; }; } public function changeWeapon(_arg1:Weapon):void{ if (currentWeapon){ if (currentWeapon.weaponType == WeaponType.RANGE){ if (RangeWeapon(currentWeapon).reloading){ return; }; } else { if ((((currentWeapon.weaponType == WeaponType.MELEE)) || ((currentWeapon.weaponType == WeaponType.THROW)))){ if (MeleeWeapon(currentWeapon).attacking){ return; }; } else { if (currentWeapon.weaponType == WeaponType.EXPLOSIVE){ if (ExplosiveWeapon(currentWeapon).throwing){ return; }; }; }; }; image.weaponHolderb.removeChild(currentWeapon.image); image.weaponHolderf.removeChild(currentWeapon.image2); currentWeapon = _arg1; currentWeapon.position = position; currentWeapon.screenPosition = screenPosition; image.weaponHolderb.addChild(currentWeapon.image); image.weaponHolderf.addChild(currentWeapon.image2); if (currentWeapon.weaponType == WeaponType.EXPLOSIVE){ ExplosiveWeapon(currentWeapon).checkWhichIdle(); } else { if (currentWeapon.weaponType == WeaponType.RANGE){ checkCurrentWeaponAmmo(); }; }; }; } public function animateRunBackward():void{ var _local1:int; _local1 = (runFrame + initialRunFrame); image.head.gotoAndStop((_local1 - runCounter)); image.torso.gotoAndStop((_local1 - runCounter)); image.leg.gotoAndStop((_local1 - runCounter)); runCounter++; if (runCounter > runFrame){ runCounter = 0; }; } } }//package p_char
Section 226
//CharacterState (p_char.CharacterState) package p_char { public class CharacterState { public static var DIE:String = "die"; public static var WALK:String = "walk"; public static var RUN:String = "run"; public static var JUMP:String = "jump"; public static var ATTACK:String = "attack"; public static var IDLE:String = "idle"; public static var CLIMB:String = "climb"; public static var FALL:String = "fall"; } }//package p_char
Section 227
//FaceState (p_char.FaceState) package p_char { public class FaceState { public static var FACE_LEFT:String = "faceLeft"; public static var FACE_RIGHT:String = "faceRight"; } }//package p_char
Section 228
//BuldozerPointer (p_crosshair.BuldozerPointer) package p_crosshair { import p_singleton.*; public class BuldozerPointer extends MousePointer { public function BuldozerPointer(){ image = new buldozerCursor(); type = MousePointerType.BULDOZER; World.getSingleton().menuRoot.addChild(image); addListener(); World.getSingleton().mousePointer = this; } } }//package p_crosshair
Section 229
//Crosshair (p_crosshair.Crosshair) package p_crosshair { import p_singleton.*; public class Crosshair extends MousePointer { public function Crosshair(){ image = new crosshair(); type = MousePointerType.CROSS; World.getSingleton().menuRoot.addChild(image); addListener(); World.getSingleton().mousePointer = this; } } }//package p_crosshair
Section 230
//HandCrosshair (p_crosshair.HandCrosshair) package p_crosshair { import p_singleton.*; public class HandCrosshair extends MousePointer { public function HandCrosshair(){ image = new handSign(); type = MousePointerType.HAND; World.getSingleton().menuRoot.addChild(image); addListener(); World.getSingleton().mousePointer = this; } } }//package p_crosshair
Section 231
//MousePointer (p_crosshair.MousePointer) package p_crosshair { import flash.events.*; import p_singleton.*; import flash.display.*; public class MousePointer { public var type:String; public var image:MovieClip; public function addListener():void{ if (!image.hasEventListener(Event.ENTER_FRAME)){ image.addEventListener(Event.ENTER_FRAME, movePointer); }; } public function removeListener():void{ if (image.hasEventListener(Event.ENTER_FRAME)){ image.removeEventListener(Event.ENTER_FRAME, movePointer); }; } public function destroy():void{ World.getSingleton().menuRoot.removeChild(image); removeListener(); } public function movePointer(_arg1:Event):void{ if (image.stage){ image.x = image.stage.mouseX; image.y = image.stage.mouseY; }; } } }//package p_crosshair
Section 232
//MousePointerType (p_crosshair.MousePointerType) package p_crosshair { public class MousePointerType { public static var CROSS:String = "cross"; public static var BULDOZER:String = "buldozer"; public static var TALK:String = "talk"; public static var HAND:String = "hand"; } }//package p_crosshair
Section 233
//TalkCrosshair (p_crosshair.TalkCrosshair) package p_crosshair { import flash.events.*; import p_singleton.*; import p_char.p_nonplayable.*; import flash.media.*; public class TalkCrosshair extends MousePointer { public var npc:NPCFriend; public var clicked:Boolean;// = false public function TalkCrosshair(){ clicked = false; super(); image = new talkSymbol(); type = MousePointerType.TALK; image.stay.visible = false; image.follow.visible = false; World.getSingleton().menuRoot.addChild(image); addListener(); } public function addClickListener():void{ image.stay.visible = true; image.follow.visible = true; if (!image.stay.hasEventListener(MouseEvent.CLICK)){ image.stay.addEventListener(MouseEvent.CLICK, setNpcStay); }; if (!image.follow.hasEventListener(MouseEvent.CLICK)){ image.follow.addEventListener(MouseEvent.CLICK, setNpcFollow); }; } public function setNpcStay(_arg1:MouseEvent):void{ var _local2:Sound; if (npc){ npc.follow = false; npc.setIdle(); }; removeClickListener(); addListener(); clicked = false; _local2 = new waitSound(); if (!World.getSingleton().muted){ _local2.play(); }; } override public function addListener():void{ super.addListener(); image.stay.visible = false; image.follow.visible = false; } public function setNpcFollow(_arg1:MouseEvent):void{ var _local2:Sound; if (npc){ npc.follow = true; }; removeClickListener(); addListener(); clicked = false; _local2 = new followSound(); if (!World.getSingleton().muted){ _local2.play(); }; } public function removeClickListener():void{ image.stay.visible = false; image.follow.visible = false; if (image.stay.hasEventListener(MouseEvent.CLICK)){ image.stay.removeEventListener(MouseEvent.CLICK, setNpcStay); }; if (image.follow.hasEventListener(MouseEvent.CLICK)){ image.follow.removeEventListener(MouseEvent.CLICK, setNpcFollow); }; } } }//package p_crosshair
Section 234
//Explosion (p_effect.Explosion) package p_effect { import Box2D.Common.Math.*; public class Explosion extends VisualEffect { public function Explosion(_arg1:int, _arg2:b2Vec2){ image = new explosion(); super(_arg1, _arg2); } } }//package p_effect
Section 235
//VisualEffect (p_effect.VisualEffect) package p_effect { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.display.*; import flash.utils.*; public class VisualEffect { public var timer:Timer; public var position:b2Vec2; public var lifeTime:int; public var image:MovieClip; public function VisualEffect(_arg1:int, _arg2:b2Vec2){ World.getSingleton().level.backGround.addChild(image); this.lifeTime = _arg1; this.position = _arg2.Copy(); image.x = _arg2.x; image.y = _arg2.y; timer = new Timer(100); timer.addEventListener(TimerEvent.TIMER, checkLifeTime); timer.start(); } public function checkLifeTime(_arg1:TimerEvent):void{ lifeTime--; if (lifeTime <= 0){ if (World.getSingleton().level.backGround.contains(image)){ World.getSingleton().level.backGround.removeChild(image); }; timer.stop(); timer.removeEventListener(TimerEvent.TIMER, checkLifeTime); }; } } }//package p_effect
Section 236
//Entity (p_entity.Entity) package p_entity { import Box2D.Common.Math.*; import p_singleton.*; import flash.display.*; public class Entity { public var position:b2Vec2; protected var _sceneRoot:Sprite; public var angle:Number; public var screenPosition:b2Vec2; public var image:MovieClip; public var direction:b2Vec2; public function Entity(){ _sceneRoot = World.getSingleton().sceneRoot; super(); position = new b2Vec2(); screenPosition = new b2Vec2(); } public function update():void{ if (image){ image.x = position.x; image.y = position.y; image.rotation = angle; }; } public function initRigidBody():void{ } } }//package p_entity
Section 237
//Floor (p_gamelevel.Floor) package p_gamelevel { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import p_char.*; import p_singleton.*; import flash.display.*; public class Floor extends MovieClip { public var friction:Number; public var bodyDef:b2BodyDef; public var restitution:Number; public var polygonDef:b2PolygonDef; public var body:b2Body; public var density:Number; public function Floor(){ density = 0; friction = 1; restitution = 0; initRigidBody(); } public function initRigidBody():void{ var _local1:b2World; var _local2:Number; _local1 = World.getSingleton().physicWorld; if (_local1){ _local2 = rotation; rotation = 0; polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((width / (2 * 30)), (height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = BodyType.FLOOR; rotation = _local2; bodyDef = new b2BodyDef(); bodyDef.userData = this; bodyDef.position.Set((x / World.physScale), (y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(rotation); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = BodyType.FLOOR; }; } } }//package p_gamelevel
Section 238
//GameLevel (p_gamelevel.GameLevel) package p_gamelevel { import Box2D.Dynamics.*; import p_char.*; import p_singleton.*; import flash.display.*; import org.idmedia.as3commons.util.*; import flash.utils.*; public class GameLevel { public var arrayOfEnemyClass:ArrayList; public var numOfStage:int; public var size:int; public var numOfTutorial:int; public var enemyNeedToBeKilled:int; public var enemySpawnerDelay:Number;// = 2000 public var backGround2:Ground; public var enemyKilled:int; public var enemyGround:Sprite; public var numOfDoor:int; public var backGround:Ground; public var playerGround:Sprite; public var arrayOfFriendClass:ArrayList; public var arrayOfStage:ArrayList; public var numOfSign:NumOfSign; public var bodyList:ArrayList; public var foreGround:Ground; public var maxBarricade:int; public var numOfFriend:int; public var middleGround:MovieClip; public function GameLevel(){ var _local1:int; var _local2:Object; var _local3:String; enemySpawnerDelay = 2000; super(); playerGround = new Sprite(); enemyGround = new Sprite(); bodyList = new ArrayList(); size = middleGround.numChildren; _local1 = 0; while (_local1 < size) { _local2 = middleGround.getChildAt(_local1); _local3 = getQualifiedClassName(middleGround.getChildAt(_local1)); if (_local3 != "flash.display::Shape"){ if (_local2.body){ bodyList.add(_local2.body); }; }; _local1++; }; } public function findLadderDown(_arg1:int, _arg2:int):int{ return (-1); } public function getTutorialContent(_arg1:int):String{ return ("None"); } public function findNearestLadderDown(_arg1:Character, _arg2:int, _arg3:int):int{ return (-1); } public function findLadderUp(_arg1:int, _arg2:int):int{ return (-1); } public function getFriendClass(_arg1:int):String{ return ("None"); } public function update():void{ } public function detachChild():void{ if (playerGround){ World.getSingleton().sceneRoot.removeChild(playerGround); }; if (enemyGround){ World.getSingleton().sceneRoot.removeChild(enemyGround); }; if (backGround2){ World.getSingleton().sceneRoot.removeChild(backGround2); }; if (backGround){ World.getSingleton().sceneRoot.removeChild(backGround); }; if (middleGround){ World.getSingleton().sceneRoot.removeChild(middleGround); }; if (foreGround){ World.getSingleton().sceneRoot.removeChild(foreGround); }; } public function getLevelRandomItemNumber():Number{ return (-1); } public function attachChild():void{ if (backGround2){ World.getSingleton().sceneRoot.addChild(backGround2); }; if (backGround){ World.getSingleton().sceneRoot.addChild(backGround); }; if (middleGround){ World.getSingleton().sceneRoot.addChild(middleGround); middleGround.visible = false; }; World.getSingleton().sceneRoot.addChild(enemyGround); World.getSingleton().sceneRoot.addChild(playerGround); if (foreGround){ World.getSingleton().sceneRoot.addChild(foreGround); }; } public function destroyBodies():void{ var _local1:int; var _local2:int; var _local3:b2Body; _local1 = 0; _local2 = bodyList.size(); _local1 = (_local2 - 1); while (_local1 >= 0) { World.getSingleton().physicWorld.DestroyBody(bodyList.get(_local1)); _local3 = bodyList.get(_local1); _local3 = null; bodyList.removeAt(_local1); _local1--; }; } public function findNearestLadderUp(_arg1:Character, _arg2:int, _arg3:int):int{ return (-1); } public function findNearestLadder(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; var _local5:Number; var _local6:Number; var _local7:int; if (middleGround){ _local4 = _arg2; _local5 = 100000; while (_local4 < (_arg2 + _arg3)) { _local6 = (_arg1.position.x - middleGround[("ladder" + _local4)].x); _local6 = Math.abs(_local6); if (_local6 < _local5){ _local5 = _local6; _local7 = _local4; }; _local4++; }; return (_local7); }; return (-1); } public function getEnemyClass():String{ return ("None"); } public function findSpawnPoint(_arg1:int):int{ if (arrayOfStage.get(_arg1).numOfEnemySpawnPoint <= 0){ return (-1); }; return ((((Math.floor((Math.random() * 10)) + 1) % arrayOfStage.get(_arg1).numOfEnemySpawnPoint) + arrayOfStage.get(_arg1).initialEnemySpawnPoint)); } } }//package p_gamelevel
Section 239
//Ground (p_gamelevel.Ground) package p_gamelevel { import flash.display.*; public class Ground extends MovieClip { public var speed:int;// = 1 public var stageSign0:MovieClip; public var tutor0:MovieClip; public var tutor1:MovieClip; public var stageSign1:MovieClip; public var tutor4:MovieClip; public var tutor2:MovieClip; public var tutor3:MovieClip; public function Ground(){ speed = 1; super(); } } }//package p_gamelevel
Section 240
//Level1 (p_gamelevel.Level1) package p_gamelevel { import p_singleton.*; import org.idmedia.as3commons.util.*; public class Level1 extends GameLevel { public function Level1(){ var _local1:int; enemyKilled = 0; enemyNeedToBeKilled = 0; middleGround = new middleGroundLevel1(); backGround = Ground(new backGroundLevel1()); foreGround = Ground(new foreGroundLevel1()); arrayOfStage = new ArrayList(); arrayOfEnemyClass = new ArrayList(); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie01"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie02"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie03"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie04"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie05"); if (World.getSingleton().waveCounter >= 3){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieCrawler01"); }; if (World.getSingleton().waveCounter >= 7){ arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie06"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie07"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie08"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie09"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie10"); }; if (World.getSingleton().waveCounter >= 12){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieAxe"); }; arrayOfFriendClass = new ArrayList(); arrayOfFriendClass.add("p_char.p_nonplayable::NPCFriendTest"); numOfStage = 1; numOfFriend = 1; maxBarricade = 2; _local1 = 0; while (_local1 < numOfStage) { foreGround[("stageSign" + _local1)].alpha = 1; _local1++; }; numOfDoor = 0; if (World.getSingleton().waveNum == 0){ numOfTutorial = 5; } else { numOfTutorial = 0; }; numOfSign = new NumOfSign(); numOfSign.numOfFloor = 2; numOfSign.numOfWall = 2; numOfSign.numOfLadder = 0; numOfSign.numOfEnemySpawnPoint = 2; numOfSign.numOfLantaiSign = 1; numOfSign.numOfEnemies = 500; numOfSign.numOfNPC = 0; numOfSign.initialFloor = 0; numOfSign.initialWall = 0; numOfSign.initialLadder = 0; numOfSign.initialEnemySpawnPoint = 0; numOfSign.initialLantaiSign = 0; numOfSign.initialEnemies = 0; numOfSign.initialNPC = 0; numOfSign.enemyCounter = 0; arrayOfStage.add(numOfSign); enemyNeedToBeKilled = (enemyNeedToBeKilled + numOfSign.numOfEnemies); numOfSign = new NumOfSign(); numOfSign.numOfFloor = 1; numOfSign.numOfWall = 2; numOfSign.numOfLadder = 0; numOfSign.numOfEnemySpawnPoint = 0; numOfSign.numOfLantaiSign = 1; numOfSign.numOfEnemies = 0; numOfSign.numOfNPC = 0; numOfSign.initialFloor = 1; numOfSign.initialWall = 2; numOfSign.initialLadder = 0; numOfSign.initialEnemySpawnPoint = 0; numOfSign.initialLantaiSign = 1; numOfSign.initialEnemies = 0; numOfSign.initialNPC = 0; numOfSign.enemyCounter = 0; arrayOfStage.add(numOfSign); enemyNeedToBeKilled = (enemyNeedToBeKilled + numOfSign.numOfEnemies); super(); enemySpawnerDelay = 1000; } override public function getTutorialContent(_arg1:int):String{ if (_arg1 == 0){ return ("click on the START button to start level"); }; if (_arg1 == 1){ return ("press A, D or Left, Right arrow to move around\nSPACE to jump"); }; if (_arg1 == 2){ return ("press I to open inventory"); }; if (_arg1 == 3){ return ("buy & place barricades to help you survive"); }; if (_arg1 == 4){ return ("Press 1 2 3 4 to change weapon"); }; return ("None"); } override public function findLadderUp(_arg1:int, _arg2:int):int{ return (-1); } override public function getFriendClass(_arg1:int):String{ if ((((_arg1 < numOfFriend)) && ((_arg1 < arrayOfFriendClass.size())))){ return (arrayOfFriendClass.get(_arg1)); }; return ("None"); } override public function getLevelRandomItemNumber():Number{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 10) % 10); if (_local1 == 1){ return (0); }; return (-1); } override public function getEnemyClass():String{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 1) % arrayOfEnemyClass.size()); return (arrayOfEnemyClass.get(_local1)); } override public function findLadderDown(_arg1:int, _arg2:int):int{ return (-1); } } }//package p_gamelevel
Section 241
//Level2 (p_gamelevel.Level2) package p_gamelevel { import p_char.*; import p_singleton.*; import org.idmedia.as3commons.util.*; public class Level2 extends GameLevel { public function Level2(){ var _local1:int; enemyKilled = 0; enemyNeedToBeKilled = 0; middleGround = new middleGroundLevel2(); backGround = Ground(new backGroundLevel2()); foreGround = Ground(new foreGroundLevel2()); arrayOfStage = new ArrayList(); arrayOfEnemyClass = new ArrayList(); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie01"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie02"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie03"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie04"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie05"); if (World.getSingleton().waveCounter >= 3){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieCrawler01"); }; if (World.getSingleton().waveCounter >= 7){ arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie06"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie07"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie08"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie09"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie10"); }; if (World.getSingleton().waveCounter >= 12){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieAxe"); }; arrayOfFriendClass = new ArrayList(); arrayOfFriendClass.add("p_char.p_nonplayable::NPCFriendTest"); numOfStage = 1; numOfFriend = 1; maxBarricade = 2; _local1 = 0; while (_local1 < numOfStage) { foreGround[("stageSign" + _local1)].alpha = 1; _local1++; }; numOfDoor = 0; if (World.getSingleton().waveNum == 0){ numOfTutorial = 5; } else { numOfTutorial = 0; }; numOfSign = new NumOfSign(); numOfSign.numOfFloor = 3; numOfSign.numOfWall = 4; numOfSign.numOfLadder = 1; numOfSign.numOfEnemySpawnPoint = 5; numOfSign.numOfLantaiSign = 2; numOfSign.numOfEnemies = 50; numOfSign.numOfNPC = 0; numOfSign.initialFloor = 0; numOfSign.initialWall = 0; numOfSign.initialLadder = 0; numOfSign.initialEnemySpawnPoint = 0; numOfSign.initialLantaiSign = 0; numOfSign.initialEnemies = 0; numOfSign.initialNPC = 0; numOfSign.enemyCounter = 0; arrayOfStage.add(numOfSign); enemyNeedToBeKilled = (enemyNeedToBeKilled + numOfSign.numOfEnemies); super(); enemySpawnerDelay = 1000; } override public function getTutorialContent(_arg1:int):String{ if (_arg1 == 0){ return ("set up your barricade before starting the day"); }; if (_arg1 == 1){ return ("click & drag barricades to move them around"); }; if (_arg1 == 2){ return ("press W, S or Up, Down arrow to climb up and down stairs"); }; if (_arg1 == 3){ return ("do not forget to buy ammo"); }; if (_arg1 == 4){ return ("when you ran out of ammo\npress '3' to use melee weapon"); }; return ("None"); } override public function findNearestLadderDown(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 1){ _local4 = findNearestLadder(_arg1, 0, 1); return (_local4); }; return (-1); } override public function findLadderUp(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 0){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return (_local3); }; return (-1); } override public function getFriendClass(_arg1:int):String{ if ((((_arg1 < numOfFriend)) && ((_arg1 < arrayOfFriendClass.size())))){ return (arrayOfFriendClass.get(_arg1)); }; return ("None"); } override public function getLevelRandomItemNumber():Number{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 10) % 10); if (_local1 == 1){ return (0); }; return (-1); } override public function findNearestLadderUp(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 0){ _local4 = findNearestLadder(_arg1, 0, 1); return (_local4); }; return (-1); } override public function getEnemyClass():String{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 1) % arrayOfEnemyClass.size()); return (arrayOfEnemyClass.get(_local1)); } override public function findLadderDown(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 1){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return (_local3); }; return (-1); } } }//package p_gamelevel
Section 242
//Level3 (p_gamelevel.Level3) package p_gamelevel { import p_char.*; import p_singleton.*; import org.idmedia.as3commons.util.*; public class Level3 extends GameLevel { public function Level3(){ var _local1:int; enemyKilled = 0; enemyNeedToBeKilled = 0; middleGround = new middleGroundLevel3(); backGround = Ground(new backGroundLevel3()); foreGround = Ground(new foreGroundLevel3()); arrayOfStage = new ArrayList(); arrayOfEnemyClass = new ArrayList(); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie01"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie02"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie03"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie04"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie05"); if (World.getSingleton().waveCounter >= 3){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieCrawler01"); }; if (World.getSingleton().waveCounter >= 7){ arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie06"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie07"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie08"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie09"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie10"); }; if (World.getSingleton().waveCounter >= 12){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieAxe"); }; arrayOfFriendClass = new ArrayList(); arrayOfFriendClass.add("p_char.p_nonplayable::NPCFriendTest"); numOfStage = 1; numOfFriend = 1; maxBarricade = 2; _local1 = 0; while (_local1 < numOfStage) { foreGround[("stageSign" + _local1)].alpha = 1; _local1++; }; numOfDoor = 0; numOfTutorial = 0; numOfSign = new NumOfSign(); numOfSign.numOfFloor = 8; numOfSign.numOfWall = 5; numOfSign.numOfLadder = 5; numOfSign.numOfEnemySpawnPoint = 6; numOfSign.numOfLantaiSign = 4; numOfSign.numOfEnemies = 50; numOfSign.numOfNPC = 0; numOfSign.initialFloor = 0; numOfSign.initialWall = 0; numOfSign.initialLadder = 0; numOfSign.initialEnemySpawnPoint = 0; numOfSign.initialLantaiSign = 0; numOfSign.initialEnemies = 0; numOfSign.initialNPC = 0; numOfSign.enemyCounter = 0; arrayOfStage.add(numOfSign); enemyNeedToBeKilled = (enemyNeedToBeKilled + numOfSign.numOfEnemies); super(); enemySpawnerDelay = 1000; } override public function getTutorialContent(_arg1:int):String{ if (_arg1 == 0){ return ("Open the door by pressing 'E' button"); }; if (_arg1 == 1){ return ("Move around by pressing \"W,A,S,D\" or arrow keys\n Aim and attack by using the mouse"); }; if (_arg1 == 2){ return ("Open up the inventory by using 'I' button\n You can drag and drop the weapon to change the equipped weapon"); }; if (_arg1 == 3){ return ("Press 'Q' to enter 'barricade builder' mode\n You can activate the box above you by clicking and dragging it\n Hint: use the box to slow down the enemies"); }; if (_arg1 == 4){ return (("Press '1' to change to primary weapon\nPress '2' to change to secondary weapon\n" + "Press '3' to change to melee weapon\nPress '4' to change to explosive weapon")); }; return ("None"); } override public function findNearestLadderDown(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 1){ _local4 = findNearestLadder(_arg1, 0, 1); return (_local4); }; if (_arg3 == 2){ _local4 = findNearestLadder(_arg1, 1, 2); return (_local4); }; if (_arg3 == 3){ _local4 = findNearestLadder(_arg1, 3, 2); return (_local4); }; return (-1); } override public function findLadderUp(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 0){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return (_local3); }; if (_arg2 == 1){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return ((_local3 + 1)); }; if (_arg2 == 2){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return ((_local3 + 3)); }; return (-1); } override public function getFriendClass(_arg1:int):String{ if ((((_arg1 < numOfFriend)) && ((_arg1 < arrayOfFriendClass.size())))){ return (arrayOfFriendClass.get(_arg1)); }; return ("None"); } override public function getLevelRandomItemNumber():Number{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 10) % 10); if (_local1 == 1){ return (0); }; return (-1); } override public function findNearestLadderUp(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 0){ _local4 = findNearestLadder(_arg1, 0, 1); return (_local4); }; if (_arg3 == 1){ _local4 = findNearestLadder(_arg1, 1, 2); return (_local4); }; if (_arg3 == 2){ _local4 = findNearestLadder(_arg1, 3, 2); return (_local4); }; return (-1); } override public function getEnemyClass():String{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 1) % arrayOfEnemyClass.size()); return (arrayOfEnemyClass.get(_local1)); } override public function findLadderDown(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 1){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return (_local3); }; if (_arg2 == 2){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return ((_local3 + 1)); }; if (_arg2 == 3){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return ((_local3 + 3)); }; return (-1); } } }//package p_gamelevel
Section 243
//Level4 (p_gamelevel.Level4) package p_gamelevel { import p_char.*; import p_singleton.*; import org.idmedia.as3commons.util.*; public class Level4 extends GameLevel { public function Level4(){ var _local1:int; enemyKilled = 0; enemyNeedToBeKilled = 0; middleGround = new middleGroundLevel4(); backGround = Ground(new backGroundLevel4()); foreGround = Ground(new foreGroundLevel4()); arrayOfStage = new ArrayList(); arrayOfEnemyClass = new ArrayList(); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie01"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie02"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie03"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie04"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie05"); if (World.getSingleton().waveCounter >= 3){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieCrawler01"); }; if (World.getSingleton().waveCounter >= 7){ arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie06"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie07"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie08"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie09"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie10"); }; if (World.getSingleton().waveCounter >= 12){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieAxe"); }; arrayOfFriendClass = new ArrayList(); arrayOfFriendClass.add("p_char.p_nonplayable::NPCFriendTest"); numOfStage = 1; numOfFriend = 1; maxBarricade = 2; _local1 = 0; while (_local1 < numOfStage) { foreGround[("stageSign" + _local1)].alpha = 1; _local1++; }; numOfDoor = 0; numOfTutorial = 0; numOfSign = new NumOfSign(); numOfSign.numOfFloor = 6; numOfSign.numOfWall = 6; numOfSign.numOfLadder = 3; numOfSign.numOfEnemySpawnPoint = 7; numOfSign.numOfLantaiSign = 3; numOfSign.numOfEnemies = 50; numOfSign.numOfNPC = 0; numOfSign.initialFloor = 0; numOfSign.initialWall = 0; numOfSign.initialLadder = 0; numOfSign.initialEnemySpawnPoint = 0; numOfSign.initialLantaiSign = 0; numOfSign.initialEnemies = 0; numOfSign.initialNPC = 0; numOfSign.enemyCounter = 0; arrayOfStage.add(numOfSign); enemyNeedToBeKilled = (enemyNeedToBeKilled + numOfSign.numOfEnemies); super(); enemySpawnerDelay = 1000; } override public function getTutorialContent(_arg1:int):String{ if (_arg1 == 0){ return ("Open the door by pressing 'E' button"); }; if (_arg1 == 1){ return ("Move around by pressing \"W,A,S,D\" or arrow keys\n Aim and attack by using the mouse"); }; if (_arg1 == 2){ return ("Open up the inventory by using 'I' button\n You can drag and drop the weapon to change the equipped weapon"); }; if (_arg1 == 3){ return ("Press 'Q' to enter 'barricade builder' mode\n You can activate the box above you by clicking and dragging it\n Hint: use the box to slow down the enemies"); }; if (_arg1 == 4){ return (("Press '1' to change to primary weapon\nPress '2' to change to secondary weapon\n" + "Press '3' to change to melee weapon\nPress '4' to change to explosive weapon")); }; return ("None"); } override public function findNearestLadderDown(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 1){ _local4 = findNearestLadder(_arg1, 0, 1); return (_local4); }; if (_arg3 == 2){ _local4 = findNearestLadder(_arg1, 1, 2); return (_local4); }; return (-1); } override public function findLadderUp(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 0){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return (_local3); }; if (_arg2 == 1){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return ((_local3 + 1)); }; return (-1); } override public function getFriendClass(_arg1:int):String{ if ((((_arg1 < numOfFriend)) && ((_arg1 < arrayOfFriendClass.size())))){ return (arrayOfFriendClass.get(_arg1)); }; return ("None"); } override public function getLevelRandomItemNumber():Number{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 10) % 10); if (_local1 == 1){ return (0); }; return (-1); } override public function findNearestLadderUp(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 0){ _local4 = findNearestLadder(_arg1, 0, 1); return (_local4); }; if (_arg3 == 1){ _local4 = findNearestLadder(_arg1, 1, 2); return (_local4); }; return (-1); } override public function getEnemyClass():String{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 1) % arrayOfEnemyClass.size()); return (arrayOfEnemyClass.get(_local1)); } override public function findLadderDown(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 1){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return (_local3); }; if (_arg2 == 2){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return ((_local3 + 1)); }; return (-1); } } }//package p_gamelevel
Section 244
//Level5 (p_gamelevel.Level5) package p_gamelevel { import p_char.*; import p_singleton.*; import org.idmedia.as3commons.util.*; public class Level5 extends GameLevel { public function Level5(){ var _local1:int; enemyKilled = 0; enemyNeedToBeKilled = 0; middleGround = new middleGroundLevel5(); backGround = Ground(new backGroundLevel5()); foreGround = Ground(new foreGroundLevel5()); arrayOfStage = new ArrayList(); arrayOfEnemyClass = new ArrayList(); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie01"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie02"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie03"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie04"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie05"); if (World.getSingleton().waveCounter >= 3){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieCrawler01"); }; if (World.getSingleton().waveCounter >= 7){ arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie06"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie07"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie08"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie09"); arrayOfEnemyClass.add("p_char.p_nonplayable::Zombie10"); }; if (World.getSingleton().waveCounter >= 12){ arrayOfEnemyClass.add("p_char.p_nonplayable::ZombieAxe"); }; arrayOfFriendClass = new ArrayList(); arrayOfFriendClass.add("p_char.p_nonplayable::NPCFriendTest"); numOfStage = 1; numOfFriend = 1; maxBarricade = 2; _local1 = 0; while (_local1 < numOfStage) { foreGround[("stageSign" + _local1)].alpha = 1; _local1++; }; numOfDoor = 0; numOfTutorial = 0; numOfSign = new NumOfSign(); numOfSign.numOfFloor = 0; numOfSign.numOfWall = 0; numOfSign.numOfLadder = 3; numOfSign.numOfEnemySpawnPoint = 6; numOfSign.numOfLantaiSign = 3; numOfSign.numOfEnemies = 50; numOfSign.numOfNPC = 0; numOfSign.initialFloor = 0; numOfSign.initialWall = 0; numOfSign.initialLadder = 0; numOfSign.initialEnemySpawnPoint = 0; numOfSign.initialLantaiSign = 0; numOfSign.initialEnemies = 0; numOfSign.initialNPC = 0; numOfSign.enemyCounter = 0; arrayOfStage.add(numOfSign); enemyNeedToBeKilled = (enemyNeedToBeKilled + numOfSign.numOfEnemies); super(); enemySpawnerDelay = 1000; } override public function getTutorialContent(_arg1:int):String{ if (_arg1 == 0){ return ("Open the door by pressing 'E' button"); }; if (_arg1 == 1){ return ("Move around by pressing \"W,A,S,D\" or arrow keys\n Aim and attack by using the mouse"); }; if (_arg1 == 2){ return ("Open up the inventory by using 'I' button\n You can drag and drop the weapon to change the equipped weapon"); }; if (_arg1 == 3){ return ("Press 'Q' to enter 'barricade builder' mode\n You can activate the box above you by clicking and dragging it\n Hint: use the box to slow down the enemies"); }; if (_arg1 == 4){ return (("Press '1' to change to primary weapon\nPress '2' to change to secondary weapon\n" + "Press '3' to change to melee weapon\nPress '4' to change to explosive weapon")); }; return ("None"); } override public function findNearestLadderDown(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 1){ _local4 = findNearestLadder(_arg1, 0, 2); return (_local4); }; if (_arg3 == 2){ _local4 = findNearestLadder(_arg1, 2, 1); return (_local4); }; return (-1); } override public function findLadderUp(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 0){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return (_local3); }; if (_arg2 == 1){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return ((_local3 + 2)); }; return (-1); } override public function getFriendClass(_arg1:int):String{ if ((((_arg1 < numOfFriend)) && ((_arg1 < arrayOfFriendClass.size())))){ return (arrayOfFriendClass.get(_arg1)); }; return ("None"); } override public function getLevelRandomItemNumber():Number{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 10) % 10); if (_local1 == 1){ return (0); }; return (-1); } override public function findNearestLadderUp(_arg1:Character, _arg2:int, _arg3:int):int{ var _local4:int; if (_arg3 == 0){ _local4 = findNearestLadder(_arg1, 0, 2); return (_local4); }; if (_arg3 == 1){ _local4 = findNearestLadder(_arg1, 2, 1); return (_local4); }; return (-1); } override public function getEnemyClass():String{ var _local1:int; _local1 = 0; _local1 = ((Math.floor((Math.random() * 100)) + 1) % arrayOfEnemyClass.size()); return (arrayOfEnemyClass.get(_local1)); } override public function findLadderDown(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg2 == 1){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 2); return (_local3); }; if (_arg2 == 2){ _local3 = ((Math.floor((Math.random() * 10)) + 1) % 1); return ((_local3 + 2)); }; return (-1); } } }//package p_gamelevel
Section 245
//NumOfSign (p_gamelevel.NumOfSign) package p_gamelevel { public class NumOfSign { public var numOfEnemySpawnPoint:int; public var initialEnemies:int; public var initialLadder:int; public var enemyCounter:int; public var numOfFloor:int; public var initialEnemySpawnPoint:int; public var numOfLantaiSign:int; public var numOfNPC:int; public var numOfWall:int; public var initialFloor:int; public var numOfEnemies:int; public var initialLantaiSign:int; public var initialWall:int; public var initialNPC:int; public var numOfLadder:int; } }//package p_gamelevel
Section 246
//PlayerLimit (p_gamelevel.PlayerLimit) package p_gamelevel { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import p_char.*; import p_singleton.*; import flash.display.*; public class PlayerLimit extends MovieClip { public var friction:Number; public var bodyDef:b2BodyDef; public var restitution:Number; public var polygonDef:b2PolygonDef; public var body:b2Body; public var density:Number; public function PlayerLimit(){ density = 0; friction = 0; restitution = 0; initRigidBody(); } public function initRigidBody():void{ var _local1:b2World; var _local2:Number; _local1 = World.getSingleton().physicWorld; if (_local1){ _local2 = rotation; rotation = 0; polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((width / (2 * 30)), (height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = BodyType.PLAYERLIMIT; rotation = _local2; bodyDef = new b2BodyDef(); bodyDef.userData = this; bodyDef.position.Set((x / World.physScale), (y / World.physScale)); bodyDef.angle = b2Math.degreesToRadians(rotation); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = BodyType.PLAYERLIMIT; }; } } }//package p_gamelevel
Section 247
//BarricadeState (p_gameManager.BarricadeState) package p_gameManager { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.display.*; import p_char.p_playable.*; import p_char.p_nonplayable.*; import p_levelManager.*; import flash.media.*; import p_crosshair.*; import p_menuBar.*; import p_billboard.*; import p_util.*; import input.*; import flash.ui.*; import p_barricade.*; public class BarricadeState extends GameManager { public var saveShow:SaveShow; public var bottomMenu:MenuBar; public var spaceBarPressed:Boolean; public var crossHair:Crosshair; public var barricadeShop:BarricadeShop; public var handCrossHair:HandCrosshair; public var backToMainMenu:Boolean; public var weaponInventory:WeaponInventory; public var keyPoll:KeyPoll; public var talkCrosshair:TalkCrosshair; public var player:PlayableCharacter; public var mouseJoint:b2MouseJoint; public var npcFriend:NPCFriend; public var escPressed:Boolean; public var inventoryMode:Boolean; public var buldozerSound:Sound; public var iPressed:Boolean; public var buldozerMode:Boolean;// = false public var mousePressed:Boolean; public var buldozerHair:BuldozerPointer; public function BarricadeState(_arg1:MovieClip){ buldozerMode = false; iPressed = false; escPressed = false; inventoryMode = false; backToMainMenu = false; spaceBarPressed = false; super(_arg1); World.getSingleton().waveTime = World.getSingleton().waveTimeEach; World.getSingleton().setFocusToStage(); init(); buldozerSound = new SellSound(); World.getSingleton().saveGame(); saveShow = new SaveShow(30); } public function setBackToMainMenu2(_arg1:MouseEvent):void{ weaponInventory.destroy(); handCrossHair.destroy(); talkCrosshair.destroy(); buldozerHair.destroy(); Mouse.show(); World.getSingleton().removeEventListener(WorldEvent.ON_INIT, onInit); World.getSingleton().removeEventListener(WorldEvent.ON_UPDATE, onUpdate); this.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); this.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel); World.getSingleton().menuBar.image.infoBox.visible = false; barricadeShop.image.buldozerButton.removeEventListener(MouseEvent.CLICK, modeBuldozer); barricadeShop.image.visible = true; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.backToMainMenuButton.removeEventListener(MouseEvent.CLICK, setBackToMainMenu2); World.getSingleton().menuBar.image.optionScreen.closeBtn.removeEventListener(MouseEvent.CLICK, closeOptionScreen); World.getSingleton().menuBar.image.optionScreen.lowButton.removeEventListener(MouseEvent.CLICK, setLowQuality); World.getSingleton().menuBar.image.optionScreen.mediumButton.removeEventListener(MouseEvent.CLICK, setMediumQuality); World.getSingleton().menuBar.image.optionScreen.highButton.removeEventListener(MouseEvent.CLICK, setHighQuality); if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.body){ World.getSingleton().physicWorld.DestroyBody(World.getSingleton().playedCharacter.body); World.getSingleton().playedCharacter.body = null; }; World.getSingleton().players.remove(World.getSingleton().playedCharacter); World.getSingleton().playedCharacter = null; }; setBackToMainMenu(_arg1); } public function initPlayer():void{ if (World.getSingleton().playedCharacter == null){ player = new FemaleChar(); player.initRigidBody(); World.getSingleton().players.add(player); player.changeWeapon(player.primaryWeapon); player.currentWeaponNumber = 1; World.getSingleton().playedCharacter = player; } else { player = PlayableCharacter(World.getSingleton().playedCharacter); if (!player.body){ player.initRigidBody(); }; if (!World.getSingleton().players.contains(player)){ World.getSingleton().players.add(player); }; }; World.getSingleton().level.playerGround.addChild(player.image); if ((((((World.getSingleton().waveNum == 0)) || ((player.position.y < 50)))) || (World.getSingleton().continuing))){ World.getSingleton().continuing = false; player.position.x = (MovieClip(World.getSingleton().level.middleGround).spawnPoint.x + World.getSingleton().level.middleGround.x); player.position.y = (MovieClip(World.getSingleton().level.middleGround).spawnPoint.y + World.getSingleton().level.middleGround.y); player.body.SetXForm(new b2Vec2((player.position.x / World.physScale), (player.position.y / World.physScale)), 0); }; weaponInventory = new WeaponInventory(player); weaponInventory.image.visible = false; player.setIdle(); player.health = player.maxHealth; } public function modeBuldozer(_arg1:MouseEvent):void{ if (buldozerMode){ buldozerMode = false; World.getSingleton().mousePointer = handCrossHair; handCrossHair.image.visible = true; buldozerHair.image.visible = false; barricadeShop.image.buldozerButton.gotoAndStop(1); } else { buldozerMode = true; World.getSingleton().mousePointer = buldozerHair; handCrossHair.image.visible = false; buldozerHair.image.visible = true; barricadeShop.image.buldozerButton.gotoAndStop(2); }; } public function initEventListener():void{ keyPoll = new KeyPoll(this.stage); this.stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true); this.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true); this.stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel, false, 0, true); } public function checkShopFinish():Boolean{ if (barricadeShop){ if (barricadeShop.finish){ barricadeShop.finish = false; barricadeShop.destroy(); return (true); }; return (false); //unresolved jump }; return (false); } public function initLevel():void{ var _local1:int; _local1 = World.getSingleton().currentLevelNumber; World.getSingleton().changeLevel(LevelManager.getSingleton().getLevel(_local1)); } public function destroyEverything(_arg1:Boolean=true, _arg2=true):void{ var _local3:int; var _local4:int; _local3 = 0; _local4 = 0; _local4 = World.getSingleton().enemies.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().enemies.get(_local3).health = 0; World.getSingleton().enemies.get(_local3).deathTime = 0; World.getSingleton().enemies.get(_local3).update(); _local3--; }; if (_arg1){ _local4 = World.getSingleton().npcs.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().npcs.get(_local3).health = 0; World.getSingleton().npcs.get(_local3).deathTime = 0; World.getSingleton().npcs.get(_local3).update(); _local3--; }; }; if (_arg2){ _local4 = World.getSingleton().barricades.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().barricades.get(_local3).health = 0; World.getSingleton().barricades.get(_local3).deathTime = 0; World.getSingleton().barricades.get(_local3).update(); _local3--; }; }; _local4 = World.getSingleton().itemPickUps.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().itemPickUps.get(_local3).destroy(); _local3--; }; if (keyPoll){ keyPoll.destroy(); }; } public function setMediumQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.MEDIUM; World.getSingleton().quality = movieClip.stage.quality; } public function crossHairNpcCollision():void{ var _local1:int; var _local2:int; var _local3:NPCFriend; if (World.getSingleton().mousePointer){ _local1 = World.getSingleton().npcs.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { _local3 = World.getSingleton().npcs.get(_local2); if (PixelCollision.isColliding(_local3.image.head, handCrossHair.image, World.getSingleton().sceneRoot.stage)){ if (((!(talkCrosshair.clicked)) && (!(inventoryMode)))){ talkCrosshair.npc = _local3; handCrossHair.image.visible = false; talkCrosshair.image.visible = true; World.getSingleton().mousePointer = talkCrosshair; Mouse.hide(); }; break; } else { if (!talkCrosshair.clicked){ handCrossHair.image.visible = true; talkCrosshair.image.visible = false; World.getSingleton().mousePointer = handCrossHair; Mouse.hide(); }; }; _local2--; }; }; } public function onEnterFrame(_arg1:Event):void{ checkInput(); } override public function update():GameManager{ if (checkShopFinish()){ setBarricadesToHeavy(); destroy(); detachFromRoot(); return (new InGameState(movieClip)); }; if (backToMainMenu){ World.getSingleton().gameStarted = false; World.getSingleton().gameEnded = false; Mouse.show(); detachFromRoot(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new MainMenuState(movieClip)); } else { crossHairNpcCollision(); }; return (!NULL!); } public function initBarricades():void{ var _local1:int; var _local2:int; var _local3:b2Body; var _local4:b2Shape; _local1 = 0; _local2 = World.getSingleton().barricades.size(); while (_local1 < _local2) { if (World.getSingleton().barricades.get(_local1).body){ _local3 = World.getSingleton().barricades.get(_local1).body; _local4 = _local3.m_shapeList; while (_local4) { _local4.m_density = 1; _local4.m_filter.groupIndex = BodyType.PLAYER; _local4 = _local4.m_next; }; _local3.SetMassFromShapes(); }; if (World.getSingleton().level){ World.getSingleton().level.backGround.addChild(World.getSingleton().barricades.get(_local1)); }; _local1++; }; } public function showOptionScreen():void{ World.getSingleton().menuBar.image.optionScreen.visible = true; World.getSingleton().menuBar.image.optionScreen.backToMainMenuButton.addEventListener(MouseEvent.CLICK, setBackToMainMenu2); World.getSingleton().menuBar.image.optionScreen.closeBtn.addEventListener(MouseEvent.CLICK, closeOptionScreen); World.getSingleton().menuBar.image.optionScreen.lowButton.addEventListener(MouseEvent.CLICK, setLowQuality); World.getSingleton().menuBar.image.optionScreen.mediumButton.addEventListener(MouseEvent.CLICK, setMediumQuality); World.getSingleton().menuBar.image.optionScreen.highButton.addEventListener(MouseEvent.CLICK, setHighQuality); barricadeShop.image.visible = false; World.getSingleton().pauseGame(); if (World.getSingleton().muted){ World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(1); } else { World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(2); }; World.getSingleton().menuBar.image.optionScreen.soundButton.addEventListener(MouseEvent.CLICK, soundMute); onPause(); talkCrosshair.removeClickListener(); talkCrosshair.addListener(); talkCrosshair.clicked = false; } public function onResume():void{ this.removeEventListener(Event.ENTER_FRAME, onEnterFrame); } public function onMouseWheel(_arg1:MouseEvent):void{ var _local2:PlayableCharacter; if (World.getSingleton().playedCharacter){ _local2 = PlayableCharacter(World.getSingleton().playedCharacter); if (_arg1.delta > 0){ player.currentWeaponNumber++; if (player.currentWeaponNumber > 4){ player.currentWeaponNumber = 1; }; } else { if (_arg1.delta < 0){ player.currentWeaponNumber--; if (player.currentWeaponNumber < 1){ player.currentWeaponNumber = 4; }; }; }; if (player.currentWeaponNumber == 1){ if (player.primaryWeapon){ player.changeWeapon(player.primaryWeapon); } else { onMouseWheel(_arg1); }; } else { if (player.currentWeaponNumber == 2){ if (player.secondaryWeapon){ player.changeWeapon(player.secondaryWeapon); } else { onMouseWheel(_arg1); }; } else { if (player.currentWeaponNumber == 3){ if (player.meleeWeapon){ player.changeWeapon(player.meleeWeapon); } else { onMouseWheel(_arg1); }; } else { if (player.currentWeaponNumber == 4){ if (player.explosiveWeapon){ player.changeWeapon(player.explosiveWeapon); } else { onMouseWheel(_arg1); }; }; }; }; }; }; } public function initMenuBar():void{ if (!World.getSingleton().menuBar){ bottomMenu = new MenuBar(); World.getSingleton().menuBar = bottomMenu; }; World.getSingleton().menuBar.image.resultScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.infoBox.visible = true; } public function setLowQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.LOW; World.getSingleton().quality = movieClip.stage.quality; } public function init():void{ World.getSingleton().addEventListener(WorldEvent.ON_INIT, onInit); World.getSingleton().addEventListener(WorldEvent.ON_UPDATE, onUpdate); World.getSingleton().initWorld(); } public function initCrossHair():void{ Mouse.hide(); talkCrosshair = new TalkCrosshair(); talkCrosshair.image.visible = false; buldozerHair = new BuldozerPointer(); buldozerHair.image.visible = false; handCrossHair = new HandCrosshair(); } private function talkToNpc():Boolean{ if (World.getSingleton().mousePointer){ if (World.getSingleton().mousePointer.type == MousePointerType.TALK){ if (!talkCrosshair.clicked){ handCrossHair.image.visible = true; talkCrosshair.clicked = true; talkCrosshair.removeListener(); talkCrosshair.addClickListener(); return (true); }; }; }; return (false); } public function saveGame():void{ var _local1:int; var _local2:int; var _local3:NPCFriend; if (World.getSingleton().playedCharacter){ World.getSingleton().savedPlayer = PlayableCharacter(World.getSingleton().playedCharacter); World.getSingleton().savedMoney = World.getSingleton().money; World.getSingleton().savedNpcs.clear(); _local1 = 0; _local2 = World.getSingleton().npcs.size(); while (_local1 < _local2) { _local3 = World.getSingleton().npcs.get(_local1); World.getSingleton().savedNpcs.add(_local3); _local1++; }; _local1 = 0; _local2 = World.getSingleton().savedPlayer.ammoInventory.size(); while (_local1 < _local2) { World.getSingleton().savedAmmoInventory.get(_local1).amount = World.getSingleton().savedPlayer.ammoInventory.get(_local1).amount; _local1++; }; }; } public function setHighQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.HIGH; World.getSingleton().quality = movieClip.stage.quality; } public function onMouseUp(_arg1:MouseEvent):void{ mousePressed = false; } public function initBarricadeShop():void{ if (!World.getSingleton().barricadeShop){ barricadeShop = new BarricadeShop(); barricadeShop.addImageToMenuRoot(); barricadeShop.addListener(); World.getSingleton().barricadeShop = barricadeShop; } else { barricadeShop = World.getSingleton().barricadeShop; barricadeShop.finish = false; barricadeShop.addImageToMenuRoot(); barricadeShop.addListener(); }; barricadeShop.refresh(); barricadeShop.image.buldozerButton.addEventListener(MouseEvent.CLICK, modeBuldozer); } public function onPause():void{ this.addEventListener(Event.ENTER_FRAME, onEnterFrame); } public function closeOptionScreen(_arg1:MouseEvent=null):void{ barricadeShop.image.visible = true; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.backToMainMenuButton.removeEventListener(MouseEvent.CLICK, setBackToMainMenu2); World.getSingleton().menuBar.image.optionScreen.closeBtn.removeEventListener(MouseEvent.CLICK, closeOptionScreen); World.getSingleton().menuBar.image.optionScreen.lowButton.removeEventListener(MouseEvent.CLICK, setLowQuality); World.getSingleton().menuBar.image.optionScreen.mediumButton.removeEventListener(MouseEvent.CLICK, setMediumQuality); World.getSingleton().menuBar.image.optionScreen.highButton.removeEventListener(MouseEvent.CLICK, setHighQuality); World.getSingleton().menuBar.image.optionScreen.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); World.getSingleton().startGame(); onResume(); } public function onUpdate(_arg1:Event):void{ Updater.getSingleton().preUpdate(); CollisionDetector.getSingleton().update(); Updater.getSingleton().update(); checkInput(); pickUpThing(); } public function closeWeaponInventory(_arg1:MouseEvent=null):void{ iPressed = true; weaponInventory.stopDrag2(); weaponInventory.image.visible = false; inventoryMode = false; World.getSingleton().startGame(); onResume(); weaponInventory.image.close.removeEventListener(MouseEvent.CLICK, closeWeaponInventory); } public function setBackToMainMenu(_arg1:MouseEvent):void{ World.getSingleton().menuBar.image.infoBox.visible = true; World.getSingleton().score = 0; World.getSingleton().money = World.getSingleton().startMoney; World.getSingleton().waveLevel = 0; World.getSingleton().waveNum = 0; World.getSingleton().waveCounter = 0; World.getSingleton().levelDone = 0; World.getSingleton().kills = 0; destroyEverything(true, true); backToMainMenu = true; World.getSingleton().pauseGame(); } public function onInit(_arg1:Event):void{ mousePressed = false; initMenuBar(); initLevel(); initBarricadeShop(); initPlayer(); initNPCFriend(); initBarricades(); initCrossHair(); initEventListener(); World.getSingleton().startGame(); World.getSingleton().setDebugMode(false); if ((((World.getSingleton().waveNum == 0)) && ((World.getSingleton().waveLevel == 0)))){ } else { showWeaponInventory(); }; saveGame(); } public function checkInput():void{ if (((keyPoll.isDown(Keyboard.SHIFT)) && (((keyPoll.isDown(Keyboard.LEFT)) || (keyPoll.isDown(65)))))){ player.runLeft(); if (player.faceState == FaceState.FACE_RIGHT){ player.turnFace(); }; } else { if (((keyPoll.isDown(Keyboard.LEFT)) || (keyPoll.isDown(65)))){ player.walkLeft(); if (player.faceState == FaceState.FACE_RIGHT){ player.turnFace(); }; }; }; if (((keyPoll.isDown(Keyboard.SHIFT)) && (((keyPoll.isDown(Keyboard.RIGHT)) || (keyPoll.isDown(68)))))){ player.runRight(); if (player.faceState == FaceState.FACE_LEFT){ player.turnFace(); }; } else { if (((keyPoll.isDown(Keyboard.RIGHT)) || (keyPoll.isDown(68)))){ player.walkRight(); if (player.faceState == FaceState.FACE_LEFT){ player.turnFace(); }; }; }; if (((keyPoll.isDown(Keyboard.UP)) || (keyPoll.isDown(87)))){ player.moveUp(); }; if (((keyPoll.isDown(Keyboard.DOWN)) || (keyPoll.isDown(83)))){ player.moveDown(); }; if (((((((((((keyPoll.isUp(Keyboard.DOWN)) && (keyPoll.isUp(83)))) && (((keyPoll.isUp(Keyboard.UP)) && (keyPoll.isUp(87)))))) && (((keyPoll.isUp(Keyboard.RIGHT)) && (keyPoll.isUp(68)))))) && (((keyPoll.isUp(Keyboard.LEFT)) && (keyPoll.isUp(65)))))) && (keyPoll.isUp(Keyboard.SPACE)))){ player.setIdle(); }; if (keyPoll.isDown(82)){ player.reload(); }; if (keyPoll.isDown(49)){ if (player.primaryWeapon){ player.changeWeapon(player.primaryWeapon); player.currentWeaponNumber = 1; }; }; if (keyPoll.isDown(50)){ if (player.secondaryWeapon){ player.changeWeapon(player.secondaryWeapon); player.currentWeaponNumber = 2; }; }; if (keyPoll.isDown(51)){ if (player.meleeWeapon){ player.changeWeapon(player.meleeWeapon); }; }; if (keyPoll.isDown(52)){ if (player.explosiveWeapon){ player.changeWeapon(player.explosiveWeapon); player.currentWeaponNumber = 3; }; }; if (keyPoll.isDown(73)){ if (((!(iPressed)) && (!(weaponInventory.image.visible)))){ showWeaponInventory(); } else { if (!iPressed){ closeWeaponInventory(); }; }; }; if (keyPoll.isUp(73)){ if (iPressed){ iPressed = false; }; }; if (keyPoll.isDown(Keyboard.ESCAPE)){ if (((!(escPressed)) && (!(World.getSingleton().menuBar.image.optionScreen.visible)))){ escPressed = true; showOptionScreen(); } else { if (!escPressed){ closeOptionScreen(); escPressed = true; }; }; }; if (keyPoll.isUp(Keyboard.ESCAPE)){ if (escPressed){ escPressed = false; }; }; if (keyPoll.isDown(Keyboard.SPACE)){ if (World.getSingleton().playedCharacter){ if (!spaceBarPressed){ World.getSingleton().playedCharacter.jump(); spaceBarPressed = true; }; }; }; if (keyPoll.isUp(Keyboard.SPACE)){ spaceBarPressed = false; }; } public function initNPCFriend():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = World.getSingleton().npcs.size(); while (_local1 < _local2) { npcFriend = World.getSingleton().npcs.get(_local1); if (!npcFriend.body){ npcFriend.initRigidBody(); }; npcFriend.changeWeapon(npcFriend.currentWeapon); World.getSingleton().level.enemyGround.addChild(npcFriend.image); npcFriend.position.x = World.getSingleton().playedCharacter.position.x; npcFriend.position.y = World.getSingleton().playedCharacter.position.y; npcFriend.position.x = (npcFriend.position.x - (20 * (_local1 + 1))); npcFriend.body.SetXForm(new b2Vec2((npcFriend.position.x / World.physScale), (npcFriend.position.y / World.physScale)), 0); if (World.getSingleton().playedCharacter){ npcFriend.charToFollow = World.getSingleton().playedCharacter; }; npcFriend.image.head.head.hired.visible = false; npcFriend.setIdle(); npcFriend.salaryPaid = false; npcFriend.follow = true; npcFriend.reset(); npcFriend.setIdle(); npcFriend.bodyPartsGotoAndPlay("idle"); npcFriend.image.leg.gotoAndStop("idle"); npcFriend.image.head.alpha = 1; npcFriend.image.head.visible = true; npcFriend.initTimer(); npcFriend.image.weaponHolderb.alpha = 1; npcFriend.image.weaponHolderf.alpha = 1; npcFriend.image.weaponHolderb.rotation = 0; npcFriend.image.weaponHolderf.rotation = 0; npcFriend.health = npcFriend.maxHealth; _local1++; }; } public function pickUpThing():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:b2Body; var _local8:Barricade; var _local9:int; var _local10:int; var _local11:b2MouseJointDef; var _local12:b2Joint; var _local13:b2Vec2; if (player){ _local1 = World.getSingleton().mousePointer.image.x; _local2 = World.getSingleton().mousePointer.image.y; _local3 = ((_local1 - player.screenPosition.x) + player.position.x); _local4 = ((_local2 - player.screenPosition.y) + player.position.y); _local5 = (_local3 / World.physScale); _local6 = (_local4 / World.physScale); if (((mousePressed) && (!(mouseJoint)))){ _local7 = World.getSingleton().GetBodyAt(_local5, _local6); if (_local7){ if (_local7.type == BodyType.BARRICADE){ if (buldozerMode){ _local8 = null; _local9 = 0; _local10 = World.getSingleton().barricades.size(); while (_local9 < _local10) { if (World.getSingleton().barricades.get(_local9).body){ if (World.getSingleton().barricades.get(_local9).body == _local7){ _local8 = World.getSingleton().barricades.get(_local9); break; }; }; _local9++; }; if (_local8){ World.getSingleton().money = (World.getSingleton().money + _local8.localPrice); _local8.health = 0; _local8.deathTime = 0; _local8.update(); if (!World.getSingleton().muted){ buldozerSound.play(); }; }; } else { if (_local7.m_userData.active){ _local11 = new b2MouseJointDef(); _local11.body1 = World.getSingleton().physicWorld.GetGroundBody(); _local11.body2 = _local7; _local11.target.Set(_local5, _local6); _local11.maxForce = (1000 * _local7.GetMass()); _local11.timeStep = World.physicsDT; mouseJoint = (World.getSingleton().physicWorld.CreateJoint(_local11) as b2MouseJoint); _local7.WakeUp(); } else { _local7.m_userData.active = true; _local7.m_linearDamping = 0; _local7.m_angularDamping = 0; }; }; }; }; }; if (!mousePressed){ if (mouseJoint){ _local12 = World.getSingleton().physicWorld.GetJointList(); if (_local12 == mouseJoint){ World.getSingleton().physicWorld.DestroyJoint(mouseJoint); }; mouseJoint = null; }; }; if (mouseJoint){ _local13 = new b2Vec2(_local5, _local6); mouseJoint.SetTarget(_local13); }; }; } private function handTalkCollision():Boolean{ if (!buldozerMode){ if (handCrossHair){ if (talkCrosshair){ if (PixelCollision.isColliding(talkCrosshair.image, handCrossHair.image, World.getSingleton().sceneRoot.stage)){ return (true); }; }; }; }; return (false); } public function setBarricadesToHeavy():void{ var _local1:int; var _local2:int; var _local3:b2Body; var _local4:b2Shape; _local1 = World.getSingleton().barricades.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { _local3 = World.getSingleton().barricades.get(_local2).body; _local4 = _local3.m_shapeList; while (_local4) { _local4.m_density = 0; _local4.m_filter.groupIndex = World.getSingleton().barricades.get(_local2).bodyType; _local4 = _local4.m_next; }; _local3.SetMassFromShapes(); _local2--; }; } public function onMouseDown(_arg1:MouseEvent):void{ if (!talkToNpc()){ if (talkCrosshair){ if (!handTalkCollision()){ talkCrosshair.removeClickListener(); talkCrosshair.addListener(); talkCrosshair.clicked = false; }; }; }; mousePressed = true; } public function soundMute(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; _local2 = 0; _local3 = World.getSingleton().enemies.size(); if (World.getSingleton().muted){ World.getSingleton().muted = false; World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(2); while (_local2 < _local3) { if (World.getSingleton().enemies.get(_local2).soundChannel){ World.getSingleton().enemies.get(_local2).soundChannel.stop(); }; World.getSingleton().enemies.get(_local2).soundChannel = World.getSingleton().enemies.get(_local2).sound.play(0, 9999, World.getSingleton().enemies.get(_local2).soundTransform); _local2++; }; } else { World.getSingleton().muted = true; World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(1); while (_local2 < _local3) { if (World.getSingleton().enemies.get(_local2).soundChannel){ World.getSingleton().enemies.get(_local2).soundChannel.stop(); }; _local2++; }; }; } public function showWeaponInventory():void{ inventoryMode = true; weaponInventory.image.visible = true; weaponInventory.refresh(); World.getSingleton().pauseGame(); iPressed = true; onPause(); talkCrosshair.removeClickListener(); talkCrosshair.addListener(); talkCrosshair.clicked = false; weaponInventory.image.close.addEventListener(MouseEvent.CLICK, closeWeaponInventory); } public function destroy():void{ weaponInventory.destroy(); handCrossHair.destroy(); talkCrosshair.destroy(); buldozerHair.destroy(); World.getSingleton().removeEventListener(WorldEvent.ON_INIT, onInit); World.getSingleton().removeEventListener(WorldEvent.ON_UPDATE, onUpdate); this.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); this.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel); barricadeShop.image.buldozerButton.removeEventListener(MouseEvent.CLICK, modeBuldozer); Mouse.show(); if (keyPoll){ keyPoll.destroy(); }; } } }//package p_gameManager
Section 248
//ContinueState (p_gameManager.ContinueState) package p_gameManager { import p_weapon.*; import p_singleton.*; import flash.display.*; import p_char.p_playable.*; public class ContinueState extends GameManager { public var loaded:Boolean; public var noGameSaved:Boolean; public function ContinueState(_arg1:MovieClip){ super(_arg1); loaded = false; noGameSaved = false; loadGame(); } public function checkLevelUp():void{ var _local1:PlayableCharacter; var _local2:int; var _local3:int; var _local4:RangeWeapon; var _local5:MeleeWeapon; var _local6:ExplosiveWeapon; var _local7:int; var _local8:int; var _local9:Number; if (World.getSingleton().playedCharacter){ _local1 = PlayableCharacter(World.getSingleton().playedCharacter); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); _local4 = null; _local5 = null; _local6 = null; _local7 = 0; _local8 = 0; _local9 = 0; if (_local1.level == 1){ _local8 = 25; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; }; if (_local1.level == 2){ _local8 = 50; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; if (_local1.level == 3){ _local8 = 80; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; }; if (_local1.level == 4){ _local8 = 120; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; }; if (_local1.level == 5){ _local8 = 180; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 20; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; if (_local1.level == 6){ _local8 = 300; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; }; if (_local1.level == 7){ _local8 = 500; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; }; if (_local1.level == 8){ _local8 = 1000; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 30; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; if (_local1.level == 9){ _local8 = 1600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; }; if (_local1.level == 10){ _local8 = 2100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; }; if (_local1.level == 11){ _local8 = 2600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 60; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; if (_local1.level == 12){ _local8 = 3100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; }; if (_local1.level == 13){ _local8 = 3600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; }; if (_local1.level == 14){ _local8 = 4100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 150; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; if (_local1.level == 15){ _local8 = 4600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; }; if (_local1.level == 16){ _local8 = 5100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; }; if (_local1.level == 17){ _local8 = 5600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 300; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; if (_local1.level == 18){ _local8 = 6100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; }; if (_local1.level == 19){ _local8 = 6600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); if (World.getSingleton().kills >= _local8){ _local1.lastKillLimit = _local8; _local1.level++; _local7 = 50; _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; }; } override public function update():GameManager{ if (noGameSaved){ detachFromRoot(); return (new LocationSelectorState(movieClip)); }; if (loaded){ detachFromRoot(); return (new BarricadeState(movieClip)); }; return (this); } public function loadGame():void{ var _local1:int; var _local2:int; World.getSingleton().initSharedObject(); if (World.getSingleton().sharedObject.data.saved == true){ World.getSingleton().levelDone = World.getSingleton().sharedObject.data.levelDone; World.getSingleton().money = World.getSingleton().sharedObject.data.money; World.getSingleton().kills = World.getSingleton().sharedObject.data.kills; World.getSingleton().waveLevel = World.getSingleton().sharedObject.data.waveLevel; World.getSingleton().waveCounter = World.getSingleton().sharedObject.data.waveCounter; World.getSingleton().currentLevelNumber = World.getSingleton().sharedObject.data.currentLevelNumber; World.getSingleton().waveNum = World.getSingleton().sharedObject.data.waveNum; World.getSingleton().npcs.clear(); _local1 = 0; _local2 = World.getSingleton().mercInventory.size(); while (_local1 < _local2) { if (World.getSingleton().sharedObject.data.npc[_local1]){ World.getSingleton().npcs.add(World.getSingleton().mercInventory.get(_local1)); World.getSingleton().mercInventory.get(_local1).playerOwned = true; World.getSingleton().mercInventory.get(_local1).salaryPaid = true; }; _local1++; }; World.getSingleton().playedCharacter.meleeWeaponInventory.clear(); _local1 = 0; _local2 = World.getSingleton().meleeWeaponInventory.size(); while (_local1 < _local2) { if (World.getSingleton().sharedObject.data.meleeWeapon[_local1]){ World.getSingleton().playedCharacter.meleeWeaponInventory.add(World.getSingleton().meleeWeaponInventory.get(_local1)); World.getSingleton().meleeWeaponInventory.get(_local1).playerOwned = true; }; _local1++; }; World.getSingleton().playedCharacter.rangeWeaponInventory.clear(); _local1 = 0; _local2 = World.getSingleton().rangeWeaponInventory.size(); while (_local1 < _local2) { if (World.getSingleton().sharedObject.data.rangeWeapon[_local1]){ World.getSingleton().playedCharacter.rangeWeaponInventory.add(World.getSingleton().rangeWeaponInventory.get(_local1)); World.getSingleton().rangeWeaponInventory.get(_local1).playerOwned = true; }; _local1++; }; World.getSingleton().playedCharacter.explosiveWeaponInventory.clear(); _local1 = 0; _local2 = World.getSingleton().explosiveWeaponInventory.size(); while (_local1 < _local2) { if (World.getSingleton().sharedObject.data.explosiveWeapon[_local1]){ World.getSingleton().playedCharacter.explosiveWeaponInventory.add(World.getSingleton().explosiveWeaponInventory.get(_local1)); World.getSingleton().explosiveWeaponInventory.get(_local1).playerOwned = true; World.getSingleton().explosiveWeaponInventory.get(_local1).ammo = World.getSingleton().sharedObject.data.explosiveAmmo[_local1]; World.getSingleton().explosiveWeaponInventory.get(_local1).reloadAmmo = World.getSingleton().sharedObject.data.explosiveReloadAmmo[_local1]; }; _local1++; }; _local1 = 0; _local2 = World.getSingleton().savedAmmoInventory.size(); while (_local1 < _local2) { World.getSingleton().playedCharacter.ammoInventory.get(_local1).amount = World.getSingleton().sharedObject.data.ammo[_local1]; _local1++; }; checkLevelUp(); loaded = true; } else { noGameSaved = true; }; World.getSingleton().sharedObject.flush(); World.getSingleton().sharedObject.close(); } } }//package p_gameManager
Section 249
//CreditState (p_gameManager.CreditState) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; import p_crosshair.*; import flash.ui.*; public class CreditState extends GameManager { public var closePressed:Boolean; public var image:MovieClip; public var clickSound:Sound; public var handCrossHair:HandCrosshair; public function CreditState(_arg1:MovieClip){ super(_arg1); image = new creditScreen(); World.getSingleton().menuRoot.addChild(image); closePressed = false; initListener(); initCrossHair(); clickSound = new ClickSound(); } public function initListener():void{ image.closeBtn.addEventListener(MouseEvent.CLICK, closeInstruction); } public function initCrossHair():void{ handCrossHair = new HandCrosshair(); World.getSingleton().mousePointer = handCrossHair; Mouse.hide(); } public function destroyCrossHair():void{ Mouse.show(); handCrossHair.destroy(); } public function closeInstruction(_arg1:MouseEvent):void{ closePressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } override public function update():GameManager{ if (closePressed){ image.closeBtn.removeEventListener(MouseEvent.CLICK, closeInstruction); World.getSingleton().menuRoot.removeChild(image); image = null; detachFromRoot(); destroyCrossHair(); return (new MainMenuState(movieClip)); }; return (this); } } }//package p_gameManager
Section 250
//EndingMovieFirst (p_gameManager.EndingMovieFirst) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; public class EndingMovieFirst extends GameManager { public var sound:Sound; public var yesPressed:Boolean; public var noPressed:Boolean; public var soundChannel:SoundChannel; public var image:MovieClip; public var imageWarning:MovieClip; public var submitPressed:Boolean; public function EndingMovieFirst(_arg1:MovieClip){ super(_arg1); yesPressed = false; noPressed = false; submitPressed = false; image = new endingMovie(); image.x = 400; image.y = 250; image.gotoAndPlay(2); imageWarning = new extendedPlay(); addChild(image); addChild(imageWarning); imageWarning.visible = false; initListener(); sound = new Sound2(); if (!World.getSingleton().muted){ soundChannel = sound.play(); }; destroyNPCS(); } public function initListener():void{ imageWarning.yesButton.addEventListener(MouseEvent.CLICK, yesFunction); imageWarning.noButton.addEventListener(MouseEvent.CLICK, noFunction); imageWarning.submitButton.addEventListener(MouseEvent.CLICK, submitFunction); } public function submitFunction(_arg1:MouseEvent):void{ submitPressed = true; } public function removeListener():void{ imageWarning.yesButton.removeEventListener(MouseEvent.CLICK, yesFunction); imageWarning.noButton.removeEventListener(MouseEvent.CLICK, noFunction); imageWarning.submitButton.removeEventListener(MouseEvent.CLICK, submitFunction); } public function destroyNPCS():void{ var _local1:Boolean; var _local2:int; var _local3:int; _local1 = World.getSingleton().muted; World.getSingleton().muted = true; _local2 = World.getSingleton().npcs.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { World.getSingleton().npcs.get(_local3).health = 0; World.getSingleton().npcs.get(_local3).deathTime = 0; World.getSingleton().npcs.get(_local3).update(); _local3--; }; World.getSingleton().muted = _local1; } public function noFunction(_arg1:MouseEvent):void{ noPressed = true; } override public function update():GameManager{ if (yesPressed){ removeChild(image); detachFromRoot(); removeListener(); if (soundChannel){ soundChannel.stop(); }; return (new LocationSelectorState(movieClip)); }; if (noPressed){ removeChild(image); detachFromRoot(); removeListener(); if (soundChannel){ soundChannel.stop(); }; World.getSingleton().gameEnded = false; World.getSingleton().score = 0; World.getSingleton().money = World.getSingleton().startMoney; World.getSingleton().waveLevel = 0; World.getSingleton().waveNum = 0; World.getSingleton().waveCounter = 0; World.getSingleton().levelDone = 0; World.getSingleton().kills = 0; if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.body){ World.getSingleton().physicWorld.DestroyBody(World.getSingleton().playedCharacter.body); World.getSingleton().playedCharacter.body = null; }; World.getSingleton().players.remove(World.getSingleton().playedCharacter); World.getSingleton().playedCharacter = null; }; return (new MainMenuState(movieClip)); }; if (submitPressed){ removeChild(image); detachFromRoot(); removeListener(); if (soundChannel){ soundChannel.stop(); }; World.getSingleton().gameEnded = false; World.getSingleton().money = World.getSingleton().startMoney; World.getSingleton().waveLevel = 0; World.getSingleton().waveNum = 0; World.getSingleton().waveCounter = 0; World.getSingleton().levelDone = 0; World.getSingleton().kills = 0; if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.body){ World.getSingleton().physicWorld.DestroyBody(World.getSingleton().playedCharacter.body); World.getSingleton().playedCharacter.body = null; }; World.getSingleton().players.remove(World.getSingleton().playedCharacter); World.getSingleton().playedCharacter = null; }; return (new SubmitHighscoresState(movieClip)); }; if (image.animationDone){ imageWarning.visible = true; if (soundChannel){ soundChannel.stop(); }; return (this); //unresolved jump }; return (this); } public function yesFunction(_arg1:MouseEvent):void{ yesPressed = true; } } }//package p_gameManager
Section 251
//EndingMovieSecond (p_gameManager.EndingMovieSecond) package p_gameManager { import flash.events.*; import flash.display.*; public class EndingMovieSecond extends GameManager { public var yesPressed:Boolean; public var noPressed:Boolean; public var image:MovieClip; public function EndingMovieSecond(_arg1:MovieClip){ super(_arg1); yesPressed = false; noPressed = false; image = new harbourWarning(); addChild(image); initListener(); } public function initListener():void{ image.yesButton.addEventListener(MouseEvent.CLICK, yesFunction); image.noButton.addEventListener(MouseEvent.CLICK, noFunction); } public function removeListener():void{ image.yesButton.removeEventListener(MouseEvent.CLICK, yesFunction); image.noButton.removeEventListener(MouseEvent.CLICK, noFunction); } public function noFunction(_arg1:MouseEvent):void{ noPressed = true; } override public function update():GameManager{ if (yesPressed){ removeChild(image); detachFromRoot(); removeListener(); return (new EndingMovieFirst(movieClip)); }; if (noPressed){ removeChild(image); detachFromRoot(); removeListener(); return (new LocationSelectorState(movieClip)); }; return (this); } public function yesFunction(_arg1:MouseEvent):void{ yesPressed = true; } } }//package p_gameManager
Section 252
//GameManager (p_gameManager.GameManager) package p_gameManager { import p_singleton.*; import flash.display.*; public class GameManager extends MovieClip { public var movieClip:MovieClip; public function GameManager(_arg1:MovieClip){ this.movieClip = _arg1; this.movieClip.addChild(this); this.addChild(World.getSingleton().sceneRoot); this.addChild(World.getSingleton().backgroundRoot); this.addChild(World.getSingleton().menuRoot); } public function detachFromRoot():void{ this.movieClip.removeChild(this); } public function update():GameManager{ return (this); } } }//package p_gameManager
Section 253
//InGameState (p_gameManager.InGameState) package p_gameManager { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import flash.events.*; import p_weapon.*; import p_singleton.*; import flash.display.*; import p_char.p_playable.*; import p_char.p_nonplayable.*; import p_levelManager.*; import flash.media.*; import p_crosshair.*; import p_menuBar.*; import flash.utils.*; import mochi.as3.*; import p_billboard.*; import input.*; import flash.ui.*; public class InGameState extends GameManager { public var waveDone:Boolean;// = false public var bottomMenu:MenuBar; public var spaceBarPressed:Boolean; public var healTimer:Timer; public var crossHair:Crosshair; public var handCrossHair:HandCrosshair; public var backToMainMenu:Boolean; public var retry:Boolean; public var weaponInventory:WeaponInventory; public var keyPoll:KeyPoll; public var enemySpawner:Timer; public var npcFriend:NPCFriend; public var player:PlayableCharacter; public var mouseJoint:b2MouseJoint; public var submitPressed:Boolean; public var escPressed:Boolean; public var levelUpSound:Sound; public var iPressed:Boolean; public var billboardMiddle:MiddleBillboard; public var mousePressed:Boolean; public var waveTimer:Timer; public var gameOver:Boolean; public var ePressed:Boolean; public function InGameState(_arg1:MovieClip){ waveDone = false; iPressed = false; escPressed = false; submitPressed = false; spaceBarPressed = false; retry = false; gameOver = false; backToMainMenu = false; typedEnemyClass(); super(_arg1); World.getSingleton().waveTime = World.getSingleton().waveTimeEach; World.getSingleton().setFocusToStage(); init(); World.getSingleton().gameStarted = true; levelUpSound = new LevelUpSound(); } public function showGameOverMenu():void{ if (gameOver){ return; }; gameOver = true; weaponInventory.destroy(); crossHair.destroy(); handCrossHair.image.visible = true; Mouse.show(); World.getSingleton().removeEventListener(WorldEvent.ON_INIT, onInit); enemySpawner.stop(); enemySpawner.removeEventListener(TimerEvent.TIMER, spawnEnemy); healTimer.stop(); healTimer.removeEventListener(TimerEvent.TIMER, healBarricades); waveTimer.stop(); if (waveTimer.hasEventListener(TimerEvent.TIMER)){ waveTimer.removeEventListener(TimerEvent.TIMER, reduceWaveTime); }; this.stage.removeEventListener(Event.ENTER_FRAME, aim); this.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); this.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel); World.getSingleton().menuBar.image.resultScreen.gotoAndStop("gameover"); World.getSingleton().menuBar.image.resultScreen.alpha = 0; World.getSingleton().menuBar.image.infoBox.visible = false; World.getSingleton().menuBar.image.resultScreen.visible = true; World.getSingleton().menuBar.showResultScreen(); World.getSingleton().menuBar.image.resultScreen.gameOverMenu.retryButton.addEventListener(MouseEvent.CLICK, retryLevel); World.getSingleton().menuBar.image.resultScreen.gameOverMenu.submitButton.addEventListener(MouseEvent.CLICK, submitScore); World.getSingleton().menuBar.image.resultScreen.backToMainMenuButton.addEventListener(MouseEvent.CLICK, setBackToMainMenu); if (player){ if (player.currentWeapon.id == "Minigun"){ Minigun(player.currentWeapon).warmingUp = false; Minigun(player.currentWeapon).doneWarmingUp = false; Minigun(player.currentWeapon).warmUpCounter = 0; Minigun(player.currentWeapon).warmUpTimeCounter = 0; Minigun(player.currentWeapon).warmUpTimer.stop(); }; }; } public function setBackToMainMenu2(_arg1:MouseEvent):void{ if (!gameOver){ weaponInventory.destroy(); crossHair.destroy(); Mouse.show(); World.getSingleton().removeEventListener(WorldEvent.ON_INIT, onInit); enemySpawner.stop(); enemySpawner.removeEventListener(TimerEvent.TIMER, spawnEnemy); healTimer.stop(); healTimer.removeEventListener(TimerEvent.TIMER, healBarricades); waveTimer.stop(); if (waveTimer.hasEventListener(TimerEvent.TIMER)){ waveTimer.removeEventListener(TimerEvent.TIMER, reduceWaveTime); }; this.stage.removeEventListener(Event.ENTER_FRAME, aim); this.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); this.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel); }; if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.body){ World.getSingleton().physicWorld.DestroyBody(World.getSingleton().playedCharacter.body); World.getSingleton().playedCharacter.body = null; }; World.getSingleton().players.remove(World.getSingleton().playedCharacter); World.getSingleton().playedCharacter = null; }; setBackToMainMenu(_arg1); World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.backToMainMenuButton.removeEventListener(MouseEvent.CLICK, setBackToMainMenu2); World.getSingleton().menuBar.image.optionScreen.closeBtn.removeEventListener(MouseEvent.CLICK, closeOptionScreen); World.getSingleton().menuBar.image.optionScreen.lowButton.removeEventListener(MouseEvent.CLICK, setLowQuality); World.getSingleton().menuBar.image.optionScreen.mediumButton.removeEventListener(MouseEvent.CLICK, setMediumQuality); World.getSingleton().menuBar.image.optionScreen.highButton.removeEventListener(MouseEvent.CLICK, setHighQuality); } public function initPlayer():void{ if (World.getSingleton().playedCharacter == null){ player = new FemaleChar(); player.initRigidBody(); World.getSingleton().players.add(player); player.changeWeapon(player.primaryWeapon); player.currentWeaponNumber = 1; World.getSingleton().playedCharacter = player; } else { player = PlayableCharacter(World.getSingleton().playedCharacter); if (!player.body){ player.initRigidBody(); }; if (!World.getSingleton().players.contains(player)){ World.getSingleton().players.add(player); }; }; World.getSingleton().level.playerGround.addChild(player.image); weaponInventory = new WeaponInventory(player); weaponInventory.image.visible = false; } public function shoot():void{ if (mousePressed){ player.attack(true); }; } public function initEventListener():void{ keyPoll = new KeyPoll(this.stage); this.stage.addEventListener(Event.ENTER_FRAME, aim, false, 0, true); this.stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true); this.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true); this.stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel, false, 0, true); } public function initEnemy():void{ var _local1:PlayableCharacter; _local1 = PlayableCharacter(World.getSingleton().playedCharacter); enemySpawner = new Timer((World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level))); enemySpawner.addEventListener(TimerEvent.TIMER, spawnEnemy); enemySpawner.start(); } public function initLevel():void{ var _local1:int; _local1 = World.getSingleton().currentLevelNumber; World.getSingleton().changeLevel(LevelManager.getSingleton().getLevel(_local1)); } public function playerDied():Boolean{ if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.health <= 0){ return (true); }; return (false); //unresolved jump }; return (true); } public function destroyEverything(_arg1:Boolean=true, _arg2=true):void{ var _local3:int; var _local4:int; _local3 = 0; _local4 = 0; _local4 = World.getSingleton().enemies.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().enemies.get(_local3).health = 0; World.getSingleton().enemies.get(_local3).deathTime = 0; World.getSingleton().enemies.get(_local3).update(); _local3--; }; if (_arg1){ _local4 = World.getSingleton().npcs.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().npcs.get(_local3).health = 0; World.getSingleton().npcs.get(_local3).deathTime = 0; World.getSingleton().npcs.get(_local3).update(); _local3--; }; }; if (_arg2){ _local4 = World.getSingleton().barricades.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().barricades.get(_local3).health = 0; World.getSingleton().barricades.get(_local3).deathTime = 0; World.getSingleton().barricades.get(_local3).update(); _local3--; }; }; _local4 = World.getSingleton().itemPickUps.size(); _local3 = (_local4 - 1); while (_local3 >= 0) { World.getSingleton().itemPickUps.get(_local3).destroy(); _local3--; }; if (keyPoll){ keyPoll.destroy(); }; } public function nextWave(_arg1:MouseEvent):void{ World.getSingleton().waveNum++; World.getSingleton().waveCounter++; waveDone = true; } public function setMediumQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.MEDIUM; World.getSingleton().quality = movieClip.stage.quality; } public function onEnterFrame(_arg1:Event):void{ checkInput(); } override public function update():GameManager{ if (waveDone){ World.getSingleton().gameStarted = false; World.getSingleton().menuBar.image.resultScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.infoBox.visible = false; if (World.getSingleton().waveNum >= World.getSingleton().numOfWave){ destroyEverything(false, true); } else { destroyEverything(false, false); }; World.getSingleton().removeEventListener(WorldEvent.ON_UPDATE, onUpdate); World.getSingleton().pauseGame(); World.getSingleton().menuBar.image.resultScreen.gameScoreMenu.nextButton.removeEventListener(MouseEvent.CLICK, nextWave); handCrossHair.destroy(); detachFromRoot(); if (World.getSingleton().waveNum >= World.getSingleton().numOfWave){ World.getSingleton().waveNum = 0; World.getSingleton().waveLevel++; if (World.getSingleton().levelDone < World.getSingleton().currentLevelNumber){ World.getSingleton().levelDone = World.getSingleton().currentLevelNumber; }; if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new LocationSelectorState(movieClip)); }; if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new WeaponShopState(movieClip)); }; if (backToMainMenu){ World.getSingleton().gameStarted = false; World.getSingleton().gameEnded = false; handCrossHair.destroy(); Mouse.show(); detachFromRoot(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new MainMenuState(movieClip)); }; if (retry){ World.getSingleton().gameStarted = false; handCrossHair.destroy(); Mouse.show(); detachFromRoot(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new WeaponShopState(movieClip)); }; if (submitPressed){ World.getSingleton().gameStarted = false; World.getSingleton().gameEnded = false; handCrossHair.destroy(); Mouse.show(); detachFromRoot(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new SubmitHighscoresState(movieClip)); }; if (playerDied()){ showGameOverMenu(); } else { checkLevelUp(); checkTimeDone(); return (this); }; return (this); } public function spawnEnemy(_arg1:TimerEvent=null):void{ var _local2:int; var _local3:Class; var _local4:NonPlayableCharacter; if ((((World.getSingleton().enemies.size() >= 10)) || ((World.getSingleton().waveTime <= 0)))){ return; }; if (World.getSingleton().level.arrayOfStage.get(World.getSingleton().currentStage).enemyCounter >= World.getSingleton().level.arrayOfStage.get(World.getSingleton().currentStage).numOfEnemies){ enemySpawner.stop(); return; }; _local2 = World.getSingleton().level.findSpawnPoint(World.getSingleton().currentStage); if (_local2 == -1){ return; }; _local3 = (getDefinitionByName(World.getSingleton().level.getEnemyClass()) as Class); _local4 = NonPlayableCharacter(new (_local3)); _local4.position.x = (MovieClip(World.getSingleton().level.middleGround)[("enemySpawnPoint" + _local2)].x + World.getSingleton().level.middleGround.x); _local4.position.y = (MovieClip(World.getSingleton().level.middleGround)[("enemySpawnPoint" + _local2)].y + World.getSingleton().level.middleGround.y); if (_local4.currentWeapon){ _local4.currentWeapon.screenPosition = _local4.screenPosition; }; if (_local4){ _local4.initRigidBody(); World.getSingleton().enemies.add(_local4); }; if (_local4){ if (_local4.currentWeapon){ if (_local4.currentWeapon.damage < 50){ _local4.currentWeapon.damage = (_local4.currentWeapon.damage + ((_local4.currentWeapon.damage * World.getSingleton().waveCounter) * 0.01)); if (_local4.currentWeapon.damage > 50){ _local4.currentWeapon.damage = 50; }; }; _local4.health = (_local4.health + ((_local4.health * World.getSingleton().waveCounter) * 0.6)); _local4.maxHealth = _local4.health; _local4.point = (_local4.point + ((_local4.point * World.getSingleton().waveCounter) * 0.2)); if (_local4.speed < 11){ _local4.speed = (_local4.speed + ((_local4.speed * World.getSingleton().waveCounter) * 0.3)); _local4.runSpeed = (_local4.speed * 1.5); if (_local4.speed > 11){ _local4.speed = 11; _local4.runSpeed = (_local4.speed * 1.5); _local4.walkAnimationSpeed = 200; _local4.runAnimationSpeed = 150; _local4.setSpeed(_local4.speed, _local4.walkAnimationSpeed); _local4.setRunSpeed(_local4.runSpeed, _local4.runAnimationSpeed); } else { _local4.walkAnimationSpeed = (_local4.walkAnimationSpeed / ((World.getSingleton().waveCounter + 1) * 0.3)); _local4.runAnimationSpeed = (_local4.runAnimationSpeed / ((World.getSingleton().waveCounter + 1) * 0.3)); _local4.setSpeed(_local4.speed, _local4.walkAnimationSpeed); _local4.setRunSpeed(_local4.runSpeed, _local4.runAnimationSpeed); }; }; }; }; } public function typedEnemyClass():void{ var _local1:ZombieNormal01; var _local2:Zombie01; var _local3:Zombie02; var _local4:Zombie03; var _local5:Zombie04; var _local6:Zombie05; var _local7:Zombie06; var _local8:Zombie07; var _local9:Zombie08; var _local10:Zombie09; var _local11:Zombie10; var _local12:ZombieCrawler01; var _local13:ZombieAxe; var _local14:NPCFriendTest; } public function showOptionScreen():void{ World.getSingleton().menuBar.image.optionScreen.visible = true; World.getSingleton().menuBar.image.optionScreen.backToMainMenuButton.addEventListener(MouseEvent.CLICK, setBackToMainMenu2); World.getSingleton().menuBar.image.optionScreen.closeBtn.addEventListener(MouseEvent.CLICK, closeOptionScreen); World.getSingleton().menuBar.image.optionScreen.lowButton.addEventListener(MouseEvent.CLICK, setLowQuality); World.getSingleton().menuBar.image.optionScreen.mediumButton.addEventListener(MouseEvent.CLICK, setMediumQuality); World.getSingleton().menuBar.image.optionScreen.highButton.addEventListener(MouseEvent.CLICK, setHighQuality); if (World.getSingleton().muted){ World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(1); } else { World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(2); }; World.getSingleton().menuBar.image.optionScreen.soundButton.addEventListener(MouseEvent.CLICK, soundMute); World.getSingleton().pauseGame(); handCrossHair.image.visible = true; crossHair.image.visible = false; waveTimer.stop(); healTimer.stop(); enemySpawner.stop(); if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.currentWeapon){ if (World.getSingleton().playedCharacter.currentWeapon.weaponType == WeaponType.RANGE){ if (RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloadTimer.running){ RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloadTimer.stop(); }; }; }; }; onPause(); } public function reduceWaveTime(_arg1:TimerEvent):void{ if (World.getSingleton().waveTime > 0){ World.getSingleton().waveTime--; } else { waveTimer.stop(); if (waveTimer.hasEventListener(TimerEvent.TIMER)){ waveTimer.removeEventListener(TimerEvent.TIMER, reduceWaveTime); }; billboardMiddle = new MiddleBillboard("Kill All Remaining Zombies!", 50); }; } public function onMouseWheel(_arg1:MouseEvent):void{ var _local2:PlayableCharacter; if (World.getSingleton().playedCharacter){ _local2 = PlayableCharacter(World.getSingleton().playedCharacter); if (_arg1.delta > 0){ player.currentWeaponNumber++; if (player.currentWeaponNumber > 4){ player.currentWeaponNumber = 1; }; } else { if (_arg1.delta < 0){ player.currentWeaponNumber--; if (player.currentWeaponNumber < 1){ player.currentWeaponNumber = 4; }; }; }; if (player.currentWeaponNumber == 1){ if (player.primaryWeapon){ player.changeWeapon(player.primaryWeapon); } else { onMouseWheel(_arg1); }; } else { if (player.currentWeaponNumber == 2){ if (player.secondaryWeapon){ player.changeWeapon(player.secondaryWeapon); } else { onMouseWheel(_arg1); }; } else { if (player.currentWeaponNumber == 3){ if (player.meleeWeapon){ player.changeWeapon(player.meleeWeapon); } else { onMouseWheel(_arg1); }; } else { if (player.currentWeaponNumber == 4){ if (player.explosiveWeapon){ player.changeWeapon(player.explosiveWeapon); } else { onMouseWheel(_arg1); }; }; }; }; }; }; } public function initMenuBar():void{ if (!World.getSingleton().menuBar){ bottomMenu = new MenuBar(); World.getSingleton().menuBar = bottomMenu; }; World.getSingleton().menuBar.image.resultScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.infoBox.visible = true; MochiAd.unload({clip:World.getSingleton().menuBar.image.resultScreen.gameScoreMenu.adSpace.adSpace}); MochiAd.showClickAwayAd({clip:World.getSingleton().menuBar.image.resultScreen.gameScoreMenu.adSpace.adSpace, id:"349f9764c411a8cb", ad_loaded:function ():void{ Mouse.hide(); movieClip.stage.quality = World.getSingleton().quality; }}); } public function setLowQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.LOW; World.getSingleton().quality = movieClip.stage.quality; } public function onResume():void{ this.removeEventListener(Event.ENTER_FRAME, onEnterFrame); } public function initCrossHair():void{ crossHair = new Crosshair(); handCrossHair = new HandCrosshair(); handCrossHair.image.visible = false; Mouse.hide(); } public function init():void{ World.getSingleton().addEventListener(WorldEvent.ON_INIT, onInit); World.getSingleton().addEventListener(WorldEvent.ON_UPDATE, onUpdate); World.getSingleton().initWorld(); Mouse.hide(); healTimer = new Timer(500); healTimer.addEventListener(TimerEvent.TIMER, healBarricades); waveTimer = new Timer(1000); waveTimer.addEventListener(TimerEvent.TIMER, reduceWaveTime); waveTimer.start(); } public function checkTimeDone():void{ if (World.getSingleton().waveTime <= 0){ if (World.getSingleton().enemies.size() == 0){ showResult(); }; }; } public function checkLevelUp():void{ var _local1:PlayableCharacter; var _local2:int; var _local3:int; var _local4:RangeWeapon; var _local5:MeleeWeapon; var _local6:ExplosiveWeapon; var _local7:int; var _local8:int; var _local9:Number; if (World.getSingleton().playedCharacter){ _local1 = PlayableCharacter(World.getSingleton().playedCharacter); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); _local4 = null; _local5 = null; _local6 = null; _local7 = 0; _local8 = 0; _local9 = 0; if (_local1.level == 1){ _local8 = 25; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; billboardMiddle = new MiddleBillboard(("Reload Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; } else { if (_local1.level == 2){ _local8 = 50; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; billboardMiddle = new MiddleBillboard(("Attack Damage +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; } else { if (_local1.level == 3){ _local8 = 80; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; billboardMiddle = new MiddleBillboard(("Attack Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; } else { if (_local1.level == 4){ _local8 = 120; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; billboardMiddle = new MiddleBillboard(("Reload Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; } else { if (_local1.level == 5){ _local8 = 180; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (50 * _local1.level)); enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 20; billboardMiddle = new MiddleBillboard(("Attack Damage +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; } else { if (_local1.level == 6){ _local8 = 300; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; billboardMiddle = new MiddleBillboard(("Attack Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; } else { if (_local1.level == 7){ _local8 = 500; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; billboardMiddle = new MiddleBillboard(("Reload Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; } else { if (_local1.level == 8){ _local8 = 1000; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 30; billboardMiddle = new MiddleBillboard(("Attack Damage +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; } else { if (_local1.level == 9){ _local8 = 1600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; billboardMiddle = new MiddleBillboard(("Attack Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; } else { if (_local1.level == 10){ _local8 = 2100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; billboardMiddle = new MiddleBillboard(("Reload Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; } else { if (_local1.level == 11){ _local8 = 2600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 60; billboardMiddle = new MiddleBillboard(("Attack Damage +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; } else { if (_local1.level == 12){ _local8 = 3100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; billboardMiddle = new MiddleBillboard(("Attack Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; } else { if (_local1.level == 13){ _local8 = 3600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; billboardMiddle = new MiddleBillboard(("Reload Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; } else { if (_local1.level == 14){ _local8 = 4100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 150; billboardMiddle = new MiddleBillboard(("Attack Damage +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; } else { if (_local1.level == 15){ _local8 = 4600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; billboardMiddle = new MiddleBillboard(("Attack Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; } else { if (_local1.level == 16){ _local8 = 5100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 15; billboardMiddle = new MiddleBillboard(("Reload Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).reloadTime = (_local4.reloadTime - _local7); if (_local4.reloadTime < 1){ _local4.reloadTime = 1; }; _local4.setReloadSpeed(_local4.reloadTime); _local2++; }; }; } else { if (_local1.level == 17){ _local8 = 5600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 300; billboardMiddle = new MiddleBillboard(("Attack Damage +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; } else { if (_local1.level == 18){ _local8 = 6100; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 5; billboardMiddle = new MiddleBillboard(("Attack Speed +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).delay = (_local4.delay - _local7); if (_local4.delay < 1){ _local4.delay = 1; }; _local4.setDelaySpeed(_local4.delay); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).attackTime = (_local5.attackTime - (_local7 / 2)); if (_local5.attackTime < 1){ _local5.attackTime = 1; }; _local5.setAttackSpeed(_local5.attackTime); _local2++; }; }; } else { if (_local1.level == 19){ _local8 = 6600; _local9 = ((World.getSingleton().kills - _local1.lastKillLimit) / (_local8 - _local1.lastKillLimit)); World.getSingleton().menuBar.image.expSign.expBar.width = (800 * _local9); if (World.getSingleton().kills >= _local8){ if (!World.getSingleton().muted){ levelUpSound.play(); }; if (enemySpawner){ if (enemySpawner.running){ enemySpawner.stop(); enemySpawner.delay = (World.getSingleton().level.enemySpawnerDelay - (25 * _local1.level)); if (enemySpawner.delay < 1){ enemySpawner.delay = 1; }; enemySpawner.start(); }; }; _local1.lastKillLimit = _local8; _local1.level++; _local7 = 50; billboardMiddle = new MiddleBillboard(("Attack Damage +" + _local7), 50); _local2 = 0; _local3 = World.getSingleton().rangeWeaponInventory.size(); while (_local2 < _local3) { _local4 = World.getSingleton().rangeWeaponInventory.get(_local2); World.getSingleton().rangeWeaponInventory.get(_local2).damage = (_local4.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().meleeWeaponInventory.size(); while (_local2 < _local3) { _local5 = World.getSingleton().meleeWeaponInventory.get(_local2); World.getSingleton().meleeWeaponInventory.get(_local2).damage = (_local5.damage + _local7); _local2++; }; _local2 = 0; _local3 = World.getSingleton().explosiveWeaponInventory.size(); while (_local2 < _local3) { _local6 = World.getSingleton().explosiveWeaponInventory.get(_local2); World.getSingleton().explosiveWeaponInventory.get(_local2).damage = (_local6.damage + _local7); _local2++; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; } public function setHighQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.HIGH; World.getSingleton().quality = movieClip.stage.quality; } public function aim(_arg1:Event):void{ player.aim(this.stage.mouseX, this.stage.mouseY); } public function onMouseUp(_arg1:MouseEvent):void{ mousePressed = false; if (player){ if (player.currentWeapon.id == "Minigun"){ Minigun(player.currentWeapon).warmingUp = false; Minigun(player.currentWeapon).doneWarmingUp = false; Minigun(player.currentWeapon).warmUpCounter = 0; Minigun(player.currentWeapon).warmUpTimeCounter = 0; Minigun(player.currentWeapon).warmUpTimer.stop(); if (!Minigun(player.currentWeapon).reloading){ Minigun(player.currentWeapon).warmDown(); }; }; }; } public function onPause():void{ this.addEventListener(Event.ENTER_FRAME, onEnterFrame); } public function submitScore(_arg1:MouseEvent):void{ World.getSingleton().menuBar.image.infoBox.visible = true; World.getSingleton().money = World.getSingleton().startMoney; World.getSingleton().waveLevel = 0; World.getSingleton().waveNum = 0; World.getSingleton().waveCounter = 0; World.getSingleton().levelDone = 0; World.getSingleton().kills = 0; World.getSingleton().removeEventListener(WorldEvent.ON_UPDATE, onUpdate); destroyEverything(true, true); submitPressed = true; World.getSingleton().menuBar.image.resultScreen.gameOverMenu.retryButton.removeEventListener(MouseEvent.CLICK, retryLevel); World.getSingleton().menuBar.image.resultScreen.gameOverMenu.submitButton.removeEventListener(MouseEvent.CLICK, submitScore); World.getSingleton().menuBar.image.resultScreen.backToMainMenuButton.removeEventListener(MouseEvent.CLICK, setBackToMainMenu); World.getSingleton().pauseGame(); World.getSingleton().menuBar.image.resultScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.infoBox.visible = false; } public function closeOptionScreen(_arg1:MouseEvent=null):void{ World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.backToMainMenuButton.removeEventListener(MouseEvent.CLICK, setBackToMainMenu2); World.getSingleton().menuBar.image.optionScreen.closeBtn.removeEventListener(MouseEvent.CLICK, closeOptionScreen); World.getSingleton().menuBar.image.optionScreen.lowButton.removeEventListener(MouseEvent.CLICK, setLowQuality); World.getSingleton().menuBar.image.optionScreen.mediumButton.removeEventListener(MouseEvent.CLICK, setMediumQuality); World.getSingleton().menuBar.image.optionScreen.highButton.removeEventListener(MouseEvent.CLICK, setHighQuality); World.getSingleton().menuBar.image.optionScreen.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); waveTimer.start(); enemySpawner.start(); onResume(); World.getSingleton().startGame(); handCrossHair.image.visible = false; crossHair.image.visible = true; if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.currentWeapon){ if (World.getSingleton().playedCharacter.currentWeapon.weaponType == WeaponType.RANGE){ if (RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloading){ RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloadTimer.start(); }; }; }; }; } public function showResult():void{ if (gameOver){ return; }; gameOver = true; mousePressed = false; weaponInventory.destroy(); crossHair.destroy(); handCrossHair.image.visible = true; Mouse.show(); World.getSingleton().removeEventListener(WorldEvent.ON_INIT, onInit); enemySpawner.stop(); enemySpawner.removeEventListener(TimerEvent.TIMER, spawnEnemy); healTimer.stop(); healTimer.removeEventListener(TimerEvent.TIMER, healBarricades); waveTimer.stop(); if (waveTimer.hasEventListener(TimerEvent.TIMER)){ waveTimer.removeEventListener(TimerEvent.TIMER, reduceWaveTime); }; this.stage.removeEventListener(Event.ENTER_FRAME, aim); this.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); this.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel); World.getSingleton().menuBar.image.resultScreen.gotoAndPlay("score"); World.getSingleton().menuBar.image.resultScreen.alpha = 0; World.getSingleton().menuBar.image.infoBox.visible = false; World.getSingleton().menuBar.image.resultScreen.visible = true; World.getSingleton().menuBar.showResultScreen(); World.getSingleton().menuBar.image.resultScreen.gameScoreMenu.nextButton.addEventListener(MouseEvent.CLICK, nextWave); if (player){ if (player.currentWeapon.id == "Minigun"){ Minigun(player.currentWeapon).warmingUp = false; Minigun(player.currentWeapon).doneWarmingUp = false; Minigun(player.currentWeapon).warmUpCounter = 0; Minigun(player.currentWeapon).warmUpTimeCounter = 0; Minigun(player.currentWeapon).warmUpTimer.stop(); }; }; } public function onInit(_arg1:Event):void{ mousePressed = false; initMenuBar(); initPlayer(); initEnemy(); initCrossHair(); initEventListener(); billboardMiddle = new MiddleBillboard(("Day " + (World.getSingleton().waveCounter + 1)), 50); World.getSingleton().startGame(); World.getSingleton().setDebugMode(false); } public function onUpdate(_arg1:Event):void{ Updater.getSingleton().preUpdate(); CollisionDetector.getSingleton().update(); Updater.getSingleton().update(); checkInput(); shoot(); } public function setBackToMainMenu(_arg1:MouseEvent):void{ World.getSingleton().menuBar.image.infoBox.visible = true; World.getSingleton().score = 0; World.getSingleton().money = World.getSingleton().startMoney; World.getSingleton().waveLevel = 0; World.getSingleton().waveNum = 0; World.getSingleton().waveCounter = 0; World.getSingleton().levelDone = 0; World.getSingleton().kills = 0; World.getSingleton().gameEnded = false; World.getSingleton().removeEventListener(WorldEvent.ON_UPDATE, onUpdate); destroyEverything(true, true); backToMainMenu = true; World.getSingleton().menuBar.image.resultScreen.gameOverMenu.retryButton.removeEventListener(MouseEvent.CLICK, retryLevel); World.getSingleton().menuBar.image.resultScreen.gameOverMenu.submitButton.removeEventListener(MouseEvent.CLICK, submitScore); World.getSingleton().menuBar.image.resultScreen.backToMainMenuButton.removeEventListener(MouseEvent.CLICK, setBackToMainMenu); World.getSingleton().pauseGame(); World.getSingleton().menuBar.image.resultScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.infoBox.visible = false; } public function closeWeaponInventory(_arg1:MouseEvent=null):void{ enemySpawner.start(); iPressed = true; weaponInventory.stopDrag2(); weaponInventory.image.visible = false; World.getSingleton().startGame(); onResume(); waveTimer.start(); handCrossHair.image.visible = false; crossHair.image.visible = true; weaponInventory.image.close.removeEventListener(MouseEvent.CLICK, closeWeaponInventory); if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.currentWeapon){ if (World.getSingleton().playedCharacter.currentWeapon.weaponType == WeaponType.RANGE){ if (RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloading){ RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloadTimer.start(); }; }; }; }; } public function checkInput():void{ if (((keyPoll.isDown(Keyboard.SHIFT)) && (((keyPoll.isDown(Keyboard.LEFT)) || (keyPoll.isDown(65)))))){ player.runLeft(); } else { if (((keyPoll.isDown(Keyboard.LEFT)) || (keyPoll.isDown(65)))){ player.walkLeft(); }; }; if (((keyPoll.isDown(Keyboard.SHIFT)) && (((keyPoll.isDown(Keyboard.RIGHT)) || (keyPoll.isDown(68)))))){ player.runRight(); } else { if (((keyPoll.isDown(Keyboard.RIGHT)) || (keyPoll.isDown(68)))){ player.walkRight(); }; }; if (((keyPoll.isDown(Keyboard.UP)) || (keyPoll.isDown(87)))){ player.moveUp(); }; if (((keyPoll.isDown(Keyboard.DOWN)) || (keyPoll.isDown(83)))){ player.moveDown(); }; if (((((((((((keyPoll.isUp(Keyboard.DOWN)) && (keyPoll.isUp(83)))) && (((keyPoll.isUp(Keyboard.UP)) && (keyPoll.isUp(87)))))) && (((keyPoll.isUp(Keyboard.RIGHT)) && (keyPoll.isUp(68)))))) && (((keyPoll.isUp(Keyboard.LEFT)) && (keyPoll.isUp(65)))))) && (keyPoll.isUp(Keyboard.SPACE)))){ player.setIdle(); }; if (keyPoll.isDown(82)){ player.reload(); }; if (keyPoll.isDown(49)){ if (player.primaryWeapon){ player.changeWeapon(player.primaryWeapon); player.currentWeaponNumber = 1; }; }; if (keyPoll.isDown(50)){ if (player.secondaryWeapon){ player.changeWeapon(player.secondaryWeapon); player.currentWeaponNumber = 2; }; }; if (keyPoll.isDown(51)){ if (player.meleeWeapon){ player.changeWeapon(player.meleeWeapon); }; }; if (keyPoll.isDown(52)){ if (player.explosiveWeapon){ player.changeWeapon(player.explosiveWeapon); player.currentWeaponNumber = 3; }; }; if (keyPoll.isDown(69)){ if (!healTimer.running){ healTimer.start(); }; }; if (keyPoll.isUp(69)){ if (healTimer.running){ healTimer.stop(); }; }; if (keyPoll.isDown(73)){ if (((!(iPressed)) && (!(weaponInventory.image.visible)))){ showWeaponInventory(); } else { if (!iPressed){ closeWeaponInventory(); }; }; }; if (keyPoll.isUp(73)){ if (iPressed){ iPressed = false; }; }; if (keyPoll.isDown(Keyboard.ESCAPE)){ if (((!(escPressed)) && (!(World.getSingleton().menuBar.image.optionScreen.visible)))){ escPressed = true; showOptionScreen(); } else { if (!escPressed){ closeOptionScreen(); escPressed = true; }; }; }; if (keyPoll.isUp(Keyboard.ESCAPE)){ if (escPressed){ escPressed = false; }; }; if (keyPoll.isDown(Keyboard.SPACE)){ if (World.getSingleton().playedCharacter){ if (!spaceBarPressed){ World.getSingleton().playedCharacter.jump(); spaceBarPressed = true; }; }; }; if (keyPoll.isUp(Keyboard.SPACE)){ spaceBarPressed = false; }; } public function healBarricades(_arg1:TimerEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:b2Vec2; var _local8:Number; var _local9:b2Vec2; var _local10:Billboard; if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.body){ if (World.getSingleton().playedCharacter.body.touchedBarricade){ _local2 = World.getSingleton().barricades.size(); _local3 = (_local2 - 1); _local4 = 150; _local5 = 10; _local6 = 5; while (_local3 >= 0) { _local7 = World.getSingleton().playedCharacter.position.Copy(); _local7.Subtract(World.getSingleton().barricades.get(_local3).position); _local7.x = (_local7.x * _local7.x); _local7.y = (_local7.y * _local7.y); _local8 = (_local7.x + _local7.y); _local8 = Math.sqrt(_local8); if (_local8 <= _local4){ if (World.getSingleton().barricades.get(_local3).health < World.getSingleton().barricades.get(_local3).maxHealth){ if (World.getSingleton().money >= _local6){ World.getSingleton().money = (World.getSingleton().money - _local6); _local9 = World.getSingleton().barricades.get(_local3).position.Copy(); _local10 = new Billboard(("+" + _local5), _local9.x, _local9.y); World.getSingleton().barricades.get(_local3).health = (World.getSingleton().barricades.get(_local3).health + _local5); if (World.getSingleton().barricades.get(_local3).health > World.getSingleton().barricades.get(_local3).maxHealth){ World.getSingleton().barricades.get(_local3).health = World.getSingleton().barricades.get(_local3).maxHealth; }; }; }; }; _local3--; }; }; }; }; } public function retryLevel(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:NPCFriend; World.getSingleton().menuBar.image.infoBox.visible = true; World.getSingleton().removeEventListener(WorldEvent.ON_UPDATE, onUpdate); destroyEverything(true, true); retry = true; World.getSingleton().menuBar.image.resultScreen.gameOverMenu.retryButton.removeEventListener(MouseEvent.CLICK, retryLevel); World.getSingleton().menuBar.image.resultScreen.gameOverMenu.submitButton.removeEventListener(MouseEvent.CLICK, submitScore); World.getSingleton().menuBar.image.resultScreen.backToMainMenuButton.removeEventListener(MouseEvent.CLICK, setBackToMainMenu); World.getSingleton().npcs.clear(); World.getSingleton().playedCharacter = World.getSingleton().savedPlayer; PlayableCharacter(World.getSingleton().playedCharacter).revive(); _local2 = 0; _local3 = World.getSingleton().savedPlayer.ammoInventory.size(); while (_local2 < _local3) { World.getSingleton().savedPlayer.ammoInventory.get(_local2).amount = World.getSingleton().savedAmmoInventory.get(_local2).amount; _local2++; }; _local2 = 0; _local3 = World.getSingleton().savedNpcs.size(); while (_local2 < _local3) { _local4 = World.getSingleton().savedNpcs.get(_local2); World.getSingleton().savedNpcs.get(_local2).health = _local4.maxHealth; _local4.playerOwned = true; _local4.setIdle(); if (_local4.currentWeapon){ _local4.currentWeapon.initTimer(); }; World.getSingleton().npcs.add(_local4); _local4.charToFollow = World.getSingleton().playedCharacter; _local4.health = _local4.maxHealth; _local4.image.weaponHolderb.alpha = 1; _local4.image.weaponHolderf.alpha = 1; _local4.image.weaponHolderb.rotation = 0; _local4.image.weaponHolderf.rotation = 0; _local4.reset(); _local4.setIdle(); _local4.bodyPartsGotoAndPlay("idle"); _local4.image.leg.gotoAndPlay("idle"); _local4.image.head.alpha = 1; _local4.image.head.visible = true; _local4.initTimer(); _local2++; }; World.getSingleton().pauseGame(); World.getSingleton().menuBar.image.resultScreen.visible = false; World.getSingleton().menuBar.image.optionScreen.visible = false; World.getSingleton().menuBar.image.infoBox.visible = false; } public function onMouseDown(_arg1:MouseEvent):void{ mousePressed = true; } public function soundMute(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; _local2 = 0; _local3 = World.getSingleton().enemies.size(); if (World.getSingleton().muted){ World.getSingleton().muted = false; World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(2); while (_local2 < _local3) { if (World.getSingleton().enemies.get(_local2).soundChannel){ World.getSingleton().enemies.get(_local2).soundChannel.stop(); }; World.getSingleton().enemies.get(_local2).soundChannel = World.getSingleton().enemies.get(_local2).sound.play(0, 9999, World.getSingleton().enemies.get(_local2).soundTransform); _local2++; }; } else { World.getSingleton().muted = true; World.getSingleton().menuBar.image.optionScreen.soundButton.gotoAndStop(1); while (_local2 < _local3) { if (World.getSingleton().enemies.get(_local2).soundChannel){ World.getSingleton().enemies.get(_local2).soundChannel.stop(); }; _local2++; }; }; } public function showWeaponInventory():void{ enemySpawner.stop(); weaponInventory.image.visible = true; weaponInventory.refresh(); World.getSingleton().pauseGame(); iPressed = true; onPause(); handCrossHair.image.visible = true; crossHair.image.visible = false; waveTimer.stop(); weaponInventory.image.close.addEventListener(MouseEvent.CLICK, closeWeaponInventory); if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.currentWeapon){ if (World.getSingleton().playedCharacter.currentWeapon.weaponType == WeaponType.RANGE){ if (RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloadTimer.running){ RangeWeapon(World.getSingleton().playedCharacter.currentWeapon).reloadTimer.stop(); }; }; }; }; } } }//package p_gameManager
Section 254
//InitializeGameState (p_gameManager.InitializeGameState) package p_gameManager { import Box2D.Common.Math.*; import p_weapon.*; import p_singleton.*; import flash.display.*; import p_char.p_playable.*; import p_char.p_nonplayable.*; import p_crosshair.*; import p_util.*; public class InitializeGameState extends GameManager { public var crossHair:Crosshair; public var player:PlayableCharacter; public function InitializeGameState(_arg1:MovieClip){ super(_arg1); init(); } public function destroy():void{ if (crossHair){ crossHair.destroy(); }; } public function init():void{ initPhysicWorld(); initWorldInventory(); initPlayer(); } public function initCrossHair():void{ crossHair = new Crosshair(); } public function initWorldInventory():void{ World.getSingleton().initInventory(); World.getSingleton().rangeWeaponInventory.add(new Beretta()); World.getSingleton().rangeWeaponInventory.add(new M4()); World.getSingleton().rangeWeaponInventory.add(new SteyrTMP()); World.getSingleton().rangeWeaponInventory.add(new Shotgun()); World.getSingleton().rangeWeaponInventory.add(new AK()); World.getSingleton().rangeWeaponInventory.add(new Deagle()); World.getSingleton().rangeWeaponInventory.add(new SM5()); World.getSingleton().rangeWeaponInventory.add(new MPU()); World.getSingleton().rangeWeaponInventory.add(new WaltherP99()); World.getSingleton().rangeWeaponInventory.add(new M1911()); World.getSingleton().rangeWeaponInventory.add(new M14()); World.getSingleton().rangeWeaponInventory.add(new Minigun()); World.getSingleton().rangeWeaponInventory.add(new GrenadeLauncher()); World.getSingleton().rangeWeaponInventory.add(new BarretM82()); World.getSingleton().meleeWeaponInventory.add(new Knife()); World.getSingleton().meleeWeaponInventory.add(new BaseBallBat()); World.getSingleton().meleeWeaponInventory.add(new Katana()); World.getSingleton().meleeWeaponInventory.add(new ChainSaw()); World.getSingleton().explosiveWeaponInventory.add(new Grenade()); World.getSingleton().explosiveWeaponInventory.add(new Dynamite()); World.getSingleton().mercInventory.add(new Andrew()); World.getSingleton().mercInventory.add(new Wendy()); World.getSingleton().mercInventory.add(new Bill()); World.getSingleton().mercInventory.add(new Francis()); World.getSingleton().mercInventory.add(new Ivy()); World.getSingleton().mercInventory.add(new Melisa()); World.getSingleton().mercInventory.add(new Darmin()); World.getSingleton().mercInventory.add(new Kris()); World.getSingleton().mercInventory.add(new Louis()); } public function initPlayer():void{ if (World.getSingleton().playedCharacter){ if (World.getSingleton().playedCharacter.body){ World.getSingleton().physicWorld.DestroyBody(World.getSingleton().playedCharacter.body); World.getSingleton().playedCharacter.body = null; }; World.getSingleton().players.remove(World.getSingleton().playedCharacter); World.getSingleton().playedCharacter = null; }; player = new FemaleChar(); player.initRigidBody(); World.getSingleton().players.add(player); player.changeWeapon(player.primaryWeapon); player.currentWeaponNumber = 1; World.getSingleton().playedCharacter = player; } public function initPhysicWorld():void{ if (!World.getSingleton().physicWorld){ World.getSingleton().initPhysicWorld(new b2Vec2(-100000, -100000), new b2Vec2(100000, 100000), new b2Vec2(0, 50), true, new ContactListener(), new ContactFilterer()); }; } override public function update():GameManager{ detachFromRoot(); if (World.getSingleton().continuePressed){ World.getSingleton().continuePressed = false; return (new ContinueState(movieClip)); }; return (new LocationSelectorState(movieClip)); } } }//package p_gameManager
Section 255
//InstructionScreen (p_gameManager.InstructionScreen) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; import p_crosshair.*; import flash.ui.*; public class InstructionScreen extends GameManager { public var closePressed:Boolean; public var image:MovieClip; public var clickSound:Sound; public var handCrossHair:HandCrosshair; public function InstructionScreen(_arg1:MovieClip){ super(_arg1); image = new instructionScreen(); World.getSingleton().menuRoot.addChild(image); closePressed = false; initListener(); initCrossHair(); clickSound = new ClickSound(); } public function initListener():void{ image.closeBtn.addEventListener(MouseEvent.CLICK, closeInstruction); } public function initCrossHair():void{ handCrossHair = new HandCrosshair(); World.getSingleton().mousePointer = handCrossHair; Mouse.hide(); } public function destroyCrossHair():void{ Mouse.show(); handCrossHair.destroy(); } public function closeInstruction(_arg1:MouseEvent):void{ closePressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } override public function update():GameManager{ if (closePressed){ image.closeBtn.removeEventListener(MouseEvent.CLICK, closeInstruction); World.getSingleton().menuRoot.removeChild(image); image = null; detachFromRoot(); destroyCrossHair(); return (new MainMenuState(movieClip)); }; return (this); } } }//package p_gameManager
Section 256
//IntroSponsor (p_gameManager.IntroSponsor) package p_gameManager { import flash.display.*; public class IntroSponsor extends GameManager { public var image:MovieClip; public function IntroSponsor(_arg1:MovieClip){ super(_arg1); image = new introSponsorSplashScreen(); addChild(image); } override public function update():GameManager{ if (image){ if (image.animationDone){ this.removeChild(image); image = null; detachFromRoot(); return (new TogeIntroScreen(movieClip)); }; }; return (this); } } }//package p_gameManager
Section 257
//LoadingScreen (p_gameManager.LoadingScreen) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; import mochi.as3.*; public class LoadingScreen extends GameManager { public var image:MovieClip; public var playPressed:Boolean; public var clickSound:Sound; public var loadingDone:Boolean; public function LoadingScreen(_arg1:MovieClip){ super(_arg1); init(); clickSound = new ClickSound(); } public function init():void{ image = new loaderScreen(); this.addChild(image); MochiAd.showClickAwayAd({clip:image.adSpace.adSpace, id:"349f9764c411a8cb", ad_loaded:function ():void{ movieClip.stage.quality = World.getSingleton().quality; }}); movieClip.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadingProgress); movieClip.loaderInfo.addEventListener(Event.COMPLETE, loadingComplete); loadingDone = false; playPressed = false; } public function loadingProgress(_arg1:ProgressEvent):void{ var _local2:int; _local2 = (100 * (movieClip.loaderInfo.bytesLoaded / movieClip.loaderInfo.bytesTotal)); image.progressText.text = (("" + _local2) + "%"); } public function loadingComplete(_arg1:Event):void{ } public function playIntro(_arg1:MouseEvent):void{ playPressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } override public function update():GameManager{ var _local1:Loader; if (movieClip.loaderInfo.bytesLoaded == movieClip.loaderInfo.bytesTotal){ if (!loadingDone){ loadingDone = true; image.loadingClip.gotoAndStop(2); image.loadingClip.playBtn.addEventListener(MouseEvent.CLICK, playIntro); }; }; if (playPressed){ image.loadingClip.playBtn.removeEventListener(MouseEvent.CLICK, playIntro); movieClip.gotoAndStop(3); this.removeChild(image); image = null; detachFromRoot(); return (new IntroSponsor(movieClip)); }; return (this); } } }//package p_gameManager
Section 258
//LocationSelectorState (p_gameManager.LocationSelectorState) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; import p_crosshair.*; import flash.ui.*; public class LocationSelectorState extends GameManager { public var image:MovieClip; public var chose:Boolean;// = false public var handCrossHair:HandCrosshair; public function LocationSelectorState(_arg1:MovieClip){ chose = false; super(_arg1); image = new MapScreen(); World.getSingleton().menuRoot.addChild(image); disableAll(); initListener(); initCrossHair(); } public function mouseClick(_arg1:MouseEvent):void{ var _local2:Sound; MovieClip(_arg1.target).gotoAndStop(2); World.getSingleton().currentLevelNumber = (MovieClip(_arg1.target).id + 1); chose = true; _local2 = new ClickSound(); if (!World.getSingleton().muted){ _local2.play(); }; } public function initListener():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = (World.getSingleton().levelDone + 1); while (_local1 < _local2) { image.places[("place" + _local1)].gotoAndStop(1); image.places[("place" + _local1)].id = _local1; image.places[("place" + _local1)].addEventListener(MouseEvent.MOUSE_OVER, mouseOver); image.places[("place" + _local1)].addEventListener(MouseEvent.MOUSE_OUT, mouseOut); image.places[("place" + _local1)].addEventListener(MouseEvent.CLICK, mouseClick); _local1++; }; } public function initCrossHair():void{ handCrossHair = new HandCrosshair(); World.getSingleton().mousePointer = handCrossHair; Mouse.hide(); } public function mouseOver(_arg1:MouseEvent):void{ MovieClip(_arg1.target).gotoAndStop(2); } public function mouseOut(_arg1:MouseEvent):void{ MovieClip(_arg1.target).gotoAndStop(1); } public function removeListener():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = (World.getSingleton().levelDone + 1); while (_local1 < _local2) { image.places[("place" + _local1)].removeEventListener(MouseEvent.MOUSE_OVER, mouseOver); image.places[("place" + _local1)].removeEventListener(MouseEvent.MOUSE_OUT, mouseOut); image.places[("place" + _local1)].removeEventListener(MouseEvent.CLICK, mouseClick); _local1++; }; } public function destroyCrossHair():void{ Mouse.show(); handCrossHair.destroy(); } public function disableAll():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = 6; while (_local1 < _local2) { image.places[("place" + _local1)].gotoAndStop(3); _local1++; }; } override public function update():GameManager{ if (chose){ removeListener(); World.getSingleton().menuRoot.removeChild(image); detachFromRoot(); image = null; destroyCrossHair(); if (World.getSingleton().currentLevelNumber == 6){ if (World.getSingleton().gameEnded){ if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new EndingMovieSecond(movieClip)); } else { if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; World.getSingleton().gameEnded = true; return (new EndingMovieFirst(movieClip)); }; }; if ((((World.getSingleton().waveNum == 0)) && ((World.getSingleton().waveLevel == 0)))){ return (new BarricadeState(movieClip)); }; return (new WeaponShopState(movieClip)); }; return (this); } } }//package p_gameManager
Section 259
//MainMenuState (p_gameManager.MainMenuState) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; import p_crosshair.*; import mochi.as3.*; import flash.ui.*; public class MainMenuState extends GameManager { public var sound:Sound; public var image:MovieClip; public var playPressed:Boolean; public var highscoresPressed:Boolean; public var clickSound:Sound; public var handCrossHair:HandCrosshair; public var instructionPressed:Boolean; public var creditPressed:Boolean; public var optionPressed:Boolean; public function MainMenuState(_arg1:MovieClip){ var movieClip = _arg1; super(movieClip); playPressed = false; instructionPressed = false; optionPressed = false; creditPressed = false; image = new mainMenu(); World.getSingleton().menuRoot.addChild(image); MochiAd.showClickAwayAd({clip:image.adSpace.adSpace, id:"349f9764c411a8cb", ad_loaded:function ():void{ Mouse.hide(); movieClip.stage.quality = World.getSingleton().quality; }}); image.playButton.addEventListener(MouseEvent.CLICK, initializeGame); image.optionButton.addEventListener(MouseEvent.CLICK, optionMenu); image.instructionButton.addEventListener(MouseEvent.CLICK, gameInstruction); image.soundButton.addEventListener(MouseEvent.CLICK, soundMute); image.creditButton.addEventListener(MouseEvent.CLICK, showCredit); image.highscoresButton.addEventListener(MouseEvent.CLICK, showScores); image.continueButton.addEventListener(MouseEvent.CLICK, continueGame); initCrossHair(); clickSound = new ClickSound(); if (World.getSingleton().muted){ image.soundButton.gotoAndStop(1); } else { image.soundButton.gotoAndStop(2); }; sound = new Sound3(); World.getSingleton().backGroundSoundChannel = sound.play(0, 9999); } public function initCrossHair():void{ handCrossHair = new HandCrosshair(); World.getSingleton().mousePointer = handCrossHair; Mouse.hide(); } public function gameInstruction(_arg1:MouseEvent):void{ instructionPressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } public function continueGame(_arg1:MouseEvent):void{ World.getSingleton().continuePressed = true; World.getSingleton().continuing = true; if (!World.getSingleton().muted){ clickSound.play(); }; } public function optionMenu(_arg1:MouseEvent):void{ optionPressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } public function showCredit(_arg1:MouseEvent):void{ creditPressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } public function destroyCrossHair():void{ Mouse.show(); handCrossHair.destroy(); } public function initializeGame(_arg1:MouseEvent):void{ playPressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } public function showScores(_arg1:MouseEvent):void{ highscoresPressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } override public function update():GameManager{ if (((playPressed) || (World.getSingleton().continuePressed))){ image.playButton.removeEventListener(MouseEvent.CLICK, initializeGame); image.optionButton.removeEventListener(MouseEvent.CLICK, optionMenu); image.instructionButton.removeEventListener(MouseEvent.CLICK, gameInstruction); image.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); image.highscoresButton.removeEventListener(MouseEvent.CLICK, showScores); image.continueButton.removeEventListener(MouseEvent.CLICK, continueGame); World.getSingleton().menuRoot.removeChild(image); detachFromRoot(); image = null; destroyCrossHair(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new InitializeGameState(movieClip)); //unresolved jump }; if (instructionPressed){ image.playButton.removeEventListener(MouseEvent.CLICK, initializeGame); image.optionButton.removeEventListener(MouseEvent.CLICK, optionMenu); image.instructionButton.removeEventListener(MouseEvent.CLICK, gameInstruction); image.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); image.highscoresButton.removeEventListener(MouseEvent.CLICK, showScores); World.getSingleton().menuRoot.removeChild(image); detachFromRoot(); image = null; destroyCrossHair(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new InstructionScreen(movieClip)); //unresolved jump }; if (optionPressed){ image.playButton.removeEventListener(MouseEvent.CLICK, initializeGame); image.optionButton.removeEventListener(MouseEvent.CLICK, optionMenu); image.instructionButton.removeEventListener(MouseEvent.CLICK, gameInstruction); image.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); image.creditButton.removeEventListener(MouseEvent.CLICK, showCredit); image.highscoresButton.removeEventListener(MouseEvent.CLICK, showScores); image.continueButton.removeEventListener(MouseEvent.CLICK, continueGame); World.getSingleton().menuRoot.removeChild(image); detachFromRoot(); image = null; destroyCrossHair(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new OptionScreen(movieClip)); //unresolved jump }; if (creditPressed){ image.playButton.removeEventListener(MouseEvent.CLICK, initializeGame); image.optionButton.removeEventListener(MouseEvent.CLICK, optionMenu); image.instructionButton.removeEventListener(MouseEvent.CLICK, gameInstruction); image.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); image.creditButton.removeEventListener(MouseEvent.CLICK, showCredit); image.highscoresButton.removeEventListener(MouseEvent.CLICK, showScores); image.continueButton.removeEventListener(MouseEvent.CLICK, continueGame); World.getSingleton().menuRoot.removeChild(image); detachFromRoot(); image = null; destroyCrossHair(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new CreditState(movieClip)); //unresolved jump }; if (highscoresPressed){ image.playButton.removeEventListener(MouseEvent.CLICK, initializeGame); image.optionButton.removeEventListener(MouseEvent.CLICK, optionMenu); image.instructionButton.removeEventListener(MouseEvent.CLICK, gameInstruction); image.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); image.creditButton.removeEventListener(MouseEvent.CLICK, showCredit); image.highscoresButton.removeEventListener(MouseEvent.CLICK, showScores); image.continueButton.removeEventListener(MouseEvent.CLICK, continueGame); World.getSingleton().menuRoot.removeChild(image); detachFromRoot(); image = null; destroyCrossHair(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new ShowHighScoresState(movieClip)); //unresolved jump }; return (this); } public function soundMute(_arg1:MouseEvent):void{ if (World.getSingleton().muted){ World.getSingleton().muted = false; image.soundButton.gotoAndStop(2); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); World.getSingleton().backGroundSoundChannel = sound.play(0, 9999); }; } else { World.getSingleton().muted = true; image.soundButton.gotoAndStop(1); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; }; } } }//package p_gameManager
Section 260
//OptionScreen (p_gameManager.OptionScreen) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; import p_crosshair.*; import flash.ui.*; public class OptionScreen extends GameManager { public var closePressed:Boolean; public var image:MovieClip; public var clickSound:Sound; public var handCrossHair:HandCrosshair; public function OptionScreen(_arg1:MovieClip){ super(_arg1); image = new optionScreen(); World.getSingleton().menuRoot.addChild(image); closePressed = false; initListener(); initCrossHair(); clickSound = new ClickSound(); if (World.getSingleton().muted){ image.soundButton.gotoAndStop(1); } else { image.soundButton.gotoAndStop(2); }; } public function initListener():void{ image.closeBtn.addEventListener(MouseEvent.CLICK, closeInstruction); image.lowButton.addEventListener(MouseEvent.CLICK, setLowQuality); image.mediumButton.addEventListener(MouseEvent.CLICK, setMediumQuality); image.highButton.addEventListener(MouseEvent.CLICK, setHighQuality); image.soundButton.addEventListener(MouseEvent.CLICK, soundMute); } public function setLowQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.LOW; World.getSingleton().quality = movieClip.stage.quality; } public function initCrossHair():void{ handCrossHair = new HandCrosshair(); World.getSingleton().mousePointer = handCrossHair; Mouse.hide(); } public function setHighQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.HIGH; World.getSingleton().quality = movieClip.stage.quality; } public function destroyCrossHair():void{ Mouse.show(); handCrossHair.destroy(); } public function setMediumQuality(_arg1:MouseEvent):void{ movieClip.stage.quality = StageQuality.MEDIUM; World.getSingleton().quality = movieClip.stage.quality; } public function closeInstruction(_arg1:MouseEvent):void{ closePressed = true; if (!World.getSingleton().muted){ clickSound.play(); }; } override public function update():GameManager{ if (closePressed){ image.closeBtn.removeEventListener(MouseEvent.CLICK, closeInstruction); image.lowButton.removeEventListener(MouseEvent.CLICK, setLowQuality); image.mediumButton.removeEventListener(MouseEvent.CLICK, setMediumQuality); image.highButton.removeEventListener(MouseEvent.CLICK, setHighQuality); image.soundButton.removeEventListener(MouseEvent.CLICK, soundMute); World.getSingleton().menuRoot.removeChild(image); image = null; detachFromRoot(); destroyCrossHair(); return (new MainMenuState(movieClip)); }; return (this); } public function soundMute(_arg1:MouseEvent):void{ if (World.getSingleton().muted){ World.getSingleton().muted = false; image.soundButton.gotoAndStop(2); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.soundTransform.volume = 1; }; } else { World.getSingleton().muted = true; image.soundButton.gotoAndStop(1); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.soundTransform.volume = 0; }; }; } } }//package p_gameManager
Section 261
//ShowHighScoresState (p_gameManager.ShowHighScoresState) package p_gameManager { import p_singleton.*; import flash.display.*; import flash.media.*; import p_crosshair.*; import mochi.as3.*; import flash.ui.*; public class ShowHighScoresState extends GameManager { public var closePressed:Boolean; public var image:MovieClip; public var clickSound:Sound; public var handCrossHair:HandCrosshair; public function ShowHighScoresState(_arg1:MovieClip){ super(_arg1); image = new highscoresClip(); World.getSingleton().menuRoot.addChild(image); image.loadingClip.visible = true; closePressed = false; clickSound = new ClickSound(); connect(); showScores(); initCrossHair(); } public function initCrossHair():void{ handCrossHair = new HandCrosshair(); World.getSingleton().mousePointer = handCrossHair; Mouse.show(); } public function onClose(_arg1:Object=null):void{ closePressed = true; } public function destroyCrossHair():void{ Mouse.show(); handCrossHair.destroy(); } public function onDoneLoading(_arg1:Object=null):void{ image.loadingClip.visible = true; } public function showScores():void{ var o:Object; var boardID:String; o = {n:[15, 15, 0, 11, 8, 9, 0, 7, 11, 13, 8, 14, 1, 0, 14, 12], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, onDisplay:onDoneLoading}); MochiScores.onCloseHandler = onClose; } override public function update():GameManager{ if (closePressed){ World.getSingleton().menuRoot.removeChild(image); image = null; detachFromRoot(); destroyCrossHair(); return (new MainMenuState(movieClip)); }; return (this); } public function connect():void{ MochiServices.connect("349f9764c411a8cb", movieClip); } } }//package p_gameManager
Section 262
//SubmitHighscoresState (p_gameManager.SubmitHighscoresState) package p_gameManager { import flash.events.*; import p_singleton.*; import flash.display.*; import mochi.as3.*; public class SubmitHighscoresState extends GameManager { public var image:MovieClip; public var scoreReceived:Boolean; public function SubmitHighscoresState(_arg1:MovieClip){ super(_arg1); scoreReceived = false; image = new preSubmitHighscores(); image.scoreText.text = ("" + World.getSingleton().score); image.pleaseWait.visible = false; addChild(image); initListener(); } public function initListener():void{ image.submitButton.addEventListener(MouseEvent.CLICK, submitFunction); } public function submitFunction(_arg1:MouseEvent):void{ var o:Object; var boardID:String; var e = _arg1; World.getSingleton().userName = ("" + image.nameText.text); MochiServices.connect("349f9764c411a8cb", movieClip); o = {n:[15, 15, 0, 11, 8, 9, 0, 7, 11, 13, 8, 14, 1, 0, 14, 12], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); MochiScores.setBoardID(boardID); MochiScores.submit(World.getSingleton().score, World.getSingleton().userName, this, "onScoresReceived"); MochiScores.onCloseHandler = onClose; MochiScores.onErrorHandler = onClose; image.submitButton.visible = false; image.pleaseWait.visible = true; } public function removeListener():void{ image.submitButton.removeEventListener(MouseEvent.CLICK, submitFunction); } public function onClose(_arg1:Object=null):void{ image.submitButton.visible = true; image.pleaseWait.visible = false; } override public function update():GameManager{ if (scoreReceived){ removeChild(image); detachFromRoot(); removeListener(); return (new ShowHighScoresState(movieClip)); }; return (this); } public function onScoresReceived(_arg1:Object):void{ if (_arg1.scores != null){ World.getSingleton().score = 0; scoreReceived = true; } else { if (_arg1.error){ }; }; } } }//package p_gameManager
Section 263
//TogeIntroScreen (p_gameManager.TogeIntroScreen) package p_gameManager { import p_singleton.*; import flash.display.*; import flash.media.*; public class TogeIntroScreen extends GameManager { public var sound:Sound; public var image:MovieClip; public function TogeIntroScreen(_arg1:MovieClip){ super(_arg1); image = new introScreen(); addChild(image); sound = new introductionSound2(); if (!World.getSingleton().muted){ World.getSingleton().backGroundSoundChannel = sound.play(0, 9999); }; } override public function update():GameManager{ if (image){ if (image.animationDone){ this.removeChild(image); image = null; detachFromRoot(); if (World.getSingleton().backGroundSoundChannel){ World.getSingleton().backGroundSoundChannel.stop(); }; return (new MainMenuState(movieClip)); }; }; return (this); } } }//package p_gameManager
Section 264
//WeaponShopState (p_gameManager.WeaponShopState) package p_gameManager { import p_singleton.*; import flash.display.*; import p_crosshair.*; import p_menuBar.*; import flash.ui.*; public class WeaponShopState extends GameManager { public var weaponShop:WeaponShop; public var handCrossHair:HandCrosshair; public function WeaponShopState(_arg1:MovieClip){ super(_arg1); weaponShop = new WeaponShop(); World.getSingleton().menuRoot.addChild(weaponShop.image); weaponShop.image.warningClip.visible = false; weaponShop.updateUpKeep(); weaponShop.refresh(); initCrossHair(); } public function initCrossHair():void{ handCrossHair = new HandCrosshair(); World.getSingleton().mousePointer = handCrossHair; Mouse.hide(); } public function destroyCrossHair():void{ Mouse.show(); handCrossHair.destroy(); } override public function update():GameManager{ if (weaponShop.done){ weaponShop.destroy(); detachFromRoot(); weaponShop = null; destroyCrossHair(); return (new BarricadeState(movieClip)); }; return (this); } } }//package p_gameManager
Section 265
//Gibs (p_gibs.Gibs) package p_gibs { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.utils.*; import p_entity.*; public class Gibs extends Entity { public var bodyDef:b2BodyDef; public var imageTime:int; public var restitution:Number; public var circleDef:b2CircleDef; public var body:b2Body; public var density:Number; public var lifeTimer:Timer; public var polygonDef:b2PolygonDef; public var imageTimer:Timer; public var lifeTime:int; public var numOfGibsType:int; public var friction:Number; public var bodyType:int; public function Gibs(){ density = 1; friction = 1; restitution = 0; lifeTime = 20; lifeTimer = new Timer(100); lifeTimer.addEventListener(TimerEvent.TIMER, die); imageTime = 20; imageTimer = new Timer(100); imageTimer.addEventListener(TimerEvent.TIMER, removeImage); bodyType = BodyType.GIBS; if (World.getSingleton().gibs.size() > 10){ World.getSingleton().gibs.get(0).lifeTime = 0; }; } public function die(_arg1:TimerEvent):void{ if (lifeTime > 0){ lifeTime--; } else { if (body){ World.getSingleton().physicWorld.DestroyBody(body); body = null; }; if (World.getSingleton().gibs.contains(this)){ World.getSingleton().gibs.remove(this); }; lifeTimer.stop(); lifeTimer.removeEventListener(TimerEvent.TIMER, die); imageTimer.start(); }; } public function removeImage(_arg1:TimerEvent):void{ if (imageTime > 0){ imageTime--; } else { if (image){ if (image.parent){ image.parent.removeChild(image); }; }; imageTimer.stop(); imageTimer.removeEventListener(TimerEvent.TIMER, removeImage); }; } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; polygonDef.id = "gibs"; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; }; } } }//package p_gibs
Section 266
//GibsBone (p_gibs.GibsBone) package p_gibs { import p_singleton.*; import flash.utils.*; public class GibsBone extends Gibs { public function GibsBone(){ var _local1:int; var _local2:Class; super(); numOfGibsType = 3; _local1 = (Math.round(((Math.random() * 10) + 1)) % numOfGibsType); _local2 = (getDefinitionByName(("gibs_bone" + _local1)) as Class); image = new (_local2); lifeTimer.start(); World.getSingleton().gibs.add(this); } private function typedClass():void{ var _local1:gibs_bone0; var _local2:gibs_bone1; var _local3:gibs_bone2; } } }//package p_gibs
Section 267
//GibsBrain (p_gibs.GibsBrain) package p_gibs { import p_singleton.*; import flash.utils.*; public class GibsBrain extends Gibs { public function GibsBrain(){ var _local1:int; var _local2:Class; super(); numOfGibsType = 1; _local1 = (Math.round(((Math.random() * 10) + 1)) % numOfGibsType); _local2 = (getDefinitionByName(("gibs_brain" + _local1)) as Class); image = new (_local2); lifeTimer.start(); World.getSingleton().gibs.add(this); } private function typedClass():void{ var _local1:gibs_brain0; } } }//package p_gibs
Section 268
//GibsHead (p_gibs.GibsHead) package p_gibs { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import p_singleton.*; public class GibsHead extends Gibs { public function GibsHead(){ lifeTimer.start(); World.getSingleton().gibs.add(this); } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ circleDef = new b2CircleDef(); circleDef.radius = (image.width / (2 * 30)); circleDef.friction = friction; circleDef.restitution = restitution; circleDef.density = density; circleDef.filter.groupIndex = bodyType; circleDef.id = "gibs"; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); body = _local1.CreateBody(bodyDef); body.CreateShape(circleDef); body.SetMassFromShapes(); body.type = bodyType; }; } } }//package p_gibs
Section 269
//GibsMeat (p_gibs.GibsMeat) package p_gibs { import p_singleton.*; import flash.utils.*; public class GibsMeat extends Gibs { public function GibsMeat(){ var _local1:int; var _local2:Class; super(); numOfGibsType = 6; _local1 = (Math.round(((Math.random() * 10) + 1)) % numOfGibsType); _local2 = (getDefinitionByName(("gibs_meat" + _local1)) as Class); image = new (_local2); lifeTimer.start(); World.getSingleton().gibs.add(this); } private function typedClass():void{ var _local1:gibs_meat0; var _local2:gibs_meat1; var _local3:gibs_meat2; var _local4:gibs_meat3; var _local5:gibs_meat4; var _local6:gibs_meat5; } } }//package p_gibs
Section 270
//ItemHealth (p_item.ItemHealth) package p_item { import p_singleton.*; public class ItemHealth extends ItemPickUp { public function ItemHealth(){ density = 1; friction = 1; restitution = 0; bonusTotal = 50; image = new medikit(); logo = new medikit(); type = ItemPickUpType.HEALTH; World.getSingleton().level.playerGround.addChild(image); } } }//package p_item
Section 271
//ItemPickUp (p_item.ItemPickUp) package p_item { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.display.*; import org.idmedia.as3commons.util.*; import flash.media.*; import flash.utils.*; import p_entity.*; public class ItemPickUp extends Entity { public var bodyDef:b2BodyDef; public var lifeTime:int; public var amount:int; public var friction:Number; public var body:b2Body; public var bonusTotal:Number; public var density:Number; public var polygonDef:b2PolygonDef; public var lifeTimer:Timer; public var restitution:Number; public var logo:MovieClip; public var type:String; public var bodyType:int; public function ItemPickUp(){ amount = 1; bodyType = BodyType.ITEM_PICK_UP; lifeTime = 100; lifeTimer = new Timer(100); lifeTimer.addEventListener(TimerEvent.TIMER, reduceLifeTime); lifeTimer.start(); } public function getItem(_arg1:int):ItemPickUp{ if (_arg1 == 0){ return (new ItemHealth()); }; return (this); } override public function update():void{ var _local1:Sound; var _local2:ArrayList; var _local3:int; var _local4:ArrayList; var _local5:int; var _local6:int; var _local7:int; super.update(); if (body){ if (body.touchedChar){ body.touchedChar = false; destroy(); if (type == ItemPickUpType.HEALTH){ _local1 = new healthSound(); if (!World.getSingleton().muted){ _local1.play(); }; _local2 = World.getSingleton().players; _local3 = _local2.size(); _local4 = World.getSingleton().npcs; _local5 = _local4.size(); bonusTotal = (bonusTotal / (_local3 + _local5)); _local6 = (_local3 - 1); _local7 = (_local5 - 1); while (_local6 >= 0) { _local2.get(_local6).health = (_local2.get(_local6).health + bonusTotal); if (_local2.get(_local6).health > _local2.get(_local6).maxHealth){ _local2.get(_local6).health = _local2.get(_local6).maxHealth; }; _local6--; }; while (_local7 >= 0) { _local4.get(_local7).health = (_local4.get(_local7).health + bonusTotal); if (_local4.get(_local7).health > _local4.get(_local7).maxHealth){ _local4.get(_local7).health = _local4.get(_local7).maxHealth; }; _local7--; }; }; }; }; } public function reduceLifeTime(_arg1:TimerEvent):void{ if (lifeTime > 0){ lifeTime--; } else { destroy(); }; } public function destroy():void{ lifeTimer.stop(); lifeTimer.removeEventListener(TimerEvent.TIMER, reduceLifeTime); if (image){ if (World.getSingleton().level){ World.getSingleton().level.playerGround.removeChild(image); }; }; if (body){ World.getSingleton().physicWorld.DestroyBody(body); body = null; }; World.getSingleton().itemPickUps.remove(this); } override public function initRigidBody():void{ var _local1:b2World; _local1 = World.getSingleton().physicWorld; if (_local1){ polygonDef = new b2PolygonDef(); polygonDef.SetAsBox((image.width / (2 * 30)), (image.height / (2 * 30))); polygonDef.density = density; polygonDef.friction = friction; polygonDef.restitution = restitution; polygonDef.filter.groupIndex = bodyType; bodyDef = new b2BodyDef(); bodyDef.userData = image; bodyDef.position.Set((position.x / World.physScale), (position.y / World.physScale)); body = _local1.CreateBody(bodyDef); body.CreateShape(polygonDef); body.SetMassFromShapes(); body.type = bodyType; }; } } }//package p_item
Section 272
//ItemPickUpType (p_item.ItemPickUpType) package p_item { public class ItemPickUpType { public static var HEALTH:String = "health"; public static var AMMO_357:String = "3.57"; public static var AMMO_556:String = "5.56"; public static var AMMO_762:String = "7.62"; public static var AMMO_12_GAUGE:String = "12 gauge"; public static var GRENADE:String = "grenade"; public static var AMMO_45:String = ".45"; public static var WALTHER_P99:String = "Walther P99"; public static var STEYR_TMP:String = "Steyr TMP"; public static var AMMO_9MM:String = "9mm"; public static var KEY:String = "key"; } }//package p_item
Section 273
//LevelManager (p_levelManager.LevelManager) package p_levelManager { import p_gamelevel.*; import flash.media.*; public class LevelManager { private var sound:Sound; private static var INSTANCE:LevelManager; public function getLevel(_arg1:int):GameLevel{ if (_arg1 == 1){ return (new Level1()); }; if (_arg1 == 2){ return (new Level2()); }; if (_arg1 == 3){ return (new Level3()); }; if (_arg1 == 4){ return (new Level4()); }; if (_arg1 == 5){ return (new Level5()); }; return (new Level1()); } public static function getSingleton():LevelManager{ if (INSTANCE == null){ INSTANCE = new (LevelManager); }; return (INSTANCE); } } }//package p_levelManager
Section 274
//BarricadeShop (p_menuBar.BarricadeShop) package p_menuBar { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.display.*; import flash.media.*; import flash.utils.*; import p_barricade.*; public class BarricadeShop { public var hide:Boolean; public var maxPage:int; public var finish:Boolean; public var image:MovieClip; public var sellSound:Sound; public var page:int; public var buySound:Sound; public function BarricadeShop(){ page = 0; maxPage = 2; image = new barricadeShop(); if (World.getSingleton().level){ image.barricadeLimit.text = ("" + World.getSingleton().level.maxBarricade); }; finish = false; giveId(); addListener(); buySound = new BuySound(); sellSound = new SellSound(); hide = false; } public function showItems():void{ var _local1:Class; var _local2:Barricade; _local1 = (getDefinitionByName(("barricadeA" + page)) as Class); _local2 = new (_local1); _local2.scaleX = (_local2.scaleX * 0.5); _local2.scaleY = (_local2.scaleY * 0.5); image.barricade0.addChild(_local2); _local1 = (getDefinitionByName(("barricadeB" + page)) as Class); _local2 = new (_local1); _local2.scaleX = (_local2.scaleX * 0.5); _local2.scaleY = (_local2.scaleY * 0.5); image.barricade1.addChild(_local2); } public function buy(_arg1:MouseEvent):void{ var _local2:Barricade; var _local3:Class; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:b2Vec2; var _local7:int; var _local8:int; if (World.getSingleton().playedCharacter){ if (World.getSingleton().level){ if (World.getSingleton().barricades.size() >= World.getSingleton().level.maxBarricade){ return; }; }; _local4 = World.getSingleton().playedCharacter.position; _local5 = World.getSingleton().playedCharacter.direction; _local6 = new b2Vec2(); _local6.x = (_local4.x + (_local5.x * 60)); _local6.y = _local4.y; _local7 = Barricade.price; _local8 = 500; if (MovieClip(_arg1.target.parent).id == 0){ _local3 = (getDefinitionByName(("barricadeA" + page)) as Class); _local2 = new (_local3); _local7 = (_local7 * (page + 1)); _local7 = (_local7 + (400 * page)); _local8 = (_local8 * (page + 1)); _local8 = (_local8 + 50); } else { if (MovieClip(_arg1.target.parent).id == 1){ _local3 = (getDefinitionByName(("barricadeB" + page)) as Class); _local2 = new (_local3); _local7 = (_local7 * (page + 1)); _local7 = (_local7 + 100); _local7 = (_local7 + (600 * page)); _local8 = (_local8 * (page + 1)); _local8 = (_local8 + 80); }; }; if (World.getSingleton().money < _local7){ return; }; World.getSingleton().money = (World.getSingleton().money - _local7); _local2.health = _local8; _local2.maxHealth = _local2.health; _local2.position.x = _local6.x; _local2.position.y = _local6.y; _local2.x = _local6.x; _local2.y = _local6.y; _local2.initTimer(); _local2.initRigidBody(); _local2.localPrice = _local7; World.getSingleton().level.backGround.addChild(_local2); World.getSingleton().barricades.add(_local2); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function destroy():void{ removeListener(); World.getSingleton().menuRoot.removeChild(image); } public function giveId():void{ image.barricade0.id = 0; image.barricade1.id = 1; image.infoBarricade0.mouseOut = true; image.infoBarricade1.mouseOut = true; } public function update(_arg1:Event):void{ if (image.infoBarricade0.mouseOut){ if (image.infoBarricade0.x < 764.5){ image.infoBarricade0.x = (image.infoBarricade0.x + 5); }; } else { if (!image.infoBarricade0.mouseOut){ if (image.infoBarricade0.x > 614.5){ image.infoBarricade0.x = (image.infoBarricade0.x - 5); }; }; }; if (image.infoBarricade1.mouseOut){ if (image.infoBarricade1.x < 764.5){ image.infoBarricade1.x = (image.infoBarricade1.x + 5); }; } else { if (!image.infoBarricade1.mouseOut){ if (image.infoBarricade1.x > 614.5){ image.infoBarricade1.x = (image.infoBarricade1.x - 5); }; }; }; if (hide){ if (image.x < 110){ image.x = (image.x + 5); image.startButton.x = (image.startButton.x - 5); }; } else { if (image.x > 0){ image.x = (image.x - 5); image.startButton.x = (image.startButton.x + 5); }; }; image.barricadeLimit.text = ("" + (World.getSingleton().level.maxBarricade - World.getSingleton().barricades.size())); if (World.getSingleton().playerInsideBarricade){ image.startButton.alpha = 0.5; SimpleButton(image.startButton).enabled = false; } else { image.startButton.alpha = 1; SimpleButton(image.startButton).enabled = true; }; } public function addImageToMenuRoot():void{ World.getSingleton().menuRoot.addChild(image); } public function hideShop(_arg1:MouseEvent):void{ if (hide){ hide = false; } else { hide = true; }; } public function mouseOver(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; _local2 = Barricade.price; _local3 = 500; if (MovieClip(_arg1.target.parent).id == 0){ image.infoBarricade0.mouseOut = false; _local2 = (_local2 * (page + 1)); _local2 = (_local2 + (400 * page)); _local3 = (_local3 * (page + 1)); _local3 = (_local3 + 50); image.infoBarricade0.price.text = ("$ " + _local2); image.infoBarricade0.durability.text = (("" + _local3) + " dmg"); } else { if (MovieClip(_arg1.target.parent).id == 1){ image.infoBarricade1.mouseOut = false; _local2 = (_local2 * (page + 1)); _local2 = (_local2 + 100); _local2 = (_local2 + (600 * page)); _local3 = (_local3 * (page + 1)); _local3 = (_local3 + 250); image.infoBarricade1.price.text = ("$ " + _local2); image.infoBarricade1.durability.text = (("" + _local3) + " dmg"); }; }; _arg1.updateAfterEvent(); } public function removeItems():void{ if (image.barricade0.numChildren > 0){ image.barricade0.removeChildAt(image.barricade0.getChildAt(0)); }; if (image.barricade1.numChildren > 0){ image.barricade1.removeChildAt(image.barricade1.getChildAt(0)); }; } public function removeListener():void{ image.barricade0.removeEventListener(MouseEvent.CLICK, buy); image.barricade0.removeEventListener(MouseEvent.MOUSE_OVER, mouseOver); image.barricade0.removeEventListener(MouseEvent.MOUSE_OUT, mouseOut); image.barricade1.removeEventListener(MouseEvent.CLICK, buy); image.barricade1.removeEventListener(MouseEvent.MOUSE_OVER, mouseOver); image.barricade1.removeEventListener(MouseEvent.MOUSE_OUT, mouseOut); image.chooserBox.prevButton.removeEventListener(MouseEvent.CLICK, prevPage); image.chooserBox.nextButton.removeEventListener(MouseEvent.CLICK, nextPage); image.startButton.removeEventListener(MouseEvent.CLICK, finishShop); image.removeEventListener(Event.ENTER_FRAME, update); image.hideButton.removeEventListener(MouseEvent.CLICK, hideShop); } public function prevPage(_arg1:MouseEvent):void{ if (page > 0){ page--; refresh(); }; } public function refresh():void{ removeItems(); showItems(); if (World.getSingleton().level){ image.barricadeLimit.text = ("" + (World.getSingleton().level.maxBarricade - World.getSingleton().barricades.size())); }; } private function typedClass():void{ var _local1:TestBox0; var _local2:TestBox1; var _local3:TestTriangleA0; var _local4:TestTriangleA1; var _local5:TestTriangleB0; var _local6:TestTriangleB1; var _local7:TestRect0; var _local8:TestRect1; var _local9:barricadeA0; var _local10:barricadeB0; var _local11:barricadeA1; var _local12:barricadeB1; } public function finishShop(_arg1:MouseEvent):void{ if (!World.getSingleton().playerInsideBarricade){ finish = true; }; } public function nextPage(_arg1:MouseEvent):void{ if (page < (maxPage - 1)){ page++; refresh(); }; } public function addListener():void{ image.addEventListener(Event.ENTER_FRAME, update); image.barricade0.addEventListener(MouseEvent.CLICK, buy); image.barricade0.addEventListener(MouseEvent.MOUSE_OVER, mouseOver); image.barricade0.addEventListener(MouseEvent.MOUSE_OUT, mouseOut); image.barricade1.addEventListener(MouseEvent.CLICK, buy); image.barricade1.addEventListener(MouseEvent.MOUSE_OVER, mouseOver); image.barricade1.addEventListener(MouseEvent.MOUSE_OUT, mouseOut); image.chooserBox.prevButton.addEventListener(MouseEvent.CLICK, prevPage); image.chooserBox.nextButton.addEventListener(MouseEvent.CLICK, nextPage); image.startButton.addEventListener(MouseEvent.CLICK, finishShop); image.hideButton.addEventListener(MouseEvent.CLICK, hideShop); } public function mouseOut(_arg1:MouseEvent):void{ if (MovieClip(_arg1.target.parent).id == 0){ image.infoBarricade0.mouseOut = true; } else { if (MovieClip(_arg1.target.parent).id == 1){ image.infoBarricade1.mouseOut = true; }; }; } } }//package p_menuBar
Section 275
//MenuBar (p_menuBar.MenuBar) package p_menuBar { import flash.events.*; import p_weapon.*; import p_singleton.*; import flash.display.*; import flash.utils.*; public class MenuBar { public var timer:Timer; public var image:MovieClip; public function MenuBar(){ image = new menuBarClip(); World.getSingleton().menuRoot.addChild(image); timer = new Timer(100); timer.addEventListener(TimerEvent.TIMER, fadeIn); addListener(); } public function fadeIn(_arg1:TimerEvent):void{ image.resultScreen.alpha = (image.resultScreen.alpha + 0.05); if (image.resultScreen.alpha >= 1){ timer.stop(); }; } public function showResultScreen():void{ image.resultScreen.alpha = 0; if (World.getSingleton().currentLevelNumber == 1){ image.resultScreen.gameScoreMenu.locationName.text = "Home Sweet Home"; } else { if (World.getSingleton().currentLevelNumber == 2){ image.resultScreen.gameScoreMenu.locationName.text = "Supermart"; } else { if (World.getSingleton().currentLevelNumber == 3){ image.resultScreen.gameScoreMenu.locationName.text = "Apartment"; } else { if (World.getSingleton().currentLevelNumber == 4){ image.resultScreen.gameScoreMenu.locationName.text = "Police HQ"; } else { if (World.getSingleton().currentLevelNumber == 5){ image.resultScreen.gameScoreMenu.locationName.text = "Military Checkpoint"; } else { if (World.getSingleton().currentLevelNumber == 6){ image.resultScreen.gameScoreMenu.locationName.text = "Harbor"; }; }; }; }; }; }; image.resultScreen.gameScoreMenu.dayText.text = ("" + (World.getSingleton().waveCounter + 1)); image.resultScreen.gameScoreMenu.killText.text = ("" + World.getSingleton().kills); image.resultScreen.gameScoreMenu.scoreText.text = ("" + World.getSingleton().score); image.resultScreen.gameOverMenu.scoreText.text = ("" + World.getSingleton().score); image.resultScreen.gameScoreMenu.advanceText.text = (("" + ((World.getSingleton().numOfWave - 1) - World.getSingleton().waveNum)) + " more days to advance"); timer.start(); } public function update(_arg1:Event):void{ var _local2:Number; var _local3:Number; var _local4:int; var _local5:int; var _local6:int; var _local7:Weapon; if (World.getSingleton().players.size() > 0){ _local2 = World.getSingleton().money; _local3 = World.getSingleton().playedCharacter.health; image.money.text = ("" + _local2); image.health.text = ("" + Math.round(_local3)); if (World.getSingleton().level){ image.kills.text = ("" + World.getSingleton().level.enemyKilled); }; _local4 = World.getSingleton().waveTime; _local5 = (_local4 / 60); _local6 = (_local4 % 60); image.minute.text = ("" + _local5); image.second.text = ("" + _local6); _local7 = World.getSingleton().playedCharacter.currentWeapon; if (_local7){ image.weaponName.text = _local7.id; image.weaponPic.gotoAndStop(_local7.id); if (_local7.weaponType == WeaponType.RANGE){ image.ammo.text = ("" + RangeWeapon(_local7).ammo); image.reloadAmmo.text = ("" + RangeWeapon(_local7).ammoType.amount); } else { if (_local7.weaponType == WeaponType.MELEE){ image.ammo.text = "~"; image.reloadAmmo.text = "~"; } else { if (_local7.weaponType == WeaponType.EXPLOSIVE){ image.ammo.text = ("" + ExplosiveWeapon(_local7).ammo); image.reloadAmmo.text = ("" + ExplosiveWeapon(_local7).reloadAmmo); }; }; }; }; } else { image.health.text = "0"; }; } public function addListener():void{ image.addEventListener(Event.ENTER_FRAME, update); } public function removeListener():void{ image.removeEventListener(Event.ENTER_FRAME, update); } } }//package p_menuBar
Section 276
//WeaponInventory (p_menuBar.WeaponInventory) package p_menuBar { import flash.events.*; import p_weapon.*; import p_singleton.*; import flash.display.*; import p_char.p_playable.*; import p_ammo.*; import p_util.*; public class WeaponInventory { public var draggedItem:MovieClip; public var page:int; public var prevPositionX:Number; public var prevPositionY:Number; public var player:PlayableCharacter; public var image:MovieClip; public var numOfItemsInOnePage:int; public var weaponType:String; public function WeaponInventory(_arg1:PlayableCharacter){ numOfItemsInOnePage = 6; this.player = _arg1; image = new weaponInventory(); World.getSingleton().menuRoot.addChild(image); weaponType = WeaponType.RANGE; page = 0; initListener(); giveId(); image.explanationBox.ammoType.alpha = 0; image.explanationBox.priceText.visible = false; image.explanationBox.priceLabel.visible = false; image.explanationBox.ownedLabel.visible = false; image.explanationBox.ownedText.visible = false; image.chooserBox.prevButton.addEventListener(MouseEvent.CLICK, prevPage); image.chooserBox.nextButton.addEventListener(MouseEvent.CLICK, nextPage); } public function giveId():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = numOfItemsInOnePage; while (_local1 < _local2) { image.weaponOption[("holder" + _local1)].id = _local1; image.weaponOption[("holder" + _local1)].prevX = image.weaponOption[("holder" + _local1)].x; image.weaponOption[("holder" + _local1)].prevY = image.weaponOption[("holder" + _local1)].y; _local1++; }; } public function showFireArmWeapons(_arg1:MouseEvent):void{ weaponType = WeaponType.RANGE; page = 0; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); } public function removeListener():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = numOfItemsInOnePage; while (_local1 < _local2) { if (image.weaponOption[("holder" + _local1)].hasEventListener(MouseEvent.MOUSE_DOWN)){ image.weaponOption[("holder" + _local1)].removeEventListener(MouseEvent.MOUSE_DOWN, startDrag); }; if (image.weaponOption[("holder" + _local1)].hasEventListener(MouseEvent.MOUSE_UP)){ image.weaponOption[("holder" + _local1)].removeEventListener(MouseEvent.MOUSE_UP, stopDrag); }; _local1++; }; } public function refresh():void{ if (player.primaryWeapon){ image.equipBox.primaryWeapon.addChild(player.primaryWeapon.logo); }; if (player.secondaryWeapon){ image.equipBox.secondaryWeapon.addChild(player.secondaryWeapon.logo); }; if (player.meleeWeapon){ image.equipBox.meleeWeapon.addChild(player.meleeWeapon.logo); }; if (player.explosiveWeapon){ image.equipBox.explosiveWeapon.addChild(player.explosiveWeapon.logo); }; image.equipBox.ammo12gaugeText.text = ("x " + player.ammoInventory.get(0).amount); image.equipBox.ammo357Text.text = ("x " + player.ammoInventory.get(1).amount); image.equipBox.ammo45Text.text = ("x " + player.ammoInventory.get(2).amount); image.equipBox.ammo556Text.text = ("x " + player.ammoInventory.get(3).amount); image.equipBox.ammo762Text.text = ("x " + player.ammoInventory.get(4).amount); image.equipBox.ammo9mmText.text = ("x " + player.ammoInventory.get(5).amount); image.equipBox.ammo50calText.text = ("x " + player.ammoInventory.get(6).amount); image.equipBox.ammoHEText.text = ("x " + player.ammoInventory.get(7).amount); removeListener(); clearWeaponImages(); showWeapons(); } public function showMeleeWeapons(_arg1:MouseEvent):void{ weaponType = WeaponType.MELEE; page = 0; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); } public function nextPage(_arg1:MouseEvent):void{ if (page < 3){ page++; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); }; } public function startDrag(_arg1:MouseEvent):void{ var _local2:int; _local2 = MovieClip(_arg1.target.parent).id; showExplanation(_arg1); draggedItem = image.weaponOption[("holder" + _local2)]; draggedItem.startDrag(); } public function initListener():void{ MovieClip(image.fireArm).addEventListener(MouseEvent.CLICK, showFireArmWeapons); MovieClip(image.melee).addEventListener(MouseEvent.CLICK, showMeleeWeapons); MovieClip(image.explosive).addEventListener(MouseEvent.CLICK, showExplosiveWeapons); image.equipBox.switchButton.addEventListener(MouseEvent.CLICK, switchWeapon); } public function stopDrag(_arg1:MouseEvent=null):void{ var _local2:int; if (draggedItem){ _local2 = MovieClip(_arg1.target.parent).id; changeWeaponLogo(_arg1); image.weaponOption[("holder" + _local2)].stopDrag(); image.weaponOption[("holder" + _local2)].x = image.weaponOption[("holder" + _local2)].prevX; image.weaponOption[("holder" + _local2)].y = image.weaponOption[("holder" + _local2)].prevY; draggedItem = null; }; } public function showExplosiveWeapons(_arg1:MouseEvent):void{ weaponType = WeaponType.EXPLOSIVE; page = 0; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); } public function clearWeaponImages():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; _local1 = 0; _local2 = numOfItemsInOnePage; while (_local1 < _local2) { if (image.weaponOption[("holder" + _local1)].numChildren > 0){ _local3 = 0; _local4 = image.weaponOption[("holder" + _local1)].numChildren; _local3 = (_local4 - 1); while (_local3 >= 0) { image.weaponOption[("holder" + _local1)].removeChildAt(_local3); _local3--; }; }; _local1++; }; } public function prevPage(_arg1:MouseEvent):void{ if (page > 0){ page--; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); }; } public function stopDrag2(_arg1:Event=null):void{ if (draggedItem){ draggedItem.stopDrag(); draggedItem.x = prevPositionX; draggedItem.y = prevPositionY; draggedItem = null; }; } public function switchWeapon(_arg1:MouseEvent):void{ var _local2:RangeWeapon; var _local3:MovieClip; if (((player.primaryWeapon) && (player.secondaryWeapon))){ _local2 = player.primaryWeapon; player.primaryWeapon = player.secondaryWeapon; player.secondaryWeapon = _local2; _local3 = image.equipBox.primaryWeapon.getChildAt(2); if (image.equipBox.primaryWeapon.numChildren > 2){ image.equipBox.primaryWeapon.removeChildAt(2); }; image.equipBox.primaryWeapon.addChild(image.equipBox.secondaryWeapon.getChildAt(2)); if (image.equipBox.secondaryWeapon.numChildren > 2){ image.equipBox.secondaryWeapon.removeChildAt(2); }; image.equipBox.secondaryWeapon.addChild(_local3); if (player.currentWeapon == player.primaryWeapon){ player.changeWeapon(player.primaryWeapon); } else { if (player.currentWeapon == player.secondaryWeapon){ player.changeWeapon(player.secondaryWeapon); }; }; }; } public function showWeapons():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:MovieClip; _local1 = 0; _local4 = 0; if (weaponType == WeaponType.RANGE){ _local2 = player.rangeWeaponInventory.size(); _local1 = (0 + (page * numOfItemsInOnePage)); _local3 = 0; if (_local1 < _local2){ while (_local1 < _local2) { if (_local3 < numOfItemsInOnePage){ image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_DOWN, startDrag); image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_UP, stopDrag); image.weaponOption[("holder" + _local3)].addChild(DisplayObjectModifier.duplicateMovieClip(player.rangeWeaponInventory.get(_local1).logo)); _local5 = image.weaponOption[("holder" + _local3)].numChildren; _local4 = 0; while (_local4 < _local5) { _local6 = image.weaponOption[("holder" + _local3)].getChildAt(_local4); _local6.id = _local3; _local4++; }; _local3++; }; _local1++; }; }; } else { if (weaponType == WeaponType.MELEE){ _local2 = player.meleeWeaponInventory.size(); _local1 = (0 + (page * numOfItemsInOnePage)); _local3 = 0; if (_local1 < _local2){ while (_local1 < _local2) { if (_local3 < numOfItemsInOnePage){ image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_DOWN, startDrag); image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_UP, stopDrag); image.weaponOption[("holder" + _local3)].addChild(DisplayObjectModifier.duplicateMovieClip(player.meleeWeaponInventory.get(_local1).logo)); _local5 = image.weaponOption[("holder" + _local3)].numChildren; _local4 = 0; while (_local4 < _local5) { _local6 = image.weaponOption[("holder" + _local3)].getChildAt(_local4); _local6.id = _local3; _local4++; }; _local3++; }; _local1++; }; }; } else { if (weaponType == WeaponType.EXPLOSIVE){ _local2 = player.explosiveWeaponInventory.size(); _local1 = (0 + (page * numOfItemsInOnePage)); _local3 = 0; if (_local1 < _local2){ while (_local1 < _local2) { if (_local3 < numOfItemsInOnePage){ image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_DOWN, startDrag); image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_UP, stopDrag); image.weaponOption[("holder" + _local3)].addChild(DisplayObjectModifier.duplicateMovieClip(player.explosiveWeaponInventory.get(_local1).logo)); _local5 = image.weaponOption[("holder" + _local3)].numChildren; _local4 = 0; while (_local4 < _local5) { _local6 = image.weaponOption[("holder" + _local3)].getChildAt(_local4); _local6.id = _local3; _local4++; }; _local3++; }; _local1++; }; }; }; }; }; } public function showExplanation(_arg1:MouseEvent):void{ var _local2:int; var _local3:RangeWeapon; var _local4:Number; var _local5:Number; var _local6:MeleeWeapon; var _local7:ExplosiveWeapon; _local2 = MovieClip(_arg1.target.parent).id; if (weaponType == WeaponType.RANGE){ _local3 = player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); if (image.explanationBox.weaponPic.numChildren > 0){ image.explanationBox.weaponPic.removeChildAt(0); }; image.explanationBox.weaponPic.addChild(DisplayObjectModifier.duplicateMovieClip(_local3.logo)); changeAmmoImage(_local3); _local4 = (Math.floor(((1000 / _local3.delay) * 100)) / 100); image.explanationBox.rpsText.text = ("" + _local4); image.explanationBox.weaponName.text = ("" + _local3.id); image.explanationBox.damageText.text = ("" + _local3.damage); image.explanationBox.accLabel.visible = true; image.explanationBox.reloadLabel.visible = true; image.explanationBox.clipLabel.visible = true; image.explanationBox.accText.text = ("" + _local3.accuracy); image.explanationBox.clipText.text = ("" + _local3.maxAmmo); _local5 = (Math.floor(((_local3.reloadTime / 1000) * 100)) / 100); image.explanationBox.reloadText.text = (("" + _local5) + " s"); image.explanationBox.ownedLabel.visible = false; image.explanationBox.ownedText.visible = false; } else { if (weaponType == WeaponType.MELEE){ _local6 = player.meleeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); if (image.explanationBox.weaponPic.numChildren > 0){ image.explanationBox.weaponPic.removeChildAt(0); }; image.explanationBox.weaponPic.addChild(DisplayObjectModifier.duplicateMovieClip(_local6.logo)); image.explanationBox.ammoType.alpha = 0; _local4 = (Math.floor(((1000 / _local6.delay) * 100)) / 100); image.explanationBox.rpsText.text = ("" + _local4); image.explanationBox.weaponName.text = ("" + _local6.id); image.explanationBox.damageText.text = ("" + _local6.damage); image.explanationBox.ownedLabel.visible = false; image.explanationBox.ownedText.visible = false; image.explanationBox.accLabel.visible = false; image.explanationBox.reloadLabel.visible = false; image.explanationBox.clipLabel.visible = false; image.explanationBox.accText.text = ""; image.explanationBox.clipText.text = ""; image.explanationBox.reloadText.text = ""; } else { if (weaponType == WeaponType.EXPLOSIVE){ _local7 = player.explosiveWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); if (image.explanationBox.weaponPic.numChildren > 0){ image.explanationBox.weaponPic.removeChildAt(0); }; image.explanationBox.weaponPic.addChild(DisplayObjectModifier.duplicateMovieClip(_local7.logo)); image.explanationBox.ammoType.alpha = 0; _local4 = (Math.floor(((1000 / _local7.delay) * 100)) / 100); image.explanationBox.rpsText.text = ("" + _local4); image.explanationBox.weaponName.text = ("" + _local7.id); image.explanationBox.damageText.text = ("" + _local7.damage); image.explanationBox.ownedLabel.visible = true; image.explanationBox.ownedText.visible = true; image.explanationBox.ownedText.text = ("" + (_local7.reloadAmmo + _local7.ammo)); image.explanationBox.accLabel.visible = false; image.explanationBox.reloadLabel.visible = false; image.explanationBox.clipLabel.visible = false; image.explanationBox.accText.text = ""; image.explanationBox.clipText.text = ""; image.explanationBox.reloadText.text = ""; }; }; }; } public function changeAmmoImage(_arg1:RangeWeapon):void{ if (weaponType == WeaponType.RANGE){ image.explanationBox.ammoType.alpha = 1; if (_arg1.ammoType.id == AmmoType.AMMO_12_GAUGE){ image.explanationBox.ammoType.gotoAndStop("ammo12gauge"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_357){ image.explanationBox.ammoType.gotoAndStop("ammo357"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_45){ image.explanationBox.ammoType.gotoAndStop("ammo45"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_556){ image.explanationBox.ammoType.gotoAndStop("ammo556"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_762){ image.explanationBox.ammoType.gotoAndStop("ammo762"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_9MM){ image.explanationBox.ammoType.gotoAndStop("ammo9mm"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_50CAL){ image.explanationBox.ammoType.gotoAndStop("ammo50cal"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_HE){ image.explanationBox.ammoType.gotoAndStop("ammoHE"); }; }; }; }; }; }; }; }; }; } public function changeWeaponLogo(_arg1:MouseEvent):void{ var _local2:int; if (PixelCollision.isColliding(MovieClip(_arg1.target), image.equipBox.primaryWeapon, World.getSingleton().menuRoot)){ _local2 = MovieClip(_arg1.target.parent).id; if (weaponType == WeaponType.RANGE){ if (player.secondaryWeapon != player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage)))){ if (image.equipBox.primaryWeapon.numChildren > 2){ image.equipBox.primaryWeapon.removeChildAt(2); }; image.equipBox.primaryWeapon.addChild(player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))).logo); if (player.currentWeapon == player.primaryWeapon){ player.changeWeapon(player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage)))); }; player.primaryWeapon = player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); }; }; } else { if (PixelCollision.isColliding(MovieClip(_arg1.target), image.equipBox.secondaryWeapon, World.getSingleton().menuRoot)){ _local2 = MovieClip(_arg1.target.parent).id; if (weaponType == WeaponType.RANGE){ if (player.primaryWeapon != player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage)))){ if (image.equipBox.secondaryWeapon.numChildren > 2){ image.equipBox.secondaryWeapon.removeChildAt(2); }; image.equipBox.secondaryWeapon.addChild(player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))).logo); if (player.currentWeapon == player.secondaryWeapon){ player.changeWeapon(player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage)))); }; player.secondaryWeapon = player.rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); }; }; } else { if (PixelCollision.isColliding(MovieClip(_arg1.target), image.equipBox.meleeWeapon, World.getSingleton().menuRoot)){ if (weaponType == WeaponType.MELEE){ if (image.equipBox.meleeWeapon.numChildren > 2){ image.equipBox.meleeWeapon.removeChildAt(2); }; _local2 = MovieClip(_arg1.target.parent).id; image.equipBox.meleeWeapon.addChild(player.meleeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))).logo); if (player.currentWeapon == player.meleeWeapon){ player.changeWeapon(player.meleeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage)))); }; player.meleeWeapon = player.meleeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); }; } else { if (PixelCollision.isColliding(MovieClip(_arg1.target), image.equipBox.explosiveWeapon, World.getSingleton().menuRoot)){ if (weaponType == WeaponType.EXPLOSIVE){ if (image.equipBox.explosiveWeapon.numChildren > 2){ image.equipBox.explosiveWeapon.removeChildAt(2); }; _local2 = MovieClip(_arg1.target.parent).id; image.equipBox.explosiveWeapon.addChild(player.explosiveWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))).logo); if (player.currentWeapon == player.explosiveWeapon){ player.changeWeapon(player.explosiveWeaponInventory.get((_local2 + (page * numOfItemsInOnePage)))); }; player.explosiveWeapon = player.explosiveWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); }; }; }; }; }; } public function destroy():void{ image.chooserBox.prevButton.removeEventListener(MouseEvent.CLICK, prevPage); image.chooserBox.nextButton.removeEventListener(MouseEvent.CLICK, nextPage); removeListener(); clearWeaponImages(); if (image){ World.getSingleton().menuRoot.removeChild(image); }; MovieClip(image.fireArm).removeEventListener(MouseEvent.CLICK, showFireArmWeapons); MovieClip(image.melee).removeEventListener(MouseEvent.CLICK, showMeleeWeapons); MovieClip(image.explosive).removeEventListener(MouseEvent.CLICK, showExplosiveWeapons); image.equipBox.switchButton.removeEventListener(MouseEvent.CLICK, switchWeapon); } } }//package p_menuBar
Section 277
//WeaponShop (p_menuBar.WeaponShop) package p_menuBar { import flash.events.*; import p_weapon.*; import p_singleton.*; import flash.display.*; import p_char.p_playable.*; import p_char.p_nonplayable.*; import flash.media.*; import p_ammo.*; import p_util.*; public class WeaponShop { public var ammo357Price:int;// = 50 public var done:Boolean;// = false public var page:int; public var npcSelected:NPCFriend; public var ammoHEBought:int;// = 6 public var ammo12GaugePrice:int;// = 30 public var ammo556Price:int;// = 50 public var ammo762Price:int;// = 50 public var buySound:Sound; public var ammo50CalPrice:int;// = 200 public var numOfItemsInOnePage:int; public var ammo45Price:int;// = 35 public var ammoHEPrice:int;// = 200 public var MERC:String;// = "Merc" public var weaponSelected:Weapon; public var ammoBought:int;// = 50 public var image:MovieClip; public var sellSound:Sound; public var player:PlayableCharacter; public var itemType:String; public var ammo9mmPrice:int;// = 20 public function WeaponShop(){ MERC = "Merc"; ammo12GaugePrice = 30; ammo357Price = 50; ammo45Price = 35; ammo9mmPrice = 20; ammo762Price = 50; ammo556Price = 50; ammo50CalPrice = 200; ammoHEPrice = 200; ammoBought = 50; ammoHEBought = 6; done = false; super(); numOfItemsInOnePage = 10; this.player = PlayableCharacter(World.getSingleton().playedCharacter); image = new shopScreen(); World.getSingleton().menuRoot.addChild(image); itemType = WeaponType.RANGE; page = 0; initListener(); giveId(); image.explanationBox.ammoType.alpha = 0; image.mercExplanationBox.mercPic.visible = false; image.buyButton.visible = true; image.hireButton.visible = false; image.fireButton.visible = false; image.sellButton.visible = false; image.chooserBox.prevButton.addEventListener(MouseEvent.CLICK, prevPage); image.chooserBox.nextButton.addEventListener(MouseEvent.CLICK, nextPage); image.explanationBox.ownedLabel.visible = false; image.explanationBox.ownedText.visible = false; buySound = new BuySound(); sellSound = new SellSound(); } public function giveId():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = numOfItemsInOnePage; while (_local1 < _local2) { image.weaponOption[("holder" + _local1)].id = _local1; _local1++; }; } public function showFireArmWeapons(_arg1:MouseEvent):void{ itemType = WeaponType.RANGE; image.hireButton.visible = false; image.fireButton.visible = false; image.explanationBox.ownedLabel.visible = false; image.explanationBox.ownedText.visible = false; page = 0; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); } public function sellAmmo50Cal(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(6).amount > ammoBought){ World.getSingleton().money = (World.getSingleton().money + ammo50CalPrice); World.getSingleton().playedCharacter.ammoInventory.get(6).amount = (World.getSingleton().playedCharacter.ammoInventory.get(6).amount - ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function doneShop(_arg1:MouseEvent):void{ done = true; } public function showWeapons():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:MovieClip; _local1 = 0; if (itemType == WeaponType.RANGE){ _local2 = World.getSingleton().rangeWeaponInventory.size(); _local1 = (0 + (page * numOfItemsInOnePage)); _local3 = 0; if (_local1 < _local2){ while (_local1 < _local2) { if (_local3 < numOfItemsInOnePage){ image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_DOWN, mouseDown); image.weaponOption[("holder" + _local3)].addChild(DisplayObjectModifier.duplicateMovieClip(World.getSingleton().rangeWeaponInventory.get(_local1).logo)); if (World.getSingleton().rangeWeaponInventory.get(_local1).playerOwned){ MovieClip(image.weaponOption[("holder" + _local3)].getChildAt(0)).gotoAndStop(2); } else { MovieClip(image.weaponOption[("holder" + _local3)].getChildAt(0)).gotoAndStop(1); }; _local3++; }; _local1++; }; }; } else { if (itemType == WeaponType.MELEE){ _local2 = World.getSingleton().meleeWeaponInventory.size(); _local1 = (0 + (page * numOfItemsInOnePage)); _local3 = 0; if (_local1 < _local2){ while (_local1 < _local2) { if (_local3 < numOfItemsInOnePage){ image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_DOWN, mouseDown); image.weaponOption[("holder" + _local3)].addChild(DisplayObjectModifier.duplicateMovieClip(World.getSingleton().meleeWeaponInventory.get(_local1).logo)); if (World.getSingleton().meleeWeaponInventory.get(_local1).playerOwned){ MovieClip(image.weaponOption[("holder" + _local3)].getChildAt(0)).gotoAndStop(2); } else { MovieClip(image.weaponOption[("holder" + _local3)].getChildAt(0)).gotoAndStop(1); }; _local3++; }; _local1++; }; }; } else { if (itemType == WeaponType.EXPLOSIVE){ _local2 = World.getSingleton().explosiveWeaponInventory.size(); _local1 = (0 + (page * numOfItemsInOnePage)); _local3 = 0; if (_local1 < _local2){ while (_local1 < _local2) { if (_local3 < numOfItemsInOnePage){ image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_DOWN, mouseDown); image.weaponOption[("holder" + _local3)].addChild(DisplayObjectModifier.duplicateMovieClip(World.getSingleton().explosiveWeaponInventory.get(_local1).logo)); _local3++; }; _local1++; }; }; } else { if (itemType == MERC){ _local2 = World.getSingleton().mercInventory.size(); _local1 = (0 + (page * numOfItemsInOnePage)); _local3 = 0; if (_local1 < _local2){ while (_local1 < _local2) { if (_local3 < numOfItemsInOnePage){ image.weaponOption[("holder" + _local3)].addEventListener(MouseEvent.MOUSE_DOWN, mouseDown); _local4 = new mainHead(); new mainHead().scaleX = (_local4.scaleX * 0.5); _local4.scaleY = (_local4.scaleY * 0.5); _local4.gotoAndStop(World.getSingleton().mercInventory.get(_local1).Name); _local4.id = _local3; if (World.getSingleton().mercInventory.get(_local1).playerOwned){ _local4.hired.visible = true; } else { _local4.hired.visible = false; }; image.weaponOption[("holder" + _local3)].addChild(_local4); _local3++; }; _local1++; }; }; }; }; }; }; } public function nextPage(_arg1:MouseEvent):void{ if (page < 3){ page++; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); }; } public function refreshMoney():void{ image.money.text = World.getSingleton().money; } public function fireMerc(_arg1:MouseEvent):void{ if (itemType == MERC){ if (npcSelected){ if (World.getSingleton().npcs.contains(npcSelected)){ World.getSingleton().npcs.remove(npcSelected); npcSelected.health = npcSelected.maxHealth; if (npcSelected.body){ World.getSingleton().physicWorld.DestroyBody(npcSelected.body); }; npcSelected.playerOwned = false; npcSelected.salaryPaid = true; image.fireButton.visible = false; image.hireButton.visible = true; refresh(); if (!World.getSingleton().muted){ sellSound.play(); }; }; }; }; } public function sellAmmo12Gauge(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(0).amount > ammoBought){ World.getSingleton().money = (World.getSingleton().money + ammo12GaugePrice); World.getSingleton().playedCharacter.ammoInventory.get(0).amount = (World.getSingleton().playedCharacter.ammoInventory.get(0).amount - ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function buyAmmo357(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammo357Price){ World.getSingleton().money = (World.getSingleton().money - ammo357Price); World.getSingleton().playedCharacter.ammoInventory.get(1).amount = (World.getSingleton().playedCharacter.ammoInventory.get(1).amount + ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function clearWeaponImages():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; _local1 = 0; _local2 = numOfItemsInOnePage; while (_local1 < _local2) { if (image.weaponOption[("holder" + _local1)].numChildren > 0){ _local3 = 0; _local4 = image.weaponOption[("holder" + _local1)].numChildren; _local3 = (_local4 - 1); while (_local3 >= 0) { image.weaponOption[("holder" + _local1)].removeChildAt(_local3); _local3--; }; }; _local1++; }; } public function buyAmmo556(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammo556Price){ World.getSingleton().money = (World.getSingleton().money - ammo556Price); World.getSingleton().playedCharacter.ammoInventory.get(3).amount = (World.getSingleton().playedCharacter.ammoInventory.get(3).amount + ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function buyAmmo9mm(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammo9mmPrice){ World.getSingleton().money = (World.getSingleton().money - ammo9mmPrice); World.getSingleton().playedCharacter.ammoInventory.get(5).amount = (World.getSingleton().playedCharacter.ammoInventory.get(5).amount + ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function sellAmmoHE(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(7).amount > ammoHEBought){ World.getSingleton().money = (World.getSingleton().money + ammoHEPrice); World.getSingleton().playedCharacter.ammoInventory.get(7).amount = (World.getSingleton().playedCharacter.ammoInventory.get(7).amount - ammoHEBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function buyAmmo762(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammo762Price){ World.getSingleton().money = (World.getSingleton().money - ammo762Price); World.getSingleton().playedCharacter.ammoInventory.get(4).amount = (World.getSingleton().playedCharacter.ammoInventory.get(4).amount + ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function buyAmmo50Cal(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammo50CalPrice){ World.getSingleton().money = (World.getSingleton().money - ammo50CalPrice); World.getSingleton().playedCharacter.ammoInventory.get(6).amount = (World.getSingleton().playedCharacter.ammoInventory.get(6).amount + ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function refreshExpBox():void{ image.explanationBox.visible = false; image.mercExplanationBox.visible = false; if (itemType == MERC){ image.mercExplanationBox.visible = true; } else { image.explanationBox.visible = true; }; } public function showMercs(_arg1:MouseEvent):void{ itemType = MERC; image.buyButton.visible = false; image.explanationBox.ownedLabel.visible = false; image.explanationBox.ownedText.visible = false; page = 0; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); } public function sellAmmo45(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(2).amount > ammoBought){ World.getSingleton().money = (World.getSingleton().money + ammo45Price); World.getSingleton().playedCharacter.ammoInventory.get(2).amount = (World.getSingleton().playedCharacter.ammoInventory.get(2).amount - ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function sellAmmo357(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(1).amount > ammoBought){ World.getSingleton().money = (World.getSingleton().money + ammo357Price); World.getSingleton().playedCharacter.ammoInventory.get(1).amount = (World.getSingleton().playedCharacter.ammoInventory.get(1).amount - ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function sellAmmo556(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(3).amount > ammoBought){ World.getSingleton().money = (World.getSingleton().money + ammo556Price); World.getSingleton().playedCharacter.ammoInventory.get(3).amount = (World.getSingleton().playedCharacter.ammoInventory.get(3).amount - ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function removeListener():void{ var _local1:int; var _local2:int; _local1 = 0; _local2 = numOfItemsInOnePage; while (_local1 < _local2) { if (image.weaponOption[("holder" + _local1)].hasEventListener(MouseEvent.MOUSE_DOWN)){ image.weaponOption[("holder" + _local1)].removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown); }; _local1++; }; } public function showExplanation(_arg1:MouseEvent):void{ var _local2:int; var _local3:RangeWeapon; var _local4:Number; var _local5:Number; var _local6:MeleeWeapon; var _local7:ExplosiveWeapon; var _local8:NPCFriend; _local2 = MovieClip(_arg1.target.parent).id; if (itemType == WeaponType.RANGE){ _local3 = World.getSingleton().rangeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); if (image.explanationBox.weaponPic.numChildren > 0){ image.explanationBox.weaponPic.removeChildAt(0); }; image.explanationBox.weaponPic.addChild(DisplayObjectModifier.duplicateMovieClip(_local3.logo)); changeAmmoImage(_local3); _local4 = (Math.floor(((1000 / _local3.delay) * 100)) / 100); image.explanationBox.rpsText.text = ("" + _local4); image.explanationBox.weaponName.text = ("" + _local3.id); image.explanationBox.damageText.text = ("" + _local3.damage); image.explanationBox.priceText.text = ("$" + _local3.price); image.explanationBox.accLabel.visible = true; image.explanationBox.reloadLabel.visible = true; image.explanationBox.clipLabel.visible = true; image.explanationBox.accText.text = ("" + _local3.accuracy); image.explanationBox.clipText.text = ("" + _local3.maxAmmo); _local5 = (Math.floor(((_local3.reloadTime / 1000) * 100)) / 100); image.explanationBox.reloadText.text = (("" + _local5) + " s"); weaponSelected = _local3; if (weaponSelected.playerOwned){ image.buyButton.visible = false; } else { image.buyButton.visible = true; }; } else { if (itemType == WeaponType.MELEE){ _local6 = World.getSingleton().meleeWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); if (image.explanationBox.weaponPic.numChildren > 0){ image.explanationBox.weaponPic.removeChildAt(0); }; image.explanationBox.weaponPic.addChild(DisplayObjectModifier.duplicateMovieClip(_local6.logo)); image.explanationBox.ammoType.alpha = 0; _local4 = (Math.floor(((1000 / _local6.delay) * 100)) / 100); image.explanationBox.rpsText.text = ("" + _local4); image.explanationBox.weaponName.text = ("" + _local6.id); image.explanationBox.damageText.text = ("" + _local6.damage); image.explanationBox.priceText.text = ("$" + _local6.price); image.explanationBox.accLabel.visible = false; image.explanationBox.reloadLabel.visible = false; image.explanationBox.clipLabel.visible = false; image.explanationBox.accText.text = ""; image.explanationBox.clipText.text = ""; image.explanationBox.reloadText.text = ""; weaponSelected = _local6; if (weaponSelected.playerOwned){ image.buyButton.visible = false; } else { image.buyButton.visible = true; }; } else { if (itemType == WeaponType.EXPLOSIVE){ _local7 = World.getSingleton().explosiveWeaponInventory.get((_local2 + (page * numOfItemsInOnePage))); if (image.explanationBox.weaponPic.numChildren > 0){ image.explanationBox.weaponPic.removeChildAt(0); }; image.explanationBox.weaponPic.addChild(DisplayObjectModifier.duplicateMovieClip(_local7.logo)); image.explanationBox.ammoType.alpha = 0; _local4 = (Math.floor(((1000 / _local7.delay) * 100)) / 100); image.explanationBox.rpsText.text = ("" + _local4); image.explanationBox.weaponName.text = ("" + _local7.id); image.explanationBox.damageText.text = ("" + _local7.damage); image.explanationBox.priceText.text = ("$" + _local7.price); image.explanationBox.accLabel.visible = false; image.explanationBox.reloadLabel.visible = false; image.explanationBox.clipLabel.visible = false; image.explanationBox.accText.text = ""; image.explanationBox.clipText.text = ""; image.explanationBox.reloadText.text = ""; weaponSelected = _local7; image.buyButton.visible = true; image.explanationBox.ownedText.text = ("" + (_local7.reloadAmmo + _local7.ammo)); } else { if (itemType == MERC){ _local8 = World.getSingleton().mercInventory.get((_local2 + (page * numOfItemsInOnePage))); image.mercExplanationBox.weaponPic.gotoAndStop(_local8.currentWeapon.id); image.mercExplanationBox.mercPic.alpha = 1; image.mercExplanationBox.mercPic.gotoAndStop(_local8.Name); image.mercExplanationBox.mercName.text = ("" + _local8.Name); image.mercExplanationBox.priceText.text = ("$" + _local8.price); image.mercExplanationBox.healthText.text = _local8.maxHealth; image.mercExplanationBox.accText.text = _local8.accuracy; image.mercExplanationBox.speedText.text = _local8.speed; image.mercExplanationBox.salaryText.text = (("$" + _local8.salary) + "/day"); image.mercExplanationBox.mercPic.visible = true; npcSelected = _local8; if (npcSelected.playerOwned){ image.fireButton.visible = true; image.hireButton.visible = false; } else { image.fireButton.visible = false; image.hireButton.visible = true; }; }; }; }; }; } public function showExplosiveWeapons(_arg1:MouseEvent):void{ itemType = WeaponType.EXPLOSIVE; image.hireButton.visible = false; image.fireButton.visible = false; image.explanationBox.ownedLabel.visible = true; image.explanationBox.ownedText.visible = true; page = 0; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); } public function sellAmmo9mm(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(5).amount > ammoBought){ World.getSingleton().money = (World.getSingleton().money + ammo9mmPrice); World.getSingleton().playedCharacter.ammoInventory.get(5).amount = (World.getSingleton().playedCharacter.ammoInventory.get(5).amount - ammoBought); refresh(); buySound.play(); }; } public function prevPage(_arg1:MouseEvent):void{ if (page > 0){ page--; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); }; } public function initListener():void{ MovieClip(image.fireArm).addEventListener(MouseEvent.CLICK, showFireArmWeapons); MovieClip(image.melee).addEventListener(MouseEvent.CLICK, showMeleeWeapons); MovieClip(image.explosive).addEventListener(MouseEvent.CLICK, showExplosiveWeapons); MovieClip(image.merc).addEventListener(MouseEvent.CLICK, showMercs); image.doneButton.addEventListener(MouseEvent.CLICK, doneShop); image.buyButton.addEventListener(MouseEvent.CLICK, buyWeapon); image.hireButton.addEventListener(MouseEvent.CLICK, hireMerc); image.fireButton.addEventListener(MouseEvent.CLICK, fireMerc); image.ammo12gaugeBuyButton.addEventListener(MouseEvent.CLICK, buyAmmo12Gauge); image.ammo12gaugeSellButton.addEventListener(MouseEvent.CLICK, sellAmmo12Gauge); image.ammo357BuyButton.addEventListener(MouseEvent.CLICK, buyAmmo357); image.ammo357SellButton.addEventListener(MouseEvent.CLICK, sellAmmo357); image.ammo45BuyButton.addEventListener(MouseEvent.CLICK, buyAmmo45); image.ammo45SellButton.addEventListener(MouseEvent.CLICK, sellAmmo45); image.ammo9mmBuyButton.addEventListener(MouseEvent.CLICK, buyAmmo9mm); image.ammo9mmSellButton.addEventListener(MouseEvent.CLICK, sellAmmo9mm); image.ammo762BuyButton.addEventListener(MouseEvent.CLICK, buyAmmo762); image.ammo762SellButton.addEventListener(MouseEvent.CLICK, sellAmmo762); image.ammo556BuyButton.addEventListener(MouseEvent.CLICK, buyAmmo556); image.ammo556SellButton.addEventListener(MouseEvent.CLICK, sellAmmo556); image.ammo50calBuyButton.addEventListener(MouseEvent.CLICK, buyAmmo50Cal); image.ammo50calSellButton.addEventListener(MouseEvent.CLICK, sellAmmo50Cal); image.ammoHEBuyButton.addEventListener(MouseEvent.CLICK, buyAmmoHE); image.ammoHESellButton.addEventListener(MouseEvent.CLICK, sellAmmoHE); image.warningClip.closeButton.addEventListener(MouseEvent.CLICK, closeWarningClip); } public function showMeleeWeapons(_arg1:MouseEvent):void{ itemType = WeaponType.MELEE; image.hireButton.visible = false; image.fireButton.visible = false; image.explanationBox.ownedLabel.visible = false; image.explanationBox.ownedText.visible = false; page = 0; image.chooserBox.pageNumber.text = ("" + (page + 1)); refresh(); } public function refresh():void{ refreshExpBox(); image.ammo12gaugeText.text = ("x " + player.ammoInventory.get(0).amount); image.ammo357Text.text = ("x " + player.ammoInventory.get(1).amount); image.ammo45Text.text = ("x " + player.ammoInventory.get(2).amount); image.ammo556Text.text = ("x " + player.ammoInventory.get(3).amount); image.ammo762Text.text = ("x " + player.ammoInventory.get(4).amount); image.ammo9mmText.text = ("x " + player.ammoInventory.get(5).amount); image.ammo50calText.text = ("x " + player.ammoInventory.get(6).amount); image.ammoHEText.text = ("x " + player.ammoInventory.get(7).amount); removeListener(); clearWeaponImages(); showWeapons(); refreshMoney(); } public function buyAmmo12Gauge(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammo12GaugePrice){ World.getSingleton().money = (World.getSingleton().money - ammo12GaugePrice); World.getSingleton().playedCharacter.ammoInventory.get(0).amount = (World.getSingleton().playedCharacter.ammoInventory.get(0).amount + ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function hireMerc(_arg1:MouseEvent):void{ if (itemType == MERC){ if (npcSelected){ if (World.getSingleton().npcs.size() < World.getSingleton().maxNPC){ if (World.getSingleton().money >= npcSelected.price){ World.getSingleton().money = (World.getSingleton().money - npcSelected.price); World.getSingleton().npcs.add(npcSelected); npcSelected.playerOwned = true; npcSelected.salaryPaid = true; image.fireButton.visible = true; image.hireButton.visible = false; refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } else { image.warningClip.visible = true; image.warningClip.message.text = (("You can only hire " + World.getSingleton().maxNPC) + " mercs max"); }; }; }; } public function mouseDown(_arg1:MouseEvent):void{ showExplanation(_arg1); } public function buyWeapon(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Boolean; var _local5:int; if (itemType != MERC){ if (weaponSelected){ if (World.getSingleton().money >= weaponSelected.price){ World.getSingleton().money = (World.getSingleton().money - weaponSelected.price); if (!World.getSingleton().muted){ buySound.play(); }; if (weaponSelected.weaponType == WeaponType.RANGE){ World.getSingleton().playedCharacter.rangeWeaponInventory.add(weaponSelected); weaponSelected.playerOwned = true; weaponSelected = null; image.buyButton.visible = false; } else { if (weaponSelected.weaponType == WeaponType.MELEE){ World.getSingleton().playedCharacter.meleeWeaponInventory.add(weaponSelected); weaponSelected.playerOwned = true; weaponSelected = null; image.buyButton.visible = false; } else { if (weaponSelected.weaponType == WeaponType.EXPLOSIVE){ _local2 = 0; _local3 = World.getSingleton().playedCharacter.explosiveWeaponInventory.size(); _local4 = false; while (_local2 < _local3) { if (World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local2).id == weaponSelected.id){ _local4 = true; _local5 = _local2; }; _local2++; }; if (!_local4){ World.getSingleton().playedCharacter.explosiveWeaponInventory.add(weaponSelected); _local5 = (World.getSingleton().playedCharacter.explosiveWeaponInventory.size() - 1); }; World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local5).playerOwned = true; World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local5).reloadAmmo = (World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local5).reloadAmmo + 1); World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local5).checkWhichIdle(); World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local5).reload(); image.explanationBox.ownedText.text = ("" + (World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local5).reloadAmmo + World.getSingleton().playedCharacter.explosiveWeaponInventory.get(_local5).ammo)); }; }; }; refresh(); }; }; }; } public function updateUpKeep():void{ var _local1:int; var _local2:int; var _local3:NPCFriend; _local1 = World.getSingleton().npcs.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { _local3 = World.getSingleton().npcs.get(_local2); if (!_local3.salaryPaid){ if (World.getSingleton().money < _local3.salary){ World.getSingleton().npcs.remove(_local3); _local3.health = _local3.maxHealth; if (_local3.body){ World.getSingleton().physicWorld.DestroyBody(_local3.body); }; _local3.playerOwned = false; _local3.salaryPaid = true; image.warningClip.visible = true; image.warningClip.message.text = (("You don't have enough money\n" + _local3.Name) + " has left you"); break; } else { World.getSingleton().money = (World.getSingleton().money - _local3.salary); _local3.salaryPaid = true; }; }; _local2--; }; refresh(); } public function buyAmmoHE(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammoHEPrice){ World.getSingleton().money = (World.getSingleton().money - ammoHEPrice); World.getSingleton().playedCharacter.ammoInventory.get(7).amount = (World.getSingleton().playedCharacter.ammoInventory.get(7).amount + ammoHEBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function sellAmmo762(_arg1:MouseEvent):void{ if (World.getSingleton().playedCharacter.ammoInventory.get(4).amount > ammoBought){ World.getSingleton().money = (World.getSingleton().money + ammo762Price); World.getSingleton().playedCharacter.ammoInventory.get(4).amount = (World.getSingleton().playedCharacter.ammoInventory.get(4).amount - ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function buyAmmo45(_arg1:MouseEvent):void{ if (World.getSingleton().money >= ammo45Price){ World.getSingleton().money = (World.getSingleton().money - ammo45Price); World.getSingleton().playedCharacter.ammoInventory.get(2).amount = (World.getSingleton().playedCharacter.ammoInventory.get(2).amount + ammoBought); refresh(); if (!World.getSingleton().muted){ buySound.play(); }; }; } public function destroy():void{ image.chooserBox.prevButton.removeEventListener(MouseEvent.CLICK, prevPage); image.chooserBox.nextButton.removeEventListener(MouseEvent.CLICK, nextPage); removeListener(); clearWeaponImages(); if (image.parent){ image.parent.removeChild(image); }; MovieClip(image.fireArm).removeEventListener(MouseEvent.CLICK, showFireArmWeapons); MovieClip(image.melee).removeEventListener(MouseEvent.CLICK, showMeleeWeapons); MovieClip(image.explosive).removeEventListener(MouseEvent.CLICK, showExplosiveWeapons); MovieClip(image.merc).removeEventListener(MouseEvent.CLICK, showMercs); image.warningClip.closeButton.removeEventListener(MouseEvent.CLICK, closeWarningClip); image.doneButton.removeEventListener(MouseEvent.CLICK, doneShop); image.buyButton.removeEventListener(MouseEvent.CLICK, buyWeapon); image.hireButton.removeEventListener(MouseEvent.CLICK, hireMerc); image.fireButton.removeEventListener(MouseEvent.CLICK, fireMerc); image.ammo12gaugeBuyButton.removeEventListener(MouseEvent.CLICK, buyAmmo12Gauge); image.ammo12gaugeSellButton.removeEventListener(MouseEvent.CLICK, sellAmmo12Gauge); image.ammo357BuyButton.removeEventListener(MouseEvent.CLICK, buyAmmo357); image.ammo357SellButton.removeEventListener(MouseEvent.CLICK, sellAmmo357); image.ammo45BuyButton.removeEventListener(MouseEvent.CLICK, buyAmmo45); image.ammo45SellButton.removeEventListener(MouseEvent.CLICK, sellAmmo45); image.ammo9mmBuyButton.removeEventListener(MouseEvent.CLICK, buyAmmo9mm); image.ammo9mmSellButton.removeEventListener(MouseEvent.CLICK, sellAmmo9mm); image.ammo762BuyButton.removeEventListener(MouseEvent.CLICK, buyAmmo762); image.ammo762SellButton.removeEventListener(MouseEvent.CLICK, sellAmmo762); image.ammo556BuyButton.removeEventListener(MouseEvent.CLICK, buyAmmo556); image.ammo556SellButton.removeEventListener(MouseEvent.CLICK, sellAmmo556); image.ammo50calBuyButton.removeEventListener(MouseEvent.CLICK, buyAmmo50Cal); image.ammo50calSellButton.removeEventListener(MouseEvent.CLICK, sellAmmo50Cal); image.ammoHEBuyButton.removeEventListener(MouseEvent.CLICK, buyAmmoHE); image.ammoHESellButton.removeEventListener(MouseEvent.CLICK, sellAmmoHE); image = null; } public function closeWarningClip(_arg1:MouseEvent):void{ image.warningClip.visible = false; updateUpKeep(); } public function changeAmmoImage(_arg1:RangeWeapon):void{ if (itemType == WeaponType.RANGE){ image.explanationBox.ammoType.alpha = 1; if (_arg1.ammoType.id == AmmoType.AMMO_12_GAUGE){ image.explanationBox.ammoType.gotoAndStop("ammo12gauge"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_357){ image.explanationBox.ammoType.gotoAndStop("ammo357"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_45){ image.explanationBox.ammoType.gotoAndStop("ammo45"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_556){ image.explanationBox.ammoType.gotoAndStop("ammo556"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_762){ image.explanationBox.ammoType.gotoAndStop("ammo762"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_9MM){ image.explanationBox.ammoType.gotoAndStop("ammo9mm"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_50CAL){ image.explanationBox.ammoType.gotoAndStop("ammo50cal"); } else { if (_arg1.ammoType.id == AmmoType.AMMO_HE){ image.explanationBox.ammoType.gotoAndStop("ammoHE"); }; }; }; }; }; }; }; }; }; } } }//package p_menuBar
Section 278
//BloodParticle (p_particle.BloodParticle) package p_particle { public class BloodParticle extends Particle { public function BloodParticle(){ lifeTime = 25; initialLifeTime = lifeTime; speed = 5; gravity = 5; maxWidth = 6; maxHeight = 6; image = new blood_clip(); isWidthEqualHeight = true; init(); } } }//package p_particle
Section 279
//ExplosionParticle (p_particle.ExplosionParticle) package p_particle { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.utils.*; public class ExplosionParticle extends Particle { public function ExplosionParticle(){ lifeTime = 100; initialLifeTime = lifeTime; speed = 40; gravity = 2; maxWidth = 5; maxHeight = 5; image = new Star2(); isWidthEqualHeight = true; init(); } override public function init():void{ World.getSingleton().sceneRoot.addChild(image); timer = new Timer(25); timer.addEventListener(TimerEvent.TIMER, playParticle); image.width = (((Math.floor((Math.random() * 10)) + 1) % maxWidth) + 1); if (isWidthEqualHeight){ image.height = image.width; } else { image.height = (((Math.floor((Math.random() * 10)) + 1) % maxHeight) + 1); }; direction = new b2Vec2(0, 0); direction.x = (Math.random() - Math.random()); direction.y = (Math.random() - Math.random()); if (direction.y > 0){ direction.y = (direction.y * -1); }; timer.start(); } } }//package p_particle
Section 280
//Particle (p_particle.Particle) package p_particle { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.utils.*; import p_entity.*; public class Particle extends Entity { public var maxWidth:Number; public var timer:Timer; public var initialLifeTime:int; public var speed:Number; public var gravity:Number; public var isWidthEqualHeight:Boolean; public var maxHeight:Number; public var lifeTime:int; public function init():void{ World.getSingleton().sceneRoot.addChild(image); timer = new Timer(25); timer.addEventListener(TimerEvent.TIMER, playParticle); image.width = (((Math.floor((Math.random() * 10)) + 1) % maxWidth) + 1); if (isWidthEqualHeight){ image.height = image.width; } else { image.height = (((Math.floor((Math.random() * 10)) + 1) % maxHeight) + 1); }; direction = new b2Vec2(0, 0); direction.x = (Math.random() - Math.random()); direction.y = (Math.random() - Math.random()); timer.start(); } public function playParticle(_arg1:TimerEvent):void{ if (image){ lifeTime--; image.alpha = (lifeTime / initialLifeTime); position.x = (position.x + (direction.x * speed)); position.y = (position.y + (direction.y * speed)); position.y = (position.y + gravity); super.update(); if (image.alpha <= 0){ if (World.getSingleton().sceneRoot.contains(image)){ World.getSingleton().sceneRoot.removeChild(image); timer.stop(); World.getSingleton().setFocusToStage(); timer.removeEventListener(TimerEvent.TIMER, playParticle); }; }; }; } } }//package p_particle
Section 281
//SmokeParticle (p_particle.SmokeParticle) package p_particle { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.utils.*; public class SmokeParticle extends Particle { public function SmokeParticle(){ lifeTime = 25; initialLifeTime = lifeTime; speed = 5; gravity = 0; maxWidth = 1000; maxHeight = 1000; image = new smokeAnimate(); isWidthEqualHeight = true; init(); } override public function init():void{ if (World.getSingleton().level){ World.getSingleton().level.playerGround.addChild(image); timer = new Timer(25); timer.addEventListener(TimerEvent.TIMER, playParticle); image.width = (((Math.floor((Math.random() * 10)) + 1) % maxWidth) + 1); if (isWidthEqualHeight){ image.height = image.width; } else { image.height = (((Math.floor((Math.random() * 10)) + 1) % maxHeight) + 1); }; direction = new b2Vec2(0, 0); direction.x = (Math.random() - Math.random()); direction.y = (Math.random() - Math.random()); timer.start(); }; } override public function playParticle(_arg1:TimerEvent):void{ if (image){ lifeTime--; image.alpha = (lifeTime / initialLifeTime); position.x = (position.x + (direction.x * speed)); position.y = (position.y + (direction.y * speed)); position.y = (position.y + gravity); super.update(); if (image.alpha <= 0){ if (World.getSingleton().level){ if (World.getSingleton().level.playerGround.contains(image)){ World.getSingleton().level.playerGround.removeChild(image); timer.stop(); World.getSingleton().setFocusToStage(); timer.removeEventListener(TimerEvent.TIMER, playParticle); }; }; }; }; } } }//package p_particle
Section 282
//StarParticle (p_particle.StarParticle) package p_particle { public class StarParticle extends Particle { public function StarParticle(){ lifeTime = 20; initialLifeTime = lifeTime; speed = 5; gravity = 2; maxWidth = 5; maxHeight = 5; image = new Star(); isWidthEqualHeight = true; init(); } } }//package p_particle
Section 283
//CollisionDetector (p_singleton.CollisionDetector) package p_singleton { import p_char.*; import flash.display.*; import p_char.p_playable.*; import p_char.p_nonplayable.*; import org.idmedia.as3commons.util.*; import p_gamelevel.*; import p_util.*; public class CollisionDetector { public var itemPickUps:ArrayList; public var enemyBullets:ArrayList; public var level:GameLevel; public var playerBullets:ArrayList; public var signBaloonVisible:Boolean;// = false public var enemies:ArrayList; public var barricades:ArrayList; public var players:ArrayList; public var npcs:ArrayList; private static var INSTANCE:CollisionDetector; public function CollisionDetector(){ signBaloonVisible = false; super(); players = World.getSingleton().players; enemies = World.getSingleton().enemies; npcs = World.getSingleton().npcs; itemPickUps = World.getSingleton().itemPickUps; barricades = World.getSingleton().barricades; playerBullets = World.getSingleton().playerBullets; enemyBullets = World.getSingleton().enemyBullets; level = World.getSingleton().level; } public function playerItemPickUpCollision(_arg1:PlayableCharacter):void{ var _local2:int; _local2 = (itemPickUps.size() - 1); while (_local2 >= 0) { if (PixelCollision.isColliding(_arg1.image, itemPickUps.get(_local2).image, World.getSingleton().sceneRoot)){ itemPickUps.get(_local2).destroy(); }; _local2--; }; } public function enemyCollision():void{ var _local1:int; var _local2:int; var _local3:int; _local1 = enemies.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { mousePointerEnemyCollision(enemies.get(_local2)); enemyLevelCollision(enemies.get(_local2)); _local2--; }; } public function playerCollision():void{ var _local1:int; var _local2:int; var _local3:int; _local1 = players.size(); _local2 = (_local1 - 1); signBaloonVisible = false; while (_local2 >= 0) { players.get(_local2).image.xcross.visible = false; playerLevelCollision(players.get(_local2)); _local2--; }; } public function playerLevelCollision(_arg1:PlayableCharacter):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:NumOfSign; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; if (((level) && ((players.size() > 0)))){ _local2 = players.size(); _local3 = (_local2 - 1); _local5 = level.numOfDoor; _local6 = level.numOfStage; _local7 = level.numOfTutorial; _local4 = (_local6 - 1); while (_local4 >= 0) { if (PixelCollision.isColliding(_arg1.image, MovieClip(level.middleGround)[("stageSign" + _local4)], World.getSingleton().sceneRoot)){ _arg1.stageNumber = _local4; MovieClip(level.foreGround)[("stageSign" + _local4)].alpha = 0; } else { MovieClip(level.foreGround)[("stageSign" + _local4)].alpha = 1; }; _local4--; }; _local4 = (_local7 - 1); while (_local4 >= 0) { if (PixelCollision.isColliding(_arg1.image, MovieClip(level.backGround)[("tutor" + _local4)], World.getSingleton().sceneRoot)){ signBaloonVisible = true; if (World.getSingleton().menuBar){ if (((!(World.getSingleton().menuBar.image.animationPlaying)) && (World.getSingleton().menuBar.image.ended))){ World.getSingleton().menuBar.image.gotoAndPlay("enter"); }; World.getSingleton().menuBar.image.infoBox.infoBox.text = ("" + level.getTutorialContent(_local4)); }; if (_arg1.image.signBaloon){ _arg1.image.signBaloon.alpha = 1; if (_arg1.faceState == FaceState.FACE_LEFT){ _arg1.image.signBaloon.gotoAndStop("question2"); } else { _arg1.image.signBaloon.gotoAndStop("question"); }; }; }; _local4--; }; if (!signBaloonVisible){ _arg1.image.signBaloon.alpha = 0; if (World.getSingleton().menuBar){ if (((World.getSingleton().menuBar.image.animationPlaying) && (World.getSingleton().menuBar.image.ended))){ World.getSingleton().menuBar.image.gotoAndPlay("out"); }; }; }; World.getSingleton().currentStage = World.getSingleton().playedCharacter.stageNumber; _local8 = World.getSingleton().currentStage; _local9 = level.arrayOfStage.get(_local8); _local10 = _local9.numOfWall; _local11 = _local9.numOfFloor; _local12 = _local9.numOfLadder; _local13 = _local9.numOfLantaiSign; _local4 = ((_local12 + _local9.initialLadder) - 1); while (_local4 >= _local9.initialLadder) { if (PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _local4)], World.getSingleton().sceneRoot)){ _arg1.ableToMoveUp = true; _arg1.onTheLadderUp = _local4; _arg1.onTheLadderDown = _local4; _arg1.body.m_linearDamping = 10000; }; if (PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _local4)], World.getSingleton().sceneRoot)){ _arg1.ableToMoveDown = true; _arg1.ableToMoveUp = true; _arg1.onTheLadderUp = _local4; _arg1.onTheLadderDown = _local4; _arg1.body.m_linearDamping = 10000; }; _local4--; }; if (_arg1.onTheLadderUp != -1){ if (!PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderUp)], World.getSingleton().sceneRoot)){ if (!PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderUp)], World.getSingleton().sceneRoot)){ _arg1.onTheLadderUp = -1; }; }; }; if (_arg1.onTheLadderDown != -1){ if (!PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderDown)], World.getSingleton().sceneRoot)){ _arg1.onTheLadderDown = -1; }; }; _local4 = ((_local13 + _local9.initialLantaiSign) - 1); while (_local4 >= 0) { if (PixelCollision.isColliding(_arg1.image, MovieClip(level.middleGround)[("lantaiSign" + _local4)], World.getSingleton().sceneRoot)){ _arg1.lantai = _local4; }; _local4--; }; }; if (!World.getSingleton().gameStarted){ _local14 = World.getSingleton().barricades.size(); _local3 = 0; while (_local3 < _local14) { if (PixelCollision.isColliding(_arg1.image, World.getSingleton().barricades.get(_local3), World.getSingleton().sceneRoot)){ _arg1.image.xcross.visible = true; World.getSingleton().playerInsideBarricade = true; }; _local3++; }; }; } public function update():void{ World.getSingleton().playerInsideBarricade = false; playerCollision(); enemyCollision(); npcCollision(); } public function mousePointerEnemyCollision(_arg1:NonPlayableCharacter):void{ if (World.getSingleton().mousePointer){ if (PixelCollision.isColliding(_arg1.image, World.getSingleton().mousePointer.image, World.getSingleton().sceneRoot.stage)){ _arg1.image.bloodSign.alpha = 1; } else { _arg1.image.bloodSign.alpha = 0; }; }; } public function npcLevelCollision(_arg1:NPCFriend):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:NumOfSign; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; if (((level) && ((npcs.size() > 0)))){ _local3 = level.numOfDoor; _local4 = level.numOfStage; _local2 = (_local4 - 1); while (_local2 >= 0) { if (PixelCollision.isColliding(_arg1.image, MovieClip(level.middleGround)[("stageSign" + _local2)], World.getSingleton().sceneRoot)){ _arg1.stageNumber = _local2; }; _local2--; }; _local5 = World.getSingleton().currentStage; _local6 = level.arrayOfStage.get(_local5); _local7 = _local6.numOfWall; _local8 = _local6.numOfFloor; _local9 = _local6.numOfLadder; _local10 = _local6.numOfLantaiSign; _local2 = ((_local9 + _local6.initialLadder) - 1); while (_local2 >= _local6.initialLadder) { if (PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _local2)], World.getSingleton().sceneRoot)){ _arg1.body.m_linearDamping = 10000; if (PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _local2)].center, World.getSingleton().sceneRoot)){ _arg1.ableToMoveUp = true; _arg1.onTheLadderUp = _local2; _arg1.onTheLadderDown = _local2; }; }; if (PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _local2)], World.getSingleton().sceneRoot)){ _arg1.body.m_linearDamping = 10000; if (PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _local2)].center, World.getSingleton().sceneRoot)){ _arg1.ableToMoveDown = true; _arg1.ableToMoveUp = true; _arg1.onTheLadderUp = _local2; _arg1.onTheLadderDown = _local2; }; }; _local2--; }; if (_arg1.onTheLadderUp != -1){ if (!PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderUp)].center, World.getSingleton().sceneRoot)){ if (!PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderUp)].center, World.getSingleton().sceneRoot)){ _arg1.onTheLadderUp = -1; }; }; }; if (_arg1.onTheLadderDown != -1){ if (!PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderDown)].center, World.getSingleton().sceneRoot)){ _arg1.onTheLadderDown = -1; }; }; _local2 = ((_local10 + _local6.initialLantaiSign) - 1); while (_local2 >= 0) { if (PixelCollision.isColliding(_arg1.image, MovieClip(level.middleGround)[("lantaiSign" + _local2)], World.getSingleton().sceneRoot)){ _arg1.lantai = _local2; }; _local2--; }; }; if (!World.getSingleton().gameStarted){ _local11 = World.getSingleton().barricades.size(); _local12 = 0; while (_local12 < _local11) { if (PixelCollision.isColliding(_arg1.image, World.getSingleton().barricades.get(_local12), World.getSingleton().sceneRoot)){ _arg1.image.xcross.visible = true; World.getSingleton().playerInsideBarricade = true; }; _local12++; }; }; } public function mousePointerNpcCollision(_arg1:NPCFriend):void{ if (World.getSingleton().mousePointer){ if (PixelCollision.isColliding(_arg1.image, World.getSingleton().mousePointer.image, World.getSingleton().sceneRoot.stage)){ _arg1.image.bloodSign.alpha = 1; } else { _arg1.image.bloodSign.alpha = 0; }; }; } public function npcCollision():void{ var _local1:int; var _local2:int; var _local3:int; _local1 = npcs.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { npcs.get(_local2).image.xcross.visible = false; mousePointerNpcCollision(npcs.get(_local2)); npcLevelCollision(npcs.get(_local2)); _local2--; }; } public function enemyLevelCollision(_arg1:NonPlayableCharacter):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:NumOfSign; var _local7:int; var _local8:int; var _local9:int; var _local10:int; if (level){ _local3 = level.numOfDoor; _local4 = level.numOfStage; _local2 = (_local4 - 1); while (_local2 >= 0) { if (PixelCollision.isColliding(_arg1.image, MovieClip(level.middleGround)[("stageSign" + _local2)], World.getSingleton().sceneRoot)){ _arg1.stageNumber = _local2; if (players.size() > 0){ if (_arg1.stageNumber != players.get(0).stageNumber){ _arg1.deactivate(); } else { _arg1.activate(); }; }; }; _local2--; }; _local5 = World.getSingleton().currentStage; _local6 = level.arrayOfStage.get(_local5); _local7 = _local6.numOfWall; _local8 = _local6.numOfFloor; _local9 = _local6.numOfLadder; _local10 = _local6.numOfLantaiSign; _local2 = ((_local9 + _local6.initialLadder) - 1); while (_local2 >= _local6.initialLadder) { if (PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _local2)], World.getSingleton().sceneRoot)){ if (PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _local2)].center, World.getSingleton().sceneRoot)){ _arg1.ableToMoveUp = true; _arg1.onTheLadderUp = _local2; }; if (!_arg1.body.gotShot){ _arg1.body.m_linearDamping = 10000; }; }; if (PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _local2)], World.getSingleton().sceneRoot)){ if (PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _local2)].center, World.getSingleton().sceneRoot)){ _arg1.ableToMoveDown = true; _arg1.ableToMoveUp = true; _arg1.onTheLadderDown = _local2; }; if (!_arg1.body.gotShot){ _arg1.body.m_linearDamping = 10000; }; }; _local2--; }; if (_arg1.onTheLadderUp != -1){ if (!PixelCollision.isColliding(_arg1.image.clipTop, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderUp)].center, World.getSingleton().sceneRoot)){ if (!PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderUp)].center, World.getSingleton().sceneRoot)){ _arg1.onTheLadderUp = -1; }; }; }; if (_arg1.onTheLadderDown != -1){ if (!PixelCollision.isColliding(_arg1.image.ladderDetector, MovieClip(level.middleGround)[("ladder" + _arg1.onTheLadderDown)].center, World.getSingleton().sceneRoot)){ _arg1.onTheLadderDown = -1; }; }; _local2 = ((_local10 + _local6.initialLantaiSign) - 1); while (_local2 >= _local6.initialLantaiSign) { if (PixelCollision.isColliding(_arg1.image, MovieClip(level.middleGround)[("lantaiSign" + _local2)], World.getSingleton().sceneRoot)){ _arg1.lantai = _local2; }; _local2--; }; }; } public static function getSingleton():CollisionDetector{ if (INSTANCE == null){ INSTANCE = new (CollisionDetector); }; return (INSTANCE); } public static function boxToBoxCollision(_arg1:DisplayObject, _arg2:DisplayObject):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; _local3 = _arg1.x; _local4 = _arg2.x; _local5 = (_arg1.x + _arg1.width); _local6 = (_arg2.x + _arg2.width); _local7 = _arg1.y; _local8 = _arg2.y; _local9 = (_arg1.y + _arg1.height); _local10 = (_arg2.y + _arg2.height); if (_local9 < _local8){ return (false); }; if (_local7 > _local10){ return (false); }; if (_local5 < _local4){ return (false); }; if (_local3 > _local6){ return (false); }; return (true); } } }//package p_singleton
Section 284
//Updater (p_singleton.Updater) package p_singleton { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.display.*; import org.idmedia.as3commons.util.*; import p_gamelevel.*; public class Updater { public var mags:ArrayList; public var level:GameLevel; public var enemyBullets:ArrayList; private var sceneRoot:Sprite; private var midX:Number; private var midY:Number; public var playerBullets:ArrayList; public var enemies:ArrayList; public var barricades:ArrayList; public var players:ArrayList; public var gibs:ArrayList; public var npcs:ArrayList; public var shells:ArrayList; public var itemPickUps:ArrayList; private var stageHeight:Number; private var stageWidth:Number; private static var INSTANCE:Updater; public function Updater(){ stageWidth = World.getSingleton().gameWidth; stageHeight = World.getSingleton().gameHeight; midX = (stageWidth / 2); midY = (stageHeight / 2); sceneRoot = World.getSingleton().sceneRoot; super(); players = World.getSingleton().players; enemies = World.getSingleton().enemies; npcs = World.getSingleton().npcs; itemPickUps = World.getSingleton().itemPickUps; barricades = World.getSingleton().barricades; playerBullets = World.getSingleton().playerBullets; enemyBullets = World.getSingleton().enemyBullets; shells = World.getSingleton().shells; mags = World.getSingleton().mags; level = World.getSingleton().level; gibs = World.getSingleton().gibs; } public function updateNpcs():void{ var _local1:int; var _local2:int; _local1 = npcs.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { if (npcs.get(_local2).active){ npcs.get(_local2).screenPosition.x = (npcs.get(_local2).position.x + sceneRoot.x); npcs.get(_local2).screenPosition.y = (npcs.get(_local2).position.y + sceneRoot.y); npcs.get(_local2).position.x = (npcs.get(_local2).body.GetPosition().x * 30); npcs.get(_local2).position.y = (npcs.get(_local2).body.GetPosition().y * 30); npcs.get(_local2).angle = b2Math.radiansToDegrees(npcs.get(_local2).body.GetAngle()); npcs.get(_local2).update(); }; _local2--; }; } public function updateEnemies():void{ var _local1:int; var _local2:int; _local1 = enemies.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { if (enemies.get(_local2).active){ enemies.get(_local2).screenPosition.x = (enemies.get(_local2).position.x + sceneRoot.x); enemies.get(_local2).screenPosition.y = (enemies.get(_local2).position.y + sceneRoot.y); enemies.get(_local2).position.x = (enemies.get(_local2).body.GetPosition().x * 30); enemies.get(_local2).position.y = (enemies.get(_local2).body.GetPosition().y * 30); enemies.get(_local2).angle = b2Math.radiansToDegrees(enemies.get(_local2).body.GetAngle()); enemies.get(_local2).update(); }; _local2--; }; } public function preUpdateNpcs():void{ var _local1:int; var _local2:int; _local1 = npcs.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { if (npcs.get(_local2).active){ npcs.get(_local2).falling(); npcs.get(_local2).climbing(); npcs.get(_local2).reset(); }; _local2--; }; } public function updateGibs():void{ var _local1:int; var _local2:int; _local1 = gibs.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { gibs.get(_local2).screenPosition.x = (gibs.get(_local2).position.x + sceneRoot.x); gibs.get(_local2).screenPosition.y = (gibs.get(_local2).position.y + sceneRoot.y); gibs.get(_local2).position.x = (gibs.get(_local2).body.GetPosition().x * 30); gibs.get(_local2).position.y = (gibs.get(_local2).body.GetPosition().y * 30); gibs.get(_local2).angle = b2Math.radiansToDegrees(gibs.get(_local2).body.GetAngle()); gibs.get(_local2).update(); _local2--; }; } public function updateBullets():void{ var _local1:int; var _local2:int; _local1 = playerBullets.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { playerBullets.get(_local2).screenPosition.x = (playerBullets.get(_local2).position.x + sceneRoot.x); playerBullets.get(_local2).screenPosition.y = (playerBullets.get(_local2).position.y + sceneRoot.y); if (playerBullets.get(_local2).body){ playerBullets.get(_local2).position.x = (playerBullets.get(_local2).body.GetPosition().x * 30); playerBullets.get(_local2).position.y = (playerBullets.get(_local2).body.GetPosition().y * 30); playerBullets.get(_local2).angle = b2Math.radiansToDegrees(playerBullets.get(_local2).body.GetAngle()); }; playerBullets.get(_local2).update(); _local2--; }; _local1 = enemyBullets.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { enemyBullets.get(_local2).screenPosition.x = (enemyBullets.get(_local2).position.x + sceneRoot.x); enemyBullets.get(_local2).screenPosition.y = (enemyBullets.get(_local2).position.y + sceneRoot.y); if (enemyBullets.get(_local2).body){ enemyBullets.get(_local2).position.x = (enemyBullets.get(_local2).body.GetPosition().x * 30); enemyBullets.get(_local2).position.y = (enemyBullets.get(_local2).body.GetPosition().y * 30); enemyBullets.get(_local2).angle = b2Math.radiansToDegrees(enemyBullets.get(_local2).body.GetAngle()); }; enemyBullets.get(_local2).update(); _local2--; }; } public function updatePlayers():void{ var _local1:int; var _local2:int; _local1 = players.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { if (players.get(_local2).active){ players.get(_local2).screenPosition.x = (players.get(_local2).position.x + sceneRoot.x); players.get(_local2).screenPosition.y = (players.get(_local2).position.y + sceneRoot.y); players.get(_local2).position.x = (players.get(_local2).body.GetPosition().x * 30); players.get(_local2).position.y = (players.get(_local2).body.GetPosition().y * 30); players.get(_local2).angle = b2Math.radiansToDegrees(players.get(_local2).body.GetAngle()); players.get(_local2).update(); }; _local2--; }; } public function preUpdateEnemies():void{ var _local1:int; var _local2:int; _local1 = enemies.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { if (enemies.get(_local2).active){ enemies.get(_local2).falling(); enemies.get(_local2).climbing(); enemies.get(_local2).reset(); }; _local2--; }; } protected function updateItemPickUps():void{ var _local1:int; var _local2:int; _local1 = itemPickUps.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { itemPickUps.get(_local2).screenPosition.x = (itemPickUps.get(_local2).position.x + sceneRoot.x); itemPickUps.get(_local2).screenPosition.y = (itemPickUps.get(_local2).position.y + sceneRoot.y); itemPickUps.get(_local2).position.x = (itemPickUps.get(_local2).body.GetPosition().x * 30); itemPickUps.get(_local2).position.y = (itemPickUps.get(_local2).body.GetPosition().y * 30); itemPickUps.get(_local2).angle = b2Math.radiansToDegrees(itemPickUps.get(_local2).body.GetAngle()); itemPickUps.get(_local2).update(); _local2--; }; } protected function updateLevel():void{ var _local1:Number; var _local2:Number; var _local3:int; var _local4:int; var _local5:int; var _local6:Number; var _local7:String; var _local8:Number; var _local9:Number; if (((World.getSingleton().playedCharacter) && ((World.getSingleton().players.size() > 0)))){ _local1 = World.getSingleton().playedCharacter.screenPosition.x; _local2 = World.getSingleton().playedCharacter.screenPosition.y; _local3 = World.getSingleton().gameWidth; _local4 = World.getSingleton().gameHeight; _local5 = World.getSingleton().level.backGround.width; _local6 = 50; _local7 = sceneRoot.stage.quality; sceneRoot.stage.quality = StageQuality.LOW; if ((((sceneRoot.x >= _local6)) && ((World.getSingleton().playedCharacter.position.x < (_local3 / 2))))){ } else { if ((((sceneRoot.x <= ((_local3 - _local5) - _local6))) && ((World.getSingleton().playedCharacter.position.x > (_local5 - (_local3 / 2)))))){ } else { if (midX != _local1){ _local8 = (midX - _local1); sceneRoot.x = (sceneRoot.x + (_local8 / 10)); }; }; }; if (midY != _local2){ _local9 = (midY - _local2); sceneRoot.y = (sceneRoot.y + (_local9 / 10)); }; level.update(); sceneRoot.stage.quality = _local7; }; } public function preUpdatePlayers():void{ var _local1:int; var _local2:int; _local1 = players.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { if (players.get(_local2).active){ players.get(_local2).falling(); players.get(_local2).climbing(); players.get(_local2).reset(); }; _local2--; }; } public function update():void{ if (level){ updateLevel(); }; updatePlayers(); updateEnemies(); updateNpcs(); updateBullets(); updateShells(); updateMags(); updateItemPickUps(); updateBarricades(); updateGibs(); } protected function updateBodyAccordingToImages():void{ var _local1:b2Body; _local1 = World.getSingleton().physicWorld.m_bodyList; while (_local1) { if ((((_local1.m_userData is Sprite)) || ((_local1.m_userData is MovieClip)))){ _local1.SetXForm(new b2Vec2((_local1.m_userData.x / 30), (_local1.m_userData.y / 30)), _local1.GetAngle()); }; _local1 = _local1.m_next; }; } public function preUpdate():void{ preUpdatePlayers(); preUpdateEnemies(); preUpdateNpcs(); } protected function updateBarricades():void{ var _local1:int; var _local2:int; _local1 = barricades.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { barricades.get(_local2).screenPosition.x = (barricades.get(_local2).position.x + sceneRoot.x); barricades.get(_local2).screenPosition.y = (barricades.get(_local2).position.y + sceneRoot.y); barricades.get(_local2).position.x = (barricades.get(_local2).body.GetPosition().x * 30); barricades.get(_local2).position.y = (barricades.get(_local2).body.GetPosition().y * 30); barricades.get(_local2).angle = b2Math.radiansToDegrees(barricades.get(_local2).body.GetAngle()); barricades.get(_local2).update(); _local2--; }; } public function updateMags():void{ var _local1:int; var _local2:int; _local1 = mags.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { mags.get(_local2).screenPosition.x = (mags.get(_local2).position.x + sceneRoot.x); mags.get(_local2).screenPosition.y = (mags.get(_local2).position.y + sceneRoot.y); mags.get(_local2).position.x = (mags.get(_local2).body.GetPosition().x * 30); mags.get(_local2).position.y = (mags.get(_local2).body.GetPosition().y * 30); mags.get(_local2).angle = b2Math.radiansToDegrees(mags.get(_local2).body.GetAngle()); mags.get(_local2).update(); _local2--; }; } public function updateShells():void{ var _local1:int; var _local2:int; _local1 = shells.size(); _local2 = (_local1 - 1); while (_local2 >= 0) { shells.get(_local2).screenPosition.x = (shells.get(_local2).position.x + sceneRoot.x); shells.get(_local2).screenPosition.y = (shells.get(_local2).position.y + sceneRoot.y); shells.get(_local2).position.x = (shells.get(_local2).body.GetPosition().x * 30); shells.get(_local2).position.y = (shells.get(_local2).body.GetPosition().y * 30); shells.get(_local2).angle = b2Math.radiansToDegrees(shells.get(_local2).body.GetAngle()); shells.get(_local2).update(); _local2--; }; } protected function updateAllScreenPosition():void{ var _local1:Sprite; var _local2:int; var _local3:int; _local1 = World.getSingleton().sceneRoot; _local2 = players.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { players.get(_local3).screenPosition.x = (players.get(_local3).position.x + _local1.x); players.get(_local3).screenPosition.y = (players.get(_local3).position.y + _local1.y); _local3--; }; _local2 = enemies.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { enemies.get(_local3).screenPosition.x = (enemies.get(_local3).position.x + _local1.x); enemies.get(_local3).screenPosition.y = (enemies.get(_local3).position.y + _local1.y); _local3--; }; _local2 = npcs.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { npcs.get(_local3).screenPosition.x = (npcs.get(_local3).position.x + _local1.x); npcs.get(_local3).screenPosition.y = (npcs.get(_local3).position.y + _local1.y); _local3--; }; _local2 = playerBullets.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { playerBullets.get(_local3).screenPosition.x = (playerBullets.get(_local3).position.x + _local1.x); playerBullets.get(_local3).screenPosition.y = (playerBullets.get(_local3).position.y + _local1.y); _local3--; }; _local2 = enemyBullets.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { enemyBullets.get(_local3).screenPosition.x = (enemyBullets.get(_local3).position.x + _local1.x); enemyBullets.get(_local3).screenPosition.y = (enemyBullets.get(_local3).position.y + _local1.y); _local3--; }; _local2 = shells.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { shells.get(_local3).screenPosition.x = (shells.get(_local3).position.x + _local1.x); shells.get(_local3).screenPosition.y = (shells.get(_local3).position.y + _local1.y); _local3--; }; _local2 = mags.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { mags.get(_local3).screenPosition.x = (mags.get(_local3).position.x + _local1.x); mags.get(_local3).screenPosition.y = (mags.get(_local3).position.y + _local1.y); _local3--; }; _local2 = itemPickUps.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { itemPickUps.get(_local3).screenPosition.x = (itemPickUps.get(_local3).position.x + _local1.x); itemPickUps.get(_local3).screenPosition.y = (itemPickUps.get(_local3).position.y + _local1.y); _local3--; }; _local2 = barricades.size(); _local3 = (_local2 - 1); while (_local3 >= 0) { barricades.get(_local3).screenPosition.x = (barricades.get(_local3).position.x + _local1.x); barricades.get(_local3).screenPosition.y = (barricades.get(_local3).position.y + _local1.y); _local3--; }; } public static function getSingleton():Updater{ if (INSTANCE == null){ INSTANCE = new (Updater); }; return (INSTANCE); } } }//package p_singleton
Section 285
//World (p_singleton.World) package p_singleton { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import flash.events.*; import p_char.*; import flash.display.*; import p_char.p_playable.*; import org.idmedia.as3commons.util.*; import p_gamelevel.*; import flash.media.*; import p_crosshair.*; import p_menuBar.*; import flash.utils.*; import p_ammo.*; import p_util.*; import flash.net.*; public class World extends EventDispatcher { public var explosiveWeaponInventory:ArrayList; public var sharedObject:SharedObject; public var currentStage:int;// = 0 public var enemyBullets:ArrayList; public var waveLevel:int;// = 0 public var signBaloonVisible:Boolean;// = false private var _shakeCounter:int;// = 0 public var enemies:ArrayList; private var _fps:FPSCounter; public var levelDone:int;// = 0 public var gameStarted:Boolean;// = false public var backgroundRoot:Sprite; public var weaponShop:WeaponShop; public var menuBar:MenuBar; private var _shakeCounterMax:int;// = 10 private var _direction:b2Vec2; public var playerInsideBarricade:Boolean;// = false public var shells:ArrayList; public var physicWorld:b2World; public var savedPlayer:PlayableCharacter; private var mousePVec:b2Vec2; public var backGroundSoundChannel:SoundChannel; public var waveTime:int; private var _prevPosition:b2Vec2; public var gameTimer:Timer; public var muted:Boolean; public var continuePressed:Boolean; public var startMoney:int;// = 700 public var barricadeShop:BarricadeShop; public var mags:ArrayList; public var level:GameLevel; private var _shakeTimer:Timer; public var waveTimeEach:int;// = 90 public var sceneRoot:Sprite; public var playerBullets:ArrayList; public var savedMoney:Number; public var test:int;// = 0 public var meleeWeaponInventory:ArrayList; protected var dbgDraw:b2DebugDraw; public var numOfWave:int;// = 4 public var score:int; public var playedCharacter:Character; public var numOfLevel:int;// = 2 public var mercInventory:ArrayList; public var rangeWeaponInventory:ArrayList; public var continuing:Boolean; public var blackBackground:MovieClip; private var _distance:Number;// = 15 public var barricades:ArrayList; public var players:ArrayList; public var gibs:ArrayList; public var currentLevelNumber:int;// = 0 public var npcs:ArrayList; public var gameHeight:Number;// = 500 public var waveCounter:int;// = 0 public var itemPickUps:ArrayList; public var money:int; public var bloods:ArrayList; public var waveNum:int;// = 0 protected var dbgSprite:Sprite; public var kills:int; public var mousePointer:MousePointer; public var savedNpcs:ArrayList; public var tempPlayer:PlayableCharacter; public var maxNPC:int;// = 2 public var menuRoot:Sprite; public var savedAmmoInventory:ArrayList; public var gameEnded:Boolean; public var scoreMultiplier:int;// = 33 public var gameWidth:Number;// = 800 public var blurBackground:MovieClip; public var userName:String;// = "" public var quality:String; public static const gameUpdateInterval:int = 30; public static const gravity:Number = 2; public static const physicsIteration:int = 6; public static const physicsDT:Number = 0.0333333333333333; public static const physScale:Number = 30; private static var INSTANCE:World; public function World(){ var _local1:Ammo; gameWidth = 800; gameHeight = 500; test = 0; startMoney = 700; money = startMoney; numOfWave = 4; waveNum = 0; waveLevel = 0; waveCounter = 0; scoreMultiplier = 33; waveTimeEach = 90; currentStage = 0; currentLevelNumber = 0; levelDone = 0; numOfLevel = 2; userName = ""; signBaloonVisible = false; maxNPC = 2; playerInsideBarricade = false; gameStarted = false; _shakeCounter = 0; _shakeCounterMax = 10; _distance = 15; mousePVec = new b2Vec2(); super(); continuePressed = false; continuing = false; sceneRoot = new Sprite(); menuRoot = new Sprite(); backgroundRoot = new Sprite(); players = new ArrayList(); enemies = new ArrayList(); npcs = new ArrayList(); savedNpcs = new ArrayList(); itemPickUps = new ArrayList(); barricades = new ArrayList(); playerBullets = new ArrayList(); enemyBullets = new ArrayList(); shells = new ArrayList(); mags = new ArrayList(); bloods = new ArrayList(); gibs = new ArrayList(); dbgDraw = new b2DebugDraw(); dbgSprite = new Sprite(); score = 0; kills = 0; savedMoney = startMoney; savedAmmoInventory = new ArrayList(); _local1 = new Ammo12Gauge(30); savedAmmoInventory.add(_local1); _local1 = new Ammo357(30); savedAmmoInventory.add(_local1); _local1 = new Ammo45(30); savedAmmoInventory.add(_local1); _local1 = new Ammo556(30); savedAmmoInventory.add(_local1); _local1 = new Ammo762(30); savedAmmoInventory.add(_local1); _local1 = new Ammo9mm(50); savedAmmoInventory.add(_local1); _local1 = new Ammo50Cal(90); savedAmmoInventory.add(_local1); _local1 = new AmmoHE(6); savedAmmoInventory.add(_local1); blurBackground = new blurBG(); blurBackground.alpha = 0; blackBackground = new blackBG(); blackBackground.alpha = 0; backgroundRoot.addChild(blurBackground); backgroundRoot.addChild(blackBackground); gameTimer = new Timer(gameUpdateInterval); gameTimer.addEventListener(TimerEvent.TIMER, updateWorld); gameEnded = false; muted = false; } public function shakeScreen():void{ if (!_shakeTimer){ _shakeTimer = new Timer(10); _shakeTimer.addEventListener(TimerEvent.TIMER, shaking); }; if (!_shakeTimer.running){ _shakeTimer.start(); _prevPosition = new b2Vec2(sceneRoot.x, sceneRoot.y); }; } public function initPhysicWorld(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Boolean=true, _arg5:b2ContactListener=null, _arg6:b2ContactFilter=null):void{ var _local7:b2AABB; _local7 = new b2AABB(); _local7.lowerBound.Set((_arg1.x / physScale), (_arg1.y / physScale)); _local7.upperBound.Set((_arg2.x / physScale), (_arg2.y / physScale)); physicWorld = new b2World(_local7, _arg3, _arg4); if (_arg5){ physicWorld.SetContactListener(_arg5); }; if (_arg6){ physicWorld.SetContactFilter(_arg6); }; } public function saveGame():void{ var _local1:int; var _local2:int; initSharedObject(); sharedObject.data.levelDone = levelDone; sharedObject.data.money = money; sharedObject.data.kills = kills; sharedObject.data.waveLevel = waveLevel; sharedObject.data.waveCounter = waveCounter; sharedObject.data.currentLevelNumber = currentLevelNumber; sharedObject.data.waveNum = waveNum; if (World.getSingleton().playedCharacter){ sharedObject.data.playerLevel = PlayableCharacter(World.getSingleton().playedCharacter).level; }; _local1 = 0; _local2 = World.getSingleton().mercInventory.size(); sharedObject.data.npcSize = _local2; sharedObject.data.npc = new Array(_local2); while (_local1 < _local2) { sharedObject.data.npc[_local1] = World.getSingleton().mercInventory.get(_local1).playerOwned; _local1++; }; _local1 = 0; _local2 = World.getSingleton().meleeWeaponInventory.size(); sharedObject.data.meleeInventorySize = _local2; sharedObject.data.meleeWeapon = new Array(_local2); while (_local1 < _local2) { sharedObject.data.meleeWeapon[_local1] = World.getSingleton().meleeWeaponInventory.get(_local1).playerOwned; _local1++; }; _local1 = 0; _local2 = World.getSingleton().rangeWeaponInventory.size(); sharedObject.data.rangeInventorySize = _local2; sharedObject.data.rangeWeapon = new Array(_local2); while (_local1 < _local2) { sharedObject.data.rangeWeapon[_local1] = World.getSingleton().rangeWeaponInventory.get(_local1).playerOwned; _local1++; }; _local1 = 0; _local2 = World.getSingleton().explosiveWeaponInventory.size(); sharedObject.data.explosiveInventorySize = _local2; sharedObject.data.explosiveWeapon = new Array(_local2); sharedObject.data.explosiveAmmo = new Array(_local2); sharedObject.data.explosiveReloadAmmo = new Array(_local2); while (_local1 < _local2) { sharedObject.data.explosiveWeapon[_local1] = World.getSingleton().explosiveWeaponInventory.get(_local1).playerOwned; sharedObject.data.explosiveAmmo[_local1] = World.getSingleton().explosiveWeaponInventory.get(_local1).ammo; sharedObject.data.explosiveReloadAmmo[_local1] = World.getSingleton().explosiveWeaponInventory.get(_local1).reloadAmmo; _local1++; }; _local1 = 0; _local2 = World.getSingleton().savedAmmoInventory.size(); sharedObject.data.ammoInventorySize = _local2; sharedObject.data.ammo = new Array(_local2); while (_local1 < _local2) { sharedObject.data.ammo[_local1] = World.getSingleton().savedAmmoInventory.get(_local1).amount; _local1++; }; sharedObject.data.saved = true; sharedObject.flush(); sharedObject.close(); } public function pauseGame():void{ dispatchEvent(new Event(WorldEvent.ON_PAUSE)); gameTimer.stop(); } public function initInventory():void{ if (meleeWeaponInventory){ meleeWeaponInventory.clear(); } else { meleeWeaponInventory = new ArrayList(); }; if (rangeWeaponInventory){ rangeWeaponInventory.clear(); } else { rangeWeaponInventory = new ArrayList(); }; if (explosiveWeaponInventory){ explosiveWeaponInventory.clear(); } else { explosiveWeaponInventory = new ArrayList(); }; if (mercInventory){ mercInventory.clear(); } else { mercInventory = new ArrayList(); }; } public function updateWorld(_arg1:TimerEvent):void{ physicWorld.Step(physicsDT, physicsIteration); dispatchEvent(new Event(WorldEvent.ON_UPDATE)); _arg1.updateAfterEvent(); } public function GetBodyAt(_arg1:Number, _arg2:Number):b2Body{ var _local3:b2AABB; var _local4:int; var _local5:Array; var _local6:int; var _local7:b2Body; var _local8:int; var _local9:b2Shape; var _local10:Boolean; mousePVec.Set(_arg1, _arg2); _local3 = new b2AABB(); _local3.lowerBound.Set((_arg1 - 0.01), (_arg2 - 0.01)); _local3.upperBound.Set((_arg1 + 0.01), (_arg2 + 0.01)); _local4 = 10; _local5 = new Array(); _local6 = physicWorld.Query(_local3, _local5, _local4); _local7 = null; _local8 = 0; while (_local8 < _local6) { if (_local5[_local8].GetBody().IsStatic() == false){ _local9 = (_local5[_local8] as b2Shape); _local10 = (_local5[_local8] as b2Shape).TestPoint(_local9.GetBody().GetXForm(), mousePVec); if (_local10){ _local7 = _local9.GetBody(); break; }; }; _local8++; }; return (_local7); } public function shaking(_arg1:TimerEvent):void{ if (_shakeCounter >= _shakeCounterMax){ _shakeTimer.stop(); _shakeCounter = 0; sceneRoot.x = _prevPosition.x; sceneRoot.y = _prevPosition.y; return; }; _direction = new b2Vec2(0, 0); _direction.x = (Math.random() - Math.random()); _direction.y = (Math.random() - Math.random()); sceneRoot.x = (sceneRoot.x + (_direction.x * _distance)); sceneRoot.y = (sceneRoot.y + (_direction.y * _distance)); _shakeCounter++; } public function initSharedObject():void{ try { sharedObject = SharedObject.getLocal("D2DMemory"); } catch(error:Error) { return; }; } public function initWorld():void{ dispatchEvent(new Event(WorldEvent.ON_INIT)); } public function startGame():void{ dispatchEvent(new Event(WorldEvent.ON_START)); gameTimer.start(); } public function setDebugMode(_arg1:Boolean):void{ if (_arg1){ dbgDraw.m_sprite = dbgSprite; dbgDraw.m_drawScale = 30; dbgDraw.m_fillAlpha = 0.6; dbgDraw.m_lineThickness = 1; dbgDraw.m_drawFlags = 4294967295; physicWorld.SetDebugDraw(dbgDraw); sceneRoot.addChild(dbgSprite); } else { if (sceneRoot.contains(dbgSprite)){ sceneRoot.removeChild(dbgSprite); }; }; } public function changeLevel(_arg1:GameLevel):void{ if (this.level){ this.level.detachChild(); this.level.destroyBodies(); }; this.level = _arg1; CollisionDetector.getSingleton().level = _arg1; Updater.getSingleton().level = _arg1; this.level.attachChild(); } public function setFocusToStage():void{ sceneRoot.stage.focus = sceneRoot.stage; } public function loadGame():void{ initSharedObject(); sharedObject.flush(); sharedObject.close(); } public static function getSingleton():World{ if (INSTANCE == null){ INSTANCE = new (World); }; return (INSTANCE); } } }//package p_singleton
Section 286
//WorldEvent (p_singleton.WorldEvent) package p_singleton { public class WorldEvent { public static var ON_UPDATE:String = "OnUpdate"; public static var ON_LOADED:String = "OnLoaded"; public static var ON_START:String = "OnStart"; public static var ON_INIT:String = "OnInit"; public static var ON_PAUSE:String = "OnPause"; public static var ON_LOADING:String = "OnLoading"; } }//package p_singleton
Section 287
//StateEnemy (p_state.p_enemyState.StateEnemy) package p_state.p_enemyState { import p_char.*; import p_singleton.*; import p_char.p_nonplayable.*; public class StateEnemy { public var id:String; public var char:NonPlayableCharacter; public function StateEnemy(_arg1:NonPlayableCharacter){ char = _arg1; } public function moveTo(_arg1:Number):void{ if (_arg1 < char.position.x){ char.direction.x = -1; if (char.run){ char.runLeft(); } else { char.walkLeft(); }; if (char.faceState == FaceState.FACE_RIGHT){ char.turnFace(); }; } else { char.direction.x = 1; if (char.run){ char.runRight(); } else { char.walkRight(); }; if (char.faceState == FaceState.FACE_LEFT){ char.turnFace(); }; }; } public function checkFace(_arg1:Number):void{ if (_arg1 < char.position.x){ char.direction.x = -1; if (char.faceState == FaceState.FACE_RIGHT){ char.turnFace(); }; } else { char.direction.x = 1; if (char.faceState == FaceState.FACE_LEFT){ char.turnFace(); }; }; } public function checkIsRangeReached():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = Math.abs((char.position.x - char.nearestTarget.position.x)); _local2 = Math.abs((char.position.y - char.nearestTarget.position.y)); _local3 = (_local1 * _local1); _local4 = (_local2 * _local2); _local5 = Math.sqrt((_local3 + _local4)); if (_local5 <= char.distanceLimit){ char.rangeIsReached = true; } else { char.rangeIsReached = false; }; } public function update():StateEnemy{ return (this); } public function isInsideRangeVertical(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Number; _local4 = Math.abs((_arg1 - _arg2)); if (_local4 <= _arg3){ return (true); }; return (false); } public function isInsideRangeHorizontal(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Number; _local4 = Math.abs((_arg1 - _arg2)); if (_local4 <= _arg3){ return (true); }; return (false); } public function storeNearestPlayer():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local1 = World.getSingleton().players.size(); _local2 = 0; char.nearestDistance = 10000; _local2 = (_local1 - 1); while (_local2 >= 0) { _local3 = Math.abs((char.position.x - World.getSingleton().players.get(_local2).position.x)); _local4 = Math.abs((char.position.y - World.getSingleton().players.get(_local2).position.y)); _local5 = (_local3 * _local3); _local6 = (_local4 * _local4); _local7 = Math.sqrt((_local5 + _local6)); if (_local7 < char.nearestDistance){ char.nearestDistance = _local7; char.nearestTarget = World.getSingleton().players.get(_local2); }; _local2--; }; _local1 = World.getSingleton().npcs.size(); _local2 = 0; _local2 = (_local1 - 1); while (_local2 >= 0) { _local3 = Math.abs((char.position.x - World.getSingleton().npcs.get(_local2).position.x)); _local4 = Math.abs((char.position.y - World.getSingleton().npcs.get(_local2).position.y)); _local5 = (_local3 * _local3); _local6 = (_local4 * _local4); _local7 = Math.sqrt((_local5 + _local6)); if (_local7 < char.nearestDistance){ char.nearestDistance = _local7; char.nearestTarget = World.getSingleton().npcs.get(_local2); }; _local2--; }; } } }//package p_state.p_enemyState
Section 288
//StateEnemyAttack (p_state.p_enemyState.StateEnemyAttack) package p_state.p_enemyState { import p_char.p_nonplayable.*; import p_state.*; public class StateEnemyAttack extends StateEnemy { public function StateEnemyAttack(_arg1:NonPlayableCharacter){ id = StateId.ATTACK; super(_arg1); } override public function update():StateEnemy{ if (char.nearestTarget.body == null){ return (new StateEnemyIdle(char)); }; checkIsRangeReached(); if (char.rangeIsReached){ checkFace(char.nearestTarget.position.x); char.attack(false); } else { return (new StateEnemySearching(char)); }; return (this); } } }//package p_state.p_enemyState
Section 289
//StateEnemyCalculate (p_state.p_enemyState.StateEnemyCalculate) package p_state.p_enemyState { import p_singleton.*; import p_char.p_nonplayable.*; import p_state.*; public class StateEnemyCalculate extends StateEnemy { public function StateEnemyCalculate(_arg1:NonPlayableCharacter){ id = StateId.CALCULATE; super(_arg1); } override public function update():StateEnemy{ var _local1:Number; if (char.nearestTarget == null){ return (new StateEnemyIdle(char)); }; if (char.lantai == -1){ return (this); }; if (char.lantai < char.nearestTarget.lantai){ char.isMovingUp = true; char.ladderDestination = char.level.findNearestLadderUp(char, World.getSingleton().currentStage, char.lantai); char.previousLantai = char.lantai; if (char.ladderDestination == -1){ char.isMovingUp = false; char.isMovingDown = false; _local1 = ((Math.floor((Math.random() * 10)) + 1) % 2); if (_local1 == 0){ char.isMovingRight = true; char.isMovingLeft = false; } else { char.isMovingRight = false; char.isMovingLeft = true; }; return (new StateEnemyPatrol(char)); } else { return (new StateEnemyChase(char)); }; //unresolved jump }; if (char.lantai > char.nearestTarget.lantai){ char.isMovingDown = true; char.ladderDestination = char.level.findNearestLadderDown(char, World.getSingleton().currentStage, char.lantai); char.previousLantai = char.lantai; if (char.ladderDestination == -1){ char.isMovingUp = false; char.isMovingDown = false; _local1 = ((Math.floor((Math.random() * 10)) + 1) % 2); if (_local1 == 0){ char.isMovingRight = true; char.isMovingLeft = false; } else { char.isMovingRight = false; char.isMovingLeft = true; }; return (new StateEnemyPatrol(char)); } else { return (new StateEnemyChase(char)); }; } else { }; return (!NULL!); } } }//package p_state.p_enemyState
Section 290
//StateEnemyChase (p_state.p_enemyState.StateEnemyChase) package p_state.p_enemyState { import p_char.*; import p_singleton.*; import flash.display.*; import p_char.p_nonplayable.*; import p_state.*; public class StateEnemyChase extends StateEnemy { public function StateEnemyChase(_arg1:NonPlayableCharacter){ id = StateId.CHASE; super(_arg1); } override public function update():StateEnemy{ if (char.body.touchedBarricade){ char.body.touchedBarricade = false; if (char.body.faceRight){ if (char.faceState == FaceState.FACE_LEFT){ char.turnFace(); }; } else { if (char.faceState == FaceState.FACE_RIGHT){ char.turnFace(); }; }; char.attack(false); return (this); }; if ((((World.getSingleton().players.size() <= 0)) || ((char.nearestTarget == null)))){ return (new StateEnemyIdle(char)); }; checkIsRangeReached(); if (char.rangeIsReached){ return (new StateEnemyAttack(char)); }; if (char.isMovingUp){ if (char.nearestTarget){ if (char.nearestTarget.lantai == char.lantai){ if (char.onTheLadderDown == -1){ char.isMovingDown = false; char.isMovingUp = false; }; }; }; if (char.onTheLadderUp == char.ladderDestination){ char.arrived = true; char.moveUp(); } else { if (char.arrived){ if (char.onTheLadderDown != char.ladderDestination){ char.isMovingUp = false; char.arrived = false; } else { char.onTheLadderUp = char.ladderDestination; char.moveUp(); }; } else { moveTo(MovieClip(char.level.middleGround)[("ladder" + char.ladderDestination)].x); if (isInsideRangeHorizontal(char.position.x, MovieClip(char.level.middleGround)[("ladder" + char.ladderDestination)].x, 10)){ char.onTheLadderUp = char.ladderDestination; char.ableToMoveUp = true; char.moveUp(); }; }; }; } else { if (char.isMovingDown){ if (char.onTheLadderDown == char.ladderDestination){ char.arrived = true; char.moveDown(); } else { if (char.arrived){ char.isMovingDown = false; char.arrived = false; } else { moveTo(MovieClip(char.level.middleGround)[("ladder" + char.ladderDestination)].x); if (isInsideRangeHorizontal(char.position.x, MovieClip(char.level.middleGround)[("ladder" + char.ladderDestination)].x, 10)){ char.onTheLadderDown = char.ladderDestination; char.ableToMoveDown = true; char.moveDown(); }; }; }; } else { if (char.lantai == char.nearestTarget.lantai){ moveTo(char.nearestTarget.position.x); if (char.nearestTarget.onTheLadderUp != -1){ if (char.nearestTarget.position.y < char.position.y){ if (char.onTheLadderUp != -1){ char.moveUp(); }; } else { if (char.nearestTarget.position.y > char.position.y){ if (char.onTheLadderDown != -1){ char.moveDown(); }; }; }; } else { if (char.nearestTarget.onTheLadderDown != -1){ if (char.nearestTarget.position.y < char.position.y){ if (char.onTheLadderUp != -1){ char.moveUp(); }; } else { if (char.nearestTarget.position.y > char.position.y){ if (char.onTheLadderDown != -1){ char.moveDown(); }; }; }; }; }; } else { return (new StateEnemySearching(char)); }; }; }; return (this); } } }//package p_state.p_enemyState
Section 291
//StateEnemyIdle (p_state.p_enemyState.StateEnemyIdle) package p_state.p_enemyState { import p_singleton.*; import p_char.p_nonplayable.*; import p_state.*; public class StateEnemyIdle extends StateEnemy { public function StateEnemyIdle(_arg1:NonPlayableCharacter){ id = StateId.IDLE; super(_arg1); } override public function update():StateEnemy{ var _local1:Number; char.setIdle(); if ((((char.nearestTarget == null)) && ((((World.getSingleton().players.size() > 0)) || ((World.getSingleton().npcs.size() > 0)))))){ this.storeNearestPlayer(); return (new StateEnemySearching(char)); }; if (((char.nearestTarget) && ((((World.getSingleton().players.size() > 0)) || ((World.getSingleton().npcs.size() > 0)))))){ if (char.nearestTarget.body == null){ this.storeNearestPlayer(); return (new StateEnemySearching(char)); }; } else { _local1 = ((Math.floor((Math.random() * 10)) + 1) % 2); if (_local1 == 0){ _local1 = ((Math.floor((Math.random() * 10)) + 1) % 2); if (_local1 == 0){ char.isMovingRight = true; char.isMovingLeft = false; } else { char.isMovingRight = false; char.isMovingLeft = true; }; return (new StateEnemyPatrol(char)); }; }; return (this); } } }//package p_state.p_enemyState
Section 292
//StateEnemyPatrol (p_state.p_enemyState.StateEnemyPatrol) package p_state.p_enemyState { import p_char.*; import p_singleton.*; import p_char.p_nonplayable.*; import p_state.*; public class StateEnemyPatrol extends StateEnemy { public function StateEnemyPatrol(_arg1:NonPlayableCharacter){ id = StateId.PATROL; super(_arg1); } override public function update():StateEnemy{ if ((((World.getSingleton().players.size() > 0)) && (char.nearestTarget))){ checkIsRangeReached(); if (char.rangeIsReached){ return (new StateEnemyAttack(char)); }; }; if (char.isMovingRight){ if (char.ableToMoveRight){ char.walkRight(); if (char.faceState == FaceState.FACE_LEFT){ char.turnFace(); }; } else { char.isMovingRight = false; char.isMovingLeft = true; return (new StateEnemySearching(char)); }; } else { if (char.isMovingLeft){ if (char.ableToMoveLeft){ char.walkLeft(); if (char.faceState == FaceState.FACE_RIGHT){ char.turnFace(); }; } else { char.isMovingRight = true; char.isMovingLeft = false; return (new StateEnemySearching(char)); }; }; }; return (this); } } }//package p_state.p_enemyState
Section 293
//StateEnemySearching (p_state.p_enemyState.StateEnemySearching) package p_state.p_enemyState { import p_char.p_nonplayable.*; import p_state.*; public class StateEnemySearching extends StateEnemy { public function StateEnemySearching(_arg1:NonPlayableCharacter){ id = StateId.SEARCH; super(_arg1); } override public function update():StateEnemy{ if (char.nearestTarget){ checkIsRangeReached(); if (char.rangeIsReached){ return (new StateEnemyAttack(char)); }; return (new StateEnemyCalculate(char)); } else { }; return (!NULL!); } } }//package p_state.p_enemyState
Section 294
//StateNPCFriend (p_state.p_npcFriendState.StateNPCFriend) package p_state.p_npcFriendState { import Box2D.Common.Math.*; import p_weapon.*; import p_char.*; import p_singleton.*; import p_char.p_nonplayable.*; public class StateNPCFriend { public var id:String; public var char:NPCFriend; public function StateNPCFriend(_arg1:NPCFriend){ char = _arg1; } public function moveTo(_arg1:b2Vec2):void{ if (_arg1.x < char.position.x){ char.direction.x = -1; if (char.run){ char.runLeft(); } else { char.walkLeft(); }; } else { if (_arg1.x > char.position.x){ char.direction.x = 1; if (char.run){ char.runRight(); } else { char.walkRight(); }; }; }; } public function checkFace(_arg1:Number):void{ if (_arg1 < char.position.x){ char.direction.x = -1; if (char.faceState == FaceState.FACE_RIGHT){ char.turnFace(); }; } else { char.direction.x = 1; if (char.faceState == FaceState.FACE_LEFT){ char.turnFace(); }; }; } public function attack():void{ if (((char.nearestTarget) && ((World.getSingleton().enemies.size() > 0)))){ checkFace(char.nearestTarget.screenPosition.x); char.aim(char.nearestTarget.screenPosition.x, char.nearestTarget.screenPosition.y); if (char.currentWeapon){ char.attack(true); if (char.currentWeapon.weaponType == WeaponType.RANGE){ RangeWeapon(char.currentWeapon).ammoType.amount++; } else { if (char.currentWeapon.weaponType == WeaponType.MELEE){ } else { if (char.currentWeapon.weaponType == WeaponType.EXPLOSIVE){ ExplosiveWeapon(char.currentWeapon).reloadAmmo++; }; }; }; }; }; } public function update():StateNPCFriend{ return (this); } public function storeNearestEnemy():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local1 = World.getSingleton().enemies.size(); _local2 = 0; char.nearestDistance = 10000; _local2 = (_local1 - 1); while (_local2 >= 0) { if ((((World.getSingleton().enemies.get(_local2).lantai == char.lantai)) && ((World.getSingleton().enemies.get(_local2).stageNumber == char.stageNumber)))){ _local3 = Math.abs((char.position.x - World.getSingleton().enemies.get(_local2).position.x)); _local4 = Math.abs((char.position.y - World.getSingleton().enemies.get(_local2).position.y)); _local5 = (_local3 * _local3); _local6 = (_local4 * _local4); _local7 = Math.sqrt((_local5 + _local6)); if (_local7 < char.nearestDistance){ char.nearestDistance = _local7; char.nearestTarget = World.getSingleton().enemies.get(_local2); }; }; _local2--; }; } public function isInsideRangeVertical(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Number; _local4 = Math.abs((_arg1 - _arg2)); if (_local4 <= _arg3){ return (true); }; return (false); } public function checkIsRangeReached():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; if (char.nearestTarget){ if ((((char.stageNumber == char.nearestTarget.stageNumber)) && ((char.lantai == char.nearestTarget.lantai)))){ _local1 = Math.abs((char.position.x - char.nearestTarget.position.x)); _local2 = Math.abs((char.position.y - char.nearestTarget.position.y)); _local3 = (_local1 * _local1); _local4 = (_local2 * _local2); _local5 = Math.sqrt((_local3 + _local4)); if (_local5 <= char.distanceLimit){ char.enemyRangeIsReached = true; } else { char.enemyRangeIsReached = false; }; } else { char.enemyRangeIsReached = false; }; }; } public function checkOnLadder():void{ if (char.charToFollow){ if (char.charToFollow.position.y < char.position.y){ if (char.charToFollow.onTheLadderUp != -1){ if (char.onTheLadderUp != -1){ char.ableToMoveUp = true; char.moveUp(); }; } else { if (char.charToFollow.onTheLadderDown != -1){ if (char.onTheLadderUp != -1){ char.ableToMoveUp = true; char.moveUp(); }; }; }; } else { if (char.charToFollow.position.y > char.position.y){ if (char.charToFollow.onTheLadderUp != -1){ if (char.onTheLadderDown != -1){ char.ableToMoveDown = true; char.moveDown(); }; } else { if (char.charToFollow.onTheLadderDown != -1){ if (char.onTheLadderDown != -1){ char.ableToMoveDown = true; char.moveDown(); }; }; }; }; }; }; } public function checkDifferentLantai():Boolean{ if (char.charToFollow){ if (char.charToFollow.lantai > char.lantai){ char.isMovingUp = true; char.ladderDestination = World.getSingleton().level.findNearestLadderUp(char, World.getSingleton().currentStage, char.lantai); return (true); }; if (char.charToFollow.lantai < char.lantai){ char.isMovingDown = true; char.ladderDestination = World.getSingleton().level.findNearestLadderDown(char, World.getSingleton().currentStage, char.lantai); return (true); }; }; char.ladderDestination = -1; return (false); } public function isInsideRangeHorizontal(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Number; _local4 = Math.abs((_arg1 - _arg2)); if (_local4 <= _arg3){ return (true); }; return (false); } } }//package p_state.p_npcFriendState
Section 295
//StateNPCFriendClimb (p_state.p_npcFriendState.StateNPCFriendClimb) package p_state.p_npcFriendState { import Box2D.Common.Math.*; import p_singleton.*; import flash.display.*; import p_char.p_nonplayable.*; public class StateNPCFriendClimb extends StateNPCFriend { public function StateNPCFriendClimb(_arg1:NPCFriend){ super(_arg1); } override public function update():StateNPCFriend{ if (char.ladderDestination != -1){ if (char.charToFollow){ if (char.charToFollow.lantai == char.lantai){ if (char.onTheLadderDown == -1){ char.isMovingDown = false; char.isMovingUp = false; }; }; }; if (char.isMovingUp){ if (char.onTheLadderUp == char.ladderDestination){ char.arrived = true; char.moveUp(); } else { if (char.arrived){ if (char.onTheLadderDown != char.ladderDestination){ char.isMovingUp = false; char.arrived = false; } else { char.onTheLadderUp = char.ladderDestination; char.moveUp(); }; } else { moveTo(new b2Vec2(MovieClip(World.getSingleton().level.middleGround)[("ladder" + char.ladderDestination)].x, 0)); if (isInsideRangeHorizontal(char.position.x, MovieClip(World.getSingleton().level.middleGround)[("ladder" + char.ladderDestination)].x, 10)){ char.onTheLadderUp = char.ladderDestination; char.ableToMoveUp = true; char.moveUp(); }; }; }; return (this); } else { if (char.isMovingDown){ if (char.onTheLadderDown == char.ladderDestination){ char.arrived = true; char.moveDown(); } else { if (char.arrived){ char.isMovingDown = false; char.arrived = false; } else { moveTo(new b2Vec2(MovieClip(World.getSingleton().level.middleGround)[("ladder" + char.ladderDestination)].x, 0)); if (isInsideRangeHorizontal(char.position.x, MovieClip(World.getSingleton().level.middleGround)[("ladder" + char.ladderDestination)].x, 10)){ char.onTheLadderDown = char.ladderDestination; char.ableToMoveDown = true; char.moveDown(); }; }; }; return (this); }; }; }; char.isMovingUp = false; char.isMovingDown = false; return (new StateNPCFriendIdle(char)); } } }//package p_state.p_npcFriendState
Section 296
//StateNPCFriendFollow (p_state.p_npcFriendState.StateNPCFriendFollow) package p_state.p_npcFriendState { import p_singleton.*; import p_char.p_nonplayable.*; import p_state.*; public class StateNPCFriendFollow extends StateNPCFriend { public function StateNPCFriendFollow(_arg1:NPCFriend){ id = StateId.FOLLOW; super(_arg1); } override public function update():StateNPCFriend{ storeNearestEnemy(); checkIsRangeReached(); if (char.enemyRangeIsReached){ if (World.getSingleton().playedCharacter){ attack(); }; }; if (char.charToFollow){ if (char.follow){ if (char.body.shouldJump){ char.body.shouldJump = false; char.jump(); }; if (checkDifferentLantai()){ return (new StateNPCFriendClimb(char)); }; if (!arriveToChar()){ return (this); }; return (new StateNPCFriendIdle(char)); }; } else { char.follow = false; return (new StateNPCFriendIdle(char)); }; return (this); } public function arriveToChar():Boolean{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = 0; _local1 = (char.charToFollow.position.x - char.position.x); _local2 = 0; _local2 = (char.charToFollow.position.y - char.position.y); _local3 = (_local1 * _local1); _local4 = (_local2 * _local2); _local5 = Math.abs(_local1); if (_local5 > char.charDistanceLimit){ moveTo(char.charToFollow.position); return (false); }; return (true); } } }//package p_state.p_npcFriendState
Section 297
//StateNPCFriendIdle (p_state.p_npcFriendState.StateNPCFriendIdle) package p_state.p_npcFriendState { import p_singleton.*; import p_char.p_nonplayable.*; import p_state.*; public class StateNPCFriendIdle extends StateNPCFriend { public function StateNPCFriendIdle(_arg1:NPCFriend){ id = StateId.IDLE; super(_arg1); } override public function update():StateNPCFriend{ char.setIdle(); storeNearestEnemy(); checkIsRangeReached(); if (char.enemyRangeIsReached){ if (World.getSingleton().playedCharacter){ attack(); }; }; if (char.follow){ return (new StateNPCFriendFollow(char)); }; return (this); } } }//package p_state.p_npcFriendState
Section 298
//StateId (p_state.StateId) package p_state { public class StateId { public static var ATTACK:String = "ATTACK"; public static var CALCULATE:String = "CALCULATE"; public static var SEARCH:String = "SEARCH"; public static var PATROL:String = "PATROL"; public static var CHASE:String = "CHASE"; public static var FOLLOW:String = "FOLLOW"; public static var IDLE:String = "IDLE"; } }//package p_state
Section 299
//ContactFilterer (p_util.ContactFilterer) package p_util { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import p_char.*; public class ContactFilterer extends b2ContactFilter { public static var b2_defaultFilter:b2ContactFilter = new b2ContactFilter(); public function itemPickUpCollision(_arg1:b2FilterData, _arg2:b2FilterData):Boolean{ if (_arg1.groupIndex == BodyType.ITEM_PICK_UP){ if (((((!((_arg2.groupIndex == BodyType.WALL))) && (!((_arg2.groupIndex == BodyType.FLOOR))))) && (!((_arg2.groupIndex == BodyType.ITEM_PICK_UP))))){ if (_arg2.groupIndex != BodyType.PLAYER){ return (false); }; }; } else { if (_arg2.groupIndex == BodyType.ITEM_PICK_UP){ if (((((!((_arg1.groupIndex == BodyType.WALL))) && (!((_arg1.groupIndex == BodyType.FLOOR))))) && (!((_arg1.groupIndex == BodyType.ITEM_PICK_UP))))){ if (_arg1.groupIndex != BodyType.PLAYER){ return (false); }; }; }; }; return (true); } public function charCharCollision(_arg1:b2FilterData, _arg2:b2FilterData):Boolean{ if ((((_arg1.groupIndex == BodyType.PLAYER)) || ((_arg1.groupIndex == BodyType.ENEMY)))){ if ((((_arg2.groupIndex == BodyType.PLAYER)) || ((_arg2.groupIndex == BodyType.ENEMY)))){ return (false); }; }; return (true); } public function bulletBarricadeCollision(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:b2FilterData; var _local4:b2FilterData; _local3 = _arg1.GetFilterData(); _local4 = _arg2.GetFilterData(); if (_local3.groupIndex == BodyType.PLAYER_BULLET){ if (_local4.groupIndex == BodyType.BARRICADE){ return (false); }; } else { if (_local3.groupIndex == BodyType.BARRICADE){ if (_local4.groupIndex == BodyType.PLAYER_BULLET){ return (false); }; }; }; return (true); } public function shellCharCollision(_arg1:b2FilterData, _arg2:b2FilterData):Boolean{ if (_arg1.groupIndex == BodyType.SHELL){ if ((((_arg2.groupIndex == BodyType.PLAYER)) || ((_arg2.groupIndex == BodyType.ENEMY)))){ return (false); }; } else { if (_arg2.groupIndex == BodyType.SHELL){ if ((((_arg1.groupIndex == BodyType.PLAYER)) || ((_arg1.groupIndex == BodyType.ENEMY)))){ return (false); }; }; }; return (true); } public function bulletBulletCollision(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:b2FilterData; var _local4:b2FilterData; _local3 = _arg1.GetFilterData(); _local4 = _arg2.GetFilterData(); if ((((_local3.groupIndex == BodyType.PLAYER_BULLET)) || ((_local3.groupIndex == BodyType.ENEMY_BULLET)))){ if ((((_local4.groupIndex == BodyType.PLAYER_BULLET)) || ((_local4.groupIndex == BodyType.ENEMY_BULLET)))){ return (false); }; }; return (true); } override public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:b2FilterData; var _local4:b2FilterData; var _local5:Boolean; _local3 = _arg1.GetFilterData(); _local4 = _arg2.GetFilterData(); if (!charCharCollision(_local3, _local4)){ return (false); }; if (!bulletBulletCollision(_arg1, _arg2)){ return (false); }; if (!charBulletCollision(_arg1, _arg2)){ return (false); }; if (!bulletBarricadeCollision(_arg1, _arg2)){ return (false); }; if (!gibsCollision(_local3, _local4)){ return (false); }; if (!magsCharCollision(_local3, _local4)){ return (false); }; if (!itemPickUpCollision(_local3, _local4)){ return (false); }; if (!shellCharCollision(_local3, _local4)){ return (false); }; if (!playerLimitCollision(_local3, _local4)){ return (false); }; _local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0)))); return (_local5); } public function playerLimitCollision(_arg1:b2FilterData, _arg2:b2FilterData):Boolean{ if (_arg1.groupIndex == BodyType.PLAYERLIMIT){ if (((!((_arg2.groupIndex == BodyType.PLAYER))) && (!((_arg2.groupIndex == BodyType.BARRICADE))))){ return (false); }; } else { if (_arg2.groupIndex == BodyType.PLAYERLIMIT){ if (((!((_arg1.groupIndex == BodyType.PLAYER))) && (!((_arg1.groupIndex == BodyType.BARRICADE))))){ return (false); }; }; }; return (true); } public function charBulletCollision(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:b2FilterData; var _local4:b2FilterData; _local3 = _arg1.GetFilterData(); _local4 = _arg2.GetFilterData(); if (_local3.groupIndex == BodyType.PLAYER_BULLET){ if (_local4.groupIndex == BodyType.PLAYER){ return (false); }; } else { if (_local4.groupIndex == BodyType.PLAYER_BULLET){ if (_local3.groupIndex == BodyType.PLAYER){ return (false); }; }; }; if (_local3.groupIndex == BodyType.ENEMY_BULLET){ if (_local4.groupIndex == BodyType.ENEMY){ return (false); }; } else { if (_local4.groupIndex == BodyType.ENEMY_BULLET){ if (_local3.groupIndex == BodyType.ENEMY){ return (false); }; }; }; return (true); } public function magsCharCollision(_arg1:b2FilterData, _arg2:b2FilterData):Boolean{ if (_arg1.groupIndex == BodyType.MAGZ){ if ((((_arg2.groupIndex == BodyType.PLAYER)) || ((_arg2.groupIndex == BodyType.ENEMY)))){ return (false); }; } else { if (_arg2.groupIndex == BodyType.MAGZ){ if ((((_arg1.groupIndex == BodyType.PLAYER)) || ((_arg1.groupIndex == BodyType.ENEMY)))){ return (false); }; }; }; return (true); } public function gibsCollision(_arg1:b2FilterData, _arg2:b2FilterData):Boolean{ if (_arg1.groupIndex == BodyType.GIBS){ if (((!((_arg2.groupIndex == BodyType.WALL))) && (!((_arg2.groupIndex == BodyType.FLOOR))))){ return (false); }; } else { if (_arg2.groupIndex == BodyType.GIBS){ if (((!((_arg1.groupIndex == BodyType.WALL))) && (!((_arg1.groupIndex == BodyType.FLOOR))))){ return (false); }; }; }; return (true); } } }//package p_util
Section 300
//ContactListener (p_util.ContactListener) package p_util { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; import p_char.*; import p_bullet.*; public class ContactListener extends b2ContactListener { override public function Remove(_arg1:b2ContactPoint, _arg2:b2Contact):void{ charTouchTheGroundFalse(_arg1, _arg2); grenadeBulletTouchTheGroundFalse(_arg1, _arg2); characterBarricadesCollision2(_arg1, _arg2); } public function bulletBarricadesCollision(_arg1:b2ContactPoint, _arg2:b2Contact):void{ if (_arg1.shape1.GetBody().type == BodyType.ENEMY_BULLET){ if (_arg1.shape2.GetBody().type == BodyType.BARRICADE){ if (!_arg1.shape2.GetBody().m_userData.active){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { if (_arg1.shape1.GetBody().bulletType != BulletType.GRENADE){ _arg1.shape1.GetBody().touchedSolid = true; _arg1.shape1.GetBody().m_linearDamping = 10000; _arg1.shape1.GetBody().GetLinearVelocity().x = 0; _arg1.shape1.GetBody().GetLinearVelocity().y = 0; if (!_arg1.shape2.GetBody().gotShot){ _arg1.shape2.GetBody().impulseApplied = _arg1.shape1.GetBody().GetLinearVelocity().Copy(); _arg1.shape2.GetBody().impulseApplied.x = (_arg1.shape2.GetBody().impulseApplied.x / 10); _arg1.shape2.GetBody().impulseApplied.y = (_arg1.shape2.GetBody().impulseApplied.y / 10); _arg1.shape2.GetBody().pointCollision = _arg1.position.Copy(); _arg1.shape2.GetBody().damage = _arg1.shape1.GetBody().damage; _arg1.shape2.GetBody().gotShot = true; }; }; }; }; } else { if (_arg1.shape2.GetBody().type == BodyType.ENEMY_BULLET){ if (_arg1.shape1.GetBody().type == BodyType.BARRICADE){ if (!_arg1.shape1.GetBody().m_userData.active){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { if (_arg1.shape2.GetBody().bulletType != BulletType.GRENADE){ _arg1.shape2.GetBody().touchedSolid = true; _arg1.shape2.GetBody().m_linearDamping = 10000; _arg1.shape2.GetBody().GetLinearVelocity().x = 0; _arg1.shape2.GetBody().GetLinearVelocity().y = 0; if (!_arg1.shape1.GetBody().gotShot){ _arg1.shape1.GetBody().impulseApplied = _arg1.shape2.GetBody().GetLinearVelocity().Copy(); _arg1.shape1.GetBody().impulseApplied.x = (_arg1.shape1.GetBody().impulseApplied.x / 10); _arg1.shape1.GetBody().impulseApplied.y = (_arg1.shape1.GetBody().impulseApplied.y / 10); _arg1.shape1.GetBody().pointCollision = _arg1.position.Copy(); _arg1.shape1.GetBody().damage = _arg1.shape2.GetBody().damage; _arg1.shape1.GetBody().gotShot = true; }; }; }; }; }; }; } override public function Add(_arg1:b2ContactPoint, _arg2:b2Contact):void{ bulletLevelCollision(_arg1, _arg2); bulletCharacterCollision(_arg1, _arg2, BodyType.PLAYER_BULLET, BodyType.ENEMY); bulletCharacterCollision(_arg1, _arg2, BodyType.ENEMY_BULLET, BodyType.PLAYER); characterItemPickUpsCollision(_arg1, _arg2); bulletBarricadesCollision(_arg1, _arg2); } public function grenadeBulletTouchTheGroundFalse(_arg1:b2ContactPoint, _arg2:b2Contact):void{ if (_arg1.shape1.GetBody().bulletType == BulletType.GRENADE){ if (_arg1.shape2.GetBody().type == BodyType.FLOOR){ _arg1.shape1.GetBody().touchedTheGround = false; }; } else { (_arg1.shape2.GetBody().bulletType == BulletType.GRENADE); }; if (_arg1.shape1.GetBody().type == BodyType.FLOOR){ _arg1.shape2.GetBody().touchedTheGround = false; }; } public function bulletCharacterCollision(_arg1:b2ContactPoint, _arg2:b2Contact, _arg3:int, _arg4:int):void{ if ((((_arg1.shape1.GetBody().type == _arg3)) && (!((_arg1.shape1.GetBody().bulletType == BulletType.GRENADE))))){ if (_arg1.shape2.GetBody().type == _arg4){ if (!_arg1.shape2.GetBody().gotShot){ _arg1.shape2.GetBody().impulseApplied = _arg1.shape1.GetBody().GetLinearVelocity().Copy(); if (_arg1.shape1.GetBody().bulletType == BulletType.KNIFE){ _arg1.shape2.GetBody().impulseApplied.x = (_arg1.shape2.GetBody().impulseApplied.x * 4); _arg1.shape2.GetBody().impulseApplied.y = (_arg1.shape2.GetBody().impulseApplied.y * 4); } else { _arg1.shape2.GetBody().impulseApplied.x = (_arg1.shape2.GetBody().impulseApplied.x / 10); _arg1.shape2.GetBody().impulseApplied.y = (_arg1.shape2.GetBody().impulseApplied.y / 10); }; _arg1.shape2.GetBody().pointCollision = _arg1.position.Copy(); if (_arg1.shape1.GetBody().bulletType != BulletType.GLBULLET){ _arg1.shape2.GetBody().damage = _arg1.shape1.GetBody().damage; _arg1.shape2.GetBody().gotShot = true; }; if (_arg1.shape2.id == "head"){ _arg1.shape2.GetBody().headShot = true; }; if (_arg1.shape2.id == "body"){ _arg1.shape2.GetBody().bodyShot = true; } else { _arg1.shape2.GetBody().legShot = true; }; _arg1.shape1.GetBody().touchedChar = true; if (_arg1.shape1.GetBody().bulletType == BulletType.MAGNUM){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { _arg1.shape1.GetBody().m_linearDamping = 10000; _arg1.shape1.GetBody().GetLinearVelocity().x = 0; _arg1.shape1.GetBody().GetLinearVelocity().y = 0; }; } else { _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); }; }; } else { if ((((_arg1.shape2.GetBody().type == _arg3)) && (!((_arg1.shape2.GetBody().bulletType == BulletType.GRENADE))))){ if (_arg1.shape1.GetBody().type == _arg4){ if (!_arg1.shape1.GetBody().gotShot){ _arg1.shape1.GetBody().impulseApplied = _arg1.shape2.GetBody().GetLinearVelocity().Copy(); if (_arg1.shape2.GetBody().bulletType == BulletType.KNIFE){ _arg1.shape1.GetBody().impulseApplied.x = (_arg1.shape1.GetBody().impulseApplied.x * 4); _arg1.shape1.GetBody().impulseApplied.y = (_arg1.shape1.GetBody().impulseApplied.y * 4); } else { _arg1.shape1.GetBody().impulseApplied.x = (_arg1.shape1.GetBody().impulseApplied.x / 10); _arg1.shape1.GetBody().impulseApplied.y = (_arg1.shape1.GetBody().impulseApplied.y / 10); }; _arg1.shape1.GetBody().pointCollision = _arg1.position.Copy(); if (_arg1.shape2.GetBody().bulletType != BulletType.GLBULLET){ _arg1.shape1.GetBody().damage = _arg1.shape2.GetBody().damage; _arg1.shape1.GetBody().gotShot = true; }; if (_arg1.shape1.id == "head"){ _arg1.shape1.GetBody().headShot = true; }; if (_arg1.shape1.id == "body"){ _arg1.shape1.GetBody().bodyShot = true; } else { _arg1.shape1.GetBody().legShot = true; }; _arg1.shape2.GetBody().touchedChar = true; if (_arg1.shape2.GetBody().bulletType == BulletType.MAGNUM){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { _arg1.shape2.GetBody().m_linearDamping = 10000; _arg1.shape2.GetBody().GetLinearVelocity().x = 0; _arg1.shape2.GetBody().GetLinearVelocity().y = 0; }; } else { _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); }; }; }; }; } public function charTouchTheGroundTrue(_arg1:b2ContactResult, _arg2:b2Contact):void{ if ((((_arg1.shape2.GetBody().type == BodyType.PLAYER)) || ((_arg1.shape2.GetBody().type == BodyType.ENEMY)))){ if (_arg1.shape2.id == "floorDetector"){ if ((((_arg1.shape1.GetBody().type == BodyType.FLOOR)) || ((_arg1.shape1.GetBody().type == BodyType.BARRICADE)))){ _arg1.shape2.GetBody().touchedTheGround = true; }; }; } else { if ((((_arg1.shape1.GetBody().type == BodyType.PLAYER)) || ((_arg1.shape1.GetBody().type == BodyType.ENEMY)))){ if (_arg1.shape1.id == "floorDetector"){ if ((((_arg1.shape2.GetBody().type == BodyType.FLOOR)) || ((_arg1.shape2.GetBody().type == BodyType.BARRICADE)))){ _arg1.shape1.GetBody().touchedTheGround = true; }; }; }; }; } public function bulletLevelCollision(_arg1:b2ContactPoint, _arg2:b2Contact):void{ if ((((_arg1.shape1.GetBody().type == BodyType.PLAYER_BULLET)) || ((_arg1.shape1.GetBody().type == BodyType.ENEMY_BULLET)))){ if ((((_arg1.shape2.GetBody().type == BodyType.FLOOR)) || ((_arg1.shape2.GetBody().type == BodyType.WALL)))){ if (_arg1.shape1.GetBody().bulletType != BulletType.GRENADE){ _arg1.shape1.GetBody().touchedSolid = true; _arg1.shape1.GetBody().m_linearDamping = 10000; _arg1.shape1.GetBody().GetLinearVelocity().x = 0; _arg1.shape1.GetBody().GetLinearVelocity().y = 0; }; }; } else { if ((((_arg1.shape2.GetBody().type == BodyType.PLAYER_BULLET)) || ((_arg1.shape2.GetBody().type == BodyType.ENEMY_BULLET)))){ if ((((_arg1.shape1.GetBody().type == BodyType.FLOOR)) || ((_arg1.shape1.GetBody().type == BodyType.WALL)))){ if (_arg1.shape2.GetBody().bulletType != BulletType.GRENADE){ _arg1.shape2.GetBody().touchedSolid = true; _arg1.shape2.GetBody().m_linearDamping = 10000; _arg1.shape2.GetBody().GetLinearVelocity().x = 0; _arg1.shape2.GetBody().GetLinearVelocity().y = 0; }; }; }; }; } override public function Persist(_arg1:b2ContactPoint, _arg2:b2Contact):void{ characterBarricadesCollision(_arg1, _arg2); } public function characterItemPickUpsCollision(_arg1:b2ContactPoint, _arg2:b2Contact):void{ if (_arg1.shape1.GetBody().type == BodyType.PLAYER){ if (_arg1.shape2.GetBody().type == BodyType.ITEM_PICK_UP){ _arg1.shape2.GetBody().touchedChar = true; _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); }; } else { if (_arg1.shape2.GetBody().type == BodyType.PLAYER){ if (_arg1.shape1.GetBody().type == BodyType.ITEM_PICK_UP){ _arg1.shape1.GetBody().touchedChar = true; _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); }; }; }; if (_arg1.shape1.GetBody().type == BodyType.ENEMY){ if (_arg1.shape2.GetBody().type == BodyType.ITEM_PICK_UP){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); }; } else { if (_arg1.shape2.GetBody().type == BodyType.ENEMY){ if (_arg1.shape1.GetBody().type == BodyType.ITEM_PICK_UP){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); }; }; }; } public function characterBarricadesCollision2(_arg1:b2ContactPoint, _arg2:b2Contact):void{ if (_arg1.shape1.GetBody().type == BodyType.PLAYER){ if (_arg1.shape2.GetBody().type == BodyType.BARRICADE){ _arg1.shape1.GetBody().touchedBarricade = false; }; } else { if (_arg1.shape2.GetBody().type == BodyType.PLAYER){ if (_arg1.shape1.GetBody().type == BodyType.BARRICADE){ _arg1.shape2.GetBody().touchedBarricade = false; }; }; }; } public function charTouchTheGroundFalse(_arg1:b2ContactPoint, _arg2:b2Contact):void{ if ((((_arg1.shape2.GetBody().type == BodyType.PLAYER)) || ((_arg1.shape2.GetBody().type == BodyType.ENEMY)))){ if (_arg1.shape2.id == "floorDetector"){ _arg1.shape2.GetBody().touchedTheGround = false; }; } else { if ((((_arg1.shape1.GetBody().type == BodyType.PLAYER)) || ((_arg1.shape1.GetBody().type == BodyType.ENEMY)))){ if (_arg1.shape1.id == "floorDetector"){ _arg1.shape1.GetBody().touchedTheGround = false; }; }; }; } public function bulletShellMagsCollision(_arg1:b2ContactResult, _arg2:b2Contact):void{ if ((((_arg1.shape1.GetBody().type == BodyType.PLAYER_BULLET)) || ((_arg1.shape1.GetBody().type == BodyType.ENEMY_BULLET)))){ if ((((_arg1.shape2.GetBody().type == BodyType.MAGZ)) || ((_arg1.shape2.GetBody().type == BodyType.SHELL)))){ if (_arg1.shape1.GetBody().bulletType != BulletType.GRENADE){ _arg1.shape1.GetBody().touchedSolid = true; _arg1.shape1.GetBody().m_linearDamping = 10000; _arg1.shape1.GetBody().GetLinearVelocity().x = 0; _arg1.shape1.GetBody().GetLinearVelocity().y = 0; }; }; } else { if ((((_arg1.shape2.GetBody().type == BodyType.PLAYER_BULLET)) || ((_arg1.shape2.GetBody().type == BodyType.ENEMY_BULLET)))){ if ((((_arg1.shape1.GetBody().type == BodyType.MAGZ)) || ((_arg1.shape1.GetBody().type == BodyType.SHELL)))){ if (_arg1.shape2.GetBody().bulletType != BulletType.GRENADE){ _arg1.shape2.GetBody().touchedSolid = true; _arg1.shape2.GetBody().m_linearDamping = 10000; _arg1.shape2.GetBody().GetLinearVelocity().x = 0; _arg1.shape2.GetBody().GetLinearVelocity().y = 0; }; }; }; }; } override public function Result(_arg1:b2ContactResult, _arg2:b2Contact):void{ charTouchTheGroundTrue(_arg1, _arg2); grenadeBulletTouchTheGroundTrue(_arg1, _arg2); bulletShellMagsCollision(_arg1, _arg2); } public function grenadeBulletTouchTheGroundTrue(_arg1:b2ContactResult, _arg2:b2Contact):void{ if (_arg1.shape1.GetBody().bulletType == BulletType.GRENADE){ if (_arg1.shape2.GetBody().type == BodyType.FLOOR){ _arg1.shape1.GetBody().touchedTheGround = true; }; } else { (_arg1.shape2.GetBody().bulletType == BulletType.GRENADE); }; if (_arg1.shape1.GetBody().type == BodyType.FLOOR){ _arg1.shape2.GetBody().touchedTheGround = true; }; } public function characterBarricadesCollision(_arg1:b2ContactPoint, _arg2:b2Contact):void{ if (_arg1.shape1.GetBody().type == BodyType.PLAYER){ if (_arg1.shape2.GetBody().type == BodyType.BARRICADE){ if (!_arg1.shape2.GetBody().m_userData.active){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { _arg1.shape1.GetBody().touchedBarricade = true; if ((((_arg1.shape1.id == "head")) || ((_arg1.shape1.id == "body")))){ _arg1.shape1.GetBody().shouldJump = true; }; }; }; } else { if (_arg1.shape2.GetBody().type == BodyType.PLAYER){ if (_arg1.shape1.GetBody().type == BodyType.BARRICADE){ if (!_arg1.shape1.GetBody().m_userData.active){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { _arg1.shape2.GetBody().touchedBarricade = true; if ((((_arg1.shape2.id == "head")) || ((_arg1.shape2.id == "body")))){ _arg1.shape2.GetBody().shouldJump = true; }; }; }; }; }; if (_arg1.shape1.GetBody().type == BodyType.ENEMY){ if (_arg1.shape2.GetBody().type == BodyType.BARRICADE){ if (!_arg1.shape2.GetBody().m_userData.active){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { _arg1.shape1.GetBody().touchedBarricade = true; if (_arg1.shape1.GetBody().GetPosition().x > _arg1.shape2.GetBody().GetPosition().x){ _arg1.shape1.GetBody().faceRight = false; } else { _arg1.shape1.GetBody().faceRight = true; }; }; }; } else { if (_arg1.shape2.GetBody().type == BodyType.ENEMY){ if (_arg1.shape1.GetBody().type == BodyType.BARRICADE){ if (!_arg1.shape1.GetBody().m_userData.active){ _arg2.m_flags = (_arg2.m_flags | b2Contact.e_nonSolidFlag); } else { _arg1.shape2.GetBody().touchedBarricade = true; if (_arg1.shape2.GetBody().GetPosition().x > _arg1.shape1.GetBody().GetPosition().x){ _arg1.shape2.GetBody().faceRight = false; } else { _arg1.shape2.GetBody().faceRight = true; }; }; }; }; }; } } }//package p_util
Section 301
//DisplayObjectModifier (p_util.DisplayObjectModifier) package p_util { import flash.display.*; import flash.geom.*; import flash.utils.*; import flash.system.*; public class DisplayObjectModifier { public static function cloneDisplayObject(_arg1:DisplayObject):Bitmap{ var _local2:BitmapData; var _local3:Bitmap; _local2 = new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF); _local3 = new Bitmap(_local2); _local2.draw(_arg1); return (_local3); } public static function duplicateMovieClip(_arg1:MovieClip):MovieClip{ var _local2:*; var _local3:MovieClip; var _local4:String; var _local5:MovieClip; _local3 = _arg1; _local4 = getQualifiedClassName(_local3); _local2 = getDefinitionByName(_local4); _local5 = MovieClip(new (_local2)); _local5.width = _arg1.width; _local5.height = _arg1.height; return (_local5); } public static function duplicateDisplayObject(_arg1:DisplayObject, _arg2:Boolean=false):DisplayObject{ var _local3:Class; var _local4:DisplayObject; var _local5:Rectangle; _local3 = Object(_arg1).constructor; _local4 = (new (_local3) as DisplayObject); _local4.transform = _arg1.transform; _local4.filters = _arg1.filters; _local4.cacheAsBitmap = _arg1.cacheAsBitmap; _local4.opaqueBackground = _arg1.opaqueBackground; if (_arg1.scale9Grid){ _local5 = _arg1.scale9Grid; if (Capabilities.version.split(" ")[1] == "9,0,16,0"){ _local5.x = (_local5.x / 20); _local5.y = (_local5.y / 20); _local5.width = (_local5.width / 20); _local5.height = (_local5.height / 20); }; _local4.scale9Grid = _local5; }; if (((_arg2) && (_arg1.parent))){ _arg1.parent.addChild(_local4); }; return (_local4); } public static function duplicateMovieClip2(_arg1:MovieClip, _arg2:String):MovieClip{ var _local3:*; var _local4:MovieClip; var _local5:String; var _local6:MovieClip; _local4 = _arg1; _local5 = getQualifiedClassName(_local4[_arg2]); _local3 = getDefinitionByName(_local5); _local6 = MovieClip(new (_local3)); _local6.width = _arg1.width; _local6.height = _arg1.height; return (_local6); } } }//package p_util
Section 302
//FPSCounter (p_util.FPSCounter) package p_util { import flash.display.*; import flash.utils.*; import flash.text.*; import flash.system.*; public class FPSCounter extends Sprite { private var oldT:uint; private var mfpsCount:int;// = 0 private var avgCount:int;// = 30 private var avgCount2:int;// = 30 private var textBox:TextField; private var mfpsCount2:int;// = 0 private var textBox3:TextField; private var textBox2:TextField; public function FPSCounter(){ mfpsCount = 0; mfpsCount2 = 0; avgCount = 30; avgCount2 = 30; super(); textBox = new TextField(); textBox.text = "..."; textBox.x = 50; textBox.textColor = 0xFF0000; textBox.selectable = false; textBox2 = new TextField(); textBox2.text = "..."; textBox2.x = 50; textBox2.width = 150; textBox2.textColor = 0xFF0000; textBox2.selectable = false; textBox2.y = 15; textBox3 = new TextField(); textBox3.text = "..."; textBox3.x = 50; textBox3.textColor = 0xFF0000; textBox3.selectable = false; textBox3.y = 30; oldT = getTimer(); addChild(textBox); addChild(textBox2); addChild(textBox3); } public function updateEnd():void{ } public function updatePhys(_arg1:uint):void{ var _local2:uint; var _local3:uint; _local2 = getTimer(); _local3 = (_local2 - _arg1); mfpsCount2 = (mfpsCount2 + _local3); if (avgCount2 < 1){ textBox2.text = String((((("Physics step: " + Math.round((mfpsCount2 / 30))) + " ms (") + Math.round((1000 / (mfpsCount2 / 30)))) + " fps)")); avgCount2 = 30; mfpsCount2 = 0; }; avgCount2--; } public function update():void{ var _local1:uint; var _local2:uint; _local1 = getTimer(); _local2 = (_local1 - oldT); mfpsCount = (mfpsCount + _local2); if (avgCount < 1){ textBox.text = String((Math.round((1000 / (mfpsCount / 30))) + " fps average")); avgCount = 30; mfpsCount = 0; }; updatePhys(oldT); avgCount--; oldT = getTimer(); textBox3.text = (Math.round((System.totalMemory / (0x0400 * 0x0400))) + " MB used"); } } }//package p_util
Section 303
//PixelCollision (p_util.PixelCollision) package p_util { import flash.display.*; import flash.geom.*; public class PixelCollision { public static function getCollisionRect(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Rectangle{ var _local6:Rectangle; var _local7:Rectangle; var _local8:Rectangle; var _local9:BitmapData; var _local10:BitmapData; var _local11:uint; var _local12:Rectangle; var _local13:int; _local6 = _arg1.getBounds(_arg3); _local7 = _arg2.getBounds(_arg3); _local8 = _local6.intersection(_local7); if (_local8.size.length > 0){ if (_arg4){ _local8.width = Math.ceil(_local8.width); _local8.height = Math.ceil(_local8.height); _local9 = getAlphaMap(_arg1, _local8, BitmapDataChannel.RED, _arg3); _local10 = getAlphaMap(_arg2, _local8, BitmapDataChannel.GREEN, _arg3); _local9.draw(_local10, null, null, BlendMode.LIGHTEN); if (_arg5 <= 0){ _local11 = 65792; } else { if (_arg5 > 1){ _arg5 = 1; }; _local13 = Math.round((_arg5 * 0xFF)); _local11 = (((_local13 << 16) | (_local13 << 8)) | 0); }; _local12 = _local9.getColorBoundsRect(_local11, _local11); _local9.getColorBoundsRect(_local11, _local11).x = (_local12.x + _local8.x); _local12.y = (_local12.y + _local8.y); return (_local12); } else { return (_local8); }; //unresolved jump }; return (null); } public static function isColliding(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Boolean{ var _local6:Rectangle; _local6 = getCollisionRect(_arg1, _arg2, _arg3, _arg4, _arg5); if (((!((_local6 == null))) && ((_local6.size.length > 0)))){ return (true); }; return (false); } public static function getCollisionPoint(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Point{ var _local6:Rectangle; var _local7:Number; var _local8:Number; _local6 = getCollisionRect(_arg1, _arg2, _arg3, _arg4, _arg5); if (((!((_local6 == null))) && ((_local6.size.length > 0)))){ _local7 = ((_local6.left + _local6.right) / 2); _local8 = ((_local6.top + _local6.bottom) / 2); return (new Point(_local7, _local8)); }; return (null); } private static function getAlphaMap(_arg1:DisplayObject, _arg2:Rectangle, _arg3:uint, _arg4:DisplayObjectContainer):BitmapData{ var _local5:Matrix; var _local6:Matrix; var _local7:BitmapData; var _local8:BitmapData; _local5 = _arg4.transform.concatenatedMatrix.clone(); _local5.invert(); _local6 = _arg1.transform.concatenatedMatrix.clone(); _local6.concat(_local5); _local6.translate(-(_arg2.x), -(_arg2.y)); _local7 = new BitmapData(_arg2.width, _arg2.height, true, 0); _local7.draw(_arg1, _local6); _local8 = new BitmapData(_arg2.width, _arg2.height, false, 0); _local8.copyChannel(_local7, _local7.rect, new Point(0, 0), BitmapDataChannel.ALPHA, _arg3); return (_local8); } } }//package p_util
Section 304
//AK (p_weapon.AK) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class AK extends RangeWeapon { public function AK(){ id = "AK47"; image = new armAKF(); image2 = new armAKB(); logo = new weaponAKLogo(); ammo = 30; maxAmmo = 30; delay = 200; speed = 10; reloadTime = 800; angle = 0; damage = 100; accuracy = 82; reloadFrame = 31; initialReloadFrame = 4; price = 4300; initTimer(); ammoType = new Ammo762(0); attackSound = new attackSoundAK(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsAK(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 305
//BarretM82 (p_weapon.BarretM82) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class BarretM82 extends RangeWeapon { public function BarretM82(){ id = "Barret M82"; image = new armBarretM82F(); image2 = new armBarretM82B(); logo = new weaponBarretM82Logo(); ammo = 10; maxAmmo = 10; delay = 1100; speed = 10; reloadTime = 1000; angle = 0; damage = 500; accuracy = 100; reloadFrame = 29; initialReloadFrame = 11; price = 20000; initTimer(); ammoType = new Ammo50Cal(0); attackSound = new attackSoundBarret(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagBarret(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ var _local2:Number; var _local3:Number; var _local4:Point; var _local5:b2Vec2; var _local6:Number; if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new BarretBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; if (ammo <= 0){ reload(); } else { if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ soundChannel = attackSound.play(0, 0, soundTransform); }; ableToShoot = false; delayTimer.start(); ammo--; bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = ((Math.random() * (deviation - accuracy)) / deviation); _local3 = ((((Math.floor((Math.random() * 10)) + 1) % 2) == 0)) ? -1 : 1; bullet.direction.y = (bullet.direction.y + (_local2 * _local3)); _local4 = new Point(image.bulletOut.x, image.bulletOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); bullet.position.x = (_local5.x + _local4.x); bullet.position.y = (_local5.y + _local4.y); bullet.screenPosition.x = _local4.x; bullet.screenPosition.y = _local4.y; _local6 = b2Vec2.vectorToRotation(direction, bullet.direction); if ((((((bullet.direction.x > 0)) && ((bullet.direction.y < 0)))) || ((((bullet.direction.x < 0)) && ((bullet.direction.y > 0)))))){ _local6 = (_local6 * -1); }; if (isNaN(_local6)){ _local6 = 0; }; bullet.angle = (angle + _local6); bullet.damage = damage; if (_arg1){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); shell = new MinigunShell(); shell.speed = (speed / 100); shell.position = position.Copy(); shell.screenPosition = screenPosition.Copy(); shell.direction = bullet.direction.Negative(); _local4 = new Point(image.shellOut.x, image.shellOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); shell.position.x = (_local5.x + _local4.x); shell.position.y = (_local5.y + _local4.y); shell.screenPosition.x = _local4.x; shell.screenPosition.y = _local4.y; shell.angle = angle; shell.damage = damage; shell.initRigidBody(); shell.away(); if (World.getSingleton().shells.size() > shellLimit){ World.getSingleton().shells.get(0).lifeTime = 0; World.getSingleton().shells.get(0).die(); }; World.getSingleton().shells.add(shell); }; }; } } }//package p_weapon
Section 306
//BaseBallBat (p_weapon.BaseBallBat) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class BaseBallBat extends MeleeWeapon { public function BaseBallBat(){ id = "Bat"; image = new armBaseballBatF(); image2 = new armBaseballBatB(); logo = new weaponBaseballBatLogo(); attackTime = 300; initialAttackFrame = 2; attackFrame = 11; delay = 15; damage = 40; angle = 0; bulletOutCounter = 6; bulletIsOut = false; price = 200; initTimer(); attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new KnifeBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } } }//package p_weapon
Section 307
//Beretta (p_weapon.Beretta) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class Beretta extends RangeWeapon { public function Beretta(){ id = "Beretta M9"; image = new armBerettaF(); image2 = new armPistolB(); logo = new weaponBerettaLogo(); ammo = 15; maxAmmo = 15; delay = 275; speed = 10; reloadTime = 600; angle = 0; damage = 25; accuracy = 85; reloadFrame = 32; initialReloadFrame = 7; initTimer(); ammoType = new Ammo9mm(0); price = 500; attackSound = new attackSoundUSP(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsWaltherP99(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 308
//ChainSaw (p_weapon.ChainSaw) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import flash.media.*; import p_bullet.*; public class ChainSaw extends MeleeWeapon { public var playOnce:Boolean;// = false public var soundChannel:SoundChannel; public function ChainSaw(){ playOnce = false; super(); id = "Chain Saw"; image = new armChainSawF(); image2 = new armChainSawB(); logo = new weaponChainSawLogo(); attackTime = 1; initialAttackFrame = 2; attackFrame = 2; delay = 5; damage = 10; angle = 0; bulletOutCounter = 1; bulletIsOut = false; price = 5000; initTimer(); attackSound = new chainSawSound(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; image.gotoAndStop((initialAttackFrame + attackCounter)); image2.gotoAndStop((initialAttackFrame + attackCounter)); attackCounter++; if (attackCounter > attackFrame){ attackCounter = 0; bulletIsOut = false; attackTimer.stop(); ableToSlice = true; attacking = false; delayTimer.start(); }; if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new ChainSawBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } override public function attack(_arg1:Boolean):void{ isAPlayer = _arg1; if (((ableToSlice) && (!(attacking)))){ attacking = true; ableToSlice = false; attackTimer.start(); if (!World.getSingleton().muted){ if (soundChannel){ if (soundChannel.position >= 603){ soundChannel = attackSound.play(); //unresolved jump }; } else { soundChannel = attackSound.play(); }; }; }; } } }//package p_weapon
Section 309
//Deagle (p_weapon.Deagle) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class Deagle extends RangeWeapon { public function Deagle(){ id = "Desert Eagle"; image = new armDeagleF(); image2 = new armPistolB(); logo = new weaponDeagleLogo(); ammo = 7; maxAmmo = 7; delay = 600; speed = 10; reloadTime = 600; angle = 0; damage = 100; accuracy = 90; reloadFrame = 32; initialReloadFrame = 7; initTimer(); ammoType = new Ammo357(0); price = 750; attackSound = new attackSoundDeagle(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsWaltherP99(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 310
//Dynamite (p_weapon.Dynamite) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Dynamite extends ExplosiveWeapon { public function Dynamite(){ id = "Dynamite"; image = new armDynamiteF(); image2 = new armGrenadeB(); logo = new weaponDynamiteLogo(); ammo = 0; reloadAmmo = 0; maxAmmo = 1; delay = 400; speed = 13; reloadTime = 500; angle = 0; damage = 3000; reloadFrame = 10; initialReloadFrame = 17; radius = 300; throwTime = 200; initialThrowFrame = 2; throwFrame = 14; bulletOutCounter = 10; bulletIsOut = false; price = 750; initTimer(); checkWhichIdle(); } override protected function animateThrow(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; image.gotoAndStop((initialThrowFrame + throwCounter)); image2.gotoAndStop((initialThrowFrame + throwCounter)); throwCounter++; if (throwCounter > throwFrame){ throwCounter = 0; bulletIsOut = false; throwTimer.stop(); throwing = false; checkWhichIdle(); delayTimer.start(); reload(); }; if ((((throwCounter > bulletOutCounter)) && (!(bulletIsOut)))){ ammo--; bulletIsOut = true; bullet = new DynamiteBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); bullet.radius = radius; _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } } }//package p_weapon
Section 311
//ExplosiveWeapon (p_weapon.ExplosiveWeapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import flash.utils.*; import p_bullet.*; public class ExplosiveWeapon extends Weapon { public var bullet:Bullet; public var reloadTime:Number; public var reloadAmmo:int; public var isAPlayer:Boolean; public var reloadCounter:int; public var throwFrame:int; public var reloadTimer:Timer; public var shell:Shell; public var throwing:Boolean; public var throwCounter:int; public var speed:Number; public var reloadFrame:int; public var maxAmmo:int; public var shellLimit:int; public var initialReloadFrame:int; public var ableToThrow:Boolean; public var bulletOutCounter:int; public var mags:Mags; public var delayTimer:Timer; public var delay:Number; public var initialThrowFrame:int; public var deviation:int; public var radius:Number; public var reloading:Boolean; public var ammo:int; public var throwTime:Number; public var bulletIsOut:Boolean; public var accuracy:int; public var throwTimer:Timer; public function ExplosiveWeapon(){ weaponType = WeaponType.EXPLOSIVE; ableToThrow = true; reloadCounter = 0; reloading = false; direction = new b2Vec2(); deviation = 20; shellLimit = 20; } public function setThrowSpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (throwTimer.running){ _local2 = true; throwTimer.stop(); }; throwTimer.removeEventListener(TimerEvent.TIMER, animateThrow); this.throwTime = _arg1; throwTimer = new Timer((_arg1 / throwFrame)); throwTimer.addEventListener(TimerEvent.TIMER, animateThrow); if (_local2){ throwTimer.start(); }; } override public function initTimer():void{ delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToThrow); reloadTimer = new Timer((reloadTime / reloadFrame)); reloadTimer.addEventListener(TimerEvent.TIMER, reloadNow); throwTimer = new Timer((throwTime / throwFrame)); throwTimer.addEventListener(TimerEvent.TIMER, animateThrow); } public function attack(_arg1:Boolean):void{ if (ammo <= 0){ reload(); } else { if (((((ableToThrow) && ((ammo > 0)))) && (!(reloading)))){ this.isAPlayer = _arg1; if (((ableToThrow) && (!(throwing)))){ throwing = true; ableToThrow = false; throwTimer.start(); }; }; }; } public function checkWhichIdle():void{ if ((((ammo <= 0)) && ((reloadAmmo <= 0)))){ image.gotoAndStop("idle2"); image2.gotoAndStop("idle2"); } else { image.gotoAndStop("idle"); image2.gotoAndStop("idle"); }; } public function setReloadSpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (reloadTimer.running){ _local2 = true; reloadTimer.stop(); }; reloadTimer.removeEventListener(TimerEvent.TIMER, reloadNow); this.reloadTime = _arg1; reloadTimer = new Timer((_arg1 / reloadFrame)); reloadTimer.addEventListener(TimerEvent.TIMER, reloadNow); if (_local2){ reloadTimer.start(); }; } protected function reloadNow(_arg1:TimerEvent):void{ var _local2:int; image.gotoAndStop((initialReloadFrame + reloadCounter)); image2.gotoAndStop((initialReloadFrame + reloadCounter)); reloadCounter++; if (reloadCounter > reloadFrame){ reloadCounter = 0; reloadTimer.stop(); if (reloadAmmo > 0){ _local2 = (maxAmmo - ammo); if (reloadAmmo > _local2){ reloadAmmo = (reloadAmmo - _local2); ammo = (ammo + _local2); } else { ammo = (ammo + reloadAmmo); reloadAmmo = 0; }; }; reloading = false; }; } protected function animateThrow(_arg1:TimerEvent):void{ image.gotoAndStop((initialThrowFrame + throwCounter)); image2.gotoAndStop((initialThrowFrame + throwCounter)); throwCounter++; if (throwCounter > throwFrame){ throwCounter = 0; bulletIsOut = false; throwTimer.stop(); throwing = false; image.gotoAndStop("idle"); image2.gotoAndStop("idle"); delayTimer.start(); }; } public function setDelaySpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (delayTimer.running){ _local2 = true; delayTimer.stop(); }; delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToThrow); delay = _arg1; delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToThrow); if (_local2){ delayTimer.start(); }; } public function reload():void{ if ((((((ammo < maxAmmo)) && ((reloadAmmo > 0)))) && (!(reloading)))){ reloading = true; reloadTimer.start(); }; } public function setAbleToThrow(_arg1:TimerEvent):void{ ableToThrow = true; delayTimer.stop(); } override public function update():void{ super.update(); } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToThrow); reloadTimer.removeEventListener(TimerEvent.TIMER, reloadNow); throwTimer.removeEventListener(TimerEvent.TIMER, animateThrow); delayTimer.stop(); reloadTimer.stop(); throwTimer.stop(); ableToThrow = true; reloading = false; throwing = false; throwCounter = 0; image.gotoAndStop("idle"); image2.gotoAndStop("idle"); } } }//package p_weapon
Section 312
//Grenade (p_weapon.Grenade) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Grenade extends ExplosiveWeapon { public function Grenade(){ id = "Grenade"; image = new armGrenadeF(); image2 = new armGrenadeB(); logo = new weaponGrenadeLogo(); ammo = 0; reloadAmmo = 0; maxAmmo = 1; delay = 400; speed = 3; reloadTime = 500; angle = 0; damage = 1500; reloadFrame = 10; initialReloadFrame = 17; radius = 150; throwTime = 200; initialThrowFrame = 2; throwFrame = 14; bulletOutCounter = 10; bulletIsOut = false; price = 500; initTimer(); checkWhichIdle(); } override protected function animateThrow(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; image.gotoAndStop((initialThrowFrame + throwCounter)); image2.gotoAndStop((initialThrowFrame + throwCounter)); throwCounter++; if (throwCounter > throwFrame){ throwCounter = 0; bulletIsOut = false; throwTimer.stop(); throwing = false; checkWhichIdle(); delayTimer.start(); reload(); }; if ((((throwCounter > bulletOutCounter)) && (!(bulletIsOut)))){ ammo--; bulletIsOut = true; bullet = new GrenadeBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); bullet.radius = radius; _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); shell = new GrenadeSafety(); shell.speed = (speed / 100); shell.position = position.Copy(); shell.screenPosition = screenPosition.Copy(); shell.direction = bullet.direction.Negative(); _local2 = new Point(image.shellOut.x, image.shellOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); shell.position.x = (_local3.x + _local2.x); shell.position.y = (_local3.y + _local2.y); shell.screenPosition.x = _local2.x; shell.screenPosition.y = _local2.y; shell.angle = angle; shell.damage = damage; shell.initRigidBody(); shell.away(); if (World.getSingleton().shells.size() > shellLimit){ World.getSingleton().shells.get(0).lifeTime = 0; World.getSingleton().shells.get(0).die(); }; World.getSingleton().shells.add(shell); }; } } }//package p_weapon
Section 313
//GrenadeLauncher (p_weapon.GrenadeLauncher) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class GrenadeLauncher extends RangeWeapon { public var radius:int; public var reloadMode:Boolean; public function GrenadeLauncher(){ id = "GL M32"; image = new armGLM32F(); image2 = new armGLM32B(); logo = new weaponGLM32Logo(); ammo = 6; maxAmmo = 6; delay = 1500; speed = 5; reloadTime = 200; angle = 0; damage = 800; accuracy = 100; radius = 200; reloadFrame = 29; initialReloadFrame = 11; price = 15000; initTimer(); ammoType = new AmmoHE(0); attackSound = new attackSoundM4(); } override public function reload():void{ if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ reloading = true; reloadMode = true; ableToShoot = false; reloadTimer.start(); } else { if ((((ammo >= maxAmmo)) || ((ammoType.amount <= 0)))){ reloadMode = false; }; }; } override protected function reloadNow(_arg1:TimerEvent):void{ var _local2:int; image.gotoAndStop((initialReloadFrame + reloadCounter)); image2.gotoAndStop((initialReloadFrame + reloadCounter)); reloadCounter++; if (reloadCounter > reloadFrame){ reloadCounter = 0; reloadTimer.stop(); if (ammoType.amount > 0){ _local2 = 1; if (ammoType.amount > _local2){ ammoType.amount = (ammoType.amount - _local2); ammo = (ammo + _local2); } else { ammo = (ammo + ammoType.amount); ammoType.amount = 0; }; }; reloading = false; delayTimer.start(); if (ammo >= maxAmmo){ reloadMode = false; }; if (!World.getSingleton().muted){ clipInSound.play(); }; }; } override public function attack(_arg1:Boolean):void{ var _local2:Number; var _local3:Number; var _local4:Point; var _local5:b2Vec2; var _local6:Number; if (((reloadMode) && ((ammo > 0)))){ reloadMode = false; reloadCounter = 0; reloadTimer.stop(); reloading = false; }; if (((!(ableToShoot)) && ((ammo > 0)))){ delayTimer.start(); }; if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new GlBullet(); bullet.radius = radius; image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; if (ammo <= 0){ reload(); } else { if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ soundChannel = attackSound.play(0, 0, soundTransform); }; ableToShoot = false; delayTimer.start(); ammo--; bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = ((Math.random() * (deviation - accuracy)) / deviation); _local3 = ((((Math.floor((Math.random() * 10)) + 1) % 2) == 0)) ? -1 : 1; bullet.direction.y = (bullet.direction.y + (_local2 * _local3)); _local4 = new Point(image.bulletOut.x, image.bulletOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); bullet.position.x = (_local5.x + _local4.x); bullet.position.y = (_local5.y + _local4.y); bullet.screenPosition.x = _local4.x; bullet.screenPosition.y = _local4.y; _local6 = b2Vec2.vectorToRotation(direction, bullet.direction); if ((((((bullet.direction.x > 0)) && ((bullet.direction.y < 0)))) || ((((bullet.direction.x < 0)) && ((bullet.direction.y > 0)))))){ _local6 = (_local6 * -1); }; if (isNaN(_local6)){ _local6 = 0; }; bullet.angle = (angle + _local6); bullet.damage = damage; if (_arg1){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; }; } override public function update():void{ super.update(); if (reloadMode){ reload(); }; } } }//package p_weapon
Section 314
//Katana (p_weapon.Katana) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Katana extends MeleeWeapon { public function Katana(){ id = "Katana"; image = new armKatanaF(); image2 = new armKatanaB(); logo = new weaponKatanaLogo(); attackTime = 300; initialAttackFrame = 2; attackFrame = 11; delay = 10; damage = 60; angle = 0; bulletOutCounter = 6; bulletIsOut = false; price = 1500; initTimer(); attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new ChainSawBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } } }//package p_weapon
Section 315
//Knife (p_weapon.Knife) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Knife extends MeleeWeapon { public function Knife(){ id = "Knife"; image = new armKnifeF(); image2 = new armKnifeB(); logo = new weaponKnifeLogo(); attackTime = 200; initialAttackFrame = 2; attackFrame = 6; delay = 10; damage = 25; angle = 0; bulletOutCounter = 3; bulletIsOut = false; price = 25; initTimer(); attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new KnifeBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } } }//package p_weapon
Section 316
//M14 (p_weapon.M14) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class M14 extends RangeWeapon { public function M14(){ id = "M14"; image = new armM14F(); image2 = new armM4B(); logo = new weaponM14Logo(); ammo = 20; maxAmmo = 20; delay = 500; speed = 10; reloadTime = 900; angle = 0; damage = 200; accuracy = 100; reloadFrame = 31; initialReloadFrame = 4; price = 7000; initTimer(); ammoType = new Ammo762(0); attackSound = new attackSoundM4(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsM4(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 317
//M1911 (p_weapon.M1911) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class M1911 extends RangeWeapon { public function M1911(){ id = "M1911"; image = new armM1911F(); image2 = new armPistolB(); logo = new weaponM1911Logo(); ammo = 8; maxAmmo = 8; delay = 350; speed = 10; reloadTime = 750; angle = 0; damage = 45; accuracy = 90; reloadFrame = 32; initialReloadFrame = 7; initTimer(); ammoType = new Ammo45(0); price = 650; attackSound = new attackSoundDeagle(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsWaltherP99(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 318
//M4 (p_weapon.M4) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class M4 extends RangeWeapon { public function M4(){ id = "M4"; image = new armM4F(); image2 = new armM4B(); logo = new weaponM4Logo(); ammo = 30; maxAmmo = 30; delay = 175; speed = 10; reloadTime = 650; angle = 0; damage = 75; accuracy = 98; reloadFrame = 31; initialReloadFrame = 4; price = 5000; initTimer(); ammoType = new Ammo556(0); attackSound = new attackSoundM4(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsM4(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 319
//MeleeWeapon (p_weapon.MeleeWeapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.media.*; import flash.utils.*; import p_bullet.*; public class MeleeWeapon extends Weapon { public var bullet:Bullet; public var delay:Number; public var attackFrame:int; public var delayTimer:Timer; public var attackCounter:int; public var isAPlayer:Boolean; public var attacking:Boolean; public var ableToSlice:Boolean; public var initialAttackFrame:int; public var attackSound:Sound; public var attackTime:Number; public var speed:Number; public var attackTimer:Timer; public var bulletIsOut:Boolean; public var bulletOutCounter:int; public function MeleeWeapon(){ weaponType = WeaponType.MELEE; speed = 20; ableToSlice = true; attackCounter = 0; attacking = false; attackTime = 500; direction = new b2Vec2(); isAPlayer = true; } public function setDelaySpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (delayTimer.running){ _local2 = true; delayTimer.stop(); }; delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); delay = _arg1; delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToSlice); if (_local2){ delayTimer.start(); }; } protected function animateAttack(_arg1:TimerEvent):void{ image.gotoAndStop((initialAttackFrame + attackCounter)); image2.gotoAndStop((initialAttackFrame + attackCounter)); attackCounter++; if (attackCounter > attackFrame){ attackCounter = 0; bulletIsOut = false; attackTimer.stop(); ableToSlice = true; attacking = false; image.gotoAndStop("idle"); image2.gotoAndStop("idle"); delayTimer.start(); }; } override public function initTimer():void{ delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer = new Timer((attackTime / attackFrame)); attackTimer.addEventListener(TimerEvent.TIMER, animateAttack); } public function setAttackSpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (attackTimer.running){ _local2 = true; attackTimer.stop(); }; attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); this.attackTime = _arg1; attackTimer = new Timer((_arg1 / attackFrame)); attackTimer.addEventListener(TimerEvent.TIMER, animateAttack); if (_local2){ attackTimer.start(); }; } public function attack(_arg1:Boolean):void{ isAPlayer = _arg1; if (((ableToSlice) && (!(attacking)))){ attacking = true; ableToSlice = false; attackTimer.start(); if (!World.getSingleton().muted){ attackSound.play(0, 0, soundTransform); }; }; } override public function update():void{ super.update(); } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); delayTimer.stop(); attackTimer.stop(); image.gotoAndStop("idle"); image2.gotoAndStop("idle"); bulletIsOut = false; ableToSlice = true; attacking = false; attackCounter = 0; } public function setAbleToSlice(_arg1:TimerEvent):void{ ableToSlice = true; delayTimer.stop(); } } }//package p_weapon
Section 320
//Minigun (p_weapon.Minigun) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import flash.media.*; import flash.utils.*; import p_ammo.*; import p_bullet.*; public class Minigun extends RangeWeapon { public var warmUpTimer:Timer; public var warmDownTimeCounter:int; public var warmDownCounter:int; public var warmUpFrame:int; public var warmUpTimeCounter:int; public var doneWarmingUp:Boolean; public var initialWarmUpFrame:int; public var warmDownSound:Sound; public var warmDownTimer:Timer; public var warmingUp:Boolean; public var warmUpCounter:int; public var warmUpTime:int; public var warmUpSound:Sound; public function Minigun(){ id = "Minigun"; image = new armMinigunF(); image2 = new armMinigunB(); logo = new weaponMinigunLogo(); ammo = 200; maxAmmo = 200; delay = 50; speed = 10; reloadTime = 2000; angle = 0; damage = 75; accuracy = 85; reloadFrame = 31; initialReloadFrame = 4; price = 15000; initTimer(); ammoType = new Ammo762(0); attackSound = new attackSoundSteyrUMP(); warmUpFrame = 4; initialWarmUpFrame = 36; warmUpCounter = 0; warmUpTime = 2; warmUpTimeCounter = 0; warmingUp = false; doneWarmingUp = false; warmDownCounter = 0; warmDownTimeCounter = 0; warmUpSound = new spinUp(); warmDownSound = new spinDown(); } override public function initTimer():void{ super.initTimer(); warmUpTimer = new Timer(100); warmUpTimer.addEventListener(TimerEvent.TIMER, warmUpNow); warmDownTimer = new Timer(100); warmDownTimer.addEventListener(TimerEvent.TIMER, warmDownNow); } public function warmUp():void{ if (!warmUpTimer.running){ if (!World.getSingleton().muted){ warmUpSound.play(); }; warmUpTimer.start(); }; } override public function attack(_arg1:Boolean):void{ var _local2:Number; var _local3:Number; var _local4:Point; var _local5:b2Vec2; var _local6:Number; if (((((((ableToShoot) && ((ammo > 0)))) && (!(doneWarmingUp)))) && (!(reloading)))){ warmUp(); warmingUp = true; warmDownCounter = 0; warmDownTimeCounter = 0; warmDownTimer.stop(); }; if (((((((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))) && (doneWarmingUp))) && (!(warmingUp)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; if (ammo <= 0){ reload(); } else { if (((((((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))) && (doneWarmingUp))) && (!(warmingUp)))){ if (!World.getSingleton().muted){ soundChannel = attackSound.play(0, 0, soundTransform); }; ableToShoot = false; delayTimer.start(); ammo--; bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = ((Math.random() * (deviation - accuracy)) / deviation); _local3 = ((((Math.floor((Math.random() * 10)) + 1) % 2) == 0)) ? -1 : 1; bullet.direction.y = (bullet.direction.y + (_local2 * _local3)); _local4 = new Point(image.bulletOut.x, image.bulletOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); bullet.position.x = (_local5.x + _local4.x); bullet.position.y = (_local5.y + _local4.y); bullet.screenPosition.x = _local4.x; bullet.screenPosition.y = _local4.y; _local6 = b2Vec2.vectorToRotation(direction, bullet.direction); if ((((((bullet.direction.x > 0)) && ((bullet.direction.y < 0)))) || ((((bullet.direction.x < 0)) && ((bullet.direction.y > 0)))))){ _local6 = (_local6 * -1); }; if (isNaN(_local6)){ _local6 = 0; }; bullet.angle = (angle + _local6); bullet.damage = damage; if (_arg1){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); shell = new MinigunShell(); shell.speed = (speed / 100); shell.position = position.Copy(); shell.screenPosition = screenPosition.Copy(); shell.direction = bullet.direction.Negative(); _local4 = new Point(image.shellOut.x, image.shellOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); shell.position.x = (_local5.x + _local4.x); shell.position.y = (_local5.y + _local4.y); shell.screenPosition.x = _local4.x; shell.screenPosition.y = _local4.y; shell.angle = angle; shell.damage = damage; shell.initRigidBody(); shell.away(); if (World.getSingleton().shells.size() > shellLimit){ World.getSingleton().shells.get(0).lifeTime = 0; World.getSingleton().shells.get(0).die(); }; World.getSingleton().shells.add(shell); }; }; } public function warmDownNow(_arg1:TimerEvent):void{ image.gotoAndStop((initialWarmUpFrame + warmDownCounter)); image2.gotoAndStop((initialWarmUpFrame + warmDownCounter)); warmDownCounter++; if (warmDownTimeCounter >= warmUpTime){ warmDownTimer.stop(); }; if (warmDownCounter > warmUpFrame){ warmDownTimeCounter = 0; warmDownTimeCounter++; }; } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ warmDownCounter = 0; warmDownTimeCounter = 0; warmDownTimer.stop(); warmUpTimer.stop(); warmUpTimeCounter = 0; warmUpCounter = 0; warmingUp = false; doneWarmingUp = false; if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsMinigun(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } public function warmUpNow(_arg1:TimerEvent):void{ image.gotoAndStop((initialWarmUpFrame + warmUpCounter)); image2.gotoAndStop((initialWarmUpFrame + warmUpCounter)); warmUpCounter++; if (warmUpTimeCounter >= warmUpTime){ warmUpTimeCounter = 0; warmUpCounter = 0; warmingUp = false; doneWarmingUp = true; warmUpTimer.stop(); }; if (warmUpCounter > warmUpFrame){ warmUpCounter = 0; warmUpTimeCounter++; }; } public function warmDown():void{ if (!warmDownTimer.running){ if (!World.getSingleton().muted){ warmDownSound.play(); }; warmDownTimer.start(); }; } override public function timerOff():void{ super.timerOff(); warmUpTimer.stop(); warmUpTimeCounter = 0; warmUpCounter = 0; warmingUp = false; doneWarmingUp = false; warmUpTimer.removeEventListener(TimerEvent.TIMER, warmUpNow); warmDownTimer.removeEventListener(TimerEvent.TIMER, warmDownNow); warmDownCounter = 0; warmDownTimeCounter = 0; } } }//package p_weapon
Section 321
//MPU (p_weapon.MPU) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class MPU extends RangeWeapon { public function MPU(){ id = "MPU"; image = new armMPUF(); image2 = new armMPUB(); logo = new weaponMPULogo(); ammo = 25; maxAmmo = 25; delay = 200; speed = 10; reloadTime = 650; angle = 0; damage = 45; accuracy = 85; reloadFrame = 31; initialReloadFrame = 5; price = 2500; initTimer(); ammoType = new Ammo45(0); attackSound = new attackSoundSteyrUMP(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsUMP(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 322
//RangeWeapon (p_weapon.RangeWeapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import flash.media.*; import flash.utils.*; import p_ammo.*; import p_bullet.*; public class RangeWeapon extends Weapon { public var mags:Mags; public var bullet:Bullet; public var delay:Number; public var delayTimer:Timer; public var reloadTime:Number; public var deviation:int; public var reloadCounter:int; public var attackSound:Sound; public var ableToShoot:Boolean; public var reloadTimer:Timer; public var ammoType:Ammo; public var reloading:Boolean; public var shell:Shell; public var speed:Number; public var ammo:int; public var clipOutSound:Sound; public var maxAmmo:int; public var reloadFrame:int; public var shellLimit:int; public var initialReloadFrame:int; public var accuracy:int; public var clipInSound:Sound; public var soundChannel:SoundChannel; public function RangeWeapon(){ weaponType = WeaponType.RANGE; ableToShoot = true; reloadCounter = 0; reloading = false; direction = new b2Vec2(); deviation = 100; shellLimit = 15; clipInSound = new ClipIn(); clipOutSound = new ClipOut(); attackSound = new AttackSound(); } public function setAbleToShoot(_arg1:TimerEvent):void{ ableToShoot = true; delayTimer.stop(); } override public function initTimer():void{ delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToShoot); reloadTimer = new Timer((reloadTime / reloadFrame)); reloadTimer.addEventListener(TimerEvent.TIMER, reloadNow); } public function reload():void{ if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ reloading = true; ableToShoot = false; reloadTimer.start(); }; } public function attack(_arg1:Boolean):void{ var _local2:Number; var _local3:Number; var _local4:Point; var _local5:b2Vec2; var _local6:Number; if (ammo <= 0){ reload(); } else { if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ soundChannel = attackSound.play(0, 0, soundTransform); }; ableToShoot = false; delayTimer.start(); ammo--; bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = ((Math.random() * (deviation - accuracy)) / deviation); _local3 = ((((Math.floor((Math.random() * 10)) + 1) % 2) == 0)) ? -1 : 1; bullet.direction.y = (bullet.direction.y + (_local2 * _local3)); _local4 = new Point(image.bulletOut.x, image.bulletOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); bullet.position.x = (_local5.x + _local4.x); bullet.position.y = (_local5.y + _local4.y); bullet.screenPosition.x = _local4.x; bullet.screenPosition.y = _local4.y; _local6 = b2Vec2.vectorToRotation(direction, bullet.direction); if ((((((bullet.direction.x > 0)) && ((bullet.direction.y < 0)))) || ((((bullet.direction.x < 0)) && ((bullet.direction.y > 0)))))){ _local6 = (_local6 * -1); }; if (isNaN(_local6)){ _local6 = 0; }; bullet.angle = (angle + _local6); bullet.damage = damage; if (_arg1){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); shell = new HandGunShell(); shell.speed = (speed / 100); shell.position = position.Copy(); shell.screenPosition = screenPosition.Copy(); shell.direction = bullet.direction.Negative(); _local4 = new Point(image.shellOut.x, image.shellOut.y); _local4 = image.localToGlobal(_local4); _local5 = position.Copy(); _local5.Subtract(screenPosition); shell.position.x = (_local5.x + _local4.x); shell.position.y = (_local5.y + _local4.y); shell.screenPosition.x = _local4.x; shell.screenPosition.y = _local4.y; shell.angle = angle; shell.damage = damage; shell.initRigidBody(); shell.away(); if (World.getSingleton().shells.size() > shellLimit){ World.getSingleton().shells.get(0).lifeTime = 0; World.getSingleton().shells.get(0).die(); }; World.getSingleton().shells.add(shell); }; }; } public function setDelaySpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (delayTimer.running){ _local2 = true; delayTimer.stop(); }; delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToShoot); delay = _arg1; delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToShoot); if (_local2){ delayTimer.start(); }; } override public function update():void{ super.update(); } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToShoot); reloadTimer.removeEventListener(TimerEvent.TIMER, reloadNow); delayTimer.stop(); reloadTimer.stop(); ableToShoot = true; reloading = false; reloadCounter = 0; image.gotoAndStop("idle"); image2.gotoAndStop("idle"); } public function setReloadSpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (reloadTimer.running){ _local2 = true; reloadTimer.stop(); }; reloadTimer.removeEventListener(TimerEvent.TIMER, reloadNow); this.reloadTime = _arg1; reloadTimer = new Timer((_arg1 / reloadFrame)); reloadTimer.addEventListener(TimerEvent.TIMER, reloadNow); if (_local2){ reloadTimer.start(); }; } protected function reloadNow(_arg1:TimerEvent):void{ var _local2:int; image.gotoAndStop((initialReloadFrame + reloadCounter)); image2.gotoAndStop((initialReloadFrame + reloadCounter)); reloadCounter++; if (reloadCounter > reloadFrame){ reloadCounter = 0; reloadTimer.stop(); if (ammoType.amount > 0){ _local2 = (maxAmmo - ammo); if (ammoType.amount > _local2){ ammoType.amount = (ammoType.amount - _local2); ammo = (ammo + _local2); } else { ammo = (ammo + ammoType.amount); ammoType.amount = 0; }; }; ableToShoot = true; reloading = false; if (!World.getSingleton().muted){ clipInSound.play(); }; }; } } }//package p_weapon
Section 323
//Shotgun (p_weapon.Shotgun) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import flash.media.*; import flash.utils.*; import p_ammo.*; import p_bullet.*; public class Shotgun extends RangeWeapon { public var pumpCounter:int; public var initialPumpFrame:int; public var pumpSound:Sound; public var reloadMode:Boolean; public var pumpFrame:int; public function Shotgun(){ id = "Shotgun"; image = new armShotGunF(); image2 = new armShotGunB(); logo = new weaponShotGunLogo(); ammo = 8; maxAmmo = 8; delay = 300; speed = 10; reloadTime = 200; angle = 0; damage = 75; pumpFrame = 7; initialPumpFrame = 31; pumpCounter = 0; accuracy = 80; reloadFrame = 20; initialReloadFrame = 10; initTimer(); reloadMode = false; ammoType = new Ammo12Gauge(0); price = 2100; attackSound = new attackSoundShotgun(); pumpSound = new pumpShotgun(); clipInSound = new reloadShotgun(); } override public function reload():void{ if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ reloading = true; reloadMode = true; ableToShoot = false; reloadTimer.start(); } else { if ((((ammo >= maxAmmo)) || ((ammoType.amount <= 0)))){ reloadMode = false; }; }; } override public function initTimer():void{ delayTimer = new Timer((delay / pumpFrame)); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToShoot); reloadTimer = new Timer((reloadTime / reloadFrame)); reloadTimer.addEventListener(TimerEvent.TIMER, reloadNow); } override protected function reloadNow(_arg1:TimerEvent):void{ var _local2:int; image.gotoAndStop((initialReloadFrame + reloadCounter)); image2.gotoAndStop((initialReloadFrame + reloadCounter)); reloadCounter++; if (reloadCounter > reloadFrame){ reloadCounter = 0; reloadTimer.stop(); if (ammoType.amount > 0){ _local2 = 1; if (ammoType.amount > _local2){ ammoType.amount = (ammoType.amount - _local2); ammo = (ammo + _local2); } else { ammo = (ammo + ammoType.amount); ammoType.amount = 0; }; }; reloading = false; if (ammo >= maxAmmo){ pumpCounter = 0; delayTimer.start(); reloadMode = false; }; if (!World.getSingleton().muted){ clipInSound.play(); }; }; } override public function setDelaySpeed(_arg1:Number):void{ if (delayTimer.running){ delayTimer.stop(); }; delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToShoot); delay = _arg1; delayTimer = new Timer((delay / pumpFrame)); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToShoot); } override public function attack(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; var _local6:Point; var _local7:b2Vec2; var _local8:Number; if ((((ammo > 0)) && (!(ableToShoot)))){ if (reloadMode){ pumpCounter = 0; }; delayTimer.start(); reloadMode = false; reloadCounter = 0; reloadTimer.stop(); reloading = false; }; if (ammo <= 0){ reload(); } else { if (((ableToShoot) && ((ammo > 0)))){ image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); reloadMode = false; reloadTimer.stop(); reloading = false; reloadCounter = 0; ableToShoot = false; delayTimer.start(); ammo--; _local2 = 0; _local3 = 5; while (_local2 < _local3) { bullet = new HandGunBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local4 = ((Math.random() * (deviation - accuracy)) / deviation); _local5 = ((((Math.floor((Math.random() * 10)) + 1) % 2) == 0)) ? -1 : 1; bullet.direction.y = (bullet.direction.y + (_local4 * _local5)); _local6 = new Point(image.bulletOut.x, image.bulletOut.y); _local6 = image.localToGlobal(_local6); _local7 = position.Copy(); _local7.Subtract(screenPosition); bullet.position.x = (_local7.x + _local6.x); bullet.position.y = (_local7.y + _local6.y); bullet.screenPosition.x = _local6.x; bullet.screenPosition.y = _local6.y; _local8 = b2Vec2.vectorToRotation(direction, bullet.direction); if ((((((bullet.direction.x > 0)) && ((bullet.direction.y < 0)))) || ((((bullet.direction.x < 0)) && ((bullet.direction.y > 0)))))){ _local8 = (_local8 * -1); }; bullet.angle = (angle + _local8); bullet.damage = damage; if (_arg1){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); _local2++; }; if (!World.getSingleton().muted){ soundChannel = attackSound.play(0, 0, soundTransform); }; }; }; } override public function update():void{ super.update(); if (reloadMode){ reload(); }; } override public function setAbleToShoot(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; if (!reloading){ image.gotoAndStop((initialPumpFrame + pumpCounter)); image2.gotoAndStop((initialPumpFrame + pumpCounter)); }; pumpCounter++; if (pumpCounter > pumpFrame){ if (!World.getSingleton().muted){ pumpSound.play(); }; pumpCounter = 0; ableToShoot = true; delayTimer.stop(); shell = new ShotGunShell(); shell.speed = (speed / 100); shell.position = position.Copy(); shell.screenPosition = screenPosition.Copy(); shell.direction = bullet.direction.Negative(); _local2 = new Point(image.shellOut.x, image.shellOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); shell.position.x = (_local3.x + _local2.x); shell.position.y = (_local3.y + _local2.y); shell.screenPosition.x = _local2.x; shell.screenPosition.y = _local2.y; shell.angle = angle; shell.damage = damage; shell.initRigidBody(); shell.away(); if (World.getSingleton().shells.size() > shellLimit){ World.getSingleton().shells.get(0).lifeTime = 0; World.getSingleton().shells.get(0).die(); }; World.getSingleton().shells.add(shell); }; } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToShoot); reloadTimer.removeEventListener(TimerEvent.TIMER, reloadNow); delayTimer.stop(); reloadTimer.stop(); ableToShoot = true; reloading = false; reloadMode = false; reloadCounter = 0; pumpCounter = 0; image.gotoAndStop("idle"); image2.gotoAndStop("idle"); } } }//package p_weapon
Section 324
//SM5 (p_weapon.SM5) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class SM5 extends RangeWeapon { public function SM5(){ id = "SM5"; image = new armSM5F(); image2 = new armSM5B(); logo = new weaponSM5Logo(); ammo = 30; maxAmmo = 30; delay = 175; speed = 10; reloadTime = 650; angle = 0; damage = 25; accuracy = 95; reloadFrame = 31; initialReloadFrame = 5; price = 1600; initTimer(); ammoType = new Ammo9mm(0); attackSound = new attackSoundMP5(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipInSound.play(); clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsMP5(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 325
//SteyrTMP (p_weapon.SteyrTMP) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class SteyrTMP extends RangeWeapon { public function SteyrTMP(){ id = "Steyr TMP"; image = new armSMGF(); image2 = new armSMGB(); logo = new weaponSteyrTMPLogo(); ammo = 30; maxAmmo = 30; delay = 150; speed = 10; reloadTime = 650; angle = 0; damage = 30; accuracy = 80; reloadFrame = 32; initialReloadFrame = 5; initTimer(); ammoType = new Ammo9mm(0); price = 1500; attackSound = new attackSoundSteyrTMP(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsSteyrTMP(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 326
//ThrowWeapon (p_weapon.ThrowWeapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_singleton.*; import flash.media.*; import flash.utils.*; import p_bullet.*; public class ThrowWeapon extends Weapon { public var bullet:Bullet; public var delay:Number; public var attackFrame:int; public var delayTimer:Timer; public var attackCounter:int; public var isAPlayer:Boolean; public var attacking:Boolean; public var ableToSlice:Boolean; public var initialAttackFrame:int; public var attackSound:Sound; public var attackTime:Number; public var speed:Number; public var attackTimer:Timer; public var bulletIsOut:Boolean; public var bulletOutCounter:int; public function ThrowWeapon(){ weaponType = WeaponType.THROW; speed = 20; ableToSlice = true; attackCounter = 0; attacking = false; attackTime = 500; direction = new b2Vec2(); isAPlayer = true; } public function setDelaySpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (delayTimer.running){ _local2 = true; delayTimer.stop(); }; delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); delay = _arg1; delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToSlice); if (_local2){ delayTimer.start(); }; } protected function animateAttack(_arg1:TimerEvent):void{ image.gotoAndStop((initialAttackFrame + attackCounter)); image2.gotoAndStop((initialAttackFrame + attackCounter)); attackCounter++; if (attackCounter > attackFrame){ attackCounter = 0; bulletIsOut = false; attackTimer.stop(); ableToSlice = true; attacking = false; image.gotoAndStop("idle"); image2.gotoAndStop("idle"); delayTimer.start(); }; } override public function initTimer():void{ delayTimer = new Timer(delay); delayTimer.addEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer = new Timer((attackTime / attackFrame)); attackTimer.addEventListener(TimerEvent.TIMER, animateAttack); } public function setAttackSpeed(_arg1:Number):void{ var _local2:Boolean; _local2 = false; if (attackTimer.running){ _local2 = true; attackTimer.stop(); }; attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); this.attackTime = _arg1; attackTimer = new Timer((_arg1 / attackFrame)); attackTimer.addEventListener(TimerEvent.TIMER, animateAttack); if (_local2){ attackTimer.start(); }; } public function attack(_arg1:Boolean):void{ isAPlayer = _arg1; if (((ableToSlice) && (!(attacking)))){ attacking = true; ableToSlice = false; attackTimer.start(); if (!World.getSingleton().muted){ attackSound.play(0, 0, soundTransform); }; }; } override public function update():void{ super.update(); } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); delayTimer.stop(); attackTimer.stop(); image.gotoAndStop("idle"); image2.gotoAndStop("idle"); bulletIsOut = false; ableToSlice = true; attacking = false; attackCounter = 0; } public function setAbleToSlice(_arg1:TimerEvent):void{ ableToSlice = true; delayTimer.stop(); } } }//package p_weapon
Section 327
//WaltherP99 (p_weapon.WaltherP99) package p_weapon { import Box2D.Common.Math.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_ammo.*; import p_bullet.*; public class WaltherP99 extends RangeWeapon { public function WaltherP99(){ id = "Walther P99"; image = new armPistolF(); image2 = new armPistolB(); logo = new weaponWaltherP99Logo(); ammo = 16; maxAmmo = 16; delay = 300; speed = 10; reloadTime = 600; angle = 0; damage = 30; accuracy = 85; reloadFrame = 32; initialReloadFrame = 7; initTimer(); ammoType = new Ammo9mm(0); price = 600; attackSound = new attackSoundUSP(); } override public function reload():void{ var _local1:Point; var _local2:b2Vec2; if ((((((ammo < maxAmmo)) && ((ammoType.amount > 0)))) && (!(reloading)))){ if (!World.getSingleton().muted){ clipOutSound.play(); }; reloading = true; ableToShoot = false; reloadTimer.start(); mags = new MagsWaltherP99(); if (faceState == FaceState.FACE_LEFT){ mags.image.scaleX = (mags.image.scaleX * -1); mags.angle = -(image.rotation); } else { mags.angle = image.rotation; }; mags.speed = 0; mags.position = position.Copy(); mags.screenPosition = screenPosition.Copy(); mags.direction = direction; _local1 = new Point(image.magOut.x, image.magOut.y); _local1 = image.localToGlobal(_local1); _local2 = position.Copy(); _local2.Subtract(screenPosition); mags.position.x = (_local2.x + _local1.x); mags.position.y = (_local2.y + _local1.y); mags.screenPosition.x = _local1.x; mags.screenPosition.y = _local1.y; mags.damage = damage; mags.initRigidBody(); mags.away(); World.getSingleton().mags.add(mags); }; } override public function attack(_arg1:Boolean):void{ if (((((ableToShoot) && ((ammo > 0)))) && (!(reloading)))){ bullet = new HandGunBullet(); image.gotoAndPlay("shoot"); image2.gotoAndPlay("shoot"); }; super.attack(_arg1); } } }//package p_weapon
Section 328
//Weapon (p_weapon.Weapon) package p_weapon { import flash.display.*; import flash.media.*; import p_entity.*; public class Weapon extends Entity { public var playerOwned:Boolean;// = false public var price:int; public var id:String; public var soundTransform:SoundTransform; public var logo:MovieClip; public var damage:Number; public var faceState:String; public var weaponType:String; public var image2:MovieClip; public function Weapon(){ playerOwned = false; super(); soundTransform = new SoundTransform(0.4); } override public function update():void{ } public function initTimer():void{ } public function timerOff():void{ } } }//package p_weapon
Section 329
//WeaponType (p_weapon.WeaponType) package p_weapon { public class WeaponType { public static var MELEE:String = "MELEE"; public static var EXPLOSIVE:String = "EXPLOSIVE"; public static var THROW:String = "THROW"; public static var RANGE:String = "RANGE"; } }//package p_weapon
Section 330
//Zombie01Weapon (p_weapon.Zombie01Weapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Zombie01Weapon extends MeleeWeapon { public function Zombie01Weapon(){ id = "Zombie 01 weapon"; image = new zombieArmF01(); image2 = new zombieArmB01(); attackTime = 500; initialAttackFrame = 78; attackFrame = 8; delay = 10; damage = 10; angle = 0; bulletOutCounter = 5; bulletIsOut = false; price = 0; initTimer(); attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new ZombieBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); delayTimer.stop(); attackTimer.stop(); bulletIsOut = false; ableToSlice = true; attacking = false; attackCounter = 0; } } }//package p_weapon
Section 331
//Zombie02Weapon (p_weapon.Zombie02Weapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Zombie02Weapon extends MeleeWeapon { public function Zombie02Weapon(){ id = "Zombie 02 weapon"; image = new zombieArmF02(); image2 = new zombieArmB02(); attackTime = 500; initialAttackFrame = 78; attackFrame = 8; delay = 10; damage = 10; angle = 0; bulletOutCounter = 5; bulletIsOut = false; price = 0; initTimer(); attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new ZombieBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); delayTimer.stop(); attackTimer.stop(); bulletIsOut = false; ableToSlice = true; attacking = false; attackCounter = 0; } } }//package p_weapon
Section 332
//Zombie03Weapon (p_weapon.Zombie03Weapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Zombie03Weapon extends MeleeWeapon { public function Zombie03Weapon(){ id = "Zombie 03 weapon"; image = new zombieArmF03(); image2 = new zombieArmB03(); attackTime = 650; initialAttackFrame = 78; attackFrame = 8; delay = 10; damage = 20; angle = 0; bulletOutCounter = 5; bulletIsOut = false; price = 0; initTimer(); attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new ZombieBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); delayTimer.stop(); attackTimer.stop(); bulletIsOut = false; ableToSlice = true; attacking = false; attackCounter = 0; } } }//package p_weapon
Section 333
//Zombie04Weapon (p_weapon.Zombie04Weapon) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class Zombie04Weapon extends MeleeWeapon { public function Zombie04Weapon(){ id = "Zombie 04 weapon"; image = new zombieArmF04(); image2 = new zombieArmB04(); attackTime = 650; initialAttackFrame = 78; attackFrame = 8; delay = 10; damage = 20; angle = 0; bulletOutCounter = 5; bulletIsOut = false; price = 0; initTimer(); attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new ZombieBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); delayTimer.stop(); attackTimer.stop(); bulletIsOut = false; ableToSlice = true; attacking = false; attackCounter = 0; } } }//package p_weapon
Section 334
//ZombieWeaponAxe (p_weapon.ZombieWeaponAxe) package p_weapon { import Box2D.Common.Math.*; import flash.events.*; import p_char.*; import p_singleton.*; import flash.geom.*; import p_bullet.*; public class ZombieWeaponAxe extends MeleeWeapon { public function ZombieWeaponAxe(){ id = "Zombie Axe weapon"; image = new zombieArmF05(); image2 = new zombieArmB05(); attackTime = 650; initialAttackFrame = 78; attackFrame = 8; delay = 10; damage = 5; angle = 0; bulletOutCounter = 7; bulletIsOut = false; price = 0; initTimer(); speed = 100; attackSound = new knifeSlash(); } override protected function animateAttack(_arg1:TimerEvent):void{ var _local2:Point; var _local3:b2Vec2; super.animateAttack(_arg1); if ((((attackCounter > bulletOutCounter)) && (!(bulletIsOut)))){ bulletIsOut = true; bullet = new AxeBullet(); bullet.speed = speed; bullet.position = position.Copy(); bullet.screenPosition = screenPosition.Copy(); bullet.direction = direction.Copy(); if (faceState == FaceState.FACE_LEFT){ bullet.image.scaleX = (bullet.image.scaleX * -1); }; _local2 = new Point(image.bulletOut.x, image.bulletOut.y); _local2 = image.localToGlobal(_local2); _local3 = position.Copy(); _local3.Subtract(screenPosition); bullet.position.x = (_local3.x + _local2.x); bullet.position.y = (_local3.y + _local2.y); bullet.screenPosition.x = _local2.x; bullet.screenPosition.y = _local2.y; bullet.angle = angle; bullet.damage = damage; if (isAPlayer){ World.getSingleton().playerBullets.add(bullet); bullet.bodyType = BodyType.PLAYER_BULLET; } else { World.getSingleton().enemyBullets.add(bullet); bullet.bodyType = BodyType.ENEMY_BULLET; }; bullet.initRigidBody(); bullet.away(); }; } override public function timerOff():void{ delayTimer.removeEventListener(TimerEvent.TIMER, setAbleToSlice); attackTimer.removeEventListener(TimerEvent.TIMER, animateAttack); delayTimer.stop(); attackTimer.stop(); bulletIsOut = false; ableToSlice = true; attacking = false; attackCounter = 0; } } }//package p_weapon
Section 335
//armAKB (armAKB) package { import flash.display.*; public dynamic class armAKB extends MovieClip { public function armAKB(){ addFrameScript(0, frame1, 2, frame3, 34, frame35); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame35(){ gotoAndStop("idle"); } } }//package
Section 336
//armAKF (armAKF) package { import flash.display.*; public dynamic class armAKF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armAKF(){ addFrameScript(0, frame1, 2, frame3, 34, frame35); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame35(){ gotoAndStop("idle"); } } }//package
Section 337
//armBarretM82B (armBarretM82B) package { import flash.display.*; public dynamic class armBarretM82B extends MovieClip { public function armBarretM82B(){ addFrameScript(0, frame1, 9, frame10, 39, frame40); } function frame10(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame40(){ gotoAndStop("idle"); } } }//package
Section 338
//armBarretM82F (armBarretM82F) package { import flash.display.*; public dynamic class armBarretM82F extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armBarretM82F(){ addFrameScript(0, frame1, 9, frame10, 39, frame40); } function frame10(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame40(){ gotoAndStop("idle"); } } }//package
Section 339
//armBaseballBatB (armBaseballBatB) package { import flash.display.*; public dynamic class armBaseballBatB extends MovieClip { public function armBaseballBatB(){ addFrameScript(0, frame1, 11, frame12, 12, frame13); } function frame12(){ stop(); } function frame1(){ stop(); } function frame13(){ gotoAndStop("idle"); } } }//package
Section 340
//armBaseballBatF (armBaseballBatF) package { import flash.display.*; public dynamic class armBaseballBatF extends MovieClip { public var bulletOut:MovieClip; public var attackDone:Boolean; public function armBaseballBatF(){ addFrameScript(0, frame1, 1, frame2, 7, frame8, 11, frame12, 12, frame13); } function frame12(){ attackDone = false; stop(); } function frame1(){ stop(); attackDone = false; } function frame13(){ gotoAndStop("idle"); } function frame8(){ attackDone = true; } function frame2(){ attackDone = false; } } }//package
Section 341
//armBerettaF (armBerettaF) package { import flash.display.*; public dynamic class armBerettaF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armBerettaF(){ addFrameScript(0, frame1, 5, frame6, 38, frame39); } function frame6(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame39(){ gotoAndStop("idle"); } } }//package
Section 342
//armChainSawB (armChainSawB) package { import flash.display.*; public dynamic class armChainSawB extends MovieClip { public var attackDone:Boolean; public function armChainSawB(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); attackDone = false; } function frame2(){ attackDone = false; } } }//package
Section 343
//armChainSawF (armChainSawF) package { import flash.display.*; public dynamic class armChainSawF extends MovieClip { public var bulletOut:MovieClip; public function armChainSawF(){ addFrameScript(0, frame1, 2, frame3); } function frame3(){ gotoAndPlay("shoot"); } function frame1(){ stop(); } } }//package
Section 344
//armDeagleF (armDeagleF) package { import flash.display.*; public dynamic class armDeagleF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armDeagleF(){ addFrameScript(0, frame1, 5, frame6, 38, frame39); } function frame6(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame39(){ gotoAndStop("idle"); } } }//package
Section 345
//armDynamiteF (armDynamiteF) package { import flash.display.*; public dynamic class armDynamiteF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public function armDynamiteF(){ addFrameScript(0, frame1, 16, frame17, 26, frame27, 27, frame28); } function frame1(){ stop(); } function frame17(){ stop(); } function frame27(){ gotoAndStop("idle"); } function frame28(){ stop(); } } }//package
Section 346
//armGLM32B (armGLM32B) package { import flash.display.*; public dynamic class armGLM32B extends MovieClip { public function armGLM32B(){ addFrameScript(0, frame1, 9, frame10, 39, frame40); } function frame10(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame40(){ gotoAndStop("idle"); } } }//package
Section 347
//armGLM32F (armGLM32F) package { import flash.display.*; public dynamic class armGLM32F extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armGLM32F(){ addFrameScript(0, frame1, 9, frame10, 39, frame40); } function frame10(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame40(){ gotoAndStop("idle"); } } }//package
Section 348
//armGrenadeB (armGrenadeB) package { import flash.display.*; public dynamic class armGrenadeB extends MovieClip { public function armGrenadeB(){ addFrameScript(0, frame1, 16, frame17, 26, frame27); } function frame1(){ stop(); } function frame17(){ stop(); } function frame27(){ gotoAndStop("idle"); } } }//package
Section 349
//armGrenadeF (armGrenadeF) package { import flash.display.*; public dynamic class armGrenadeF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public function armGrenadeF(){ addFrameScript(0, frame1, 16, frame17, 26, frame27, 27, frame28); } function frame1(){ stop(); } function frame17(){ stop(); } function frame27(){ gotoAndStop("idle"); } function frame28(){ stop(); } } }//package
Section 350
//armKatanaB (armKatanaB) package { import flash.display.*; public dynamic class armKatanaB extends MovieClip { public var attackDone:Boolean; public function armKatanaB(){ addFrameScript(0, frame1, 1, frame2, 7, frame8, 9, frame10, 10, frame11); } function frame10(){ attackDone = false; stop(); } function frame1(){ stop(); attackDone = false; } function frame8(){ attackDone = true; } function frame2(){ attackDone = false; } function frame11(){ gotoAndStop("idle"); } } }//package
Section 351
//armKatanaF (armKatanaF) package { import flash.display.*; public dynamic class armKatanaF extends MovieClip { public var bulletOut:MovieClip; public var attackDone:Boolean; public function armKatanaF(){ addFrameScript(0, frame1, 1, frame2, 7, frame8, 9, frame10, 10, frame11); } function frame10(){ attackDone = false; stop(); } function frame1(){ stop(); attackDone = false; } function frame8(){ attackDone = true; } function frame2(){ attackDone = false; } function frame11(){ gotoAndStop("idle"); } } }//package
Section 352
//armKnifeB (armKnifeB) package { import flash.display.*; public dynamic class armKnifeB extends MovieClip { public function armKnifeB(){ addFrameScript(0, frame1, 7, frame8, 8, frame9); } function frame1(){ stop(); } function frame9(){ gotoAndStop("idle"); } function frame8(){ stop(); } } }//package
Section 353
//armKnifeF (armKnifeF) package { import flash.display.*; public dynamic class armKnifeF extends MovieClip { public var bulletOut:MovieClip; public var attackDone:Boolean; public function armKnifeF(){ addFrameScript(0, frame1, 1, frame2, 4, frame5, 7, frame8, 8, frame9); } function frame1(){ stop(); attackDone = false; } function frame5(){ attackDone = true; } function frame9(){ gotoAndStop("idle"); } function frame8(){ attackDone = false; stop(); } function frame2(){ attackDone = false; } } }//package
Section 354
//armM14F (armM14F) package { import flash.display.*; public dynamic class armM14F extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armM14F(){ addFrameScript(0, frame1, 2, frame3, 34, frame35); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame35(){ gotoAndStop("idle"); } } }//package
Section 355
//armM1911F (armM1911F) package { import flash.display.*; public dynamic class armM1911F extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armM1911F(){ addFrameScript(0, frame1, 5, frame6, 38, frame39); } function frame6(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame39(){ gotoAndStop("idle"); } } }//package
Section 356
//armM4B (armM4B) package { import flash.display.*; public dynamic class armM4B extends MovieClip { public function armM4B(){ addFrameScript(0, frame1, 2, frame3, 34, frame35); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame35(){ gotoAndStop("idle"); } } }//package
Section 357
//armM4F (armM4F) package { import flash.display.*; public dynamic class armM4F extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armM4F(){ addFrameScript(0, frame1, 2, frame3, 34, frame35); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame35(){ gotoAndStop("idle"); } } }//package
Section 358
//armMinigunB (armMinigunB) package { import flash.display.*; public dynamic class armMinigunB extends MovieClip { public function armMinigunB(){ addFrameScript(0, frame1, 2, frame3, 34, frame35, 38, frame39); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame39(){ stop(); } function frame35(){ gotoAndStop("idle"); } } }//package
Section 359
//armMinigunF (armMinigunF) package { import flash.display.*; public dynamic class armMinigunF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armMinigunF(){ addFrameScript(0, frame1, 2, frame3, 34, frame35, 38, frame39); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame39(){ gotoAndStop("idle"); } function frame35(){ gotoAndStop("idle"); } } }//package
Section 360
//armMPUB (armMPUB) package { import flash.display.*; public dynamic class armMPUB extends MovieClip { public function armMPUB(){ addFrameScript(0, frame1, 3, frame4, 35, frame36); } function frame1(){ stop(); } function frame4(){ gotoAndStop("idle"); } function frame36(){ gotoAndStop("idle"); } } }//package
Section 361
//armMPUF (armMPUF) package { import flash.display.*; public dynamic class armMPUF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armMPUF(){ addFrameScript(0, frame1, 3, frame4, 35, frame36); } function frame1(){ stop(); } function frame4(){ gotoAndStop("idle"); } function frame36(){ gotoAndStop("idle"); } } }//package
Section 362
//armPistolB (armPistolB) package { import flash.display.*; public dynamic class armPistolB extends MovieClip { public function armPistolB(){ addFrameScript(0, frame1, 5, frame6, 38, frame39); } function frame6(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame39(){ gotoAndStop("idle"); } } }//package
Section 363
//armPistolF (armPistolF) package { import flash.display.*; public dynamic class armPistolF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armPistolF(){ addFrameScript(0, frame1, 5, frame6, 38, frame39); } function frame6(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame39(){ gotoAndStop("idle"); } } }//package
Section 364
//armShotGunB (armShotGunB) package { import flash.display.*; public dynamic class armShotGunB extends MovieClip { public function armShotGunB(){ addFrameScript(0, frame1, 8, frame9, 37, frame38); } function frame1(){ stop(); } function frame9(){ gotoAndStop("idle"); } function frame38(){ stop(); } } }//package
Section 365
//armShotGunF (armShotGunF) package { import flash.display.*; public dynamic class armShotGunF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armShotGunF(){ addFrameScript(0, frame1, 8, frame9, 37, frame38); } function frame1(){ stop(); } function frame9(){ gotoAndStop("idle"); } function frame38(){ stop(); } } }//package
Section 366
//armSM5B (armSM5B) package { import flash.display.*; public dynamic class armSM5B extends MovieClip { public function armSM5B(){ addFrameScript(0, frame1, 3, frame4, 35, frame36); } function frame1(){ stop(); } function frame4(){ gotoAndStop("idle"); } function frame36(){ gotoAndStop("idle"); } } }//package
Section 367
//armSM5F (armSM5F) package { import flash.display.*; public dynamic class armSM5F extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armSM5F(){ addFrameScript(0, frame1, 3, frame4, 35, frame36); } function frame1(){ stop(); } function frame4(){ gotoAndStop("idle"); } function frame36(){ gotoAndStop("idle"); } } }//package
Section 368
//armSMGB (armSMGB) package { import flash.display.*; public dynamic class armSMGB extends MovieClip { public function armSMGB(){ addFrameScript(0, frame1, 2, frame3, 35, frame36); } function frame3(){ gotoAndStop("idle"); } function frame1(){ stop(); } function frame36(){ gotoAndStop("idle"); } } }//package
Section 369
//armSMGF (armSMGF) package { import flash.display.*; public dynamic class armSMGF extends MovieClip { public var bulletOut:MovieClip; public var shellOut:MovieClip; public var magOut:MovieClip; public function armSMGF(){ addFrameScript(0, frame1, 3, frame4, 36, frame37); } function frame1(){ stop(); } function frame4(){ gotoAndStop("idle"); } function frame37(){ gotoAndStop("idle"); } } }//package
Section 370
//AttackSound (AttackSound) package { import flash.media.*; public dynamic class AttackSound extends Sound { } }//package
Section 371
//attackSoundAK (attackSoundAK) package { import flash.media.*; public dynamic class attackSoundAK extends Sound { } }//package
Section 372
//attackSoundBarret (attackSoundBarret) package { import flash.media.*; public dynamic class attackSoundBarret extends Sound { } }//package
Section 373
//attackSoundDeagle (attackSoundDeagle) package { import flash.media.*; public dynamic class attackSoundDeagle extends Sound { } }//package
Section 374
//attackSoundM4 (attackSoundM4) package { import flash.media.*; public dynamic class attackSoundM4 extends Sound { } }//package
Section 375
//attackSoundMP5 (attackSoundMP5) package { import flash.media.*; public dynamic class attackSoundMP5 extends Sound { } }//package
Section 376
//attackSoundShotgun (attackSoundShotgun) package { import flash.media.*; public dynamic class attackSoundShotgun extends Sound { } }//package
Section 377
//attackSoundSteyrTMP (attackSoundSteyrTMP) package { import flash.media.*; public dynamic class attackSoundSteyrTMP extends Sound { } }//package
Section 378
//attackSoundSteyrUMP (attackSoundSteyrUMP) package { import flash.media.*; public dynamic class attackSoundSteyrUMP extends Sound { } }//package
Section 379
//attackSoundUSP (attackSoundUSP) package { import flash.media.*; public dynamic class attackSoundUSP extends Sound { } }//package
Section 380
//backGroundLevel1 (backGroundLevel1) package { import p_gamelevel.*; public dynamic class backGroundLevel1 extends Ground { } }//package
Section 381
//backGroundLevel2 (backGroundLevel2) package { import p_gamelevel.*; public dynamic class backGroundLevel2 extends Ground { } }//package
Section 382
//backGroundLevel3 (backGroundLevel3) package { import p_gamelevel.*; public dynamic class backGroundLevel3 extends Ground { } }//package
Section 383
//backGroundLevel4 (backGroundLevel4) package { import p_gamelevel.*; public dynamic class backGroundLevel4 extends Ground { } }//package
Section 384
//backGroundLevel5 (backGroundLevel5) package { import p_gamelevel.*; public dynamic class backGroundLevel5 extends Ground { } }//package
Section 385
//barricadeA0 (barricadeA0) package { import p_barricade.*; public dynamic class barricadeA0 extends TestBox { public function barricadeA0(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 386
//barricadeA1 (barricadeA1) package { import p_barricade.*; public dynamic class barricadeA1 extends TestBox { public function barricadeA1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 387
//barricadeB0 (barricadeB0) package { import p_barricade.*; public dynamic class barricadeB0 extends TestBox { public function barricadeB0(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 388
//barricadeB1 (barricadeB1) package { import p_barricade.*; public dynamic class barricadeB1 extends TestBox { public function barricadeB1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 389
//barricadeShop (barricadeShop) package { import flash.display.*; import flash.text.*; public dynamic class barricadeShop extends MovieClip { public var hideButton:MovieClip; public var startButton:SimpleButton; public var buldozerButton:MovieClip; public var barricade0:MovieClip; public var barricade1:MovieClip; public var barricadeLimit:TextField; public var chooserBox:MovieClip; public var infoBarricade0:MovieClip; public var infoBarricade1:MovieClip; } }//package
Section 390
//billboard_text (billboard_text) package { import flash.display.*; import flash.text.*; public dynamic class billboard_text extends MovieClip { public var content:TextField; } }//package
Section 391
//blackBG (blackBG) package { import flash.display.*; public dynamic class blackBG extends MovieClip { } }//package
Section 392
//blood_clip (blood_clip) package { import flash.display.*; public dynamic class blood_clip extends MovieClip { } }//package
Section 393
//blood_floor0 (blood_floor0) package { import flash.display.*; public dynamic class blood_floor0 extends MovieClip { } }//package
Section 394
//blood_floor1 (blood_floor1) package { import flash.display.*; public dynamic class blood_floor1 extends MovieClip { } }//package
Section 395
//blood_floor2 (blood_floor2) package { import flash.display.*; public dynamic class blood_floor2 extends MovieClip { } }//package
Section 396
//blood_shoot0 (blood_shoot0) package { import flash.display.*; public dynamic class blood_shoot0 extends MovieClip { } }//package
Section 397
//blood_shoot1 (blood_shoot1) package { import flash.display.*; public dynamic class blood_shoot1 extends MovieClip { } }//package
Section 398
//blood_shoot2 (blood_shoot2) package { import flash.display.*; public dynamic class blood_shoot2 extends MovieClip { } }//package
Section 399
//bloodScreen (bloodScreen) package { import flash.display.*; public dynamic class bloodScreen extends MovieClip { } }//package
Section 400
//blurBG (blurBG) package { import flash.display.*; public dynamic class blurBG extends MovieClip { } }//package
Section 401
//buldozerCursor (buldozerCursor) package { import flash.display.*; public dynamic class buldozerCursor extends MovieClip { } }//package
Section 402
//BuySound (BuySound) package { import flash.media.*; public dynamic class BuySound extends Sound { } }//package
Section 403
//chainsawBullet (chainsawBullet) package { import flash.display.*; public dynamic class chainsawBullet extends MovieClip { } }//package
Section 404
//chainSawSound (chainSawSound) package { import flash.media.*; public dynamic class chainSawSound extends Sound { } }//package
Section 405
//ClickSound (ClickSound) package { import flash.media.*; public dynamic class ClickSound extends Sound { } }//package
Section 406
//ClipIn (ClipIn) package { import flash.media.*; public dynamic class ClipIn extends Sound { } }//package
Section 407
//ClipOut (ClipOut) package { import flash.media.*; public dynamic class ClipOut extends Sound { } }//package
Section 408
//creditScreen (creditScreen) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class creditScreen extends MovieClip { public var sponsor:SimpleButton; public var closeBtn:SimpleButton; public function creditScreen(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 409
//crosshair (crosshair) package { import flash.display.*; public dynamic class crosshair extends MovieClip { } }//package
Section 410
//Days2Die (Days2Die) package { import flash.events.*; import p_singleton.*; import flash.display.*; import p_gameManager.*; import flash.ui.*; public dynamic class Days2Die extends MovieClip { private var lock:Boolean;// = true public var myMenu:ContextMenu; private var lockURL:Array; public var gameManager:GameManager; public function Days2Die(){ var _local1:ContextMenuItem; lockURL = ["www.localhost.com", "www.site2.com", "www.site3.com"]; lock = true; super(); addFrameScript(0, frame1, 2, frame3); this.stage.quality = StageQuality.MEDIUM; World.getSingleton().quality = this.stage.quality; gameManager = new LoadingScreen(this); this.addEventListener(Event.ENTER_FRAME, update); MochiBot.track(this, "299d79ea"); myMenu = new ContextMenu(); myMenu.hideBuiltInItems(); _local1 = new ContextMenuItem("Created by Toge Productions"); myMenu.customItems.push(_local1); this.contextMenu = myMenu; } private function siteLock(_arg1:Array):void{ var _local2:String; var _local3:Array; var _local4:Array; var _local5:uint; _local2 = stage.loaderInfo.url; _local3 = _local2.split("://"); _local4 = _local3[1].split("/"); _local5 = 0; while (_local5 < _arg1.length) { if (_arg1[_local5] == _local4[0]){ lock = false; }; _local5++; }; if (lock){ alpha = 0; }; } function frame3(){ stop(); } function frame1(){ stop(); } public function update(_arg1:Event):void{ gameManager = gameManager.update(); } } }//package
Section 411
//dieGirl (dieGirl) package { import flash.media.*; public dynamic class dieGirl extends Sound { } }//package
Section 412
//dieGirl2 (dieGirl2) package { import flash.media.*; public dynamic class dieGirl2 extends Sound { } }//package
Section 413
//dieSound1 (dieSound1) package { import flash.media.*; public dynamic class dieSound1 extends Sound { } }//package
Section 414
//dieSound2 (dieSound2) package { import flash.media.*; public dynamic class dieSound2 extends Sound { } }//package
Section 415
//dieSound3 (dieSound3) package { import flash.media.*; public dynamic class dieSound3 extends Sound { } }//package
Section 416
//dynamiteBullet (dynamiteBullet) package { import flash.display.*; public dynamic class dynamiteBullet extends MovieClip { } }//package
Section 417
//Egg (Egg) package { import flash.display.*; public dynamic class Egg extends MovieClip { public var ladderDetector:MovieClip; public var torso:MovieClip; public var clipBack:MovieClip; public var clipBottom:MovieClip; public var clipFront:MovieClip; public var clipTop:MovieClip; public var weaponHolder:MovieClip; } }//package
Section 418
//endingMovie (endingMovie) package { import flash.events.*; import flash.display.*; public dynamic class endingMovie extends MovieClip { public var animationDone:Boolean; public var skipButton:SimpleButton; public function endingMovie(){ addFrameScript(0, frame1, 1, frame2, 822, frame823); } function frame823(){ animationDone = true; stop(); } function frame1(){ animationDone = false; skipButton.visible = true; stop(); } function frame2(){ skipButton.visible = true; skipButton.addEventListener(MouseEvent.CLICK, skipMovie); } public function skipMovie(_arg1:MouseEvent):void{ gotoAndStop("finish"); } } }//package
Section 419
//explodeSound (explodeSound) package { import flash.media.*; public dynamic class explodeSound extends Sound { } }//package
Section 420
//explosion (explosion) package { import flash.display.*; public dynamic class explosion extends MovieClip { public var crack:MovieClip; public function explosion(){ addFrameScript(19, frame20); } function frame20(){ stop(); } } }//package
Section 421
//extendedPlay (extendedPlay) package { import flash.display.*; public dynamic class extendedPlay extends MovieClip { public var submitButton:SimpleButton; public var noButton:SimpleButton; public var yesButton:SimpleButton; } }//package
Section 422
//femaleChar (femaleChar) package { import flash.display.*; public dynamic class femaleChar extends MovieClip { public var floorDetector:MovieClip; public var ladderDetector:MovieClip; public var torso:MovieClip; public var leg:MovieClip; public var kaki:MovieClip; public var smokeOut:MovieClip; public var shadow:MovieClip; public var kepala:MovieClip; public var weaponHolderb:MovieClip; public var weaponHolderf:MovieClip; public var xcross:MovieClip; public var signBaloon:MovieClip; public var bloodSign:MovieClip; public var head:MovieClip; public var clipTop:MovieClip; public var badan:MovieClip; public function femaleChar(){ addFrameScript(0, frame1); } function frame1(){ xcross.visible = false; } } }//package
Section 423
//Floor (Floor) package { import p_gamelevel.*; public dynamic class Floor extends Floor { } }//package
Section 424
//followSound (followSound) package { import flash.media.*; public dynamic class followSound extends Sound { } }//package
Section 425
//foreGroundLevel1 (foreGroundLevel1) package { import p_gamelevel.*; public dynamic class foreGroundLevel1 extends Ground { } }//package
Section 426
//foreGroundLevel2 (foreGroundLevel2) package { import p_gamelevel.*; public dynamic class foreGroundLevel2 extends Ground { } }//package
Section 427
//foreGroundLevel3 (foreGroundLevel3) package { import p_gamelevel.*; public dynamic class foreGroundLevel3 extends Ground { } }//package
Section 428
//foreGroundLevel4 (foreGroundLevel4) package { import p_gamelevel.*; public dynamic class foreGroundLevel4 extends Ground { } }//package
Section 429
//foreGroundLevel5 (foreGroundLevel5) package { import p_gamelevel.*; public dynamic class foreGroundLevel5 extends Ground { } }//package
Section 430
//gibs_bone0 (gibs_bone0) package { import flash.display.*; public dynamic class gibs_bone0 extends MovieClip { } }//package
Section 431
//gibs_bone1 (gibs_bone1) package { import flash.display.*; public dynamic class gibs_bone1 extends MovieClip { } }//package
Section 432
//gibs_bone2 (gibs_bone2) package { import flash.display.*; public dynamic class gibs_bone2 extends MovieClip { } }//package
Section 433
//gibs_brain0 (gibs_brain0) package { import flash.display.*; public dynamic class gibs_brain0 extends MovieClip { } }//package
Section 434
//gibs_meat0 (gibs_meat0) package { import flash.display.*; public dynamic class gibs_meat0 extends MovieClip { } }//package
Section 435
//gibs_meat1 (gibs_meat1) package { import flash.display.*; public dynamic class gibs_meat1 extends MovieClip { } }//package
Section 436
//gibs_meat2 (gibs_meat2) package { import flash.display.*; public dynamic class gibs_meat2 extends MovieClip { } }//package
Section 437
//gibs_meat3 (gibs_meat3) package { import flash.display.*; public dynamic class gibs_meat3 extends MovieClip { } }//package
Section 438
//gibs_meat4 (gibs_meat4) package { import flash.display.*; public dynamic class gibs_meat4 extends MovieClip { } }//package
Section 439
//gibs_meat5 (gibs_meat5) package { import flash.display.*; public dynamic class gibs_meat5 extends MovieClip { } }//package
Section 440
//GLbullet (GLbullet) package { import flash.display.*; public dynamic class GLbullet extends MovieClip { } }//package
Section 441
//gotShot1 (gotShot1) package { import flash.media.*; public dynamic class gotShot1 extends Sound { } }//package
Section 442
//gotShot2 (gotShot2) package { import flash.media.*; public dynamic class gotShot2 extends Sound { } }//package
Section 443
//gotShot3 (gotShot3) package { import flash.media.*; public dynamic class gotShot3 extends Sound { } }//package
Section 444
//grenadeBullet (grenadeBullet) package { import flash.display.*; public dynamic class grenadeBullet extends MovieClip { } }//package
Section 445
//grenadePin (grenadePin) package { import flash.display.*; public dynamic class grenadePin extends MovieClip { } }//package
Section 446
//grenadeSafety (grenadeSafety) package { import flash.display.*; public dynamic class grenadeSafety extends MovieClip { public var body0:MovieClip; public var body1:MovieClip; public var body2:MovieClip; } }//package
Section 447
//handGunBullet (handGunBullet) package { import flash.display.*; public dynamic class handGunBullet extends MovieClip { public var body:MovieClip; } }//package
Section 448
//handGunHitBody (handGunHitBody) package { import flash.media.*; public dynamic class handGunHitBody extends Sound { } }//package
Section 449
//handSign (handSign) package { import flash.display.*; public dynamic class handSign extends MovieClip { } }//package
Section 450
//harbourWarning (harbourWarning) package { import flash.display.*; public dynamic class harbourWarning extends MovieClip { public var noButton:SimpleButton; public var yesButton:SimpleButton; } }//package
Section 451
//healthSound (healthSound) package { import flash.media.*; public dynamic class healthSound extends Sound { } }//package
Section 452
//highscoresClip (highscoresClip) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class highscoresClip extends MovieClip { public var sponsor:SimpleButton; public var loadingClip:MovieClip; public function highscoresClip(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 453
//hitWallSound (hitWallSound) package { import flash.media.*; public dynamic class hitWallSound extends Sound { } }//package
Section 454
//hitWallSound2 (hitWallSound2) package { import flash.media.*; public dynamic class hitWallSound2 extends Sound { } }//package
Section 455
//hitWallSound3 (hitWallSound3) package { import flash.media.*; public dynamic class hitWallSound3 extends Sound { } }//package
Section 456
//hurtGirl1 (hurtGirl1) package { import flash.media.*; public dynamic class hurtGirl1 extends Sound { } }//package
Section 457
//hurtGirl2 (hurtGirl2) package { import flash.media.*; public dynamic class hurtGirl2 extends Sound { } }//package
Section 458
//hurtGuy1 (hurtGuy1) package { import flash.media.*; public dynamic class hurtGuy1 extends Sound { } }//package
Section 459
//hurtGuy2 (hurtGuy2) package { import flash.media.*; public dynamic class hurtGuy2 extends Sound { } }//package
Section 460
//hurtGuy3 (hurtGuy3) package { import flash.media.*; public dynamic class hurtGuy3 extends Sound { } }//package
Section 461
//instructionScreen (instructionScreen) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class instructionScreen extends MovieClip { public var sponsor:SimpleButton; public var maxPage:int; public var prevBtn:SimpleButton; public var closeBtn:SimpleButton; public var nextBtn:SimpleButton; public var currentPage:int; public function instructionScreen(){ addFrameScript(0, frame1); } public function onNextClick(_arg1:MouseEvent){ if (currentPage < maxPage){ currentPage++; }; if (currentPage == maxPage){ nextBtn.visible = false; }; if (currentPage != 1){ prevBtn.visible = true; }; gotoAndStop(currentPage); } function frame1(){ stop(); sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); nextBtn.addEventListener(MouseEvent.CLICK, onNextClick); prevBtn.addEventListener(MouseEvent.CLICK, onPrevClick); prevBtn.visible = false; maxPage = 8; currentPage = 1; } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } public function onPrevClick(_arg1:MouseEvent){ if (currentPage > 1){ currentPage--; }; if (currentPage != maxPage){ nextBtn.visible = true; }; if (currentPage == 1){ prevBtn.visible = false; }; gotoAndStop(currentPage); } } }//package
Section 462
//introductionSound2 (introductionSound2) package { import flash.media.*; public dynamic class introductionSound2 extends Sound { } }//package
Section 463
//introScreen (introScreen) package { import flash.events.*; import flash.display.*; public dynamic class introScreen extends MovieClip { public var animationDone:Boolean; public var movie:MovieClip; public var skipButton:SimpleButton; public function introScreen(){ addFrameScript(0, frame1, 150, frame151, 568, frame569); } function frame151(){ skipButton.visible = true; skipButton.addEventListener(MouseEvent.CLICK, skipMovie); } function frame569(){ movie.gotoAndStop("finish"); animationDone = true; stop(); } function frame1(){ animationDone = false; skipButton.visible = false; } public function skipMovie(_arg1:MouseEvent):void{ gotoAndStop("finish"); movie.gotoAndStop("finish"); } } }//package
Section 464
//introSponsorSplashScreen (introSponsorSplashScreen) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class introSponsorSplashScreen extends MovieClip { public var sponsor:MovieClip; public var animationDone:Boolean; public function introSponsorSplashScreen(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ animationDone = true; stop(); } function frame1(){ animationDone = false; sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 465
//itemBaseballBat (itemBaseballBat) package { import flash.display.*; public dynamic class itemBaseballBat extends MovieClip { public var body:MovieClip; } }//package
Section 466
//itemGrenade (itemGrenade) package { import flash.display.*; public dynamic class itemGrenade extends MovieClip { public var body0:MovieClip; public var body1:MovieClip; public var body2:MovieClip; } }//package
Section 467
//itemKnife (itemKnife) package { import flash.display.*; public dynamic class itemKnife extends MovieClip { } }//package
Section 468
//itemM4 (itemM4) package { import flash.display.*; public dynamic class itemM4 extends MovieClip { } }//package
Section 469
//itemShotGun (itemShotGun) package { import flash.display.*; public dynamic class itemShotGun extends MovieClip { } }//package
Section 470
//itemSteyrTMP (itemSteyrTMP) package { import flash.display.*; public dynamic class itemSteyrTMP extends MovieClip { } }//package
Section 471
//itemStick (itemStick) package { import flash.display.*; public dynamic class itemStick extends MovieClip { } }//package
Section 472
//itemWaltherP99 (itemWaltherP99) package { import flash.display.*; public dynamic class itemWaltherP99 extends MovieClip { } }//package
Section 473
//knifeBullet (knifeBullet) package { import flash.display.*; public dynamic class knifeBullet extends MovieClip { } }//package
Section 474
//knifeHit (knifeHit) package { import flash.media.*; public dynamic class knifeHit extends Sound { } }//package
Section 475
//knifeSlash (knifeSlash) package { import flash.media.*; public dynamic class knifeSlash extends Sound { } }//package
Section 476
//LevelUpSound (LevelUpSound) package { import flash.media.*; public dynamic class LevelUpSound extends Sound { } }//package
Section 477
//loaderScreen (loaderScreen) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; public dynamic class loaderScreen extends MovieClip { public var progressText:TextField; public var sponsor:SimpleButton; public var loadingClip:MovieClip; public var adSpace:MovieClip; public function loaderScreen(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 478
//magAK (magAK) package { import flash.display.*; public dynamic class magAK extends MovieClip { } }//package
Section 479
//magBarretM82 (magBarretM82) package { import flash.display.*; public dynamic class magBarretM82 extends MovieClip { } }//package
Section 480
//magM4 (magM4) package { import flash.display.*; public dynamic class magM4 extends MovieClip { } }//package
Section 481
//magMinigun (magMinigun) package { import flash.display.*; public dynamic class magMinigun extends MovieClip { } }//package
Section 482
//magMP5 (magMP5) package { import flash.display.*; public dynamic class magMP5 extends MovieClip { } }//package
Section 483
//magPistol (magPistol) package { import flash.display.*; public dynamic class magPistol extends MovieClip { } }//package
Section 484
//magSMG (magSMG) package { import flash.display.*; public dynamic class magSMG extends MovieClip { } }//package
Section 485
//magUMP (magUMP) package { import flash.display.*; public dynamic class magUMP extends MovieClip { } }//package
Section 486
//mainHead (mainHead) package { import flash.display.*; public dynamic class mainHead extends MovieClip { public var eye:MovieClip; public var hired:MovieClip; public function mainHead(){ 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 frame7(){ stop(); } function frame1(){ stop(); hired.visible = false; } function frame6(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame9(){ stop(); } function frame8(){ stop(); } function frame2(){ stop(); } } }//package
Section 487
//mainMenu (mainMenu) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class mainMenu extends MovieClip { public var optionButton:SimpleButton; public var sponsor:SimpleButton; public var soundButton:MovieClip; public var highscoresButton:SimpleButton; public var playButton:SimpleButton; public var instructionButton:SimpleButton; public var creditButton:SimpleButton; public var continueButton:SimpleButton; public var adSpace:MovieClip; public var moreGamesButton:SimpleButton; public function mainMenu(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); moreGamesButton.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 488
//MapScreen (MapScreen) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class MapScreen extends MovieClip { public var sponsor:SimpleButton; public var places:MovieClip; public function MapScreen(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 489
//medikit (medikit) package { import flash.display.*; public dynamic class medikit extends MovieClip { } }//package
Section 490
//menuBarClip (menuBarClip) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; public dynamic class menuBarClip extends MovieClip { public var reloadAmmo:TextField; public var sponsor:SimpleButton; public var minute:TextField; public var upperBar:MovieClip; public var animationPlaying:Boolean; public var infoBox:MovieClip; public var optionScreen:optionScreen2; public var health:TextField; public var second:TextField; public var moreGames:SimpleButton; public var expSign:MovieClip; public var ended:Boolean; public var weaponName:TextField; public var money:TextField; public var kills:TextField; public var weaponPic:MovieClip; public var ammo:TextField; public var resultScreen:MovieClip; public function menuBarClip(){ addFrameScript(0, frame1, 1, frame2, 11, frame12, 12, frame13, 18, frame19); } function frame12(){ ended = true; stop(); } function frame1(){ stop(); animationPlaying = false; ended = true; upperBar.visible = true; optionScreen.visible = false; sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); moreGames.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } function frame19(){ ended = true; gotoAndStop("idle"); } function frame13(){ animationPlaying = true; ended = false; } function frame2(){ animationPlaying = true; ended = false; } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 491
//middleBillboard (middleBillboard) package { import flash.display.*; import flash.text.*; public dynamic class middleBillboard extends MovieClip { public var content:TextField; } }//package
Section 492
//middleGroundLevel1 (middleGroundLevel1) package { import flash.display.*; public dynamic class middleGroundLevel1 extends MovieClip { public var roof0:Floor; public var playerLimit1:PlayerLimit; public var playerLimit0:PlayerLimit; public var enemySpawnPoint1:Egg; public var enemySpawnPoint0:Egg; public var lantaiSign0:MovieClip; public var lantaiSign1:MovieClip; public var wall1:Wall; public var wall2:Wall; public var wall3:Wall; public var floor1:Floor; public var wall0:Wall; public var floor0:Floor; public var stageSign0:MovieClip; public var stageSign1:MovieClip; public var spawnPoint:Egg; public var doorLockedA0b:Egg; public var roof1:Floor; } }//package
Section 493
//middleGroundLevel2 (middleGroundLevel2) package { import flash.display.*; public dynamic class middleGroundLevel2 extends MovieClip { public var playerLimit1:PlayerLimit; public var playerLimit0:PlayerLimit; public var enemySpawnPoint4:Egg; public var enemySpawnPoint1:Egg; public var ladder0:MovieClip; public var enemySpawnPoint0:Egg; public var enemySpawnPoint2:Egg; public var lantaiSign0:MovieClip; public var lantaiSign1:MovieClip; public var enemySpawnPoint3:Egg; public var wall1:Wall; public var wall0:Wall; public var floor0:Floor; public var stageSign0:MovieClip; public var floor1:Floor; public var floor2:Floor; public var spawnPoint:Egg; } }//package
Section 494
//middleGroundLevel3 (middleGroundLevel3) package { import flash.display.*; public dynamic class middleGroundLevel3 extends MovieClip { public var roof0:Floor; public var playerLimit1:PlayerLimit; public var playerLimit0:PlayerLimit; public var floor2:Floor; public var ladder2:MovieClip; public var ladder3:MovieClip; public var enemySpawnPoint0:Egg; public var enemySpawnPoint2:Egg; public var lantaiSign0:MovieClip; public var lantaiSign1:MovieClip; public var enemySpawnPoint1:Egg; public var ladder0:MovieClip; public var ladder1:MovieClip; public var ladder4:MovieClip; public var enemySpawnPoint4:Egg; public var lantaiSign2:MovieClip; public var enemySpawnPoint5:Egg; public var lantaiSign3:MovieClip; public var floor4:Floor; public var wall2:Wall; public var wall3:Wall; public var wall4:Wall; public var stageSign0:MovieClip; public var floor6:Floor; public var floor7:Floor; public var floor5:Floor; public var wall1:Wall; public var floor0:Floor; public var wall0:Wall; public var floor3:Floor; public var spawnPoint:Egg; public var enemySpawnPoint3:Egg; public var floor1:Floor; } }//package
Section 495
//middleGroundLevel4 (middleGroundLevel4) package { import flash.display.*; public dynamic class middleGroundLevel4 extends MovieClip { public var floor2:Floor; public var playerLimit1:PlayerLimit; public var playerLimit0:PlayerLimit; public var ladder2:MovieClip; public var enemySpawnPoint1:Egg; public var enemySpawnPoint0:Egg; public var enemySpawnPoint2:Egg; public var lantaiSign0:MovieClip; public var lantaiSign1:MovieClip; public var ladder0:MovieClip; public var ladder1:MovieClip; public var enemySpawnPoint3:Egg; public var enemySpawnPoint4:Egg; public var lantaiSign2:MovieClip; public var enemySpawnPoint5:Egg; public var enemySpawnPoint6:Egg; public var wall2:Wall; public var wall3:Wall; public var floor4:Floor; public var floor5:Floor; public var floor0:Floor; public var stageSign0:MovieClip; public var wall1:Wall; public var wall0:Wall; public var floor3:Floor; public var spawnPoint:Egg; public var floor1:Floor; } }//package
Section 496
//middleGroundLevel5 (middleGroundLevel5) package { import flash.display.*; public dynamic class middleGroundLevel5 extends MovieClip { public var playerLimit1:PlayerLimit; public var playerLimit0:PlayerLimit; public var playerLimit2:PlayerLimit; public var ladder2:MovieClip; public var enemySpawnPoint1:Egg; public var enemySpawnPoint3:Egg; public var enemySpawnPoint5:Egg; public var enemySpawnPoint4:Egg; public var enemySpawnPoint0:Egg; public var enemySpawnPoint2:Egg; public var lantaiSign0:MovieClip; public var lantaiSign1:MovieClip; public var ladder0:MovieClip; public var ladder1:MovieClip; public var lantaiSign2:MovieClip; public var floor4:Floor; public var stageSign0:MovieClip; public var spawnPoint:Egg; } }//package
Section 497
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 498
//movieLevel1 (movieLevel1) package { import flash.events.*; import flash.display.*; public dynamic class movieLevel1 extends MovieClip { public var skipButton:SimpleButton; public var endOfAnimation:Boolean; public function movieLevel1(){ addFrameScript(0, frame1, 929, frame930); } function frame1(){ endOfAnimation = false; skipButton.addEventListener(MouseEvent.CLICK, skipMovie); } function frame930(){ endOfAnimation = true; stop(); } public function skipMovie(_arg1:MouseEvent):void{ gotoAndStop("finish"); } } }//package
Section 499
//optionScreen (optionScreen) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class optionScreen extends MovieClip { public var mediumButton:SimpleButton; public var sponsor:SimpleButton; public var soundButton:MovieClip; public var closeBtn:SimpleButton; public var highButton:SimpleButton; public var lowButton:SimpleButton; public function optionScreen(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 500
//optionScreen2 (optionScreen2) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class optionScreen2 extends MovieClip { public var mediumButton:SimpleButton; public var sponsor:SimpleButton; public var soundButton:MovieClip; public var closeBtn:SimpleButton; public var backToMainMenuButton:SimpleButton; public var highButton:SimpleButton; public var lowButton:SimpleButton; public function optionScreen2(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 501
//PlayerLimit (PlayerLimit) package { import p_gamelevel.*; public dynamic class PlayerLimit extends PlayerLimit { } }//package
Section 502
//preSubmitHighscores (preSubmitHighscores) package { import flash.display.*; import flash.text.*; public dynamic class preSubmitHighscores extends MovieClip { public var nameText:TextField; public var submitButton:SimpleButton; public var pleaseWait:MovieClip; public var scoreText:TextField; } }//package
Section 503
//pumpShotgun (pumpShotgun) package { import flash.media.*; public dynamic class pumpShotgun extends Sound { } }//package
Section 504
//reloadShotgun (reloadShotgun) package { import flash.media.*; public dynamic class reloadShotgun extends Sound { } }//package
Section 505
//saveClip (saveClip) package { import flash.display.*; public dynamic class saveClip extends MovieClip { } }//package
Section 506
//SellSound (SellSound) package { import flash.media.*; public dynamic class SellSound extends Sound { } }//package
Section 507
//shell01 (shell01) package { import flash.display.*; public dynamic class shell01 extends MovieClip { } }//package
Section 508
//shell02 (shell02) package { import flash.display.*; public dynamic class shell02 extends MovieClip { } }//package
Section 509
//shell03 (shell03) package { import flash.display.*; public dynamic class shell03 extends MovieClip { } }//package
Section 510
//shopScreen (shopScreen) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; public dynamic class shopScreen extends MovieClip { public var ammo556:MovieClip; public var ammo9mm:MovieClip; public var ammo50calText:TextField; public var ammoHEText:TextField; public var ammo556BuyButton:SimpleButton; public var fireArm:MovieClip; public var ammo45BuyButton:SimpleButton; public var ammo50calSellButton:SimpleButton; public var ammoHE:MovieClip; public var ammo357Text:TextField; public var ammo45SellButton:SimpleButton; public var ammo357:MovieClip; public var ammo762Text:TextField; public var chooserBox:MovieClip; public var ammo762SellButton:SimpleButton; public var ammo357BuyButton:SimpleButton; public var money:TextField; public var ammo12gauge:MovieClip; public var explanationBox:MovieClip; public var fireButton:SimpleButton; public var ammo357SellButton:SimpleButton; public var warningClip:MovieClip; public var mercExplanationBox:MovieClip; public var sponsor:SimpleButton; public var sellButton:SimpleButton; public var ammo762BuyButton:SimpleButton; public var ammo12gaugeText:TextField; public var ammo50cal:MovieClip; public var ammo556SellButton:SimpleButton; public var ammoHEBuyButton:SimpleButton; public var doneButton:SimpleButton; public var ammo556Text:TextField; public var buyButton:SimpleButton; public var hireButton:SimpleButton; public var melee:MovieClip; public var ammo12gaugeBuyButton:SimpleButton; public var ammo9mmSellButton:SimpleButton; public var ammo50calBuyButton:SimpleButton; public var ammo9mmBuyButton:SimpleButton; public var ammo762:MovieClip; public var weaponOption:MovieClip; public var ammo45Text:TextField; public var ammo12gaugeSellButton:SimpleButton; public var merc:MovieClip; public var ammoHESellButton:SimpleButton; public var ammo45:MovieClip; public var ammo9mmText:TextField; public var explosive:MovieClip; public function shopScreen(){ addFrameScript(0, frame1); } function frame1(){ ammo12gauge.gotoAndStop("ammo12gauge"); ammo357.gotoAndStop("ammo357"); ammo45.gotoAndStop("ammo45"); ammo9mm.gotoAndStop("ammo9mm"); ammo762.gotoAndStop("ammo762"); ammo556.gotoAndStop("ammo556"); ammo50cal.gotoAndStop("ammo50cal"); ammoHE.gotoAndStop("ammoHE"); sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 511
//smokeAnimate (smokeAnimate) package { import flash.display.*; public dynamic class smokeAnimate extends MovieClip { } }//package
Section 512
//Sound1 (Sound1) package { import flash.media.*; public dynamic class Sound1 extends Sound { } }//package
Section 513
//Sound2 (Sound2) package { import flash.media.*; public dynamic class Sound2 extends Sound { } }//package
Section 514
//Sound3 (Sound3) package { import flash.media.*; public dynamic class Sound3 extends Sound { } }//package
Section 515
//Sound4 (Sound4) package { import flash.media.*; public dynamic class Sound4 extends Sound { } }//package
Section 516
//Sound5 (Sound5) package { import flash.media.*; public dynamic class Sound5 extends Sound { } }//package
Section 517
//spinDown (spinDown) package { import flash.media.*; public dynamic class spinDown extends Sound { } }//package
Section 518
//spinUp (spinUp) package { import flash.media.*; public dynamic class spinUp extends Sound { } }//package
Section 519
//Star (Star) package { import flash.display.*; public dynamic class Star extends MovieClip { } }//package
Section 520
//Star2 (Star2) package { import flash.display.*; public dynamic class Star2 extends MovieClip { } }//package
Section 521
//talkSymbol (talkSymbol) package { import flash.display.*; public dynamic class talkSymbol extends MovieClip { public var stay:MovieClip; public var follow:MovieClip; } }//package
Section 522
//TestBox0 (TestBox0) package { import p_barricade.*; public dynamic class TestBox0 extends TestBox { } }//package
Section 523
//TestBox1 (TestBox1) package { import p_barricade.*; public dynamic class TestBox1 extends TestBox { } }//package
Section 524
//TestRect0 (TestRect0) package { import p_barricade.*; public dynamic class TestRect0 extends TestBox { } }//package
Section 525
//TestRect1 (TestRect1) package { import p_barricade.*; public dynamic class TestRect1 extends TestBox { } }//package
Section 526
//TestTriangleA0 (TestTriangleA0) package { import p_barricade.*; public dynamic class TestTriangleA0 extends TestTriangle { } }//package
Section 527
//TestTriangleA1 (TestTriangleA1) package { import p_barricade.*; public dynamic class TestTriangleA1 extends TestTriangle { } }//package
Section 528
//TestTriangleB0 (TestTriangleB0) package { import p_barricade.*; public dynamic class TestTriangleB0 extends TestTriangle2 { } }//package
Section 529
//TestTriangleB1 (TestTriangleB1) package { import p_barricade.*; public dynamic class TestTriangleB1 extends TestTriangle2 { } }//package
Section 530
//waitSound (waitSound) package { import flash.media.*; public dynamic class waitSound extends Sound { } }//package
Section 531
//Wall (Wall) package { import p_gamelevel.*; public dynamic class Wall extends Floor { } }//package
Section 532
//weaponAKLogo (weaponAKLogo) package { import flash.display.*; public dynamic class weaponAKLogo extends MovieClip { public function weaponAKLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 533
//weaponAxe (weaponAxe) package { import flash.display.*; public dynamic class weaponAxe extends MovieClip { public var body:MovieClip; } }//package
Section 534
//weaponBarretM82Logo (weaponBarretM82Logo) package { import flash.display.*; public dynamic class weaponBarretM82Logo extends MovieClip { public function weaponBarretM82Logo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 535
//weaponBaseballBatLogo (weaponBaseballBatLogo) package { import flash.display.*; public dynamic class weaponBaseballBatLogo extends MovieClip { public function weaponBaseballBatLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 536
//weaponBerettaLogo (weaponBerettaLogo) package { import flash.display.*; public dynamic class weaponBerettaLogo extends MovieClip { public function weaponBerettaLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 537
//weaponChainSawLogo (weaponChainSawLogo) package { import flash.display.*; public dynamic class weaponChainSawLogo extends MovieClip { public function weaponChainSawLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 538
//weaponDeagleLogo (weaponDeagleLogo) package { import flash.display.*; public dynamic class weaponDeagleLogo extends MovieClip { public function weaponDeagleLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 539
//weaponDynamiteLogo (weaponDynamiteLogo) package { import flash.display.*; public dynamic class weaponDynamiteLogo extends MovieClip { public function weaponDynamiteLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 540
//weaponGLM32Logo (weaponGLM32Logo) package { import flash.display.*; public dynamic class weaponGLM32Logo extends MovieClip { public function weaponGLM32Logo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 541
//weaponGrenadeLogo (weaponGrenadeLogo) package { import flash.display.*; public dynamic class weaponGrenadeLogo extends MovieClip { public var body0:MovieClip; public var body1:MovieClip; public var body2:MovieClip; public function weaponGrenadeLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 542
//weaponInventory (weaponInventory) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class weaponInventory extends MovieClip { public var sponsor:SimpleButton; public var equipBox:MovieClip; public var fireArm:MovieClip; public var melee:MovieClip; public var chooserBox:MovieClip; public var weaponOption:MovieClip; public var explosive:MovieClip; public var explanationBox:MovieClip; public var close:SimpleButton; public function weaponInventory(){ addFrameScript(0, frame1); } function frame1(){ sponsor.addEventListener(MouseEvent.CLICK, onSponsorLogoClicked); } public function onSponsorLogoClicked(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.coolbuddy.com/?cid=161"); navigateToURL(_local2, "_blank"); } } }//package
Section 543
//weaponKatanaLogo (weaponKatanaLogo) package { import flash.display.*; public dynamic class weaponKatanaLogo extends MovieClip { public function weaponKatanaLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 544
//weaponKnifeLogo (weaponKnifeLogo) package { import flash.display.*; public dynamic class weaponKnifeLogo extends MovieClip { public function weaponKnifeLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 545
//weaponM14Logo (weaponM14Logo) package { import flash.display.*; public dynamic class weaponM14Logo extends MovieClip { public function weaponM14Logo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 546
//weaponM1911Logo (weaponM1911Logo) package { import flash.display.*; public dynamic class weaponM1911Logo extends MovieClip { public function weaponM1911Logo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 547
//weaponM4Logo (weaponM4Logo) package { import flash.display.*; public dynamic class weaponM4Logo extends MovieClip { public function weaponM4Logo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 548
//weaponMinigunLogo (weaponMinigunLogo) package { import flash.display.*; public dynamic class weaponMinigunLogo extends MovieClip { public function weaponMinigunLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 549
//weaponMPULogo (weaponMPULogo) package { import flash.display.*; public dynamic class weaponMPULogo extends MovieClip { public function weaponMPULogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 550
//weaponShotGunLogo (weaponShotGunLogo) package { import flash.display.*; public dynamic class weaponShotGunLogo extends MovieClip { public function weaponShotGunLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 551
//weaponSM5Logo (weaponSM5Logo) package { import flash.display.*; public dynamic class weaponSM5Logo extends MovieClip { public function weaponSM5Logo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 552
//weaponSteyrTMPLogo (weaponSteyrTMPLogo) package { import flash.display.*; public dynamic class weaponSteyrTMPLogo extends MovieClip { public function weaponSteyrTMPLogo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 553
//weaponStickLogo (weaponStickLogo) package { import flash.display.*; public dynamic class weaponStickLogo extends MovieClip { } }//package
Section 554
//weaponWaltherP99Logo (weaponWaltherP99Logo) package { import flash.display.*; public dynamic class weaponWaltherP99Logo extends MovieClip { public function weaponWaltherP99Logo(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 555
//zombieArmB01 (zombieArmB01) package { import flash.display.*; public dynamic class zombieArmB01 extends MovieClip { public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmB01(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 556
//zombieArmB02 (zombieArmB02) package { import flash.display.*; public dynamic class zombieArmB02 extends MovieClip { public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmB02(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 557
//zombieArmB03 (zombieArmB03) package { import flash.display.*; public dynamic class zombieArmB03 extends MovieClip { public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmB03(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 558
//zombieArmB04 (zombieArmB04) package { import flash.display.*; public dynamic class zombieArmB04 extends MovieClip { public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmB04(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 559
//zombieArmB05 (zombieArmB05) package { import flash.display.*; public dynamic class zombieArmB05 extends MovieClip { public var bulletOut:MovieClip; public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmB05(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 560
//zombieArmF01 (zombieArmF01) package { import flash.display.*; public dynamic class zombieArmF01 extends MovieClip { public var bulletOut:MovieClip; public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmF01(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 561
//zombieArmF02 (zombieArmF02) package { import flash.display.*; public dynamic class zombieArmF02 extends MovieClip { public var bulletOut:MovieClip; public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmF02(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 562
//zombieArmF03 (zombieArmF03) package { import flash.display.*; public dynamic class zombieArmF03 extends MovieClip { public var bulletOut:MovieClip; public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmF03(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 563
//zombieArmF04 (zombieArmF04) package { import flash.display.*; public dynamic class zombieArmF04 extends MovieClip { public var bulletOut:MovieClip; public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmF04(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 564
//zombieArmF05 (zombieArmF05) package { import flash.display.*; public dynamic class zombieArmF05 extends MovieClip { public var bulletOut:MovieClip; public var animationDone:Boolean; public var attackingDone:Boolean; public function zombieArmF05(){ addFrameScript(0, frame1, 23, frame24, 24, frame25, 56, frame57, 57, frame58, 76, frame77, 77, frame78, 85, frame86, 86, frame87, 107, frame108); } function frame77(){ animationDone = true; } function frame78(){ animationDone = false; attackingDone = false; } function frame86(){ animationDone = true; attackingDone = true; stop(); } function frame87(){ animationDone = false; } function frame1(){ animationDone = false; attackingDone = false; } function frame25(){ animationDone = false; } function frame24(){ animationDone = true; gotoAndPlay("idle"); } function frame108(){ animationDone = true; stop(); } function frame57(){ animationDone = true; } function frame58(){ animationDone = false; } } }//package
Section 565
//zombieBody01 (zombieBody01) package { import flash.display.*; public dynamic class zombieBody01 extends MovieClip { public function zombieBody01(){ addFrameScript(0, frame1, 7, frame8, 13, frame14, 20, frame21); } function frame14(){ stop(); } function frame1(){ stop(); } function frame21(){ stop(); } function frame8(){ stop(); } } }//package
Section 566
//zombieBullet1 (zombieBullet1) package { import flash.display.*; public dynamic class zombieBullet1 extends MovieClip { } }//package
Section 567
//zombieCrawl01 (zombieCrawl01) package { import flash.display.*; public dynamic class zombieCrawl01 extends MovieClip { public var floorDetector:MovieClip; public var ladderDetector:MovieClip; public var torso:MovieClip; public var leg:MovieClip; public var kaki:MovieClip; public var smokeOut:MovieClip; public var shadow:MovieClip; public var kepala:MovieClip; public var weaponHolderb:MovieClip; public var weaponHolderf:MovieClip; public var bloodSign:MovieClip; public var head:MovieClip; public var clipTop:MovieClip; public var badan:MovieClip; } }//package
Section 568
//zombieHand (zombieHand) package { import flash.display.*; public dynamic class zombieHand extends MovieClip { } }//package
Section 569
//zombieNormal01Image (zombieNormal01Image) package { import flash.display.*; public dynamic class zombieNormal01Image extends MovieClip { public var floorDetector:MovieClip; public var ladderDetector:MovieClip; public var torso:MovieClip; public var leg:MovieClip; public var kaki:MovieClip; public var smokeOut:MovieClip; public var shadow:MovieClip; public var kepala:MovieClip; public var weaponHolderb:MovieClip; public var weaponHolderf:MovieClip; public var bloodSign:MovieClip; public var head:MovieClip; public var clipTop:MovieClip; public var badan:MovieClip; } }//package
Section 570
//zombieNormal02Image (zombieNormal02Image) package { import flash.display.*; public dynamic class zombieNormal02Image extends MovieClip { public var floorDetector:MovieClip; public var ladderDetector:MovieClip; public var torso:MovieClip; public var leg:MovieClip; public var kaki:MovieClip; public var smokeOut:MovieClip; public var shadow:MovieClip; public var kepala:MovieClip; public var weaponHolderb:MovieClip; public var weaponHolderf:MovieClip; public var bloodSign:MovieClip; public var head:MovieClip; public var clipTop:MovieClip; public var badan:MovieClip; } }//package
Section 571
//zombieSound1 (zombieSound1) package { import flash.media.*; public dynamic class zombieSound1 extends Sound { } }//package
Section 572
//zombieSound2 (zombieSound2) package { import flash.media.*; public dynamic class zombieSound2 extends Sound { } }//package
Section 573
//zombieSound3 (zombieSound3) package { import flash.media.*; public dynamic class zombieSound3 extends Sound { } }//package
Section 574
//zombieSound4 (zombieSound4) package { import flash.media.*; public dynamic class zombieSound4 extends Sound { } }//package
Section 575
//zombieSound5 (zombieSound5) package { import flash.media.*; public dynamic class zombieSound5 extends Sound { } }//package
Section 576
//zombieSound6 (zombieSound6) package { import flash.media.*; public dynamic class zombieSound6 extends Sound { } }//package
Section 577
//zombieSound7 (zombieSound7) package { import flash.media.*; public dynamic class zombieSound7 extends Sound { } }//package
Section 578
//zombieSound8 (zombieSound8) package { import flash.media.*; public dynamic class zombieSound8 extends Sound { } }//package
Section 579
//zombieSound9 (zombieSound9) package { import flash.media.*; public dynamic class zombieSound9 extends Sound { } }//package

Library Items

Symbol 1 Sound {ClickSound}Used by:273
Symbol 2 BitmapUsed by:3 40 98 348 608
Symbol 3 GraphicUses:2Used by:39
Symbol 4 BitmapUsed by:5 41 610 1082
Symbol 5 GraphicUses:4Used by:6
Symbol 6 MovieClipUses:5Used by:39
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:7Used by:39 69 113 119 158 159 432 529 622 645 886 918 948 970 976 1190 1285 1303 1313 1403 1450
Symbol 9 GraphicUsed by:39
Symbol 10 GraphicUsed by:33
Symbol 11 BitmapUsed by:12
Symbol 12 GraphicUses:11Used by:17
Symbol 13 BitmapUsed by:14
Symbol 14 GraphicUses:13Used by:17 20 23 26 29 32
Symbol 15 GraphicUsed by:17 20 23 26 29 32
Symbol 16 GraphicUsed by:17 20 23 26 29 32
Symbol 17 MovieClipUses:12 14 15 16Used by:33
Symbol 18 BitmapUsed by:19
Symbol 19 GraphicUses:18Used by:20
Symbol 20 MovieClipUses:19 14 15 16Used by:33
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:23
Symbol 23 MovieClipUses:22 14 15 16Used by:33
Symbol 24 BitmapUsed by:25
Symbol 25 GraphicUses:24Used by:26
Symbol 26 MovieClipUses:25 14 15 16Used by:33
Symbol 27 BitmapUsed by:28
Symbol 28 GraphicUses:27Used by:29
Symbol 29 MovieClipUses:28 14 15 16Used by:33
Symbol 30 BitmapUsed by:31
Symbol 31 GraphicUses:30Used by:32
Symbol 32 MovieClipUses:31 14 15 16Used by:33
Symbol 33 MovieClip {Days2Die_fla.mapWorld_409}Uses:10 17 20 23 26 29 32Used by:39
Symbol 34 FontUsed by:35 36 63 100 101 104 108 109 110 111 114 115 116 117 499 500 514 515 520 521 524 525 601 605 606 642 643 1302 1311 1423 1439 1443 1445 1447 1448 1449 1452 1455 1457
Symbol 35 TextUses:34Used by:38
Symbol 36 TextUses:34Used by:38 602
Symbol 37 GraphicUsed by:38 602 894 901 911 917 928 933
Symbol 38 ButtonUses:35 36 37Used by:39 69 119 432 529 586 645 646 1190 1285 1303 1313
Symbol 39 MovieClip {MapScreen}Uses:3 6 8 9 33 38
Symbol 40 GraphicUses:2Used by:69 622 645 1303 1313
Symbol 41 GraphicUses:4Used by:46
Symbol 42 GraphicUsed by:45
Symbol 43 FontUsed by:44 60 102 103 125 126 127 350 353 355 356 386 387 390 392 394 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 585 624 629 632 633 634 636 637 639 640 644 1072 1073 1074 1075 1139 1147 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1188 1427 1451 1461
Symbol 44 TextUses:43Used by:45
Symbol 45 MovieClipUses:42 44Used by:46
Symbol 46 MovieClip {Days2Die_fla.signAd_120}Uses:41 45Used by:69 529 586
Symbol 47 GraphicUsed by:69
Symbol 48 GraphicUsed by:53
Symbol 49 GraphicUsed by:52
Symbol 50 GraphicUsed by:52
Symbol 51 GraphicUsed by:52
Symbol 52 ButtonUses:49 50 51Used by:53
Symbol 53 MovieClip {Days2Die_fla.loadingText_405}Uses:48 52Used by:69
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClipUses:54Used by:69 529
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClipUses:56Used by:69 529
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:58Used by:69 529
Symbol 60 EditableTextUses:43Used by:69
Symbol 61 GraphicUsed by:62
Symbol 62 MovieClipUses:61Used by:69 529
Symbol 63 TextUses:34Used by:69
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClipUses:64Used by:69 529 1285 1313
Symbol 66 FontUsed by:67 96
Symbol 67 TextUses:66Used by:68
Symbol 68 MovieClipUses:67Used by:69 529
Symbol 69 MovieClip {loaderScreen}Uses:40 8 46 47 53 55 57 59 60 62 63 65 38 68
Symbol 70 GraphicUsed by:87
Symbol 71 GraphicUsed by:72 73 75 77 84
Symbol 72 MovieClip {Floor}Uses:71Used by:87 981 1316 1341 1342 1373
Symbol 73 MovieClip {Wall}Uses:71Used by:87 981 1316 1341 1342 1373
Symbol 74 GraphicUsed by:76
Symbol 75 MovieClipUses:71Used by:76
Symbol 76 MovieClip {Days2Die_fla.Ladder_341}Uses:74 75Used by:87 1316 1341 1342
Symbol 77 MovieClipUses:71Used by:81 276 345 498 654 865 1304 1408
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClipUses:78Used by:81
Symbol 80 MovieClipUsed by:81 412 414 498 865 1097 1142 1304 1408
Symbol 81 MovieClip {Egg}Uses:77 79 80Used by:87 981 1316 1341 1342 1373
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClip {PlayerLimit}Uses:82Used by:87 1316 1341 1342 1373  Timeline
Symbol 84 MovieClipUses:71Used by:87 1316 1341 1342 1373
Symbol 85 GraphicUsed by:86 325 607 630 1312 1383 1450
Symbol 86 MovieClipUses:85Used by:87 1316 1340 1341 1342 1367 1372 1373 1383 1387
Symbol 87 MovieClip {middleGroundLevel5}Uses:70 72 73 76 81 83 84 86Used by:Timeline
Symbol 88 GraphicUsed by:89
Symbol 89 MovieClipUses:88Used by:95 171 186 189 194 197 274 279 280 289 292 298 301 307 310 321 447 984 997 1057 1058 1111 1115 1123 1128 1131 1135 1138 1196 1197 1202 1212 1213 1220 1414 1422
Symbol 90 BitmapUsed by:91
Symbol 91 GraphicUses:90Used by:92
Symbol 92 MovieClipUses:91Used by:95 171 186 189 194 197 274 279 280 289 292 298 301 307 310 321 439 447 704 984 997 1057 1058 1111 1115 1123 1128 1131 1135 1138 1196 1197 1202 1212 1213 1220 1414 1422
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClipUses:93Used by:95 171 186 189 194 197 274 279 280 289 292 298 301 307 310 321 447 984 997 1057 1058 1111 1115 1123 1128 1131 1135 1138 1196 1197 1202 1212 1213 1220 1414 1422
Symbol 95 MovieClip {armMinigunB}Uses:89 92 94Used by:Timeline
Symbol 96 TextUses:66Used by:97
Symbol 97 MovieClip {saveClip}Uses:96Used by:Timeline
Symbol 98 GraphicUses:2Used by:113 119
Symbol 99 GraphicUsed by:113
Symbol 100 TextUses:34Used by:113
Symbol 101 TextUses:34Used by:113
Symbol 102 EditableTextUses:43Used by:113
Symbol 103 EditableTextUses:43Used by:113
Symbol 104 TextUses:34Used by:107
Symbol 105 GraphicUsed by:107 1454 1456 1459
Symbol 106 GraphicUsed by:107
Symbol 107 ButtonUses:104 105 106Used by:113
Symbol 108 TextUses:34Used by:112
Symbol 109 TextUses:34Used by:112
Symbol 110 TextUses:34Used by:112
Symbol 111 TextUses:34Used by:112
Symbol 112 MovieClipUses:108 109 110 111Used by:113
Symbol 113 MovieClip {preSubmitHighscores}Uses:98 8 99 100 101 102 103 107 112Used by:Timeline
Symbol 114 TextUses:34Used by:118
Symbol 115 TextUses:34Used by:118
Symbol 116 TextUses:34Used by:118
Symbol 117 TextUses:34Used by:118
Symbol 118 MovieClipUses:114 115 116 117Used by:119
Symbol 119 MovieClip {highscoresClip}Uses:98 8 118 38Used by:Timeline
Symbol 120 GraphicUsed by:159 1403
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClipUses:121Used by:159
Symbol 123 GraphicUsed by:124
Symbol 124 MovieClipUses:123Used by:159
Symbol 125 TextUses:43Used by:129
Symbol 126 TextUses:43Used by:129
Symbol 127 TextUses:43Used by:129
Symbol 128 GraphicUsed by:129
Symbol 129 ButtonUses:125 126 127 128Used by:159 977 1450
Symbol 130 BitmapUsed by:131
Symbol 131 GraphicUses:130Used by:158 1450
Symbol 132 SoundUsed by:158 1450
Symbol 133 BitmapUsed by:134
Symbol 134 GraphicUses:133Used by:158 1450
Symbol 135 SoundUsed by:158 1450
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClipUses:136Used by:158
Symbol 138 GraphicUsed by:139
Symbol 139 MovieClipUses:138Used by:158
Symbol 140 SoundUsed by:158
Symbol 141 BitmapUsed by:142
Symbol 142 GraphicUses:141Used by:158
Symbol 143 BitmapUsed by:144
Symbol 144 GraphicUses:143Used by:158
Symbol 145 BitmapUsed by:146
Symbol 146 GraphicUses:145Used by:147
Symbol 147 MovieClipUses:146Used by:158
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClipUses:148Used by:158 918
Symbol 150 SoundUsed by:158
Symbol 151 BitmapUsed by:152
Symbol 152 GraphicUses:151Used by:153
Symbol 153 MovieClipUses:152Used by:158
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClipUses:154Used by:158 970
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClipUses:156Used by:158
Symbol 158 MovieClip {Days2Die_fla.days2dieintro_13}Uses:8 131 132 134 135 137 139 140 142 144 147 149 150 153 155 157 SS1Used by:159
Symbol 159 MovieClip {introScreen}Uses:120 122 124 8 129 158Used by:Timeline
Symbol 160 GraphicUsed by:162
Symbol 161 GraphicUsed by:162 173 191 276 282 294 303 312 986 1055 1113 1117 1125 1133 1192 1199 1211 1215 1412 1416
Symbol 162 MovieClip {weaponMinigunLogo}Uses:160 161Used by:171
Symbol 163 GraphicUsed by:164
Symbol 164 MovieClip {magMinigun}Uses:163Used by:171  Timeline
Symbol 165 GraphicUsed by:166 436 483 687 1298
Symbol 166 MovieClipUses:165Used by:171 186 194 209 214 279 289 298 307 321 666 997 1058 1115 1123 1128 1135 1196 1202 1212 1220 1224 1309 1410 1414 1422
Symbol 167 GraphicUsed by:171
Symbol 168 GraphicUsed by:171
Symbol 169 GraphicUsed by:171
Symbol 170 GraphicUsed by:171
Symbol 171 MovieClip {armMinigunF}Uses:162 89 92 94 164 166 167 168 169 170Used by:Timeline
Symbol 172 GraphicUsed by:173
Symbol 173 MovieClip {weaponBarretM82Logo}Uses:172 161Used by:186
Symbol 174 GraphicUsed by:182
Symbol 175 GraphicUsed by:182
Symbol 176 GraphicUsed by:182 335
Symbol 177 GraphicUsed by:182
Symbol 178 GraphicUsed by:182
Symbol 179 GraphicUsed by:182
Symbol 180 GraphicUsed by:182
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClip {smokeAnimate}Uses:174 175 176 177 178 179 180 181Used by:186 194 341 981 997
Symbol 183 GraphicUsed by:186 298 1115 1414
Symbol 184 GraphicUsed by:186 194 298 1115 1128 1135 1414
Symbol 185 GraphicUsed by:186
Symbol 186 MovieClip {armBarretM82F}Uses:173 89 92 94 166 182 183 184 185Used by:Timeline
Symbol 187 GraphicUsed by:188
Symbol 188 MovieClip {magBarretM82}Uses:187Used by:189  Timeline
Symbol 189 MovieClip {armBarretM82B}Uses:89 92 94 188Used by:Timeline
Symbol 190 GraphicUsed by:191
Symbol 191 MovieClip {weaponGLM32Logo}Uses:190 161Used by:194
Symbol 192 GraphicUsed by:194 307 321 1196
Symbol 193 GraphicUsed by:194
Symbol 194 MovieClip {armGLM32F}Uses:191 89 92 94 166 182 192 184 193Used by:Timeline
Symbol 195 GraphicUsed by:196
Symbol 196 MovieClip {GLbullet}Uses:195Used by:197  Timeline
Symbol 197 MovieClip {armGLM32B}Uses:89 92 94 196Used by:Timeline
Symbol 198 GraphicUsed by:199
Symbol 199 MovieClip {shell03}Uses:198Used by:Timeline
Symbol 200 GraphicUsed by:201
Symbol 201 MovieClipUses:200Used by:209 214 1224 1225
Symbol 202 GraphicUsed by:203
Symbol 203 MovieClipUses:202Used by:209 214 665 666 1224 1225 1409 1410
Symbol 204 GraphicUsed by:205
Symbol 205 MovieClip {zombieHand}Uses:204Used by:209 214 665 666 1224 1225 1309 1310 1409 1410
Symbol 206 GraphicUsed by:209 666 1224 1309 1410
Symbol 207 GraphicUsed by:209 666 1224 1309 1410
Symbol 208 GraphicUsed by:209 666 1224 1309 1410
Symbol 209 MovieClip {zombieArmF05}Uses:201 203 205 166 206 207 208Used by:Timeline
Symbol 210 GraphicUsed by:213
Symbol 211 GraphicUsed by:212
Symbol 212 MovieClipUses:211Used by:213 347
Symbol 213 MovieClip {weaponAxe}Uses:210 212Used by:214 794
Symbol 214 MovieClip {zombieArmB05}Uses:213 201 203 205 166Used by:Timeline
Symbol 215 Sound {attackSoundBarret}Used by:273
Symbol 216 Sound {spinUp}Used by:273
Symbol 217 Sound {spinDown}Used by:273
Symbol 218 Sound {zombieSound9}Used by:273
Symbol 219 Sound {zombieSound8}Used by:273
Symbol 220 Sound {zombieSound7}Used by:273
Symbol 221 Sound {zombieSound6}Used by:273
Symbol 222 Sound {zombieSound5}Used by:273
Symbol 223 Sound {healthSound}Used by:273
Symbol 224 Sound {introductionSound2}Used by:273
Symbol 225 Sound {Sound1}Used by:273
Symbol 226 Sound {Sound2}Used by:273
Symbol 227 Sound {Sound3}Used by:273
Symbol 228 Sound {Sound4}Used by:273
Symbol 229 Sound {Sound5}Used by:273
Symbol 230 Sound {attackSoundAK}Used by:273
Symbol 231 Sound {ClipIn}Used by:273
Symbol 232 Sound {ClipOut}Used by:273
Symbol 233 Sound {AttackSound}Used by:273
Symbol 234 Sound {explodeSound}Used by:273
Symbol 235 Sound {hurtGuy3}Used by:273
Symbol 236 Sound {hurtGuy1}Used by:273
Symbol 237 Sound {hurtGuy2}Used by:273
Symbol 238 Sound {handGunHitBody}Used by:273
Symbol 239 Sound {BuySound}Used by:273
Symbol 240 Sound {chainSawSound}Used by:273
Symbol 241 Sound {attackSoundDeagle}Used by:273
Symbol 242 Sound {dieSound1}Used by:273
Symbol 243 Sound {dieSound2}Used by:273
Symbol 244 Sound {dieSound3}Used by:273
Symbol 245 Sound {followSound}Used by:273
Symbol 246 Sound {gotShot1}Used by:273
Symbol 247 Sound {gotShot2}Used by:273
Symbol 248 Sound {gotShot3}Used by:273
Symbol 249 Sound {dieGirl}Used by:273
Symbol 250 Sound {dieGirl2}Used by:273
Symbol 251 Sound {hurtGirl1}Used by:273
Symbol 252 Sound {hurtGirl2}Used by:273
Symbol 253 Sound {knifeHit}Used by:273
Symbol 254 Sound {hitWallSound3}Used by:273
Symbol 255 Sound {knifeSlash}Used by:273
Symbol 256 Sound {attackSoundShotgun}Used by:273
Symbol 257 Sound {reloadShotgun}Used by:273
Symbol 258 Sound {pumpShotgun}Used by:273
Symbol 259 Sound {attackSoundM4}Used by:273
Symbol 260 Sound {attackSoundMP5}Used by:273
Symbol 261 Sound {attackSoundUSP}Used by:273
Symbol 262 Sound {hitWallSound2}Used by:273
Symbol 263 Sound {hitWallSound}Used by:273
Symbol 264 Sound {LevelUpSound}Used by:273
Symbol 265 Sound {attackSoundSteyrTMP}Used by:273
Symbol 266 Sound {SellSound}Used by:273
Symbol 267 Sound {attackSoundSteyrUMP}Used by:273
Symbol 268 Sound {waitSound}Used by:273
Symbol 269 Sound {zombieSound1}Used by:273
Symbol 270 Sound {zombieSound2}Used by:273
Symbol 271 Sound {zombieSound3}Used by:273
Symbol 272 Sound {zombieSound4}Used by:273
Symbol 273 MovieClipUses:215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 1Used by:Timeline
Symbol 274 MovieClip {armGrenadeB}Uses:89 92 94Used by:981
Symbol 275 GraphicUsed by:276
Symbol 276 MovieClip {weaponGrenadeLogo}Uses:275 77 161Used by:279  Timeline
Symbol 277 GraphicUsed by:278
Symbol 278 MovieClip {grenadeBullet}Uses:277Used by:279 981
Symbol 279 MovieClip {armGrenadeF}Uses:276 89 92 94 166 278Used by:981
Symbol 280 MovieClip {armKnifeB}Uses:89 92 94Used by:981  Timeline
Symbol 281 GraphicUsed by:282
Symbol 282 MovieClip {weaponKnifeLogo}Uses:281 161Used by:289  Timeline
Symbol 283 GraphicUsed by:289
Symbol 284 GraphicUsed by:289
Symbol 285 GraphicUsed by:289
Symbol 286 GraphicUsed by:289
Symbol 287 GraphicUsed by:289
Symbol 288 GraphicUsed by:289
Symbol 289 MovieClip {armKnifeF}Uses:282 89 92 94 166 283 284 285 286 287 288Used by:981  Timeline
Symbol 290 GraphicUsed by:291
Symbol 291 MovieClip {magM4}Uses:290Used by:292 981
Symbol 292 MovieClip {armM4B}Uses:89 92 94 291Used by:981
Symbol 293 GraphicUsed by:294
Symbol 294 MovieClip {weaponM4Logo}Uses:293 161Used by:298  Timeline
Symbol 295 GraphicUsed by:298
Symbol 296 GraphicUsed by:298
Symbol 297 GraphicUsed by:298
Symbol 298 MovieClip {armM4F}Uses:294 89 92 94 166 295 183 296 184 297Used by:981
Symbol 299 GraphicUsed by:300
Symbol 300 MovieClip {magPistol}Uses:299Used by:301 981
Symbol 301 MovieClip {armPistolB}Uses:89 92 94 300Used by:981
Symbol 302 GraphicUsed by:303
Symbol 303 MovieClip {weaponWaltherP99Logo}Uses:302 161Used by:307  Timeline
Symbol 304 GraphicUsed by:307
Symbol 305 GraphicUsed by:307
Symbol 306 GraphicUsed by:307
Symbol 307 MovieClip {armPistolF}Uses:303 89 92 94 166 304 192 305 306Used by:981
Symbol 308 GraphicUsed by:309
Symbol 309 MovieClip {magSMG}Uses:308Used by:310 981
Symbol 310 MovieClip {armSMGB}Uses:89 92 94 309Used by:981
Symbol 311 GraphicUsed by:312
Symbol 312 MovieClip {weaponSteyrTMPLogo}Uses:311 161Used by:321  Timeline
Symbol 313 GraphicUsed by:321
Symbol 314 GraphicUsed by:321
Symbol 315 GraphicUsed by:321
Symbol 316 GraphicUsed by:321
Symbol 317 GraphicUsed by:321
Symbol 318 GraphicUsed by:321
Symbol 319 GraphicUsed by:321
Symbol 320 GraphicUsed by:321
Symbol 321 MovieClip {armSMGF}Uses:312 89 92 94 166 192 313 314 315 316 317 318 319 320Used by:981
Symbol 322 FontUsed by:323
Symbol 323 EditableTextUses:322Used by:324
Symbol 324 MovieClip {billboard_text}Uses:323Used by:981
Symbol 325 MovieClip {blackBG}Uses:85Used by:981
Symbol 326 GraphicUsed by:327
Symbol 327 MovieClip {blood_clip}Uses:326Used by:981
Symbol 328 GraphicUsed by:329
Symbol 329 MovieClip {blurBG}Uses:328Used by:981
Symbol 330 GraphicUsed by:331
Symbol 331 MovieClip {crosshair}Uses:330Used by:981
Symbol 332 GraphicUsed by:333
Symbol 333 MovieClipUses:332Used by:341
Symbol 334 GraphicUsed by:341
Symbol 335 MovieClipUses:176Used by:341
Symbol 336 GraphicUsed by:341
Symbol 337 GraphicUsed by:341
Symbol 338 GraphicUsed by:341
Symbol 339 GraphicUsed by:341
Symbol 340 GraphicUsed by:341
Symbol 341 MovieClip {explosion}Uses:333 334 182 335 336 337 338 339 340Used by:981
Symbol 342 GraphicUsed by:343
Symbol 343 MovieClip {grenadePin}Uses:342Used by:981
Symbol 344 GraphicUsed by:345
Symbol 345 MovieClip {grenadeSafety}Uses:344 77Used by:981
Symbol 346 GraphicUsed by:347
Symbol 347 MovieClip {handGunBullet}Uses:212 346Used by:981
Symbol 348 GraphicUses:2Used by:432 529 1190 1285
Symbol 349 GraphicUsed by:351
Symbol 350 EditableTextUses:43Used by:351
Symbol 351 MovieClip {Days2Die_fla.meleeWeapon_85}Uses:349 350Used by:388
Symbol 352 GraphicUsed by:354
Symbol 353 EditableTextUses:43Used by:354
Symbol 354 MovieClip {Days2Die_fla.primWeapon_86}Uses:352 353Used by:388
Symbol 355 EditableTextUses:43Used by:388
Symbol 356 EditableTextUses:43Used by:388
Symbol 357 GraphicUsed by:388
Symbol 358 GraphicUsed by:373
Symbol 359 FontUsed by:360 362 363 364 365 367 368 370 372
Symbol 360 TextUses:359Used by:373
Symbol 361 GraphicUsed by:373
Symbol 362 TextUses:359Used by:373
Symbol 363 TextUses:359Used by:373
Symbol 364 TextUses:359Used by:373
Symbol 365 TextUses:359Used by:373
Symbol 366 GraphicUsed by:373
Symbol 367 TextUses:359Used by:373
Symbol 368 TextUses:359Used by:373
Symbol 369 GraphicUsed by:373
Symbol 370 TextUses:359Used by:373
Symbol 371 GraphicUsed by:373
Symbol 372 TextUses:359Used by:373
Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}Uses:358 360 361 362 363 364 365 366 367 368 369 370 371 372Used by:388 412 568 1190
Symbol 374 FontUsed by:375 376 377 378 379 380 381 382 1076 1077 1078 1079 1172 1173 1174 1175 1176 1177 1185 1186
Symbol 375 EditableTextUses:374Used by:388
Symbol 376 EditableTextUses:374Used by:388
Symbol 377 EditableTextUses:374Used by:388
Symbol 378 EditableTextUses:374Used by:388
Symbol 379 EditableTextUses:374Used by:388
Symbol 380 EditableTextUses:374Used by:388
Symbol 381 EditableTextUses:374Used by:388
Symbol 382 EditableTextUses:374Used by:388
Symbol 383 GraphicUsed by:385
Symbol 384 GraphicUsed by:385
Symbol 385 ButtonUses:383 384Used by:388
Symbol 386 EditableTextUses:43Used by:388
Symbol 387 EditableTextUses:43Used by:388
Symbol 388 MovieClip {Days2Die_fla.equipBox_84}Uses:351 354 355 356 357 373 375 376 377 378 379 380 381 382 385 386 387Used by:432
Symbol 389 GraphicUsed by:391 393 395 1140
Symbol 390 TextUses:43Used by:391
Symbol 391 MovieClipUses:389 390Used by:432 1190
Symbol 392 TextUses:43Used by:393
Symbol 393 MovieClipUses:389 392Used by:432 1190
Symbol 394 TextUses:43Used by:395
Symbol 395 MovieClipUses:389 394Used by:432 1190
Symbol 396 GraphicUsed by:412 1170
Symbol 397 EditableTextUses:43Used by:412
Symbol 398 TextUses:43Used by:412
Symbol 399 TextUses:43Used by:412
Symbol 400 EditableTextUses:43Used by:412
Symbol 401 EditableTextUses:43Used by:412
Symbol 402 EditableTextUses:43Used by:412
Symbol 403 EditableTextUses:43Used by:412
Symbol 404 EditableTextUses:43Used by:412
Symbol 405 EditableTextUses:43Used by:412
Symbol 406 EditableTextUses:43Used by:412
Symbol 407 EditableTextUses:43Used by:412
Symbol 408 EditableTextUses:43Used by:412
Symbol 409 EditableTextUses:43Used by:412
Symbol 410 EditableTextUses:43Used by:412
Symbol 411 EditableTextUses:43Used by:412
Symbol 412 MovieClip {Days2Die_fla.explanationBox_92}Uses:396 80 397 398 399 373 400 401 402 403 404 405 406 407 408 409 410 411Used by:432 1190
Symbol 413 GraphicUsed by:414
Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93}Uses:413 80Used by:432
Symbol 415 GraphicUsed by:418
Symbol 416 GraphicUsed by:418 420 1149
Symbol 417 GraphicUsed by:418 420 1149
Symbol 418 ButtonUses:415 416 417Used by:423 586 621 1090 1285
Symbol 419 GraphicUsed by:420
Symbol 420 ButtonUses:419 416 417Used by:423 1090 1285
Symbol 421 FontUsed by:422 425 570 571 572 573 581 582 583 584 600 620 1088 1089 1240
Symbol 422 EditableTextUses:421Used by:423
Symbol 423 MovieClip {Days2Die_fla.chooserBox_94}Uses:418 420 422Used by:432 1190
Symbol 424 FontUsed by:425 431
Symbol 425 TextUses:424 421Used by:432
Symbol 426 GraphicUsed by:430
Symbol 427 GraphicUsed by:430
Symbol 428 GraphicUsed by:430
Symbol 429 GraphicUsed by:430
Symbol 430 ButtonUses:426 427 428 429Used by:432 645 1189 1285 1303 1313
Symbol 431 TextUses:424Used by:432
Symbol 432 MovieClip {weaponInventory}Uses:348 8 388 391 393 395 412 414 423 425 430 431 38Used by:981
Symbol 433 BitmapUsed by:434
Symbol 434 GraphicUses:433Used by:435
Symbol 435 MovieClip {medikit}Uses:434Used by:981
Symbol 436 MovieClip {knifeBullet}Uses:165Used by:981
Symbol 437 GraphicUsed by:438
Symbol 438 MovieClipUses:437Used by:498 865 1304 1408
Symbol 439 MovieClip {Days2Die_fla.maincharLegs_102}Uses:92Used by:498
Symbol 440 GraphicUsed by:446
Symbol 441 GraphicUsed by:446
Symbol 442 GraphicUsed by:446
Symbol 443 GraphicUsed by:446
Symbol 444 GraphicUsed by:446
Symbol 445 GraphicUsed by:446
Symbol 446 MovieClip {Days2Die_fla.mainBody_104}Uses:440 441 442 443 444 445Used by:447
Symbol 447 MovieClip {Days2Die_fla.maincharBody_103}Uses:446 89 92 94Used by:498
Symbol 448 GraphicUsed by:479
Symbol 449 GraphicUsed by:456
Symbol 450 GraphicUsed by:456
Symbol 451 GraphicUsed by:456
Symbol 452 GraphicUsed by:456
Symbol 453 GraphicUsed by:456
Symbol 454 GraphicUsed by:456
Symbol 455 GraphicUsed by:456
Symbol 456 MovieClipUses:449 450 451 452 453 454 455Used by:479 1438
Symbol 457 GraphicUsed by:479
Symbol 458 GraphicUsed by:459
Symbol 459 MovieClipUses:458Used by:479
Symbol 460 GraphicUsed by:479
Symbol 461 GraphicUsed by:479
Symbol 462 GraphicUsed by:479
Symbol 463 GraphicUsed by:479
Symbol 464 GraphicUsed by:479
Symbol 465 GraphicUsed by:470
Symbol 466 GraphicUsed by:470
Symbol 467 GraphicUsed by:470
Symbol 468 GraphicUsed by:470
Symbol 469 GraphicUsed by:470
Symbol 470 MovieClipUses:465 466 467 468 469Used by:479
Symbol 471 GraphicUsed by:479
Symbol 472 GraphicUsed by:479
Symbol 473 GraphicUsed by:479
Symbol 474 GraphicUsed by:479
Symbol 475 GraphicUsed by:479
Symbol 476 GraphicUsed by:479
Symbol 477 GraphicUsed by:479
Symbol 478 GraphicUsed by:479
Symbol 479 MovieClip {mainHead}Uses:448 456 457 459 460 461 462 463 464 470 471 472 473 474 475 476 477 478Used by:480 1170  Timeline
Symbol 480 MovieClip {Days2Die_fla.maincharHead_105}Uses:479Used by:498
Symbol 481 GraphicUsed by:482
Symbol 482 MovieClipUses:481Used by:498 654 865 1304 1408
Symbol 483 MovieClipUses:165Used by:498 656 658 660 662 865 1049 1051 1053 1304 1408
Symbol 484 GraphicUsed by:487
Symbol 485 GraphicUsed by:486 622 978
Symbol 486 MovieClipUses:485Used by:487
Symbol 487 MovieClip {Days2Die_fla.bloodSign_112}Uses:484 486Used by:498 865 1304 1408
Symbol 488 GraphicUsed by:495
Symbol 489 GraphicUsed by:495
Symbol 490 GraphicUsed by:495
Symbol 491 GraphicUsed by:495
Symbol 492 GraphicUsed by:495
Symbol 493 GraphicUsed by:495
Symbol 494 GraphicUsed by:495
Symbol 495 MovieClip {Days2Die_fla.signBaloon_114}Uses:488 489 490 491 492 493 494Used by:498
Symbol 496 GraphicUsed by:497
Symbol 497 MovieClipUses:496Used by:498
Symbol 498 MovieClip {femaleChar}Uses:438 80 439 447 480 77 482 483 487 495 497Used by:981  Timeline
Symbol 499 TextUses:34Used by:502
Symbol 500 TextUses:34Used by:502
Symbol 501 GraphicUsed by:502
Symbol 502 ButtonUses:499 500 501Used by:529
Symbol 503 GraphicUsed by:506
Symbol 504 GraphicUsed by:506
Symbol 505 GraphicUsed by:506 516 635 638 641
Symbol 506 ButtonUses:503 504 505Used by:529
Symbol 507 GraphicUsed by:509
Symbol 508 GraphicUsed by:509
Symbol 509 MovieClip {Days2Die_fla.buttonSound_124}Uses:507 508Used by:529 645 1303
Symbol 510 GraphicUsed by:513
Symbol 511 GraphicUsed by:513
Symbol 512 GraphicUsed by:513 519
Symbol 513 ButtonUses:510 511 512Used by:529
Symbol 514 TextUses:34Used by:516
Symbol 515 TextUses:34Used by:516
Symbol 516 ButtonUses:514 515 505Used by:529 646
Symbol 517 GraphicUsed by:519
Symbol 518 GraphicUsed by:519
Symbol 519 ButtonUses:517 518 512Used by:529
Symbol 520 TextUses:34Used by:523
Symbol 521 TextUses:34Used by:523
Symbol 522 GraphicUsed by:523
Symbol 523 ButtonUses:520 521 522Used by:529
Symbol 524 TextUses:34Used by:527
Symbol 525 TextUses:34Used by:527
Symbol 526 GraphicUsed by:527
Symbol 527 ButtonUses:524 525 526Used by:529
Symbol 528 TextUsed by:529
Symbol 529 MovieClip {mainMenu}Uses:348 55 57 59 8 46 502 506 509 65 513 516 519 523 38 68 527 528 62Used by:981
Symbol 530 GraphicUsed by:646
Symbol 531 GraphicUsed by:532
Symbol 532 MovieClipUses:531Used by:533
Symbol 533 MovieClip {Days2Die_fla.expSign_134}Uses:532Used by:646  Timeline
Symbol 534 FontUsed by:535 536 537 538 539 540 569
Symbol 535 EditableTextUses:534Used by:646
Symbol 536 EditableTextUses:534Used by:646
Symbol 537 TextUses:534Used by:646
Symbol 538 EditableTextUses:534Used by:646
Symbol 539 EditableTextUses:534Used by:646
Symbol 540 EditableTextUses:534Used by:646
Symbol 541 GraphicUsed by:542
Symbol 542 MovieClipUses:541Used by:646
Symbol 543 GraphicUsed by:544
Symbol 544 MovieClipUses:543Used by:646
Symbol 545 GraphicUsed by:546
Symbol 546 MovieClipUses:545Used by:646 1190
Symbol 547 GraphicUsed by:568
Symbol 548 GraphicUsed by:568
Symbol 549 GraphicUsed by:568
Symbol 550 GraphicUsed by:568
Symbol 551 GraphicUsed by:568
Symbol 552 GraphicUsed by:568
Symbol 553 GraphicUsed by:568
Symbol 554 GraphicUsed by:568
Symbol 555 GraphicUsed by:568
Symbol 556 GraphicUsed by:568
Symbol 557 GraphicUsed by:568
Symbol 558 GraphicUsed by:568
Symbol 559 GraphicUsed by:568
Symbol 560 GraphicUsed by:568
Symbol 561 GraphicUsed by:568
Symbol 562 GraphicUsed by:568
Symbol 563 GraphicUsed by:568
Symbol 564 GraphicUsed by:568
Symbol 565 GraphicUsed by:568
Symbol 566 GraphicUsed by:568
Symbol 567 GraphicUsed by:568
Symbol 568 MovieClip {Days2Die_fla.signBullets_139}Uses:547 373 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567Used by:646 1170
Symbol 569 EditableTextUses:534Used by:646
Symbol 570 EditableTextUses:421Used by:646
Symbol 571 EditableTextUses:421Used by:646
Symbol 572 TextUses:421Used by:646
Symbol 573 TextUses:421Used by:646
Symbol 574 GraphicUsed by:575
Symbol 575 MovieClipUses:574Used by:622  Timeline
Symbol 576 GraphicUsed by:577
Symbol 577 MovieClipUses:576Used by:622  Timeline
Symbol 578 GraphicUsed by:579
Symbol 579 MovieClipUses:578Used by:622
Symbol 580 GraphicUsed by:586
Symbol 581 EditableTextUses:421Used by:586
Symbol 582 EditableTextUses:421Used by:586
Symbol 583 EditableTextUses:421Used by:586
Symbol 584 EditableTextUses:421Used by:586
Symbol 585 EditableTextUses:43Used by:586
Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144}Uses:46 38 580 581 582 418 583 584 585Used by:622
Symbol 587 GraphicUsed by:604
Symbol 588 GraphicUsed by:593
Symbol 589 GraphicUsed by:593
Symbol 590 GraphicUsed by:593
Symbol 591 GraphicUsed by:593
Symbol 592 GraphicUsed by:593
Symbol 593 ButtonUses:588 589 590 591 592Used by:604
Symbol 594 GraphicUsed by:599
Symbol 595 GraphicUsed by:599
Symbol 596 GraphicUsed by:599
Symbol 597 GraphicUsed by:599
Symbol 598 GraphicUsed by:599
Symbol 599 ButtonUses:594 595 596 597 598Used by:604
Symbol 600 EditableTextUses:421Used by:604
Symbol 601 TextUses:34Used by:602
Symbol 602 ButtonUses:601 36 37Used by:604
Symbol 603 GraphicUsed by:604
Symbol 604 MovieClip {Days2Die_fla.gameOverMenu_145}Uses:587 593 599 600 602 603Used by:622
Symbol 605 TextUses:34Used by:607
Symbol 606 TextUses:34Used by:607
Symbol 607 ButtonUses:605 606 85Used by:622 645
Symbol 608 GraphicUses:2Used by:609
Symbol 609 MovieClipUses:608Used by:622
Symbol 610 GraphicUses:4Used by:611
Symbol 611 MovieClipUses:610Used by:621
Symbol 612 GraphicUsed by:619
Symbol 613 GraphicUsed by:619
Symbol 614 GraphicUsed by:619
Symbol 615 GraphicUsed by:619
Symbol 616 GraphicUsed by:619
Symbol 617 GraphicUsed by:619
Symbol 618 GraphicUsed by:619
Symbol 619 MovieClipUses:612 613 614 615 616 617 618Used by:621
Symbol 620 EditableTextUses:421Used by:621
Symbol 621 MovieClip {Days2Die_fla.gamePerkMenu_151}Uses:611 619 620 418Used by:622
Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140}Uses:485 40 575 577 579 8 586 604 607 609 621Used by:646
Symbol 623 GraphicUsed by:625
Symbol 624 EditableTextUses:43Used by:625
Symbol 625 MovieClip {Days2Die_fla.infoBox_154}Uses:623 624Used by:646
Symbol 626 GraphicUsed by:628
Symbol 627 GraphicUsed by:628
Symbol 628 ButtonUses:626 627Used by:630
Symbol 629 TextUses:43Used by:630
Symbol 630 MovieClip {Days2Die_fla.upperBar_155}Uses:85 628 629Used by:646
Symbol 631 GraphicUsed by:645
Symbol 632 TextUses:43Used by:645 1303
Symbol 633 TextUses:43Used by:635
Symbol 634 TextUses:43Used by:635
Symbol 635 ButtonUses:633 634 505Used by:645 1303
Symbol 636 TextUses:43Used by:638
Symbol 637 TextUses:43Used by:638
Symbol 638 ButtonUses:636 637 505Used by:645 1303
Symbol 639 TextUses:43Used by:641
Symbol 640 TextUses:43Used by:641
Symbol 641 ButtonUses:639 640 505Used by:645 1303
Symbol 642 TextUses:34Used by:645 1303
Symbol 643 TextUses:34Used by:645
Symbol 644 TextUses:43Used by:645 1303
Symbol 645 MovieClip {optionScreen2}Uses:40 8 631 632 635 638 641 430 607 642 643 509 644 38Used by:646
Symbol 646 MovieClip {menuBarClip}Uses:530 533 535 536 537 538 539 540 542 544 546 568 569 570 571 572 573 516 38 622 625 630 645Used by:981
Symbol 647 GraphicUsed by:648
Symbol 648 MovieClip {shell01}Uses:647Used by:981  Timeline
Symbol 649 GraphicUsed by:650
Symbol 650 MovieClip {Star}Uses:649Used by:981
Symbol 651 GraphicUsed by:652
Symbol 652 MovieClip {Star2}Uses:651Used by:981
Symbol 653 GraphicUsed by:654
Symbol 654 MovieClip {itemGrenade}Uses:482 653 77Used by:981
Symbol 655 GraphicUsed by:656
Symbol 656 MovieClip {itemKnife}Uses:483 655Used by:981
Symbol 657 GraphicUsed by:658
Symbol 658 MovieClip {itemM4}Uses:483 657Used by:981
Symbol 659 GraphicUsed by:660
Symbol 660 MovieClip {itemSteyrTMP}Uses:483 659Used by:981
Symbol 661 GraphicUsed by:662
Symbol 662 MovieClip {itemWaltherP99}Uses:483 661Used by:981
Symbol 663 GraphicUsed by:664
Symbol 664 MovieClipUses:663Used by:665 666 1409 1410
Symbol 665 MovieClip {zombieArmB01}Uses:664 203 205Used by:981
Symbol 666 MovieClip {zombieArmF01}Uses:664 203 205 166 206 207 208Used by:981
Symbol 667 BitmapUsed by:668 777
Symbol 668 GraphicUses:667Used by:686
Symbol 669 GraphicUsed by:686
Symbol 670 GraphicUsed by:686
Symbol 671 GraphicUsed by:686
Symbol 672 GraphicUsed by:686
Symbol 673 GraphicUsed by:686
Symbol 674 GraphicUsed by:686
Symbol 675 GraphicUsed by:686
Symbol 676 GraphicUsed by:686
Symbol 677 GraphicUsed by:686
Symbol 678 GraphicUsed by:686
Symbol 679 GraphicUsed by:686
Symbol 680 GraphicUsed by:686 722 740 758 776 794
Symbol 681 GraphicUsed by:686
Symbol 682 GraphicUsed by:686
Symbol 683 GraphicUsed by:686
Symbol 684 GraphicUsed by:686
Symbol 685 GraphicUsed by:686 722 740 758 776 794
Symbol 686 MovieClip {zombieBody01}Uses:668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685Used by:795 981
Symbol 687 MovieClip {zombieBullet1}Uses:165Used by:981
Symbol 688 BitmapUsed by:689 692
Symbol 689 GraphicUses:688Used by:703
Symbol 690 BitmapUsed by:691
Symbol 691 GraphicUses:690Used by:703
Symbol 692 GraphicUses:688Used by:703
Symbol 693 GraphicUsed by:703 809 823 836 849 858
Symbol 694 GraphicUsed by:703 809 823 836 849 858
Symbol 695 GraphicUsed by:703 809 823 836 849 858
Symbol 696 GraphicUsed by:703
Symbol 697 GraphicUsed by:703 809 823 836 849 858
Symbol 698 GraphicUsed by:703
Symbol 699 BitmapUsed by:700
Symbol 700 GraphicUses:699Used by:703
Symbol 701 GraphicUsed by:703
Symbol 702 GraphicUsed by:703
Symbol 703 MovieClip {Days2Die_fla.zombieHead01_175}Uses:689 691 692 693 694 695 696 697 698 700 701 702Used by:859 981
Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177}Uses:92Used by:865 1304
Symbol 705 BitmapUsed by:706
Symbol 706 GraphicUses:705Used by:722
Symbol 707 GraphicUsed by:722
Symbol 708 GraphicUsed by:722
Symbol 709 GraphicUsed by:722
Symbol 710 GraphicUsed by:722
Symbol 711 GraphicUsed by:722
Symbol 712 GraphicUsed by:722
Symbol 713 GraphicUsed by:722
Symbol 714 GraphicUsed by:722
Symbol 715 GraphicUsed by:722
Symbol 716 GraphicUsed by:722
Symbol 717 GraphicUsed by:722
Symbol 718 GraphicUsed by:722
Symbol 719 GraphicUsed by:722
Symbol 720 GraphicUsed by:722
Symbol 721 GraphicUsed by:722
Symbol 722 MovieClip {Days2Die_fla.zombieBody02_180}Uses:706 707 708 709 710 711 712 713 714 715 716 717 680 718 719 720 721 685Used by:795
Symbol 723 BitmapUsed by:724
Symbol 724 GraphicUses:723Used by:740
Symbol 725 GraphicUsed by:740
Symbol 726 GraphicUsed by:740
Symbol 727 GraphicUsed by:740
Symbol 728 GraphicUsed by:740
Symbol 729 GraphicUsed by:740
Symbol 730 GraphicUsed by:740
Symbol 731 GraphicUsed by:740
Symbol 732 GraphicUsed by:740
Symbol 733 GraphicUsed by:740
Symbol 734 GraphicUsed by:740
Symbol 735 GraphicUsed by:740
Symbol 736 GraphicUsed by:740
Symbol 737 GraphicUsed by:740
Symbol 738 GraphicUsed by:740
Symbol 739 GraphicUsed by:740
Symbol 740 MovieClip {Days2Die_fla.zombieBody03_181}Uses:724 725 726 727 728 729 730 731 732 733 734 735 680 736 737 738 739 685Used by:795
Symbol 741 BitmapUsed by:742
Symbol 742 GraphicUses:741Used by:758
Symbol 743 GraphicUsed by:758
Symbol 744 GraphicUsed by:758
Symbol 745 GraphicUsed by:758
Symbol 746 GraphicUsed by:758
Symbol 747 GraphicUsed by:758
Symbol 748 GraphicUsed by:758
Symbol 749 GraphicUsed by:758
Symbol 750 GraphicUsed by:758
Symbol 751 GraphicUsed by:758
Symbol 752 GraphicUsed by:758
Symbol 753 GraphicUsed by:758
Symbol 754 GraphicUsed by:758
Symbol 755 GraphicUsed by:758
Symbol 756 GraphicUsed by:758
Symbol 757 GraphicUsed by:758
Symbol 758 MovieClip {Days2Die_fla.zombieBody04_182}Uses:742 743 744 745 746 747 748 749 750 751 752 753 680 754 755 756 757 685Used by:795
Symbol 759 BitmapUsed by:760
Symbol 760 GraphicUses:759Used by:776
Symbol 761 GraphicUsed by:776
Symbol 762 GraphicUsed by:776
Symbol 763 GraphicUsed by:776
Symbol 764 GraphicUsed by:776
Symbol 765 GraphicUsed by:776
Symbol 766 GraphicUsed by:776
Symbol 767 GraphicUsed by:776
Symbol 768 GraphicUsed by:776
Symbol 769 GraphicUsed by:776
Symbol 770 GraphicUsed by:776
Symbol 771 GraphicUsed by:776
Symbol 772 GraphicUsed by:776
Symbol 773 GraphicUsed by:776
Symbol 774 GraphicUsed by:776
Symbol 775 GraphicUsed by:776
Symbol 776 MovieClip {Days2Die_fla.zombieBody05_183}Uses:760 761 762 763 764 765 766 767 768 769 770 771 680 772 773 774 775 685Used by:795
Symbol 777 GraphicUses:667Used by:794
Symbol 778 GraphicUsed by:794
Symbol 779 GraphicUsed by:794
Symbol 780 GraphicUsed by:794
Symbol 781 GraphicUsed by:794
Symbol 782 GraphicUsed by:794
Symbol 783 GraphicUsed by:794
Symbol 784 GraphicUsed by:794
Symbol 785 GraphicUsed by:794
Symbol 786 GraphicUsed by:794
Symbol 787 GraphicUsed by:794
Symbol 788 GraphicUsed by:794
Symbol 789 GraphicUsed by:794
Symbol 790 GraphicUsed by:794
Symbol 791 GraphicUsed by:794
Symbol 792 GraphicUsed by:794
Symbol 793 GraphicUsed by:794
Symbol 794 MovieClip {Days2Die_fla.zombieBody06_184}Uses:777 213 778 779 780 781 782 783 784 785 786 787 788 789 680 790 791 792 793 685Used by:795
Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179}Uses:686 722 740 758 776 794Used by:796
Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178}Uses:795Used by:865 1304 1408
Symbol 797 BitmapUsed by:798
Symbol 798 GraphicUses:797Used by:809
Symbol 799 BitmapUsed by:800
Symbol 800 GraphicUses:799Used by:809
Symbol 801 BitmapUsed by:802
Symbol 802 GraphicUses:801Used by:809
Symbol 803 GraphicUsed by:809
Symbol 804 GraphicUsed by:809
Symbol 805 BitmapUsed by:806
Symbol 806 GraphicUses:805Used by:809
Symbol 807 GraphicUsed by:809
Symbol 808 GraphicUsed by:809
Symbol 809 MovieClip {Days2Die_fla.zombieHead02_187}Uses:798 800 802 693 694 695 803 697 804 806 807 808Used by:859
Symbol 810 BitmapUsed by:811
Symbol 811 GraphicUses:810Used by:823
Symbol 812 BitmapUsed by:813
Symbol 813 GraphicUses:812Used by:823
Symbol 814 BitmapUsed by:815
Symbol 815 GraphicUses:814Used by:823
Symbol 816 GraphicUsed by:823
Symbol 817 GraphicUsed by:823
Symbol 818 BitmapUsed by:819
Symbol 819 GraphicUses:818Used by:823
Symbol 820 GraphicUsed by:823
Symbol 821 GraphicUsed by:823
Symbol 822 GraphicUsed by:823
Symbol 823 MovieClip {Days2Die_fla.zombieHead03_188}Uses:811 813 815 693 694 695 816 697 817 819 820 821 822Used by:859
Symbol 824 BitmapUsed by:825
Symbol 825 GraphicUses:824Used by:836
Symbol 826 BitmapUsed by:827
Symbol 827 GraphicUses:826Used by:836
Symbol 828 BitmapUsed by:829
Symbol 829 GraphicUses:828Used by:836
Symbol 830 GraphicUsed by:836
Symbol 831 GraphicUsed by:836
Symbol 832 BitmapUsed by:833
Symbol 833 GraphicUses:832Used by:836
Symbol 834 GraphicUsed by:836
Symbol 835 GraphicUsed by:836
Symbol 836 MovieClip {Days2Die_fla.zombieHead04_189}Uses:825 827 829 693 694 695 830 697 831 833 834 835Used by:859
Symbol 837 BitmapUsed by:838
Symbol 838 GraphicUses:837Used by:849 858
Symbol 839 BitmapUsed by:840
Symbol 840 GraphicUses:839Used by:849 858
Symbol 841 BitmapUsed by:842 851
Symbol 842 GraphicUses:841Used by:849
Symbol 843 GraphicUsed by:849
Symbol 844 GraphicUsed by:849
Symbol 845 BitmapUsed by:846
Symbol 846 GraphicUses:845Used by:849 858
Symbol 847 GraphicUsed by:849
Symbol 848 GraphicUsed by:849
Symbol 849 MovieClip {Days2Die_fla.zombieHead05_190}Uses:838 840 842 693 694 695 843 697 844 846 847 848Used by:859
Symbol 850 GraphicUsed by:858
Symbol 851 GraphicUses:841Used by:858
Symbol 852 GraphicUsed by:858
Symbol 853 GraphicUsed by:858
Symbol 854 GraphicUsed by:858
Symbol 855 GraphicUsed by:858
Symbol 856 GraphicUsed by:858
Symbol 857 GraphicUsed by:858
Symbol 858 MovieClip {Days2Die_fla.zombieHead06_191}Uses:838 850 840 851 852 853 693 694 695 854 697 855 846 856 857Used by:859
Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186}Uses:703 809 823 836 849 858Used by:864 1408
Symbol 860 GraphicUsed by:864
Symbol 861 GraphicUsed by:864
Symbol 862 GraphicUsed by:864
Symbol 863 GraphicUsed by:864
Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185}Uses:859 860 861 862 863Used by:865 1304
Symbol 865 MovieClip {zombieNormal01Image}Uses:438 704 80 796 864 487 77 482 483Used by:981
Symbol 866 GraphicUsed by:886 918 948 970 976
Symbol 867 GraphicUsed by:868
Symbol 868 MovieClipUses:867Used by:886
Symbol 869 GraphicUsed by:870
Symbol 870 MovieClipUses:869Used by:886
Symbol 871 GraphicUsed by:876
Symbol 872 GraphicUsed by:876
Symbol 873 GraphicUsed by:876
Symbol 874 GraphicUsed by:876
Symbol 875 GraphicUsed by:876
Symbol 876 MovieClipUses:871 872 873 874 875Used by:886
Symbol 877 GraphicUsed by:878
Symbol 878 MovieClipUses:877Used by:886 976
Symbol 879 GraphicUsed by:880
Symbol 880 MovieClipUses:879Used by:886 918
Symbol 881 FontUsed by:882 883 884 885
Symbol 882 TextUses:881Used by:886
Symbol 883 TextUses:881Used by:886
Symbol 884 TextUses:881Used by:886
Symbol 885 TextUses:881Used by:886
Symbol 886 MovieClipUses:866 868 870 876 878 8 880 882 883 884 885Used by:977
Symbol 887 GraphicUsed by:888
Symbol 888 MovieClipUses:887Used by:918
Symbol 889 GraphicUsed by:894
Symbol 890 GraphicUsed by:894
Symbol 891 GraphicUsed by:894 901 911 917
Symbol 892 GraphicUsed by:894
Symbol 893 GraphicUsed by:894
Symbol 894 MovieClip {Days2Die_fla.sc2ly2_201}Uses:889 37 890 891 892 893Used by:918
Symbol 895 FontUsed by:896 904 945 946 947
Symbol 896 TextUses:895Used by:918
Symbol 897 GraphicUsed by:901
Symbol 898 GraphicUsed by:901
Symbol 899 GraphicUsed by:901
Symbol 900 GraphicUsed by:901
Symbol 901 MovieClipUses:897 37 898 891 899 900Used by:918
Symbol 902 GraphicUsed by:903
Symbol 903 MovieClipUses:902Used by:918
Symbol 904 TextUses:895Used by:918
Symbol 905 GraphicUsed by:911 917
Symbol 906 GraphicUsed by:907
Symbol 907 MovieClipUses:906Used by:911 928 933
Symbol 908 GraphicUsed by:909
Symbol 909 MovieClipUses:908Used by:911
Symbol 910 GraphicUsed by:911
Symbol 911 MovieClip {Days2Die_fla.sc2ly4_204}Uses:905 37 907 909 891 910Used by:918
Symbol 912 GraphicUsed by:917
Symbol 913 GraphicUsed by:914
Symbol 914 MovieClipUses:913Used by:917
Symbol 915 GraphicUsed by:916
Symbol 916 MovieClipUses:915Used by:917
Symbol 917 MovieClip {Days2Die_fla.sc2ly5_207}Uses:905 37 912 891 914 916Used by:918
Symbol 918 MovieClipUses:866 149 8 888 894 880 896 901 903 904 911 917Used by:977
Symbol 919 GraphicUsed by:948 970
Symbol 920 GraphicUsed by:925 940
Symbol 921 GraphicUsed by:923
Symbol 922 GraphicUsed by:923
Symbol 923 MovieClipUses:921 922Used by:925
Symbol 924 GraphicUsed by:925
Symbol 925 MovieClipUses:920 923 924Used by:948
Symbol 926 GraphicUsed by:928 933
Symbol 927 GraphicUsed by:928 933
Symbol 928 MovieClip {Days2Die_fla.sc3ly4_213}Uses:926 37 907 927Used by:948
Symbol 929 GraphicUsed by:933
Symbol 930 GraphicUsed by:933
Symbol 931 GraphicUsed by:933
Symbol 932 GraphicUsed by:933
Symbol 933 MovieClip {Days2Die_fla.sc3ly3_214}Uses:926 37 929 907 927 930 931 932Used by:948
Symbol 934 GraphicUsed by:938
Symbol 935 GraphicUsed by:938
Symbol 936 GraphicUsed by:938
Symbol 937 GraphicUsed by:938
Symbol 938 MovieClipUses:934 935 936 937Used by:940
Symbol 939 GraphicUsed by:940
Symbol 940 MovieClipUses:920 938 939Used by:948 970
Symbol 941 GraphicUsed by:948
Symbol 942 GraphicUsed by:948
Symbol 943 GraphicUsed by:944
Symbol 944 MovieClipUses:943Used by:948
Symbol 945 TextUses:895Used by:948
Symbol 946 TextUses:895Used by:948
Symbol 947 TextUses:895Used by:948
Symbol 948 MovieClipUses:866 919 925 928 8 933 940 941 942 944 945 946 947Used by:977
Symbol 949 GraphicUsed by:950
Symbol 950 MovieClipUses:949Used by:970
Symbol 951 GraphicUsed by:952
Symbol 952 MovieClipUses:951Used by:970
Symbol 953 GraphicUsed by:954
Symbol 954 MovieClipUses:953Used by:970
Symbol 955 GraphicUsed by:956
Symbol 956 MovieClipUses:955Used by:970
Symbol 957 GraphicUsed by:958
Symbol 958 MovieClipUses:957Used by:970
Symbol 959 GraphicUsed by:970
Symbol 960 GraphicUsed by:970
Symbol 961 GraphicUsed by:970
Symbol 962 GraphicUsed by:970
Symbol 963 GraphicUsed by:970
Symbol 964 GraphicUsed by:970
Symbol 965 GraphicUsed by:970
Symbol 966 GraphicUsed by:970
Symbol 967 GraphicUsed by:970
Symbol 968 GraphicUsed by:970
Symbol 969 GraphicUsed by:970
Symbol 970 MovieClipUses:866 919 940 155 8 950 952 954 956 958 959 960 961 962 963 964 965 966 967 968 969Used by:977
Symbol 971 GraphicUsed by:976
Symbol 972 GraphicUsed by:976
Symbol 973 GraphicUsed by:974
Symbol 974 MovieClipUses:973Used by:976
Symbol 975 GraphicUsed by:976
Symbol 976 MovieClipUses:866 971 972 974 8 975 878Used by:977
Symbol 977 MovieClip {movieLevel1}Uses:886 129 918 948 970 976Used by:981
Symbol 978 MovieClip {TestBox0}Uses:485Used by:981  Timeline
Symbol 979 GraphicUsed by:980
Symbol 980 MovieClip {handSign}Uses:979Used by:981
Symbol 981 MovieClipUses:274 279 280 289 292 298 301 307 310 321 324 325 327 329 331 81 341 72 278 343 345 347 432 435 436 291 300 309 498 529 646 648 182 650 652 73 654 656 658 660 662 665 666 686 687 703 865 977 978 980Used by:Timeline
Symbol 982 GraphicUsed by:983
Symbol 983 MovieClip {shell02}Uses:982Used by:984  Timeline
Symbol 984 MovieClip {armShotGunB}Uses:89 92 94 983Used by:Timeline
Symbol 985 GraphicUsed by:986
Symbol 986 MovieClip {weaponShotGunLogo}Uses:985 161Used by:997  Timeline
Symbol 987 GraphicUsed by:997
Symbol 988 GraphicUsed by:997
Symbol 989 GraphicUsed by:997
Symbol 990 GraphicUsed by:997
Symbol 991 GraphicUsed by:997
Symbol 992 GraphicUsed by:997
Symbol 993 GraphicUsed by:997
Symbol 994 GraphicUsed by:997
Symbol 995 GraphicUsed by:997
Symbol 996 GraphicUsed by:997
Symbol 997 MovieClip {armShotGunF}Uses:986 89 92 94 166 182 987 988 989 990 991 992 993 994 995 996Used by:Timeline
Symbol 998 GraphicUsed by:999
Symbol 999 MovieClip {blood_floor0}Uses:998Used by:Timeline
Symbol 1000 GraphicUsed by:1001
Symbol 1001 MovieClip {blood_floor1}Uses:1000Used by:Timeline
Symbol 1002 GraphicUsed by:1003
Symbol 1003 MovieClip {blood_floor2}Uses:1002Used by:Timeline
Symbol 1004 GraphicUsed by:1005
Symbol 1005 MovieClipUses:1004Used by:Timeline
Symbol 1006 GraphicUsed by:1007
Symbol 1007 MovieClip {blood_shoot0}Uses:1006Used by:Timeline
Symbol 1008 GraphicUsed by:1009
Symbol 1009 MovieClip {blood_shoot1}Uses:1008Used by:Timeline
Symbol 1010 GraphicUsed by:1011
Symbol 1011 MovieClip {blood_shoot2}Uses:1010Used by:Timeline
Symbol 1012 GraphicUsed by:1013
Symbol 1013 MovieClipUses:1012Used by:1399  Timeline
Symbol 1014 GraphicUsed by:1015
Symbol 1015 MovieClipUses:1014Used by:Timeline
Symbol 1016 GraphicUsed by:1017
Symbol 1017 MovieClipUses:1016Used by:Timeline
Symbol 1018 GraphicUsed by:1019
Symbol 1019 MovieClipUses:1018Used by:Timeline
Symbol 1020 GraphicUsed by:1021
Symbol 1021 MovieClip {gibs_bone0}Uses:1020Used by:Timeline
Symbol 1022 GraphicUsed by:1023
Symbol 1023 MovieClip {gibs_bone1}Uses:1022Used by:Timeline
Symbol 1024 GraphicUsed by:1025
Symbol 1025 MovieClip {gibs_bone2}Uses:1024Used by:Timeline
Symbol 1026 GraphicUsed by:1027
Symbol 1027 MovieClip {gibs_brain0}Uses:1026Used by:Timeline
Symbol 1028 GraphicUsed by:1029
Symbol 1029 MovieClip {gibs_meat0}Uses:1028Used by:Timeline
Symbol 1030 GraphicUsed by:1031
Symbol 1031 MovieClip {gibs_meat1}Uses:1030Used by:Timeline
Symbol 1032 GraphicUsed by:1033
Symbol 1033 MovieClip {gibs_meat2}Uses:1032Used by:Timeline
Symbol 1034 GraphicUsed by:1035
Symbol 1035 MovieClip {gibs_meat3}Uses:1034Used by:Timeline
Symbol 1036 GraphicUsed by:1037
Symbol 1037 MovieClip {gibs_meat4}Uses:1036Used by:Timeline
Symbol 1038 GraphicUsed by:1039
Symbol 1039 MovieClip {gibs_meat5}Uses:1038Used by:Timeline
Symbol 1040 GraphicUsed by:1041
Symbol 1041 MovieClipUses:1040Used by:Timeline
Symbol 1042 GraphicUsed by:1043
Symbol 1043 MovieClipUses:1042Used by:Timeline
Symbol 1044 GraphicUsed by:1045
Symbol 1045 MovieClipUses:1044Used by:Timeline
Symbol 1046 GraphicUsed by:1047
Symbol 1047 MovieClipUses:1046Used by:Timeline
Symbol 1048 GraphicUsed by:1049
Symbol 1049 MovieClip {itemBaseballBat}Uses:483 1048Used by:Timeline
Symbol 1050 GraphicUsed by:1051 1056
Symbol 1051 MovieClip {itemStick}Uses:483 1050Used by:Timeline
Symbol 1052 GraphicUsed by:1053
Symbol 1053 MovieClip {itemShotGun}Uses:483 1052Used by:Timeline
Symbol 1054 GraphicUsed by:1055
Symbol 1055 MovieClip {weaponBaseballBatLogo}Uses:1054 161Used by:1058  Timeline
Symbol 1056 MovieClip {weaponStickLogo}Uses:1050Used by:Timeline
Symbol 1057 MovieClip {armBaseballBatB}Uses:89 92 94Used by:Timeline
Symbol 1058 MovieClip {armBaseballBatF}Uses:1055 89 92 94 166Used by:Timeline
Symbol 1059 GraphicUsed by:1060
Symbol 1060 MovieClip {TestTriangleB0}Uses:1059Used by:Timeline
Symbol 1061 GraphicUsed by:1062
Symbol 1062 MovieClip {TestTriangleA0}Uses:1061Used by:Timeline
Symbol 1063 GraphicUsed by:1064
Symbol 1064 MovieClip {TestBox1}Uses:1063Used by:Timeline
Symbol 1065 GraphicUsed by:1066
Symbol 1066 MovieClip {TestRect1}Uses:1065Used by:Timeline
Symbol 1067 GraphicUsed by:1068
Symbol 1068 MovieClip {TestTriangleA1}Uses:1067Used by:Timeline
Symbol 1069 GraphicUsed by:1070
Symbol 1070 MovieClip {TestTriangleB1}Uses:1069Used by:Timeline
Symbol 1071 GraphicUsed by:1080 1081
Symbol 1072 TextUses:43Used by:1081
Symbol 1073 TextUses:43Used by:1081
Symbol 1074 EditableTextUses:43Used by:1081
Symbol 1075 EditableTextUses:43Used by:1081
Symbol 1076 TextUses:374Used by:1080
Symbol 1077 TextUses:374Used by:1080
Symbol 1078 EditableTextUses:374Used by:1080
Symbol 1079 EditableTextUses:374Used by:1080
Symbol 1080 MovieClip {Days2Die_fla.insideInfoBarricade_272}Uses:1071 1076 1077 1078 1079Used by:1081
Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271}Uses:1071 1072 1073 1074 1075 1080Used by:1097
Symbol 1082 GraphicUses:4Used by:1083
Symbol 1083 MovieClipUses:1082Used by:1097
Symbol 1084 GraphicUsed by:1087
Symbol 1085 GraphicUsed by:1087
Symbol 1086 GraphicUsed by:1087
Symbol 1087 ButtonUses:1084 1085 1086Used by:1097
Symbol 1088 TextUses:421Used by:1097
Symbol 1089 EditableTextUses:421Used by:1097
Symbol 1090 MovieClip {Days2Die_fla.chooserBoxcopy_275}Uses:418 420Used by:1097
Symbol 1091 GraphicUsed by:1093
Symbol 1092 GraphicUsed by:1093
Symbol 1093 MovieClip {Days2Die_fla.buldozerButton_276}Uses:1091 1092Used by:1097
Symbol 1094 GraphicUsed by:1096
Symbol 1095 GraphicUsed by:1096
Symbol 1096 MovieClip {Days2Die_fla.hideButton_277}Uses:1094 1095Used by:1097
Symbol 1097 MovieClip {barricadeShop}Uses:1081 1083 1087 1088 1089 80 1090 1093 1096Used by:Timeline
Symbol 1098 GraphicUsed by:1099
Symbol 1099 MovieClip {TestRect0}Uses:1098Used by:Timeline
Symbol 1100 GraphicUsed by:1108
Symbol 1101 GraphicUsed by:1104
Symbol 1102 FontUsed by:1103 1106
Symbol 1103 TextUses:1102Used by:1104
Symbol 1104 MovieClipUses:1101 1103Used by:1108
Symbol 1105 GraphicUsed by:1107
Symbol 1106 TextUses:1102Used by:1107
Symbol 1107 MovieClipUses:1105 1106Used by:1108
Symbol 1108 MovieClip {talkSymbol}Uses:1100 1104 1107Used by:Timeline
Symbol 1109 GraphicUsed by:1110
Symbol 1110 MovieClip {magAK}Uses:1109Used by:1111  Timeline
Symbol 1111 MovieClip {armAKB}Uses:89 92 94 1110Used by:Timeline
Symbol 1112 GraphicUsed by:1113
Symbol 1113 MovieClip {weaponAKLogo}Uses:1112 161Used by:1115  Timeline
Symbol 1114 GraphicUsed by:1115
Symbol 1115 MovieClip {armAKF}Uses:1113 89 92 94 166 183 184 1114Used by:Timeline
Symbol 1116 GraphicUsed by:1117 1123
Symbol 1117 MovieClip {weaponDeagleLogo}Uses:1116 161Used by:1123  Timeline
Symbol 1118 GraphicUsed by:1123
Symbol 1119 GraphicUsed by:1123
Symbol 1120 GraphicUsed by:1123
Symbol 1121 GraphicUsed by:1123
Symbol 1122 GraphicUsed by:1123
Symbol 1123 MovieClip {armDeagleF}Uses:1117 89 92 94 166 1118 1119 1120 1121 1122 1116Used by:Timeline
Symbol 1124 GraphicUsed by:1125
Symbol 1125 MovieClip {weaponMPULogo}Uses:1124 161Used by:1128  Timeline
Symbol 1126 GraphicUsed by:1128 1135
Symbol 1127 GraphicUsed by:1128
Symbol 1128 MovieClip {armMPUF}Uses:1125 89 92 94 166 1126 184 1127Used by:Timeline
Symbol 1129 GraphicUsed by:1130
Symbol 1130 MovieClip {magUMP}Uses:1129Used by:1131  Timeline
Symbol 1131 MovieClip {armMPUB}Uses:89 92 94 1130Used by:Timeline
Symbol 1132 GraphicUsed by:1133
Symbol 1133 MovieClip {weaponSM5Logo}Uses:1132 161Used by:1135  Timeline
Symbol 1134 GraphicUsed by:1135
Symbol 1135 MovieClip {armSM5F}Uses:1133 89 92 94 166 1126 184 1134Used by:Timeline
Symbol 1136 GraphicUsed by:1137
Symbol 1137 MovieClip {magMP5}Uses:1136Used by:1138  Timeline
Symbol 1138 MovieClip {armSM5B}Uses:89 92 94 1137Used by:Timeline
Symbol 1139 TextUses:43Used by:1140
Symbol 1140 MovieClipUses:389 1139Used by:1190
Symbol 1141 GraphicUsed by:1142
Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298}Uses:1141 80Used by:1190
Symbol 1143 GraphicUsed by:1146
Symbol 1144 GraphicUsed by:1146
Symbol 1145 GraphicUsed by:1146
Symbol 1146 ButtonUses:1143 1144 1145Used by:1190
Symbol 1147 EditableTextUses:43Used by:1190
Symbol 1148 GraphicUsed by:1149
Symbol 1149 ButtonUses:1148 416 417Used by:1190
Symbol 1150 GraphicUsed by:1153
Symbol 1151 GraphicUsed by:1153 1156 1158
Symbol 1152 GraphicUsed by:1153
Symbol 1153 ButtonUses:1150 1151 1152Used by:1190
Symbol 1154 GraphicUsed by:1156
Symbol 1155 GraphicUsed by:1156 1158
Symbol 1156 ButtonUses:1154 1151 1155Used by:1190
Symbol 1157 GraphicUsed by:1158
Symbol 1158 ButtonUses:1157 1151 1155Used by:1190
Symbol 1159 EditableTextUses:43Used by:1170
Symbol 1160 TextUses:43Used by:1170
Symbol 1161 TextUses:43Used by:1170
Symbol 1162 EditableTextUses:43Used by:1170
Symbol 1163 EditableTextUses:43Used by:1170
Symbol 1164 TextUses:43Used by:1170
Symbol 1165 EditableTextUses:43Used by:1170
Symbol 1166 TextUses:43Used by:1170
Symbol 1167 EditableTextUses:43Used by:1170
Symbol 1168 TextUses:43Used by:1170
Symbol 1169 EditableTextUses:43Used by:1170
Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304}Uses:396 1159 1160 1161 1162 1163 1164 1165 479 568 1166 1167 1168 1169Used by:1190
Symbol 1171 GraphicUsed by:1190
Symbol 1172 EditableTextUses:374Used by:1190
Symbol 1173 EditableTextUses:374Used by:1190
Symbol 1174 EditableTextUses:374Used by:1190
Symbol 1175 EditableTextUses:374Used by:1190
Symbol 1176 EditableTextUses:374Used by:1190
Symbol 1177 EditableTextUses:374Used by:1190
Symbol 1178 GraphicUsed by:1181
Symbol 1179 GraphicUsed by:1181
Symbol 1180 GraphicUsed by:1181 1184
Symbol 1181 ButtonUses:1178 1179 1180Used by:1190
Symbol 1182 GraphicUsed by:1184
Symbol 1183 GraphicUsed by:1184
Symbol 1184 ButtonUses:1182 1183 1180Used by:1190
Symbol 1185 EditableTextUses:374Used by:1190
Symbol 1186 EditableTextUses:374Used by:1190
Symbol 1187 GraphicUsed by:1189 1460 1462
Symbol 1188 EditableTextUses:43Used by:1189
Symbol 1189 MovieClip {Days2Die_fla.shopWarning_307}Uses:1187 430 1188Used by:1190
Symbol 1190 MovieClip {shopScreen}Uses:348 8 1140 391 393 395 412 1142 423 1146 546 1147 1149 1153 1156 1158 1170 1171 373 1172 1173 1174 1175 1176 1177 1181 1184 1185 1186 1189 38Used by:Timeline
Symbol 1191 GraphicUsed by:1192
Symbol 1192 MovieClip {weaponBerettaLogo}Uses:1191 161Used by:1196  Timeline
Symbol 1193 GraphicUsed by:1196
Symbol 1194 GraphicUsed by:1196
Symbol 1195 GraphicUsed by:1196
Symbol 1196 MovieClip {armBerettaF}Uses:1192 89 92 94 166 1193 192 1194 1195Used by:Timeline
Symbol 1197 MovieClip {armChainSawB}Uses:89 92 94Used by:Timeline
Symbol 1198 GraphicUsed by:1199
Symbol 1199 MovieClip {weaponChainSawLogo}Uses:1198 161Used by:1202  Timeline
Symbol 1200 GraphicUsed by:1202
Symbol 1201 GraphicUsed by:1202
Symbol 1202 MovieClip {armChainSawF}Uses:1199 89 92 94 166 1200 1201Used by:Timeline
Symbol 1203 GraphicUsed by:1211
Symbol 1204 GraphicUsed by:1209
Symbol 1205 GraphicUsed by:1209
Symbol 1206 GraphicUsed by:1209
Symbol 1207 GraphicUsed by:1209
Symbol 1208 GraphicUsed by:1209
Symbol 1209 MovieClipUses:1204 1205 1206 1207 1208Used by:1211 1223
Symbol 1210 GraphicUsed by:1211
Symbol 1211 MovieClip {weaponDynamiteLogo}Uses:1203 1209 1210 161Used by:1212  Timeline
Symbol 1212 MovieClip {armDynamiteF}Uses:1211 89 92 94 166Used by:Timeline
Symbol 1213 MovieClip {armKatanaB}Uses:89 92 94Used by:Timeline
Symbol 1214 GraphicUsed by:1215
Symbol 1215 MovieClip {weaponKatanaLogo}Uses:1214 161Used by:1220  Timeline
Symbol 1216 GraphicUsed by:1220
Symbol 1217 GraphicUsed by:1220
Symbol 1218 GraphicUsed by:1220
Symbol 1219 GraphicUsed by:1220
Symbol 1220 MovieClip {armKatanaF}Uses:1215 89 92 94 166 1216 1217 1218 1219Used by:Timeline
Symbol 1221 GraphicUsed by:1223
Symbol 1222 GraphicUsed by:1223
Symbol 1223 MovieClip {dynamiteBullet}Uses:1221 1209 1222Used by:Timeline
Symbol 1224 MovieClip {zombieArmF02}Uses:201 203 205 166 206 207 208Used by:Timeline
Symbol 1225 MovieClip {zombieArmB02}Uses:201 203 205Used by:Timeline
Symbol 1226 BitmapUsed by:1227 1228 1229 1230 1397
Symbol 1227 GraphicUses:1226Used by:1231
Symbol 1228 GraphicUses:1226Used by:1231
Symbol 1229 GraphicUses:1226Used by:1231
Symbol 1230 GraphicUses:1226Used by:1231
Symbol 1231 MovieClip {barricadeB1}Uses:1227 1228 1229 1230Used by:Timeline
Symbol 1232 BitmapUsed by:1233 1236 1237 1238
Symbol 1233 GraphicUses:1232Used by:1239
Symbol 1234 BitmapUsed by:1235
Symbol 1235 GraphicUses:1234Used by:1239
Symbol 1236 GraphicUses:1232Used by:1239
Symbol 1237 GraphicUses:1232Used by:1239
Symbol 1238 GraphicUses:1232Used by:1239
Symbol 1239 MovieClip {barricadeA1}Uses:1233 1235 1236 1237 1238Used by:Timeline
Symbol 1240 EditableTextUses:421Used by:1241
Symbol 1241 MovieClip {middleBillboard}Uses:1240Used by:Timeline
Symbol 1242 GraphicUsed by:1285
Symbol 1243 GraphicUsed by:1285
Symbol 1244 BitmapUsed by:1245
Symbol 1245 GraphicUses:1244Used by:1285
Symbol 1246 FontUsed by:1247 1248 1249 1250 1253 1254 1259 1260 1261 1262 1263 1264 1265 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1282 1283 1284
Symbol 1247 TextUses:1246Used by:1285
Symbol 1248 TextUses:1246Used by:1285
Symbol 1249 TextUses:1246Used by:1285
Symbol 1250 TextUses:1246Used by:1285
Symbol 1251 BitmapUsed by:1252
Symbol 1252 GraphicUses:1251Used by:1285
Symbol 1253 TextUses:1246Used by:1285
Symbol 1254 TextUses:1246Used by:1285
Symbol 1255 BitmapUsed by:1256
Symbol 1256 GraphicUses:1255Used by:1285
Symbol 1257 FontUsed by:1258 1268
Symbol 1258 TextUses:1257Used by:1285
Symbol 1259 TextUses:1246Used by:1285
Symbol 1260 TextUses:1246Used by:1285
Symbol 1261 TextUses:1246Used by:1285
Symbol 1262 TextUses:1246Used by:1285
Symbol 1263 TextUses:1246Used by:1285
Symbol 1264 TextUses:1246Used by:1285
Symbol 1265 TextUses:1246Used by:1285
Symbol 1266 BitmapUsed by:1267
Symbol 1267 GraphicUses:1266Used by:1285
Symbol 1268 TextUses:1257Used by:1285
Symbol 1269 TextUses:1246Used by:1285
Symbol 1270 TextUses:1246Used by:1285
Symbol 1271 TextUses:1246Used by:1285
Symbol 1272 TextUses:1246Used by:1285
Symbol 1273 TextUses:1246Used by:1285
Symbol 1274 TextUses:1246Used by:1285
Symbol 1275 TextUses:1246Used by:1285
Symbol 1276 TextUses:1246Used by:1285
Symbol 1277 TextUses:1246Used by:1285
Symbol 1278 TextUses:1246Used by:1285
Symbol 1279 GraphicUsed by:1285
Symbol 1280 BitmapUsed by:1281
Symbol 1281 GraphicUses:1280Used by:1285
Symbol 1282 TextUses:1246Used by:1285
Symbol 1283 TextUses:1246Used by:1285
Symbol 1284 TextUses:1246Used by:1285
Symbol 1285 MovieClip {instructionScreen}Uses:348 8 65 420 418 430 1242 38 1243 1245 1247 1248 1249 1250 1252 1253 1254 1256 1258 1259 1260 1261 1262 1263 1264 1265 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1281 1282 1283 1284Used by:Timeline
Symbol 1286 BitmapUsed by:1287 1288 1289 1290
Symbol 1287 GraphicUses:1286Used by:1291
Symbol 1288 GraphicUses:1286Used by:1291
Symbol 1289 GraphicUses:1286Used by:1291
Symbol 1290 GraphicUses:1286Used by:1291
Symbol 1291 MovieClip {barricadeB0}Uses:1287 1288 1289 1290Used by:Timeline
Symbol 1292 BitmapUsed by:1293 1294 1295 1296
Symbol 1293 GraphicUses:1292Used by:1297
Symbol 1294 GraphicUses:1292Used by:1297
Symbol 1295 GraphicUses:1292Used by:1297
Symbol 1296 GraphicUses:1292Used by:1297
Symbol 1297 MovieClip {barricadeA0}Uses:1293 1294 1295 1296Used by:Timeline
Symbol 1298 MovieClip {chainsawBullet}Uses:165Used by:Timeline
Symbol 1299 GraphicUsed by:1300
Symbol 1300 MovieClip {buldozerCursor}Uses:1299Used by:Timeline
Symbol 1301 GraphicUsed by:1303
Symbol 1302 TextUses:34Used by:1303
Symbol 1303 MovieClip {optionScreen}Uses:40 8 1301 632 635 638 641 430 642 1302 509 644 38Used by:Timeline
Symbol 1304 MovieClip {zombieNormal02Image}Uses:438 80 704 796 864 487 77 482 483Used by:Timeline
Symbol 1305 GraphicUsed by:1306
Symbol 1306 MovieClipUses:1305Used by:1309 1310
Symbol 1307 GraphicUsed by:1308
Symbol 1308 MovieClipUses:1307Used by:1309 1310
Symbol 1309 MovieClip {zombieArmF03}Uses:1306 1308 205 166 206 207 208Used by:Timeline
Symbol 1310 MovieClip {zombieArmB03}Uses:1306 1308 205Used by:Timeline
Symbol 1311 TextUses:34Used by:1312
Symbol 1312 MovieClipUses:85 1311Used by:1313
Symbol 1313 MovieClip {creditScreen}Uses:40 65 1312 8 430 38Used by:Timeline
Symbol 1314 GraphicUsed by:1315
Symbol 1315 MovieClip {bloodScreen}Uses:1314Used by:Timeline
Symbol 1316 MovieClip {middleGroundLevel3}Uses:73 72 76 81 83 84 86Used by:Timeline
Symbol 1317 BitmapUsed by:1318
Symbol 1318 GraphicUses:1317Used by:1325
Symbol 1319 BitmapUsed by:1320
Symbol 1320 GraphicUses:1319Used by:1321
Symbol 1321 MovieClipUses:1320Used by:1325
Symbol 1322 BitmapUsed by:1323
Symbol 1323 GraphicUses:1322Used by:1324
Symbol 1324 MovieClipUses:1323Used by:1325
Symbol 1325 MovieClip {backGroundLevel3}Uses:1318 1321 1324Used by:Timeline
Symbol 1326 BitmapUsed by:1330 1338 1355 1361 1394 1395 1397
Symbol 1327 BitmapUsed by:1330
Symbol 1328 BitmapUsed by:1330 1360 1371 1377 1384
Symbol 1329 BitmapUsed by:1330 1394
Symbol 1330 GraphicUses:1326 1327 1329 1328Used by:1340
Symbol 1331 BitmapUsed by:1333 1335 1346
Symbol 1332 BitmapUsed by:1333 1335
Symbol 1333 GraphicUses:1331 1332Used by:1334
Symbol 1334 MovieClipUses:1333Used by:1340 1367 1383 1387
Symbol 1335 GraphicUses:1332 1331Used by:1336
Symbol 1336 MovieClipUses:1335Used by:1340 1367 1383
Symbol 1337 BitmapUsed by:1338 1361 1379 1381
Symbol 1338 GraphicUses:1337 1326Used by:1339
Symbol 1339 MovieClipUses:1338Used by:1340 1372
Symbol 1340 MovieClip {foreGroundLevel3}Uses:1330 1334 1336 1339 86Used by:Timeline
Symbol 1341 MovieClip {middleGroundLevel4}Uses:72 73 81 76 83 84 86Used by:Timeline
Symbol 1342 MovieClip {middleGroundLevel2}Uses:73 72 81 76 83 84 86Used by:Timeline
Symbol 1343 BitmapUsed by:1344
Symbol 1344 GraphicUses:1343Used by:1359
Symbol 1345 BitmapUsed by:1346
Symbol 1346 GraphicUses:1331 1345Used by:1354
Symbol 1347 GraphicUsed by:1348
Symbol 1348 MovieClipUses:1347Used by:1354 1356
Symbol 1349 GraphicUsed by:1350
Symbol 1350 MovieClipUses:1349Used by:1354 1356
Symbol 1351 GraphicUsed by:1352
Symbol 1352 MovieClipUses:1351Used by:1354 1356
Symbol 1353 GraphicUsed by:1354 1356
Symbol 1354 MovieClipUses:1346 1348 1350 1352 1353Used by:1359 1370
Symbol 1355 GraphicUses:1326Used by:1356
Symbol 1356 MovieClipUses:1355 1348 1350 1352 1353Used by:1359 1399
Symbol 1357 GraphicUsed by:1358
Symbol 1358 MovieClipUses:1357Used by:1359 1376
Symbol 1359 MovieClip {backGroundLevel2}Uses:1344 1354 1356 1358Used by:Timeline
Symbol 1360 GraphicUses:1328Used by:1367
Symbol 1361 GraphicUses:1326 1337Used by:1362
Symbol 1362 MovieClipUses:1361Used by:1367 1372
Symbol 1363 GraphicUsed by:1364
Symbol 1364 MovieClipUses:1363Used by:1367 1372 1383 1387
Symbol 1365 GraphicUsed by:1366
Symbol 1366 MovieClipUses:1365Used by:1367 1372 1383 1387
Symbol 1367 MovieClip {foreGroundLevel2}Uses:1360 1336 1334 1362 1364 1366 86Used by:Timeline
Symbol 1368 BitmapUsed by:1369
Symbol 1369 GraphicUses:1368Used by:1370
Symbol 1370 MovieClip {backGroundLevel4}Uses:1369 1354Used by:Timeline
Symbol 1371 GraphicUses:1328Used by:1372
Symbol 1372 MovieClip {foreGroundLevel5}Uses:1371 1362 1339 1364 1366 86Used by:Timeline
Symbol 1373 MovieClip {middleGroundLevel1}Uses:72 73 81 84 83 86Used by:Timeline
Symbol 1374 BitmapUsed by:1375
Symbol 1375 GraphicUses:1374Used by:1376
Symbol 1376 MovieClip {backGroundLevel1}Uses:1375 1358Used by:Timeline
Symbol 1377 GraphicUses:1328Used by:1383
Symbol 1378 BitmapUsed by:1379 1381
Symbol 1379 GraphicUses:1378 1337Used by:1380
Symbol 1380 MovieClipUses:1379Used by:1383
Symbol 1381 GraphicUses:1378 1337Used by:1382
Symbol 1382 MovieClipUses:1381Used by:1383
Symbol 1383 MovieClip {foreGroundLevel1}Uses:1377 1334 1380 1382 1336 1364 1366 85 86Used by:Timeline
Symbol 1384 GraphicUses:1328Used by:1387
Symbol 1385 GraphicUsed by:1386
Symbol 1386 MovieClipUses:1385Used by:1387
Symbol 1387 MovieClip {foreGroundLevel4}Uses:1384 1334 1386 1364 1366 86Used by:Timeline
Symbol 1388 BitmapUsed by:1389
Symbol 1389 GraphicUses:1388Used by:1399
Symbol 1390 BitmapUsed by:1392
Symbol 1391 BitmapUsed by:1392
Symbol 1392 GraphicUses:1391 1390Used by:1393
Symbol 1393 MovieClipUses:1392Used by:1399
Symbol 1394 GraphicUses:1329 1326Used by:1399
Symbol 1395 GraphicUses:1326Used by:1396
Symbol 1396 MovieClipUses:1395Used by:1399
Symbol 1397 GraphicUses:1326 1226Used by:1398
Symbol 1398 MovieClipUses:1397Used by:1399
Symbol 1399 MovieClip {backGroundLevel5}Uses:1389 1393 1394 1396 1356 1013 1398Used by:Timeline
Symbol 1400 BitmapUsed by:1401
Symbol 1401 GraphicUses:1400Used by:1402
Symbol 1402 MovieClipUses:1401Used by:1403
Symbol 1403 MovieClip {introSponsorSplashScreen}Uses:120 8 1402Used by:Timeline
Symbol 1404 GraphicUsed by:1408
Symbol 1405 GraphicUsed by:1408
Symbol 1406 GraphicUsed by:1407
Symbol 1407 MovieClipUses:1406Used by:1408
Symbol 1408 MovieClip {zombieCrawl01}Uses:438 1404 796 1405 1407 80 859 482 483 77 487Used by:Timeline
Symbol 1409 MovieClip {zombieArmB04}Uses:664 203 205Used by:Timeline
Symbol 1410 MovieClip {zombieArmF04}Uses:664 203 205 166 206 207 208Used by:Timeline
Symbol 1411 GraphicUsed by:1412
Symbol 1412 MovieClip {weaponM14Logo}Uses:1411 161Used by:1414  Timeline
Symbol 1413 GraphicUsed by:1414
Symbol 1414 MovieClip {armM14F}Uses:1412 89 92 94 166 183 184 1413Used by:Timeline
Symbol 1415 GraphicUsed by:1416 1422
Symbol 1416 MovieClip {weaponM1911Logo}Uses:1415 161Used by:1422  Timeline
Symbol 1417 GraphicUsed by:1422
Symbol 1418 GraphicUsed by:1422
Symbol 1419 GraphicUsed by:1422
Symbol 1420 GraphicUsed by:1422
Symbol 1421 GraphicUsed by:1422
Symbol 1422 MovieClip {armM1911F}Uses:1416 89 92 94 166 1417 1418 1419 1420 1421 1415Used by:Timeline
Symbol 1423 TextUses:34Used by:1424
Symbol 1424 MovieClipUses:1423Used by:1450
Symbol 1425 GraphicUsed by:1432
Symbol 1426 GraphicUsed by:1428
Symbol 1427 TextUses:43Used by:1428
Symbol 1428 MovieClipUses:1426 1427Used by:1432
Symbol 1429 GraphicUsed by:1432
Symbol 1430 GraphicUsed by:1431
Symbol 1431 MovieClipUses:1430Used by:1432
Symbol 1432 MovieClipUses:1425 1428 1429 1431Used by:1450
Symbol 1433 GraphicUsed by:1438
Symbol 1434 GraphicUsed by:1438
Symbol 1435 GraphicUsed by:1438
Symbol 1436 GraphicUsed by:1438
Symbol 1437 GraphicUsed by:1438
Symbol 1438 MovieClipUses:1433 1434 456 1435 1436 1437Used by:1450
Symbol 1439 TextUses:34Used by:1440
Symbol 1440 MovieClipUses:1439Used by:1450
Symbol 1441 GraphicUsed by:1442
Symbol 1442 MovieClipUses:1441Used by:1450
Symbol 1443 TextUses:34Used by:1444
Symbol 1444 MovieClipUses:1443Used by:1450
Symbol 1445 TextUses:34Used by:1446
Symbol 1446 MovieClipUses:1445Used by:1450
Symbol 1447 TextUses:34Used by:1450
Symbol 1448 TextUses:34Used by:1450
Symbol 1449 TextUses:34Used by:1450
Symbol 1450 MovieClip {endingMovie}Uses:85 8 129 131 132 1424 134 135 1432 1438 1440 1442 1444 1446 1447 1448 1449Used by:Timeline
Symbol 1451 TextUses:43Used by:1460
Symbol 1452 TextUses:34Used by:1454
Symbol 1453 GraphicUsed by:1454 1456
Symbol 1454 ButtonUses:1452 105 1453Used by:1460 1462
Symbol 1455 TextUses:34Used by:1456
Symbol 1456 ButtonUses:1455 105 1453Used by:1460 1462
Symbol 1457 TextUses:34Used by:1459
Symbol 1458 GraphicUsed by:1459
Symbol 1459 ButtonUses:1457 105 1458Used by:1460
Symbol 1460 MovieClip {extendedPlay}Uses:1187 1451 1454 1456 1459Used by:Timeline
Symbol 1461 TextUses:43Used by:1462
Symbol 1462 MovieClip {harbourWarning}Uses:1187 1461 1454 1456Used by:Timeline
Streaming Sound 1Used by:Symbol 158 MovieClip {Days2Die_fla.days2dieintro_13}

Instance Names

"place5"Symbol 33 MovieClip {Days2Die_fla.mapWorld_409} Frame 1Symbol 17 MovieClip
"place0"Symbol 33 MovieClip {Days2Die_fla.mapWorld_409} Frame 1Symbol 20 MovieClip
"place2"Symbol 33 MovieClip {Days2Die_fla.mapWorld_409} Frame 1Symbol 23 MovieClip
"place3"Symbol 33 MovieClip {Days2Die_fla.mapWorld_409} Frame 1Symbol 26 MovieClip
"place4"Symbol 33 MovieClip {Days2Die_fla.mapWorld_409} Frame 1Symbol 29 MovieClip
"place1"Symbol 33 MovieClip {Days2Die_fla.mapWorld_409} Frame 1Symbol 32 MovieClip
"places"Symbol 39 MovieClip {MapScreen} Frame 1Symbol 33 MovieClip {Days2Die_fla.mapWorld_409}
"sponsor"Symbol 39 MovieClip {MapScreen} Frame 1Symbol 38 Button
"adSpace"Symbol 46 MovieClip {Days2Die_fla.signAd_120} Frame 1Symbol 45 MovieClip
"playBtn"Symbol 53 MovieClip {Days2Die_fla.loadingText_405} Frame 1Symbol 52 Button
"adSpace"Symbol 69 MovieClip {loaderScreen} Frame 1Symbol 46 MovieClip {Days2Die_fla.signAd_120}
"loadingClip"Symbol 69 MovieClip {loaderScreen} Frame 1Symbol 53 MovieClip {Days2Die_fla.loadingText_405}
"progressText"Symbol 69 MovieClip {loaderScreen} Frame 1Symbol 60 EditableText
"sponsor"Symbol 69 MovieClip {loaderScreen} Frame 1Symbol 38 Button
"center"Symbol 76 MovieClip {Days2Die_fla.Ladder_341} Frame 1Symbol 75 MovieClip
"clipFront"Symbol 81 MovieClip {Egg} Frame 1Symbol 77 MovieClip
"clipBack"Symbol 81 MovieClip {Egg} Frame 1Symbol 77 MovieClip
"clipTop"Symbol 81 MovieClip {Egg} Frame 1Symbol 77 MovieClip
"ladderDetector"Symbol 81 MovieClip {Egg} Frame 1Symbol 77 MovieClip
"clipBottom"Symbol 81 MovieClip {Egg} Frame 1Symbol 77 MovieClip
"torso"Symbol 81 MovieClip {Egg} Frame 1Symbol 79 MovieClip
"weaponHolder"Symbol 81 MovieClip {Egg} Frame 1Symbol 80 MovieClip
"floor4"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 72 MovieClip {Floor}
"ladder2"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"spawnPoint"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint1"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint4"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint3"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint0"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 81 MovieClip {Egg}
"ladder0"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"enemySpawnPoint2"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 81 MovieClip {Egg}
"ladder1"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"enemySpawnPoint5"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 81 MovieClip {Egg}
"playerLimit2"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 83 MovieClip {PlayerLimit}
"playerLimit1"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 83 MovieClip {PlayerLimit}
"playerLimit0"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 83 MovieClip {PlayerLimit}
"lantaiSign1"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 84 MovieClip
"lantaiSign2"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 84 MovieClip
"lantaiSign0"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 84 MovieClip
"stageSign0"Symbol 87 MovieClip {middleGroundLevel5} Frame 1Symbol 86 MovieClip
"scoreText"Symbol 113 MovieClip {preSubmitHighscores} Frame 1Symbol 102 EditableText
"nameText"Symbol 113 MovieClip {preSubmitHighscores} Frame 1Symbol 103 EditableText
"submitButton"Symbol 113 MovieClip {preSubmitHighscores} Frame 1Symbol 107 Button
"pleaseWait"Symbol 113 MovieClip {preSubmitHighscores} Frame 1Symbol 112 MovieClip
"loadingClip"Symbol 119 MovieClip {highscoresClip} Frame 1Symbol 118 MovieClip
"sponsor"Symbol 119 MovieClip {highscoresClip} Frame 1Symbol 38 Button
"skipButton"Symbol 159 MovieClip {introScreen} Frame 1Symbol 129 Button
"movie"Symbol 159 MovieClip {introScreen} Frame 151Symbol 158 MovieClip {Days2Die_fla.days2dieintro_13}
"bulletOut"Symbol 171 MovieClip {armMinigunF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 171 MovieClip {armMinigunF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 171 MovieClip {armMinigunF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 186 MovieClip {armBarretM82F} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 186 MovieClip {armBarretM82F} Frame 1Symbol 166 MovieClip
"magOut"Symbol 186 MovieClip {armBarretM82F} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 194 MovieClip {armGLM32F} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 194 MovieClip {armGLM32F} Frame 1Symbol 166 MovieClip
"magOut"Symbol 194 MovieClip {armGLM32F} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 209 MovieClip {zombieArmF05} Frame 1Symbol 166 MovieClip
"body"Symbol 213 MovieClip {weaponAxe} Frame 1Symbol 212 MovieClip
"bulletOut"Symbol 214 MovieClip {zombieArmB05} Frame 1Symbol 166 MovieClip
"body0"Symbol 276 MovieClip {weaponGrenadeLogo} Frame 1Symbol 77 MovieClip
"body2"Symbol 276 MovieClip {weaponGrenadeLogo} Frame 1Symbol 77 MovieClip
"body1"Symbol 276 MovieClip {weaponGrenadeLogo} Frame 1Symbol 77 MovieClip
"bulletOut"Symbol 279 MovieClip {armGrenadeF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 279 MovieClip {armGrenadeF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 289 MovieClip {armKnifeF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 298 MovieClip {armM4F} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 298 MovieClip {armM4F} Frame 1Symbol 166 MovieClip
"magOut"Symbol 298 MovieClip {armM4F} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 307 MovieClip {armPistolF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 307 MovieClip {armPistolF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 307 MovieClip {armPistolF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 321 MovieClip {armSMGF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 321 MovieClip {armSMGF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 321 MovieClip {armSMGF} Frame 1Symbol 166 MovieClip
"content"Symbol 324 MovieClip {billboard_text} Frame 1Symbol 323 EditableText
"crack"Symbol 341 MovieClip {explosion} Frame 1Symbol 333 MovieClip
"body0"Symbol 345 MovieClip {grenadeSafety} Frame 1Symbol 77 MovieClip
"body2"Symbol 345 MovieClip {grenadeSafety} Frame 1Symbol 77 MovieClip
"body1"Symbol 345 MovieClip {grenadeSafety} Frame 1Symbol 77 MovieClip
"body"Symbol 347 MovieClip {handGunBullet} Frame 1Symbol 212 MovieClip
"num"Symbol 351 MovieClip {Days2Die_fla.meleeWeapon_85} Frame 1Symbol 350 EditableText
"num"Symbol 354 MovieClip {Days2Die_fla.primWeapon_86} Frame 1Symbol 353 EditableText
"meleeWeapon"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 351 MovieClip {Days2Die_fla.meleeWeapon_85}
"primaryWeapon"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 354 MovieClip {Days2Die_fla.primWeapon_86}
"secondaryWeapon"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 354 MovieClip {Days2Die_fla.primWeapon_86}
"explosiveWeapon"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 351 MovieClip {Days2Die_fla.meleeWeapon_85}
"slotType2"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 355 EditableText
"slotType3"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 356 EditableText
"ammo12gauge"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo357"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo45"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo9mm"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo762"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo556"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo12gaugeText"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 375 EditableText
"ammo357Text"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 376 EditableText
"ammo45Text"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 377 EditableText
"ammo762Text"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 378 EditableText
"ammo556Text"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 379 EditableText
"ammo9mmText"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 380 EditableText
"ammo50cal"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammoHE"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo50calText"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 381 EditableText
"ammoHEText"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 382 EditableText
"switchButton"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 385 Button
"slotType0"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 386 EditableText
"slotType1"Symbol 388 MovieClip {Days2Die_fla.equipBox_84} Frame 1Symbol 387 EditableText
"weaponPic"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 80 MovieClip
"weaponName"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 397 EditableText
"ammoType"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"rpsText"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 400 EditableText
"damageText"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 401 EditableText
"priceLabel"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 402 EditableText
"priceText"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 403 EditableText
"ownedLabel"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 404 EditableText
"ownedText"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 405 EditableText
"reloadLabel"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 406 EditableText
"reloadText"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 407 EditableText
"clipLabel"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 408 EditableText
"clipText"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 409 EditableText
"accLabel"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 410 EditableText
"accText"Symbol 412 MovieClip {Days2Die_fla.explanationBox_92} Frame 1Symbol 411 EditableText
"holder0"Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93} Frame 1Symbol 80 MovieClip
"holder1"Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93} Frame 1Symbol 80 MovieClip
"holder2"Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93} Frame 1Symbol 80 MovieClip
"holder3"Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93} Frame 1Symbol 80 MovieClip
"holder4"Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93} Frame 1Symbol 80 MovieClip
"holder5"Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93} Frame 1Symbol 80 MovieClip
"nextButton"Symbol 423 MovieClip {Days2Die_fla.chooserBox_94} Frame 1Symbol 418 Button
"prevButton"Symbol 423 MovieClip {Days2Die_fla.chooserBox_94} Frame 1Symbol 420 Button
"pageNumber"Symbol 423 MovieClip {Days2Die_fla.chooserBox_94} Frame 1Symbol 422 EditableText
"equipBox"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 388 MovieClip {Days2Die_fla.equipBox_84}
"explosive"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 391 MovieClip
"melee"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 393 MovieClip
"fireArm"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 395 MovieClip
"explanationBox"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 412 MovieClip {Days2Die_fla.explanationBox_92}
"weaponOption"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 414 MovieClip {Days2Die_fla.weaponOptions_93}
"chooserBox"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 423 MovieClip {Days2Die_fla.chooserBox_94}
"close"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 430 Button
"sponsor"Symbol 432 MovieClip {weaponInventory} Frame 1Symbol 38 Button
"torso"Symbol 447 MovieClip {Days2Die_fla.maincharBody_103} Frame 1Symbol 446 MovieClip {Days2Die_fla.mainBody_104}
"eye"Symbol 479 MovieClip {mainHead} Frame 1Symbol 456 MovieClip
"hired"Symbol 479 MovieClip {mainHead} Frame 1Symbol 459 MovieClip
"eye"Symbol 479 MovieClip {mainHead} Frame 5Symbol 470 MovieClip
"head"Symbol 480 MovieClip {Days2Die_fla.maincharHead_105} Frame 1Symbol 479 MovieClip {mainHead}
"redBlood"Symbol 487 MovieClip {Days2Die_fla.bloodSign_112} Frame 1Symbol 486 MovieClip
"shadow"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 438 MovieClip
"weaponHolderf"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 80 MovieClip
"leg"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 439 MovieClip {Days2Die_fla.maincharLegs_102}
"torso"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 447 MovieClip {Days2Die_fla.maincharBody_103}
"head"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 480 MovieClip {Days2Die_fla.maincharHead_105}
"clipTop"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 77 MovieClip
"ladderDetector"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 77 MovieClip
"smokeOut"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 77 MovieClip
"kaki"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 482 MovieClip
"badan"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 483 MovieClip
"kepala"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 482 MovieClip
"floorDetector"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 483 MovieClip
"weaponHolderb"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 80 MovieClip
"bloodSign"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 487 MovieClip {Days2Die_fla.bloodSign_112}
"signBaloon"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 495 MovieClip {Days2Die_fla.signBaloon_114}
"xcross"Symbol 498 MovieClip {femaleChar} Frame 1Symbol 497 MovieClip
"adSpace"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 46 MovieClip {Days2Die_fla.signAd_120}
"playButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 502 Button
"instructionButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 506 Button
"soundButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 509 MovieClip {Days2Die_fla.buttonSound_124}
"optionButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 513 Button
"moreGamesButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 516 Button
"creditButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 519 Button
"highscoresButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 523 Button
"sponsor"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 38 Button
"continueButton"Symbol 529 MovieClip {mainMenu} Frame 1Symbol 527 Button
"expBar"Symbol 533 MovieClip {Days2Die_fla.expSign_134} Frame 1Symbol 532 MovieClip
"ammoType"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"adSpace"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 46 MovieClip {Days2Die_fla.signAd_120}
"sponsor"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 38 Button
"killText"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 581 EditableText
"scoreText"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 582 EditableText
"nextButton"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 418 Button
"dayText"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 583 EditableText
"locationName"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 584 EditableText
"advanceText"Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144} Frame 1Symbol 585 EditableText
"retryButton"Symbol 604 MovieClip {Days2Die_fla.gameOverMenu_145} Frame 1Symbol 593 Button
"submitButton"Symbol 604 MovieClip {Days2Die_fla.gameOverMenu_145} Frame 1Symbol 599 Button
"scoreText"Symbol 604 MovieClip {Days2Die_fla.gameOverMenu_145} Frame 1Symbol 600 EditableText
"sponsor"Symbol 604 MovieClip {Days2Die_fla.gameOverMenu_145} Frame 1Symbol 602 Button
"info"Symbol 621 MovieClip {Days2Die_fla.gamePerkMenu_151} Frame 1Symbol 620 EditableText
"next"Symbol 621 MovieClip {Days2Die_fla.gamePerkMenu_151} Frame 1Symbol 418 Button
"gameScoreMenu"Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140} Frame 1Symbol 586 MovieClip {Days2Die_fla.gameScoreMenu_144}
"gameOverMenu"Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140} Frame 1Symbol 604 MovieClip {Days2Die_fla.gameOverMenu_145}
"backToMainMenuButton"Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140} Frame 1Symbol 607 Button
"infoBox"Symbol 625 MovieClip {Days2Die_fla.infoBox_154} Frame 1Symbol 624 EditableText
"pauseButton"Symbol 630 MovieClip {Days2Die_fla.upperBar_155} Frame 1Symbol 628 Button
"lowButton"Symbol 645 MovieClip {optionScreen2} Frame 1Symbol 635 Button
"mediumButton"Symbol 645 MovieClip {optionScreen2} Frame 1Symbol 638 Button
"highButton"Symbol 645 MovieClip {optionScreen2} Frame 1Symbol 641 Button
"closeBtn"Symbol 645 MovieClip {optionScreen2} Frame 1Symbol 430 Button
"backToMainMenuButton"Symbol 645 MovieClip {optionScreen2} Frame 1Symbol 607 Button
"soundButton"Symbol 645 MovieClip {optionScreen2} Frame 1Symbol 509 MovieClip {Days2Die_fla.buttonSound_124}
"sponsor"Symbol 645 MovieClip {optionScreen2} Frame 1Symbol 38 Button
"expSign"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 533 MovieClip {Days2Die_fla.expSign_134}
"money"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 535 EditableText
"ammo"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 536 EditableText
"weaponName"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 538 EditableText
"health"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 539 EditableText
"reloadAmmo"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 540 EditableText
"weaponPic"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 568 MovieClip {Days2Die_fla.signBullets_139}
"kills"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 569 EditableText
"minute"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 570 EditableText
"second"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 571 EditableText
"moreGames"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 516 Button
"sponsor"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 38 Button
"resultScreen"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140}
"infoBox"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 625 MovieClip {Days2Die_fla.infoBox_154}
"upperBar"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 630 MovieClip {Days2Die_fla.upperBar_155}
"optionScreen"Symbol 646 MovieClip {menuBarClip} Frame 1Symbol 645 MovieClip {optionScreen2}
"body0"Symbol 654 MovieClip {itemGrenade} Frame 1Symbol 77 MovieClip
"body2"Symbol 654 MovieClip {itemGrenade} Frame 1Symbol 77 MovieClip
"body1"Symbol 654 MovieClip {itemGrenade} Frame 1Symbol 77 MovieClip
"bulletOut"Symbol 666 MovieClip {zombieArmF01} Frame 1Symbol 166 MovieClip
"torso"Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178} Frame 1Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179}
"head"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 1Symbol 703 MovieClip {Days2Die_fla.zombieHead01_175}
"head"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 2Symbol 809 MovieClip {Days2Die_fla.zombieHead02_187}
"head"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 3Symbol 823 MovieClip {Days2Die_fla.zombieHead03_188}
"head"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 4Symbol 836 MovieClip {Days2Die_fla.zombieHead04_189}
"head"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 5Symbol 849 MovieClip {Days2Die_fla.zombieHead05_190}
"head"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 6Symbol 858 MovieClip {Days2Die_fla.zombieHead06_191}
"head"Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185} Frame 1Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186}
"shadow"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 438 MovieClip
"leg"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177}
"weaponHolderb"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 80 MovieClip
"torso"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178}
"head"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185}
"bloodSign"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 487 MovieClip {Days2Die_fla.bloodSign_112}
"weaponHolderf"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 80 MovieClip
"clipTop"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 77 MovieClip
"ladderDetector"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 77 MovieClip
"smokeOut"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 77 MovieClip
"kaki"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 482 MovieClip
"badan"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 483 MovieClip
"kepala"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 482 MovieClip
"floorDetector"Symbol 865 MovieClip {zombieNormal01Image} Frame 1Symbol 483 MovieClip
"skipButton"Symbol 977 MovieClip {movieLevel1} Frame 1Symbol 129 Button
"bulletOut"Symbol 997 MovieClip {armShotGunF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 997 MovieClip {armShotGunF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 997 MovieClip {armShotGunF} Frame 1Symbol 166 MovieClip
"body"Symbol 1049 MovieClip {itemBaseballBat} Frame 1Symbol 483 MovieClip
"bulletOut"Symbol 1058 MovieClip {armBaseballBatF} Frame 1Symbol 166 MovieClip
"price"Symbol 1080 MovieClip {Days2Die_fla.insideInfoBarricade_272} Frame 1Symbol 1078 EditableText
"durability"Symbol 1080 MovieClip {Days2Die_fla.insideInfoBarricade_272} Frame 1Symbol 1079 EditableText
"price"Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271} Frame 1Symbol 1074 EditableText
"durability"Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271} Frame 1Symbol 1075 EditableText
"infoMenu"Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271} Frame 2Symbol 1080 MovieClip {Days2Die_fla.insideInfoBarricade_272}
"nextButton"Symbol 1090 MovieClip {Days2Die_fla.chooserBoxcopy_275} Frame 1Symbol 418 Button
"prevButton"Symbol 1090 MovieClip {Days2Die_fla.chooserBoxcopy_275} Frame 1Symbol 420 Button
"infoBarricade0"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271}
"infoBarricade1"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271}
"startButton"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 1087 Button
"barricadeLimit"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 1089 EditableText
"barricade0"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 80 MovieClip
"barricade1"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 80 MovieClip
"chooserBox"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 1090 MovieClip {Days2Die_fla.chooserBoxcopy_275}
"buldozerButton"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 1093 MovieClip {Days2Die_fla.buldozerButton_276}
"hideButton"Symbol 1097 MovieClip {barricadeShop} Frame 1Symbol 1096 MovieClip {Days2Die_fla.hideButton_277}
"stay"Symbol 1108 MovieClip {talkSymbol} Frame 1Symbol 1104 MovieClip
"follow"Symbol 1108 MovieClip {talkSymbol} Frame 1Symbol 1107 MovieClip
"bulletOut"Symbol 1115 MovieClip {armAKF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1115 MovieClip {armAKF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 1115 MovieClip {armAKF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1123 MovieClip {armDeagleF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1123 MovieClip {armDeagleF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 1123 MovieClip {armDeagleF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1128 MovieClip {armMPUF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1128 MovieClip {armMPUF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 1128 MovieClip {armMPUF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1135 MovieClip {armSM5F} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1135 MovieClip {armSM5F} Frame 1Symbol 166 MovieClip
"magOut"Symbol 1135 MovieClip {armSM5F} Frame 1Symbol 166 MovieClip
"holder0"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder1"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder2"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder5"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder6"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder7"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder3"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder4"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder8"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"holder9"Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298} Frame 1Symbol 80 MovieClip
"mercName"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 1159 EditableText
"speedText"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 1162 EditableText
"accText"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 1163 EditableText
"healthText"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 1165 EditableText
"mercPic"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 479 MovieClip {mainHead}
"weaponPic"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 568 MovieClip {Days2Die_fla.signBullets_139}
"priceText"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 1167 EditableText
"salaryText"Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304} Frame 1Symbol 1169 EditableText
"closeButton"Symbol 1189 MovieClip {Days2Die_fla.shopWarning_307} Frame 1Symbol 430 Button
"message"Symbol 1189 MovieClip {Days2Die_fla.shopWarning_307} Frame 1Symbol 1188 EditableText
"merc"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1140 MovieClip
"explosive"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 391 MovieClip
"melee"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 393 MovieClip
"fireArm"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 395 MovieClip
"explanationBox"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 412 MovieClip {Days2Die_fla.explanationBox_92}
"weaponOption"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1142 MovieClip {Days2Die_fla.weaponShop_298}
"chooserBox"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 423 MovieClip {Days2Die_fla.chooserBox_94}
"sellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1146 Button
"money"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1147 EditableText
"doneButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1149 Button
"buyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1153 Button
"fireButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1156 Button
"hireButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1158 Button
"mercExplanationBox"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1170 MovieClip {Days2Die_fla.mercHireBox_304}
"ammo12gauge"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo357"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo45"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo9mm"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo762"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo556"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo12gaugeText"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1172 EditableText
"ammo357Text"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1173 EditableText
"ammo45Text"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1174 EditableText
"ammo762Text"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1175 EditableText
"ammo556Text"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1176 EditableText
"ammo9mmText"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1177 EditableText
"ammo357BuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammo357SellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"ammo12gaugeBuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammo12gaugeSellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"ammo9mmBuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammo9mmSellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"ammo45BuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammo45SellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"ammo556BuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammo556SellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"ammo762BuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammo762SellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"ammo50cal"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammoHE"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87}
"ammo50calText"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1185 EditableText
"ammoHEText"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1186 EditableText
"ammoHEBuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammoHESellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"ammo50calBuyButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1181 Button
"ammo50calSellButton"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1184 Button
"warningClip"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 1189 MovieClip {Days2Die_fla.shopWarning_307}
"sponsor"Symbol 1190 MovieClip {shopScreen} Frame 1Symbol 38 Button
"bulletOut"Symbol 1196 MovieClip {armBerettaF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1196 MovieClip {armBerettaF} Frame 1Symbol 166 MovieClip
"magOut"Symbol 1196 MovieClip {armBerettaF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1202 MovieClip {armChainSawF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1212 MovieClip {armDynamiteF} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1212 MovieClip {armDynamiteF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1220 MovieClip {armKatanaF} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1224 MovieClip {zombieArmF02} Frame 1Symbol 166 MovieClip
"content"Symbol 1241 MovieClip {middleBillboard} Frame 1Symbol 1240 EditableText
"prevBtn"Symbol 1285 MovieClip {instructionScreen} Frame 1Symbol 420 Button
"nextBtn"Symbol 1285 MovieClip {instructionScreen} Frame 1Symbol 418 Button
"closeBtn"Symbol 1285 MovieClip {instructionScreen} Frame 1Symbol 430 Button
"sponsor"Symbol 1285 MovieClip {instructionScreen} Frame 1Symbol 38 Button
"lowButton"Symbol 1303 MovieClip {optionScreen} Frame 1Symbol 635 Button
"mediumButton"Symbol 1303 MovieClip {optionScreen} Frame 1Symbol 638 Button
"highButton"Symbol 1303 MovieClip {optionScreen} Frame 1Symbol 641 Button
"closeBtn"Symbol 1303 MovieClip {optionScreen} Frame 1Symbol 430 Button
"soundButton"Symbol 1303 MovieClip {optionScreen} Frame 1Symbol 509 MovieClip {Days2Die_fla.buttonSound_124}
"sponsor"Symbol 1303 MovieClip {optionScreen} Frame 1Symbol 38 Button
"shadow"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 438 MovieClip
"weaponHolderb"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 80 MovieClip
"leg"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177}
"torso"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178}
"head"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185}
"bloodSign"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 487 MovieClip {Days2Die_fla.bloodSign_112}
"weaponHolderf"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 80 MovieClip
"clipTop"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 77 MovieClip
"ladderDetector"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 77 MovieClip
"smokeOut"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 77 MovieClip
"kaki"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 482 MovieClip
"badan"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 483 MovieClip
"kepala"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 482 MovieClip
"floorDetector"Symbol 1304 MovieClip {zombieNormal02Image} Frame 1Symbol 483 MovieClip
"bulletOut"Symbol 1309 MovieClip {zombieArmF03} Frame 1Symbol 166 MovieClip
"closeBtn"Symbol 1313 MovieClip {creditScreen} Frame 1Symbol 430 Button
"sponsor"Symbol 1313 MovieClip {creditScreen} Frame 1Symbol 38 Button
"roof0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"wall2"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 73 MovieClip {Wall}
"floor6"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"floor7"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"floor4"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"floor5"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"floor3"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"floor1"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"floor2"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"wall4"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 73 MovieClip {Wall}
"wall3"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 73 MovieClip {Wall}
"wall1"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 73 MovieClip {Wall}
"floor0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 72 MovieClip {Floor}
"wall0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 73 MovieClip {Wall}
"wall3"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 73 MovieClip {Wall}
"ladder4"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"ladder3"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"ladder1"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"ladder2"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"ladder0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"enemySpawnPoint3"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint4"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 81 MovieClip {Egg}
"spawnPoint"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint2"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint5"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint1"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 81 MovieClip {Egg}
"playerLimit0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 83 MovieClip {PlayerLimit}
"playerLimit1"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 83 MovieClip {PlayerLimit}
"lantaiSign0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 84 MovieClip
"lantaiSign1"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 84 MovieClip
"lantaiSign2"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 84 MovieClip
"lantaiSign3"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 84 MovieClip
"stageSign0"Symbol 1316 MovieClip {middleGroundLevel3} Frame 1Symbol 86 MovieClip
"stageSign0"Symbol 1340 MovieClip {foreGroundLevel3} Frame 1Symbol 86 MovieClip
"floor0"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 72 MovieClip {Floor}
"floor1"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 72 MovieClip {Floor}
"floor2"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 72 MovieClip {Floor}
"floor4"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 72 MovieClip {Floor}
"floor5"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 72 MovieClip {Floor}
"floor3"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 72 MovieClip {Floor}
"wall1"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 73 MovieClip {Wall}
"wall0"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 73 MovieClip {Wall}
"wall2"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 73 MovieClip {Wall}
"enemySpawnPoint2"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint3"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"wall3"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 73 MovieClip {Wall}
"enemySpawnPoint0"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint1"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint5"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"spawnPoint"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"ladder0"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"ladder1"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"ladder2"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"wall2"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 73 MovieClip {Wall}
"wall3"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 73 MovieClip {Wall}
"enemySpawnPoint4"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint6"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 81 MovieClip {Egg}
"playerLimit0"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 83 MovieClip {PlayerLimit}
"playerLimit1"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 83 MovieClip {PlayerLimit}
"lantaiSign1"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 84 MovieClip
"lantaiSign0"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 84 MovieClip
"lantaiSign2"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 84 MovieClip
"stageSign0"Symbol 1341 MovieClip {middleGroundLevel4} Frame 1Symbol 86 MovieClip
"floor1"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 72 MovieClip {Floor}
"floor2"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 72 MovieClip {Floor}
"floor0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 72 MovieClip {Floor}
"wall0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 73 MovieClip {Wall}
"wall1"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 73 MovieClip {Wall}
"enemySpawnPoint0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint1"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 81 MovieClip {Egg}
"spawnPoint"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint3"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 81 MovieClip {Egg}
"ladder0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 76 MovieClip {Days2Die_fla.Ladder_341}
"wall0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 73 MovieClip {Wall}
"wall1"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 73 MovieClip {Wall}
"enemySpawnPoint4"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint2"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 81 MovieClip {Egg}
"playerLimit0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 83 MovieClip {PlayerLimit}
"playerLimit1"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 83 MovieClip {PlayerLimit}
"lantaiSign1"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 84 MovieClip
"lantaiSign0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 84 MovieClip
"stageSign0"Symbol 1342 MovieClip {middleGroundLevel2} Frame 1Symbol 86 MovieClip
"tutor0"Symbol 1359 MovieClip {backGroundLevel2} Frame 1Symbol 1358 MovieClip
"tutor1"Symbol 1359 MovieClip {backGroundLevel2} Frame 1Symbol 1358 MovieClip
"tutor2"Symbol 1359 MovieClip {backGroundLevel2} Frame 1Symbol 1358 MovieClip
"tutor3"Symbol 1359 MovieClip {backGroundLevel2} Frame 1Symbol 1358 MovieClip
"tutor4"Symbol 1359 MovieClip {backGroundLevel2} Frame 1Symbol 1358 MovieClip
"stageSign0"Symbol 1367 MovieClip {foreGroundLevel2} Frame 1Symbol 86 MovieClip
"stageSign0"Symbol 1372 MovieClip {foreGroundLevel5} Frame 1Symbol 86 MovieClip
"floor0"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 72 MovieClip {Floor}
"wall1"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 73 MovieClip {Wall}
"wall0"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 73 MovieClip {Wall}
"roof0"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 72 MovieClip {Floor}
"enemySpawnPoint1"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 81 MovieClip {Egg}
"enemySpawnPoint0"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 81 MovieClip {Egg}
"lantaiSign0"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 84 MovieClip
"spawnPoint"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 81 MovieClip {Egg}
"wall2"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 73 MovieClip {Wall}
"floor1"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 72 MovieClip {Floor}
"roof1"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 72 MovieClip {Floor}
"wall3"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 73 MovieClip {Wall}
"lantaiSign1"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 84 MovieClip
"doorLockedA0b"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 81 MovieClip {Egg}
"playerLimit1"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 83 MovieClip {PlayerLimit}
"playerLimit0"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 83 MovieClip {PlayerLimit}
"stageSign1"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 86 MovieClip
"stageSign0"Symbol 1373 MovieClip {middleGroundLevel1} Frame 1Symbol 86 MovieClip
"tutor3"Symbol 1376 MovieClip {backGroundLevel1} Frame 1Symbol 1358 MovieClip
"tutor0"Symbol 1376 MovieClip {backGroundLevel1} Frame 1Symbol 1358 MovieClip
"tutor1"Symbol 1376 MovieClip {backGroundLevel1} Frame 1Symbol 1358 MovieClip
"tutor2"Symbol 1376 MovieClip {backGroundLevel1} Frame 1Symbol 1358 MovieClip
"tutor4"Symbol 1376 MovieClip {backGroundLevel1} Frame 1Symbol 1358 MovieClip
"stageSign1"Symbol 1383 MovieClip {foreGroundLevel1} Frame 1Symbol 86 MovieClip
"stageSign0"Symbol 1383 MovieClip {foreGroundLevel1} Frame 1Symbol 86 MovieClip
"stageSign0"Symbol 1387 MovieClip {foreGroundLevel4} Frame 1Symbol 86 MovieClip
"sponsor"Symbol 1403 MovieClip {introSponsorSplashScreen} Frame 1Symbol 1402 MovieClip
"shadow"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 438 MovieClip
"torso"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178}
"leg"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 1407 MovieClip
"weaponHolderb"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 80 MovieClip
"head"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186}
"weaponHolderf"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 80 MovieClip
"kaki"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 482 MovieClip
"badan"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 483 MovieClip
"kepala"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 482 MovieClip
"floorDetector"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 483 MovieClip
"clipTop"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 77 MovieClip
"ladderDetector"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 77 MovieClip
"smokeOut"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 77 MovieClip
"bloodSign"Symbol 1408 MovieClip {zombieCrawl01} Frame 1Symbol 487 MovieClip {Days2Die_fla.bloodSign_112}
"bulletOut"Symbol 1410 MovieClip {zombieArmF04} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1414 MovieClip {armM14F} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1414 MovieClip {armM14F} Frame 1Symbol 166 MovieClip
"magOut"Symbol 1414 MovieClip {armM14F} Frame 1Symbol 166 MovieClip
"bulletOut"Symbol 1422 MovieClip {armM1911F} Frame 1Symbol 166 MovieClip
"shellOut"Symbol 1422 MovieClip {armM1911F} Frame 1Symbol 166 MovieClip
"magOut"Symbol 1422 MovieClip {armM1911F} Frame 1Symbol 166 MovieClip
"skipButton"Symbol 1450 MovieClip {endingMovie} Frame 1Symbol 129 Button
"yesButton"Symbol 1460 MovieClip {extendedPlay} Frame 1Symbol 1454 Button
"noButton"Symbol 1460 MovieClip {extendedPlay} Frame 1Symbol 1456 Button
"submitButton"Symbol 1460 MovieClip {extendedPlay} Frame 1Symbol 1459 Button
"yesButton"Symbol 1462 MovieClip {harbourWarning} Frame 1Symbol 1454 Button
"noButton"Symbol 1462 MovieClip {harbourWarning} Frame 1Symbol 1456 Button

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.

Labels

"normal"Symbol 17 MovieClip Frame 1
"mouseOver"Symbol 17 MovieClip Frame 2
"locked"Symbol 17 MovieClip Frame 3
"normal"Symbol 20 MovieClip Frame 1
"mouseOver"Symbol 20 MovieClip Frame 2
"locked"Symbol 20 MovieClip Frame 3
"normal"Symbol 23 MovieClip Frame 1
"mouseOver"Symbol 23 MovieClip Frame 2
"locked"Symbol 23 MovieClip Frame 3
"normal"Symbol 26 MovieClip Frame 1
"mouseOver"Symbol 26 MovieClip Frame 2
"locked"Symbol 26 MovieClip Frame 3
"normal"Symbol 29 MovieClip Frame 1
"mouseOver"Symbol 29 MovieClip Frame 2
"locked"Symbol 29 MovieClip Frame 3
"normal"Symbol 32 MovieClip Frame 1
"mouseOver"Symbol 32 MovieClip Frame 2
"locked"Symbol 32 MovieClip Frame 3
"loading"Symbol 53 MovieClip {Days2Die_fla.loadingText_405} Frame 1
"play"Symbol 53 MovieClip {Days2Die_fla.loadingText_405} Frame 2
"idle"Symbol 95 MovieClip {armMinigunB} Frame 1
"shoot"Symbol 95 MovieClip {armMinigunB} Frame 2
"reload"Symbol 95 MovieClip {armMinigunB} Frame 4
"warmUp"Symbol 95 MovieClip {armMinigunB} Frame 36
"finish"Symbol 158 MovieClip {Days2Die_fla.days2dieintro_13} Frame 419
"finish"Symbol 159 MovieClip {introScreen} Frame 569
"idle"Symbol 171 MovieClip {armMinigunF} Frame 1
"shoot"Symbol 171 MovieClip {armMinigunF} Frame 2
"reload"Symbol 171 MovieClip {armMinigunF} Frame 4
"warmUp"Symbol 171 MovieClip {armMinigunF} Frame 36
"idle"Symbol 186 MovieClip {armBarretM82F} Frame 1
"shoot"Symbol 186 MovieClip {armBarretM82F} Frame 2
"reload"Symbol 186 MovieClip {armBarretM82F} Frame 11
"pump"Symbol 186 MovieClip {armBarretM82F} Frame 41
"idle"Symbol 189 MovieClip {armBarretM82B} Frame 1
"shoot"Symbol 189 MovieClip {armBarretM82B} Frame 2
"reload"Symbol 189 MovieClip {armBarretM82B} Frame 11
"pump"Symbol 189 MovieClip {armBarretM82B} Frame 41
"idle"Symbol 194 MovieClip {armGLM32F} Frame 1
"shoot"Symbol 194 MovieClip {armGLM32F} Frame 2
"reload"Symbol 194 MovieClip {armGLM32F} Frame 11
"idle"Symbol 197 MovieClip {armGLM32B} Frame 1
"shoot"Symbol 197 MovieClip {armGLM32B} Frame 2
"reload"Symbol 197 MovieClip {armGLM32B} Frame 11
"idle"Symbol 209 MovieClip {zombieArmF05} Frame 1
"walk"Symbol 209 MovieClip {zombieArmF05} Frame 25
"run"Symbol 209 MovieClip {zombieArmF05} Frame 58
"attack"Symbol 209 MovieClip {zombieArmF05} Frame 78
"death01"Symbol 209 MovieClip {zombieArmF05} Frame 87
"idle"Symbol 214 MovieClip {zombieArmB05} Frame 1
"walk"Symbol 214 MovieClip {zombieArmB05} Frame 25
"run"Symbol 214 MovieClip {zombieArmB05} Frame 58
"attack"Symbol 214 MovieClip {zombieArmB05} Frame 78
"death01"Symbol 214 MovieClip {zombieArmB05} Frame 87
"idle"Symbol 274 MovieClip {armGrenadeB} Frame 1
"shoot"Symbol 274 MovieClip {armGrenadeB} Frame 2
"reload"Symbol 274 MovieClip {armGrenadeB} Frame 17
"idle2"Symbol 274 MovieClip {armGrenadeB} Frame 28
"idle"Symbol 279 MovieClip {armGrenadeF} Frame 1
"shoot"Symbol 279 MovieClip {armGrenadeF} Frame 2
"reload"Symbol 279 MovieClip {armGrenadeF} Frame 17
"idle2"Symbol 279 MovieClip {armGrenadeF} Frame 28
"idle"Symbol 280 MovieClip {armKnifeB} Frame 1
"shoot"Symbol 280 MovieClip {armKnifeB} Frame 2
"reload"Symbol 280 MovieClip {armKnifeB} Frame 9
"idle"Symbol 289 MovieClip {armKnifeF} Frame 1
"shoot"Symbol 289 MovieClip {armKnifeF} Frame 2
"reload"Symbol 289 MovieClip {armKnifeF} Frame 9
"idle"Symbol 292 MovieClip {armM4B} Frame 1
"shoot"Symbol 292 MovieClip {armM4B} Frame 2
"reload"Symbol 292 MovieClip {armM4B} Frame 4
"idle"Symbol 298 MovieClip {armM4F} Frame 1
"shoot"Symbol 298 MovieClip {armM4F} Frame 2
"reload"Symbol 298 MovieClip {armM4F} Frame 4
"idle"Symbol 301 MovieClip {armPistolB} Frame 1
"shoot"Symbol 301 MovieClip {armPistolB} Frame 2
"reload"Symbol 301 MovieClip {armPistolB} Frame 7
"idle"Symbol 307 MovieClip {armPistolF} Frame 1
"shoot"Symbol 307 MovieClip {armPistolF} Frame 2
"reload"Symbol 307 MovieClip {armPistolF} Frame 7
"idle"Symbol 310 MovieClip {armSMGB} Frame 1
"shoot"Symbol 310 MovieClip {armSMGB} Frame 2
"reload"Symbol 310 MovieClip {armSMGB} Frame 4
"idle"Symbol 321 MovieClip {armSMGF} Frame 1
"shoot"Symbol 321 MovieClip {armSMGF} Frame 2
"reload"Symbol 321 MovieClip {armSMGF} Frame 5
"smoke"Symbol 341 MovieClip {explosion} Frame 2
"ammo12gauge"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 1
"ammo357"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 2
"ammo45"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 3
"ammo9mm"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 4
"ammo50"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 5
"ammo762"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 6
"ammo556"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 7
"ammo50cal"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 8
"ammoHE"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 9
"other"Symbol 373 MovieClip {Days2Die_fla.ammoTypeSign_87} Frame 10
"idle"Symbol 439 MovieClip {Days2Die_fla.maincharLegs_102} Frame 1
"walk"Symbol 439 MovieClip {Days2Die_fla.maincharLegs_102} Frame 25
"run"Symbol 439 MovieClip {Days2Die_fla.maincharLegs_102} Frame 66
"death"Symbol 439 MovieClip {Days2Die_fla.maincharLegs_102} Frame 86
"female01"Symbol 446 MovieClip {Days2Die_fla.mainBody_104} Frame 1
"female02"Symbol 446 MovieClip {Days2Die_fla.mainBody_104} Frame 2
"female03"Symbol 446 MovieClip {Days2Die_fla.mainBody_104} Frame 3
"male01"Symbol 446 MovieClip {Days2Die_fla.mainBody_104} Frame 4
"male02"Symbol 446 MovieClip {Days2Die_fla.mainBody_104} Frame 5
"male03"Symbol 446 MovieClip {Days2Die_fla.mainBody_104} Frame 6
"idle"Symbol 447 MovieClip {Days2Die_fla.maincharBody_103} Frame 1
"walk"Symbol 447 MovieClip {Days2Die_fla.maincharBody_103} Frame 25
"run"Symbol 447 MovieClip {Days2Die_fla.maincharBody_103} Frame 66
"death"Symbol 447 MovieClip {Days2Die_fla.maincharBody_103} Frame 86
"Lisa"Symbol 479 MovieClip {mainHead} Frame 1
"Wendy"Symbol 479 MovieClip {mainHead} Frame 2
"Ivy"Symbol 479 MovieClip {mainHead} Frame 3
"Melisa"Symbol 479 MovieClip {mainHead} Frame 4
"Andrew"Symbol 479 MovieClip {mainHead} Frame 5
"Kris"Symbol 479 MovieClip {mainHead} Frame 6
"Francis"Symbol 479 MovieClip {mainHead} Frame 7
"Bill"Symbol 479 MovieClip {mainHead} Frame 8
"Louis"Symbol 479 MovieClip {mainHead} Frame 9
"Darmin"Symbol 479 MovieClip {mainHead} Frame 10
"idle"Symbol 480 MovieClip {Days2Die_fla.maincharHead_105} Frame 1
"walk"Symbol 480 MovieClip {Days2Die_fla.maincharHead_105} Frame 25
"run"Symbol 480 MovieClip {Days2Die_fla.maincharHead_105} Frame 66
"death"Symbol 480 MovieClip {Days2Die_fla.maincharHead_105} Frame 86
"doorOpen"Symbol 495 MovieClip {Days2Die_fla.signBaloon_114} Frame 1
"doorLocked"Symbol 495 MovieClip {Days2Die_fla.signBaloon_114} Frame 2
"talk"Symbol 495 MovieClip {Days2Die_fla.signBaloon_114} Frame 3
"pickup"Symbol 495 MovieClip {Days2Die_fla.signBaloon_114} Frame 4
"question"Symbol 495 MovieClip {Days2Die_fla.signBaloon_114} Frame 5
"question2"Symbol 495 MovieClip {Days2Die_fla.signBaloon_114} Frame 6
"muteon"Symbol 509 MovieClip {Days2Die_fla.buttonSound_124} Frame 1
"muteoff"Symbol 509 MovieClip {Days2Die_fla.buttonSound_124} Frame 2
"Shotgun"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 1
"M1911"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 2
"Walther P99"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 3
"Glock"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 4
"Desert Eagle"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 5
"Beretta M9"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 6
"Steyr TMP"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 7
"MPU"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 8
"SM5"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 9
"AK47"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 10
"M4"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 11
"M14"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 12
"Barret M82"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 13
"GL M32"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 14
"Minigun"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 15
"Katana"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 16
"Knife"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 17
"Bat"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 18
"Chain Saw"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 19
"Grenade"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 20
"Dynamite"Symbol 568 MovieClip {Days2Die_fla.signBullets_139} Frame 21
"empty"Symbol 619 MovieClip Frame 1
"accuracy"Symbol 619 MovieClip Frame 2
"extraAmmo"Symbol 619 MovieClip Frame 3
"fastRunner"Symbol 619 MovieClip Frame 4
"extraHealth"Symbol 619 MovieClip Frame 5
"fastHand"Symbol 619 MovieClip Frame 6
"gameover"Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140} Frame 1
"score"Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140} Frame 2
"perk"Symbol 622 MovieClip {Days2Die_fla.ResultScreen_140} Frame 11
"idle"Symbol 646 MovieClip {menuBarClip} Frame 1
"enter"Symbol 646 MovieClip {menuBarClip} Frame 2
"out"Symbol 646 MovieClip {menuBarClip} Frame 13
"idle"Symbol 665 MovieClip {zombieArmB01} Frame 1
"walk"Symbol 665 MovieClip {zombieArmB01} Frame 25
"run"Symbol 665 MovieClip {zombieArmB01} Frame 58
"attack"Symbol 665 MovieClip {zombieArmB01} Frame 78
"death01"Symbol 665 MovieClip {zombieArmB01} Frame 87
"idle"Symbol 666 MovieClip {zombieArmF01} Frame 1
"walk"Symbol 666 MovieClip {zombieArmF01} Frame 25
"run"Symbol 666 MovieClip {zombieArmF01} Frame 58
"attack"Symbol 666 MovieClip {zombieArmF01} Frame 78
"death01"Symbol 666 MovieClip {zombieArmF01} Frame 87
"idle"Symbol 686 MovieClip {zombieBody01} Frame 1
"bodyshot0"Symbol 686 MovieClip {zombieBody01} Frame 2
"bodyshot1"Symbol 686 MovieClip {zombieBody01} Frame 9
"bodyshot2"Symbol 686 MovieClip {zombieBody01} Frame 15
"idle"Symbol 703 MovieClip {Days2Die_fla.zombieHead01_175} Frame 1
"attack"Symbol 703 MovieClip {Days2Die_fla.zombieHead01_175} Frame 2
"headshot0"Symbol 703 MovieClip {Days2Die_fla.zombieHead01_175} Frame 3
"headshot1"Symbol 703 MovieClip {Days2Die_fla.zombieHead01_175} Frame 8
"headshot2"Symbol 703 MovieClip {Days2Die_fla.zombieHead01_175} Frame 13
"idle"Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177} Frame 1
"walk"Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177} Frame 25
"run"Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177} Frame 58
"attack"Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177} Frame 78
"death01"Symbol 704 MovieClip {Days2Die_fla.zombieLegs01_177} Frame 87
"idle"Symbol 722 MovieClip {Days2Die_fla.zombieBody02_180} Frame 1
"bodyshot0"Symbol 722 MovieClip {Days2Die_fla.zombieBody02_180} Frame 2
"bodyshot1"Symbol 722 MovieClip {Days2Die_fla.zombieBody02_180} Frame 9
"bodyshot2"Symbol 722 MovieClip {Days2Die_fla.zombieBody02_180} Frame 15
"idle"Symbol 740 MovieClip {Days2Die_fla.zombieBody03_181} Frame 1
"bodyshot0"Symbol 740 MovieClip {Days2Die_fla.zombieBody03_181} Frame 2
"bodyshot1"Symbol 740 MovieClip {Days2Die_fla.zombieBody03_181} Frame 9
"bodyshot2"Symbol 740 MovieClip {Days2Die_fla.zombieBody03_181} Frame 15
"idle"Symbol 758 MovieClip {Days2Die_fla.zombieBody04_182} Frame 1
"bodyshot0"Symbol 758 MovieClip {Days2Die_fla.zombieBody04_182} Frame 2
"bodyshot1"Symbol 758 MovieClip {Days2Die_fla.zombieBody04_182} Frame 9
"bodyshot2"Symbol 758 MovieClip {Days2Die_fla.zombieBody04_182} Frame 15
"idle"Symbol 776 MovieClip {Days2Die_fla.zombieBody05_183} Frame 1
"bodyshot0"Symbol 776 MovieClip {Days2Die_fla.zombieBody05_183} Frame 2
"bodyshot1"Symbol 776 MovieClip {Days2Die_fla.zombieBody05_183} Frame 9
"bodyshot2"Symbol 776 MovieClip {Days2Die_fla.zombieBody05_183} Frame 15
"idle"Symbol 794 MovieClip {Days2Die_fla.zombieBody06_184} Frame 1
"bodyshot0"Symbol 794 MovieClip {Days2Die_fla.zombieBody06_184} Frame 2
"bodyshot1"Symbol 794 MovieClip {Days2Die_fla.zombieBody06_184} Frame 9
"bodyshot2"Symbol 794 MovieClip {Days2Die_fla.zombieBody06_184} Frame 15
"body01"Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179} Frame 1
"body02"Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179} Frame 2
"body03"Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179} Frame 3
"body04"Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179} Frame 4
"body05"Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179} Frame 5
"body06"Symbol 795 MovieClip {Days2Die_fla.zombieBodies_179} Frame 6
"idle"Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178} Frame 1
"walk"Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178} Frame 25
"run"Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178} Frame 58
"attack"Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178} Frame 78
"death01"Symbol 796 MovieClip {Days2Die_fla.zombieMainBody_178} Frame 87
"idle"Symbol 809 MovieClip {Days2Die_fla.zombieHead02_187} Frame 1
"attack"Symbol 809 MovieClip {Days2Die_fla.zombieHead02_187} Frame 2
"headshot0"Symbol 809 MovieClip {Days2Die_fla.zombieHead02_187} Frame 3
"headshot1"Symbol 809 MovieClip {Days2Die_fla.zombieHead02_187} Frame 8
"headshot2"Symbol 809 MovieClip {Days2Die_fla.zombieHead02_187} Frame 13
"idle"Symbol 823 MovieClip {Days2Die_fla.zombieHead03_188} Frame 1
"attack"Symbol 823 MovieClip {Days2Die_fla.zombieHead03_188} Frame 2
"headshot0"Symbol 823 MovieClip {Days2Die_fla.zombieHead03_188} Frame 3
"headshot1"Symbol 823 MovieClip {Days2Die_fla.zombieHead03_188} Frame 8
"headshot2"Symbol 823 MovieClip {Days2Die_fla.zombieHead03_188} Frame 13
"idle"Symbol 836 MovieClip {Days2Die_fla.zombieHead04_189} Frame 1
"attack"Symbol 836 MovieClip {Days2Die_fla.zombieHead04_189} Frame 2
"headshot0"Symbol 836 MovieClip {Days2Die_fla.zombieHead04_189} Frame 3
"headshot1"Symbol 836 MovieClip {Days2Die_fla.zombieHead04_189} Frame 8
"headshot2"Symbol 836 MovieClip {Days2Die_fla.zombieHead04_189} Frame 13
"idle"Symbol 849 MovieClip {Days2Die_fla.zombieHead05_190} Frame 1
"attack"Symbol 849 MovieClip {Days2Die_fla.zombieHead05_190} Frame 2
"headshot0"Symbol 849 MovieClip {Days2Die_fla.zombieHead05_190} Frame 3
"headshot1"Symbol 849 MovieClip {Days2Die_fla.zombieHead05_190} Frame 8
"headshot2"Symbol 849 MovieClip {Days2Die_fla.zombieHead05_190} Frame 13
"idle"Symbol 858 MovieClip {Days2Die_fla.zombieHead06_191} Frame 1
"attack"Symbol 858 MovieClip {Days2Die_fla.zombieHead06_191} Frame 2
"headshot0"Symbol 858 MovieClip {Days2Die_fla.zombieHead06_191} Frame 3
"headshot1"Symbol 858 MovieClip {Days2Die_fla.zombieHead06_191} Frame 8
"headshot2"Symbol 858 MovieClip {Days2Die_fla.zombieHead06_191} Frame 13
"head01"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 1
"head02"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 2
"head03"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 3
"head04"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 4
"head05"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 5
"head06"Symbol 859 MovieClip {Days2Die_fla.zombieHeads_186} Frame 6
"idle"Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185} Frame 1
"walk"Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185} Frame 25
"run"Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185} Frame 58
"attack"Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185} Frame 78
"death01"Symbol 864 MovieClip {Days2Die_fla.zombieMainHead_185} Frame 87
"finish"Symbol 977 MovieClip {movieLevel1} Frame 930
"idle"Symbol 984 MovieClip {armShotGunB} Frame 1
"shoot"Symbol 984 MovieClip {armShotGunB} Frame 2
"reload"Symbol 984 MovieClip {armShotGunB} Frame 10
"pump"Symbol 984 MovieClip {armShotGunB} Frame 31
"idle"Symbol 997 MovieClip {armShotGunF} Frame 1
"shoot"Symbol 997 MovieClip {armShotGunF} Frame 2
"reload"Symbol 997 MovieClip {armShotGunF} Frame 10
"pump"Symbol 997 MovieClip {armShotGunF} Frame 31
"idle"Symbol 1057 MovieClip {armBaseballBatB} Frame 1
"shoot"Symbol 1057 MovieClip {armBaseballBatB} Frame 2
"reload"Symbol 1057 MovieClip {armBaseballBatB} Frame 13
"idle"Symbol 1058 MovieClip {armBaseballBatF} Frame 1
"shoot"Symbol 1058 MovieClip {armBaseballBatF} Frame 2
"reload"Symbol 1058 MovieClip {armBaseballBatF} Frame 13
"idle"Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271} Frame 1
"enter"Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271} Frame 2
"out"Symbol 1081 MovieClip {Days2Die_fla.infoBarricade_271} Frame 13
"idle"Symbol 1111 MovieClip {armAKB} Frame 1
"shoot"Symbol 1111 MovieClip {armAKB} Frame 2
"reload"Symbol 1111 MovieClip {armAKB} Frame 4
"idle"Symbol 1115 MovieClip {armAKF} Frame 1
"shoot"Symbol 1115 MovieClip {armAKF} Frame 2
"reload"Symbol 1115 MovieClip {armAKF} Frame 4
"idle"Symbol 1123 MovieClip {armDeagleF} Frame 1
"shoot"Symbol 1123 MovieClip {armDeagleF} Frame 2
"reload"Symbol 1123 MovieClip {armDeagleF} Frame 7
"idle"Symbol 1128 MovieClip {armMPUF} Frame 1
"shoot"Symbol 1128 MovieClip {armMPUF} Frame 2
"reload"Symbol 1128 MovieClip {armMPUF} Frame 5
"idle"Symbol 1131 MovieClip {armMPUB} Frame 1
"shoot"Symbol 1131 MovieClip {armMPUB} Frame 2
"reload"Symbol 1131 MovieClip {armMPUB} Frame 5
"idle"Symbol 1135 MovieClip {armSM5F} Frame 1
"shoot"Symbol 1135 MovieClip {armSM5F} Frame 2
"reload"Symbol 1135 MovieClip {armSM5F} Frame 5
"idle"Symbol 1138 MovieClip {armSM5B} Frame 1
"shoot"Symbol 1138 MovieClip {armSM5B} Frame 2
"reload"Symbol 1138 MovieClip {armSM5B} Frame 5
"idle"Symbol 1196 MovieClip {armBerettaF} Frame 1
"shoot"Symbol 1196 MovieClip {armBerettaF} Frame 2
"reload"Symbol 1196 MovieClip {armBerettaF} Frame 7
"idle"Symbol 1197 MovieClip {armChainSawB} Frame 1
"shoot"Symbol 1197 MovieClip {armChainSawB} Frame 2
"idle"Symbol 1202 MovieClip {armChainSawF} Frame 1
"shoot"Symbol 1202 MovieClip {armChainSawF} Frame 2
"reload"Symbol 1202 MovieClip {armChainSawF} Frame 3
"idle"Symbol 1212 MovieClip {armDynamiteF} Frame 1
"shoot"Symbol 1212 MovieClip {armDynamiteF} Frame 2
"reload"Symbol 1212 MovieClip {armDynamiteF} Frame 17
"idle2"Symbol 1212 MovieClip {armDynamiteF} Frame 28
"idle"Symbol 1213 MovieClip {armKatanaB} Frame 1
"shoot"Symbol 1213 MovieClip {armKatanaB} Frame 2
"reload"Symbol 1213 MovieClip {armKatanaB} Frame 11
"idle"Symbol 1220 MovieClip {armKatanaF} Frame 1
"shoot"Symbol 1220 MovieClip {armKatanaF} Frame 2
"reload"Symbol 1220 MovieClip {armKatanaF} Frame 11
"idle"Symbol 1224 MovieClip {zombieArmF02} Frame 1
"walk"Symbol 1224 MovieClip {zombieArmF02} Frame 25
"run"Symbol 1224 MovieClip {zombieArmF02} Frame 58
"attack"Symbol 1224 MovieClip {zombieArmF02} Frame 78
"death01"Symbol 1224 MovieClip {zombieArmF02} Frame 87
"idle"Symbol 1225 MovieClip {zombieArmB02} Frame 1
"walk"Symbol 1225 MovieClip {zombieArmB02} Frame 25
"run"Symbol 1225 MovieClip {zombieArmB02} Frame 58
"attack"Symbol 1225 MovieClip {zombieArmB02} Frame 78
"death01"Symbol 1225 MovieClip {zombieArmB02} Frame 87
"health100"Symbol 1231 MovieClip {barricadeB1} Frame 1
"health75"Symbol 1231 MovieClip {barricadeB1} Frame 2
"health50"Symbol 1231 MovieClip {barricadeB1} Frame 3
"health25"Symbol 1231 MovieClip {barricadeB1} Frame 4
"health100"Symbol 1239 MovieClip {barricadeA1} Frame 1
"health75"Symbol 1239 MovieClip {barricadeA1} Frame 2
"health50"Symbol 1239 MovieClip {barricadeA1} Frame 3
"health25"Symbol 1239 MovieClip {barricadeA1} Frame 4
"health100"Symbol 1291 MovieClip {barricadeB0} Frame 1
"health75"Symbol 1291 MovieClip {barricadeB0} Frame 2
"health50"Symbol 1291 MovieClip {barricadeB0} Frame 3
"health25"Symbol 1291 MovieClip {barricadeB0} Frame 4
"health100"Symbol 1297 MovieClip {barricadeA0} Frame 1
"health75"Symbol 1297 MovieClip {barricadeA0} Frame 2
"health50"Symbol 1297 MovieClip {barricadeA0} Frame 3
"health25"Symbol 1297 MovieClip {barricadeA0} Frame 4
"idle"Symbol 1309 MovieClip {zombieArmF03} Frame 1
"walk"Symbol 1309 MovieClip {zombieArmF03} Frame 25
"run"Symbol 1309 MovieClip {zombieArmF03} Frame 58
"attack"Symbol 1309 MovieClip {zombieArmF03} Frame 78
"death01"Symbol 1309 MovieClip {zombieArmF03} Frame 87
"idle"Symbol 1310 MovieClip {zombieArmB03} Frame 1
"walk"Symbol 1310 MovieClip {zombieArmB03} Frame 25
"run"Symbol 1310 MovieClip {zombieArmB03} Frame 58
"attack"Symbol 1310 MovieClip {zombieArmB03} Frame 78
"death01"Symbol 1310 MovieClip {zombieArmB03} Frame 87
"idle"Symbol 1409 MovieClip {zombieArmB04} Frame 1
"walk"Symbol 1409 MovieClip {zombieArmB04} Frame 25
"run"Symbol 1409 MovieClip {zombieArmB04} Frame 58
"attack"Symbol 1409 MovieClip {zombieArmB04} Frame 78
"death01"Symbol 1409 MovieClip {zombieArmB04} Frame 87
"idle"Symbol 1410 MovieClip {zombieArmF04} Frame 1
"walk"Symbol 1410 MovieClip {zombieArmF04} Frame 25
"run"Symbol 1410 MovieClip {zombieArmF04} Frame 58
"attack"Symbol 1410 MovieClip {zombieArmF04} Frame 78
"death01"Symbol 1410 MovieClip {zombieArmF04} Frame 87
"idle"Symbol 1414 MovieClip {armM14F} Frame 1
"shoot"Symbol 1414 MovieClip {armM14F} Frame 2
"reload"Symbol 1414 MovieClip {armM14F} Frame 4
"idle"Symbol 1422 MovieClip {armM1911F} Frame 1
"shoot"Symbol 1422 MovieClip {armM1911F} Frame 2
"reload"Symbol 1422 MovieClip {armM1911F} Frame 7
"finish"Symbol 1450 MovieClip {endingMovie} Frame 823




http://swfchan.com/11/52797/info.shtml
Created: 23/4 -2019 07:02:48 Last modified: 23/4 -2019 07:02:48 Server time: 07/05 -2024 02:41:12