Section 1
//MainTimeline (DroidCom_fla.MainTimeline)
package DroidCom_fla {
import flash.display.*;
import flash.events.*;
import fl.motion.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class MainTimeline extends MovieClip {
public var Music;
public var NoiseMC;
public var Game;
public var LeftPressed;
public var pcent;
public var NoiseLineMC;
public var ForegroundMC;
public var GameTimer;
public var Pixel;
public var a;
public var i;
public var j;
public var d;
public var n;
public var NextChannel;
public var s;
public var u;
public var p;
public var l;
public var RightPressed;
public var TempName;
public var EffectChannels;
public var k;
public var Particles;
public var ParticleInformation;
public var DefaultUnitInformation;
public var NewGameMC;
public var BriefingBackgroundMC;
public var SlowPressed;
public var Cycle;
public var PresentsMC;
public var BackgroundParticlesMC;
public var ShadowMC;
public var UnitInformation;
public var Effects;
public var UpPressed;
public var LinksMC;
public var FirePressed;
public var SavedGame;
public var DownPressed;
public var RGBMC;
public var HamsterWorldMC;
public var TP3MC;
public var PatternRotation;
public var BackgroundImageMC;
public var Odd;
public var BackgroundCollectionMC;
public var LoadingBarMC;
public var AntennaMC;
public var MusicChannel:SoundChannel;
public var soundVol:SoundTransform;
public var VariableName;
public var SavedUnits;
public var TP2MC;
public var CTRLPressed;
public var Units;
public var BackgroundMC;
public var PixelRect:Shape;
public var Level;
public var PatternDistance;
public var TP1MC;
public var Editor;
public var MessageMC;
public var BlankMC;
public var DroidComMC;
public var LevelNameMC;
public var ActiveUnits;
public var JumpPressed;
public var StatusBarMC;
public var LevelMC;
public function MainTimeline(){
addFrameScript(0, frame1, 2, frame3, 3, frame4);
}
public function PlayEffect(_arg1:String, _arg2){
var _local3:*;
_local3 = -1;
s = 0;
while (s < Effects.length) {
if (Effects[s].Name == _arg1){
_local3 = s;
break;
};
s++;
};
if (_local3 > -1){
soundVol.volume = _arg2;
EffectChannels[NextChannel].stop();
EffectChannels[NextChannel] = Effects[_local3].File.play(0, 1);
EffectChannels[NextChannel].soundTransform = soundVol;
NextChannel = (NextChannel + 1);
if (NextChannel == EffectChannels.length){
NextChannel = 0;
};
};
}
public function GetCollisionSide(_arg1:int, _arg2:int):Point{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
_local3 = new Point(UnitInformation[Units[_arg1].Id].Size.x, UnitInformation[Units[_arg1].Id].Size.y);
_local4 = new Point(UnitInformation[Units[_arg2].Id].Size.x, UnitInformation[Units[_arg2].Id].Size.y);
_local5 = ((_local3.y + _local4.y) / ((_local3.x + _local4.x) + (_local3.y + _local4.y)));
if ((Math.abs((Units[_arg1].Position.x - Units[_arg2].Position.x)) * _local5) > (Math.abs((Units[_arg1].Position.y - Units[_arg2].Position.y)) * (1 - _local5))){
_local6 = (Units[_arg1].Position.x - _local3.x);
_local7 = (Units[_arg1].Position.x + _local3.x);
_local8 = (Units[_arg2].Position.x - _local4.x);
_local9 = (Units[_arg2].Position.x + _local4.x);
if (Units[_arg1].Position.x > Units[_arg2].Position.x){
return (new Point(1, (_local6 - _local9)));
};
return (new Point(3, (_local8 - _local7)));
} else {
_local10 = (Units[_arg1].Position.y - _local3.y);
_local11 = (Units[_arg1].Position.y + _local3.y);
_local12 = (Units[_arg2].Position.y - _local4.y);
_local13 = (Units[_arg2].Position.y + _local4.y);
if (Units[_arg1].Position.y > Units[_arg2].Position.y){
return (new Point(2, (_local10 - _local13)));
};
};
return (new (_local11 - !NULL!).Point(!NULL!, !NULL!));
}
public function LoadGame(){
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = Game.CurrentLevel;
_local2 = Game.LastMusic;
Game = new Object();
for (VariableName in SavedGame) {
if ((SavedGame[VariableName] is Point)){
Game[VariableName] = new Point();
Game[VariableName].x = SavedGame[VariableName].x;
Game[VariableName].y = SavedGame[VariableName].y;
} else {
Game[VariableName] = SavedGame[VariableName];
};
};
Game.CurrentLevel = _local1;
Game.LastMusic = _local2;
u = 0;
while (u < Units.length) {
if ((((Units[u].Changed == true)) || ((Units[u].SavedUnit == undefined)))){
DestroyUnit(u, false);
u = (u - 1);
} else {
SavedUnits[Units[u].SavedUnit].NeedToCreate = false;
};
u++;
};
u = 0;
while (u < Particles.length) {
Particles[u].ParticleMC.alpha = 0;
u++;
};
_local3 = 0;
j = 0;
while (j < SavedUnits.length) {
if (SavedUnits[j].NeedToCreate == true){
CreateUnit(UnitInformation[SavedUnits[j].Id].Name, SavedUnits[j].Team, new Point(SavedUnits[j].Position.x, SavedUnits[j].Position.y), new Point(SavedUnits[j].Velocity.x, SavedUnits[j].Velocity.y), SavedUnits[j].Angle, SavedUnits[j].Trigger, SavedUnits[j].TriggerName, SavedUnits[j].Activated);
Unit = (Units.length - 1);
for (VariableName in Units[Unit]) {
if (VariableName != "UnitMC"){
if ((SavedUnits[j][VariableName] is Point)){
Units[Unit][VariableName] = new Point();
Units[Unit][VariableName].x = SavedUnits[j][VariableName].x;
Units[Unit][VariableName].y = SavedUnits[j][VariableName].y;
} else {
Units[Unit][VariableName] = SavedUnits[j][VariableName];
};
};
};
_local3 = (_local3 + 1);
Units[Unit].SavedUnit = j;
Units[Unit].Changed = false;
} else {
SavedUnits[j].NeedToCreate = true;
};
j++;
};
ActiveUnits = new Array();
u = 0;
while (u < Units.length) {
Units[u].UnitMC.Unit = u;
if (Units[u].Updating == true){
ActiveUnits.push(u);
Units[u].Changed = true;
};
u++;
};
}
public function UpdateUnits(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local22:*;
var _local23:*;
var _local24:*;
var _local25:*;
var _local26:*;
var _local27:*;
var _local28:*;
var _local29:*;
var _local30:*;
var _local31:Color;
var _local32:*;
var _local33:*;
var _local34:*;
var _local35:*;
var _local36:*;
var _local37:*;
var _local38:*;
var _local39:*;
var _local40:*;
var _local41:*;
var _local42:*;
var _local43:*;
if (Game.NextUpdate == 0){
Game.NextUpdate = 4;
} else {
Game.NextUpdate = (Game.NextUpdate - 1);
};
a = 0;
for (;a < ActiveUnits.length;a++) {
_local1 = ActiveUnits[a];
_local2 = Units[_local1].Id;
if ((((((Game.SlowMotion == true)) && (!((UnitInformation[_local2].Name == "Player"))))) && ((Game.NextUpdate > 0)))){
} else {
if ((((((Editor.EditorEnabled == true)) && ((_local1 == 0)))) || ((Editor.EditorEnabled == false)))){
_local4 = false;
_local5 = false;
_local6 = false;
_local7 = false;
_local8 = false;
_local9 = false;
_local10 = false;
_local11 = false;
_local12 = false;
_local13 = false;
switch (UnitInformation[_local2].Controller){
case "Input":
if (Game.FreezePlayer == false){
if (Editor.EditorEnabled == true){
Units[_local1].StandingOnGround = true;
};
if (LeftPressed == true){
_local9 = true;
};
if (RightPressed == true){
_local10 = true;
};
if ((((JumpPressed == true)) && ((Units[_local1].StandingOnGround == true)))){
_local11 = true;
JumpPressed = false;
PlayEffect("PlayerCyborgJump", 1);
};
if ((((((SlowPressed == true)) && ((Game.ChronoCharge > 50)))) && ((Game.GotChronoManipulator == true)))){
Game.SlowMotion = true;
};
if ((((Game.SlowMotion == true)) && ((Game.ChronoCharge > 0)))){
Game.ChronoCharge = (Game.ChronoCharge - 1);
} else {
Game.SlowMotion = false;
Game.ChronoCharge = (Game.ChronoCharge + 0.25);
if (Game.ChronoCharge > 150){
Game.ChronoCharge = 150;
};
};
if ((((FirePressed == true)) && ((Game.GotGun == true)))){
_local13 = true;
if ((((UpPressed == true)) && ((Units[_local1].StandingOnGround == true)))){
_local9 = false;
_local10 = false;
};
};
} else {
Game.FreezePlayer = false;
Game.SlowMotion = false;
};
if (Units[_local1].WaitTime > 0){
Units[_local1].WaitTime = (Units[_local1].WaitTime - 1);
} else {
if (_local13 == true){
if (UpPressed == true){
CreateUnit("PlayerBullet", Units[_local1].Team, new Point(Units[_local1].Position.x, (Units[_local1].Position.y - 10)), new Point(0, -15), 0, "", "", false);
} else {
if ((((DownPressed == true)) && ((Units[_local1].StandingOnGround == false)))){
CreateUnit("PlayerBullet", Units[_local1].Team, new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 7)), new Point(0, 15), 0, "", "", false);
} else {
if (Units[_local1].Mirrored == true){
CreateUnit("PlayerBullet", Units[_local1].Team, new Point((Units[_local1].Position.x - 5), (Units[_local1].Position.y - 2)), new Point(-15, 0), 0, "", "", false);
} else {
CreateUnit("PlayerBullet", Units[_local1].Team, new Point((Units[_local1].Position.x + 5), (Units[_local1].Position.y - 2)), new Point(15, 0), 0, "", "", false);
};
};
};
PlayEffect("GreenBulletCreated", 1);
Units[_local1].WaitTime = 10;
};
};
if (Game.LevelLocked == true){
if (Game.CurrentLevel != Units[_local1].CurrentLevel){
Units[_local1].PauseTime = (Units[_local1].PauseTime + 1);
if (Units[_local1].PauseTime > 40){
Units[_local1].Health = 0;
};
} else {
Units[_local1].PauseTime = 0;
};
};
Game.PlayerHealth = Units[_local1].Health;
break;
case "LiftAI":
if (Units[_local1].Activated == true){
Units[_local1].PositionOnScreen = new Point((Units[_local1].Position.x - (Math.floor((Units[_local1].Position.x / Game.Resolution.x)) * Game.Resolution.x)), (Units[_local1].Position.y - (Math.floor((Units[_local1].Position.y / Game.Resolution.y)) * Game.Resolution.y)));
if (Units[_local1].PauseTime == Math.abs(UnitInformation[_local2].PauseTime)){
if (UnitInformation[_local2].PauseTime > 0){
if (Units[_local1].Return == true){
_local12 = true;
if (Pixel.hitTest(new Point(Units[_local1].PositionOnScreen.x, ((Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y) + 31)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF) == true){
Units[_local1].PauseTime = 0;
Units[_local1].Return = false;
_local12 = false;
if (Units[_local1].Trigger.length > 0){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
};
while (Pixel.hitTest(new Point(Units[_local1].PositionOnScreen.x, ((Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y) + 31)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF) == true) {
Units[_local1].Position.y = (Math.floor(Units[_local1].Position.y) - 1);
Units[_local1].PositionOnScreen = new Point((Units[_local1].Position.x - (Math.floor((Units[_local1].Position.x / Game.Resolution.x)) * Game.Resolution.x)), (Units[_local1].Position.y - (Math.floor((Units[_local1].Position.y / Game.Resolution.y)) * Game.Resolution.y)));
};
};
} else {
_local11 = true;
if (Pixel.hitTest(new Point(Units[_local1].PositionOnScreen.x, ((Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y) - 32)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF) == true){
Units[_local1].PauseTime = 0;
Units[_local1].Return = true;
_local11 = false;
if (Units[_local1].Trigger.length > 0){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
};
while (Pixel.hitTest(new Point(Units[_local1].PositionOnScreen.x, ((Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y) - 32)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF) == true) {
Units[_local1].Position.y = (Math.floor(Units[_local1].Position.y) + 1);
Units[_local1].PositionOnScreen = new Point((Units[_local1].Position.x - (Math.floor((Units[_local1].Position.x / Game.Resolution.x)) * Game.Resolution.x)), (Units[_local1].Position.y - (Math.floor((Units[_local1].Position.y / Game.Resolution.y)) * Game.Resolution.y)));
};
};
};
} else {
if (Units[_local1].Return == true){
_local10 = true;
if (Units[_local1].RightWall == true){
Units[_local1].PauseTime = 0;
Units[_local1].Return = false;
if (Units[_local1].Trigger.length > 0){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
};
};
} else {
_local9 = true;
if (Units[_local1].LeftWall == true){
Units[_local1].PauseTime = 0;
Units[_local1].Return = true;
if (Units[_local1].Trigger.length > 0){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
};
};
};
};
} else {
Units[_local1].PauseTime = (Units[_local1].PauseTime + 1);
if ((((Units[_local1].PauseTime == Math.abs(UnitInformation[_local2].PauseTime))) && ((Units[_local1].UnitMC.visible == true)))){
PlayEffect("LiftActivate", 1);
};
};
if (UnitInformation[_local2].Name == "EscapeLift"){
Game.FreezePlayer = true;
if (Units[_local1].Position.x < 4630){
if (Units[_local1].Health == UnitInformation[Units[_local1].Id].Health){
CreateUnit("Music", 0, new Point(Game.PlayerPosition.x, Game.PlayerPosition.y), new Point(0, 0), 0, "Afraid of Ruins", "Music", true);
};
CreateParticle("ParticleSpark", new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(((Math.random() * 2) - (Math.random() * 2)), (-(Math.random()) * 5)));
Units[_local1].Health = (Units[_local1].Health - 10);
if ((Cycle % 5) == 0){
PlayEffect("LaserHit", 1);
};
} else {
if (Units[_local1].Position.x > 54571.5){
Units[_local1].Activated = false;
};
};
};
};
break;
case "SpinnerAI":
if (Units[_local1].Activated == true){
if (Units[_local1].PauseTime == 0){
if (Game.PlayerPosition.x < Units[_local1].Position.x){
Units[_local1].PauseTime = -50;
_local11 = true;
if (Units[_local1].UnitMC.visible == true){
PlayEffect("SpinnerActivate", 1);
};
} else {
if (Game.PlayerPosition.x > Units[_local1].Position.x){
Units[_local1].PauseTime = 50;
_local11 = true;
if (Units[_local1].UnitMC.visible == true){
PlayEffect("SpinnerActivate", 1);
};
};
};
} else {
if (Units[_local1].StandingOnGround == true){
CreateParticle("ParticleSpark", new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 7)), new Point(((Math.random() * 2) - (Math.random() * 2)), (-(Math.random()) * 5)));
};
};
};
if (Units[_local1].PauseTime < 0){
Units[_local1].PauseTime = (Units[_local1].PauseTime + 1);
_local9 = true;
} else {
if (Units[_local1].PauseTime > 0){
Units[_local1].PauseTime = (Units[_local1].PauseTime - 1);
_local10 = true;
} else {
Units[_local1].Activated = false;
};
};
break;
case "TankAI":
if (Units[_local1].Activated == true){
if (((CheckCondition("PlayerInHorizontalView", _local1)) && ((((((Game.PlayerPosition.x < Units[_local1].Position.x)) && ((Units[_local1].Mirrored == true)))) || ((((Game.PlayerPosition.x > Units[_local1].Position.x)) && ((Units[_local1].Mirrored == false)))))))){
Units[_local1].PauseTime = (Units[_local1].PauseTime - 1);
if (Units[_local1].PauseTime == 0){
Units[_local1].PauseTime = 5;
if (Units[_local1].Return == false){
CreateUnit("Plasma", Units[_local1].Team, new Point((Units[_local1].Position.x - 5), (Units[_local1].Position.y - 9)), new Point(-15, ((Math.random() * 2) - (Math.random() * 2))), 0, "", "", false);
} else {
CreateUnit("Plasma", Units[_local1].Team, new Point((Units[_local1].Position.x + 5), (Units[_local1].Position.y - 9)), new Point(15, ((Math.random() * 2) - (Math.random() * 2))), 0, "", "", false);
};
if (Units[_local1].UnitMC.visible == true){
PlayEffect("PlasmaCreated", 0.7);
};
};
} else {
Units[_local1].PauseTime = 10;
if (Units[_local1].Return == false){
if (Units[_local1].LeftWall == true){
Units[_local1].Return = true;
};
_local9 = true;
} else {
if (Units[_local1].RightWall == true){
Units[_local1].Return = false;
};
_local10 = true;
};
};
};
break;
case "ProjectileAI":
if ((((Units[_local1].CollidedWithUnit == true)) || ((Units[_local1].CollidedWithLevel == true)))){
_local8 = true;
};
Units[_local1].UnitMC.rotation = ((Math.atan2(Units[_local1].Velocity.y, Units[_local1].Velocity.x) / Math.PI) * 180);
break;
case "SigntryAI":
CreateParticle("ParticleFlame", new Point((Units[_local1].Position.x - 18.5), (Units[_local1].Position.y + 19)), new Point(0, (Math.random() * 2)));
CreateParticle("ParticleFlame", new Point((Units[_local1].Position.x + 18.5), (Units[_local1].Position.y + 19)), new Point(0, (Math.random() * 2)));
if (Units[_local1].Activated == true){
if (Math.floor((Math.random() * 30)) == 0){
_local9 = true;
};
if (Math.floor((Math.random() * 30)) == 0){
_local10 = true;
};
if (Math.floor((Math.random() * 30)) == 0){
_local11 = true;
};
if (Math.floor((Math.random() * 30)) == 0){
_local12 = true;
};
Units[_local1].PauseTime = (Units[_local1].PauseTime - 1);
if (Units[_local1].Position.x < (Game.PlayerPosition.x - 100)){
_local10 = true;
} else {
if (Units[_local1].Position.x > (Game.PlayerPosition.x + 100)){
_local9 = true;
};
};
if (Units[_local1].Position.y < (Game.PlayerPosition.y - 150)){
_local12 = true;
} else {
if (Units[_local1].Position.y > (Game.PlayerPosition.y - 50)){
_local11 = true;
};
};
Units[_local1].Angle = (180 + ((Math.atan2((Game.PlayerPosition.y - Units[_local1].Position.y), (Game.PlayerPosition.x - Units[_local1].Position.x)) / Math.PI) * 180));
if (Units[_local1].PauseTime == 0){
Units[_local1].PauseTime = 150;
if (Math.floor((Math.random() * 2.9)) == 0){
Units[_local1].UnitMC.Text.textColor = 0xCC00;
Units[_local1].UnitMC.Text.text = ">:D";
} else {
if (Math.floor((Math.random() * 2.9)) == 0){
Units[_local1].UnitMC.Text.textColor = 0xCC00;
Units[_local1].UnitMC.Text.text = "HUG";
} else {
if (Math.floor((Math.random() * 1.9)) == 0){
Units[_local1].UnitMC.Text.textColor = 0xCC00;
Units[_local1].UnitMC.Text.text = "-_-";
} else {
if (Math.floor((Math.random() * 1.9)) == 0){
Units[_local1].UnitMC.Text.textColor = 0xCC00;
Units[_local1].UnitMC.Text.text = "!!!";
} else {
Units[_local1].UnitMC.Text.textColor = 0xCC00;
Units[_local1].UnitMC.Text.text = "LOE";
};
};
};
};
};
if ((((Units[_local1].PauseTime <= 30)) && (((Units[_local1].PauseTime % 5) == 0)))){
Units[_local1].UnitMC.Text.textColor = 13382451;
Units[_local1].UnitMC.Text.text = "DIE";
_local20 = new Point((10 * Math.sin((((Units[_local1].Angle - 90) * Math.PI) / 180))), (-10 * Math.cos((((Units[_local1].Angle - 90) * Math.PI) / 180))));
CreateUnit("Plasma", Units[_local1].Team, new Point((Units[_local1].Position.x + (_local20.x * 1)), ((Units[_local1].Position.y + 26) + (_local20.y * 1))), _local20, 0, "", "", false);
if (Units[_local1].UnitMC.visible == true){
PlayEffect("PlasmaCreated", 0.7);
};
};
if (Units[_local1].Health < (UnitInformation[_local2].Health * 0.5)){
Units[_local1].UnitMC.Text.textColor = 13382451;
Units[_local1].UnitMC.Text.text = "D:";
};
} else {
Units[_local1].PauseTime = 1;
Units[_local1].UnitMC.Text.textColor = 0xCC00;
Units[_local1].UnitMC.Text.text = "->";
};
break;
case "EmitterAI":
if (Units[_local1].Activated == true){
if (UnitInformation[_local2].Return == true){
Units[_local1].Angle = (Units[_local1].Angle + 1);
if (Units[_local1].Angle > 360){
Units[_local1].Angle = 0;
};
};
_local21 = LineOfSight(new Point(Units[_local1].Position.x, Units[_local1].Position.y), (Units[_local1].Angle + 90), Units[_local1].CurrentLevel, true, Units[_local1].Team);
Units[_local1].UnitMC.Laser1.alpha = (0.5 + (Math.random() * 0.5));
Units[_local1].UnitMC.Laser2.alpha = (0.5 + (Math.random() * 0.5));
Units[_local1].UnitMC.Laser1.scaleX = (-((Units[_local1].Position.x - _local21.x)) / 100);
Units[_local1].UnitMC.Laser1.scaleY = (-((Units[_local1].Position.y - _local21.y)) / 100);
Units[_local1].UnitMC.Laser2.scaleX = Units[_local1].UnitMC.Laser1.scaleX;
Units[_local1].UnitMC.Laser2.scaleY = Units[_local1].UnitMC.Laser1.scaleY;
if (Game.UnitInSight > -1){
if ((((Math.abs(UnitInformation[_local2].PauseTime) > 0)) && ((Units[Game.UnitInSight].Health > -1)))){
Units[Game.UnitInSight].Health = (Units[Game.UnitInSight].Health - Math.abs(UnitInformation[_local2].PauseTime));
if (((((Cycle % 5) == 0)) && ((Units[_local1].UnitMC.visible == true)))){
PlayEffect("LaserHit", 1);
};
};
if ((((Units[_local1].Trigger.length > 0)) && ((UnitInformation[Units[Game.UnitInSight].Id].Name == "Player")))){
PlayEffect("TriggerBeam", 1);
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
};
};
if (UnitInformation[_local2].PauseTime > 0){
CreateParticle("ParticleSpark", new Point(_local21.x, (_local21.y - 4)), new Point(((Math.random() * 2) - (Math.random() * 2)), (-(Math.random()) * 5)));
};
} else {
Units[_local1].UnitMC.Laser1.scaleX = 0;
Units[_local1].UnitMC.Laser1.scaleY = 0;
Units[_local1].UnitMC.Laser2.scaleX = 0;
Units[_local1].UnitMC.Laser2.scaleY = 0;
};
break;
case "PickupAI":
if (Units[_local1].Activated == true){
PlayEffect("PickupActivate", 1);
if (UnitInformation[_local2].Name == "PickupGun"){
Game.GotGun = true;
CreateUnit("SpeakBubble", 0, new Point((Game.PlayerPosition.x + 47), (Game.PlayerPosition.y - 48)), new Point(0, 0), 0, "Gun found", "", false);
} else {
if (UnitInformation[_local2].Name == "PickupSave"){
_local23 = new Point(Units[_local1].Position.x, Units[_local1].Position.y);
DestroyUnit(_local1, true);
SaveGame();
CreateParticle("ParticlePickup", new Point(_local23.x, _local23.y), new Point(0, 0));
CreateUnit("SpeakBubble", 0, new Point((Game.PlayerPosition.x + 47), (Game.PlayerPosition.y - 48)), new Point(0, 0), 0, "Game saved", "", false);
continue;
} else {
if (UnitInformation[_local2].Name == "PickupRepair"){
j = 0;
while (j < ActiveUnits.length) {
if (UnitInformation[Units[ActiveUnits[j]].Id].Name == "Player"){
Units[ActiveUnits[j]].Health = UnitInformation[Units[ActiveUnits[j]].Id].Health;
CreateUnit("SpeakBubble", 0, new Point((Game.PlayerPosition.x + 47), (Game.PlayerPosition.y - 48)), new Point(0, 0), 0, "Repaired", "", false);
};
j++;
};
} else {
if (UnitInformation[_local2].Name == "PickupKeycard"){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
CreateUnit("SpeakBubble", 0, new Point((Game.PlayerPosition.x + 47), (Game.PlayerPosition.y - 48)), new Point(0, 0), 0, "Keycard", "", false);
} else {
if (UnitInformation[_local2].Name == "PickupChronoManipulator"){
Game.GotChronoManipulator = true;
CreateUnit("SpeakBubble", 0, new Point((Game.PlayerPosition.x + 47), (Game.PlayerPosition.y - 48)), new Point(0, 0), 0, "ChronoMan.", "", false);
};
};
};
};
};
if (UnitInformation[_local2].Name == "PickupDataDisc"){
Game.DataDisc = (Game.DataDisc + 1);
CreateUnit("SpeakBubble", 0, new Point((Game.PlayerPosition.x + 47), (Game.PlayerPosition.y - 48)), new Point(0, 0), 0, (Game.DataDisc + " out of 12"), "", false);
} else {
CreateParticle("ParticlePickup", new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(0, 0));
};
DestroyUnit(_local1, true);
continue;
};
break;
case "SpeakBubbleAI":
if (Units[_local1].PauseTime == 0){
Units[_local1].PauseTime = 100;
} else {
Units[_local1].Position.x = (Game.PlayerPosition.x + 47);
Units[_local1].Position.y = (Game.PlayerPosition.y - 48);
Units[_local1].UnitMC.Text.text = Units[_local1].Trigger;
Units[_local1].PauseTime = (Units[_local1].PauseTime - 1);
if (Units[_local1].PauseTime == 0){
DestroyUnit(_local1, true);
continue;
};
};
break;
case "DroneAI":
if (Units[_local1].Activated == true){
if (Units[_local1].Return == false){
_local9 = true;
if (Units[_local1].LeftWall == true){
Units[_local1].Return = true;
_local11 = true;
PlayEffect("DroneBounce", 1);
};
} else {
_local10 = true;
if (Units[_local1].RightWall == true){
Units[_local1].Return = false;
_local11 = true;
PlayEffect("DroneBounce", 1);
};
};
if (CheckCondition("PlayerTouching", _local1) == true){
_local22 = -135;
j = 0;
while (j < 5) {
_local22 = (_local22 + 45);
_local20 = new Point((10 * Math.sin(((_local22 * Math.PI) / 180))), (-10 * Math.cos(((_local22 * Math.PI) / 180))));
CreateUnit("PlayerBullet", Units[_local1].Team, new Point((Units[_local1].Position.x + _local20.x), (Units[_local1].Position.y + _local20.y)), _local20, 0, "", "", false);
PlayEffect("GreenBulletCreated", 1);
j++;
};
DestroyUnit(_local1, true);
continue;
};
};
break;
case "CrawlerAI":
if (Units[_local1].Activated == true){
if ((Cycle % 35) == 0){
PlayEffect("CrawlerStep", 1);
};
if (Units[_local1].PauseTime == 0){
_local9 = true;
if (Units[_local1].LeftWall == true){
if (Math.floor((Math.random() * 1.9)) == 0){
Units[_local1].PauseTime = 1;
} else {
Units[_local1].PauseTime = 3;
};
};
} else {
if (Units[_local1].PauseTime == 1){
_local11 = true;
if (Units[_local1].Ceiling == true){
if (Math.floor((Math.random() * 1.9)) == 0){
Units[_local1].PauseTime = 2;
} else {
Units[_local1].PauseTime = 0;
};
};
} else {
if (Units[_local1].PauseTime == 2){
_local10 = true;
if (Units[_local1].RightWall == true){
if (Math.floor((Math.random() * 1.9)) == 0){
Units[_local1].PauseTime = 1;
} else {
Units[_local1].PauseTime = 3;
};
};
} else {
if (Units[_local1].PauseTime == 3){
_local12 = true;
if (Units[_local1].Floor == true){
if (Math.floor((Math.random() * 1.9)) == 0){
Units[_local1].PauseTime = 2;
} else {
Units[_local1].PauseTime = 0;
};
};
} else {
Units[_local1].PauseTime = 0;
};
};
};
};
_local22 = (-270 + ((Math.atan2((Game.PlayerPosition.y - Units[_local1].Position.y), (Game.PlayerPosition.x - Units[_local1].Position.x)) / Math.PI) * 180));
_local21 = LineOfSight(new Point(Units[_local1].Position.x, Units[_local1].Position.y), _local22, Units[_local1].CurrentLevel, true, Units[_local1].Team);
if ((((Game.UnitInSight > -1)) && ((UnitInformation[Units[Game.UnitInSight].Id].Name == "Player")))){
Units[_local1].UnitMC.Laser1.alpha = (0.5 + (Math.random() * 0.5));
Units[_local1].UnitMC.Laser2.alpha = (0.5 + (Math.random() * 0.5));
if (Units[_local1].Mirrored == true){
Units[_local1].UnitMC.Laser1.scaleX = (-((Units[_local1].Position.x - _local21.x)) / 100);
} else {
Units[_local1].UnitMC.Laser1.scaleX = ((Units[_local1].Position.x - _local21.x) / 100);
};
Units[_local1].UnitMC.Laser1.scaleY = (-((Units[_local1].Position.y - _local21.y)) / 100);
Units[_local1].UnitMC.Laser2.scaleX = Units[_local1].UnitMC.Laser1.scaleX;
Units[_local1].UnitMC.Laser2.scaleY = Units[_local1].UnitMC.Laser1.scaleY;
Units[Game.UnitInSight].Health = (Units[Game.UnitInSight].Health - UnitInformation[_local2].Damage);
CreateParticle("ParticleSpark", new Point(_local21.x, (_local21.y - 4)), new Point(((Math.random() * 2) - (Math.random() * 2)), (-(Math.random()) * 5)));
if ((Cycle % 5) == 0){
PlayEffect("LaserHit", 1);
};
} else {
Units[_local1].UnitMC.Laser1.scaleX = 0;
Units[_local1].UnitMC.Laser1.scaleY = 0;
Units[_local1].UnitMC.Laser2.scaleX = 0;
Units[_local1].UnitMC.Laser2.scaleY = 0;
};
};
break;
case "LeverAI":
if (Units[_local1].Activated == true){
if (Units[_local1].PauseTime == 0){
if (CheckCondition("PlayerTouching", _local1) == true){
PlayEffect("LeverActivate", 1);
Units[_local1].PauseTime = 1;
if (Units[_local1].Trigger.length > 0){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
};
};
};
} else {
Units[_local1].PauseTime = 0;
};
break;
case "BreakAwayAI":
if ((((CheckCondition("PlayerTouching", _local1) == true)) && ((CheckCondition("PlayerInVerticalView", _local1) == true)))){
Units[_local1].PauseTime = (Units[_local1].PauseTime - 1);
if (Units[_local1].PauseTime == 0){
DestroyUnit(_local1, true);
PlayEffect("Collapse", 1);
continue;
};
} else {
Units[_local1].PauseTime = 10;
};
break;
case "CountdownAI":
CreateParticle("ParticleFlame", new Point((Units[_local1].Position.x - 13), (Units[_local1].Position.y + 19)), new Point(0, (Math.random() * 2)));
CreateParticle("ParticleFlame", new Point((Units[_local1].Position.x + 13), (Units[_local1].Position.y + 19)), new Point(0, (Math.random() * 2)));
if (Units[_local1].Activated == true){
if (Units[_local1].Position.x < (Game.PlayerPosition.x - 70)){
_local10 = true;
} else {
if (Units[_local1].Position.x > (Game.PlayerPosition.x - 50)){
_local9 = true;
};
};
if (Units[_local1].Position.y < (Game.PlayerPosition.y - 70)){
_local12 = true;
} else {
if (Units[_local1].Position.y > (Game.PlayerPosition.y - 50)){
_local11 = true;
};
};
if (Units[_local1].PauseTime == 0){
Units[_local1].PauseTime = 5000;
PlayEffect("CountdownCreated", 1.5);
} else {
if (Units[_local1].PauseTime > 1){
if (Units[_local1].PauseTime < 300){
Units[_local1].UnitMC.Text.textColor = 13382451;
if ((Math.floor(Units[_local1].PauseTime) % 50) == 0){
PlayEffect("Countdown", 1);
};
};
Units[_local1].PauseTime = (Units[_local1].PauseTime - 0.75);
Units[_local1].UnitMC.Text.text = Math.floor((Units[_local1].PauseTime / 50));
} else {
Units[_local1].UnitMC.Text.text = "D:";
NoiseMC.visible = true;
NoiseMC.alpha = (NoiseMC.alpha + 0.031);
if (Math.floor(((Math.random() * (1 - NoiseMC.alpha)) * 2)) == 0){
CreateParticle("ParticleFireball", new Point(((Units[_local1].Location.x * Game.Resolution.x) + (Math.random() * Game.Resolution.x)), ((Units[_local1].Location.y * Game.Resolution.y) + (Math.random() * Game.Resolution.y))), new Point(((Math.random() * 10) - (Math.random() * 10)), ((Math.random() * 10) - (Math.random() * 10))));
if (Math.floor((Math.random() * 50)) == 0){
PlayEffect("Explosion", 0.6);
};
};
if (Math.floor(((Math.random() * (1 - NoiseMC.alpha)) * 2)) == 0){
CreateParticle("ParticleConcrete", new Point(((Units[_local1].Location.x * Game.Resolution.x) + (Math.random() * Game.Resolution.x)), ((Units[_local1].Location.y * Game.Resolution.y) + (Math.random() * Game.Resolution.y))), new Point(((Math.random() * 10) - (Math.random() * 10)), ((Math.random() * 10) - (Math.random() * 10))));
};
if (NoiseMC.alpha > 1){
LoadGame();
continue;
};
};
};
} else {
DestroyUnit(_local1, true);
continue;
};
break;
case "BouncerAI":
if (Units[_local1].Activated == true){
if (Math.abs(Units[_local1].Velocity.x) == 0){
if (Math.floor((Math.random() * 1.9)) == 0){
_local9 = true;
} else {
_local10 = true;
};
};
if (Math.abs(Units[_local1].Velocity.x) == 0){
if (Math.floor((Math.random() * 1.9)) == 0){
_local11 = true;
} else {
_local12 = true;
};
};
} else {
Units[_local1].Velocity.x = 0;
Units[_local1].Velocity.y = 0;
};
if (CheckCondition("PlayerTouching", _local1) == true){
j = 0;
while (i < 3) {
CreateParticle("ParticleElectricity", new Point(Game.PlayerPosition.x, Game.PlayerPosition.y), new Point(((Math.random() * 8) - (Math.random() * 8)), ((Math.random() * 8) - (Math.random() * 8))));
i++;
};
PlayEffect("ElectricSpark", 1);
};
break;
case "TurretAI":
if (Units[_local1].Activated == true){
_local22 = ((Math.atan2((Game.PlayerPosition.y - Units[_local1].Position.y), (Game.PlayerPosition.x - Units[_local1].Position.x)) / Math.PI) * 180);
LineOfSight(new Point(Units[_local1].Position.x, Units[_local1].Position.y), (_local22 + 90), Units[_local1].CurrentLevel, true, Units[_local1].Team);
_local22 = (GetClosestAngle(_local22, Units[_local1].UnitMC.rotation) * 0.07);
if ((((((Math.abs(_local22) < 3)) && ((Game.UnitInSight > -1)))) && ((UnitInformation[Units[Game.UnitInSight].Id].Name == "Player")))){
_local13 = true;
if (Units[_local1].UnitMC.currentFrame == 14){
_local23 = new Point((6 * Math.sin(((Units[_local1].UnitMC.rotation * Math.PI) / 180))), (-6 * Math.cos(((Units[_local1].UnitMC.rotation * Math.PI) / 180))));
_local20 = new Point((13 * Math.sin((((Units[_local1].UnitMC.rotation + 90) * Math.PI) / 180))), (-13 * Math.cos((((Units[_local1].UnitMC.rotation + 90) * Math.PI) / 180))));
CreateUnit("BlueBullet", Units[_local1].Team, new Point((Units[_local1].Position.x + _local23.x), (Units[_local1].Position.y + _local23.y)), _local20, 0, "", "", false);
PlayEffect("BlueBulletCreated", 1);
} else {
if (Units[_local1].UnitMC.currentFrame == 20){
_local23 = new Point((6 * Math.sin((((Units[_local1].UnitMC.rotation + 180) * Math.PI) / 180))), (-6 * Math.cos((((Units[_local1].UnitMC.rotation + 180) * Math.PI) / 180))));
_local20 = new Point((13 * Math.sin((((Units[_local1].UnitMC.rotation + 90) * Math.PI) / 180))), (-13 * Math.cos((((Units[_local1].UnitMC.rotation + 90) * Math.PI) / 180))));
CreateUnit("BlueBullet", Units[_local1].Team, new Point((Units[_local1].Position.x + _local23.x), (Units[_local1].Position.y + _local23.y)), _local20, 0, "", "", false);
PlayEffect("BlueBulletCreated", 1);
};
};
};
if (_local22 > 4){
_local22 = 4;
} else {
if (_local22 < -4){
_local22 = -4;
};
};
Units[_local1].UnitMC.rotation = (Units[_local1].UnitMC.rotation - _local22);
};
break;
case "TrapDoorAI":
if (Units[_local1].Activated == true){
if ((((Units[_local1].Weight > 0)) && ((Units[_local1].UnitMC.visible == true)))){
PlayEffect("Trapdoor", 1);
};
Units[_local1].Weight = 0;
} else {
if ((((Units[_local1].Weight == 0)) && ((Units[_local1].UnitMC.visible == true)))){
PlayEffect("Trapdoor", 1);
};
Units[_local1].Weight = UnitInformation[_local2].Weight;
};
break;
case "ChuteAI":
if (Units[_local1].Activated == true){
if ((((Units[_local1].Weight > 0)) && ((Units[_local1].UnitMC.visible == true)))){
PlayEffect("ChuteActivate", 1);
};
Units[_local1].Weight = 0;
} else {
if ((((Units[_local1].Weight == 0)) && ((Units[_local1].UnitMC.visible == true)))){
PlayEffect("ChuteActivate", 1);
};
Units[_local1].Weight = UnitInformation[_local2].Weight;
};
break;
case "SpawnerAI":
if (Units[_local1].Activated == true){
if (UnitInformation[_local2].Name == "Spawner"){
CreateParticle("ParticleElectricity", new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 15)), new Point(0, 0));
if (Units[_local1].PauseTime == 0){
Units[_local1].PauseTime = UnitInformation[_local2].PauseTime;
if (Units[_local1].Trigger.length > 0){
PlayEffect("TeleportSpawn", 1);
CreateParticle("ParticlePortal", new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 15)), new Point(0, 0));
CreateUnit(Units[_local1].Trigger, Units[_local1].Team, new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 15)), new Point(0, 0), 0, "", "", true);
};
} else {
if (Units[_local1].PauseTime > 0){
Units[_local1].PauseTime = (Units[_local1].PauseTime - 1);
} else {
Units[_local1].PauseTime = 0;
};
};
} else {
if (UnitInformation[_local2].Name == "ReSpawner"){
CreateParticle("ParticleElectricity", new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 15)), new Point(0, 0));
_local24 = false;
l = 0;
while (l < ActiveUnits.length) {
_local41 = Units[ActiveUnits[l]].Id;
if (UnitInformation[_local41].TypeName == Units[_local1].Trigger){
_local24 = true;
break;
};
l++;
};
if (_local24 == false){
PlayEffect("TeleportSpawn", 1);
CreateParticle("ParticlePortal", new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 15)), new Point(0, 0));
CreateUnit(Units[_local1].Trigger, Units[_local1].Team, new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 15)), new Point(0, 0), 0, "", "", true);
};
} else {
if (UnitInformation[_local2].Name == "SingleSpawner"){
PlayEffect("TeleportSpawn", 1);
CreateUnit(Units[_local1].Trigger, Units[_local1].Team, new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(0, 0), 0, "", "", true);
CreateParticle("ParticlePortal", new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(0, 0));
DestroyUnit(_local1, true);
continue;
};
};
};
};
break;
case "TeleporterAI":
if (Units[_local1].Activated == true){
l = 0;
while (l < ActiveUnits.length) {
_local40 = ActiveUnits[l];
_local41 = Units[ActiveUnits[l]].Id;
if (((((!((_local1 == _local40))) && ((Math.abs((Units[_local1].Position.x - Units[_local40].Position.x)) < (UnitInformation[_local2].Size.x + UnitInformation[Units[_local40].Id].Size.x))))) && ((Math.abs((Units[_local1].Position.y - Units[_local40].Position.y)) < (UnitInformation[_local2].Size.y + UnitInformation[Units[_local40].Id].Size.y))))){
j = 0;
while (j < Units.length) {
if (Units[j].TriggerName == Units[_local1].Trigger){
PlayEffect("TeleportSpawn", 1);
CreateParticle("ParticlePortal", new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(0, 0));
CreateParticle("ParticlePortal", new Point(Units[j].Position.x, Units[j].Position.y), new Point(0, 0));
Units[_local40].Position.x = Units[j].Position.x;
Units[_local40].Position.y = Units[j].Position.y;
break;
};
j++;
};
};
l++;
};
};
break;
case "SwarmerAI":
CreateParticle("ParticleBlueFlame", new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 12)), new Point(0, (Math.random() * 2)));
if (Units[_local1].Activated == true){
if (Units[_local1].PauseTime > 0){
if (Units[_local1].Position.x < Game.PlayerPosition.x){
_local9 = true;
} else {
if (Units[_local1].Position.x > Game.PlayerPosition.x){
_local10 = true;
};
};
if (Units[_local1].Position.y < Game.PlayerPosition.y){
_local11 = true;
} else {
if (Units[_local1].Position.y > Game.PlayerPosition.y){
_local12 = true;
};
};
} else {
if (Units[_local1].Position.x < Game.PlayerPosition.x){
_local10 = true;
} else {
if (Units[_local1].Position.x > Game.PlayerPosition.x){
_local9 = true;
};
};
if (Units[_local1].Position.y < Game.PlayerPosition.y){
_local12 = true;
} else {
if (Units[_local1].Position.y > Game.PlayerPosition.y){
_local11 = true;
};
};
};
if ((((Math.abs((Units[_local1].Position.x - Game.PlayerPosition.x)) < 40)) && ((Math.abs((Units[_local1].Position.y - Game.PlayerPosition.y)) < 30)))){
Units[_local1].PauseTime = 1;
} else {
if ((((Math.abs((Units[_local1].Position.x - Game.PlayerPosition.x)) > 100)) || ((Math.abs((Units[_local1].Position.y - Game.PlayerPosition.y)) > 100)))){
Units[_local1].PauseTime = 0;
};
};
if (Units[_local1].PauseTime == 1){
Units[_local1].UnitMC.RotateMC.visible = true;
Units[_local1].Angle = ((Math.atan2((Game.PlayerPosition.y - Units[_local1].Position.y), (Game.PlayerPosition.x - Units[_local1].Position.x)) / Math.PI) * 180);
Units[_local1].UnitMC.RotateMC.alpha = (0.5 + (Math.random() * 0.5));
j = 0;
while (j < Units.length) {
if (UnitInformation[Units[j].Id].Name == "Player"){
if ((Cycle % 10) == 0){
PlayEffect("SwarmerBeam", 1);
};
_local20 = new Point((5 * Math.sin((((Units[_local1].Angle + 90) * Math.PI) / 180))), (-5 * Math.cos((((Units[_local1].Angle + 90) * Math.PI) / 180))));
Units[j].Position.x = (Units[j].Position.x - _local20.x);
Units[j].Position.y = (Units[j].Position.y - _local20.y);
break;
};
j++;
};
} else {
Units[_local1].UnitMC.RotateMC.visible = false;
};
};
break;
case "MusicAI":
_local19 = -1;
j = 0;
while (j < Music.length) {
if (Music[j].Name == Units[_local1].Trigger){
_local19 = j;
break;
};
j++;
};
Units[_local1].Position = new Point((Math.floor((Game.PlayerPosition.x / Game.Resolution.x)) * Game.Resolution.x), (Math.floor((Game.PlayerPosition.y / Game.Resolution.y)) * Game.Resolution.y));
if (Units[_local1].PauseTime == 0){
if (_local19 == -1){
Units[_local1].UnitMC.alpha = 0;
Game.LastMusic = "Empty";
} else {
if (Game.LastMusic == Music[_local19].Name){
DestroyUnit(_local1, true);
continue;
};
Units[_local1].UnitMC.Name.text = Music[_local19].Name;
Units[_local1].UnitMC.Artist.text = Music[_local19].Artist;
Game.LastMusic = Music[_local19].Name;
};
Units[_local1].UnitMC.scaleY = 0;
Units[_local1].PauseTime = 1;
} else {
if (Units[_local1].PauseTime < 100){
Units[_local1].PauseTime = (Units[_local1].PauseTime + 1);
if (Units[_local1].UnitMC.scaleY < 1){
Units[_local1].UnitMC.scaleY = (Units[_local1].UnitMC.scaleY + 0.03);
soundVol.volume = (Math.abs((1 - Units[_local1].UnitMC.scaleY)) * 0.7);
MusicChannel.soundTransform = soundVol;
if (Units[_local1].UnitMC.scaleY >= 1){
if (_local19 > -1){
MusicChannel = Music[_local19].File.play(0, 99999);
soundVol.volume = 0.7;
MusicChannel.soundTransform = soundVol;
} else {
MusicChannel.stop();
DestroyUnit(_local1, true);
continue;
};
};
};
} else {
if (Units[_local1].PauseTime == 100){
if (Units[_local1].UnitMC.scaleY > 0){
Units[_local1].UnitMC.scaleY = (Units[_local1].UnitMC.scaleY - 0.05);
} else {
DestroyUnit(_local1, true);
continue;
};
};
};
};
break;
case "ProxyAI":
if (Units[_local1].Activated){
Units[_local1].Angle = (Units[_local1].Angle + 20);
if (Units[_local1].Angle > 360){
Units[_local1].Angle = 0;
};
Units[_local1].Weight = UnitInformation[_local2].Weight;
} else {
Units[_local1].Weight = 0;
Units[_local1].Velocity.x = 0;
Units[_local1].Velocity.y = -(Game.GravityStrength);
};
Units[_local1].UnitMC.Laser1.scaleX0;
Units[_local1].UnitMC.Laser1.scaleY = 0;
Units[_local1].UnitMC.Laser2.scaleX = Units[_local1].UnitMC.Laser1.scaleX;
Units[_local1].UnitMC.Laser2.scaleY = Units[_local1].UnitMC.Laser1.scaleY;
l = (a + 1);
while (l < ActiveUnits.length) {
_local40 = ActiveUnits[l];
_local41 = Units[ActiveUnits[l]].Id;
if (UnitInformation[_local41].TypeName == "Proxy"){
_local25 = GetDistance(Units[_local1].Position.x, Units[_local40].Position.x, Units[_local1].Position.y, Units[_local40].Position.y);
Units[_local1].UnitMC.Laser1.scaleX = (-(((((Units[_local1].Position.x + 2) - Units[_local40].Position.x) + Units[_local1].Velocity.x) - Units[_local40].Velocity.x)) / 100);
Units[_local1].UnitMC.Laser1.scaleY = (-(((((Units[_local1].Position.y + 2) - Units[_local40].Position.y) + Units[_local1].Velocity.y) - Units[_local40].Velocity.y)) / 100);
Units[_local1].UnitMC.Laser2.scaleX = Units[_local1].UnitMC.Laser1.scaleX;
Units[_local1].UnitMC.Laser2.scaleY = Units[_local1].UnitMC.Laser1.scaleY;
_local22 = (180 + ((Math.atan2(((Units[_local1].Position.y + Units[_local1].Velocity.y) - (Units[_local40].Position.y + Units[_local40].Velocity.y)), ((Units[_local1].Position.x + Units[_local1].Velocity.x) - (Units[_local40].Position.x + Units[_local40].Velocity.x))) / Math.PI) * 180));
_local21 = LineOfSight(new Point(Units[_local1].Position.x, Units[_local1].Position.y), (_local22 + 90), -1, true, Units[_local1].Team);
if ((((Game.UnitInSight > -1)) && ((GetDistance(Units[_local1].Position.x, Units[Game.UnitInSight].Position.x, Units[_local1].Position.y, Units[Game.UnitInSight].Position.y) < _local25)))){
Units[Game.UnitInSight].Health = (Units[Game.UnitInSight].Health - UnitInformation[_local2].Damage);
CreateParticle("ParticleSpark", new Point(_local21.x, (_local21.y - 4)), new Point(((Math.random() * 2) - (Math.random() * 2)), (-(Math.random()) * 5)));
if ((Cycle % 5) == 0){
PlayEffect("LaserHit", 1);
};
};
break;
};
l++;
};
break;
case "LightAI":
if (UnitInformation[_local2].Name == "Lamp"){
if (Units[_local1].Activated == true){
Units[_local1].UnitMC.Light.visible = true;
} else {
Units[_local1].UnitMC.Light.visible = false;
};
if ((((Units[_local1].CollidedWithUnit == true)) && ((Math.abs(Units[_local1].PauseTime) < 1)))){
Units[_local1].Angle = 0;
Units[_local1].PauseTime = ((Math.random() * 120) - (Math.random() * 120));
};
if (Math.abs(Units[_local1].PauseTime) > 1){
if (Math.floor((Math.random() * 10)) == 0){
Units[_local1].UnitMC.Light.visible = false;
};
};
Units[_local1].Angle = (Units[_local1].Angle + 5);
if (Units[_local1].Angle > 360){
Units[_local1].Angle = 0;
};
Units[_local1].PauseTime = (Units[_local1].PauseTime * 0.98);
Units[_local1].UnitMC.rotation = (Math.abs(Units[_local1].PauseTime) * Math.sin((Units[_local1].Angle * (Math.PI / 180))));
} else {
if (Units[_local1].Activated == true){
Units[_local1].UnitMC.RotateMC.RotatePart.Light.visible = true;
} else {
Units[_local1].UnitMC.RotateMC.RotatePart.Light.visible = false;
};
};
break;
case "CyborgAI":
if (Units[_local1].Activated == true){
if (Units[_local1].PauseTime < 0){
Units[_local1].PauseTime = (Units[_local1].PauseTime + 1);
if ((((CheckCondition("PlayerInHorizontalView", _local1) == true)) && ((((((Game.PlayerPosition.x < Units[_local1].Position.x)) && ((Units[_local1].Mirrored == true)))) || ((((Game.PlayerPosition.x > Units[_local1].Position.x)) && ((Units[_local1].Mirrored == false)))))))){
Units[_local1].PauseTime = 0;
if (Units[_local1].Return == false){
Units[_local1].Return = true;
} else {
Units[_local1].Return = false;
};
};
} else {
if (Units[_local1].PauseTime == 0){
if (Units[_local1].Return == false){
Units[_local1].Return = true;
_local22 = 270;
} else {
Units[_local1].Return = false;
_local22 = 90;
};
_local21 = LineOfSight(new Point(Units[_local1].Position.x, Units[_local1].Position.y), _local22, Units[_local1].CurrentLevel, true, Units[_local1].Team);
Units[_local1].PauseTime = _local21.x;
} else {
if ((((Math.abs((Units[_local1].PauseTime - Units[_local1].Position.x)) < 60)) && ((Units[_local1].StandingOnGround == true)))){
_local11 = true;
if (Units[_local1].UnitMC.visible == true){
PlayEffect("PlayerCyborgJump", 1);
};
};
if (Units[_local1].Return == true){
if (Units[_local1].LeftWall == false){
_local9 = true;
} else {
Units[_local1].PauseTime = 0;
};
} else {
if (Units[_local1].RightWall == false){
_local10 = true;
} else {
Units[_local1].PauseTime = 0;
};
};
if (Units[_local1].WaitTime > 0){
Units[_local1].WaitTime = (Units[_local1].WaitTime - 1);
} else {
if ((((CheckCondition("PlayerInHorizontalView", _local1) == true)) && ((((((Game.PlayerPosition.x < Units[_local1].Position.x)) && ((Units[_local1].Mirrored == true)))) || ((((Game.PlayerPosition.x > Units[_local1].Position.x)) && ((Units[_local1].Mirrored == false)))))))){
_local13 = true;
if (Units[_local1].Mirrored == true){
CreateUnit("PlayerBullet", Units[_local1].Team, new Point((Units[_local1].Position.x - 5), (Units[_local1].Position.y - 2)), new Point(-15, 0), 0, "", "", false);
} else {
CreateUnit("PlayerBullet", Units[_local1].Team, new Point((Units[_local1].Position.x + 5), (Units[_local1].Position.y - 2)), new Point(15, 0), 0, "", "", false);
};
PlayEffect("GreenBulletCreated", 1);
Units[_local1].WaitTime = 10;
} else {
if ((((CheckCondition("PlayerInVerticalView", _local1) == true)) && ((Game.PlayerPosition.y < Units[_local1].Position.y)))){
LineOfSight(new Point(Units[_local1].Position.x, Units[_local1].Position.y), 0, Units[_local1].CurrentLevel, true, Units[_local1].Team);
if ((((Game.UnitInSight > -1)) && ((UnitInformation[Units[Game.UnitInSight].Id].Name == "Player")))){
_local13 = true;
_local12 = true;
_local9 = false;
_local10 = false;
_local11 = false;
Units[_local1].PauseTime = -30;
CreateUnit("PlayerBullet", Units[_local1].Team, new Point(Units[_local1].Position.x, (Units[_local1].Position.y - 5)), new Point(0, -15), 0, "", "", false);
PlayEffect("GreenBulletCreated", 1);
Units[_local1].WaitTime = 10;
};
};
};
};
if (Math.floor((Math.random() * 200)) == 0){
Units[_local1].PauseTime = -50;
};
};
};
};
break;
case "MadComAI":
if (Units[_local1].Activated == true){
_local26 = false;
_local27 = false;
_local28 = false;
_local29 = false;
_local30 = false;
_local31 = new Color();
if (Units[_local1].PauseTime == 0){
Units[_local1].UnitMC.gotoAndStop(1);
Units[_local1].UnitMC.Tentacle1.gotoAndStop(1);
Units[_local1].UnitMC.Tentacle3.gotoAndStop(1);
if (UnitInformation[_local2].Name == "MadCom"){
PlayEffect("MadComActivate", 1);
Units[_local1].UnitMC.Text.text = "zZzZzZ";
Units[_local1].WaitTime = 50;
Units[_local1].PauseTime = 1;
Units[_local1].UnitMC.Tentacle2.gotoAndStop(1);
Units[_local1].UnitMC.Tentacle4.gotoAndStop(1);
} else {
if (UnitInformation[_local2].Name == "MadComReloaded"){
Units[_local1].UnitMC.gotoAndPlay(1);
Units[_local1].UnitMC.Text.text = "";
Units[_local1].WaitTime = 500;
Units[_local1].PauseTime = 10;
};
};
} else {
if (Units[_local1].PauseTime == 1){
if (Units[_local1].WaitTime > 0){
Units[_local1].WaitTime = (Units[_local1].WaitTime - 1);
_local31.brightness = (-(Units[_local1].WaitTime) * 0.01);
LevelMC.transform.colorTransform = _local31;
GameMC.transform.colorTransform = _local31;
} else {
Units[_local1].UnitMC.play();
Units[_local1].WaitTime = 400;
Units[_local1].PauseTime = 2;
CreateUnit("Music", 0, new Point(Game.PlayerPosition.x, Game.PlayerPosition.y), new Point(0, 0), 0, "", "Music", true);
};
} else {
if (Units[_local1].PauseTime == 2){
if (Units[_local1].UnitMC.currentFrame == 20){
Units[_local1].UnitMC.stop();
Messages = new Array(".", "..", "...", "....", "", "", "Who", "are", "you?", "", "", "", "What", "are", "you", "doing", "here?", "", "You", "do", "not", "belong", "here!", "", "which", "", "means", "", "", "ACCESS", "DENIED", "", "INTRUDER", "ALERT", "", "DEFENCE", "MODE", "ACTIVE", "", "- KILL -", "");
Units[_local1].WaitTime = (Units[_local1].WaitTime - 0.5);
Units[_local1].UnitMC.Text.text = Messages[Math.floor(((400 - Units[_local1].WaitTime) / 10))];
if (Units[_local1].WaitTime == 150){
Units[_local1].UnitMC.Text.textColor = 13382451;
} else {
if (Units[_local1].WaitTime == 0){
Units[_local1].PauseTime = 3;
CreateUnit("Music", 0, new Point(Game.PlayerPosition.x, Game.PlayerPosition.y), new Point(0, 0), 0, "Boss theme 1", "Music", true);
SaveGame();
Game.LastMusic = "";
};
};
};
} else {
if (Units[_local1].PauseTime == 3){
Units[_local1].UnitMC.play();
Units[_local1].UnitMC.Text.text = "-_-";
Units[_local1].UnitMC.Text.textColor = 13382451;
CreateUnit("Cyborg", Units[_local1].Team, new Point((Units[_local1].Position.x + 40), Units[_local1].Position.y), new Point(20, 0), 0, "", "", true);
Units[(Units.length - 1)].Return = true;
CreateUnit("Cyborg", Units[_local1].Team, new Point((Units[_local1].Position.x - 40), Units[_local1].Position.y), new Point(-20, 0), 0, "", "", true);
Units[(Units.length - 1)].Return = false;
Units[_local1].PauseTime = 4;
Units[_local1].WaitTime = 0;
} else {
if (Units[_local1].PauseTime == 4){
_local24 = false;
l = 0;
while (l < ActiveUnits.length) {
_local41 = Units[ActiveUnits[l]].Id;
if (UnitInformation[_local41].TypeName == "Cyborg"){
_local24 = true;
break;
};
l++;
};
if (_local24 == false){
if (Units[_local1].WaitTime == 0){
Units[_local1].WaitTime = 70;
Units[_local1].UnitMC.gotoAndStop(20);
Units[_local1].UnitMC.Text.text = "Well then";
};
Units[_local1].WaitTime = (Units[_local1].WaitTime - 1);
if (Units[_local1].WaitTime == 0){
Units[_local1].PauseTime = 5;
Units[_local1].Tentacle1Health = 200;
Units[_local1].Tentacle3Health = 200;
Units[_local1].Tentacle2Health = 200;
Units[_local1].Tentacle4Health = 200;
Units[_local1].Turret1Health = 400;
Units[_local1].Turret2Health = 400;
Units[_local1].UnitMC.Text.text = "";
Units[_local1].UnitMC.play();
};
};
} else {
if (Units[_local1].PauseTime == 5){
CreateUnit("PickupRepair", Units[_local1].Team, new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 100)), new Point(0, 0), 0, "", "", false);
Units[_local1].UnitMC.Tentacle1.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle1.EndPiece.gotoAndStop(2);
Units[_local1].UnitMC.Tentacle2.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle2.EndPiece.gotoAndStop(2);
Units[_local1].UnitMC.Tentacle3.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle3.EndPiece.gotoAndStop(2);
Units[_local1].UnitMC.Tentacle4.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle4.EndPiece.gotoAndStop(2);
PlayEffect("MadComNewTentacle", 1);
Units[_local1].PauseTime = 6;
Units[_local1].WaitTime = 150;
Units[_local1].Return = false;
} else {
if (Units[_local1].PauseTime == 6){
if (Units[_local1].WaitTime > 0){
Units[_local1].WaitTime = (Units[_local1].WaitTime - 1);
} else {
if ((((Units[_local1].Return == false)) && ((Units[_local1].UnitMC.Tentacle1.currentFrame == 30)))){
Units[_local1].Return = true;
Units[_local1].UnitMC.Tentacle1.gotoAndPlay(91);
Units[_local1].UnitMC.Tentacle3.gotoAndPlay(91);
Units[_local1].WaitTime = 150;
} else {
if (Units[_local1].UnitMC.Tentacle4.currentFrame == 30){
Units[_local1].Return = false;
Units[_local1].UnitMC.Tentacle4.gotoAndPlay(91);
Units[_local1].UnitMC.Tentacle2.gotoAndPlay(91);
Units[_local1].WaitTime = 150;
};
};
};
if (Units[_local1].UnitMC.Tentacle1.EndPiece.currentFrame == 2){
_local26 = true;
};
if (Units[_local1].UnitMC.Tentacle2.EndPiece.currentFrame == 2){
_local27 = true;
};
if (Units[_local1].UnitMC.Tentacle3.EndPiece.currentFrame == 2){
_local28 = true;
};
if (Units[_local1].UnitMC.Tentacle4.EndPiece.currentFrame == 2){
_local29 = true;
};
if ((((((((_local26 == false)) && ((_local27 == false)))) && ((_local28 == false)))) && ((_local29 == false)))){
Units[_local1].WaitTime = 15;
Units[_local1].PauseTime = 7;
};
} else {
if (Units[_local1].PauseTime == 7){
Units[_local1].Tentacle1Health = 200;
Units[_local1].Tentacle4Health = 200;
Units[_local1].UnitMC.Holder.visible = false;
Units[_local1].UnitMC.Tentacle1.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle1.EndPiece.gotoAndStop(2);
Units[_local1].UnitMC.Tentacle2.gotoAndPlay(332);
Units[_local1].UnitMC.Tentacle2.EndPiece.gotoAndStop(140);
Units[_local1].UnitMC.Tentacle3.gotoAndPlay(332);
Units[_local1].UnitMC.Tentacle3.EndPiece.gotoAndStop(140);
Units[_local1].UnitMC.Tentacle4.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle4.EndPiece.gotoAndStop(2);
Units[_local1].UnitMC.Text.text = "!RAWR!";
PlayEffect("MadComNewTentacle", 1);
PlayEffect("ElectricSpark", 1);
PlayEffect("Explosion", 1);
CreateParticle("ParticleElectricity", new Point(Units[_local1].Position.x, (Units[_local1].Position.y - 90)), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
CreateParticle("ParticleFireball", new Point(Units[_local1].Position.x, (Units[_local1].Position.y - 90)), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
CreateParticle("ParticleFireball", new Point(Units[_local1].Position.x, (Units[_local1].Position.y - 110)), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
Units[_local1].UnitMC.gotoAndPlay(111);
if (Units[_local1].WaitTime > 0){
Units[_local1].Position.y = (Units[_local1].Position.y + 1.5);
Units[_local1].WaitTime = (Units[_local1].WaitTime - 1);
} else {
Units[_local1].WaitTime = 70;
Units[_local1].PauseTime = 8;
};
} else {
if (Units[_local1].PauseTime == 8){
Units[_local1].UnitMC.Text.text = "";
if ((((Units[_local1].UnitMC.Tentacle2.currentFrame == 370)) || ((Units[_local1].UnitMC.Tentacle3.currentFrame == 370)))){
PlayEffect("MadComStep", 1);
};
if (Units[_local1].WaitTime > 0){
Units[_local1].WaitTime = (Units[_local1].WaitTime - 1);
} else {
if ((((Units[_local1].Return == false)) && ((Units[_local1].UnitMC.Tentacle1.currentFrame == 30)))){
Units[_local1].Return = true;
Units[_local1].UnitMC.Tentacle1.gotoAndPlay(91);
Units[_local1].WaitTime = 140;
PlayEffect("MadComNewTentacle", 1);
} else {
if (Units[_local1].UnitMC.Tentacle4.currentFrame == 30){
Units[_local1].Return = false;
Units[_local1].UnitMC.Tentacle4.gotoAndPlay(91);
Units[_local1].WaitTime = 140;
PlayEffect("MadComNewTentacle", 1);
};
};
};
if (Units[_local1].Return == false){
Units[_local1].Position.x = (Units[_local1].Position.x + 2);
} else {
Units[_local1].Position.x = (Units[_local1].Position.x - 2);
};
if (Units[_local1].UnitMC.Tentacle1.EndPiece.currentFrame == 2){
_local26 = true;
} else {
Units[_local1].UnitMC.Tentacle1.alpha = 0;
};
if (Units[_local1].UnitMC.Tentacle4.EndPiece.currentFrame == 2){
_local29 = true;
} else {
Units[_local1].UnitMC.Tentacle4.alpha = 0;
};
_local30 = true;
if ((((((((_local26 == false)) && ((_local29 == false)))) && ((Units[_local1].UnitMC.Turret1.visible == false)))) && ((Units[_local1].UnitMC.Turret2.visible == false)))){
Units[_local1].WaitTime = 400;
Units[_local1].PauseTime = 9;
CreateUnit("Music", 0, new Point(Game.PlayerPosition.x, Game.PlayerPosition.y), new Point(0, 0), 0, "", "Music", true);
Units[_local1].UnitMC.gotoAndPlay(161);
Units[_local1].UnitMC.Tentacle1.alpha = 0;
Units[_local1].UnitMC.Tentacle2.alpha = 0;
Units[_local1].UnitMC.Tentacle3.alpha = 0;
Units[_local1].UnitMC.Tentacle4.alpha = 0;
Units[_local1].UnitMC.Text.textColor = 0xCC00;
};
} else {
if (Units[_local1].PauseTime == 9){
if (Units[_local1].UnitMC.currentFrame == 190){
Messages = new Array("", "", "", "", "I", "I", "I", "", "", "", "LOST?", "LO5T?", "L05T!", "LOTZ!", "L04Z!", "K03S1", "34!#1", "31B%1", "10110", "01010", "0100", "011", "10", "0", "", "", "", "", "", "oH BtW", "", "S3lf", "de5truct", "in1tiA", "t33", "3E3dh", ".", "", "", "", "", "", "");
Units[_local1].WaitTime = (Units[_local1].WaitTime - 0.5);
Units[_local1].UnitMC.Text.text = Messages[Math.floor(((400 - Units[_local1].WaitTime) / 10))];
if (Units[_local1].WaitTime < 50){
_local31.brightness = (-((50 - Units[_local1].WaitTime)) * 0.01);
LevelMC.transform.colorTransform = _local31;
GameMC.transform.colorTransform = _local31;
};
if (Math.floor((Math.random() * 20)) == 0){
PlayEffect("ElectricSpark", 1);
CreateParticle("ParticleElectricity", new Point((((Units[_local1].Position.x + 20) + (Math.random() * 100)) - (Math.random() * 100)), (((Units[_local1].Position.y + 80) + (Math.random() * 50)) - (Math.random() * 50))), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
};
if (Units[_local1].WaitTime == 0){
Units[_local1].Activated = false;
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
CreateUnit("Music", 0, new Point(Game.PlayerPosition.x, Game.PlayerPosition.y), new Point(0, 0), 0, "Adamant Erosion", "Music", true);
SaveGame();
Game.LastMusic = "";
} else {
if (Units[_local1].WaitTime == 150){
Units[_local1].UnitMC.Text.textColor = 13382451;
};
};
};
} else {
if (Units[_local1].PauseTime == 10){
Game.LevelLocked = true;
Units[_local1].WaitTime = (Units[_local1].WaitTime - 0.6);
if (Units[_local1].WaitTime < 450){
Messages = new Array("th1s", "end5", "h3re", "", "", "", "d1d", "y0u", "re4lly", "th1nk", "th3re", "i5", "a", "h4ppy", "3nding", "t0", "thi5", "gam3?", "", "", "", "<liemode>", "", "", "y3s", "", "", "ye5", "of", "c0urse", "ther3", "1s", "", "", "", "c0me", "clo5er", "4nd", "i", "will", "5how", "1t", "t0", "y0u", "", "", "", "", "", "");
Units[_local1].UnitMC.Text.text = Messages[Math.floor(((450 - Units[_local1].WaitTime) / 10))];
if (Units[_local1].WaitTime <= 0){
Units[_local1].PauseTime = 11;
Units[_local1].UnitMC.play();
Units[_local1].UnitMC.Tentacle1.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle1.EndPiece.gotoAndStop(2);
PlayEffect("MadComNewTentacle", 1);
Units[_local1].Tentacle1Health = 100;
Units[_local1].Tentacle3Health = 100;
Units[_local1].BossHealth = 400;
} else {
if (Math.floor(Units[_local1].WaitTime) == 1){
Units[_local1].WaitTime = 0.6;
CreateUnit("PickupRepair", Units[_local1].Team, new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 100)), new Point(0, 0), 0, "", "", false);
CreateUnit("Music", 0, new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(0, 0), 0, "Boss theme 2", "Music", true);
SaveGame();
Game.LastMusic = "";
};
};
};
} else {
if (Units[_local1].PauseTime == 11){
if (Units[_local1].UnitMC.Tentacle1.EndPiece.currentFrame == 2){
_local26 = true;
} else {
Units[_local1].UnitMC.Tentacle1.alpha = 0;
};
if (Units[_local1].UnitMC.Tentacle3.EndPiece.currentFrame == 2){
_local28 = true;
} else {
Units[_local1].UnitMC.Tentacle3.alpha = 0;
};
if ((((Units[_local1].Tentacle1Health <= 0)) && ((Units[_local1].UnitMC.Tentacle3.currentFrame == 1)))){
Units[_local1].UnitMC.Tentacle3.alpha = 1;
Units[_local1].UnitMC.Tentacle1.gotoAndStop(1);
Units[_local1].UnitMC.Tentacle3.gotoAndPlay(2);
PlayEffect("MadComNewTentacle", 1);
Units[_local1].UnitMC.Tentacle3.EndPiece.gotoAndStop(2);
} else {
if (Units[_local1].Tentacle3Health <= 0){
Units[_local1].PauseTime = 12;
Units[_local1].WaitTime = -130;
Units[_local1].Tentacle1Health = 150;
Units[_local1].Tentacle3Health = 150;
Units[_local1].UnitMC.Text.text = "DIE";
Units[_local1].UnitMC.Tentacle1.alpha = 1;
Units[_local1].UnitMC.Tentacle3.alpha = 1;
Units[_local1].UnitMC.Tentacle1.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle3.gotoAndPlay(2);
Units[_local1].UnitMC.Tentacle1.EndPiece.gotoAndStop(2);
Units[_local1].UnitMC.Tentacle3.EndPiece.gotoAndStop(2);
PlayEffect("MadComNewTentacle", 1);
};
};
Units[_local1].UnitMC.Tentacle1.rotation = (Units[_local1].UnitMC.Tentacle1.rotation + 1.2);
if (Units[_local1].UnitMC.Tentacle1.rotation > 360){
Units[_local1].UnitMC.Tentacle1.rotation = 0;
};
Units[_local1].UnitMC.Tentacle3.rotation = (Units[_local1].UnitMC.Tentacle1.rotation + 180);
_local24 = false;
l = 0;
while (l < ActiveUnits.length) {
_local41 = Units[ActiveUnits[l]].Id;
if (UnitInformation[_local41].TypeName == "Swarmer"){
_local24 = true;
break;
};
l++;
};
if ((((_local24 == false)) && (((Math.floor(Math.abs(Units[_local1].UnitMC.Tentacle1.rotation)) % 250) == 0)))){
PlayEffect("TeleportSpawn", 1);
CreateParticle("ParticlePortal", new Point(Units[_local1].Position.x, (Units[_local1].Position.y + 15)), new Point(0, 0));
CreateUnit("Swarmer", Units[_local1].Team, new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(0, 0), 0, "", "", true);
};
} else {
if (Units[_local1].PauseTime == 12){
Units[_local1].WaitTime = (Units[_local1].WaitTime + 1);
if (Units[_local1].WaitTime > 360){
Units[_local1].WaitTime = 0;
};
_local23 = new Point((Math.floor((Units[_local1].Position.x / Game.Resolution.x)) * Game.Resolution.x), (Math.floor((Units[_local1].Position.y / Game.Resolution.y)) * Game.Resolution.y));
_local25 = (130 + Units[_local1].WaitTime);
if (Units[_local1].WaitTime > 0){
_local25 = 130;
};
Units[_local1].Position.x = ((_local23.x + (Game.Resolution.x * 0.5)) + (_local25 * Math.sin(((Units[_local1].WaitTime * Math.PI) / 180))));
Units[_local1].Position.y = ((_local23.y + (Game.Resolution.y * 0.5)) + (-(_local25) * Math.cos(((Units[_local1].WaitTime * Math.PI) / 180))));
if ((((Math.abs(Units[_local1].WaitTime) > 15)) && (((Units[_local1].WaitTime % 15) == 0)))){
_local20 = new Point((13 * Math.sin((((((Units[_local1].WaitTime + 180) + (Math.random() * 50)) - (Math.random() * 50)) * Math.PI) / 180))), (-13 * Math.cos((((((Units[_local1].WaitTime + 180) + (Math.random() * 50)) - (Math.random() * 50)) * Math.PI) / 180))));
CreateUnit("BlueBullet", Units[_local1].Team, new Point((Units[_local1].Position.x + _local20.x), (Units[_local1].Position.y + _local20.y)), _local20, 0, "", "", false);
PlayEffect("BlueBulletCreated", 1);
};
if (Units[_local1].Tentacle1Health <= 0){
Units[_local1].UnitMC.Tentacle1.EndPiece.gotoAndStop(1);
};
if (Units[_local1].Tentacle3Health <= 0){
Units[_local1].UnitMC.Tentacle3.EndPiece.gotoAndStop(1);
};
if (Units[_local1].UnitMC.Tentacle1.EndPiece.currentFrame == 2){
_local26 = true;
} else {
Units[_local1].UnitMC.Tentacle1.alpha = 0;
};
if (Units[_local1].UnitMC.Tentacle3.EndPiece.currentFrame == 2){
_local28 = true;
} else {
Units[_local1].UnitMC.Tentacle3.alpha = 0;
};
Units[_local1].UnitMC.Tentacle1.rotation = (Units[_local1].UnitMC.Tentacle1.rotation + 1.3);
if (Units[_local1].UnitMC.Tentacle1.rotation > 360){
Units[_local1].UnitMC.Tentacle1.rotation = 0;
};
Units[_local1].UnitMC.Tentacle3.rotation = (Units[_local1].UnitMC.Tentacle1.rotation + 180);
l = 0;
while (l < ActiveUnits.length) {
_local40 = ActiveUnits[l];
_local41 = Units[ActiveUnits[l]].Id;
if (((!((Units[_local40].Team == Units[_local1].Team))) && ((GetDistance(Units[_local1].Position.x, Units[_local40].Position.x, Units[_local1].Position.y, Units[_local40].Position.y) < 70)))){
Units[_local1].BossHealth = (Units[_local1].BossHealth - UnitInformation[_local41].Damage);
if (Units[_local1].BossHealth <= 0){
Units[_local1].PauseTime = 13;
Units[_local1].WaitTime = 450;
CreateUnit("Music", 0, new Point(Units[_local1].Position.x, Units[_local1].Position.y), new Point(0, 0), 0, "", "Music", true);
Units[_local1].UnitMC.gotoAndPlay(81);
Units[_local1].UnitMC.Tentacle1.alpha = 0;
Units[_local1].UnitMC.Tentacle3.alpha = 0;
Units[_local1].UnitMC.Tentacle1.EndPiece.gotoAndStop(1);
Units[_local1].UnitMC.Tentacle3.EndPiece.gotoAndStop(1);
break;
};
Units[_local40].CollidedWithUnit = true;
};
l++;
};
} else {
if (Units[_local1].PauseTime == 13){
Messages = new Array("noooo", "nooo0", "n0100", "n0101", "mn010", "m1040", "l0104", "340gf", "#3&7g", "45bh&", "6g4(%1", "#gd&h1", "6(f=fa", "%453As", "yadfou", "ympou", "ymou", "you", "you", "you", "you", "mu", "mu", "mu", "mu", "re", "re", "re", "re", "er", "er", "er", "er", "er", "e", "e", "3", "3", "3", "2", "2", "2", "2", "1", "1", "1", "1", "0", "0", "0", "", "", "", "");
Units[_local1].WaitTime = (Units[_local1].WaitTime - 4);
Game.SlowMotion = true;
if (Math.floor((Math.random() * 60)) == 0){
PlayEffect("MadComReloadedLose", 1);
};
if (Units[_local1].WaitTime < 200){
NoiseMC.visible = true;
NoiseMC.alpha = ((200 - Units[_local1].WaitTime) * 0.0049);
} else {
if (Units[_local1].WaitTime <= 0){
NoiseMC.alpha = 0.99;
};
};
if (Math.floor((Math.random() * 15)) == 0){
if (Math.floor((Math.random() * 15)) == 0){
PlayEffect("Explosion", 1);
};
CreateParticle("ParticleFireball", new Point(((Units[_local1].Position.x + (Math.random() * 100)) - (Math.random() * 100)), ((Units[_local1].Position.y + (Math.random() * 100)) - (Math.random() * 100))), new Point(((Math.random() * 10) - (Math.random() * 10)), ((Math.random() * 10) - (Math.random() * 10))));
};
if (Math.floor(((450 - Units[_local1].WaitTime) / 10)) < Messages.length){
Units[_local1].UnitMC.Text.text = Messages[Math.floor(((450 - Units[_local1].WaitTime) / 10))];
};
if ((((Units[_local1].WaitTime <= -600)) && ((Units[_local1].UnitMC.currentFrame == 250)))){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
Location = new Point(Units[_local1].Location.x, Units[_local1].Location.y);
while (Units.length > 0) {
DestroyUnit(0, false);
};
Game.PlayerAlive = true;
Game.SlowMotion = false;
MusicChannel.stop();
i = 0;
while (i < 24) {
EffectChannels[i].stop();
i++;
};
PlayEffect("Lose", 1);
CreateUnit("Credits", 0, new Point((1 + (100 * Game.Resolution.x)), (Game.Resolution.y - 1)), new Point(0, 0), 0, "", "", false);
UpdateCamera(41);
continue;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (Units[_local1].PauseTime > 9){
if (Math.floor((Math.random() * 100)) == 0){
PlayEffect("MadComReloadedRandomSound", 1);
};
_local32 = true;
_local33 = 0;
_local34 = false;
l = 0;
while (l < ActiveUnits.length) {
_local40 = ActiveUnits[l];
if (Units[_local40].TriggerName == "MadComLift"){
if (_local32 == true){
_local32 = false;
if ((((Units[_local1].PauseTime > 10)) && ((Units[_local40].PauseTime < 100)))){
Units[_local40].PauseTime = (Units[_local40].PauseTime + 1);
};
_local35 = Units[_local40].PauseTime;
Units[_local40].WaitTime = (Units[_local40].WaitTime + 1);
if (Units[_local40].WaitTime > 360){
Units[_local40].WaitTime = (Units[_local40].WaitTime - 360);
};
_local33 = Units[_local40].WaitTime;
};
_local33 = (_local33 + 45);
if (_local34 == true){
_local34 = false;
_local22 = _local33;
_local25 = (1.7 * _local35);
} else {
_local34 = true;
_local22 = (-1 * _local33);
_local25 = (1.1 * _local35);
};
_local23 = new Point((Math.floor((Units[_local40].Position.x / Game.Resolution.x)) * Game.Resolution.x), (Math.floor((Units[_local40].Position.y / Game.Resolution.y)) * Game.Resolution.y));
Units[_local40].Position.x = ((_local23.x + (Game.Resolution.x * 0.5)) + (_local25 * Math.sin(((_local22 * Math.PI) / 180))));
Units[_local40].Position.y = ((_local23.y + (Game.Resolution.y * 0.5)) + (-(_local25) * Math.cos(((_local22 * Math.PI) / 180))));
};
l++;
};
Units[_local1].UnitMC.Text1.text = "";
Units[_local1].UnitMC.Text2.text = "";
_local36 = Math.floor((Math.random() * 100));
if (_local36 == 0){
Units[_local1].UnitMC.Text1.text = "DIE";
} else {
if (_local36 == 0){
Units[_local1].UnitMC.Text2.text = "KILL";
} else {
if (_local36 == 1){
Units[_local1].UnitMC.Text1.text = "DESTROY";
} else {
if (_local36 == 2){
Units[_local1].UnitMC.Text2.text = "MURDER";
} else {
if (_local36 == 3){
Units[_local1].UnitMC.Text1.text = "666";
} else {
if (_local36 == 4){
Units[_local1].UnitMC.Text2.text = "OMEGA";
} else {
if (_local36 == 5){
Units[_local1].UnitMC.Text1.text = "ELIMINATE";
} else {
if (_local36 == 6){
Units[_local1].UnitMC.Text2.text = "CRUSH";
} else {
if (_local36 == 7){
Units[_local1].UnitMC.Text1.text = "ERROR";
} else {
if (_local36 == 8){
Units[_local1].UnitMC.Text2.text = "I AM";
} else {
if (_local36 == 9){
Units[_local1].UnitMC.Text1.text = "BURN";
} else {
if (_local36 == 10){
Units[_local1].UnitMC.Text2.text = "CHAOS";
} else {
if (_local36 == 11){
Units[_local1].UnitMC.Text1.text = "ALPHA";
};
};
};
};
};
};
};
};
};
};
};
};
};
};
k = 1;
while (k < 5) {
if ((((((((((((_local26 == true)) && ((k == 1)))) || ((((_local27 == true)) && ((k == 2)))))) || ((((_local28 == true)) && ((k == 3)))))) || ((((_local29 == true)) && ((k == 4)))))) && ((Units[_local1].UnitMC[("Tentacle" + k)].currentFrame > 20)))){
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].alpha = 1;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser2")].alpha = 1;
_local23 = new Point(Units[_local1].UnitMC[("Tentacle" + k)].EndPiece.x, Units[_local1].UnitMC[("Tentacle" + k)].EndPiece.y);
_local23 = Units[_local1].UnitMC[("Tentacle" + k)].localToGlobal(_local23);
_local37 = Units[_local1].UnitMC.globalToLocal(_local23);
if (!(((((((_local23.x < 0)) || ((_local23.y < 0)))) || ((_local23.x > Game.Resolution.x)))) || ((_local23.y > Game.Resolution.y)))){
_local23 = new Point((_local23.x + (Math.floor((Units[_local1].Position.x / Game.Resolution.x)) * Game.Resolution.x)), (_local23.y + (Math.floor((Units[_local1].Position.y / Game.Resolution.y)) * Game.Resolution.y)));
_local38 = Units[_local1].UnitMC[("Tentacle" + k)].EndPiece.rotation;
_local39 = Units[_local1].UnitMC[("Tentacle" + k)].rotation;
if ((((k == 2)) || ((k == 4)))){
if (_local38 >= 180){
_local38 = (360 - _local38);
} else {
_local38 = (180 + (180 - _local38));
};
_local39 = (_local39 + 180);
if (_local39 >= 180){
_local39 = (360 - _local39);
} else {
_local39 = (180 + (180 - _local39));
};
_local22 = -((_local38 + _local39));
} else {
_local22 = -((_local38 - _local39));
};
_local21 = LineOfSight(new Point(_local23.x, _local23.y), _local22, Units[_local1].CurrentLevel, true, Units[_local1].Team);
CreateParticle("ParticleSpark", new Point(_local21.x, _local21.y), new Point(((Math.random() * 2) - (Math.random() * 2)), (-(Math.random()) * 5)));
if ((((Game.UnitInSight > -1)) && ((UnitInformation[Units[Game.UnitInSight].Id].Name == "Player")))){
Units[Game.UnitInSight].Health = (Units[Game.UnitInSight].Health - 10);
if ((Cycle % 5) == 0){
PlayEffect("LaserHit", 1);
};
};
_local21 = new Point((_local21.x - (Math.floor((_local23.x / Game.Resolution.x)) * Game.Resolution.x)), (_local21.y - (Math.floor((_local23.y / Game.Resolution.y)) * Game.Resolution.y)));
_local21 = Units[_local1].UnitMC.globalToLocal(_local21);
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].x = _local37.x;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].y = _local37.y;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser2")].x = _local37.x;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser2")].y = _local37.y;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleX = (-((_local37.x - _local21.x)) / 100);
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleY = (-((_local37.y - _local21.y)) / 100);
if ((((k == 2)) || ((k == 4)))){
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleX = (Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleX * -1);
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleY = (Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleY * -1);
};
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser2")].scaleX = Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleX;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser2")].scaleY = Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].scaleY;
l = 0;
while (l < ActiveUnits.length) {
_local40 = ActiveUnits[l];
_local41 = Units[ActiveUnits[l]].Id;
if (((!((Units[_local40].Team == Units[_local1].Team))) && ((GetDistance(_local23.x, Units[_local40].Position.x, _local23.y, Units[_local40].Position.y) < 20)))){
Units[_local1][(("Tentacle" + k) + "Health")] = (Units[_local1][(("Tentacle" + k) + "Health")] - UnitInformation[_local41].Damage);
if (Units[_local1][(("Tentacle" + k) + "Health")] <= 0){
PlayEffect("ElectricSpark", 1);
PlayEffect("Explosion", 1);
CreateParticle("ParticleElectricity", new Point(_local23.x, _local23.y), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
CreateParticle("ParticleFireball", new Point(_local23.x, _local23.y), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
CreateParticle("ParticleFireball", new Point(_local23.x, _local23.y), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
Units[_local1].UnitMC[("Tentacle" + k)].EndPiece.gotoAndStop(1);
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].alpha = 0;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser2")].alpha = 0;
};
Units[_local40].CollidedWithUnit = true;
};
l++;
};
} else {
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser1")].alpha = 0;
Units[_local1].UnitMC[(("Tentacle" + k) + "Laser2")].alpha = 0;
};
};
k++;
};
if (_local30 == true){
k = 1;
while (k < 3) {
if (Units[_local1].UnitMC[("Turret" + k)].visible == true){
_local23 = new Point(Units[_local1].UnitMC[("Turret" + k)].x, Units[_local1].UnitMC[("Turret" + k)].y);
_local23 = Units[_local1].UnitMC.localToGlobal(_local23);
_local23 = new Point((_local23.x + (Math.floor((Units[_local1].Position.x / Game.Resolution.x)) * Game.Resolution.x)), (_local23.y + (Math.floor((Units[_local1].Position.y / Game.Resolution.y)) * Game.Resolution.y)));
if (((((Units[_local1].WaitTime % 30) == 0)) && ((Units[_local1].WaitTime > 29)))){
_local22 = (Units[_local1].UnitMC[("Turret" + k)].rotation + 180);
_local20 = new Point((13 * Math.sin(((_local22 * Math.PI) / 180))), (-13 * Math.cos(((_local22 * Math.PI) / 180))));
CreateUnit("BlueBullet", Units[_local1].Team, new Point((_local23.x + _local20.x), (_local23.y + _local20.y)), _local20, 0, "", "", false);
PlayEffect("BlueBulletCreated", 1);
};
l = 0;
while (l < ActiveUnits.length) {
_local40 = ActiveUnits[l];
_local41 = Units[ActiveUnits[l]].Id;
if (((!((Units[_local40].Team == Units[_local1].Team))) && ((GetDistance(_local23.x, Units[_local40].Position.x, _local23.y, Units[_local40].Position.y) < 20)))){
Units[_local1][(("Turret" + k) + "Health")] = (Units[_local1][(("Turret" + k) + "Health")] - UnitInformation[_local41].Damage);
if (Units[_local1][(("Turret" + k) + "Health")] <= 0){
PlayEffect("ElectricSpark", 1);
PlayEffect("Explosion", 1);
CreateParticle("ParticleElectricity", new Point(_local23.x, _local23.y), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
CreateParticle("ParticleFireball", new Point(_local23.x, _local23.y), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
CreateParticle("ParticleFireball", new Point(_local23.x, _local23.y), new Point(((Math.random() * 4) - (Math.random() * 4)), ((Math.random() * 4) - (Math.random() * 4))));
Units[_local1].UnitMC[("Turret" + k)].visible = false;
};
Units[_local40].CollidedWithUnit = true;
};
l++;
};
};
k++;
};
};
};
break;
case "DataCheckerAI":
if (Units[_local1].Activated == true){
if (Units[_local1].PauseTime == 0){
Units[_local1].PauseTime = 140;
l = 1;
while (l < 13) {
Units[_local1].UnitMC.Holder[("Disc" + l)].alpha = 0.3;
Units[_local1].UnitMC.Holder[("Disc" + l)].scaleX = 0.5;
Units[_local1].UnitMC.Holder[("Disc" + l)].scaleY = 0.5;
l++;
};
} else {
Units[_local1].PauseTime = (Units[_local1].PauseTime - 1);
if (Game.DataDisc >= (13 - Math.floor((1 + (Units[_local1].PauseTime / 12))))){
Units[_local1].UnitMC.Holder[("Disc" + Math.floor((1 + (Units[_local1].PauseTime / 12))))].alpha = (((Units[_local1].UnitMC.Holder[("Disc" + Math.floor((1 + (Units[_local1].PauseTime / 12))))].alpha * 10) + 1) / 11);
Units[_local1].UnitMC.Holder[("Disc" + Math.floor((1 + (Units[_local1].PauseTime / 12))))].scaleX = (((Units[_local1].UnitMC.Holder[("Disc" + Math.floor((1 + (Units[_local1].PauseTime / 12))))].scaleX * 10) + 1) / 11);
Units[_local1].UnitMC.Holder[("Disc" + Math.floor((1 + (Units[_local1].PauseTime / 12))))].scaleY = (((Units[_local1].UnitMC.Holder[("Disc" + Math.floor((1 + (Units[_local1].PauseTime / 12))))].scaleY * 10) + 1) / 11);
} else {
Units[_local1].PauseTime = 0;
ShowMessage("Insufficient discs acquired\nSecurity lockdown remains in place", new Point((Game.Resolution.x * 0.5), (Game.Resolution.y * 0.5)), new Point((Game.Resolution.x * 0.5), (Game.Resolution.y * 0.5)));
Units[_local1].Activated = false;
};
if ((((Units[_local1].PauseTime == 0)) && ((Game.DataDisc == 12)))){
Units[_local1].Activated = false;
CreateUnit("Music", 0, new Point(Game.PlayerPosition.x, Game.PlayerPosition.y), new Point(0, 0), 0, "Retro Winter", "Music", true);
ShowMessage("Data transfer completed\nLockdown released - Please use escape hatch", new Point((Game.Resolution.x * 0.5), (Game.Resolution.y * 0.5)), new Point((Game.Resolution.x * 0.5), (Game.Resolution.y * 0.5)));
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
PlayEffect("DataCheckerValid", 1);
DestroyUnit(_local1, true);
continue;
};
};
};
break;
case "SignAI":
if (Units[_local1].Activated == true){
if (Units[_local1].PauseTime == 0){
PlayEffect("MessageSound", 0.7);
ShowMessage(Units[_local1].Trigger.replace("|", "\n"), new Point((Units[_local1].PositionOnScreen.x + 10), (Units[_local1].PositionOnScreen.y - 5)), new Point((Units[_local1].PositionOnScreen.x + 30), (Units[_local1].PositionOnScreen.y + 5)));
};
Units[_local1].PauseTime = 1;
if (CheckCondition("PlayerNotTouching", _local1)){
Units[_local1].Activated = false;
Units[_local1].PauseTime = 0;
};
};
break;
case "CreditsAI":
UnitInformation[_local2].Size.x = (Units[_local1].UnitMC.width * 2);
UnitInformation[_local2].Size.y = (Units[_local1].UnitMC.height * 2);
if (Units[_local1].PauseTime == 0){
StatusBarMC.visible = false;
NoiseMC.alpha = 0;
Units[_local1].WaitTime = ((200 + Units[_local1].UnitMC.height) + 113);
} else {
if (Units[_local1].PauseTime > 200){
if (Units[_local1].PauseTime < Units[_local1].WaitTime){
Units[_local1].Position.y = (Units[_local1].Position.y - 1);
} else {
Units[_local1].UnitMC.alpha = (Units[_local1].UnitMC.alpha - 0.1);
NoiseMC.visible = true;
NoiseMC.alpha = (((NoiseMC.alpha * 5) + 1.5) / 6);
if (NoiseMC.alpha >= 1){
UpdateCamera(42);
DestroyUnit(_local1, false);
CreateUnit("PlayerEscapeLift", 0, new Point((250 + (100 * Game.Resolution.x)), ((Game.Resolution.y * 2) - 100)), new Point(0, 0), 0, "", "", false);
break;
};
};
};
};
Units[_local1].PauseTime = (Units[_local1].PauseTime + 1);
if (Units[_local1].PauseTime == 100){
MusicChannel = Music[8].File.play(0, 99999);
soundVol.volume = 1;
MusicChannel.soundTransform = soundVol;
};
break;
};
if (_local9 == true){
Units[_local1].Mirrored = true;
if (Units[_local1].StandingOnGround == true){
Units[_local1].Velocity.x = (Units[_local1].Velocity.x - UnitInformation[_local2].Acceleration.x);
} else {
Units[_local1].Velocity.x = (Units[_local1].Velocity.x - UnitInformation[_local2].AirAcceleration.x);
};
} else {
if (_local10 == true){
Units[_local1].Mirrored = false;
if (Units[_local1].StandingOnGround == true){
Units[_local1].Velocity.x = (Units[_local1].Velocity.x + UnitInformation[_local2].Acceleration.x);
} else {
Units[_local1].Velocity.x = (Units[_local1].Velocity.x + UnitInformation[_local2].AirAcceleration.x);
};
} else {
if (Units[_local1].StandingOnGround == true){
Units[_local1].Velocity.x = (Units[_local1].Velocity.x * UnitInformation[_local2].DeAcceleration);
} else {
Units[_local1].Velocity.x = (Units[_local1].Velocity.x * UnitInformation[_local2].AirDeAcceleration);
};
};
};
if (_local11 == true){
if (Units[_local1].StandingOnGround == true){
_local5 = true;
Units[_local1].Velocity.y = (Units[_local1].Velocity.y - UnitInformation[_local2].Acceleration.y);
} else {
Units[_local1].Velocity.y = (Units[_local1].Velocity.y - UnitInformation[_local2].AirAcceleration.y);
};
} else {
if (_local12 == true){
if (Units[_local1].StandingOnGround == false){
Units[_local1].Velocity.y = (Units[_local1].Velocity.y + UnitInformation[_local2].AirAcceleration.y);
};
} else {
if ((((Units[_local1].StandingOnGround == false)) && ((UnitInformation[_local2].EffectedByGravity == false)))){
Units[_local1].Velocity.y = (Units[_local1].Velocity.y * UnitInformation[_local2].AirDeAcceleration);
};
};
};
if (UnitInformation[_local2].EffectedByGravity == true){
Units[_local1].Velocity.y = (Units[_local1].Velocity.y + Game.GravityStrength);
};
if (Units[_local1].Velocity.x < -(UnitInformation[_local2].MaxVelocity.x)){
Units[_local1].Velocity.x = -(UnitInformation[_local2].MaxVelocity.x);
} else {
if (Units[_local1].Velocity.x > UnitInformation[_local2].MaxVelocity.x){
Units[_local1].Velocity.x = UnitInformation[_local2].MaxVelocity.x;
};
};
if (Units[_local1].Velocity.y < -(UnitInformation[_local2].MaxVelocity.y)){
Units[_local1].Velocity.y = -(UnitInformation[_local2].MaxVelocity.y);
} else {
if (Units[_local1].Velocity.y > UnitInformation[_local2].MaxVelocity.y){
Units[_local1].Velocity.y = UnitInformation[_local2].MaxVelocity.y;
};
};
Units[_local1].Position.x = (Units[_local1].Position.x + Units[_local1].Velocity.x);
Units[_local1].Position.y = (Units[_local1].Position.y + Units[_local1].Velocity.y);
_local6 = Units[_local1].Activated;
if ((((Units[_local1].Activated == true)) && ((UnitInformation[_local2].DeActivateWhen.length > 0)))){
if (CheckCondition(UnitInformation[_local2].DeActivateWhen, _local1)){
Units[_local1].Activated = false;
};
};
if ((((Units[_local1].Activated == false)) && ((UnitInformation[_local2].ActivateWhen.length > 0)))){
if (CheckCondition(UnitInformation[_local2].ActivateWhen, _local1)){
Units[_local1].Activated = true;
};
};
if ((((_local6 == true)) && ((Units[_local1].Activated == false)))){
_local7 = true;
} else {
if ((((_local6 == false)) && ((Units[_local1].Activated == true)))){
_local6 = true;
};
};
_local14 = new Point(0, 0);
_local15 = new Point(0, 0);
_local16 = new Point(0, 0);
_local17 = new Point(0, 0);
Units[_local1].CollidedWithUnit = false;
Units[_local1].RightWall = false;
Units[_local1].LeftWall = false;
Units[_local1].Ceiling = false;
Units[_local1].Floor = false;
if (!(((Units[_local1].Location.x == Math.floor((Units[_local1].Position.x / Game.Resolution.x)))) && ((Units[_local1].Location.y == Math.floor((Units[_local1].Position.y / Game.Resolution.y)))))){
Units[_local1].CurrentLevel = -1;
Units[_local1].Location = new Point(Math.floor((Units[_local1].Position.x / Game.Resolution.x)), Math.floor((Units[_local1].Position.y / Game.Resolution.y)));
u = 0;
while (u < Level.length) {
if ((((Level[u].Location.x == Units[_local1].Location.x)) && ((Level[u].Location.y == Units[_local1].Location.y)))){
Units[_local1].CurrentLevel = u;
break;
};
u++;
};
if ((((((((UnitInformation[_local2].Name == "Player")) && ((Units[_local1].CurrentLevel > -1)))) && (!((Units[_local1].CurrentLevel == Game.CurrentLevel))))) && ((Game.LevelLocked == false)))){
UpdateCamera(Units[_local1].CurrentLevel);
};
};
Units[_local1].PositionOnScreen = new Point((Units[_local1].Position.x - (Math.floor((Units[_local1].Position.x / Game.Resolution.x)) * Game.Resolution.x)), (Units[_local1].Position.y - (Math.floor((Units[_local1].Position.y / Game.Resolution.y)) * Game.Resolution.y)));
if ((((Units[_local1].CurrentLevel > -1)) && ((Units[_local1].Weight > 0)))){
while (Pixel.hitTest(new Point(((Units[_local1].PositionOnScreen.x - UnitInformation[_local2].Size.x) + _local14.x), (Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local14.x = (_local14.x + 1);
if (_local14.x > UnitInformation[_local2].Size.x){
break;
};
Units[_local1].CollidedWithLevel = true;
};
while (Pixel.hitTest(new Point(((Units[_local1].PositionOnScreen.x - UnitInformation[_local2].Size.x) + _local16.x), (Units[_local1].PositionOnScreen.y + UnitInformation[_local2].Size.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local16.x = (_local16.x + 1);
if (_local16.x > UnitInformation[_local2].Size.x){
break;
};
Units[_local1].CollidedWithLevel = true;
};
while (Pixel.hitTest(new Point(((Units[_local1].PositionOnScreen.x + UnitInformation[_local2].Size.x) - _local15.x), (Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local15.x = (_local15.x + 1);
if (_local15.x > UnitInformation[_local2].Size.x){
break;
};
Units[_local1].CollidedWithLevel = true;
};
while (Pixel.hitTest(new Point(((Units[_local1].PositionOnScreen.x + UnitInformation[_local2].Size.x) - _local17.x), (Units[_local1].PositionOnScreen.y + UnitInformation[_local2].Size.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local17.x = (_local17.x + 1);
if (_local17.x > UnitInformation[_local2].Size.x){
break;
};
Units[_local1].CollidedWithLevel = true;
};
while (Pixel.hitTest(new Point((Units[_local1].PositionOnScreen.x - UnitInformation[_local2].Size.x), ((Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y) + _local14.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local14.y = (_local14.y + 1);
if (_local14.y > (UnitInformation[_local2].Size.y * 2)){
break;
};
Units[_local1].CollidedWithLevel = true;
};
while (Pixel.hitTest(new Point((Units[_local1].PositionOnScreen.x - UnitInformation[_local2].Size.x), ((Units[_local1].PositionOnScreen.y + UnitInformation[_local2].Size.y) - _local16.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local16.y = (_local16.y + 1);
if (_local16.y > (UnitInformation[_local2].Size.y * 2)){
break;
};
Units[_local1].CollidedWithLevel = true;
};
while (Pixel.hitTest(new Point((Units[_local1].PositionOnScreen.x + UnitInformation[_local2].Size.x), ((Units[_local1].PositionOnScreen.y - UnitInformation[_local2].Size.y) + _local15.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local15.y = (_local15.y + 1);
if (_local15.y > (UnitInformation[_local2].Size.y * 2)){
break;
};
Units[_local1].CollidedWithLevel = true;
};
while (Pixel.hitTest(new Point((Units[_local1].PositionOnScreen.x + UnitInformation[_local2].Size.x), ((Units[_local1].PositionOnScreen.y + UnitInformation[_local2].Size.y) - _local17.y)), 0xFF, Level[Units[_local1].CurrentLevel].CollisionBitmapData, new Point(0, 0), 0xFF)) {
_local17.y = (_local17.y + 1);
if (_local17.y > (UnitInformation[_local2].Size.y * 2)){
break;
};
Units[_local1].CollidedWithLevel = true;
};
if (_local14.y > UnitInformation[_local2].Size.y){
if (_local14.y > 31){
Units[_local1].LeftWall = true;
};
_local14.y = UnitInformation[_local2].Size.y;
};
if (_local16.y > UnitInformation[_local2].Size.y){
if (_local16.y > 31){
Units[_local1].LeftWall = true;
};
_local16.y = UnitInformation[_local2].Size.y;
};
if (_local15.y > UnitInformation[_local2].Size.y){
if (_local15.y > 31){
Units[_local1].RightWall = true;
};
_local15.y = UnitInformation[_local2].Size.y;
};
if (_local17.y > UnitInformation[_local2].Size.y){
if (_local17.y > 31){
Units[_local1].RightWall = true;
};
_local17.y = UnitInformation[_local2].Size.y;
};
};
_local18 = 0;
l = 0;
for (;l < ActiveUnits.length;l++) {
_local40 = ActiveUnits[l];
_local41 = Units[ActiveUnits[l]].Id;
if (((((!((_local1 == _local40))) && ((Math.abs((Units[_local1].Position.x - Units[_local40].Position.x)) < (UnitInformation[_local2].Size.x + UnitInformation[Units[_local40].Id].Size.x))))) && ((Math.abs((Units[_local1].Position.y - Units[_local40].Position.y)) < (UnitInformation[_local2].Size.y + UnitInformation[Units[_local40].Id].Size.y))))){
if (Units[_local1].Team != Units[_local40].Team){
Units[_local1].Health = (Units[_local1].Health - UnitInformation[_local41].Damage);
Units[_local40].Health = (Units[_local40].Health - UnitInformation[_local2].Damage);
Units[_local1].CollidedWithUnit = true;
Units[_local40].CollidedWithUnit = true;
} else {
if (!(((UnitInformation[_local2].CollideWithSameTeam == true)) || ((UnitInformation[_local41].CollideWithSameTeam == true)))){
continue;
} else {
Units[_local1].CollidedWithUnit = true;
Units[_local40].CollidedWithUnit = true;
};
};
_local42 = GetCollisionSide(_local1, _local40);
if ((((((Units[_local1].Weight > 0)) && ((Units[_local40].Weight > 0)))) && ((Units[_local1].Weight <= Units[_local40].Weight)))){
if (_local42.x == 1){
Units[_local1].UnitPushBack.x = -(_local42.y);
if (Units[_local1].Weight == Units[_local40].Weight){
Units[_local1].UnitPushBack.x = Math.ceil((Units[_local1].UnitPushBack.x * 0.5));
Units[_local40].UnitPushBack.x = -(Units[_local1].UnitPushBack.x);
};
} else {
if (_local42.x == 3){
Units[_local1].UnitPushBack.x = _local42.y;
if (Units[_local1].Weight == Units[_local40].Weight){
Units[_local1].UnitPushBack.x = Math.floor((Units[_local1].UnitPushBack.x * 0.5));
Units[_local40].UnitPushBack.x = -(Units[_local1].UnitPushBack.x);
};
} else {
if (_local42.x == 2){
Units[_local1].UnitPushBack.y = -(_local42.y);
if (Units[_local1].Weight == Units[_local40].Weight){
Units[_local1].UnitPushBack.y = Math.ceil((Units[_local1].UnitPushBack.y * 0.5));
Units[_local40].UnitPushBack.y = -(Units[_local1].UnitPushBack.y);
};
} else {
Units[_local1].UnitPushBack.y = _local42.y;
if ((((Units[_local1].Weight == Units[_local40].Weight)) && ((Units[_local1].StandingOnGround == false)))){
Units[_local1].UnitPushBack.y = Math.floor((Units[_local1].UnitPushBack.y * 0.5));
Units[_local40].UnitPushBack.y = -(Units[_local1].UnitPushBack.y);
};
if (UnitInformation[_local2].EffectedByGravity == true){
if ((((UnitInformation[_local2].Name == "Player")) && ((Game.SlowMotion == true)))){
Units[_local1].Position.x = (Units[_local1].Position.x + (Units[_local40].DeltaPosition.x * 0.2));
Units[_local1].Position.y = (Units[_local1].Position.y + (Units[_local40].DeltaPosition.y * 0.2));
} else {
Units[_local1].Position.x = (Units[_local1].Position.x + Units[_local40].DeltaPosition.x);
Units[_local1].Position.y = (Units[_local1].Position.y + Units[_local40].DeltaPosition.y);
};
};
};
};
};
};
};
};
if ((_local14.x + _local14.y) > 0){
_local18 = (_local18 + 1);
if ((_local16.x + _local16.y) == 0){
Units[_local1].MoveBack.y = _local14.y;
};
if ((_local15.x + _local15.y) == 0){
Units[_local1].MoveBack.x = _local14.x;
};
};
if ((_local15.x + _local15.y) > 0){
_local18 = (_local18 + 1);
if ((_local17.x + _local17.y) == 0){
Units[_local1].MoveBack.y = _local15.y;
};
if ((_local14.x + _local14.y) == 0){
Units[_local1].MoveBack.x = -(_local15.x);
};
};
if ((_local16.x + _local16.y) > 0){
_local18 = (_local18 + 1);
if ((_local14.x + _local14.y) == 0){
Units[_local1].MoveBack.y = -(_local16.y);
};
if ((_local17.x + _local17.y) == 0){
Units[_local1].MoveBack.x = _local16.x;
};
};
if ((_local17.x + _local17.y) > 0){
_local18 = (_local18 + 1);
if ((_local15.x + _local15.y) == 0){
Units[_local1].MoveBack.y = -(_local17.y);
};
if ((_local16.x + _local16.y) == 0){
Units[_local1].MoveBack.x = -(_local17.x);
};
};
if (_local18 == 1){
_local43 = 0;
if (Units[_local1].MoveBack.y > 0){
_local43 = 10;
} else {
if (Units[_local1].MoveBack.y >= -1){
_local43 = -1;
};
};
if (((Math.abs(Units[_local1].MoveBack.y) + Math.abs(Units[_local1].Velocity.x)) + _local43) > (Math.abs(Units[_local1].MoveBack.x) + Math.abs(Units[_local1].Velocity.y))){
Units[_local1].MoveBack.y = 0;
} else {
if (((Math.abs(Units[_local1].MoveBack.y) + Math.abs(Units[_local1].Velocity.x)) + _local43) < (Math.abs(Units[_local1].MoveBack.x) + Math.abs(Units[_local1].Velocity.y))){
Units[_local1].MoveBack.x = 0;
};
};
} else {
if (_local18 == 4){
_local8 = true;
};
};
if ((((Units[_local1].LeftWall == true)) || ((Units[_local1].RightWall == true)))){
if ((((Math.abs(Units[_local1].MoveBack.y) >= UnitInformation[_local2].Size.y)) || ((Math.abs(Units[_local1].MoveBack.y) > 31)))){
Units[_local1].MoveBack.y = 0;
};
if ((((Units[_local1].MoveBack.x <= 0)) && ((Units[_local1].LeftWall == true)))){
Units[_local1].MoveBack.x = 1;
};
if ((((Units[_local1].MoveBack.x >= 0)) && ((Units[_local1].RightWall == true)))){
Units[_local1].MoveBack.x = -1;
};
};
if (Math.abs(Units[_local1].UnitPushBack.x) > Math.abs(Units[_local1].MoveBack.x)){
Units[_local1].MoveBack.x = Units[_local1].UnitPushBack.x;
};
if (Math.abs(Units[_local1].UnitPushBack.y) > Math.abs(Units[_local1].MoveBack.y)){
Units[_local1].MoveBack.y = Units[_local1].UnitPushBack.y;
};
if (Units[_local1].MoveBack.x > 0){
Units[_local1].LeftWall = true;
} else {
if (Units[_local1].MoveBack.x < 0){
Units[_local1].RightWall = true;
};
};
if (Units[_local1].MoveBack.y > 0){
Units[_local1].Ceiling = true;
} else {
if (Units[_local1].MoveBack.y < 0){
Units[_local1].Floor = true;
};
};
if (Math.abs(Units[_local1].MoveBack.x) > 0){
Units[_local1].Position.x = Math.ceil((Units[_local1].Position.x + Units[_local1].MoveBack.x));
if ((((((Units[_local1].MoveBack.x > 0)) && ((Units[_local1].Velocity.x < 0)))) || ((((Units[_local1].MoveBack.x < 0)) && ((Units[_local1].Velocity.x > 0)))))){
Units[_local1].Velocity.x = (Units[_local1].Velocity.x * -(UnitInformation[_local2].DeflectionForce.x));
};
};
if (Math.abs(Units[_local1].MoveBack.y) > 0){
Units[_local1].Position.y = Math.ceil((Units[_local1].Position.y + Units[_local1].MoveBack.y));
if ((((((Units[_local1].MoveBack.y > 0)) && ((Units[_local1].Velocity.y < 0)))) || ((((Units[_local1].MoveBack.y < 0)) && ((Units[_local1].Velocity.y > 0)))))){
Units[_local1].Velocity.y = (Units[_local1].Velocity.y * -(UnitInformation[_local2].DeflectionForce.y));
};
};
if ((((Units[_local1].MoveBack.y < 0)) && (!((Units[_local1].Velocity.y < -0.5))))){
if (Units[_local1].StandingOnGround == false){
_local4 = true;
};
Units[_local1].StandingOnGround = true;
} else {
Units[_local1].StandingOnGround = false;
};
Units[_local1].MoveBack = new Point(0, 0);
Units[_local1].UnitPushBack = new Point(0, 0);
if (UnitInformation[_local2].Health > -1){
if (Units[_local1].Health <= 0){
_local8 = true;
} else {
if (Units[_local1].Health > UnitInformation[_local2].Health){
Units[_local1].Health = UnitInformation[_local2].Health;
};
};
};
switch (UnitInformation[_local2].TypeName){
case "Player":
if (Units[_local1].StandingOnGround == false){
if (Units[_local1].UnitMC.currentFrame < 31){
Units[_local1].UnitMC.gotoAndStop(39);
};
if (_local13 == true){
if (UpPressed == true){
Units[_local1].UnitMC.gotoAndPlay(51);
} else {
if (DownPressed == true){
Units[_local1].UnitMC.gotoAndPlay(61);
} else {
Units[_local1].UnitMC.gotoAndPlay(31);
};
};
};
} else {
if ((((_local9 == true)) || ((_local10 == true)))){
if (Units[_local1].UnitMC.currentFrame > 21){
Units[_local1].UnitMC.gotoAndPlay(1);
};
} else {
if ((((Units[_local1].UnitMC.currentFrame < 22)) || ((((Units[_local1].UnitMC.currentFrame > 30)) && ((Units[_local1].UnitMC.currentFrame < 40)))))){
Units[_local1].UnitMC.gotoAndPlay(1);
};
if (_local13 == true){
if (UpPressed == true){
Units[_local1].UnitMC.gotoAndPlay(40);
} else {
Units[_local1].UnitMC.gotoAndPlay(22);
};
};
};
};
if ((((Units[_local1].UnitMC.currentFrame == 10)) || ((Units[_local1].UnitMC.currentFrame == 20)))){
PlayEffect("PlayerCyborgStep", 1);
};
if (Game.GotGun == true){
Units[_local1].UnitMC.Hand.gotoAndStop(2);
} else {
Units[_local1].UnitMC.Hand.gotoAndStop(1);
};
Game.PlayerPosition = new Point(Units[_local1].Position.x, Units[_local1].Position.y);
Game.PlayerSize = new Point(UnitInformation[_local2].Size.x, UnitInformation[_local2].Size.y);
break;
case "Lift":
if (Units[_local1].Activated == false){
Units[_local1].UnitMC.gotoAndStop(1);
} else {
Units[_local1].UnitMC.gotoAndStop(2);
};
break;
case "EscapeLift":
if (Units[_local1].Activated == false){
if (Units[_local1].Return == true){
if (Units[_local1].UnitMC.currentFrame < 4){
Units[_local1].UnitMC.gotoAndPlay(4);
};
} else {
Units[_local1].UnitMC.gotoAndStop(1);
};
} else {
if (Units[_local1].Position.x < 4630){
Units[_local1].UnitMC.gotoAndStop(3);
Units[_local1].UnitMC.rotation = ((Units[_local1].UnitMC.rotation + (Math.random() * 5)) - (Math.random() * 5));
} else {
Units[_local1].UnitMC.gotoAndStop(2);
};
};
break;
case "Spinner":
if (Units[_local1].Activated == false){
if ((((Units[_local1].UnitMC.currentFrame > 1)) && ((Units[_local1].UnitMC.currentFrame < 12)))){
Units[_local1].UnitMC.gotoAndPlay(12);
};
} else {
if (Units[_local1].UnitMC.currentFrame == 1){
Units[_local1].UnitMC.gotoAndPlay(2);
};
};
break;
case "Tank":
if ((((_local9 == true)) || ((_local10 == true)))){
if (Units[_local1].UnitMC.currentFrame == 1){
Units[_local1].UnitMC.gotoAndPlay(2);
};
if ((((Units[_local1].UnitMC.currentFrame == 34)) || ((((Units[_local1].UnitMC.currentFrame == 69)) && ((Units[_local1].UnitMC.visible == true)))))){
PlayEffect("TankStep", 1);
};
} else {
Units[_local1].UnitMC.gotoAndStop(1);
};
break;
case "Signtry":
if (Units[_local1].Activated == true){
if (Units[_local1].UnitMC.currentFrame == 1){
Units[_local1].UnitMC.gotoAndPlay(2);
};
} else {
Units[_local1].UnitMC.gotoAndStop(1);
};
Units[_local1].Mirrored = false;
break;
case "Pickup":
if ((((Units[_local1].UnitMC.currentFrame == 1)) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(2);
};
break;
case "Fan":
if ((((Units[_local1].UnitMC.currentFrame == 1)) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(2);
};
break;
case "PlayerBullet":
if ((((Units[_local1].UnitMC.currentFrame == 1)) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(2);
};
break;
case "BlueBullet":
if ((((Units[_local1].UnitMC.currentFrame == 1)) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(2);
};
break;
case "Drone":
if (Units[_local1].StandingOnGround == true){
if (Math.abs(Units[_local1].Velocity.x) > 1){
if ((((((Units[_local1].UnitMC.currentFrame < 14)) || ((Units[_local1].UnitMC.currentFrame == 20)))) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(14);
};
} else {
if (Units[_local1].UnitMC.currentFrame > 13){
Units[_local1].UnitMC.gotoAndPlay(1);
};
};
} else {
Units[_local1].UnitMC.gotoAndPlay(20);
};
break;
case "Crawler":
if ((((Units[_local1].PauseTime == 0)) || ((Units[_local1].PauseTime == 2)))){
if (Units[_local1].UnitMC.currentFrame < 33){
Units[_local1].UnitMC.gotoAndPlay(33);
};
} else {
if (Units[_local1].UnitMC.currentFrame > 32){
Units[_local1].UnitMC.gotoAndPlay(1);
};
};
if (Units[_local1].Activated == true){
Units[_local1].UnitMC.play();
} else {
Units[_local1].UnitMC.stop();
};
break;
case "Lever":
if (Units[_local1].PauseTime == 0){
if (Units[_local1].Activated == true){
Units[_local1].UnitMC.gotoAndStop(2);
} else {
Units[_local1].UnitMC.gotoAndStop(1);
};
} else {
if (Units[_local1].UnitMC.currentFrame < 3){
Units[_local1].UnitMC.gotoAndPlay(3);
};
if ((((Units[_local1].Activated == false)) && ((Units[_local1].UnitMC.currentFrame == 10)))){
Units[_local1].UnitMC.gotoAndStop(11);
};
};
break;
case "Countdown":
Units[_local1].Mirrored = false;
break;
case "Bouncer":
if (Units[_local1].Activated == true){
if ((((Units[_local1].UnitMC.currentFrame == 1)) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(2);
};
} else {
Units[_local1].UnitMC.stop();
};
case "Turret":
if (_local13 == true){
Units[_local1].UnitMC.play();
} else {
if ((((Units[_local1].UnitMC.currentFrame < 27)) && ((Units[_local1].UnitMC.currentFrame > 1)))){
Units[_local1].UnitMC.gotoAndPlay(27);
};
};
break;
case "Generator":
if ((((Units[_local1].UnitMC.currentFrame == 1)) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(2);
};
if (Math.floor((Math.random() * 50)) == 0){
PlayEffect("GeneratorRandomSound", 1);
};
if (_local8 == true){
TriggerUnits(Units[_local1].Trigger, UnitInformation[_local2].Name);
};
break;
case "TrapDoor":
if (Units[_local1].Activated == false){
if (Units[_local1].UnitMC.currentFrame == 15){
Units[_local1].UnitMC.gotoAndPlay(16);
};
} else {
if (Units[_local1].UnitMC.currentFrame == 1){
Units[_local1].UnitMC.gotoAndPlay(2);
};
};
break;
case "Chute":
if (Units[_local1].Activated == false){
Units[_local1].UnitMC.gotoAndStop(1);
} else {
if (Units[_local1].UnitMC.currentFrame == 1){
Units[_local1].UnitMC.gotoAndPlay(2);
};
};
break;
case "Spawner":
if (UnitInformation[_local2].Name == "SingleSpawner"){
Units[_local1].UnitMC.alpha = 0;
} else {
if (Units[_local1].Activated == false){
Units[_local1].UnitMC.gotoAndStop(1);
} else {
Units[_local1].UnitMC.gotoAndStop(2);
};
};
break;
case "Swarmer":
if (Units[_local1].Activated == false){
Units[_local1].UnitMC.gotoAndStop(1);
} else {
Units[_local1].UnitMC.gotoAndStop(2);
};
Units[_local1].Mirrored = false;
break;
case "Lamp":
if (UnitInformation[_local2].Name == "RedSpotlight"){
Units[_local1].UnitMC.gotoAndStop(2);
};
break;
case "Cyborg":
if (Units[_local1].StandingOnGround == false){
if (Units[_local1].UnitMC.currentFrame < 49){
Units[_local1].UnitMC.gotoAndStop(49);
};
if (_local13 == true){
Units[_local1].UnitMC.gotoAndPlay(40);
};
} else {
if ((((_local9 == true)) || ((_local10 == true)))){
if (Units[_local1].UnitMC.currentFrame > 19){
Units[_local1].UnitMC.gotoAndPlay(1);
};
} else {
if ((((Units[_local1].UnitMC.currentFrame < 20)) || ((((Units[_local1].UnitMC.currentFrame > 39)) && (!((((Units[_local1].UnitMC.currentFrame < 40)) && ((Units[_local1].UnitMC.currentFrame > 29))))))))){
Units[_local1].UnitMC.gotoAndPlay(1);
};
if ((((_local13 == true)) && ((_local12 == true)))){
Units[_local1].UnitMC.gotoAndPlay(30);
} else {
if (_local13 == true){
Units[_local1].UnitMC.gotoAndPlay(20);
};
};
};
if ((((Units[_local1].UnitMC.currentFrame == 9)) || ((((Units[_local1].UnitMC.currentFrame == 18)) && ((Units[_local1].UnitMC.visible == true)))))){
PlayEffect("PlayerCyborgStep", 1);
};
};
break;
case "MadCom":
if ((((Units[_local1].PauseTime == 9)) && ((Units[_local1].Activated == false)))){
Units[_local1].UnitMC.gotoAndStop(190);
Units[_local1].UnitMC.Text.text = "";
};
break;
case "Panel":
if ((((Units[_local1].UnitMC.currentFrame == 1)) || ((Units[_local1].UnitMC.playing == false)))){
Units[_local1].UnitMC.gotoAndPlay(2);
};
break;
};
if (Units[_local1].Mirrored == true){
Units[_local1].UnitMC.scaleX = -1;
} else {
Units[_local1].UnitMC.scaleX = 1;
};
};
_local3 = new Point((Units[_local1].Position.x - (Level[Game.CurrentLevel].Location.x * Game.Resolution.x)), (Units[_local1].Position.y - (Level[Game.CurrentLevel].Location.y * Game.Resolution.y)));
if ((((((((_local3.x >= -(UnitInformation[_local2].Size.x))) && ((_local3.x <= (Game.Resolution.x + UnitInformation[_local2].Size.x))))) && ((_local3.y >= -(UnitInformation[_local2].Size.y))))) && ((_local3.y <= (Game.Resolution.y + UnitInformation[_local2].Size.y))))){
Units[_local1].UnitMC.visible = true;
Units[_local1].UnitMC.x = _local3.x;
Units[_local1].UnitMC.y = _local3.y;
if (Units[_local1].UnitMC.RotateMC != null){
Units[_local1].UnitMC.RotateMC.RotatePart.rotation = Units[_local1].Angle;
};
} else {
Units[_local1].UnitMC.visible = false;
if (UnitInformation[_local2].DestroyWhenOffscreen == true){
_local8 = true;
};
};
if (_local8 == true){
DestroyUnit(_local1, true);
a = (a - 1);
} else {
Units[_local1].DeltaPosition = new Point((Units[_local1].Position.x - Units[_local1].OldPosition.x), (Units[_local1].Position.y - Units[_local1].OldPosition.y));
Units[_local1].OldPosition = new Point(Units[_local1].Position.x, Units[_local1].Position.y);
if (CheckCondition(UnitInformation[_local2].StopUpdatingWhen, _local1)){
ActiveUnits.splice(a, 1);
Units[_local1].Updating = false;
Units[_local1].UnitMC.visible = false;
a--;
};
Units[_local1].Collided = false;
};
};
};
}
public function ShowMessage(_arg1:String, _arg2:Point, _arg3:Point){
MessageMC.visible = true;
MessageMC.Text.text = _arg1;
MessageMC.alpha = 0.4;
MessageMC.x = _arg2.x;
MessageMC.y = _arg2.y;
MessageMC.scaleX = ((_arg2.x - _arg3.x) / 500);
MessageMC.scaleY = ((_arg2.y - _arg3.y) / 50);
}
public function UpdateInterface(){
StatusBarMC.gotoAndStop(((1 + 100) - Math.floor(Game.PlayerHealth)));
if ((((Game.SlowMotion == false)) && ((Game.ChronoCharge > 50)))){
StatusBarMC.Time.gotoAndStop(2);
} else {
StatusBarMC.Time.gotoAndStop(1);
};
if (Game.GotChronoManipulator == true){
StatusBarMC.Time.alpha = 1;
} else {
StatusBarMC.Time.alpha = 0;
};
StatusBarMC.Time.scaleX = (Game.ChronoCharge * 0.007);
StatusBarMC.Time.scaleY = StatusBarMC.Time.scaleX;
if (MessageMC.visible == true){
MessageMC.x = (((MessageMC.x * 20) + ((Game.Resolution.x - 500) * 0.5)) / 21);
MessageMC.y = ((((MessageMC.y * 20) + Game.Resolution.y) - 70) / 21);
MessageMC.scaleX = (((MessageMC.scaleX * 20) + 1) / 21);
MessageMC.scaleY = (((MessageMC.scaleY * 20) + 1) / 21);
if (MessageMC.scaleX > 0.999){
MessageMC.alpha = (MessageMC.alpha - 0.05);
if (MessageMC.alpha <= 0){
MessageMC.visible = false;
};
} else {
if (MessageMC.alpha < 0.7){
MessageMC.alpha = (MessageMC.alpha + 0.02);
};
};
};
if (LevelNameMC.visible == true){
LevelNameMC.alpha = (LevelNameMC.alpha - 0.05);
if (LevelNameMC.alpha <= 0){
LevelNameMC.visible = false;
};
};
}
public function GetClosestAngle(_arg1:int, _arg2:int):int{
if (Math.abs((_arg1 - _arg2)) <= 180){
return ((_arg2 - _arg1));
};
if (Math.abs((_arg1 - _arg2)) > 180){
if ((_arg1 - _arg2) < 0){
return (((-360 + _arg1) - _arg2));
};
return (((360 + _arg2) - _arg1));
};
}
function frame4(){
Cycle = 0;
stage.focus = this;
PixelRect = new Shape();
PixelRect.graphics.beginFill(0xFF0000);
PixelRect.graphics.drawRect(0, 0, 1, 1);
PixelRect.graphics.endFill();
Pixel = new BitmapData(1, 1, true, 0);
Pixel.draw(PixelRect);
LeftPressed = false;
RightPressed = false;
UpPressed = false;
DownPressed = false;
FirePressed = false;
JumpPressed = false;
SlowPressed = false;
CTRLPressed = false;
BackgroundCollectionMC = GameMC.addChild(new MovieClip());
BackgroundImageMC = BackgroundCollectionMC.addChild(new Backgrounds());
BackgroundParticlesMC = new Array();
i = 0;
while (i < 32) {
BackgroundParticlesMC[i] = BackgroundCollectionMC.addChild(new BackgroundParticles());
i++;
};
LevelMC = GameMC.addChild(new LevelFrames());
ShadowMC = GameMC.addChild(new LevelFrames());
BackgroundMC = GameMC.addChild(new MovieClip());
ForegroundMC = GameMC.addChild(new MovieClip());
StatusBarMC = GameMC.addChild(new StatusBar());
StatusBarMC.Time.alpha = 0;
StatusBarMC.x = 495;
StatusBarMC.y = 3;
MessageMC = GameMC.addChild(new Message());
LevelNameMC = GameMC.addChild(new LevelName());
LevelNameMC.x = 5;
LevelNameMC.y = 362;
LevelNameMC.visible = false;
ShadowMC.blendMode = BlendMode.OVERLAY;
LevelMC.visible = false;
ShadowMC.visible = false;
MessageMC.visible = false;
Level = new Array();
i = 0;
while (i < 43) {
Level[i] = new Object();
Level[i].Name = "Empty";
Level[i].Brightness = 1;
i++;
};
Level[0].Name = "Start";
Level[0].ShortName = "S";
Level[0].LevelFrame = 1;
Level[0].ShadowFrame = 2;
Level[0].Location = new Point(0, 2);
Level[0].Background = 1;
Level[1].Name = "Surface access";
Level[1].ShortName = "SA1";
Level[1].LevelFrame = 3;
Level[1].ShadowFrame = 4;
Level[1].Location = new Point(1, 2);
Level[1].Background = 1;
Level[2].Name = "Ventilation shaft";
Level[2].ShortName = "SA2";
Level[2].LevelFrame = 5;
Level[2].ShadowFrame = 6;
Level[2].Location = new Point(1, 4);
Level[2].Background = 0;
Level[2].Brightness = 0.8;
Level[3].Name = "Ventilation shaft";
Level[3].ShortName = "VS";
Level[3].LevelFrame = 7;
Level[3].ShadowFrame = 8;
Level[3].Location = new Point(1, 5);
Level[3].Background = 0;
Level[3].Brightness = 0.6;
Level[4].Name = "Surface access";
Level[4].ShortName = "SA3";
Level[4].LevelFrame = 9;
Level[4].ShadowFrame = 10;
Level[4].Location = new Point(2, 2);
Level[4].Background = 1;
Level[5].Name = "Main elevator";
Level[5].ShortName = "MA";
Level[5].LevelFrame = 11;
Level[5].ShadowFrame = 12;
Level[5].Location = new Point(2, 3);
Level[5].Background = 0;
Level[6].Name = "Security checkpoint";
Level[6].ShortName = "SC";
Level[6].LevelFrame = 13;
Level[6].ShadowFrame = 14;
Level[6].Location = new Point(2, 4);
Level[6].Background = 0;
Level[7].Name = "Underwater access";
Level[7].ShortName = "UA1";
Level[7].LevelFrame = 15;
Level[7].ShadowFrame = 16;
Level[7].Location = new Point(3, 4);
Level[7].Background = 0;
Level[7].Brightness = 0.9;
Level[8].Name = "Underwater access";
Level[8].ShortName = "UA2";
Level[8].LevelFrame = 17;
Level[8].ShadowFrame = 18;
Level[8].Location = new Point(4, 4);
Level[8].Background = 0;
Level[8].Brightness = 0.8;
Level[9].Name = "Underwater access";
Level[9].ShortName = "UA3";
Level[9].LevelFrame = 19;
Level[9].ShadowFrame = 20;
Level[9].Location = new Point(5, 4);
Level[9].Background = 2;
Level[9].Brightness = 0.9;
Level[10].Name = "Security override";
Level[10].ShortName = "SO";
Level[10].LevelFrame = 21;
Level[10].ShadowFrame = 22;
Level[10].Location = new Point(5, 11);
Level[10].Background = 0;
Level[10].Brightness = 0.9;
Level[11].Name = "Hub Alpha";
Level[11].ShortName = "HA";
Level[11].LevelFrame = 23;
Level[11].ShadowFrame = 24;
Level[11].Location = new Point(6, 4);
Level[11].Background = 2;
Level[12].Name = "Lift";
Level[12].ShortName = "L1";
Level[12].LevelFrame = 25;
Level[12].ShadowFrame = 26;
Level[12].Location = new Point(6, 5);
Level[12].Background = 2;
Level[12].Brightness = 0.9;
Level[13].Name = "Lift";
Level[13].ShortName = "L2";
Level[13].LevelFrame = 27;
Level[13].ShadowFrame = 28;
Level[13].Location = new Point(6, 6);
Level[13].Background = 2;
Level[13].Brightness = 0.8;
Level[14].Name = "Hub Beta";
Level[14].ShortName = "HB";
Level[14].LevelFrame = 29;
Level[14].ShadowFrame = 30;
Level[14].Location = new Point(6, 7);
Level[14].Background = 2;
Level[14].Brightness = 0.7;
Level[15].Name = "Caverns";
Level[15].ShortName = "C1";
Level[15].LevelFrame = 31;
Level[15].ShadowFrame = 32;
Level[15].Location = new Point(6, 8);
Level[15].Background = 0;
Level[15].Brightness = 0.4;
Level[16].Name = "Caverns";
Level[16].ShortName = "C2";
Level[16].LevelFrame = 33;
Level[16].ShadowFrame = 34;
Level[16].Location = new Point(6, 9);
Level[16].Background = 0;
Level[16].Brightness = 0.6;
Level[17].Name = "Computer core";
Level[17].ShortName = "CC2";
Level[17].LevelFrame = 35;
Level[17].ShadowFrame = 36;
Level[17].Location = new Point(6, 10);
Level[17].Background = 0;
Level[17].Brightness = 0.1;
Level[18].Name = "Computer core";
Level[18].ShortName = "CC1";
Level[18].LevelFrame = 37;
Level[18].ShadowFrame = 38;
Level[18].Location = new Point(6, 11);
Level[18].Background = 0;
Level[18].Brightness = 0.7;
Level[19].Name = "Hub Delta";
Level[19].ShortName = "HD";
Level[19].LevelFrame = 39;
Level[19].ShadowFrame = 40;
Level[19].Location = new Point(7, 7);
Level[19].Background = 2;
Level[19].Brightness = 0.8;
Level[20].Name = "Main shaft";
Level[20].ShortName = "MS1";
Level[20].LevelFrame = 41;
Level[20].ShadowFrame = 42;
Level[20].Location = new Point(7, 8);
Level[20].Background = 0;
Level[20].Brightness = 0.9;
Level[21].Name = "Main shaft";
Level[21].ShortName = "MS2";
Level[21].LevelFrame = 43;
Level[21].ShadowFrame = 44;
Level[21].Location = new Point(7, 9);
Level[21].Background = 0;
Level[21].Brightness = 0.8;
Level[22].Name = "Framework";
Level[22].ShortName = "F1";
Level[22].LevelFrame = 45;
Level[22].ShadowFrame = 46;
Level[22].Location = new Point(7, 10);
Level[22].Background = 0;
Level[22].Brightness = 0.7;
Level[23].Name = "Main corridor";
Level[23].ShortName = "MC1";
Level[23].LevelFrame = 47;
Level[23].ShadowFrame = 48;
Level[23].Location = new Point(7, 11);
Level[23].Background = 0;
Level[23].Brightness = 0.8;
Level[24].Name = "Framework";
Level[24].ShortName = "F2";
Level[24].LevelFrame = 49;
Level[24].ShadowFrame = 50;
Level[24].Location = new Point(8, 10);
Level[24].Background = 0;
Level[24].Brightness = 0.8;
Level[25].Name = "Main corridor";
Level[25].ShortName = "MC2";
Level[25].LevelFrame = 51;
Level[25].ShadowFrame = 52;
Level[25].Location = new Point(8, 11);
Level[25].Background = 0;
Level[25].Brightness = 0.8;
Level[26].Name = "Data center";
Level[26].ShortName = "DC";
Level[26].LevelFrame = 53;
Level[26].ShadowFrame = 54;
Level[26].Location = new Point(9, 0);
Level[26].Background = 7;
Level[27].Name = "Tower";
Level[27].ShortName = "T3";
Level[27].LevelFrame = 55;
Level[27].ShadowFrame = 56;
Level[27].Location = new Point(9, 1);
Level[27].Background = 6;
Level[28].Name = "Tower";
Level[28].ShortName = "T2";
Level[28].LevelFrame = 57;
Level[28].ShadowFrame = 58;
Level[28].Location = new Point(9, 2);
Level[28].Background = 5;
Level[29].Name = "Tower";
Level[29].ShortName = "T1";
Level[29].LevelFrame = 59;
Level[29].ShadowFrame = 60;
Level[29].Location = new Point(9, 3);
Level[29].Background = 4;
Level[30].Name = "Lift";
Level[30].ShortName = "TL5";
Level[30].LevelFrame = 61;
Level[30].ShadowFrame = 62;
Level[30].Location = new Point(9, 4);
Level[30].Background = 3;
Level[30].Brightness = 0.9;
Level[31].Name = "Lift";
Level[31].ShortName = "TL4";
Level[31].LevelFrame = 63;
Level[31].ShadowFrame = 64;
Level[31].Location = new Point(9, 5);
Level[31].Background = 2;
Level[31].Brightness = 0.9;
Level[32].Name = "Lift";
Level[32].ShortName = "TL3";
Level[32].LevelFrame = 65;
Level[32].ShadowFrame = 66;
Level[32].Location = new Point(9, 6);
Level[32].Background = 2;
Level[32].Brightness = 0.8;
Level[33].Name = "Checkpoint";
Level[33].ShortName = "CP2";
Level[33].LevelFrame = 67;
Level[33].ShadowFrame = 68;
Level[33].Location = new Point(9, 7);
Level[33].Background = 2;
Level[33].Brightness = 0.8;
Level[34].Name = "Lift";
Level[34].ShortName = "TL2";
Level[34].LevelFrame = 69;
Level[34].ShadowFrame = 70;
Level[34].Location = new Point(9, 8);
Level[34].Background = 2;
Level[34].Brightness = 0.7;
Level[35].Name = "Checkpoint";
Level[35].ShortName = "CP1";
Level[35].LevelFrame = 71;
Level[35].ShadowFrame = 72;
Level[35].Location = new Point(9, 9);
Level[35].Background = 0;
Level[35].Brightness = 0.7;
Level[36].Name = "Lift";
Level[36].ShortName = "TL1";
Level[36].LevelFrame = 73;
Level[36].ShadowFrame = 74;
Level[36].Location = new Point(9, 10);
Level[36].Background = 0;
Level[36].Brightness = 0.6;
Level[37].Name = "Tower access";
Level[37].ShortName = "TA";
Level[37].LevelFrame = 75;
Level[37].ShadowFrame = 76;
Level[37].Location = new Point(9, 11);
Level[37].Background = 0;
Level[37].Brightness = 0.6;
Level[38].Name = "Storage";
Level[38].ShortName = "ST";
Level[38].LevelFrame = 77;
Level[38].ShadowFrame = 78;
Level[38].Location = new Point(10, 11);
Level[38].Background = 0;
Level[38].Brightness = 0.8;
Level[39].Name = "Escape";
Level[39].ShortName = "E";
Level[39].LevelFrame = 79;
Level[39].ShadowFrame = 79;
Level[39].Location = new Point(8, 0);
Level[39].Background = 7;
Level[40].Name = "Reloaded";
Level[40].ShortName = "RL";
Level[40].LevelFrame = 79;
Level[40].ShadowFrame = 79;
Level[40].Location = new Point(8, 1);
Level[40].Background = 6;
Level[41].Name = "";
Level[41].ShortName = "";
Level[41].LevelFrame = 80;
Level[41].ShadowFrame = 79;
Level[41].Location = new Point(100, 0);
Level[41].Background = 6;
Level[42].Name = "The end";
Level[42].ShortName = "";
Level[42].LevelFrame = 79;
Level[42].ShadowFrame = 79;
Level[42].Location = new Point(100, 1);
Level[42].Background = 4;
i = 0;
while (i < Level.length) {
Level[i].CollisionBitmapData = new BitmapData(543, 383, true, 0);
ShadowMC.gotoAndStop(Level[i].ShadowFrame);
Level[i].CollisionBitmapData.draw(ShadowMC);
i++;
};
Game = new Object();
Game.StartPosition = new Point(50, 970);
Game.Resolution = new Point(543, 383);
Game.GravityStrength = 0.5;
Game.CurrentLevel = -1;
Game.LevelLocked = false;
Game.LevelUpdated = false;
Game.PlayerPosition = new Point(0, 0);
Game.PlayerSize = new Point(0, 0);
Game.PlayerAlive = false;
Game.PlayerHealth = 100;
Game.FreezePlayer = false;
Game.UnitInSight = -1;
Game.GotGun = false;
Game.GotChronoManipulator = false;
Game.ChronoCharge = 150;
Game.SlowMotion = false;
Game.NextUpdate = 0;
Game.DataDisc = 0;
Game.LastMusic = "";
SavedGame = new Object();
ParticleInformation = new Array();
i = 0;
while (i < 100) {
ParticleInformation[i] = new Object();
i++;
};
i = 0;
ParticleInformation[i].Name = "ParticleMetal";
ParticleInformation[i].MCName = "ParticleMetal";
ParticleInformation[i].Acceleration = new Point(0, 0.4);
ParticleInformation[i].DeAcceleration = new Point(0.95, 1);
ParticleInformation[i].DirectedAngle = false;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = 0;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticleFireball";
ParticleInformation[i].MCName = "ParticleFireball";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(0.9, 0.9);
ParticleInformation[i].DirectedAngle = false;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.05;
ParticleInformation[i].InitialScale = new Point(0, 0);
ParticleInformation[i].ScaleModifier = new Point(0.2, 0.2);
i = (i + 1);
ParticleInformation[i].Name = "ParticlePlasma";
ParticleInformation[i].MCName = "ParticlePlasma";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(0.95, 0.95);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.05;
ParticleInformation[i].InitialScale = new Point(0.5, 0.5);
ParticleInformation[i].ScaleModifier = new Point(0.1, 0.1);
i = (i + 1);
ParticleInformation[i].Name = "ParticleFlame";
ParticleInformation[i].MCName = "ParticleFlame";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(1, 1);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.25;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticleBlueFlame";
ParticleInformation[i].MCName = "ParticleBlueFlame";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(1, 1);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.25;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticleSpark";
ParticleInformation[i].MCName = "ParticleSpark";
ParticleInformation[i].Acceleration = new Point(0, 0.5);
ParticleInformation[i].DeAcceleration = new Point(0.97, 1);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.1;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticlePickup";
ParticleInformation[i].MCName = "ParticlePickup";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(0, 0);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.1;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0.1, -0.1);
i = (i + 1);
ParticleInformation[i].Name = "ParticlePlayerBullet";
ParticleInformation[i].MCName = "ParticlePlayerBullet";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(0.95, 0.95);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.05;
ParticleInformation[i].InitialScale = new Point(0.5, 0.5);
ParticleInformation[i].ScaleModifier = new Point(0.1, 0.1);
i = (i + 1);
ParticleInformation[i].Name = "ParticleSpeakBubble";
ParticleInformation[i].MCName = "ParticleSpeakBubble";
ParticleInformation[i].Acceleration = new Point(0, -0.3);
ParticleInformation[i].DeAcceleration = new Point(0.95, 0.95);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.05;
ParticleInformation[i].InitialScale = new Point(0.5, 0.5);
ParticleInformation[i].ScaleModifier = new Point(0.1, 0.1);
i = (i + 1);
ParticleInformation[i].Name = "ParticleCave";
ParticleInformation[i].MCName = "ParticleCave";
ParticleInformation[i].Acceleration = new Point(0, 0.5);
ParticleInformation[i].DeAcceleration = new Point(0.97, 1);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = 0;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticleConcrete";
ParticleInformation[i].MCName = "ParticleConcrete";
ParticleInformation[i].Acceleration = new Point(0, 0.5);
ParticleInformation[i].DeAcceleration = new Point(0.97, 1);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = 0;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticleWall";
ParticleInformation[i].MCName = "ParticleWall";
ParticleInformation[i].Acceleration = new Point(0, 0.5);
ParticleInformation[i].DeAcceleration = new Point(0.97, 1);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = 0;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticleBlueBullet";
ParticleInformation[i].MCName = "ParticleBlueBullet";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(0.95, 0.95);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.05;
ParticleInformation[i].InitialScale = new Point(0.5, 0.5);
ParticleInformation[i].ScaleModifier = new Point(0.2, 0.2);
i = (i + 1);
ParticleInformation[i].Name = "ParticleElectricity";
ParticleInformation[i].MCName = "ParticleElectricity";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(0.95, 0.95);
ParticleInformation[i].DirectedAngle = false;
ParticleInformation[i].FastestRotation = 90;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.3;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0, 0);
i = (i + 1);
ParticleInformation[i].Name = "ParticlePortal";
ParticleInformation[i].MCName = "ParticlePortal";
ParticleInformation[i].Acceleration = new Point(0, 0);
ParticleInformation[i].DeAcceleration = new Point(0, 0);
ParticleInformation[i].DirectedAngle = true;
ParticleInformation[i].FastestRotation = 0;
ParticleInformation[i].InitialAlpha = 1;
ParticleInformation[i].AlphaModifier = -0.05;
ParticleInformation[i].InitialScale = new Point(1, 1);
ParticleInformation[i].ScaleModifier = new Point(0.1, -0.03);
DefaultUnitInformation = new Object();
DefaultUnitInformation.Name = "";
DefaultUnitInformation.TypeName = "";
DefaultUnitInformation.MCName = "";
DefaultUnitInformation.InheritedBy = "";
DefaultUnitInformation.Health = -1;
DefaultUnitInformation.Damage = 0;
DefaultUnitInformation.Weight = 0;
DefaultUnitInformation.CollideWithSameTeam = false;
DefaultUnitInformation.Size = new Point(15, 15);
DefaultUnitInformation.MaxVelocity = new Point(0, 0);
DefaultUnitInformation.Acceleration = new Point(0, 0);
DefaultUnitInformation.AirAcceleration = new Point(0, 0);
DefaultUnitInformation.DeAcceleration = 0;
DefaultUnitInformation.AirDeAcceleration = 0;
DefaultUnitInformation.EffectedByGravity = true;
DefaultUnitInformation.DeflectionForce = new Point(0, 0);
DefaultUnitInformation.DestroyWhenOffscreen = false;
DefaultUnitInformation.DestructionParticles = "";
DefaultUnitInformation.StopUpdatingWhen = "PlayerIsOnAnotherScreen";
DefaultUnitInformation.Controller = "";
DefaultUnitInformation.ActivateWhen = "";
DefaultUnitInformation.DeActivateWhen = "";
DefaultUnitInformation.Return = false;
DefaultUnitInformation.PauseTime = 0;
DefaultUnitInformation.Invisible = false;
DefaultUnitInformation.InBackground = false;
DefaultUnitInformation.CanTrigger = false;
UnitInformation = new Array();
i = 0;
while (i < 100) {
UnitInformation[i] = new Object();
for (VariableName in DefaultUnitInformation) {
UnitInformation[i][VariableName] = DefaultUnitInformation[VariableName];
};
i++;
};
i = 0;
UnitInformation[i].Name = "Player";
UnitInformation[i].MCName = "UnitPlayer";
UnitInformation[i].Health = 100;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(8, 10);
UnitInformation[i].MaxVelocity = new Point(4, 9);
UnitInformation[i].Acceleration = new Point(1, 9);
UnitInformation[i].AirAcceleration = new Point(0.6, 0);
UnitInformation[i].DeAcceleration = 0.5;
UnitInformation[i].AirDeAcceleration = 0.7;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|3|3|3|3";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "Input";
i = (i + 1);
UnitInformation[i].Name = "EscapeLift";
UnitInformation[i].MCName = "UnitEscapeLift";
UnitInformation[i].Health = 300;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 100;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(30, 8);
UnitInformation[i].MaxVelocity = new Point(1, 1);
UnitInformation[i].Acceleration = new Point(5, 5);
UnitInformation[i].AirAcceleration = new Point(1, 1);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|3|3|3|3";
UnitInformation[i].Controller = "LiftAI";
UnitInformation[i].StopUpdatingWhen = "Never";
UnitInformation[i].Return = false;
UnitInformation[i].PauseTime = -50;
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "MadComEscapeLift";
UnitInformation[i].InheritedBy = "EscapeLift";
UnitInformation[i].Health = -1;
i = (i + 1);
UnitInformation[i].Name = "PlayerEscapeLift";
UnitInformation[i].InheritedBy = "EscapeLift";
UnitInformation[i].Return = true;
i = (i + 1);
UnitInformation[i].Name = "Lift";
UnitInformation[i].MCName = "UnitLift";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 100;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(15, 8);
UnitInformation[i].MaxVelocity = new Point(3, 3);
UnitInformation[i].Acceleration = new Point(5, 5);
UnitInformation[i].AirAcceleration = new Point(1, 1);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].Controller = "LiftAI";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingDown";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherXScreen";
UnitInformation[i].Return = true;
UnitInformation[i].PauseTime = 50;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingUp";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherXScreen";
UnitInformation[i].Return = false;
UnitInformation[i].PauseTime = 50;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingLeft";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Return = false;
UnitInformation[i].PauseTime = -50;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingRight";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Return = true;
UnitInformation[i].PauseTime = -50;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingDownNoPause";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherXScreen";
UnitInformation[i].Return = true;
UnitInformation[i].PauseTime = 1;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingUpNoPause";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherXScreen";
UnitInformation[i].Return = false;
UnitInformation[i].PauseTime = 1;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingLeftNoPause";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Return = false;
UnitInformation[i].PauseTime = -1;
i = (i + 1);
UnitInformation[i].Name = "LiftGoingRightNoPause";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Return = true;
UnitInformation[i].PauseTime = -1;
i = (i + 1);
UnitInformation[i].Name = "MadComLift";
UnitInformation[i].InheritedBy = "Lift";
UnitInformation[i].StopUpdatingWhen = "Never";
UnitInformation[i].Return = true;
i = (i + 1);
UnitInformation[i].Name = "Spinner";
UnitInformation[i].MCName = "UnitSpinner";
UnitInformation[i].Health = 20;
UnitInformation[i].Damage = 50;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(9, 9);
UnitInformation[i].MaxVelocity = new Point(10, 4);
UnitInformation[i].Acceleration = new Point(2, 3);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0.9;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0.8, 0.8);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "10|ParticleMetal|7|8|7|0|5|ParticleFireball|3|3|3|3";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
UnitInformation[i].Controller = "SpinnerAI";
UnitInformation[i].ActivateWhen = "PlayerInHorizontalView";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "Tank";
UnitInformation[i].MCName = "UnitTank";
UnitInformation[i].Health = 1000;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 90;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(21, 23);
UnitInformation[i].MaxVelocity = new Point(1, 10);
UnitInformation[i].Acceleration = new Point(1, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "10|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
UnitInformation[i].Controller = "TankAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "Plasma";
UnitInformation[i].MCName = "UnitPlasma";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 15;
UnitInformation[i].Weight = 1;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(5, 5);
UnitInformation[i].MaxVelocity = new Point(10, 10);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 1;
UnitInformation[i].AirDeAcceleration = 1;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = true;
UnitInformation[i].DestructionParticles = "3|ParticlePlasma|2|2|2|2";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "ProjectileAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "Signtry";
UnitInformation[i].MCName = "UnitSigntry";
UnitInformation[i].Health = 100;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(23, 15);
UnitInformation[i].MaxVelocity = new Point(2, 1);
UnitInformation[i].Acceleration = new Point(0.5, 0.5);
UnitInformation[i].AirAcceleration = new Point(0.5, 0.5);
UnitInformation[i].DeAcceleration = 0.95;
UnitInformation[i].AirDeAcceleration = 0.95;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0.5, 0.5);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "10|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
UnitInformation[i].Controller = "SigntryAI";
UnitInformation[i].ActivateWhen = "PlayerInVerticalView";
UnitInformation[i].DeActivateWhen = "PlayerIsTwoScreensAway";
i = (i + 1);
UnitInformation[i].Name = "LaserEmitter";
UnitInformation[i].MCName = "UnitLaserEmitter";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(10, 10);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "EmitterAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].PauseTime = 50;
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "StationaryLaserEmitter";
UnitInformation[i].InheritedBy = "LaserEmitter";
UnitInformation[i].Return = false;
i = (i + 1);
UnitInformation[i].Name = "RotatingLaserEmitter";
UnitInformation[i].InheritedBy = "LaserEmitter";
UnitInformation[i].Return = true;
i = (i + 1);
UnitInformation[i].Name = "PlasmaWall";
UnitInformation[i].MCName = "UnitPlasmaWall";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(1, 1);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "EmitterAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].PauseTime = -500;
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "TriggerBeam";
UnitInformation[i].MCName = "UnitTriggerBeam";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(3, 2);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "EmitterAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].PauseTime = 0;
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "StationaryTriggerBeam";
UnitInformation[i].InheritedBy = "TriggerBeam";
UnitInformation[i].Return = false;
i = (i + 1);
UnitInformation[i].Name = "RotatingTriggerBeam";
UnitInformation[i].InheritedBy = "TriggerBeam";
UnitInformation[i].Return = true;
i = (i + 1);
UnitInformation[i].Name = "InvisibleTriggerBeam";
UnitInformation[i].InheritedBy = "StationaryTriggerBeam";
UnitInformation[i].Invisible = true;
i = (i + 1);
UnitInformation[i].Name = "Pickup";
UnitInformation[i].MCName = "UnitPickup";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(3, 2);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "PickupAI";
UnitInformation[i].ActivateWhen = "PlayerTouching";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "PickupGun";
UnitInformation[i].MCName = "UnitPickupGun";
UnitInformation[i].InheritedBy = "Pickup";
i = (i + 1);
UnitInformation[i].Name = "PickupSave";
UnitInformation[i].MCName = "UnitPickupSave";
UnitInformation[i].InheritedBy = "Pickup";
i = (i + 1);
UnitInformation[i].Name = "PickupRepair";
UnitInformation[i].MCName = "UnitPickupRepair";
UnitInformation[i].InheritedBy = "Pickup";
i = (i + 1);
UnitInformation[i].Name = "PickupKeycard";
UnitInformation[i].MCName = "UnitPickupKeycard";
UnitInformation[i].InheritedBy = "Pickup";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "PickupChronoManipulator";
UnitInformation[i].MCName = "UnitPickupChronoManipulator";
UnitInformation[i].InheritedBy = "Pickup";
i = (i + 1);
UnitInformation[i].Name = "PickupDataDisc";
UnitInformation[i].MCName = "UnitDataDisc";
UnitInformation[i].InheritedBy = "Pickup";
i = (i + 1);
UnitInformation[i].Name = "PlayerBullet";
UnitInformation[i].MCName = "UnitPlayerBullet";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 20;
UnitInformation[i].Weight = 1;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(5, 5);
UnitInformation[i].MaxVelocity = new Point(10, 10);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 1;
UnitInformation[i].AirDeAcceleration = 1;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = true;
UnitInformation[i].DestructionParticles = "3|ParticlePlayerBullet|2|2|2|2";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "ProjectileAI";
i = (i + 1);
UnitInformation[i].Name = "BlueBullet";
UnitInformation[i].MCName = "UnitBlueBullet";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 15;
UnitInformation[i].Weight = 1;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(5, 5);
UnitInformation[i].MaxVelocity = new Point(10, 10);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 1;
UnitInformation[i].AirDeAcceleration = 1;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = true;
UnitInformation[i].DestructionParticles = "3|ParticleBlueBullet|1|1|1|1";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "ProjectileAI";
i = (i + 1);
UnitInformation[i].Name = "SpeakBubble";
UnitInformation[i].MCName = "UnitSpeakBubble";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(44, 14);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 1;
UnitInformation[i].AirDeAcceleration = 1;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "15|ParticleSpeakBubble|3|3|3|3";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "SpeakBubbleAI";
i = (i + 1);
UnitInformation[i].Name = "Fan";
UnitInformation[i].MCName = "UnitFan";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 40;
UnitInformation[i].Weight = 100;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(14, 14);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Drone";
UnitInformation[i].MCName = "UnitDrone";
UnitInformation[i].Health = 40;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 5;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(8, 6);
UnitInformation[i].MaxVelocity = new Point(3, 4);
UnitInformation[i].Acceleration = new Point(0.3, 4);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0.9;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0.8, 0.8);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "3|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "DroneAI";
UnitInformation[i].ActivateWhen = "PlayerHasEnteredTheScreen";
UnitInformation[i].DeActivateWhen = "PlayerIsOnAnotherScreen";
i = (i + 1);
UnitInformation[i].Name = "InvisibleDrone";
UnitInformation[i].InheritedBy = "Drone";
UnitInformation[i].Invisible = true;
i = (i + 1);
UnitInformation[i].Name = "Crawler";
UnitInformation[i].MCName = "UnitCrawler";
UnitInformation[i].Health = 300;
UnitInformation[i].Damage = 1;
UnitInformation[i].Weight = 100;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(15, 15);
UnitInformation[i].MaxVelocity = new Point(1, 1);
UnitInformation[i].Acceleration = new Point(1, 1);
UnitInformation[i].AirAcceleration = new Point(1, 1);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "10|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "CrawlerAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "Lever";
UnitInformation[i].MCName = "UnitLever";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(7, 10);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "4|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "LeverAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "Box";
UnitInformation[i].MCName = "UnitBox";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(15, 15);
UnitInformation[i].MaxVelocity = new Point(5, 5);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0.9;
UnitInformation[i].AirDeAcceleration = 0.9;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
i = (i + 1);
UnitInformation[i].Name = "Crate";
UnitInformation[i].MCName = "UnitCrate";
UnitInformation[i].Health = 50;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(15, 15);
UnitInformation[i].MaxVelocity = new Point(5, 5);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0.9;
UnitInformation[i].AirDeAcceleration = 0.9;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleCave|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
i = (i + 1);
UnitInformation[i].Name = "Rock";
UnitInformation[i].MCName = "UnitRock";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(13, 11);
UnitInformation[i].MaxVelocity = new Point(5, 5);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0.9;
UnitInformation[i].AirDeAcceleration = 0.9;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleCave|7|8|7|0";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
i = (i + 1);
UnitInformation[i].Name = "Column";
UnitInformation[i].MCName = "UnitColumn";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(13, 17);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "UnstableCave";
UnitInformation[i].MCName = "UnitUnstableCave";
UnitInformation[i].Health = 10;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 1000;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(15, 15);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "10|ParticleCave|4|3|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "BreakAwayAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "UnstableConcrete";
UnitInformation[i].MCName = "UnitUnstableConcrete";
UnitInformation[i].Health = 10;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 1000;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(15, 15);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "10|ParticleConcrete|4|3|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "BreakAwayAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "UnstableWall";
UnitInformation[i].MCName = "UnitUnstableWall";
UnitInformation[i].Health = 10;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 1000;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(15, 15);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "10|ParticleWall|4|3|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "BreakAwayAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Spikes";
UnitInformation[i].MCName = "UnitSpikes";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 100;
UnitInformation[i].Weight = 1000;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(15, 8);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Countdown";
UnitInformation[i].MCName = "UnitCountdown";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(18, 15);
UnitInformation[i].MaxVelocity = new Point(6, 6);
UnitInformation[i].Acceleration = new Point(6, 6);
UnitInformation[i].AirAcceleration = new Point(6, 6);
UnitInformation[i].DeAcceleration = 0.7;
UnitInformation[i].AirDeAcceleration = 0.7;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "CountdownAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Bouncer";
UnitInformation[i].MCName = "UnitBouncer";
UnitInformation[i].Health = 150;
UnitInformation[i].Damage = 50;
UnitInformation[i].Weight = 1;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(12, 12);
UnitInformation[i].MaxVelocity = new Point(2, 2);
UnitInformation[i].Acceleration = new Point(2, 2);
UnitInformation[i].AirAcceleration = new Point(2, 2);
UnitInformation[i].DeAcceleration = 1;
UnitInformation[i].AirDeAcceleration = 1;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(1, 1);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
UnitInformation[i].Controller = "BouncerAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "PlayerIsTwoScreensAway";
i = (i + 1);
UnitInformation[i].Name = "Turret";
UnitInformation[i].MCName = "UnitTurret";
UnitInformation[i].Health = 150;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 50;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(10, 10);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "TurretAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "Swarmer";
UnitInformation[i].MCName = "UnitSwarmer";
UnitInformation[i].Health = 50;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(12, 7);
UnitInformation[i].MaxVelocity = new Point(2, 2);
UnitInformation[i].Acceleration = new Point(0.25, 0.25);
UnitInformation[i].AirAcceleration = new Point(0.25, 0.25);
UnitInformation[i].DeAcceleration = 0.95;
UnitInformation[i].AirDeAcceleration = 0.95;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0.5, 0.5);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "SwarmerAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "Cyborg";
UnitInformation[i].MCName = "UnitCyborg";
UnitInformation[i].Health = 100;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(8, 10);
UnitInformation[i].MaxVelocity = new Point(4, 9);
UnitInformation[i].Acceleration = new Point(1, 9);
UnitInformation[i].AirAcceleration = new Point(0.6, 0);
UnitInformation[i].DeAcceleration = 0.5;
UnitInformation[i].AirDeAcceleration = 0.7;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|3|3|3|3";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
UnitInformation[i].Controller = "CyborgAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "MadCom";
UnitInformation[i].MCName = "UnitMadCom";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(20, 15);
UnitInformation[i].MaxVelocity = new Point(1, 1);
UnitInformation[i].Acceleration = new Point(1, 1);
UnitInformation[i].AirAcceleration = new Point(1, 1);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "20|ParticleMetal|7|8|7|0|20|ParticleFireball|3|3|3|3";
UnitInformation[i].StopUpdatingWhen = "PlayerIsTwoScreensAway";
UnitInformation[i].Controller = "MadComAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "MadComReloaded";
UnitInformation[i].MCName = "UnitMadComReloaded";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(20, 15);
UnitInformation[i].MaxVelocity = new Point(1, 1);
UnitInformation[i].Acceleration = new Point(1, 1);
UnitInformation[i].AirAcceleration = new Point(1, 1);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "20|ParticleMetal|7|8|7|0|20|ParticleFireball|3|3|3|3";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "MadComAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "Spawner";
UnitInformation[i].MCName = "UnitSpawner";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(10, 9);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "SpawnerAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].PauseTime = 200;
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "SingleSpawner";
UnitInformation[i].InheritedBy = "Spawner";
UnitInformation[i].DestructionParticles = " ";
i = (i + 1);
UnitInformation[i].Name = "ReSpawner";
UnitInformation[i].InheritedBy = "Spawner";
i = (i + 1);
UnitInformation[i].Name = "Teleporter";
UnitInformation[i].MCName = "UnitTeleporter";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(1, 15);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "TeleporterAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "Generator";
UnitInformation[i].MCName = "UnitGenerator";
UnitInformation[i].Health = 100;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 100;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(11, 18);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "GeneratorAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "TrapDoor";
UnitInformation[i].MCName = "UnitTrapDoor";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 100;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(15, 6);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "TrapDoorAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Chute";
UnitInformation[i].MCName = "UnitChute";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 100;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(6, 15);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "ChuteAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Music";
UnitInformation[i].MCName = "UnitMusic";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(1, 1);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "MusicAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "Proxy";
UnitInformation[i].MCName = "UnitProxy";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 100;
UnitInformation[i].Weight = 10;
UnitInformation[i].CollideWithSameTeam = true;
UnitInformation[i].Size = new Point(5, 8);
UnitInformation[i].MaxVelocity = new Point(1000, 1000);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 1;
UnitInformation[i].AirDeAcceleration = 1;
UnitInformation[i].EffectedByGravity = true;
UnitInformation[i].DeflectionForce = new Point(0.9, 0.9);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "3|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "ProxyAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = (i + 1);
UnitInformation[i].Name = "Lamp";
UnitInformation[i].MCName = "UnitLamp";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(6, 13);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(1, 1);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "3|ParticleMetal|7|8|7|0|3|ParticleFireball|4|4|4|4";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "LightAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Spotlight";
UnitInformation[i].MCName = "UnitSpotlight";
UnitInformation[i].InheritedBy = "Lamp";
i = (i + 1);
UnitInformation[i].Name = "RedSpotlight";
UnitInformation[i].MCName = "UnitSpotlight";
UnitInformation[i].InheritedBy = "Lamp";
i = (i + 1);
UnitInformation[i].Name = "Sign";
UnitInformation[i].MCName = "UnitSign";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(10, 6);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "SignAI";
UnitInformation[i].ActivateWhen = "PlayerTouching";
UnitInformation[i].DeActivateWhen = "";
UnitInformation[i].CanTrigger = true;
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Panel";
UnitInformation[i].MCName = "UnitPanel1";
UnitInformation[i].Health = 10;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(7, 7);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "5|ParticleMetal|7|8|7|0|5|ParticleFireball|3|3|3|3";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].InBackground = true;
i = (i + 1);
UnitInformation[i].Name = "Panel1";
UnitInformation[i].InheritedBy = "Panel";
UnitInformation[i].MCName = "UnitPanel1";
i = (i + 1);
UnitInformation[i].Name = "Panel2";
UnitInformation[i].InheritedBy = "Panel";
UnitInformation[i].MCName = "UnitPanel2";
i = (i + 1);
UnitInformation[i].Name = "Panel3";
UnitInformation[i].InheritedBy = "Panel";
UnitInformation[i].MCName = "UnitPanel3";
i = (i + 1);
UnitInformation[i].Name = "Panel4";
UnitInformation[i].InheritedBy = "Panel";
UnitInformation[i].MCName = "UnitPanel4";
i = (i + 1);
UnitInformation[i].Name = "Panel5";
UnitInformation[i].InheritedBy = "Panel";
UnitInformation[i].MCName = "UnitPanel5";
i = (i + 1);
UnitInformation[i].Name = "DataChecker";
UnitInformation[i].MCName = "UnitDataChecker";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(1, 1);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "PlayerIsOnAnotherScreen";
UnitInformation[i].Controller = "DataCheckerAI";
UnitInformation[i].ActivateWhen = "PlayerHasEnteredTheScreen";
UnitInformation[i].DeActivateWhen = "PlayerHasLeftTheScreen";
UnitInformation[i].CanTrigger = true;
i = (i + 1);
UnitInformation[i].Name = "Credits";
UnitInformation[i].MCName = "Credits";
UnitInformation[i].Health = -1;
UnitInformation[i].Damage = 0;
UnitInformation[i].Weight = 0;
UnitInformation[i].CollideWithSameTeam = false;
UnitInformation[i].Size = new Point(1, 1);
UnitInformation[i].MaxVelocity = new Point(0, 0);
UnitInformation[i].Acceleration = new Point(0, 0);
UnitInformation[i].AirAcceleration = new Point(0, 0);
UnitInformation[i].DeAcceleration = 0;
UnitInformation[i].AirDeAcceleration = 0;
UnitInformation[i].EffectedByGravity = false;
UnitInformation[i].DeflectionForce = new Point(0, 0);
UnitInformation[i].DestroyWhenOffscreen = false;
UnitInformation[i].DestructionParticles = "";
UnitInformation[i].StopUpdatingWhen = "";
UnitInformation[i].Controller = "CreditsAI";
UnitInformation[i].ActivateWhen = "";
UnitInformation[i].DeActivateWhen = "";
i = 0;
while (i < UnitInformation.length) {
UnitInformation[i].TypeName = UnitInformation[i].Name;
if (UnitInformation[i].InheritedBy.length > 0){
n = 0;
while (n < UnitInformation.length) {
if (((!((UnitInformation[n].Name == null))) && ((UnitInformation[i].InheritedBy == UnitInformation[n].Name)))){
TempName = UnitInformation[i].Name;
for (VariableName in DefaultUnitInformation) {
if (UnitInformation[i][VariableName] == DefaultUnitInformation[VariableName]){
UnitInformation[i][VariableName] = UnitInformation[n][VariableName];
};
};
UnitInformation[i].TypeName = UnitInformation[n].Name;
UnitInformation[i].Name = TempName;
};
n++;
};
};
i++;
};
Editor = new Object();
Editor.SelectedUnit = 0;
Editor.SelectedTeam = 0;
Editor.EditorEnabled = false;
Editor.Angle = 0;
Editor.MouseHeld = true;
Editor.HeldUnit = -1;
Editor.UnitClicked = false;
Particles = new Array();
Units = new Array();
SavedUnits = new Array();
ActiveUnits = new Array();
CreateUnit("Player", 0, new Point(Game.StartPosition.x, Game.StartPosition.y), new Point(0, 0), 0, "", "", false);
CreateUnit("Music", 0, new Point(416, 1007), new Point(0, 0), 0, "The Balance", "", false);
CreateUnit("Crate", 0, new Point(416, 1007), new Point(0, 0), 0, "", "SCrate", false);
CreateUnit("Crate", 0, new Point(451, 1007), new Point(0, 0), 0, "", "SCrate", false);
CreateUnit("Crate", 0, new Point(437, 976), new Point(0, 0), 0, "", "SCrate", false);
CreateUnit("Crate", 0, new Point(356, 1007), new Point(0, 0), 0, "", "SCrate", false);
CreateUnit("Column", 0, new Point(272, 972), new Point(0, 0), 0, "", "SColumn", false);
CreateUnit("Column", 0, new Point(272, 1005), new Point(0, 0), 0, "", "SColumn", false);
CreateUnit("Sign", 0, new Point(271, 1005), new Point(0, 0), 0, "Welcome to PowerNode|Surface access to the complex is ahead (Jump: Z)", "SSign", false);
CreateUnit("Signtry", 1, new Point(850, 808), new Point(0, 0), 0, "", "SA1Signtry", false);
CreateUnit("PickupGun", 1, new Point(879, 1006), new Point(0, 0), 0, "", "SA1PickupGun", false);
CreateUnit("Column", 0, new Point(719, 941), new Point(0, 0), 0, "", "SA1Column", false);
CreateUnit("Generator", 1, new Point(783, 1004), new Point(0, 0), 0, "SA1Chute", "SA1Generator", false);
CreateUnit("Chute", 1, new Point(985, 1006), new Point(0, 0), 0, "", "SA1Chute", false);
CreateUnit("Spotlight", 1, new Point(988, 959), new Point(0, 0), 320, "", "SA1Spotlight", true);
CreateUnit("Sign", 0, new Point(911, 1006), new Point(0, 0), 0, "The Blastinator MK3 plasma thrower, guaranteed to last +10k rounds without charging (Fire: X)", "SA1Sign", false);
CreateUnit("Sign", 0, new Point(719, 942), new Point(0, 0), 0, "- - - WARNING - - -|This generator must remain online at all times", "SA1Sign", false);
CreateUnit("Panel2", 1, new Point(970, 1006), new Point(0, 0), 0, "", "SA1Panel2", false);
CreateUnit("RotatingTriggerBeam", 1, new Point(959, 1765), new Point(0, 0), 0, "SA2Turret|SA2RotatingTriggerBeam|SA2Lever|SA2RedSpotlight", "SA2RotatingTriggerBeam", true);
CreateUnit("RotatingTriggerBeam", 1, new Point(863, 1798), new Point(0, 0), 90, "SA2Turret|SA2RotatingTriggerBeam|SA2Lever|SA2RedSpotlight", "SA2RotatingTriggerBeam", true);
CreateUnit("RotatingTriggerBeam", 1, new Point(767, 1839), new Point(0, 0), 180, "SA2Turret|SA2RotatingTriggerBeam|SA2Lever|SA2RedSpotlight", "SA2RotatingTriggerBeam", true);
CreateUnit("PickupKeycard", 1, new Point(591, 1804), new Point(0, 0), 0, "SCTrapDoor", "SA2PickupKeycard", false);
CreateUnit("Lever", 0, new Point(1039, 1838), new Point(0, 0), 0, "SA2Turret|SA2RedSpotlight|SA2RotatingTriggerBeam|SA2Lever", "SA2Lever", false);
CreateUnit("Turret", 1, new Point(670, 1724), new Point(0, 0), 0, "", "SA2Turret", false);
CreateUnit("Turret", 1, new Point(0x0300, 1692), new Point(0, 0), 0, "", "SA2Turret", false);
CreateUnit("RedSpotlight", 1, new Point(829, 1660), new Point(0, 0), 280, "", "SA2RedSpotlight", false);
CreateUnit("RedSpotlight", 1, new Point(733, 1692), new Point(0, 0), 310, "", "SA2RedSpotlight", false);
CreateUnit("RedSpotlight", 1, new Point(638, 1723), new Point(0, 0), 340, "", "SA2RedSpotlight", false);
CreateUnit("Panel3", 1, new Point(1038, 1675), new Point(0, 0), 0, "", "SA2Panel3", true);
CreateUnit("Fan", 1, new Point(655, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("Fan", 1, new Point(687, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("Fan", 1, new Point(751, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("Fan", 1, new Point(783, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("Fan", 1, new Point(847, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("Fan", 1, new Point(879, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("Fan", 1, new Point(943, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("Fan", 1, new Point(975, 2059), new Point(0, 0), 0, "", "VSFan", true);
CreateUnit("RedSpotlight", 1, new Point(637, 2006), new Point(0, 0), 300, "", "VSRedSpotlight", true);
CreateUnit("RedSpotlight", 1, new Point(987, 2009), new Point(0, 0), 60, "", "VSRedSpotlight", true);
CreateUnit("LiftGoingDown", 1, new Point(1550, 934), new Point(0, 0), 0, "", "SA3StillLift", false);
CreateUnit("LiftGoingDown", 1, new Point(1582, 934), new Point(0, 0), 0, "", "SA3LiftGoingDown", false);
CreateUnit("StationaryLaserEmitter", 1, new Point(1409, 943), new Point(0, 0), 0, "", "SA3StationaryTriggerBeam", false);
CreateUnit("StationaryTriggerBeam", 1, new Point(1454, 1020), new Point(0, 0), 270, "SA3LaserLever|SA3Chute|SA3StationaryTriggerBeam", "SA3StationaryTriggerBeam", false);
CreateUnit("RotatingTriggerBeam", 1, new Point(1182, 926), new Point(0, 0), 0, "SA3LaserLever|SA3Chute|SA3StationaryTriggerBeam", "SA3StationaryTriggerBeam", false);
CreateUnit("RotatingTriggerBeam", 1, new Point(1183, 926), new Point(0, 0), 180, "SA3LaserLever|SA3Chute|SA3StationaryTriggerBeam", "SA3StationaryTriggerBeam", false);
CreateUnit("Lever", 0, new Point(1582, 848), new Point(0, 0), 0, "SA3LiftGoingDown|SA3Spotlight", "SA3Lever", true);
CreateUnit("Lever", 0, new Point(1390, 1008), new Point(0, 0), 0, "SA3Chute|SA3StationaryTriggerBeam|SA3LaserLever", "SA3LaserLever", true);
CreateUnit("Box", 0, new Point(1405, 847), new Point(0, 0), 0, "", "SA3Box", true);
CreateUnit("Crate", 0, new Point(1231, 1007), new Point(0, 0), 0, "", "SA3Crate", false);
CreateUnit("Chute", 1, new Point(1528, 910), new Point(0, 0), 0, "", "SA3Chute", false);
CreateUnit("Spotlight", 1, new Point(1532, 1025), new Point(0, 0), 210, "", "SA3Spotlight", false);
CreateUnit("Sign", 0, new Point(1423, 1006), new Point(0, 0), 0, "Laser security system active|Watch out for red laser beams", "SA3Sign", false);
CreateUnit("PickupSave", 1, new Point(1551, 815), new Point(0, 0), 0, "", "SA3PickupSave", false);
CreateUnit("LiftGoingDown", 1, new Point(1326, 1413), new Point(0, 0), 0, "", "MALiftGoingDown", true);
CreateUnit("LiftGoingUp", 1, new Point(1294, 1253), new Point(0, 0), 0, "", "MALiftGoingUp", true);
CreateUnit("StationaryLaserEmitter", 1, new Point(1534, 1406), new Point(0, 0), 340, "", "MAStationaryLaserEmitter", true);
CreateUnit("StationaryLaserEmitter", 1, new Point(1597, 1407), new Point(0, 0), 160, "", "MAStationaryLaserEmitter", true);
CreateUnit("PickupDataDisc", 1, new Point(1294, 1485), new Point(0, 0), 0, "", "MAPickupDataDisc", false);
CreateUnit("Lever", 0, new Point(1214, 1488), new Point(0, 0), 0, "MASingleSpawner|MAStationaryLaserEmitter", "MALever", true);
CreateUnit("SingleSpawner", 1, new Point(1310, 1486), new Point(0, 0), 0, "Swarmer", "MASingleSpawner", false);
CreateUnit("Lamp", 1, new Point(1422, 1312), new Point(0, 0), 0, "", "MALamp", true);
CreateUnit("Sign", 0, new Point(1422, 1421), new Point(0, 0), 0, "Local backups of security systems and access logs will be kept on discs stored in the complex", "MASign", false);
CreateUnit("Panel3", 1, new Point(1164, 1259), new Point(0, 0), 0, "", "MAPanel3", true);
CreateUnit("LiftGoingLeftNoPause", 1, new Point(1390, 1732), new Point(0, 0), 0, "", "SCLiftGoingLeftNoPause", true);
CreateUnit("StationaryLaserEmitter", 2, new Point(1464, 1758), new Point(0, 0), 70, "", "SCStationaryLaserEmitter", true);
CreateUnit("StationaryLaserEmitter", 2, new Point(1446, 1758), new Point(0, 0), 110, "", "SCStationaryLaserEmitter", true);
CreateUnit("PickupSave", 1, new Point(1390, 1612), new Point(0, 0), 0, "", "SCPickupSave", false);
CreateUnit("PickupDataDisc", 1, new Point(1262, 1677), new Point(0, 0), 0, "", "SCPickupDataDisc", false);
CreateUnit("Fan", 1, new Point(1326, 1612), new Point(0, 0), 0, "", "SCFan", true);
CreateUnit("Fan", 1, new Point(1294, 1612), new Point(0, 0), 0, "", "SCFan", true);
CreateUnit("Drone", 2, new Point(1422, 1877), new Point(0, 0), 0, "", "SCDrone", true);
CreateUnit("Lever", 0, new Point(1535, 1870), new Point(0, 0), 0, "SCStationaryLaserEmitter", "SCLever", true);
CreateUnit("UnstableConcrete", 1, new Point(1486, 1708), new Point(0, 0), 0, "", "SCUnstableConcrete", true);
CreateUnit("UnstableConcrete", 2, new Point(1614, 1868), new Point(0, 0), 0, "", "SCUnstableConcrete", true);
CreateUnit("ReSpawner", 2, new Point(1197, 1765), new Point(0, 0), 0, "Drone", "SCReSpawner", true);
CreateUnit("Teleporter", 2, new Point(1582, 1870), new Point(0, 0), 0, "", "SCTeleporter", true);
CreateUnit("Teleporter", 2, new Point(1166, 1613), new Point(0, 0), 0, "SCTeleporter", "SCTeleporter2", true);
CreateUnit("TrapDoor", 1, new Point(1198, 1634), new Point(0, 0), 0, "", "SCTrapDoor", false);
CreateUnit("Lamp", 1, new Point(1310, 1661), new Point(0, 0), 0, "", "SCLamp", true);
CreateUnit("Sign", 0, new Point(1166, 1677), new Point(0, 0), 0, "Keycard required to enter teleporter room", "SCSign", false);
CreateUnit("Panel5", 1, new Point(1197, 1674), new Point(0, 0), 0, "", "SCPanel5", false);
CreateUnit("Tank", 1, new Point(2111, 1798), new Point(0, 0), 0, "", "UA1Tank", true);
CreateUnit("Tank", 1, new Point(1875, 1796), new Point(0, 0), 0, "", "UA1Tank", true);
CreateUnit("Fan", 0, new Point(1869, 1612), new Point(0, 0), 0, "", "UA1Fan", true);
CreateUnit("Fan", 0, new Point(2125, 1612), new Point(0, 0), 0, "", "UA1Fan", true);
CreateUnit("UnstableConcrete", 1, new Point(1869, 1708), new Point(0, 0), 0, "", "UA1UnstableConcrete", true);
CreateUnit("UnstableConcrete", 1, new Point(1997, 1708), new Point(0, 0), 0, "", "UA1UnstableConcrete", true);
CreateUnit("UnstableConcrete", 1, new Point(2125, 1708), new Point(0, 0), 0, "", "UA1UnstableConcrete", true);
CreateUnit("Lamp", 1, new Point(1917, 1599), new Point(0, 0), 0, "", "UA1Lamp", true);
CreateUnit("Lamp", 1, new Point(2045, 1598), new Point(0, 0), 0, "", "UA1Lamp", true);
CreateUnit("Panel2", 1, new Point(1836, 1803), new Point(0, 0), 0, "", "UA1Panel2", true);
CreateUnit("PickupSave", 1, new Point(2413, 1708), new Point(0, 0), 0, "", "UA3PickupSave", false);
CreateUnit("StationaryLaserEmitter", 1, new Point(2365, 1767), new Point(0, 0), 0, "", "UA2StationaryLaserEmitter", true);
CreateUnit("PickupRepair", 1, new Point(2444, 1805), new Point(0, 0), 0, "", "UA2PickupRepair", false);
CreateUnit("PickupDataDisc", 1, new Point(2380, 1804), new Point(0, 0), 0, "", "UA2PickupDataDisc", false);
CreateUnit("Lever", 0, new Point(2556, 1806), new Point(0, 0), 0, "UA2SingleSpawner|UA2StationaryLaserEmitter|UA2Spotlight", "UA2Lever", true);
CreateUnit("Box", 1, new Point(2555, 1710), new Point(0, 0), 0, "", "UA2Box", true);
CreateUnit("SingleSpawner", 1, new Point(2604, 1709), new Point(0, 0), 0, "Spinner", "UA2SingleSpawner", false);
CreateUnit("SingleSpawner", 1, new Point(2508, 1709), new Point(0, 0), 0, "Spinner", "UA2SingleSpawner", false);
CreateUnit("Spotlight", 1, new Point(2412, 1750), new Point(0, 0), 0, "", "UA2Spotlight", false);
CreateUnit("Music", 0, new Point(3131, 1757), new Point(0, 0), 0, "Dark side", "Music", true);
CreateUnit("StationaryTriggerBeam", 1, new Point(3131, 1757), new Point(0, 0), 90, "UA3Trigger2|UA3Trigger1", "UA3Trigger1", true);
CreateUnit("StationaryTriggerBeam", 1, new Point(2939, 1759), new Point(0, 0), 90, "UA3Trigger3|UA3Trigger2", "UA3Trigger2", false);
CreateUnit("StationaryTriggerBeam", 1, new Point(3035, 1759), new Point(0, 0), 90, "UA3ReSpawner|UA3Trigger3", "UA3Trigger3", false);
CreateUnit("ReSpawner", 1, new Point(3211, 1765), new Point(0, 0), 0, "Spinner", "UA3ReSpawner", true);
CreateUnit("Spotlight", 1, new Point(2841, 1690), new Point(0, 0), 30, "", "UA3Spotlight", true);
CreateUnit("Panel1", 1, new Point(3242, 1771), new Point(0, 0), 0, "", "UA3Panel1", true);
CreateUnit("Sign", 0, new Point(3338, 1804), new Point(0, 0), 0, "- - - Airlock - - -", "HASign", false);
CreateUnit("PickupRepair", 1, new Point(3658, 1804), new Point(0, 0), 0, "", "HAPickupRepair", false);
CreateUnit("Lever", 0, new Point(3370, 1710), new Point(0, 0), 0, "HALever2|HATrapDoor1|HASingleSpawner", "HALever1", true);
CreateUnit("Lever", 0, new Point(3690, 1711), new Point(0, 0), 0, "HATrapDoor2|HALever2", "HALever2", false);
CreateUnit("SingleSpawner", 1, new Point(3658, 1676), new Point(0, 0), 0, "Cyborg", "HASingleSpawner", false);
CreateUnit("TrapDoor", 2, new Point(3658, 1730), new Point(0, 0), 0, "", "HATrapDoor2", false);
CreateUnit("TrapDoor", 2, new Point(3402, 1730), new Point(0, 0), 0, "", "HATrapDoor1", true);
CreateUnit("Spotlight", 1, new Point(3383, 1625), new Point(0, 0), 300, "", "HASpotlight", true);
CreateUnit("Panel3", 1, new Point(3497, 1803), new Point(0, 0), 0, "", "HAPanel3", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(3485, 1817), new Point(0, 0), 0, "HALiftGoingDown|HAInvisibleTriggerBeam", "HAInvisibleTriggerBeam", true);
CreateUnit("LiftGoingDown", 1, new Point(3530, 1828), new Point(0, 0), 0, "HALiftGoingDown|L2Spotlight|L2RotatingLaserEmitter", "HALiftGoingDown", false);
CreateUnit("InvisibleTriggerBeam", 1, new Point(3517, 1979), new Point(0, 0), 0, "L1Spotlight1|L1InvisibleTriggerBeam1", "L1InvisibleTriggerBeam1", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(3517, 2203), new Point(0, 0), 0, "L1Spotlight2|L1InvisibleTriggerBeam2", "L1InvisibleTriggerBeam2", true);
CreateUnit("Spotlight", 0, new Point(3381, 2042), new Point(0, 0), 290, "", "L1Spotlight1", false);
CreateUnit("Spotlight", 0, new Point(3679, 2039), new Point(0, 0), 70, "", "L1Spotlight1", false);
CreateUnit("Spotlight", 0, new Point(3384, 2263), new Point(0, 0), 290, "", "L1Spotlight2", false);
CreateUnit("Spotlight", 0, new Point(3674, 2261), new Point(0, 0), 70, "", "L1Spotlight2", false);
CreateUnit("PickupSave", 1, new Point(3466, 2506), new Point(0, 0), 0, "", "L2PickupSave", false);
CreateUnit("LiftGoingDown", 1, new Point(3530, 2594), new Point(0, 0), 0, "L2LiftGoingDown|HBSpotlight|HBReSpawner", "L2LiftGoingDown", false);
CreateUnit("RotatingLaserEmitter", 1, new Point(3690, 2473), new Point(0, 0), 0, "", "L2RotatingLaserEmitter", false);
CreateUnit("RotatingLaserEmitter", 1, new Point(3690, 2473), new Point(0, 0), 180, "", "L2RotatingLaserEmitter", false);
CreateUnit("InvisibleTriggerBeam", 1, new Point(3518, 2576), new Point(0, 0), 10, "L2InvisibleTriggerBeam|L2LiftGoingDown", "L2InvisibleTriggerBeam", true);
CreateUnit("PickupDataDisc", 1, new Point(3626, 2410), new Point(0, 0), 0, "", "L2PickupDataDisc", false);
CreateUnit("Fan", 0, new Point(3659, 2410), new Point(0, 0), 0, "", "L2Fan", true);
CreateUnit("Fan", 0, new Point(3594, 2410), new Point(0, 0), 0, "", "L2Fan", true);
CreateUnit("Drone", 2, new Point(3599, 2580), new Point(0, 0), 0, "", "L2Drone", true);
CreateUnit("Spotlight", 1, new Point(3450, 2459), new Point(0, 0), 280, "", "L2Spotlight", false);
CreateUnit("Spotlight", 1, new Point(3672, 2586), new Point(0, 0), 100, "", "L2Spotlight", false);
CreateUnit("Panel5", 1, new Point(3624, 2440), new Point(0, 0), 0, "", "L2Panel5", false);
CreateUnit("StationaryLaserEmitter", 3, new Point(3626, 2779), new Point(0, 0), 90, "", "HBStationaryLaserEmitter", false);
CreateUnit("Lever", 3, new Point(3594, 2891), new Point(0, 0), 0, "HBLever1|HBLever2|HBStationaryLaserEmitter", "HBLever1", true);
CreateUnit("Lever", 1, new Point(3402, 2795), new Point(0, 0), 0, "HBStationaryLaserEmitter|HBLever2", "HBLever2", false);
CreateUnit("Crate", 1, new Point(3626, 2857), new Point(0, 0), 0, "", "HBCrate", false);
CreateUnit("Crate", 1, new Point(3620, 0x0B0B), new Point(0, 0), 0, "", "HBCrate", true);
CreateUnit("ReSpawner", 1, new Point(3594, 2786), new Point(0, 0), 0, "Drone", "HBReSpawner", false);
CreateUnit("Spotlight", 1, new Point(3449, 2904), new Point(0, 0), 250, "", "HBSpotlight", false);
CreateUnit("Spotlight", 1, new Point(3552, 2774), new Point(0, 0), 80, "", "HBSpotlight", false);
CreateUnit("Panel4", 1, new Point(3720, 2792), new Point(0, 0), 0, "", "HBPanel4", false);
CreateUnit("InvisibleTriggerBeam", 1, new Point(3292, 3209), new Point(0, 0), 0, "C1SingleSpawner|C1InvisibleTriggerBeam", "C1InvisibleTriggerBeam", true);
CreateUnit("Crawler", 1, new Point(3547, 3305), new Point(0, 0), 0, "", "C1Crawler", true);
CreateUnit("Rock", 1, new Point(3400, 3373), new Point(0, 0), 0, "", "C1Rock", true);
CreateUnit("UnstableCave", 1, new Point(3658, 3209), new Point(0, 0), 0, "", "C1UnstableCave", true);
CreateUnit("UnstableCave", 1, new Point(3626, 3304), new Point(0, 0), 0, "", "C1UnstableCave", true);
CreateUnit("Spikes", 1, new Point(3754, 3375), new Point(0, 0), 0, "", "C1Spikes", true);
CreateUnit("Spikes", 1, new Point(3722, 3375), new Point(0, 0), 0, "", "C1Spikes", true);
CreateUnit("Spikes", 1, new Point(3658, 3311), new Point(0, 0), 0, "", "C1Spikes", true);
CreateUnit("SingleSpawner", 1, new Point(3306, 3106), new Point(0, 0), 0, "Spinner", "C1SingleSpawner", false);
CreateUnit("Spotlight", 1, new Point(3289, 3263), new Point(0, 0), 200, "", "C1Spotlight", true);
CreateUnit("Spotlight", 1, new Point(3480, 3161), new Point(0, 0), 240, "", "C1Spotlight", true);
CreateUnit("Spotlight", 1, new Point(3514, 3351), new Point(0, 0), 320, "", "C1Spotlight", true);
CreateUnit("Spotlight", 1, new Point(3771, 3097), new Point(0, 0), 50, "", "C1Spotlight", true);
CreateUnit("PickupDataDisc", 1, new Point(3497, 3623), new Point(0, 0), 0, "", "C1PickupDataDisc", false);
CreateUnit("PickupSave", 1, new Point(3722, 3656), new Point(0, 0), 0, "", "C2PickupSave", false);
CreateUnit("UnstableCave", 1, new Point(3434, 3559), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("UnstableCave", 1, new Point(3402, 3623), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("UnstableCave", 1, new Point(3466, 3719), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("UnstableCave", 1, new Point(3562, 3687), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("UnstableCave", 1, new Point(3594, 3623), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("UnstableCave", 1, new Point(3562, 3559), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("UnstableCave", 1, new Point(3626, 3495), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("UnstableCave", 1, new Point(3498, 3527), new Point(0, 0), 0, "", "C2UnstableCave", false);
CreateUnit("Spikes", 1, new Point(3370, 3694), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3402, 3758), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3434, 3790), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3466, 3790), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3498, 3790), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3530, 3790), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3562, 3790), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3594, 3758), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3658, 3630), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Spikes", 1, new Point(3626, 3694), new Point(0, 0), 0, "", "C2Spikes", false);
CreateUnit("Lever", 1, new Point(3977, 2859), new Point(0, 0), 0, "HDLever1|HDLever2|HDLever3|HDLever4|HDTrapDoor1|HDTrapDoor3", "HDLever1", true);
CreateUnit("Lever", 1, new Point(4009, 2891), new Point(0, 0), 0, "HDLever1|HDLever2|HDLever3|HDLever4|HDTrapDoor4|HDTrapDoor3", "HDLever2", false);
CreateUnit("Lever", 1, new Point(4137, 2891), new Point(0, 0), 0, "HDLever1|HDLever2|HDLever3|HDLever4|HDTrapDoor2|HDTrapDoor4", "HDLever3", true);
CreateUnit("Lever", 1, new Point(4169, 2859), new Point(0, 0), 0, "HDLever1|HDLever2|HDLever3|HDLever4|HDTrapDoor1|HDTrapDoor2", "HDLever4", false);
CreateUnit("TrapDoor", 1, new Point(4073, 2815), new Point(0, 0), 0, "", "HDTrapDoor1", false);
CreateUnit("TrapDoor", 1, new Point(4073, 2828), new Point(0, 0), 0, "", "HDTrapDoor2", false);
CreateUnit("TrapDoor", 1, new Point(4073, 2841), new Point(0, 0), 0, "", "HDTrapDoor3", false);
CreateUnit("TrapDoor", 1, new Point(4074, 2854), new Point(0, 0), 0, "", "HDTrapDoor4", false);
CreateUnit("Panel2", 1, new Point(4071, 2792), new Point(0, 0), 0, "", "HDPanel2", false);
CreateUnit("Panel3", 1, new Point(4135, 2792), new Point(0, 0), 0, "", "HDPanel3", false);
CreateUnit("Sign", 0, new Point(4010, 3240), new Point(0, 0), 0, "- - - WARNING - - -|The cave ahead is very unstable", "HDSign", false);
CreateUnit("PickupSave", 1, new Point(4042, 3176), new Point(0, 0), 0, "", "MS1PickupSave", false);
CreateUnit("PickupRepair", 1, new Point(4105, 3079), new Point(0, 0), 0, "", "MS1PickupRepair", false);
CreateUnit("LiftGoingLeft", 1, new Point(4105, 3145), new Point(0, 0), 0, "", "MS1LiftGoingLeft", true);
CreateUnit("LiftGoingRight", 1, new Point(4041, 3305), new Point(0, 0), 0, "", "MS1LiftGoingRight", true);
CreateUnit("PlasmaWall", 1, new Point(4026, 3336), new Point(0, 0), 0, "", "MS1PlasmaWall", true);
CreateUnit("PlasmaWall", 1, new Point(4026, 3369), new Point(0, 0), 0, "", "MS1PlasmaWall", true);
CreateUnit("PickupDataDisc", 1, new Point(4105, 3272), new Point(0, 0), 0, "", "MS1PickupDataDisc", false);
CreateUnit("UnstableCave", 1, new Point(3913, 3272), new Point(0, 0), 0, "", "MS1UnstableCave", false);
CreateUnit("Rock", 1, new Point(3880, 3692), new Point(0, 0), 0, "", "MS2Rock", false);
CreateUnit("Rock", 1, new Point(3885, 3670), new Point(0, 0), 0, "", "MS2Rock", false);
CreateUnit("LiftGoingDown", 1, new Point(4073, 3647), new Point(0, 0), 0, "MS2LiftGoingDown", "MS2LiftGoingDown", false);
CreateUnit("PlasmaWall", 1, new Point(4025, 3495), new Point(0, 0), 0, "", "MS2PlasmaWall", true);
CreateUnit("PlasmaWall", 1, new Point(4025, 3528), new Point(0, 0), 0, "", "MS2PlasmaWall", true);
CreateUnit("Lever", 1, new Point(4041, 3625), new Point(0, 0), 0, "MS2LiftGoingDown|MS2Spotlight", "MS2Lever", true);
CreateUnit("Spikes", 1, new Point(3881, 3502), new Point(0, 0), 0, "", "MS2Spikes", false);
CreateUnit("Spikes", 1, new Point(3913, 3534), new Point(0, 0), 0, "", "MS2Spikes", false);
CreateUnit("Lamp", 1, new Point(3896, 3577), new Point(0, 0), 0, "", "MS2Lamp", true);
CreateUnit("Spotlight", 1, new Point(4121, 3740), new Point(0, 0), 160, "", "MS2Spotlight", false);
CreateUnit("Spotlight", 1, new Point(4028, 3739), new Point(0, 0), 200, "", "MS2Spotlight", false);
CreateUnit("Sign", 0, new Point(4009, 3909), new Point(0, 0), 0, "- - - Under construction - - -", "F1Sign", false);
CreateUnit("PickupRepair", 1, new Point(4170, 4038), new Point(0, 0), 0, "", "F1PickupRepair", false);
CreateUnit("LiftGoingUpNoPause", 1, new Point(3946, 4043), new Point(0, 0), 0, "", "F1LiftGoingUpNoPause", true);
CreateUnit("LiftGoingUpNoPause", 1, new Point(4233, 4126), new Point(0, 0), 0, "", "F1LiftGoingUpNoPause", true);
CreateUnit("LiftGoingLeftNoPause", 1, new Point(4105, 4126), new Point(0, 0), 0, "", "F1LiftGoingLeftNoPause", true);
CreateUnit("StationaryLaserEmitter", 2, new Point(4041, 4197), new Point(0, 0), 270, "", "F1StationaryLaserEmitter", true);
CreateUnit("StationaryLaserEmitter", 2, new Point(4106, 4197), new Point(0, 0), 270, "", "F1StationaryLaserEmitter", true);
CreateUnit("PickupDataDisc", 1, new Point(3977, 3974), new Point(0, 0), 0, "", "F1PickupDataDisc", false);
CreateUnit("Lamp", 1, new Point(4266, 3896), new Point(0, 0), 0, "", "F1Lamp", true);
CreateUnit("Lamp", 1, new Point(3882, 3895), new Point(0, 0), 0, "", "F1Lamp", true);
CreateUnit("Sign", 0, new Point(4424, 3974), new Point(0, 0), 0, "Now available: The new and imroved drone Mark II, comes with a inbuilt invisibility shell", "F2Sign", false);
CreateUnit("StationaryLaserEmitter", 1, new Point(4534, 4135), new Point(0, 0), 180, "", "F2StationaryLaserEmitter", true);
CreateUnit("RotatingLaserEmitter", 1, new Point(4585, 3910), new Point(0, 0), 0, "", "F2RotatingLaserEmitter", true);
CreateUnit("InvisibleDrone", 1, new Point(4696, 4176), new Point(0, 0), 0, "", "F2InvisibleDrone", true);
CreateUnit("Column", 1, new Point(4585, 3943), new Point(0, 0), 0, "", "F2Column", true);
CreateUnit("Column", 1, new Point(4585, 3877), new Point(0, 0), 0, "", "F2Column", true);
CreateUnit("Column", 1, new Point(4585, 3910), new Point(0, 0), 0, "", "F2Column", true);
CreateUnit("Teleporter", 0, new Point(4616, 4103), new Point(0, 0), 0, "F2Teleporter2", "F2Teleporter1", true);
CreateUnit("Teleporter", 0, new Point(4519, 4039), new Point(0, 0), 0, "", "F2Teleporter2", true);
CreateUnit("Teleporter", 0, new Point(4680, 4071), new Point(0, 0), 0, "F2Teleporter4", "F2Teleporter3", true);
CreateUnit("Teleporter", 0, new Point(4808, 4007), new Point(0, 0), 0, "", "F2Teleporter4", true);
CreateUnit("Generator", 1, new Point(4840, 4002), new Point(0, 0), 0, "F2Chute|F2TrapDoor", "F2Generator", true);
CreateUnit("TrapDoor", 1, new Point(4392, 4092), new Point(0, 0), 0, "", "F2TrapDoor", false);
CreateUnit("Chute", 1, new Point(4766, 3974), new Point(0, 0), 0, "", "F2Chute", false);
CreateUnit("Lamp", 1, new Point(4425, 3896), new Point(0, 0), 0, "", "F2Lamp", true);
CreateUnit("Lamp", 1, new Point(4825, 3928), new Point(0, 0), 0, "", "F2Lamp", true);
CreateUnit("Panel3", 1, new Point(4488, 3941), new Point(0, 0), 0, "", "F2Panel3", false);
CreateUnit("SingleSpawner", 1, new Point(4778, 4517), new Point(0, 0), 0, "Cyborg", "MadComSpawners", false);
CreateUnit("Sign", 0, new Point(4681, 4261), new Point(0, 0), 0, "- - -Remote tank activation lever - - -", "MC2Sign", false);
CreateUnit("PickupSave", 1, new Point(4456, 4261), new Point(0, 0), 0, "", "MC2PickupSave", false);
CreateUnit("LiftGoingLeftNoPause", 4, new Point(4424, 4413), new Point(0, 0), 0, "", "MC2LiftGoingLeftNoPause", true);
CreateUnit("Tank", 4, new Point(4791, 4542), new Point(0, 0), 0, "", "MC2Tank", false);
CreateUnit("PlasmaWall", 1, new Point(4857, 4469), new Point(0, 0), 90, "", "MC2PlasmaWallExit", true);
CreateUnit("PlasmaWall", 4, new Point(4376, 4469), new Point(0, 0), 90, "", "MC2PlasmaWall", false);
CreateUnit("StationaryTriggerBeam", 4, new Point(4347, 4562), new Point(0, 0), 0, "MC2Turret|MC2PlasmaWall|MC2Tank|MC2StationaryTriggerBeam|MC2RedSpotlight", "MC2StationaryTriggerBeam", true);
CreateUnit("Fan", 4, new Point(4424, 4421), new Point(0, 0), 0, "", "MC2Fan", true);
CreateUnit("Lever", 0, new Point(4680, 4295), new Point(0, 0), 0, "MC2Tank|MC2Lever", "MC2Lever", true);
CreateUnit("UnstableConcrete", 4, new Point(4584, 4357), new Point(0, 0), 0, "", "MC2UnstableConcrete", true);
CreateUnit("UnstableConcrete", 4, new Point(4584, 4389), new Point(0, 0), 0, "", "MC2UnstableConcrete", true);
CreateUnit("UnstableConcrete", 4, new Point(4680, 4357), new Point(0, 0), 0, "", "MC2UnstableConcrete", true);
CreateUnit("UnstableConcrete", 4, new Point(4680, 4389), new Point(0, 0), 0, "", "MC2UnstableConcrete", true);
CreateUnit("UnstableConcrete", 4, new Point(4488, 4357), new Point(0, 0), 0, "", "MC2UnstableConcrete", true);
CreateUnit("UnstableConcrete", 4, new Point(4488, 4389), new Point(0, 0), 0, "", "MC2UnstableConcrete", true);
CreateUnit("Turret", 4, new Point(4424, 4453), new Point(0, 0), 0, "", "MC2Turret", false);
CreateUnit("Turret", 4, new Point(4808, 4453), new Point(0, 0), 0, "", "MC2Turret", false);
CreateUnit("RedSpotlight", 4, new Point(4424, 4452), new Point(0, 0), 310, "", "MC2RedSpotlight", false);
CreateUnit("RedSpotlight", 4, new Point(4809, 4453), new Point(0, 0), 50, "", "MC2RedSpotlight", false);
CreateUnit("Panel2", 1, new Point(4743, 4292), new Point(0, 0), 0, "", "MC2Panel2", false);
CreateUnit("SingleSpawner", 1, new Point(3947, 4485), new Point(0, 0), 0, "Cyborg", "MadComSpawners", false);
CreateUnit("SingleSpawner", 1, new Point(4265, 4486), new Point(0, 0), 0, "Cyborg", "MadComSpawners", false);
CreateUnit("StationaryLaserEmitter", 5, new Point(4045, 4472), new Point(0, 0), 60, "", "MC1StationaryLaserEmitter", true);
CreateUnit("Fan", 1, new Point(3849, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(3881, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(3913, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(3945, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(3977, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4042, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4073, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4105, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4170, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4202, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4234, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4266, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Fan", 1, new Point(4298, 4293), new Point(0, 0), 0, "", "MC1Fan", true);
CreateUnit("Lever", 0, new Point(4250, 4551), new Point(0, 0), 0, "MC1StationaryLaserEmitter|MC2StationaryTriggerBeam", "MC1Lever", true);
CreateUnit("PickupDataDisc", 1, new Point(2987, 4261), new Point(0, 0), 0, "", "SOPickupDataDisc", false);
CreateUnit("Sign", 0, new Point(3211, 4421), new Point(0, 0), 0, "Computer core security override|Never use!", "SOSign", false);
CreateUnit("PickupRepair", 1, new Point(2924, 4261), new Point(0, 0), 0, "", "SOPickupRepair", false);
CreateUnit("LiftGoingLeft", 1, new Point(3018, 4381), new Point(0, 0), 0, "", "SOLiftGoingLeft", true);
CreateUnit("StationaryLaserEmitter", 1, new Point(2892, 4282), new Point(0, 0), 90, "", "SOStationaryLaserEmitter", false);
CreateUnit("InvisibleDrone", 1, new Point(3036, 4560), new Point(0, 0), 0, "", "SOInvisibleDrone", true);
CreateUnit("InvisibleDrone", 1, new Point(2779, 4558), new Point(0, 0), 0, "", "SOInvisibleDrone", true);
CreateUnit("Lever", 0, new Point(3178, 4423), new Point(0, 0), 0, "SOProxy2|SOSingleSpawner|CCAccess|SOStationaryLaserEmitter", "SOLever", true);
CreateUnit("Bouncer", 1, new Point(2955, 4358), new Point(0, 0), 0, "", "SOBouncer", true);
CreateUnit("Bouncer", 1, new Point(2795, 4452), new Point(0, 0), 0, "", "SOBouncer", true);
CreateUnit("Bouncer", 1, new Point(3210, 4391), new Point(0, 0), 0, "", "SOBouncer", true);
CreateUnit("SingleSpawner", 1, new Point(2795, 4542), new Point(0, 0), 0, "Cyborg", "SOSingleSpawner", false);
CreateUnit("Proxy", 1, new Point(2880, 4451), new Point(0, 0), 0, "", "SOProxy1", false);
CreateUnit("Proxy", 1, new Point(3155, 4453), new Point(0, 0), 0, "", "SOProxy2", false);
CreateUnit("Lamp", 1, new Point(3083, 4406), new Point(0, 0), 0, "", "SOLamp", true);
CreateUnit("Panel4", 1, new Point(3210, 4357), new Point(0, 0), 0, "", "SOPanel4", true);
CreateUnit("Sign", 0, new Point(3658, 4549), new Point(0, 0), 0, "- - - Computer core - - -|Lockdown in effect", "SOSign", false);
CreateUnit("PickupSave", 1, new Point(3658, 4485), new Point(0, 0), 0, "", "CC1PickupSave", false);
CreateUnit("StationaryLaserEmitter", 1, new Point(3356, 4324), new Point(0, 0), 0, "", "CCAccess", true);
CreateUnit("StationaryLaserEmitter", 1, new Point(3703, 4421), new Point(0, 0), 180, "", "CCAccess", true);
CreateUnit("Cyborg", 1, new Point(3369, 4488), new Point(0, 0), 0, "", "CC1Cyborg", true);
CreateUnit("SingleSpawner", 1, new Point(3627, 4358), new Point(0, 0), 0, "Cyborg", "CCAccess", false);
CreateUnit("SingleSpawner", 1, new Point(3748, 4501), new Point(0, 0), 0, "Signtry", "CountdownSpawner", false);
CreateUnit("RedSpotlight", 1, new Point(3704, 4465), new Point(0, 0), 50, "", "CCAccess", true);
CreateUnit("RedSpotlight", 1, new Point(3353, 4466), new Point(0, 0), 320, "", "CCAccess", true);
CreateUnit("Sign", 0, new Point(3338, 3942), new Point(0, 0), 0, "Chrono manipulatrix device V0.8|(Slow time: C)", "CC2Sign", false);
CreateUnit("PickupChronoManipulator", 1, new Point(3306, 3942), new Point(0, 0), 0, "", "CC2PickupChronoManipulator", false);
CreateUnit("LiftGoingLeft", 1, new Point(3530, 4158), new Point(0, 0), 0, "", "CC2LiftGoingLeft", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(3293, 4067), new Point(0, 0), 0, "CC2TrapDoor|CC2Spotlight|CC2InvisibleTriggerBeam|CC2MadCom", "CC2InvisibleTriggerBeam", true);
CreateUnit("SingleSpawner", 1, new Point(3532, 3955), new Point(0, 0), 0, "Countdown", "CountdownSpawner", false);
CreateUnit("MadCom", 1, new Point(3532, 3955), new Point(0, 0), 0, "CC2TrapDoor|CountdownSpawner|MC2PlasmaWallExit|MadComSpawners", "CC2MadCom", false);
CreateUnit("TrapDoor", 2, new Point(3530, 4092), new Point(0, 0), 0, "", "CC2TrapDoor", true);
CreateUnit("TrapDoor", 2, new Point(3306, 4028), new Point(0, 0), 0, "CC2TrapDoor|CC2TrapDoor|CC2TrapDoor", "CC2TrapDoor", false);
CreateUnit("Spotlight", 1, new Point(3447, 3923), new Point(0, 0), 330, "", "CC2Spotlight", false);
CreateUnit("Spotlight", 1, new Point(3610, 3922), new Point(0, 0), 30, "", "CC2Spotlight", false);
CreateUnit("Sign", 1, new Point(5128, 4491), new Point(0, 0), 0, "Keycard required to enter control room", "TASign", false);
CreateUnit("Sign", 0, new Point(5031, 4550), new Point(0, 0), 0, "- - - Tower access - - -|In case of elevator jam, call tech support", "TASign", false);
CreateUnit("PickupSave", 1, new Point(5192, 4486), new Point(0, 0), 0, "", "TAPickupSave", false);
CreateUnit("PickupRepair", 1, new Point(5320, 4486), new Point(0, 0), 0, "", "TAPickupRepair", false);
CreateUnit("LiftGoingDown", 1, new Point(5254, 4429), new Point(0, 0), 0, "", "TALiftGoingDown", false);
CreateUnit("PickupDataDisc", 1, new Point(5160, 4390), new Point(0, 0), 0, "", "TAPickupDataDisc", false);
CreateUnit("Lever", 1, new Point(5095, 4455), new Point(0, 0), 0, "TALiftGoingDown|TASpotlight|TARedSpotlight", "TALever", true);
CreateUnit("TrapDoor", 1, new Point(5127, 4475), new Point(0, 0), 0, "", "TATrapDoor", false);
CreateUnit("Spotlight", 0, new Point(5256, 4573), new Point(0, 0), 180, "", "TASpotlight", false);
CreateUnit("RedSpotlight", 0, new Point(5256, 4573), new Point(0, 0), 180, "", "TARedSpotlight", true);
CreateUnit("Panel5", 1, new Point(5126, 4453), new Point(0, 0), 0, "", "TAPanel5", false);
CreateUnit("LiftGoingUpNoPause", 2, new Point(5894, 4525), new Point(0, 0), 0, "", "STLiftGoingUpNoPause", true);
CreateUnit("PickupKeycard", 1, new Point(5542, 4261), new Point(0, 0), 0, "TATrapDoor", "STPickupKeycard", false);
CreateUnit("PickupDataDisc", 1, new Point(5735, 4326), new Point(0, 0), 0, "", "STPickupDataDisc", false);
CreateUnit("Crawler", 1, new Point(5848, 4550), new Point(0, 0), 0, "", "STCrawler", true);
CreateUnit("Crawler", 1, new Point(5671, 4394), new Point(0, 0), 0, "", "STCrawler", true);
CreateUnit("UnstableWall", 2, new Point(5830, 4261), new Point(0, 0), 0, "", "STUnstableWall", true);
CreateUnit("UnstableWall", 2, new Point(5862, 4389), new Point(0, 0), 0, "", "STUnstableWall", true);
CreateUnit("UnstableWall", 2, new Point(5542, 4389), new Point(0, 0), 0, "", "STUnstableWall", true);
CreateUnit("UnstableWall", 2, new Point(5926, 4517), new Point(0, 0), 0, "", "STUnstableWall", true);
CreateUnit("Teleporter", 1, new Point(5510, 4262), new Point(0, 0), 0, "STTeleporter2", "STTeleporter", true);
CreateUnit("Teleporter", 1, new Point(5510, 4326), new Point(0, 0), 0, "", "STTeleporter2", true);
CreateUnit("Music", 0, new Point(5241, 4149), new Point(0, 0), 0, "Get Pumped", "Music", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(5241, 4149), new Point(0, 0), 0, "TL1Spotlight1|TL1InvisibleTriggerBeam1", "TL1InvisibleTriggerBeam1", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(5241, 4085), new Point(0, 0), 0, "TL1Spotlight2|TL1InvisibleTriggerBeam2", "TL1InvisibleTriggerBeam2", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(5241, 4021), new Point(0, 0), 0, "TL1Spotlight3|TL1InvisibleTriggerBeam3", "TL1InvisibleTriggerBeam3", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(5242, 3957), new Point(0, 0), 0, "TL1Spotlight4|TL1InvisibleTriggerBeam4", "TL1InvisibleTriggerBeam4", true);
CreateUnit("InvisibleTriggerBeam", 1, new Point(5241, 3894), new Point(0, 0), 0, "TL1Spotlight5|TL1InvisibleTriggerBeam5", "TL1InvisibleTriggerBeam5", true);
CreateUnit("Spotlight", 0, new Point(5289, 4155), new Point(0, 0), 160, "", "TL1Spotlight1", false);
CreateUnit("Spotlight", 0, new Point(5287, 4091), new Point(0, 0), 160, "", "TL1Spotlight2", false);
CreateUnit("Spotlight", 0, new Point(5288, 4031), new Point(0, 0), 160, "", "TL1Spotlight3", false);
CreateUnit("Spotlight", 0, new Point(5289, 3964), new Point(0, 0), 160, "", "TL1Spotlight4", false);
CreateUnit("Spotlight", 0, new Point(5288, 3902), new Point(0, 0), 160, "", "TL1Spotlight5", false);
CreateUnit("PickupSave", 1, new Point(5320, 3656), new Point(0, 0), 0, "", "CP1PickupSave", false);
CreateUnit("LiftGoingUp", 1, new Point(5255, 3583), new Point(0, 0), 0, "", "CP1LiftGoingUp", false);
CreateUnit("InvisibleTriggerBeam", 1, new Point(5240, 3546), new Point(0, 0), 90, "CP1LiftGoingUp|CP1InvisibleTriggerBeam", "CP1InvisibleTriggerBeam", true);
CreateUnit("PickupDataDisc", 1, new Point(5095, 3784), new Point(0, 0), 0, "", "CP1PickupDataDisc", false);
CreateUnit("Fan", 0, new Point(4999, 3559), new Point(0, 0), 0, "", "CP1Fan", false);
CreateUnit("Fan", 0, new Point(4967, 3559), new Point(0, 0), 0, "", "CP1Fan", false);
CreateUnit("Drone", 1, new Point(5155, 3793), new Point(0, 0), 0, "", "CP1Drone", true);
CreateUnit("Drone", 1, new Point(4966, 3665), new Point(0, 0), 0, "", "CP1Drone", true);
CreateUnit("Lever", 0, new Point(4935, 3657), new Point(0, 0), 0, "CP1Turret|CP1Lamp", "CP1Lever", true);
CreateUnit("UnstableCave", 1, new Point(5063, 3655), new Point(0, 0), 0, "", "CP1UnstableCave", true);
CreateUnit("UnstableCave", 1, new Point(5063, 3687), new Point(0, 0), 0, "", "CP1UnstableCave", true);
CreateUnit("UnstableCave", 1, new Point(5063, 3719), new Point(0, 0), 0, "", "CP1UnstableCave", true);
CreateUnit("UnstableCave", 1, new Point(5095, 3719), new Point(0, 0), 0, "", "CP1UnstableCave", true);
CreateUnit("Turret", 1, new Point(5320, 3559), new Point(0, 0), 0, "", "CP1Turret", true);
CreateUnit("Lamp", 1, new Point(5144, 3544), new Point(0, 0), 0, "", "CP1Lamp", true);
CreateUnit("Lamp", 1, new Point(4968, 3545), new Point(0, 0), 0, "", "CP1Lamp", true);
CreateUnit("Panel1", 1, new Point(4966, 3654), new Point(0, 0), 0, "", "CP1Panel1", true);
CreateUnit("Panel4", 1, new Point(5062, 3591), new Point(0, 0), 0, "", "CP1Panel4", true);
CreateUnit("StationaryTriggerBeam", 1, new Point(5230, 2876), new Point(0, 0), 90, "CP2Spinner|CP2Lever1|CP2Lever2", "CP2Lever1", true);
CreateUnit("Lever", 1, new Point(5288, 2795), new Point(0, 0), 0, "CP2Spinner|CP2LiftGoingUp|CP2Lever2", "CP2Lever2", false);
CreateUnit("LiftGoingUp", 1, new Point(5255, 2817), new Point(0, 0), 0, "", "CP2LiftGoingUp", false);
CreateUnit("RotatingTriggerBeam", 1, new Point(5078, 2825), new Point(0, 0), 0, "CP2Lever1|CP2Lever2|CP2Spinner", "CP2Spinner", false);
CreateUnit("RotatingTriggerBeam", 1, new Point(5078, 2825), new Point(0, 0), 90, "CP2Lever1|CP2Lever2|CP2Spinner", "CP2Spinner", false);
CreateUnit("RotatingTriggerBeam", 1, new Point(5078, 2826), new Point(0, 0), 180, "CP2Lever1|CP2Lever2|CP2Spinner", "CP2Spinner", false);
CreateUnit("Fan", 1, new Point(5319, 2793), new Point(0, 0), 0, "", "CP2Fan", true);
CreateUnit("Fan", 1, new Point(5319, 2890), new Point(0, 0), 0, "", "CP2Fan", true);
CreateUnit("Lamp", 1, new Point(5161, 2780), new Point(0, 0), 0, "", "CP2Lamp", true);
CreateUnit("Spotlight", 1, new Point(4984, 2764), new Point(0, 0), 30, "", "CP2Spotlight", true);
CreateUnit("Spotlight", 0, new Point(5177, 2365), new Point(0, 0), 70, "", "TL3Spotlight", true);
CreateUnit("Spotlight", 0, new Point(5178, 2362), new Point(0, 0), 120, "", "TL3Spotlight", true);
CreateUnit("Sign", 0, new Point(5288, 1357), new Point(0, 0), 0, "Welcome to the PowerNode Research Tower|The data terminal is located at the top", "T1Sign", false);
CreateUnit("PickupSave", 1, new Point(5224, 1229), new Point(0, 0), 0, "", "T1PickupSave", false);
CreateUnit("PickupRepair", 1, new Point(5288, 1229), new Point(0, 0), 0, "", "T1PickupRepair", false);
CreateUnit("LiftGoingUp", 3, new Point(5255, 1253), new Point(0, 0), 0, "", "T1Lift", false);
CreateUnit("Lever", 1, new Point(5319, 1231), new Point(0, 0), 0, "T1Lift", "T1Lever", true);
CreateUnit("Generator", 1, new Point(5127, 1354), new Point(0, 0), 0, "T1TrapDoor2", "T1Generator", true);
CreateUnit("Generator", 1, new Point(5382, 1354), new Point(0, 0), 0, "T1TrapDoor|", "T1Generator", true);
CreateUnit("TrapDoor", 1, new Point(5191, 1251), new Point(0, 0), 0, "", "T1TrapDoor", false);
CreateUnit("TrapDoor", 1, new Point(5191, 1263), new Point(0, 0), 0, "", "T1TrapDoor2", false);
CreateUnit("Panel2", 1, new Point(5318, 1324), new Point(0, 0), 0, "", "T1Panel2", false);
CreateUnit("Swarmer", 3, new Point(5172, 808), new Point(0, 0), 0, "", "T2Swarmer", true);
CreateUnit("Swarmer", 3, new Point(5381, 875), new Point(0, 0), 0, "", "T2Swarmer", true);
CreateUnit("PickupDataDisc", 1, new Point(5256, 463), new Point(0, 0), 0, "", "T3PickupDataDisc", false);
CreateUnit("LiftGoingLeftNoPause", 3, new Point(5191, 711), new Point(0, 0), 0, "", "T3LiftGoingLeftNoPause", true);
CreateUnit("LiftGoingLeftNoPause", 3, new Point(5127, 583), new Point(0, 0), 0, "", "T3LiftGoingLeftNoPause", true);
CreateUnit("LiftGoingLeftNoPause", 3, new Point(5351, 455), new Point(0, 0), 0, "", "T3LiftGoingLeftNoPause", true);
CreateUnit("LiftGoingRightNoPause", 3, new Point(5287, 647), new Point(0, 0), 0, "", "T3LiftGoingRightNoPause", true);
CreateUnit("LiftGoingRightNoPause", 3, new Point(5256, 519), new Point(0, 0), 0, "", "T3LiftGoingRightNoPause", true);
CreateUnit("StationaryLaserEmitter", 3, new Point(5127, 669), new Point(0, 0), 270, "", "T3StationaryLaserEmitter", true);
CreateUnit("StationaryLaserEmitter", 3, new Point(5382, 671), new Point(0, 0), 270, "", "T3StationaryLaserEmitter", true);
CreateUnit("EscapeLift", 1, new Point(4985, 329), new Point(0, 0), 0, "", "EscapeLift", false);
CreateUnit("InvisibleTriggerBeam", 3, new Point(5000, 289), new Point(0, 0), 90, "EscapeLift|DCInvisibleTriggerBeam|EscapeHatch", "DCInvisibleTriggerBeam", true);
CreateUnit("Chute", 3, new Point(5073, 304), new Point(0, 0), 0, "", "EscapeHatch", false);
CreateUnit("Chute", 3, new Point(5060, 304), new Point(0, 0), 0, "", "EscapeHatch", false);
CreateUnit("Chute", 3, new Point(5047, 304), new Point(0, 0), 0, "", "EscapeHatch", false);
CreateUnit("Chute", 3, new Point(5034, 304), new Point(0, 0), 0, "", "EscapeHatch", false);
CreateUnit("Panel2", 3, new Point(5095, 304), new Point(0, 0), 0, "", "DCPanel2", false);
CreateUnit("DataChecker", 3, new Point(5066, 97), new Point(0, 0), 0, "EscapeHatch|Countdown", "DCDataChecker", false);
CreateUnit("MadComEscapeLift", 3, new Point(4617, 425), new Point(0, 0), 0, "", "LPEscapeLift", false);
CreateUnit("MadComEscapeLift", 3, new Point(4438, 725), new Point(0, 0), 0, "", "RLEscapeLift", false);
CreateUnit("MadComEscapeLift", 3, new Point(4795, 725), new Point(0, 0), 0, "", "RLEscapeLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComLift", 3, new Point(4615, 574), new Point(0, 0), 0, "", "MadComLift", false);
CreateUnit("MadComReloaded", 2, new Point(4615, 574), new Point(0, 0), 0, "", "RLMadComReloaded", true);
SaveGame();
GameTimer = new Timer(30);
GameTimer.addEventListener(TimerEvent.TIMER, GameLoop);
GameTimer.start();
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, RotateUnit);
}
function frame3(){
Music = new Array();
i = 0;
while (i < 10) {
Music[i] = new Object();
Music[i].Name = "Empty";
i++;
};
Music[0].Name = "The Balance";
Music[0].Artist = "Mick Rippon";
Music[0].File = new Song1();
Music[1].Name = "Retro Winter";
Music[1].Artist = "Mick Rippon";
Music[1].File = new Song2();
Music[2].Name = "Dark side";
Music[2].Artist = "Monty (Original by Wally Beben)";
Music[2].File = new Song3();
Music[3].Name = "Adamant Erosion";
Music[3].Artist = "Bob the destroyer";
Music[3].File = new Song4();
Music[4].Name = "Get Pumped";
Music[4].Artist = "Calpomatt";
Music[4].File = new Song5();
Music[5].Name = "Afraid of Ruins";
Music[5].Artist = "Asim Khan";
Music[5].File = new Song6();
Music[6].Name = "Boss theme 1";
Music[6].Artist = "Miqal";
Music[6].File = new Song7();
Music[7].Name = "Boss theme 2";
Music[7].Artist = "Miqal";
Music[7].File = new Song8();
Music[8].Name = "Credits";
Music[8].File = new CreditsSong();
Music[9].Name = "Title";
Music[9].File = new TitleSong();
EffectChannels = new Array(24);
NextChannel = 0;
i = 0;
while (i < 24) {
EffectChannels[i] = new SoundChannel();
i++;
};
Effects = new Array();
i = 0;
while (i < 50) {
Effects[i] = new Object();
Effects[i].Name = "Empty";
i++;
};
Effects[0].Name = "Empty";
Effects[1].Name = "BlueBulletCreated";
Effects[1].File = new BlueBulletCreated();
Effects[2].Name = "ChuteActivate";
Effects[2].File = new ChuteActivate();
Effects[3].Name = "Collapse";
Effects[3].File = new Collapse();
Effects[4].Name = "Countdown";
Effects[4].File = new Countdown();
Effects[5].Name = "CountdownCreated";
Effects[5].File = new CountdownCreated();
Effects[6].Name = "CrawlerStep";
Effects[6].File = new CrawlerStep();
Effects[7].Name = "CreditsStart";
Effects[7].File = new CreditsStart();
Effects[8].Name = "DataCheckerValid";
Effects[8].File = new DataCheckerValid();
Effects[9].Name = "DroneBounce";
Effects[9].File = new DroneBounce();
Effects[10].Name = "ElectricSpark";
Effects[10].File = new ElectricSpark();
Effects[11].Name = "EndCreditsSound";
Effects[11].File = new EndCreditsSound();
Effects[12].Name = "Explosion";
Effects[12].File = new Explosion();
Effects[13].Name = "GeneratorRandomSound";
Effects[13].File = new GeneratorRandomSound();
Effects[14].Name = "GreenBulletCreated";
Effects[14].File = new GreenBulletCreated();
Effects[15].Name = "LaserActivate";
Effects[15].File = new LaserActivate();
Effects[16].Name = "LaserHit";
Effects[16].File = new LaserHit();
Effects[17].Name = "LeverActivate";
Effects[17].File = new LeverActivate();
Effects[18].Name = "LiftActivate";
Effects[18].File = new LiftActivate();
Effects[19].Name = "Lose";
Effects[19].File = new Lose();
Effects[20].Name = "MadComActivate";
Effects[20].File = new MadComActivate();
Effects[21].Name = "MadComNewTentacle";
Effects[21].File = new MadComNewTentacle();
Effects[22].Name = "MadComReloadedLose";
Effects[22].File = new MadComReloadedLose();
Effects[23].Name = "MadComReloadedRandomSound";
Effects[23].File = new MadComReloadedRandomSound();
Effects[24].Name = "MadComStep";
Effects[24].File = new MadComStep();
Effects[25].Name = "MessageSound";
Effects[25].File = new MessageSound();
Effects[26].Name = "PickupActivate";
Effects[26].File = new PickupActivate();
Effects[27].Name = "PlasmaCreated";
Effects[27].File = new PlasmaCreated();
Effects[28].Name = "PlayerCyborgJump";
Effects[28].File = new PlayerCyborgJump();
Effects[29].Name = "PlayerCyborgStep";
Effects[29].File = new PlayerCyborgStep();
Effects[30].Name = "ShutdownTurretLaser";
Effects[30].File = new ShutdownTurretLaser();
Effects[31].Name = "SpinnerActivate";
Effects[31].File = new SpinnerActivate();
Effects[32].Name = "SwarmerBeam";
Effects[32].File = new SwarmerBeam();
Effects[33].Name = "TankActivate";
Effects[33].File = new TankActivate();
Effects[34].Name = "TankStep";
Effects[34].File = new TankStep();
Effects[35].Name = "TeleportSpawn";
Effects[35].File = new TeleportSpawn();
Effects[36].Name = "Trapdoor";
Effects[36].File = new Trapdoor();
Effects[37].Name = "TriggerBeam";
Effects[37].File = new TriggerBeam();
HamsterWorldMC = addChild(new HamsterWorld());
HamsterWorldMC.alpha = 0;
HamsterWorldMC.x = 70;
HamsterWorldMC.y = 180;
HamsterWorldMC.blendMode = BlendMode.OVERLAY;
PresentsMC = addChild(new Presents());
PresentsMC.alpha = 0;
PresentsMC.y = 170;
LinksMC = addChild(new Links());
LinksMC.alpha = 0;
NewGameMC = addChild(new NewGame());
NewGameMC.alpha = 0;
NewGameMC.y = 250;
DroidComMC = addChild(new DroidCom());
DroidComMC.alpha = 0;
TP1MC = addChild(new TestPattern());
TP1MC.gotoAndStop(1);
TP1MC.alpha = 0;
setChildIndex(TP1MC, 1);
TP2MC = addChild(new TestPattern());
TP2MC.gotoAndStop(2);
TP2MC.alpha = 0;
setChildIndex(TP2MC, 1);
TP3MC = addChild(new TestPattern());
TP3MC.gotoAndStop(3);
TP3MC.alpha = 0;
setChildIndex(TP3MC, 1);
PatternRotation = 0;
PatternDistance = 175;
BriefingBackgroundMC = addChild(new Briefing());
BriefingBackgroundMC.alpha = 0;
Odd = false;
setChildIndex(BriefingBackgroundMC, 1);
BriefingText = ">> Mission briefing >> \nAssigner: Classified \nSubject: I.R.D #5 \nMission: Infiltrate and recover \nThreat level: Tremendous \n \nPrimary objectives \n\n- Infiltrate the enemy research complex \n- Locate all twelve access discs \n- Upload research data from the main computer terminal \n- Get to the extraction point \n \nGood luck \n \nMission starts in 3 2 ";
addEventListener(Event.ENTER_FRAME, UpdateTileScreen);
}
public function DestroyUnit(_arg1:int, _arg2:Boolean){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local3 = Units[_arg1].Id;
if (Units[_arg1].Updating == true){
d = 0;
while (d < ActiveUnits.length) {
if (ActiveUnits[d] == _arg1){
ActiveUnits.splice(d, 1);
break;
};
d++;
};
};
d = 0;
while (d < ActiveUnits.length) {
if (ActiveUnits[d] > _arg1){
ActiveUnits[d] = (ActiveUnits[d] - 1);
};
d++;
};
d = 0;
while (d < Units.length) {
if (Units[d].UnitMC.Unit > _arg1){
Units[d].UnitMC.Unit = (Units[d].UnitMC.Unit - 1);
};
d++;
};
if ((((Units[_arg1].UnitMC.visible == true)) && ((_arg2 == true)))){
_local4 = false;
_local5 = UnitInformation[_local3].DestructionParticles.split("|");
if (_local5.length > 1){
d = 0;
while (d < _local5.length) {
if ((d % 6) == 0){
p = 0;
while (p < _local5[d]) {
_local6 = new Point(((Units[_arg1].Position.x - (Math.random() * UnitInformation[_local3].Size.x)) + (Math.random() * UnitInformation[_local3].Size.x)), ((Units[_arg1].Position.y - (Math.random() * UnitInformation[_local3].Size.y)) + (Math.random() * UnitInformation[_local3].Size.y)));
_local7 = new Point(Units[_arg1].Velocity.x, Units[_arg1].Velocity.y);
if (_local5.length > (d + 2)){
_local7.x = ((-(Math.random()) * _local5[(d + 2)]) + (Math.random() * _local5[(d + 4)]));
_local7.y = ((-(Math.random()) * _local5[(d + 3)]) + (Math.random() * _local5[(d + 5)]));
} else {
_local7.x = ((-(Math.random()) * 10) + (Math.random() * 10));
_local7.y = ((-(Math.random()) * 10) + (Math.random() * 10));
};
CreateParticle(_local5[(d + 1)], _local6, _local7);
if ((((_local4 == false)) && ((_local5[(d + 1)] == "ParticleFireball")))){
PlayEffect("Explosion", 1);
_local4 = true;
};
p++;
};
};
d++;
};
};
};
if (UnitInformation[Units[_arg1].Id].Name == "Player"){
Game.PlayerHealth = 0;
Game.PlayerAlive = false;
Game.SlowMotion = false;
PlayEffect("Lose", 1);
};
if (UnitInformation[_local3].Invisible == false){
if (UnitInformation[_local3].InBackground == true){
BackgroundMC.removeChild(Units[_arg1].UnitMC);
} else {
ForegroundMC.removeChild(Units[_arg1].UnitMC);
};
} else {
ShadowMC.removeChild(Units[_arg1].UnitMC);
};
Units.splice(_arg1, 1);
Editor.HeldUnit = -1;
}
public function UpdateTileScreen(_arg1:Event){
var event = _arg1;
if (TP1MC != null){
TP1MC.x = (PatternDistance * Math.sin(((PatternRotation * Math.PI) / 180)));
TP1MC.y = ((PatternDistance * 0.2) * Math.sin(((PatternRotation * Math.PI) / 180)));
TP3MC.x = (-(PatternDistance) * Math.sin(((PatternRotation * Math.PI) / 180)));
TP3MC.y = ((-(PatternDistance) * 0.2) * Math.sin(((PatternRotation * Math.PI) / 180)));
};
PatternRotation = (PatternRotation + 5);
if (PatternRotation > 360){
PatternRotation = 0;
};
NoiseMC.y = (Math.random() * -100);
NoiseMC.scaleX = (NoiseMC.scaleX * -1);
NoiseLineMC.y = ((Math.random() * 383) + 100);
if (TitleScreenMode == 0){
if (HamsterWorldMC.alpha < 4){
HamsterWorldMC.alpha = (HamsterWorldMC.alpha + 0.05);
} else {
TitleScreenMode = 1;
};
if (HamsterWorldMC.alpha > 2){
HamsterWorldMC.blendMode = BlendMode.NORMAL;
};
} else {
if (TitleScreenMode == 1){
if (HamsterWorldMC.alpha > 0){
HamsterWorldMC.alpha = (HamsterWorldMC.alpha - 0.05);
} else {
TitleScreenMode = 2;
removeChild(HamsterWorldMC);
};
} else {
if (TitleScreenMode == 2){
if (PresentsMC.alpha < 2.5){
PresentsMC.alpha = (PresentsMC.alpha + 0.05);
} else {
TitleScreenMode = 3;
};
} else {
if (TitleScreenMode == 3){
if (PresentsMC.alpha > 0){
PresentsMC.alpha = (PresentsMC.alpha - 0.05);
soundVol.volume = (PresentsMC.alpha * 0.033);
MusicChannel.soundTransform = soundVol;
} else {
TitleScreenMode = 4;
removeChild(PresentsMC);
MusicChannel = Music[9].File.play(0, 99999);
soundVol.volume = 1;
MusicChannel.soundTransform = soundVol;
};
} else {
if (TitleScreenMode == 4){
if (NoiseMC.alpha > 0.3){
NoiseMC.alpha = (NoiseMC.alpha - 0.05);
BlankMC.alpha = (BlankMC.alpha - 0.01);
};
if (TP1MC.alpha < 0.4){
TP1MC.alpha = (TP1MC.alpha + 0.025);
TP2MC.alpha = (TP2MC.alpha + 0.025);
TP3MC.alpha = (TP3MC.alpha + 0.025);
};
if (DroidComMC.alpha < 1){
DroidComMC.alpha = (DroidComMC.alpha + 0.05);
};
if (PatternDistance > 5){
PatternDistance = (PatternDistance - 2);
} else {
TitleScreenMode = 5;
};
} else {
if (TitleScreenMode == 5){
if (LinksMC.alpha < 1){
LinksMC.alpha = (LinksMC.alpha + 0.05);
NewGameMC.alpha = (NewGameMC.alpha + 0.05);
} else {
NewGameMC.addEventListener(MouseEvent.MOUSE_UP, function (_arg1:MouseEvent):void{
TitleScreenMode = 7;
removeChild(LinksMC);
removeChild(NewGameMC);
});
TitleScreenMode = 6;
};
} else {
if (TitleScreenMode == 7){
if (TP1MC.alpha > 0){
TP1MC.alpha = (TP1MC.alpha - 0.025);
TP2MC.alpha = (TP2MC.alpha - 0.025);
TP3MC.alpha = (TP3MC.alpha - 0.025);
};
if (DroidComMC.alpha > 0){
DroidComMC.alpha = (DroidComMC.alpha - 0.05);
};
if (BriefingBackgroundMC.alpha < 1){
BriefingBackgroundMC.alpha = (BriefingBackgroundMC.alpha + 0.05);
} else {
TitleScreenMode = 8;
removeChild(TP1MC);
removeChild(TP2MC);
removeChild(TP3MC);
removeChild(DroidComMC);
};
} else {
if (TitleScreenMode == 8){
if (Odd == true){
Odd = false;
if (BriefingText.length > 0){
BriefingBackgroundMC.Text.text = (BriefingBackgroundMC.Text.text + BriefingText.charAt(0));
BriefingText = BriefingText.slice(1, BriefingText.length);
} else {
TitleScreenMode = 9;
};
} else {
Odd = true;
};
if (RGBMC.alpha > 0.2){
RGBMC.alpha = (RGBMC.alpha - 0.05);
};
if (BlankMC.alpha > 0.2){
BlankMC.alpha = (BlankMC.alpha - 0.05);
};
} else {
if (TitleScreenMode == 9){
if (RGBMC.alpha > 0){
RGBMC.alpha = (RGBMC.alpha - 0.05);
BlankMC.alpha = (BlankMC.alpha - 0.05);
};
if (BriefingBackgroundMC.alpha > 0){
BriefingBackgroundMC.alpha = (BriefingBackgroundMC.alpha - 0.1);
soundVol.volume = BriefingBackgroundMC.alpha;
MusicChannel.soundTransform = soundVol;
};
if (NoiseMC.alpha < 1){
NoiseMC.alpha = (NoiseMC.alpha + 0.01);
} else {
removeChild(BriefingBackgroundMC);
removeChild(RGBMC);
removeChild(BlankMC);
MusicChannel.stop();
removeEventListener(Event.ENTER_FRAME, UpdateTileScreen);
gotoAndStop(4);
};
};
};
};
};
};
};
};
};
};
}
function frame1(){
stop();
soundVol = new SoundTransform();
MusicChannel = new SoundChannel();
GameMC = addChild(new MovieClip());
NoiseMC = addChild(new Noise());
NoiseLineMC = NoiseMC.addChild(new Noise());
NoiseMC.x = 271.5;
NoiseMC.alpha = 1;
NoiseMC.gotoAndStop(1);
NoiseLineMC.alpha = 0.8;
NoiseLineMC.gotoAndStop(2);
RGBMC = addChild(new RGB());
RGBMC.alpha = 1;
RGBMC.blendMode = BlendMode.OVERLAY;
BlankMC = addChild(new Blank());
BlankMC.alpha = 0.5;
LoadingBarMC = addChild(new ProgressBarClip());
LoadingBarMC.x = 0x0100;
LoadingBarMC.y = 191;
AntennaMC = addChild(new Antenna());
AntennaMC.x = 476;
AntennaMC.y = 161;
TitleScreenMode = 0;
pcent = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING);
addEventListener(Event.ENTER_FRAME, UpdatePreLoader);
}
public function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.LEFT){
LeftPressed = true;
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
RightPressed = true;
} else {
if (_arg1.keyCode == Keyboard.UP){
UpPressed = true;
} else {
if (_arg1.keyCode == Keyboard.DOWN){
DownPressed = true;
} else {
if (_arg1.keyCode == 88){
FirePressed = true;
} else {
if (_arg1.keyCode == 90){
JumpPressed = true;
} else {
if (_arg1.keyCode == 67){
SlowPressed = true;
} else {
if (_arg1.keyCode == Keyboard.CONTROL){
CTRLPressed = true;
};
};
};
};
};
};
};
};
}
public function TriggerUnits(_arg1:String, _arg2:String){
var _local3:*;
_local3 = _arg1.split("|");
j = 0;
while (j < _local3.length) {
u = 0;
while (u < Units.length) {
if (Units[u].TriggerName == _local3[j]){
if (Units[u].Activated == false){
if (Units[u].Updating == false){
ActiveUnits.push(u);
Units[u].Updating = true;
Units[u].Changed = true;
Units[u].UnitMC.visible = true;
};
Units[u].Activated = true;
if (UnitInformation[Units[u].Id].TypeName == "LaserEmitter"){
PlayEffect("LaserActivate", 1);
} else {
if (UnitInformation[Units[u].Id].TypeName == "Tank"){
PlayEffect("TankActivate", 1);
} else {
if (UnitInformation[Units[u].Id].TypeName == "Lamp"){
PlayEffect("LeverActivate", 1);
};
};
};
} else {
Units[u].Activated = false;
if ((((UnitInformation[Units[u].Id].TypeName == "LaserEmitter")) || ((UnitInformation[Units[u].Id].TypeName == "Turret")))){
PlayEffect("ShutdownTurretLaser", 0.6);
};
};
};
u++;
};
j++;
};
}
public function keyUpHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.LEFT){
LeftPressed = false;
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
RightPressed = false;
} else {
if (_arg1.keyCode == Keyboard.UP){
UpPressed = false;
} else {
if (_arg1.keyCode == Keyboard.DOWN){
DownPressed = false;
} else {
if (_arg1.keyCode == 88){
FirePressed = false;
} else {
if (_arg1.keyCode == 90){
JumpPressed = false;
} else {
if (_arg1.keyCode == 67){
SlowPressed = false;
} else {
if (_arg1.keyCode == Keyboard.CONTROL){
CTRLPressed = false;
};
};
};
};
};
};
};
};
}
public function CreateUnit(_arg1:String, _arg2:int, _arg3:Point, _arg4:Point, _arg5:int, _arg6:String, _arg7:String, _arg8:Boolean){
var _local9:*;
var _local10:*;
var _local11:Class;
_local9 = -1;
i = 0;
while (i < UnitInformation.length) {
if (UnitInformation[i].Name == _arg1){
_local9 = i;
break;
};
i++;
};
if (_local9 == -1){
} else {
_local10 = new Object();
if (_arg7.length == 0){
_local10.TriggerName = _arg1;
} else {
_local10.TriggerName = _arg7;
};
_local10.Updating = false;
_local10.Id = _local9;
_local10.Team = _arg2;
_local10.OriginalAngle = _arg5;
_local10.Angle = _arg5;
_local10.Trigger = _arg6;
_local10.Health = UnitInformation[_local9].Health;
_local10.Weight = UnitInformation[_local9].Weight;
_local10.OriginalPosition = new Point(_arg3.x, _arg3.y);
_local10.Position = new Point(_arg3.x, _arg3.y);
_local10.PositionOnScreen = new Point((_local10.Position.x - (Math.floor((_local10.Position.x / Game.Resolution.x)) * Game.Resolution.x)), (_local10.Position.y - (Math.floor((_local10.Position.y / Game.Resolution.y)) * Game.Resolution.y)));
_local10.DeltaPosition = new Point(0, 0);
_local10.OldPosition = new Point(_arg3.x, _arg3.y);
_local10.Velocity = new Point(_arg4.x, _arg4.y);
_local10.Mirrored = false;
_local10.OriginalActivated = _arg8;
_local10.Activated = _arg8;
_local10.StandingOnGround = false;
_local10.Return = UnitInformation[_local9].Return;
_local10.PauseTime = 0;
_local10.WaitTime = 0;
_local10.CollidedWithUnit = false;
_local10.CollidedWithLevel = false;
_local10.LeftWall = false;
_local10.RightWall = false;
_local10.Ceiling = false;
_local10.Floor = false;
_local10.MoveBack = new Point(0, 0);
_local10.UnitPushBack = new Point(0, 0);
_local10.Changed = false;
_local10.CurrentLevel = -1;
_local10.Location = new Point(Math.floor((_local10.Position.x / Game.Resolution.x)), Math.floor((_local10.Position.y / Game.Resolution.y)));
u = 0;
while (u < Level.length) {
if ((((Level[u].Location.x == _local10.Location.x)) && ((Level[u].Location.y == _local10.Location.y)))){
_local10.CurrentLevel = u;
break;
};
u++;
};
if ((((((((UnitInformation[_local9].Name == "Player")) && ((_local10.CurrentLevel > -1)))) && (!((_local10.CurrentLevel == Game.CurrentLevel))))) && ((Game.LevelLocked == false)))){
UpdateCamera(_local10.CurrentLevel);
};
_local11 = (getDefinitionByName(UnitInformation[_local9].MCName) as Class);
if (UnitInformation[_local9].Invisible == false){
if (UnitInformation[_local9].InBackground == true){
_local10.UnitMC = BackgroundMC.addChild(new (_local11));
} else {
_local10.UnitMC = ForegroundMC.addChild(new (_local11));
};
} else {
_local10.UnitMC = ShadowMC.addChild(new (_local11));
_local10.UnitMC.blendMode = BlendMode.SUBTRACT;
_local10.UnitMC.alpha = 0.15;
};
_local10.UnitMC.x = -100;
_local10.UnitMC.y = -100;
_local10.UnitMC.gotoAndStop(1);
_local10.UnitMC.Unit = Units.length;
if (UnitInformation[_local9].Name == "Player"){
Game.PlayerAlive = true;
};
Units.push(_local10);
if (Units[(Units.length - 1)].CurrentLevel == Game.CurrentLevel){
ActiveUnits.push((Units.length - 1));
Units[(Units.length - 1)].Updating = true;
Units[(Units.length - 1)].Changed = true;
_local10.UnitMC.visible = true;
} else {
_local10.UnitMC.visible = false;
};
};
}
public function CheckCondition(_arg1:String, _arg2:int){
if (_arg1 == "PlayerInHorizontalView"){
if ((((((Units[_arg2].CurrentLevel == Game.CurrentLevel)) && (((Units[_arg2].Position.y - UnitInformation[Units[_arg2].Id].Size.y) < Game.PlayerPosition.y)))) && (((Units[_arg2].Position.y + UnitInformation[Units[_arg2].Id].Size.y) > Game.PlayerPosition.y)))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerInVerticalView"){
if ((((((Units[_arg2].CurrentLevel == Game.CurrentLevel)) && (((Units[_arg2].Position.x - UnitInformation[Units[_arg2].Id].Size.x) < Game.PlayerPosition.x)))) && (((Units[_arg2].Position.x + UnitInformation[Units[_arg2].Id].Size.x) > Game.PlayerPosition.x)))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerNotTouching"){
if (((((Math.abs((Units[_arg2].Position.x - Game.PlayerPosition.x)) - 1) <= (UnitInformation[Units[_arg2].Id].Size.x + Game.PlayerSize.x))) && (((Math.abs((Units[_arg2].Position.y - Game.PlayerPosition.y)) - 1) <= (UnitInformation[Units[_arg2].Id].Size.y + Game.PlayerSize.y))))){
return (false);
};
return (true);
} else {
if (_arg1 == "PlayerTouching"){
if (((((Math.abs((Units[_arg2].Position.x - Game.PlayerPosition.x)) - 1) <= (UnitInformation[Units[_arg2].Id].Size.x + Game.PlayerSize.x))) && (((Math.abs((Units[_arg2].Position.y - Game.PlayerPosition.y)) - 1) <= (UnitInformation[Units[_arg2].Id].Size.y + Game.PlayerSize.y))))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerHasLeftTheScreen"){
if ((((Units[_arg2].CurrentLevel == -1)) || (((!((Units[_arg2].CurrentLevel == Game.CurrentLevel))) && ((Game.LevelUpdated == true)))))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerHasEnteredTheScreen"){
if ((((((Units[_arg2].CurrentLevel > -1)) && ((Units[_arg2].CurrentLevel == Game.CurrentLevel)))) && ((Game.LevelUpdated == true)))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsOnAnotherScreen"){
if ((((Units[_arg2].CurrentLevel == -1)) || (!((Units[_arg2].CurrentLevel == Game.CurrentLevel))))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsOnTheSameScreen"){
if ((((Units[_arg2].CurrentLevel > -1)) && ((Units[_arg2].CurrentLevel == Game.CurrentLevel)))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsOnAnotherXScreen"){
if ((((Units[_arg2].CurrentLevel == -1)) || (!((Level[Units[_arg2].CurrentLevel].Location.x == Level[Game.CurrentLevel].Location.x))))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsOnAnotherYScreen"){
if ((((Units[_arg2].CurrentLevel == -1)) || (!((Level[Units[_arg2].CurrentLevel].Location.y == Level[Game.CurrentLevel].Location.y))))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsOnTheSameXScreen"){
if ((((Units[_arg2].CurrentLevel > -1)) && ((Level[Units[_arg2].CurrentLevel].Location.x == Level[Game.CurrentLevel].Location.x)))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsOnTheSameYScreen"){
if ((((Units[_arg2].CurrentLevel > -1)) && ((Level[Units[_arg2].CurrentLevel].Location.y == Level[Game.CurrentLevel].Location.y)))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsTwoScreensAway"){
if ((((Units[_arg2].CurrentLevel > -1)) && (((Math.abs((Level[Units[_arg2].CurrentLevel].Location.x - Level[Game.CurrentLevel].Location.x)) + Math.abs((Level[Units[_arg2].CurrentLevel].Location.y - Level[Game.CurrentLevel].Location.y))) > 1)))){
return (true);
};
return (false);
} else {
if (_arg1 == "PlayerIsLessThanTwoScreensAway"){
if ((((Units[_arg2].CurrentLevel > -1)) && (((Math.abs((Level[Units[_arg2].CurrentLevel].Location.x - Level[Game.CurrentLevel].Location.x)) + Math.abs((Level[Units[_arg2].CurrentLevel].Location.y - Level[Game.CurrentLevel].Location.y))) < 2)))){
return (true);
};
return (false);
} else {
if (_arg1 == "Always"){
return (true);
};
if (_arg1 == "Never"){
return (false);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function SaveGame(){
var _local1:*;
SavedGame = new Object();
for (VariableName in Game) {
if ((Game[VariableName] is Point)){
SavedGame[VariableName] = new Point();
SavedGame[VariableName].x = Game[VariableName].x;
SavedGame[VariableName].y = Game[VariableName].y;
} else {
SavedGame[VariableName] = Game[VariableName];
};
};
Game.GameSaved = true;
SavedUnits = new Array(Units.length);
_local1 = 0;
u = 0;
while (u < Units.length) {
SavedUnits[u] = new Object();
for (VariableName in Units[u]) {
if (VariableName != "UnitMC"){
if ((Units[u][VariableName] is Point)){
SavedUnits[u][VariableName] = new Point();
SavedUnits[u][VariableName].x = Units[u][VariableName].x;
SavedUnits[u][VariableName].y = Units[u][VariableName].y;
} else {
SavedUnits[u][VariableName] = Units[u][VariableName];
};
};
};
SavedUnits[u].NeedToCreate = true;
Units[u].SavedUnit = u;
u++;
};
}
public function UpdateBackground(){
if (Game.CurrentLevel > -1){
if ((((((Level[Game.CurrentLevel].Background == 1)) || ((Level[Game.CurrentLevel].Background == 4)))) || ((Level[Game.CurrentLevel].Background == 5)))){
i = 0;
while (i < 8) {
BackgroundParticlesMC[i].x = (BackgroundParticlesMC[i].x + BackgroundParticlesMC[i].Tag);
if (BackgroundParticlesMC[i].x > Game.Resolution.x){
BackgroundParticlesMC[i].gotoAndStop((1 + Math.floor((Math.random() * 4.9))));
BackgroundParticlesMC[i].y = (Math.random() * 100);
BackgroundParticlesMC[i].x = -120;
BackgroundParticlesMC[i].Tag = (1 + (Math.random() * 2));
};
i++;
};
if ((((Level[Game.CurrentLevel].Background == 4)) || ((Level[Game.CurrentLevel].Background == 5)))){
i = 8;
while (i < 32) {
BackgroundParticlesMC[i].alpha = (BackgroundParticlesMC[i].alpha - 0.05);
if (BackgroundParticlesMC[i].alpha <= 0){
if (Level[Game.CurrentLevel].Background == 4){
BackgroundParticlesMC[i].y = (Game.Resolution.y - (Math.random() * 172));
BackgroundParticlesMC[i].alpha = (Math.random() * 1);
} else {
BackgroundParticlesMC[i].y = (Game.Resolution.y - (Math.random() * 87));
BackgroundParticlesMC[i].alpha = (Math.random() * 0.6);
};
BackgroundParticlesMC[i].x = (Math.random() * Game.Resolution.x);
};
i++;
};
};
};
if ((((Level[Game.CurrentLevel].Background == 2)) || ((Level[Game.CurrentLevel].Background == 3)))){
i = 0;
while (i < 32) {
BackgroundParticlesMC[i].y = (BackgroundParticlesMC[i].y - BackgroundParticlesMC[i].Tag);
if (BackgroundParticlesMC[i].y < -15){
BackgroundParticlesMC[i].x = (Math.random() * Game.Resolution.x);
BackgroundParticlesMC[i].y = (Game.Resolution.y + 15);
BackgroundParticlesMC[i].scaleX = (0.2 + (Math.random() * 0.5));
BackgroundParticlesMC[i].scaleY = BackgroundParticlesMC[i].scaleX;
BackgroundParticlesMC[i].Tag = (0.5 + (Math.random() * 1.5));
};
i++;
};
if (Level[Game.CurrentLevel].Background == 3){
BackgroundParticlesMC[0].Tag = 10;
BackgroundParticlesMC[0].x = -20;
if (BackgroundImageMC.Rays != null){
BackgroundImageMC.Rays.alpha = (0.5 + ((Math.abs((BackgroundParticlesMC[0].y - (Game.Resolution.y * 0.5))) / Game.Resolution.y) * 0.5));
};
};
};
};
}
public function GetAngle(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{
return (((Math.atan2((_arg3 - _arg4), (_arg1 - _arg2)) / Math.PI) * 180));
}
public function LineOfSight(_arg1:Point, _arg2:int, _arg3:int, _arg4:Boolean, _arg5:int):Point{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
Game.UnitInSight = -1;
_local6 = new Point((5 * Math.sin(((_arg2 * Math.PI) / 180))), (-5 * Math.cos(((_arg2 * Math.PI) / 180))));
_local7 = true;
_local8 = new Point(_arg1.x, _arg1.y);
_local9 = new Point(Math.floor((_arg1.x / Game.Resolution.x)), Math.floor((_arg1.y / Game.Resolution.y)));
while (_local7 == true) {
_arg1.x = (_arg1.x + _local6.x);
_arg1.y = (_arg1.y + _local6.y);
if (_arg3 > -1){
_local10 = new Point((_arg1.x - (Game.Resolution.x * Level[_arg3].Location.x)), (_arg1.y - (Game.Resolution.y * Level[_arg3].Location.y)));
if (Pixel.hitTest(new Point(_local10.x, _local10.y), 0xFF, Level[_arg3].CollisionBitmapData, new Point(0, 0), 0xFF)){
_local7 = false;
};
} else {
_local10 = new Point((_arg1.x - (Game.Resolution.x * _local9.x)), (_arg1.y - (Game.Resolution.y * _local9.y)));
};
j = 0;
while (j < ActiveUnits.length) {
if (((((((!((Units[ActiveUnits[j]].Team == _arg5))) && ((Units[ActiveUnits[j]].Weight > 0)))) && ((Math.abs((Units[ActiveUnits[j]].Position.x - _arg1.x)) < UnitInformation[Units[ActiveUnits[j]].Id].Size.x)))) && ((Math.abs((Units[ActiveUnits[j]].Position.y - _arg1.y)) < UnitInformation[Units[ActiveUnits[j]].Id].Size.y)))){
Game.UnitInSight = ActiveUnits[j];
if (_arg4 == true){
_local7 = false;
};
};
j++;
};
if ((((((((_local10.x < -5)) || ((_local10.y < -5)))) || ((_local10.x > (Game.Resolution.x + 5))))) || ((_local10.y > (Game.Resolution.y + 5))))){
_local7 = false;
};
};
if (_local8.x == _arg1.x){
_arg1.x = (_arg1.x + 0.5);
};
if (_local8.y == _arg1.y){
_arg1.y = (_arg1.y + 0.5);
};
return (new Point(_arg1.x, _arg1.y));
}
public function GetDistance(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{
return (Math.sqrt((Math.pow((_arg1 - _arg2), 2) + Math.pow((_arg3 - _arg4), 2))));
}
public function UpdateCamera(_arg1){
var _local2:Color;
Game.LevelUpdated = true;
LevelMC.visible = false;
ShadowMC.visible = false;
Game.CurrentLevel = _arg1;
LevelMC.visible = true;
ShadowMC.visible = true;
if (Level[_arg1].LevelFrame == -1){
LevelMC.visible = false;
ShadowMC.visible = false;
} else {
LevelNameMC.visible = true;
if (LevelNameMC.Text.text != Level[_arg1].Name){
LevelNameMC.alpha = 1.3;
LevelNameMC.Text.text = Level[_arg1].Name;
};
LevelMC.visible = true;
ShadowMC.visible = true;
LevelMC.gotoAndStop(Level[_arg1].LevelFrame);
ShadowMC.gotoAndStop(Level[_arg1].ShadowFrame);
};
_local2 = new Color();
_local2.brightness = (-((1 - Level[_arg1].Brightness)) * 0.5);
LevelMC.transform.colorTransform = _local2;
GameMC.transform.colorTransform = _local2;
i = 0;
while (i < 32) {
BackgroundParticlesMC[i].gotoAndStop(1);
BackgroundParticlesMC[i].visible = false;
i++;
};
if (Level[_arg1].Background > 0){
BackgroundImageMC.visible = true;
BackgroundImageMC.gotoAndStop(Level[_arg1].Background);
if ((((((Level[_arg1].Background == 1)) || ((Level[_arg1].Background == 4)))) || ((Level[_arg1].Background == 5)))){
i = 0;
while (i < 8) {
BackgroundParticlesMC[i].visible = true;
BackgroundParticlesMC[i].gotoAndStop((1 + Math.floor((Math.random() * 4.9))));
BackgroundParticlesMC[i].x = (Math.random() * Game.Resolution.x);
BackgroundParticlesMC[i].y = (Math.random() * 100);
if (Level[_arg1].Background > 3){
BackgroundParticlesMC[i].alpha = (0.7 - (0.1 * Level[_arg1].Background));
} else {
BackgroundParticlesMC[i].alpha = 0.6;
};
BackgroundParticlesMC[i].Tag = (1 + (Math.random() * 2));
i++;
};
if ((((Level[Game.CurrentLevel].Background == 4)) || ((Level[Game.CurrentLevel].Background == 5)))){
i = 8;
while (i < 32) {
BackgroundParticlesMC[i].visible = true;
BackgroundParticlesMC[i].gotoAndStop(7);
if (Level[Game.CurrentLevel].Background == 4){
BackgroundParticlesMC[i].y = (Game.Resolution.y - (Math.random() * 172));
BackgroundParticlesMC[i].alpha = (Math.random() * 1);
BackgroundParticlesMC[i].scaleX = 0.5;
BackgroundParticlesMC[i].scaleY = 0.5;
} else {
BackgroundParticlesMC[i].y = (Game.Resolution.y - (Math.random() * 87));
BackgroundParticlesMC[i].alpha = (Math.random() * 0.6);
BackgroundParticlesMC[i].scaleX = 0.25;
BackgroundParticlesMC[i].scaleY = 0.25;
};
BackgroundParticlesMC[i].x = (Math.random() * Game.Resolution.x);
i++;
};
};
} else {
if ((((Level[_arg1].Background == 2)) || ((Level[_arg1].Background == 3)))){
i = 0;
while (i < 32) {
BackgroundParticlesMC[i].visible = true;
BackgroundParticlesMC[i].gotoAndStop(6);
BackgroundParticlesMC[i].x = (Math.random() * Game.Resolution.x);
BackgroundParticlesMC[i].y = (Math.random() * Game.Resolution.y);
if (Level[_arg1].Background == 3){
BackgroundParticlesMC[i].alpha = 0.4;
} else {
BackgroundParticlesMC[i].alpha = 0.6;
};
BackgroundParticlesMC[i].scaleX = (0.2 + (Math.random() * 0.5));
BackgroundParticlesMC[i].scaleY = BackgroundParticlesMC[i].scaleX;
BackgroundParticlesMC[i].Tag = (0.5 + (Math.random() * 1.5));
i++;
};
};
};
} else {
BackgroundImageMC.visible = false;
};
u = 0;
while (u < Units.length) {
if ((((Units[u].Updating == false)) && ((Units[u].CurrentLevel == Game.CurrentLevel)))){
ActiveUnits.push(u);
Units[u].Updating = true;
Units[u].Changed = true;
Units[u].UnitMC.visible = true;
if ((((Units[u].Activated == false)) && ((UnitInformation[Units[u].Id].ActivateWhen.length > 0)))){
if (CheckCondition(UnitInformation[Units[u].Id].ActivateWhen, u)){
Units[u].Activated = true;
};
};
if ((((Units[u].Activated == true)) && ((UnitInformation[Units[u].Id].DeActivateWhen.length > 0)))){
if (CheckCondition(UnitInformation[Units[u].Id].DeActivateWhen, u)){
Units[u].Activated = false;
};
};
};
u++;
};
i = i;
}
public function RotateUnit(_arg1:Event):void{
if (_arg1.delta > 0){
Editor.Angle = (Editor.Angle + 10);
} else {
Editor.Angle = (Editor.Angle - 10);
};
if (Editor.Angle < 0){
Editor.Angle = (Editor.Angle + 360);
} else {
if (Editor.Angle > 360){
Editor.Angle = (Editor.Angle - 360);
};
};
}
public function UpdatePreLoader(_arg1:Event){
var _local2:*;
LoadingBarMC.gotoAndStop(Math.floor((pcent * 0.2)));
if (AntennaMC.alpha <= 0){
removeChild(AntennaMC);
removeChild(LoadingBarMC);
removeEventListener(Event.ENTER_FRAME, UpdatePreLoader);
_local2 = new Static();
MusicChannel = _local2.play(0, 99999);
soundVol.volume = 0.1;
MusicChannel.soundTransform = soundVol;
gotoAndStop(3);
} else {
if (pcent >= 100){
LoadingBarMC.alpha = (LoadingBarMC.alpha - 0.02);
AntennaMC.alpha = (AntennaMC.alpha - 0.015);
AntennaMC.x = (AntennaMC.x - 1);
};
};
NoiseMC.y = (Math.random() * -100);
NoiseMC.scaleX = (NoiseMC.scaleX * -1);
NoiseLineMC.y = ((Math.random() * 383) + 100);
}
public function CreateParticle(_arg1:String, _arg2:Point, _arg3:Point){
var _local4:*;
var _local5:*;
var _local6:Class;
var _local7:*;
_local4 = -1;
i = 0;
while (i < ParticleInformation.length) {
if (ParticleInformation[i].Name == _arg1){
_local4 = i;
break;
};
i++;
};
if (_local4 == -1){
} else {
_local5 = new Object();
_local5.Id = _local4;
_local5.Position = new Point(_arg2.x, _arg2.y);
_local5.Velocity = new Point(_arg3.x, _arg3.y);
_local5.Rotation = ((-(Math.random()) * ParticleInformation[_local4].FastestRotation) + (Math.random() * ParticleInformation[_local4].FastestRotation));
_local6 = (getDefinitionByName(ParticleInformation[_local4].MCName) as Class);
_local5.ParticleMC = ForegroundMC.addChild(new (_local6));
_local5.ParticleMC.gotoAndStop((1 + Math.floor(((Math.random() * _local5.ParticleMC.totalFrames) - 0.01))));
_local5.ParticleMC.scaleX = ParticleInformation[_local4].InitialScale.x;
_local5.ParticleMC.scaleY = ParticleInformation[_local4].InitialScale.y;
_local5.ParticleMC.alpha = ParticleInformation[_local4].InitialAlpha;
if (ParticleInformation[_local4].DirectedAngle == true){
_local5.ParticleMC.rotation = ((Math.atan2(_local5.Velocity.y, _local5.Velocity.x) / Math.PI) * 180);
} else {
_local5.ParticleMC.rotation = (Math.random() * 360);
};
_local7 = new Point((_local5.Position.x - (Level[Game.CurrentLevel].Location.x * Game.Resolution.x)), (_local5.Position.y - (Level[Game.CurrentLevel].Location.y * Game.Resolution.y)));
_local5.ParticleMC.x = _local7.x;
_local5.ParticleMC.y = _local7.y;
Particles.push(_local5);
};
}
public function GameLoop(_arg1:TimerEvent){
Cycle = (Cycle + 1);
UpdateParticles();
UpdateUnits();
UpdateBackground();
UpdateInterface();
if ((((((Game.SlowMotion == true)) && ((Game.NextUpdate == 0)))) || ((Game.SlowMotion == false)))){
Game.LevelUpdated = false;
};
if (NoiseMC.visible == true){
NoiseMC.y = (Math.random() * -100);
NoiseMC.scaleX = (NoiseMC.scaleX * -1);
NoiseLineMC.y = ((Math.random() * Game.Resolution.y) + 100);
if ((((Game.PlayerAlive == true)) && ((Game.SlowMotion == false)))){
NoiseMC.alpha = (NoiseMC.alpha - 0.02);
if (NoiseMC.alpha <= 0){
NoiseMC.visible = false;
};
} else {
NoiseMC.alpha = (NoiseMC.alpha + 0.02);
if ((((NoiseMC.alpha >= 1)) && ((Game.PlayerAlive == false)))){
LoadGame();
};
if (Game.SlowMotion == true){
if (NoiseMC.alpha > 0.3){
NoiseMC.alpha = (NoiseMC.alpha - 0.02);
};
};
};
} else {
if ((((Game.PlayerAlive == false)) || ((Game.SlowMotion == true)))){
NoiseMC.visible = true;
};
};
}
public function PL_LOADING(_arg1:ProgressEvent):void{
pcent = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
}
public function UpdateParticles(){
var _local1:*;
var _local2:*;
i = 0;
while (i < Particles.length) {
_local1 = Particles[i].Id;
if ((((Game.SlowMotion == true)) && ((Game.NextUpdate > 0)))){
} else {
Particles[i].Velocity.x = ((Particles[i].Velocity.x + ParticleInformation[_local1].Acceleration.x) * ParticleInformation[_local1].DeAcceleration.x);
Particles[i].Velocity.y = ((Particles[i].Velocity.y + ParticleInformation[_local1].Acceleration.y) * ParticleInformation[_local1].DeAcceleration.y);
Particles[i].Position.x = (Particles[i].Position.x + Particles[i].Velocity.x);
Particles[i].Position.y = (Particles[i].Position.y + Particles[i].Velocity.y);
if (ParticleInformation[_local1].DirectedAngle == true){
Particles[i].ParticleMC.rotation = ((Math.atan2(Particles[i].Velocity.y, Particles[i].Velocity.x) / Math.PI) * 180);
} else {
Particles[i].ParticleMC.rotation = (Particles[i].ParticleMC.rotation + Particles[i].Rotation);
};
_local2 = new Point((Particles[i].Position.x - (Level[Game.CurrentLevel].Location.x * Game.Resolution.x)), (Particles[i].Position.y - (Level[Game.CurrentLevel].Location.y * Game.Resolution.y)));
Particles[i].ParticleMC.x = _local2.x;
Particles[i].ParticleMC.y = _local2.y;
Particles[i].ParticleMC.alpha = (Particles[i].ParticleMC.alpha + ParticleInformation[_local1].AlphaModifier);
Particles[i].ParticleMC.scaleX = (Particles[i].ParticleMC.scaleX + ParticleInformation[_local1].ScaleModifier.x);
Particles[i].ParticleMC.scaleY = (Particles[i].ParticleMC.scaleY + ParticleInformation[_local1].ScaleModifier.y);
if ((((((((((Particles[i].ParticleMC.alpha <= 0)) || ((Particles[i].ParticleMC.x < (-(Particles[i].ParticleMC.width) * 0.5))))) || ((Particles[i].ParticleMC.x > (Game.Resolution.x + (Particles[i].ParticleMC.width * 0.5)))))) || ((Particles[i].ParticleMC.y < (-(Particles[i].ParticleMC.height) * 0.5))))) || ((Particles[i].ParticleMC.y > (Game.Resolution.y + (Particles[i].ParticleMC.height * 0.5)))))){
ForegroundMC.removeChild(Particles[i].ParticleMC);
Particles.splice(i, 1);
i = (i - 1);
};
};
i++;
};
}
}
}//package DroidCom_fla
Section 2
//MusicPreloader_196 (DroidCom_fla.MusicPreloader_196)
package DroidCom_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class MusicPreloader_196 extends MovieClip {
public function MusicPreloader_196(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DroidCom_fla
Section 3
//UnitDataChecker1_107 (DroidCom_fla.UnitDataChecker1_107)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitDataChecker1_107 extends MovieClip {
public var Disc1:UnitDataDisc;
public var Disc3:UnitDataDisc;
public var Disc7:UnitDataDisc;
public var Disc8:UnitDataDisc;
public var Disc9:UnitDataDisc;
public var Disc2:UnitDataDisc;
public var Disc4:UnitDataDisc;
public var Disc6:UnitDataDisc;
public var Disc5:UnitDataDisc;
public var Disc11:UnitDataDisc;
public var Disc10:UnitDataDisc;
public var Disc12:UnitDataDisc;
}
}//package DroidCom_fla
Section 4
//UnitLaserEmitter3_122 (DroidCom_fla.UnitLaserEmitter3_122)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitLaserEmitter3_122 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 5
//UnitMadCom12_135 (DroidCom_fla.UnitMadCom12_135)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitMadCom12_135 extends MovieClip {
public var Tentacle1Laser2:MovieClip;
public var Tentacle1Laser1:MovieClip;
public var Tentacle1:MovieClip;
}
}//package DroidCom_fla
Section 6
//UnitMadComReloaded8_39 (DroidCom_fla.UnitMadComReloaded8_39)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitMadComReloaded8_39 extends MovieClip {
public var Tentacle1Laser2:MovieClip;
public var Tentacle1Laser1:MovieClip;
public var Tentacle3:MovieClip;
public var Tentacle1:MovieClip;
public var Tentacle3Laser2:MovieClip;
public var Tentacle3Laser1:MovieClip;
}
}//package DroidCom_fla
Section 7
//UnitPlasmaWall3_148 (DroidCom_fla.UnitPlasmaWall3_148)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitPlasmaWall3_148 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 8
//UnitProxy2_192 (DroidCom_fla.UnitProxy2_192)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitProxy2_192 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 9
//UnitSigntryRotateMC_158 (DroidCom_fla.UnitSigntryRotateMC_158)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitSigntryRotateMC_158 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 10
//UnitSpotlight5_162 (DroidCom_fla.UnitSpotlight5_162)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitSpotlight5_162 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 11
//UnitSpotlight6_166 (DroidCom_fla.UnitSpotlight6_166)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitSpotlight6_166 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 12
//UnitSpotlightRotatePart1_167 (DroidCom_fla.UnitSpotlightRotatePart1_167)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitSpotlightRotatePart1_167 extends MovieClip {
public var Light:MovieClip;
}
}//package DroidCom_fla
Section 13
//UnitSpotlightRotatePart2_163 (DroidCom_fla.UnitSpotlightRotatePart2_163)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitSpotlightRotatePart2_163 extends MovieClip {
public var Light:MovieClip;
}
}//package DroidCom_fla
Section 14
//UnitSwarmer2_26 (DroidCom_fla.UnitSwarmer2_26)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitSwarmer2_26 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 15
//UnitTentacle_35 (DroidCom_fla.UnitTentacle_35)
package DroidCom_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitTentacle_35 extends MovieClip {
public var EndPiece:MovieClip;
public function UnitTentacle_35(){
addFrameScript(0, frame1, 89, frame90, 330, frame331, 370, frame371);
}
function frame90(){
gotoAndPlay(30);
}
function frame331(){
gotoAndPlay(30);
}
function frame1(){
stop();
}
function frame371(){
gotoAndPlay(341);
}
}
}//package DroidCom_fla
Section 16
//UnitTentacle2_37 (DroidCom_fla.UnitTentacle2_37)
package DroidCom_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitTentacle2_37 extends MovieClip {
public function UnitTentacle2_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package DroidCom_fla
Section 17
//UnitTriggerBeam1_173 (DroidCom_fla.UnitTriggerBeam1_173)
package DroidCom_fla {
import flash.display.*;
public dynamic class UnitTriggerBeam1_173 extends MovieClip {
public var RotatePart:MovieClip;
}
}//package DroidCom_fla
Section 18
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.events.*;
import flash.utils.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 19
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 20
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 21
//CheckBox (fl.controls.CheckBox)
package fl.controls {
import flash.display.*;
public class CheckBox extends LabelButton {
private static var defaultStyles:Object = {icon:null, upIcon:"CheckBox_upIcon", downIcon:"CheckBox_downIcon", overIcon:"CheckBox_overIcon", disabledIcon:"CheckBox_disabledIcon", selectedDisabledIcon:"CheckBox_selectedDisabledIcon", focusRectSkin:null, focusRectPadding:null, selectedUpIcon:"CheckBox_selectedUpIcon", selectedDownIcon:"CheckBox_selectedDownIcon", selectedOverIcon:"CheckBox_selectedOverIcon", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 << 1));
uiFocusRect.height = (background.height + (_local2 << 1));
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a CheckBox's toggle."));
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (CheckBox.createAccessibilityImplementation != null){
CheckBox.createAccessibilityImplementation(this);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 22
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 23
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var upArrow:BaseButton;
private var _pageScrollSize:Number;// = 0
protected var downArrow:BaseButton;
private var _pageSize:Number;// = 10
private var thumbScrollOffset:Number;
private var _maxScrollPosition:Number;// = 0
private var _scrollPosition:Number;// = 0
protected var track:BaseButton;
private var _minScrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
protected var thumb:LabelButton;
protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0};
public static const WIDTH:Number = 15;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35};
public function ScrollBar(){
_pageSize = 10;
_pageScrollSize = 0;
_lineScrollSize = 1;
_minScrollPosition = 0;
_maxScrollPosition = 0;
_scrollPosition = 0;
_direction = ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _arg1, _maxScrollPosition);
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
_scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1));
if (_local3 == _scrollPosition){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition));
};
updateThumb();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize);
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
_pageSize = _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
_minScrollPosition = _arg2;
_maxScrollPosition = _arg3;
if (_arg4 >= 0){
_pageScrollSize = _arg4;
};
enabled = (_maxScrollPosition > _minScrollPosition);
setScrollPosition(_scrollPosition, false);
updateThumb();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition))))));
updateThumb();
}
protected function updateThumb():void{
var _local1:Number;
_local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize);
if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
thumb.height = 12;
thumb.visible = false;
} else {
thumb.height = Math.max(13, ((_pageSize / _local1) * track.height));
thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition))));
thumb.visible = enabled;
};
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
inDrag = true;
thumbScrollOffset = (mouseY - thumb.y);
thumb.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
thumb.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
_pageScrollSize = _arg1;
};
}
protected function handleThumbDrag(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset)));
setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if (_direction == _arg1){
return;
};
_direction = _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = (_direction == ScrollBarDirection.HORIZONTAL);
if (((_local2) && (componentInspectorSetting))){
if (rotation == 90){
return;
};
setScaleX(-1);
rotation = -90;
};
if (!componentInspectorSetting){
if (((_local2) && ((rotation == 0)))){
rotation = -90;
setScaleX(-1);
} else {
if (((!(_local2)) && ((rotation == -90)))){
rotation = 0;
setScaleX(1);
};
};
};
invalidate(InvalidationType.SIZE);
}
public function set lineScrollSize(_arg1:Number):void{
if (_arg1 > 0){
_lineScrollSize = _arg1;
};
}
override public function get height():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function scrollPressHandler(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == upArrow){
setScrollPosition((_scrollPosition - _lineScrollSize));
} else {
if (_arg1.currentTarget == downArrow){
setScrollPosition((_scrollPosition + _lineScrollSize));
} else {
_local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition);
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if (_scrollPosition < _local2){
setScrollPosition(Math.min(_local2, (_scrollPosition + _local3)));
} else {
if (_scrollPosition > _local2){
setScrollPosition(Math.max(_local2, (_scrollPosition - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return (_pageSize);
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _minScrollPosition, _arg1);
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height)));
track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height))));
updateThumb();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
downArrow.drawNow();
upArrow.drawNow();
track.drawNow();
thumb.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
track = new BaseButton();
track.move(0, 14);
track.useHandCursor = false;
track.autoRepeat = true;
track.focusEnabled = false;
addChild(track);
thumb = new LabelButton();
thumb.label = "";
thumb.setSize(WIDTH, 15);
thumb.move(0, 15);
thumb.focusEnabled = false;
addChild(thumb);
downArrow = new BaseButton();
downArrow.setSize(WIDTH, 14);
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
addChild(downArrow);
upArrow = new BaseButton();
upArrow.setSize(WIDTH, 14);
upArrow.move(0, 0);
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
addChild(upArrow);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
enabled = false;
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if (_direction == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
override public function get width():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 24
//ScrollBarDirection (fl.controls.ScrollBarDirection)
package fl.controls {
public class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
}
}//package fl.controls
Section 25
//UIScrollBar (fl.controls.UIScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
import flash.text.*;
public class UIScrollBar extends ScrollBar {
protected var inScroll:Boolean;// = false
protected var _scrollTarget:TextField;
protected var inEdit:Boolean;// = false
private static var defaultStyles:Object = {};
public function UIScrollBar(){
inEdit = false;
inScroll = false;
super();
}
protected function handleTargetScroll(_arg1:Event):void{
if (inDrag){
return;
};
if (!enabled){
return;
};
inEdit = true;
updateScrollTargetProperties();
scrollPosition = ((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV;
inEdit = false;
}
override public function set minScrollPosition(_arg1:Number):void{
super.minScrollPosition = ((_arg1)<0) ? 0 : _arg1;
}
override public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
super.setScrollPosition(_arg1, _arg2);
if (!_scrollTarget){
inScroll = false;
return;
};
updateTargetScroll();
}
override public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
var _local5:Number;
var _local6:Number;
_local5 = _arg3;
_local6 = ((_arg2)<0) ? 0 : _arg2;
if (_scrollTarget != null){
if (direction == ScrollBarDirection.HORIZONTAL){
_local5 = ((_arg3)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local5;
} else {
_local5 = ((_arg3)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local5;
};
};
super.setScrollProperties(_arg1, _local6, _local5, _arg4);
}
public function get scrollTargetName():String{
return (_scrollTarget.name);
}
public function get scrollTarget():TextField{
return (_scrollTarget);
}
protected function updateScrollTargetProperties():void{
var _local1:Boolean;
var _local2:Number;
if (_scrollTarget == null){
setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, pageScrollSize);
scrollPosition = 0;
} else {
_local1 = (direction == ScrollBarDirection.HORIZONTAL);
_local2 = (_local1) ? _scrollTarget.width : 10;
setScrollProperties(_local2, (_local1) ? 0 : 1, (_local1) ? _scrollTarget.maxScrollH : _scrollTarget.maxScrollV, pageScrollSize);
scrollPosition = (_local1) ? _scrollTarget.scrollH : _scrollTarget.scrollV;
};
}
public function update():void{
inEdit = true;
updateScrollTargetProperties();
inEdit = false;
}
public function set scrollTargetName(_arg1:String):void{
var target = _arg1;
try {
scrollTarget = (parent.getChildByName(target) as TextField);
} catch(error:Error) {
throw (new Error("ScrollTarget not found, or is not a TextField"));
};
}
override public function set direction(_arg1:String):void{
if (isLivePreview){
return;
};
super.direction = _arg1;
updateScrollTargetProperties();
}
protected function handleTargetChange(_arg1:Event):void{
inEdit = true;
setScrollPosition(((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV, true);
updateScrollTargetProperties();
inEdit = false;
}
override public function set maxScrollPosition(_arg1:Number):void{
var _local2:Number;
_local2 = _arg1;
if (_scrollTarget != null){
if (direction == ScrollBarDirection.HORIZONTAL){
_local2 = ((_local2)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local2;
} else {
_local2 = ((_local2)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local2;
};
};
super.maxScrollPosition = _local2;
}
protected function updateTargetScroll(_arg1:ScrollEvent=null):void{
if (inEdit){
return;
};
if (direction == ScrollBarDirection.HORIZONTAL){
_scrollTarget.scrollH = scrollPosition;
} else {
_scrollTarget.scrollV = scrollPosition;
};
}
override protected function draw():void{
if (isInvalid(InvalidationType.DATA)){
updateScrollTargetProperties();
};
super.draw();
}
public function set scrollTarget(_arg1:TextField):void{
if (_scrollTarget != null){
_scrollTarget.removeEventListener(Event.CHANGE, handleTargetChange, false);
_scrollTarget.removeEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false);
_scrollTarget.removeEventListener(Event.SCROLL, handleTargetScroll, false);
removeEventListener(ScrollEvent.SCROLL, updateTargetScroll, false);
};
_scrollTarget = _arg1;
if (_scrollTarget != null){
_scrollTarget.addEventListener(Event.CHANGE, handleTargetChange, false, 0, true);
_scrollTarget.addEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false, 0, true);
_scrollTarget.addEventListener(Event.SCROLL, handleTargetScroll, false, 0, true);
addEventListener(ScrollEvent.SCROLL, updateTargetScroll, false, 0, true);
};
invalidate(InvalidationType.DATA);
}
override public function get direction():String{
return (super.direction);
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.controls
Section 26
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 27
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 28
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 29
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 30
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var _position:Number;
private var _direction:String;
private var _delta:Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
_direction = _arg1;
_delta = _arg2;
_position = _arg3;
}
override public function clone():Event{
return (new ScrollEvent(_direction, _delta, _position));
}
public function get position():Number{
return (_position);
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return (_delta);
}
public function get direction():String{
return (_direction);
}
}
}//package fl.events
Section 31
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 32
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 33
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 34
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 35
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 36
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
public class Color extends ColorTransform {
private var _tintMultiplier:Number;// = 0
private var _tintColor:Number;// = 0
public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
_tintColor = 0;
_tintMultiplier = 0;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setTint(_arg1:uint, _arg2:Number):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
public function set tintColor(_arg1:uint):void{
this.setTint(_arg1, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
private function deriveTintColor():uint{
var _local1:Number;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
_local1 = (1 / this.tintMultiplier);
_local2 = Math.round((this.redOffset * _local1));
_local3 = Math.round((this.greenOffset * _local1));
_local4 = Math.round((this.blueOffset * _local1));
_local5 = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set brightness(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
_local2 = (1 - Math.abs(_arg1));
_local3 = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
private function parseXML(_arg1:XML=null):Color{
var _local2:XML;
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
_local2 = _arg1.elements()[0];
if (!_local2){
return (this);
};
for each (_local3 in _local2.attributes()) {
_local4 = _local3.localName();
if (_local4 == "tintColor"){
_local5 = (Number(_local3.toString()) as uint);
this.tintColor = _local5;
} else {
this[_local4] = Number(_local3.toString());
};
};
return (this);
}
public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:uint;
_local4 = (1 - _arg3);
_local5 = ((_arg1 >> 24) & 0xFF);
_local6 = ((_arg1 >> 16) & 0xFF);
_local7 = ((_arg1 >> 8) & 0xFF);
_local8 = (_arg1 & 0xFF);
_local9 = ((_arg2 >> 24) & 0xFF);
_local10 = ((_arg2 >> 16) & 0xFF);
_local11 = ((_arg2 >> 8) & 0xFF);
_local12 = (_arg2 & 0xFF);
_local13 = ((_local5 * _local4) + (_local9 * _arg3));
_local14 = ((_local6 * _local4) + (_local10 * _arg3));
_local15 = ((_local7 * _local4) + (_local11 * _arg3));
_local16 = ((_local8 * _local4) + (_local12 * _arg3));
_local17 = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number;
var _local5:ColorTransform;
_local4 = (1 - _arg3);
_local5 = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
return (_local5);
}
public static function fromXML(_arg1:XML):Color{
return (Color(new (Color).parseXML(_arg1)));
}
}
}//package fl.motion
Section 37
//Antenna (Antenna)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class Antenna extends MovieClip {
public function Antenna(){
addFrameScript(28, frame29);
}
function frame29(){
gotoAndPlay(1);
}
}
}//package
Section 38
//BackgroundParticles (BackgroundParticles)
package {
import flash.display.*;
public dynamic class BackgroundParticles extends MovieClip {
}
}//package
Section 39
//Backgrounds (Backgrounds)
package {
import flash.display.*;
public dynamic class Backgrounds extends MovieClip {
public var Rays:MovieClip;
}
}//package
Section 40
//Blank (Blank)
package {
import flash.display.*;
public dynamic class Blank extends MovieClip {
}
}//package
Section 41
//BlueBulletCreated (BlueBulletCreated)
package {
import flash.media.*;
public dynamic class BlueBulletCreated extends Sound {
}
}//package
Section 42
//Briefing (Briefing)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Briefing extends MovieClip {
public var Text:TextField;
}
}//package
Section 43
//CheckBox_disabledIcon (CheckBox_disabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_disabledIcon extends MovieClip {
}
}//package
Section 44
//CheckBox_downIcon (CheckBox_downIcon)
package {
import flash.display.*;
public dynamic class CheckBox_downIcon extends MovieClip {
}
}//package
Section 45
//CheckBox_overIcon (CheckBox_overIcon)
package {
import flash.display.*;
public dynamic class CheckBox_overIcon extends MovieClip {
}
}//package
Section 46
//CheckBox_selectedDisabledIcon (CheckBox_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDisabledIcon extends MovieClip {
}
}//package
Section 47
//CheckBox_selectedDownIcon (CheckBox_selectedDownIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDownIcon extends MovieClip {
}
}//package
Section 48
//CheckBox_selectedOverIcon (CheckBox_selectedOverIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedOverIcon extends MovieClip {
}
}//package
Section 49
//CheckBox_selectedUpIcon (CheckBox_selectedUpIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedUpIcon extends MovieClip {
}
}//package
Section 50
//CheckBox_upIcon (CheckBox_upIcon)
package {
import flash.display.*;
public dynamic class CheckBox_upIcon extends MovieClip {
}
}//package
Section 51
//ChuteActivate (ChuteActivate)
package {
import flash.media.*;
public dynamic class ChuteActivate extends Sound {
}
}//package
Section 52
//Collapse (Collapse)
package {
import flash.media.*;
public dynamic class Collapse extends Sound {
}
}//package
Section 53
//Countdown (Countdown)
package {
import flash.media.*;
public dynamic class Countdown extends Sound {
}
}//package
Section 54
//CountdownCreated (CountdownCreated)
package {
import flash.media.*;
public dynamic class CountdownCreated extends Sound {
}
}//package
Section 55
//CrawlerStep (CrawlerStep)
package {
import flash.media.*;
public dynamic class CrawlerStep extends Sound {
}
}//package
Section 56
//Credits (Credits)
package {
import flash.display.*;
public dynamic class Credits extends MovieClip {
}
}//package
Section 57
//CreditsSong (CreditsSong)
package {
import flash.media.*;
public dynamic class CreditsSong extends Sound {
}
}//package
Section 58
//CreditsStart (CreditsStart)
package {
import flash.media.*;
public dynamic class CreditsStart extends Sound {
}
}//package
Section 59
//DataCheckerValid (DataCheckerValid)
package {
import flash.media.*;
public dynamic class DataCheckerValid extends Sound {
}
}//package
Section 60
//Debugger (Debugger)
package {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class Debugger extends MovieClip {
public var TextBox:TextField;
public var __id0_:UIScrollBar;
public function Debugger(){
__setProp___id0__Debugger_Layer1_1();
}
function __setProp___id0__Debugger_Layer1_1(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.direction = "vertical";
__id0_.scrollTargetName = "TextBox";
__id0_.visible = true;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 61
//DroidCom (DroidCom)
package {
import flash.display.*;
public dynamic class DroidCom extends MovieClip {
}
}//package
Section 62
//DroneBounce (DroneBounce)
package {
import flash.media.*;
public dynamic class DroneBounce extends Sound {
}
}//package
Section 63
//ElectricSpark (ElectricSpark)
package {
import flash.media.*;
public dynamic class ElectricSpark extends Sound {
}
}//package
Section 64
//EndCreditsSound (EndCreditsSound)
package {
import flash.media.*;
public dynamic class EndCreditsSound extends Sound {
}
}//package
Section 65
//Explosion (Explosion)
package {
import flash.media.*;
public dynamic class Explosion extends Sound {
}
}//package
Section 66
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 67
//GeneratorRandomSound (GeneratorRandomSound)
package {
import flash.media.*;
public dynamic class GeneratorRandomSound extends Sound {
}
}//package
Section 68
//GreenBulletCreated (GreenBulletCreated)
package {
import flash.media.*;
public dynamic class GreenBulletCreated extends Sound {
}
}//package
Section 69
//HamsterWorld (HamsterWorld)
package {
import flash.display.*;
public dynamic class HamsterWorld extends MovieClip {
}
}//package
Section 70
//InfoText (InfoText)
package {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class InfoText extends MovieClip {
public var Team:TextField;
public var Trigger1:TextField;
public var Text:TextField;
public var Trigger2:TextField;
public var Activated:CheckBox;
public var Trigger3:TextField;
public var Name:TextField;
public function InfoText(){
__setProp_Activated_InfoText_Layer1_1();
}
function __setProp_Activated_InfoText_Layer1_1(){
try {
Activated["componentInspectorSetting"] = true;
} catch(e:Error) {
};
Activated.enabled = true;
Activated.label = "Activated";
Activated.labelPlacement = "right";
Activated.selected = false;
Activated.visible = true;
try {
Activated["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 71
//LaserActivate (LaserActivate)
package {
import flash.media.*;
public dynamic class LaserActivate extends Sound {
}
}//package
Section 72
//LaserHit (LaserHit)
package {
import flash.media.*;
public dynamic class LaserHit extends Sound {
}
}//package
Section 73
//LevelFrames (LevelFrames)
package {
import flash.display.*;
public dynamic class LevelFrames extends MovieClip {
}
}//package
Section 74
//LevelName (LevelName)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LevelName extends MovieClip {
public var Text:TextField;
}
}//package
Section 75
//LeverActivate (LeverActivate)
package {
import flash.media.*;
public dynamic class LeverActivate extends Sound {
}
}//package
Section 76
//LiftActivate (LiftActivate)
package {
import flash.media.*;
public dynamic class LiftActivate extends Sound {
}
}//package
Section 77
//Links (Links)
package {
import flash.display.*;
public dynamic class Links extends MovieClip {
}
}//package
Section 78
//Lose (Lose)
package {
import flash.media.*;
public dynamic class Lose extends Sound {
}
}//package
Section 79
//MadComActivate (MadComActivate)
package {
import flash.media.*;
public dynamic class MadComActivate extends Sound {
}
}//package
Section 80
//MadComNewTentacle (MadComNewTentacle)
package {
import flash.media.*;
public dynamic class MadComNewTentacle extends Sound {
}
}//package
Section 81
//MadComReloadedLose (MadComReloadedLose)
package {
import flash.media.*;
public dynamic class MadComReloadedLose extends Sound {
}
}//package
Section 82
//MadComReloadedRandomSound (MadComReloadedRandomSound)
package {
import flash.media.*;
public dynamic class MadComReloadedRandomSound extends Sound {
}
}//package
Section 83
//MadComStep (MadComStep)
package {
import flash.media.*;
public dynamic class MadComStep extends Sound {
}
}//package
Section 84
//Message (Message)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Message extends MovieClip {
public var Text:TextField;
}
}//package
Section 85
//MessageSound (MessageSound)
package {
import flash.media.*;
public dynamic class MessageSound extends Sound {
}
}//package
Section 86
//NewGame (NewGame)
package {
import flash.display.*;
public dynamic class NewGame extends MovieClip {
}
}//package
Section 87
//Noise (Noise)
package {
import flash.display.*;
public dynamic class Noise extends MovieClip {
}
}//package
Section 88
//ParticleBlueBullet (ParticleBlueBullet)
package {
import flash.display.*;
public dynamic class ParticleBlueBullet extends MovieClip {
}
}//package
Section 89
//ParticleBlueFlame (ParticleBlueFlame)
package {
import flash.display.*;
public dynamic class ParticleBlueFlame extends MovieClip {
}
}//package
Section 90
//ParticleCave (ParticleCave)
package {
import flash.display.*;
public dynamic class ParticleCave extends MovieClip {
}
}//package
Section 91
//ParticleConcrete (ParticleConcrete)
package {
import flash.display.*;
public dynamic class ParticleConcrete extends MovieClip {
}
}//package
Section 92
//ParticleElectricity (ParticleElectricity)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class ParticleElectricity extends MovieClip {
public function ParticleElectricity(){
addFrameScript(3, frame4);
}
function frame4(){
gotoAndPlay(1);
}
}
}//package
Section 93
//ParticleFireball (ParticleFireball)
package {
import flash.display.*;
public dynamic class ParticleFireball extends MovieClip {
}
}//package
Section 94
//ParticleFlame (ParticleFlame)
package {
import flash.display.*;
public dynamic class ParticleFlame extends MovieClip {
}
}//package
Section 95
//ParticleMetal (ParticleMetal)
package {
import flash.display.*;
public dynamic class ParticleMetal extends MovieClip {
}
}//package
Section 96
//ParticlePickup (ParticlePickup)
package {
import flash.display.*;
public dynamic class ParticlePickup extends MovieClip {
}
}//package
Section 97
//ParticlePlasma (ParticlePlasma)
package {
import flash.display.*;
public dynamic class ParticlePlasma extends MovieClip {
}
}//package
Section 98
//ParticlePlayerBullet (ParticlePlayerBullet)
package {
import flash.display.*;
public dynamic class ParticlePlayerBullet extends MovieClip {
}
}//package
Section 99
//ParticlePortal (ParticlePortal)
package {
import flash.display.*;
public dynamic class ParticlePortal extends MovieClip {
}
}//package
Section 100
//ParticleSpark (ParticleSpark)
package {
import flash.display.*;
public dynamic class ParticleSpark extends MovieClip {
}
}//package
Section 101
//ParticleSpeakBubble (ParticleSpeakBubble)
package {
import flash.display.*;
public dynamic class ParticleSpeakBubble extends MovieClip {
}
}//package
Section 102
//ParticleWall (ParticleWall)
package {
import flash.display.*;
public dynamic class ParticleWall extends MovieClip {
}
}//package
Section 103
//PickupActivate (PickupActivate)
package {
import flash.media.*;
public dynamic class PickupActivate extends Sound {
}
}//package
Section 104
//PlasmaCreated (PlasmaCreated)
package {
import flash.media.*;
public dynamic class PlasmaCreated extends Sound {
}
}//package
Section 105
//PlayerCyborgJump (PlayerCyborgJump)
package {
import flash.media.*;
public dynamic class PlayerCyborgJump extends Sound {
}
}//package
Section 106
//PlayerCyborgStep (PlayerCyborgStep)
package {
import flash.media.*;
public dynamic class PlayerCyborgStep extends Sound {
}
}//package
Section 107
//Presents (Presents)
package {
import flash.display.*;
public dynamic class Presents extends MovieClip {
}
}//package
Section 108
//ProgressBarClip (ProgressBarClip)
package {
import flash.display.*;
public dynamic class ProgressBarClip extends MovieClip {
}
}//package
Section 109
//RGB (RGB)
package {
import flash.display.*;
public dynamic class RGB extends MovieClip {
}
}//package
Section 110
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 111
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 112
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 113
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 114
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 115
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 116
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 117
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 118
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 119
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 120
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 121
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 122
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 123
//ShutdownTurretLaser (ShutdownTurretLaser)
package {
import flash.media.*;
public dynamic class ShutdownTurretLaser extends Sound {
}
}//package
Section 124
//Song1 (Song1)
package {
import flash.media.*;
public dynamic class Song1 extends Sound {
}
}//package
Section 125
//Song2 (Song2)
package {
import flash.media.*;
public dynamic class Song2 extends Sound {
}
}//package
Section 126
//Song3 (Song3)
package {
import flash.media.*;
public dynamic class Song3 extends Sound {
}
}//package
Section 127
//Song4 (Song4)
package {
import flash.media.*;
public dynamic class Song4 extends Sound {
}
}//package
Section 128
//Song5 (Song5)
package {
import flash.media.*;
public dynamic class Song5 extends Sound {
}
}//package
Section 129
//Song6 (Song6)
package {
import flash.media.*;
public dynamic class Song6 extends Sound {
}
}//package
Section 130
//Song7 (Song7)
package {
import flash.media.*;
public dynamic class Song7 extends Sound {
}
}//package
Section 131
//Song8 (Song8)
package {
import flash.media.*;
public dynamic class Song8 extends Sound {
}
}//package
Section 132
//SpinnerActivate (SpinnerActivate)
package {
import flash.media.*;
public dynamic class SpinnerActivate extends Sound {
}
}//package
Section 133
//Static (Static)
package {
import flash.media.*;
public dynamic class Static extends Sound {
}
}//package
Section 134
//StatusBar (StatusBar)
package {
import flash.display.*;
public dynamic class StatusBar extends MovieClip {
public var Health:MovieClip;
public var Time:MovieClip;
}
}//package
Section 135
//SwarmerBeam (SwarmerBeam)
package {
import flash.media.*;
public dynamic class SwarmerBeam extends Sound {
}
}//package
Section 136
//TankActivate (TankActivate)
package {
import flash.media.*;
public dynamic class TankActivate extends Sound {
}
}//package
Section 137
//TankStep (TankStep)
package {
import flash.media.*;
public dynamic class TankStep extends Sound {
}
}//package
Section 138
//TeleportSpawn (TeleportSpawn)
package {
import flash.media.*;
public dynamic class TeleportSpawn extends Sound {
}
}//package
Section 139
//TestPattern (TestPattern)
package {
import flash.display.*;
public dynamic class TestPattern extends MovieClip {
}
}//package
Section 140
//TitleSong (TitleSong)
package {
import flash.media.*;
public dynamic class TitleSong extends Sound {
}
}//package
Section 141
//Trapdoor (Trapdoor)
package {
import flash.media.*;
public dynamic class Trapdoor extends Sound {
}
}//package
Section 142
//TriggerBeam (TriggerBeam)
package {
import flash.media.*;
public dynamic class TriggerBeam extends Sound {
}
}//package
Section 143
//UnitBlueBullet (UnitBlueBullet)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitBlueBullet extends MovieClip {
public function UnitBlueBullet(){
addFrameScript(4, frame5);
}
function frame5(){
gotoAndPlay(1);
}
}
}//package
Section 144
//UnitBouncer (UnitBouncer)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitBouncer extends MovieClip {
public function UnitBouncer(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package
Section 145
//UnitBox (UnitBox)
package {
import flash.display.*;
public dynamic class UnitBox extends MovieClip {
}
}//package
Section 146
//UnitChute (UnitChute)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitChute extends MovieClip {
public function UnitChute(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package
Section 147
//UnitColumn (UnitColumn)
package {
import flash.display.*;
public dynamic class UnitColumn extends MovieClip {
}
}//package
Section 148
//UnitCountdown (UnitCountdown)
package {
import flash.display.*;
import flash.text.*;
public dynamic class UnitCountdown extends MovieClip {
public var Text:TextField;
}
}//package
Section 149
//UnitCrate (UnitCrate)
package {
import flash.display.*;
public dynamic class UnitCrate extends MovieClip {
}
}//package
Section 150
//UnitCrawler (UnitCrawler)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitCrawler extends MovieClip {
public var Laser1:MovieClip;
public var Laser2:MovieClip;
public function UnitCrawler(){
addFrameScript(31, frame32, 63, frame64);
}
function frame64(){
gotoAndPlay(33);
}
function frame32(){
gotoAndPlay(1);
}
}
}//package
Section 151
//UnitCyborg (UnitCyborg)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitCyborg extends MovieClip {
public function UnitCyborg(){
addFrameScript(18, frame19, 38, frame39, 48, frame49);
}
function frame19(){
gotoAndPlay(1);
}
function frame39(){
gotoAndPlay(1);
}
function frame49(){
stop();
}
}
}//package
Section 152
//UnitDataChecker (UnitDataChecker)
package {
import flash.display.*;
public dynamic class UnitDataChecker extends MovieClip {
public var Holder:MovieClip;
}
}//package
Section 153
//UnitDataDisc (UnitDataDisc)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitDataDisc extends MovieClip {
public function UnitDataDisc(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package
Section 154
//UnitDrone (UnitDrone)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitDrone extends MovieClip {
public function UnitDrone(){
addFrameScript(12, frame13, 18, frame19);
}
function frame19(){
gotoAndPlay(14);
}
function frame13(){
gotoAndPlay(1);
}
}
}//package
Section 155
//UnitEscapeLift (UnitEscapeLift)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitEscapeLift extends MovieClip {
public function UnitEscapeLift(){
addFrameScript(1384, frame1385);
}
function frame1385(){
stop();
}
}
}//package
Section 156
//UnitFan (UnitFan)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitFan extends MovieClip {
public function UnitFan(){
addFrameScript(19, frame20);
}
function frame20(){
gotoAndPlay(1);
}
}
}//package
Section 157
//UnitGenerator (UnitGenerator)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitGenerator extends MovieClip {
public function UnitGenerator(){
addFrameScript(3, frame4);
}
function frame4(){
gotoAndPlay(1);
}
}
}//package
Section 158
//UnitLamp (UnitLamp)
package {
import flash.display.*;
public dynamic class UnitLamp extends MovieClip {
public var Light:MovieClip;
}
}//package
Section 159
//UnitLaserEmitter (UnitLaserEmitter)
package {
import flash.display.*;
public dynamic class UnitLaserEmitter extends MovieClip {
public var RotateMC:MovieClip;
public var Laser1:MovieClip;
public var Laser2:MovieClip;
}
}//package
Section 160
//UnitLever (UnitLever)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitLever extends MovieClip {
public function UnitLever(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 161
//UnitLift (UnitLift)
package {
import flash.display.*;
public dynamic class UnitLift extends MovieClip {
}
}//package
Section 162
//UnitMadCom (UnitMadCom)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitMadCom extends MovieClip {
public var Turret2:MovieClip;
public var Tentacle4Laser2:MovieClip;
public var Turret1:MovieClip;
public var Tentacle1Laser2:MovieClip;
public var Tentacle4Laser1:MovieClip;
public var Tentacle1Laser1:MovieClip;
public var Text:TextField;
public var Tentacle2Laser1:MovieClip;
public var Tentacle2Laser2:MovieClip;
public var Tentacle3:MovieClip;
public var Tentacle4:MovieClip;
public var Tentacle2:MovieClip;
public var Holder:MovieClip;
public var Tentacle1:MovieClip;
public var Tentacle3Laser2:MovieClip;
public var Tentacle3Laser1:MovieClip;
public function UnitMadCom(){
addFrameScript(109, frame110, 159, frame160, 189, frame190);
}
function frame160(){
gotoAndPlay(140);
}
function frame110(){
gotoAndPlay(20);
}
function frame190(){
stop();
}
}
}//package
Section 163
//UnitMadComReloaded (UnitMadComReloaded)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitMadComReloaded extends MovieClip {
public var Tentacle1Laser2:MovieClip;
public var Text1:TextField;
public var Tentacle1Laser1:MovieClip;
public var Text2:TextField;
public var Text:TextField;
public var Tentacle3:MovieClip;
public var Holder:MovieClip;
public var Tentacle1:MovieClip;
public var Tentacle3Laser2:MovieClip;
public var Tentacle3Laser1:MovieClip;
public function UnitMadComReloaded(){
addFrameScript(79, frame80, 249, frame250);
}
function frame80(){
gotoAndPlay(1);
}
function frame250(){
stop();
}
}
}//package
Section 164
//UnitMusic (UnitMusic)
package {
import flash.display.*;
import flash.text.*;
public dynamic class UnitMusic extends MovieClip {
public var Artist:TextField;
public var Name:TextField;
}
}//package
Section 165
//UnitPanel1 (UnitPanel1)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPanel1 extends MovieClip {
public function UnitPanel1(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(1);
}
}
}//package
Section 166
//UnitPanel2 (UnitPanel2)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPanel2 extends MovieClip {
public function UnitPanel2(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(1);
}
}
}//package
Section 167
//UnitPanel3 (UnitPanel3)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPanel3 extends MovieClip {
public function UnitPanel3(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(1);
}
}
}//package
Section 168
//UnitPanel4 (UnitPanel4)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPanel4 extends MovieClip {
public function UnitPanel4(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(1);
}
}
}//package
Section 169
//UnitPanel5 (UnitPanel5)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPanel5 extends MovieClip {
public function UnitPanel5(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(1);
}
}
}//package
Section 170
//UnitPickup (UnitPickup)
package {
import flash.display.*;
public dynamic class UnitPickup extends MovieClip {
}
}//package
Section 171
//UnitPickupChronoManipulator (UnitPickupChronoManipulator)
package {
import flash.display.*;
public dynamic class UnitPickupChronoManipulator extends MovieClip {
}
}//package
Section 172
//UnitPickupGun (UnitPickupGun)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPickupGun extends MovieClip {
public function UnitPickupGun(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package
Section 173
//UnitPickupKeycard (UnitPickupKeycard)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPickupKeycard extends MovieClip {
public function UnitPickupKeycard(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package
Section 174
//UnitPickupRepair (UnitPickupRepair)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPickupRepair extends MovieClip {
public function UnitPickupRepair(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package
Section 175
//UnitPickupSave (UnitPickupSave)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPickupSave extends MovieClip {
public function UnitPickupSave(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package
Section 176
//UnitPlasma (UnitPlasma)
package {
import flash.display.*;
public dynamic class UnitPlasma extends MovieClip {
}
}//package
Section 177
//UnitPlasmaWall (UnitPlasmaWall)
package {
import flash.display.*;
public dynamic class UnitPlasmaWall extends MovieClip {
public var RotateMC:MovieClip;
public var Laser1:MovieClip;
public var Laser2:MovieClip;
}
}//package
Section 178
//UnitPlayer (UnitPlayer)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPlayer extends MovieClip {
public var Hand:MovieClip;
public function UnitPlayer(){
addFrameScript(20, frame21, 29, frame30, 38, frame39, 49, frame50, 59, frame60, 69, frame70);
}
function frame70(){
stop();
}
function frame21(){
gotoAndPlay(1);
}
function frame30(){
gotoAndPlay(1);
}
function frame39(){
stop();
}
function frame50(){
gotoAndPlay(1);
}
function frame60(){
stop();
}
}
}//package
Section 179
//UnitPlayerBullet (UnitPlayerBullet)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitPlayerBullet extends MovieClip {
public function UnitPlayerBullet(){
addFrameScript(4, frame5);
}
function frame5(){
gotoAndPlay(1);
}
}
}//package
Section 180
//UnitProxy (UnitProxy)
package {
import flash.display.*;
public dynamic class UnitProxy extends MovieClip {
public var RotateMC:MovieClip;
public var Laser1:MovieClip;
public var Laser2:MovieClip;
}
}//package
Section 181
//UnitRock (UnitRock)
package {
import flash.display.*;
public dynamic class UnitRock extends MovieClip {
}
}//package
Section 182
//UnitSign (UnitSign)
package {
import flash.display.*;
public dynamic class UnitSign extends MovieClip {
}
}//package
Section 183
//UnitSigntry (UnitSigntry)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitSigntry extends MovieClip {
public var RotateMC:MovieClip;
public var Text:TextField;
public function UnitSigntry(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
stop();
stop();
}
}
}//package
Section 184
//UnitSpawner (UnitSpawner)
package {
import flash.display.*;
public dynamic class UnitSpawner extends MovieClip {
}
}//package
Section 185
//UnitSpeakBubble (UnitSpeakBubble)
package {
import flash.display.*;
import flash.text.*;
public dynamic class UnitSpeakBubble extends MovieClip {
public var Text:TextField;
}
}//package
Section 186
//UnitSpikes (UnitSpikes)
package {
import flash.display.*;
public dynamic class UnitSpikes extends MovieClip {
}
}//package
Section 187
//UnitSpinner (UnitSpinner)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitSpinner extends MovieClip {
public function UnitSpinner(){
addFrameScript(10, frame11, 15, frame16);
}
function frame16(){
gotoAndStop(1);
}
function frame11(){
gotoAndPlay(7);
}
}
}//package
Section 188
//UnitSpotlight (UnitSpotlight)
package {
import flash.display.*;
public dynamic class UnitSpotlight extends MovieClip {
public var RotateMC:MovieClip;
}
}//package
Section 189
//UnitSwarmer (UnitSwarmer)
package {
import flash.display.*;
public dynamic class UnitSwarmer extends MovieClip {
public var RotateMC:MovieClip;
}
}//package
Section 190
//UnitTank (UnitTank)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitTank extends MovieClip {
public function UnitTank(){
addFrameScript(70, frame71);
}
function frame71(){
gotoAndPlay(1);
}
}
}//package
Section 191
//UnitTeleporter (UnitTeleporter)
package {
import flash.display.*;
public dynamic class UnitTeleporter extends MovieClip {
}
}//package
Section 192
//UnitTrapDoor (UnitTrapDoor)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitTrapDoor extends MovieClip {
public function UnitTrapDoor(){
addFrameScript(14, frame15, 29, frame30);
}
function frame15(){
stop();
}
function frame30(){
gotoAndStop(1);
}
}
}//package
Section 193
//UnitTriggerBeam (UnitTriggerBeam)
package {
import flash.display.*;
public dynamic class UnitTriggerBeam extends MovieClip {
public var RotateMC:MovieClip;
public var Laser1:MovieClip;
public var Laser2:MovieClip;
}
}//package
Section 194
//UnitTurret (UnitTurret)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.net.*;
public dynamic class UnitTurret extends MovieClip {
public function UnitTurret(){
addFrameScript(25, frame26, 32, frame33);
}
function frame26(){
gotoAndPlay(14);
}
function frame33(){
gotoAndStop(1);
}
}
}//package
Section 195
//UnitUnstableCave (UnitUnstableCave)
package {
import flash.display.*;
public dynamic class UnitUnstableCave extends MovieClip {
}
}//package
Section 196
//UnitUnstableConcrete (UnitUnstableConcrete)
package {
import flash.display.*;
public dynamic class UnitUnstableConcrete extends MovieClip {
}
}//package
Section 197
//UnitUnstableWall (UnitUnstableWall)
package {
import flash.display.*;
public dynamic class UnitUnstableWall extends MovieClip {
}
}//package