Frame 3
function loadGame() {
if (_loaded) {
if (_preloader._currentframe < 30) {
return(undefined);
}
clearInterval(loadInt);
gotoAndPlay (100);
return(undefined);
}
var _local2 = (getBytesLoaded() / getBytesTotal()) * 100;
var _local1 = _framesloaded;
if (_local1 >= 100) {
_loaded = true;
_preloader.gotoAndPlay(2);
return(undefined);
}
if (_local1 > 1) {
_preloader.done_txt.text = _local1 + "%";
_loaded = false;
}
}
var _loaded = false;
loadInt = setInterval(loadGame, 50);
stop();
Frame 105
stop();
Symbol 10 MovieClip Frame 12
gotoAndPlay (1);
Symbol 22 MovieClip Frame 30
gotoAndPlay (1);
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 40
stop();
Symbol 46 MovieClip [Flag_checkpoint] Frame 10
stop();
Symbol 50 MovieClip [token_Cheese] Frame 26
stop();
Symbol 67 MovieClip [hitspark02] Frame 9
stop();
Symbol 67 MovieClip [hitspark02] Frame 34
stop();
Symbol 78 MovieClip [hitspark01] Frame 6
stop();
Symbol 507 MovieClip [motionLines] Frame 10
stop();
Symbol 509 MovieClip [scrn_Black] Frame 10
stop();
Symbol 593 MovieClip [plat_door_Back] Frame 10
stop();
Symbol 593 MovieClip [plat_door_Back] Frame 20
stop();
Symbol 593 MovieClip [plat_door_Back] Frame 30
stop();
Symbol 640 MovieClip [plat_switch] Frame 19
gotoAndPlay (10);
Symbol 740 MovieClip [End_Door] Frame 14
stop();
Symbol 740 MovieClip [End_Door] Frame 28
stop();
Symbol 740 MovieClip [End_Door] Frame 42
stop();
Symbol 761 MovieClip [item_Gun] Frame 25
gotoAndPlay (10);
Symbol 761 MovieClip [item_Gun] Frame 40
gotoAndPlay (26);
Symbol 786 MovieClip [item_Box] Frame 20
gotoAndPlay (2);
Symbol 786 MovieClip [item_Box] Frame 51
gotoAndPlay (30);
Symbol 804 MovieClip [spike_grndBall] Frame 54
gotoAndPlay (10);
Symbol 804 MovieClip [spike_grndBall] Frame 80
gotoAndPlay (55);
Symbol 828 MovieClip [signs] Frame 46
gotoAndPlay ("rail/flip");
Symbol 828 MovieClip [signs] Frame 87
gotoAndPlay ("tow/throw");
Symbol 828 MovieClip [signs] Frame 128
gotoAndPlay ("gun throw");
Symbol 904 MovieClip [scrn_TitlecardAlt] Frame 73
gotoAndPlay ("swing");
Symbol 1078 MovieClip [LoadingLevelScreen] Frame 16
stop();
Symbol 1078 MovieClip [LoadingLevelScreen] Frame 32
stop();
Symbol 1078 MovieClip [LoadingLevelScreen] Frame 48
stop();
Symbol 1093 Button
on (release) {
gotoAndPlay (1);
billypuppet.gotoAndPlay("idle");
}
Symbol 1099 Button
on (release) {
play();
billypuppet.gotoAndPlay("runwcheese");
}
Symbol 1108 MovieClip Frame 2
stop();
Symbol 1112 MovieClip [scrn_Win] Frame 40
gotoAndPlay (1);
Symbol 1120 MovieClip [scrn_WinAlt] Frame 40
gotoAndPlay (1);
Symbol 1429 MovieClip Frame 129
gotoAndPlay (1);
Symbol 1429 MovieClip Frame 153
gotoAndPlay ("runwcheese");
Symbol 1429 MovieClip Frame 213
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 305
gotoAndPlay ("magnetjump");
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 306
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 332
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 366
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 422
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 438
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 472
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 528
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 544
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 578
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 634
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 650
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 684
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 740
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 756
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 790
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 846
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 862
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 896
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 952
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 968
_parent.bgscroll.stop();
Symbol 1429 MovieClip Frame 1002
_parent.bgscroll.play();
Symbol 1429 MovieClip Frame 1057
gotoAndPlay ("runsigns");
Symbol 1434 Button
on (release) {
play();
billypuppet.gotoAndPlay("runwcheese");
}
Symbol 1451 Button
on (release) {
gotoAndPlay (1);
billypuppet.gotoAndPlay("idle");
}
Symbol 1452 Button
on (release) {
play();
billypuppet.gotoAndPlay("magnetjump");
}
Symbol 1455 Button
on (release) {
gotoAndPlay ("fwd1");
billypuppet.gotoAndPlay("runwcheese");
bgscroll.play();
}
Symbol 1456 Button
on (release) {
play();
billypuppet.gotoAndPlay("runsigns");
}
Symbol 1459 Button
on (release) {
play();
}
Symbol 1461 Button
on (release) {
gotoAndPlay ("fwd2");
billypuppet.gotoAndPlay("magnetjump");
bgscroll.play();
}
Symbol 1462 MovieClip [scrn_Instructions] Frame 14
stop();
Symbol 1462 MovieClip [scrn_Instructions] Frame 31
stop();
Symbol 1462 MovieClip [scrn_Instructions] Frame 49
stop();
Symbol 1462 MovieClip [scrn_Instructions] Frame 67
stop();
Symbol 1463 Button
on (release) {
gotoAndPlay (1);
billypuppet.gotoAndPlay("idle");
}
Symbol 1464 Button
on (release) {
gotoAndPlay ("fwd1");
billypuppet.gotoAndPlay("runwcheese");
bgscroll.play();
}
Symbol 1465 Button
on (release) {
gotoAndPlay ("fwd2");
billypuppet.gotoAndPlay("magnetjump");
bgscroll.play();
}
Symbol 1466 MovieClip [scrn_InstructionsAlt] Frame 14
stop();
Symbol 1466 MovieClip [scrn_InstructionsAlt] Frame 31
stop();
Symbol 1466 MovieClip [scrn_InstructionsAlt] Frame 49
stop();
Symbol 1466 MovieClip [scrn_InstructionsAlt] Frame 67
stop();
Symbol 1467 MovieClip [scrn_Titlecard] Frame 73
gotoAndPlay ("swing");
Symbol 1666 MovieClip [__Packages.Base.GameEntry] Frame 0
class Base.GameEntry extends MovieClip
{
static var app;
var _timeMgr, _uiMgr, _padMgr, _gameData, _background, _sndMgr, _gameMgr, _parent, onEnterFrame, _profiler;
function GameEntry () {
super();
_timeMgr = new Base.Time();
_uiMgr = new UI.UIManager(this);
_padMgr = new Pad.PadManager();
_gameData = new Game.GameData(this);
_background = new Game.Background(this);
_sndMgr = new Base.SoundModule();
_gameMgr = new Game.GameManager(_parent);
onEnterFrame = Update;
}
function getDT() {
return(_timeMgr.getElapsedTime());
}
function getParent() {
return(_parent);
}
function getTimeManager() {
return(_timeMgr);
}
function getGameManager() {
return(_gameMgr);
}
function getPadManager() {
return(_padMgr);
}
function getGameData() {
return(_gameData);
}
function getUIManager() {
return(_uiMgr);
}
function getBackground() {
return(_background);
}
function getProfiler() {
return(_profiler);
}
function Update() {
_timeMgr.markTimeThisTick();
_padMgr.Update(this);
_uiMgr.Update();
_gameMgr.Update(this);
_background.moveBack(this);
return(undefined);
}
function toString() {
return("GameEntry()");
}
static function main(mc) {
app = new Base.GameEntry();
}
}
Symbol 1667 MovieClip [__Packages.Base.Time] Frame 0
class Base.Time
{
var _currentTime, _timeLastTick, _gameSpeed, _startTime, _averageTime, _currentPlaceInAvgArray;
function Time () {
_currentTime = 0;
_timeLastTick = 0.001;
_gameSpeed = INITIAL_GAME_SPEED;
_startTime = (getTimer() * INITIAL_GAME_SPEED) / 1000;
_averageTime = new Array(0.01666, 0.01666, 0.01666, 0.01666, 0.01666, 0.01666, 0.01666, 0.01666, 0.01666, 0.01666);
_currentPlaceInAvgArray = 0;
_currentTime = getTimer();
}
function getElapsedTime() {
return(_timeLastTick);
}
function getCurTime() {
return(_currentTime);
}
function getGameSpeed() {
return(_gameSpeed);
}
function getAverageTime() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < 10) {
_local3 = _local3 + _averageTime[_local2];
_local2++;
}
_local3 = _local3 / 10;
return(_local3);
}
function getFramerate() {
return(Math.floor(1 / getAverageTime()));
}
function markTimeThisTick() {
var _local2 = ((getTimer() * _gameSpeed) / 1000) - _startTime;
_timeLastTick = _local2 - _currentTime;
_currentTime = _local2;
_averageTime[_currentPlaceInAvgArray++] = _timeLastTick;
if (_currentPlaceInAvgArray >= 10) {
_currentPlaceInAvgArray = 0;
}
if (_timeLastTick <= 0) {
_timeLastTick = 0.001;
}
}
function setGameSpeed(speed) {
_gameSpeed = speed;
if (_gameSpeed < MIN_GAME_SPEED) {
_gameSpeed = MIN_GAME_SPEED;
} else if (_gameSpeed > MAX_GAME_SPEED) {
_gameSpeed = MIN_GAME_SPEED;
}
}
static var INITIAL_GAME_SPEED = 1;
static var MIN_GAME_SPEED = 0.001;
static var MAX_GAME_SPEED = 100;
}
Symbol 1668 MovieClip [__Packages.UI.UIManager] Frame 0
class UI.UIManager
{
var _gameContext, _uiReturnVal, _screen, _children, _cursor, _nonBufferCursor, _cursorOn, _scoreBoard;
function UIManager (gameContext) {
_gameContext = gameContext;
}
function Update() {
_uiReturnVal = -1;
updateCursor();
updateScoreboard();
var _local3 = 0;
while (_local3 < _screen.getNumChildren()) {
var _local2 = _screen.getChildName(_local3);
if (_screen.isChildAnimating(_local2)) {
_screen.animateChild(_local2);
}
if (!_screen.getChildSelectable(_local2)) {
} else {
var _local8 = _children[_local3][5];
var _local5 = _children[_local3][6];
var _local9 = _children[_local3][7];
var _local10 = _children[_local3][8];
switch (_screen.getChildSelectable(_local2)) {
case 1 :
if (_screen.isBufferMouseOverChild(_local2) || (((_screen.getClipName() == "PauseInstructions") || (_screen.getClipName() == "Skill")) && (_screen.isMouseOverChild(_local2)))) {
if ((!_screen.isChildAnimating(_local2)) && (_screen.getChildCurrentAnimFrame(_local2) <= _local8)) {
cursorOn();
_screen.startAnimatingChild(_local2, _local8, _local5, _local9, _local10);
}
if (_screen.getChildSelectOnKeyDown(_local2) && (_gameContext.getPadManager().getMouseJustPressed())) {
cursorOff();
_uiReturnVal = _screen.getChildReturnVal(_local2);
} else if ((!_screen.getChildSelectOnKeyDown(_local2)) && (_gameContext.getPadManager().getMouseReleased())) {
cursorOff();
_uiReturnVal = _screen.getChildReturnVal(_local2);
}
} else if ((!_screen.isChildAnimating(_local2)) && (_screen.getChildCurrentAnimFrame(_local2) == _local5)) {
_local8 = _children[_local3][6];
_local5 = _children[_local3][5];
cursorOff();
_screen.startAnimatingChild(_local2, _local8, _local5, _local9, _local10);
}
break;
case 2 :
var _local11 = _screen.getChildMouseIsOver();
if (_local11 != null) {
cursorOn();
if (_screen.isMouseOverChild(_local2)) {
if (_screen.getChildSelectOnKeyDown(_local2) && (_gameContext.getPadManager().getMouseJustPressed())) {
_screen.moveChildToFrame(_local2, _local5);
setUIReturnVal(_screen.getChildReturnVal(_local2));
var _local4 = 0;
while (_children[_local3][11][_local4] != undefined) {
var _local6 = _screen.getChildName(_children[_local3][11][_local4]);
var _local7 = _children[_local4][5];
_screen.moveChildToFrame(_local6, _local7);
_local4++;
}
} else if ((!_screen.getChildSelectOnKeyDown(_local2)) && (_gameContext.getPadManager().getMouseReleased())) {
_screen.moveChildToFrame(_local2, _local5);
setUIReturnVal(_screen.getChildReturnVal(_local2));
var _local4 = 0;
while (_children[_local3][11][_local4] != undefined) {
var _local6 = _screen.getChildName(_children[_local3][11][_local4]);
var _local7 = _children[_local4][5];
_screen.moveChildToFrame(_local6, _local7);
_local4++;
}
}
}
} else {
cursorOff();
}
}
}
_local3++;
}
}
function moveScreenToFrame(num) {
_screen.moveToFrame(num);
}
function setUIReturnVal(val) {
_uiReturnVal = val;
}
function getUIReturnVal() {
return(_uiReturnVal);
}
function getScreen() {
return(_screen);
}
function showScreen(screen, initFrame, defaultSetting) {
if (_screen != undefined) {
removeScreen();
}
_screen = new Base.SpriteEntity(_gameContext, screen.id, screen.idx, screen.spriteName, screen.clipName, screen.depth, screen.xPos, screen.yPos, screen.regPt, screen.w, screen.h);
_children = screen.children;
var _local2 = 0;
var _local8 = 0;
if (initFrame != undefined) {
_local8 = initFrame;
}
_screen.moveToFrame(_local8);
while (_children[_local2][0] != undefined) {
_screen.addChild(screen.children[_local2][0], screen.children[_local2][1], screen.children[_local2][2], screen.children[_local2][3], screen.children[_local2][4], screen.children[_local2][9], screen.children[_local2][10]);
_local2++;
}
var _local4 = 0;
while (defaultSetting[_local4] != undefined) {
var _local5 = _children[defaultSetting[_local4]][0];
var _local6 = _children[defaultSetting[_local4]][6];
_screen.moveChildToFrame(_local5, _local6);
_local4++;
}
}
function removeScreen() {
_screen.removeSprite();
delete _screen;
}
function setCursor(sprite) {
_cursor = new Base.SpriteEntity(_gameContext, sprite.id, sprite.idx, sprite.spriteName, sprite.clipName, sprite.depth, sprite.xPos, sprite.yPos, sprite.regPt, sprite.w, sprite.h);
_nonBufferCursor = new Base.SpriteEntity(_gameContext, sprite.id, sprite.idx, sprite.spriteName, sprite.clipName + 1, sprite.depth + 1, sprite.xPos, sprite.yPos, sprite.regPt, sprite.w, sprite.h);
_cursor.setVisibility(false);
_cursorOn = false;
_nonBufferCursor.setVisibility(false);
}
function cursorOn() {
if (_cursorOn == true) {
return(undefined);
}
_cursorOn = true;
updateCursor();
_cursor.setVisibility(true);
_nonBufferCursor.setVisibility(true);
Mouse.hide();
}
function cursorOff() {
if (_cursorOn == false) {
return(undefined);
}
_cursorOn = false;
_cursor.setVisibility(false);
_nonBufferCursor.setVisibility(false);
Mouse.show();
}
function updateCursor() {
if (_cursorOn) {
if (_screen.getClipName() == "PauseInstructions") {
_nonBufferCursor.setPositionX(_gameContext.getPadManager().getMousePosX());
_nonBufferCursor.setPositionY(_gameContext.getPadManager().getMousePosY());
} else {
_cursor.setPositionX(_gameContext.getGameData().getBufferMouseX());
_cursor.setPositionY(_gameContext.getGameData().getBufferMouseY());
}
}
}
function setNonBufferCursorPosition() {
_nonBufferCursor.setPositionX(_gameContext.getPadManager().getMousePosX());
_nonBufferCursor.setPositionY(_gameContext.getPadManager().getMousePosY());
}
function getCursor() {
return(_cursor);
}
function addScoreboard(sprite) {
}
function updateScoreboard() {
if (_scoreBoard == undefined) {
return(undefined);
}
}
}
Symbol 1669 MovieClip [__Packages.Base.SpriteEntity] Frame 0
class Base.SpriteEntity
{
var _entityType, _id, _spName, _clName, _gameContext, _mc, _clipWidth, _clipHeight, _centerPoint, _startFrame, _endFrame, _framerate, _loopAnim, _animate, _animateTimer, _lastFrame, _c, _flipped, _mouseIsOver, _mouseRollOn, _mouseRollOff, _children, _moveSpeed, _destPosX, _destPosY, _startingPositionX, _startingPositionY, _faceDir;
function SpriteEntity (gameContext, eType, id, spName, clName, depth, posX, posY, centerPoint, wth, hgt) {
_entityType = eType;
_id = id;
_spName = spName;
_clName = clName;
_gameContext = gameContext;
if ((((((((((((spName == "framerateDisplay") || (spName == "scrn_interface")) || (clName == "PauseInstructions")) || (clName == "cursorClip1")) || (spName == "scrn_Titlecard")) || (spName == "scrn_TitlecardAlt")) || (clName == "trans")) || (clName == "blackscreen")) || (clName == "motionLines")) || (clName == "deathtube")) || (spName == "scrn_Instructions")) || (spName == "scrn_InstructionsAlt")) {
_mc = gameContext.getParent().attachMovie(spName, clName, depth);
} else {
_mc = gameContext.getGameData().getBuffer().attachMovie(spName, clName, depth);
}
_mc._visible = true;
_mc._x = posX;
_mc._y = posY;
_clipWidth = ((wth > 0) ? (wth) : (_mc._width));
_clipHeight = ((hgt > 0) ? (hgt) : (_mc._height));
_centerPoint = centerPoint;
_startFrame = 0;
_endFrame = 0;
_framerate = 30;
_loopAnim = false;
_animate = false;
_animateTimer = 0;
_lastFrame = 0;
_c = 1;
_flipped = false;
_mc.gotoAndStop(_c);
_mouseIsOver = false;
_mouseRollOn = false;
_mouseRollOff = false;
_children = [];
}
function setMoveSpeed(speed) {
_moveSpeed = speed;
}
function setDestPosX(pos) {
_destPosX = pos;
}
function setDestPosY(pos) {
_destPosY = pos;
}
function setStartingPositionToPosition() {
_startingPositionX = getPositionX();
_startingPositionY = getPositionY();
}
function getMoveSpeed() {
return(_moveSpeed);
}
function getDestPosX() {
return(_destPosX);
}
function getDestPosY() {
return(_destPosY);
}
function getStartingPositionX() {
return(_startingPositionX);
}
function getStartingPositionY() {
return(_startingPositionY);
}
function isAtDestination() {
return((((_mc._x == _destPosX) && (_mc._y == _destPosY)) ? true : false));
}
function addChild(childName, upperLeftX, upperLeftY, w, h, isSelectable, returnVal) {
_children.push(childName);
_mc[childName]._animiateChild = false;
_mc[childName]._lastChildFrame = 0;
_mc[childName]._startChildFrame = 1;
_mc[childName]._endChildFrame = 1;
_mc[childName]._childFramerate = 60;
_mc[childName]._childAnimateTimer = 0;
_mc[childName]._looping = false;
_mc[childName]._isSelectable = isSelectable & 127;
_mc[childName]._selectOnKeyDown = isSelectable >> 7;
_mc[childName]._returnVal = returnVal;
_mc[childName]._currentChildFrame = 0;
_mc[childName]._upperLeftX = upperLeftX;
_mc[childName]._upperLeftY = upperLeftY;
_mc[childName]._w = w;
_mc[childName]._h = h;
_mc[childName].gotoAndStop(_mc[childName]._startChildFrame);
}
function getMovieClip() {
return(_mc);
}
function getType() {
return(_entityType);
}
function setZDepth(depth) {
_mc.swapDepths(depth);
}
function getZDepth() {
return(_mc.getDepth());
}
function moveToFrame(frame) {
_mc.gotoAndStop(frame);
_lastFrame = frame;
}
function getCurrentFrame() {
return(_mc._currentframe);
}
function setPosition(x, y) {
_mc._x = x;
_mc._y = y;
}
function setPositionX(x) {
_mc._x = x;
}
function setPositionY(y) {
_mc._y = y;
}
function setPositionXY(x, y) {
setPositionX(x);
setPositionY(y);
}
function setVisibility(vis) {
_mc._visible = vis;
}
function getVisibility(Void) {
return(_mc._visible);
}
function setRotation(angle) {
_mc._rotation = angle;
}
function setFaceDir(num) {
_faceDir = num;
}
function getFaceDir() {
return(_faceDir);
}
function setFlipped() {
_flipped = (_flipped ? false : true);
_mc._xscale = _mc._xscale * -1;
}
function isFlipped() {
return(_flipped);
}
function playFlipped() {
if (_flipped) {
return(undefined);
}
_flipped = true;
_mc._xscale = _mc._xscale * -1;
}
function playUnflipped() {
if (_flipped) {
_mc._xscale = _mc._xscale * -1;
}
_flipped = false;
}
function changeSprite(spName, clName) {
var _local4 = _mc.getDepth();
var _local3 = _mc._x;
var _local2 = _mc._y;
_mc.removeMovieClip();
_spName = spName;
_clName = clName;
_mc = _gameContext.getParent().attachMovie(spName, clName, _local4);
_mc._visible = true;
_mc._x = _local3;
_mc._y = _local2;
}
function startAnimating(startFrame, endFrame, framerate, loopAnim) {
_c = startFrame;
_startFrame = startFrame;
_endFrame = endFrame;
_framerate = 1 / framerate;
_loopAnim = loopAnim;
_animate = true;
_animateTimer = _framerate;
moveToFrame(startFrame);
}
function getStartFrame() {
return(_startFrame);
}
function animateSprite() {
_animateTimer = _animateTimer - _gameContext.getDT();
if (_animateTimer <= 0) {
_animateTimer = _framerate;
if (_startFrame <= _endFrame) {
_c++;
if (_c > _endFrame) {
if (_loopAnim) {
_c = _startFrame;
} else {
doneAnimating();
_c = _endFrame;
return(1);
}
}
} else {
_c--;
if (_c < _endFrame) {
if (_loopAnim) {
_c = _startFrame;
} else {
doneAnimating();
_c = _endFrame;
return(1);
}
}
}
moveToFrame(_c);
}
return(0);
}
function isAnimating() {
return(_animate);
}
function doneAnimating() {
_animate = false;
}
function startAnimatingChild(child, startFrame, endFrame, framerate, looping) {
_mc[child]._startChildFrame = startFrame;
_mc[child]._endChildFrame = endFrame;
_mc[child]._childFramerate = framerate;
_mc[child]._childAnimateTimer = 0;
_mc[child]._looping = looping;
_mc[child]._currentChildFrame = startFrame;
_mc[child]._animateChild = true;
_mc[child]._childAnimateTimer = 1 / _mc[child]._childFramerate;
_mc[child].gotoAndStop(_mc[child]._startFrame);
}
function animateChild(child) {
if (!_mc[child]._animateChild) {
return(undefined);
}
_mc[child]._childAnimateTimer = _mc[child]._childAnimateTimer - _gameContext.getDT();
if (_mc[child]._childAnimateTimer <= 0) {
_mc[child]._childAnimateTimer = 1 / _mc[child]._childFramerate;
if (_mc[child]._startChildFrame < _mc[child]._endChildFrame) {
_mc[child]._currentChildFrame++;
if (_mc[child]._currentChildFrame > _mc[child]._endChildFrame) {
if (_mc[child]._looping) {
_mc[child]._currentChildFrame = _mc[child]._startChildFrame;
} else {
childDoneAnimating(child);
_mc[child]._currentChildFrame = _mc[child]._endChildFrame;
}
}
} else {
_mc[child]._currentChildFrame--;
if (_mc[child]._currentChildFrame < _mc[child]._endChildFrame) {
if (_mc[child]._looping) {
_mc[child]._currentChildFrame = _mc[child]._startChildFrame;
} else {
childDoneAnimating(child);
_mc[child]._currentChildFrame = _mc[child]._endChildFrame;
}
}
}
_mc[child].gotoAndStop(_mc[child]._currentChildFrame);
}
}
function isMouseOverChild(child) {
if (_mc[child]._visible == false) {
return(false);
}
var _local4 = (_mc._x + _mc[child]._x) + _mc[child]._upperLeftX;
var _local6 = _local4 + _mc[child]._w;
var _local3 = (_mc._y + _mc[child]._y) + _mc[child]._upperLeftY;
var _local5 = _local3 + _mc[child]._h;
if ((((_gameContext.getPadManager().getMousePosX() < _local4) || (_gameContext.getPadManager().getMousePosX() > _local6)) || (_gameContext.getPadManager().getMousePosY() < _local3)) || (_gameContext.getPadManager().getMousePosY() > _local5)) {
return(false);
}
return(true);
}
function isBufferMouseOverChild(child) {
if (_mc[child]._visible == false) {
return(false);
}
var _local4 = (_mc._x + _mc[child]._x) + _mc[child]._upperLeftX;
var _local6 = _local4 + _mc[child]._w;
var _local3 = (_mc._y + _mc[child]._y) + _mc[child]._upperLeftY;
var _local5 = _local3 + _mc[child]._h;
if ((((_gameContext.getGameData().getBufferMouseX() < _local4) || (_gameContext.getGameData().getBufferMouseX() > _local6)) || (_gameContext.getGameData().getBufferMouseY() < _local3)) || (_gameContext.getGameData().getBufferMouseY() > _local5)) {
return(false);
}
return(true);
}
function handCursor(child, use) {
_mc[child].useHandCursor = use;
}
function getNumChildren() {
return(_children.length);
}
function getChildName(idx) {
return(_children[idx]);
}
function getChild(child) {
return(_mc[child]);
}
function getChildMouseIsOver() {
var _local3 = _children.length;
var _local2 = 0;
while (_local2 < _local3) {
if (isMouseOverChild(_children[_local2])) {
return(_children[_local2]);
}
_local2++;
}
return(null);
}
function getChildCurrentAnimFrame(child) {
return(_mc[child]._currentChildFrame);
}
function getChildStartFrame(child) {
return(_mc[child]._startChildFrame);
}
function getChildEndFrame(child) {
return(_mc[child]._endChildFrame);
}
function getChildFramerate(child) {
return(_mc[child]._childFramerate);
}
function getChildLooping(child) {
return(_mc[child]._looping);
}
function getChildSelectable(child) {
return(_mc[child]._isSelectable);
}
function getChildSelectOnKeyDown(child) {
return(_mc[child]._selectOnKeyDown);
}
function getChildReturnVal(child) {
return(_mc[child]._returnVal);
}
function childDoneAnimating(child) {
_mc[child]._animateChild = false;
}
function isChildAnimating(child) {
return(_mc[child]._animateChild);
}
function moveChildToFrame(child, frame) {
_mc[child].gotoAndStop(frame);
}
function getID() {
return(_id);
}
function getGameContext() {
return(_gameContext);
}
function getPositionX() {
return(_mc._x);
}
function getPositionY() {
return(_mc._y);
}
function getArea() {
return(_clipWidth * _clipHeight);
}
function getWidth() {
return(_clipWidth);
}
function getHeight() {
return(_clipHeight);
}
function getClipName() {
return(_clName);
}
function isVisible() {
return(_mc._visible);
}
function scaleSprite(scale) {
_mc._xscale = _mc._xscale * scale;
_mc._yscale = _mc._yscale * scale;
}
function removeSprite() {
_mc.removeMovieClip();
}
function isMouseRollOn() {
return(_mouseRollOn);
}
function isMouseRollOff() {
return(_mouseRollOff);
}
function isMouseOver() {
var _local6 = false;
if (_mouseIsOver) {
_mouseRollOn = false;
_local6 = true;
} else {
_mouseRollOn = true;
}
_mouseRollOff = false;
_mouseIsOver = false;
if (_mc._visible == false) {
return(false);
}
var _local4 = _mc._x - (_clipWidth / 2);
var _local5 = _mc._x + (_clipWidth / 2);
var _local2 = _mc._y - _clipHeight;
var _local3 = _mc._y;
if (_centerPoint == 1) {
_local2 = _mc._y - (_clipHeight / 2);
_local3 = _mc._y + (_clipHeight / 2);
}
if (_centerPoint == 2) {
_local4 = _mc._x;
_local5 = _mc._x + _clipWidth;
_local2 = _mc._y;
_local3 = _mc._y + _clipHeight;
}
if (_centerPoint == 3) {
_local4 = _mc.x - _clipWidth;
_local5 = _mc.x;
_local2 = _mc._y - (_clipHeight / 2);
_local3 = _mc._y + (_clipHeight / 2);
}
if (_centerPoint == 4) {
_local4 = _mc._x + 10;
_local5 = _mc._x + 40;
_local2 = _mc._y - 35;
_local3 = _mc._y + 35;
}
if ((((_gameContext.getPadManager().getMousePosX() < _local4) || (_gameContext.getPadManager().getMousePosX() > _local5)) || (_gameContext.getPadManager().getMousePosY() < _local2)) || (_gameContext.getPadManager().getMousePosY() > _local3)) {
if (_local6) {
_mouseRollOff = true;
}
return(false);
}
_mouseIsOver = true;
return(true);
}
}
Symbol 1670 MovieClip [__Packages.Pad.PadManager] Frame 0
class Pad.PadManager
{
var _padData, _lastKeyPressed, _lastKeyReleaseTime, _keyTargeting, _mouseData, _keyTarget;
function PadManager () {
_padData = new Array();
_lastKeyPressed = 0;
_lastKeyReleaseTime = 0;
_keyTargeting = false;
_mouseData = new Object();
_mouseData.mouseJustPressed = false;
_mouseData.mouseStillPressed = false;
_mouseData.mouseReleased = false;
_mouseData.mouseTimePressed = 0;
_mouseData.mousePressedPosX = 0;
_mouseData.mousePressedPosY = 0;
_mouseData.mousePosX = 0;
_mouseData.mousePosY = 0;
Init();
}
function getPadData() {
return(_padData);
}
function getPadDataLength() {
return(_padData.length);
}
function getKeyJustPressed(id) {
return(_padData[id].keyPressed);
}
function getKeyStillPressed(id) {
return(_padData[id].keyStillPressed);
}
function getCtrlDown() {
if (Key.isDown(17)) {
return(true);
}
return(false);
}
function getShiftDown() {
if (Key.isDown(16)) {
return(true);
}
return(false);
}
function getCurrentKeyAction() {
var _local2 = 0;
while (_local2 < _padData.length) {
if (_padData[_local2].keyPressed) {
return(_padData[_local2].keyAction);
}
_local2++;
}
return("");
}
function getCurrentKeyActionHeld() {
var _local2 = 0;
while (_local2 < _padData.length) {
if (_padData[_local2].keyStillPressed) {
return(_padData[_local2].keyAction);
}
_local2++;
}
return("");
}
function getCurrentKeyActionUp() {
var _local2 = 0;
while (_local2 < _padData.length) {
if (_padData[_local2].keyReleased) {
return(_padData[_local2].keyAction);
}
_local2++;
}
return("");
}
function getTimeKeyActionHeld() {
var _local2 = 0;
while (_local2 < _padData.length) {
if (_padData[_local2].keyStillPressed) {
return(_padData[_local2].timePressed);
}
_local2++;
}
return(0);
}
function getKeyActionHeld(sAction) {
var _local2 = 0;
while (_local2 < _padData.length) {
if ((_padData[_local2].keyAction == sAction) && (_padData[_local2].keyStillPressed)) {
return(true);
}
_local2++;
}
return(false);
}
function getKeyDoubleTapped(sAction) {
var _local2 = 0;
while (_local2 < _padData.length) {
if ((_padData[_local2].keyAction == sAction) && (_padData[_local2].doubleTapped)) {
return(true);
}
_local2++;
}
return(false);
}
function getMouseJustPressed() {
return(_mouseData.mouseJustPressed);
}
function getMouseStillPressed() {
return(_mouseData.mouseStillPressed);
}
function getMouseReleased() {
return(_mouseData.mouseReleased);
}
function getMouseTimePressed() {
return(_mouseData.mouseTimePressed);
}
function getMousePressedPosX() {
return(_mouseData.mousePressedPosX);
}
function getMousePressedPosY() {
return(_mouseData.mousePressedPosY);
}
function getMousePosX() {
return(_mouseData.mousePosX);
}
function getMousePosY() {
return(_mouseData.mousePosY);
}
function Init() {
mouseListener.onMouseDown = function () {
_global.handleMousePress = true;
return(undefined);
};
mouseListener.onMouseUp = function () {
_global.handleMouseRelease = true;
return(undefined);
};
mouseListener.onMouseMove = null;
Mouse.addListener(mouseListener);
return(undefined);
}
function setKeyControls(oControls) {
var _local2 = 0;
while (_local2 < oControls.length) {
_padData.push({keyID:oControls[_local2].keyID, keyAction:oControls[_local2].keyAction, keyPressed:false, keyReleased:false, keyStillPressed:false, timePressed:0, doubleTapped:false});
_local2++;
}
}
function setKeyTarget(oTarget) {
_keyTargeting = true;
_keyTarget = oTarget;
}
function getKeyTarget(oTarget) {
return(_keyTarget);
}
function removeKeyTarget() {
_keyTargeting = false;
_keyTarget = null;
}
function Update(gameContext) {
if (_mouseData.mouseReleased) {
_mouseData.mouseReleased = false;
}
if (_global.handleMouseRelease) {
_global.handleMouseRelease = false;
_mouseData.mouseJustPressed = false;
_mouseData.mouseStillPressed = false;
_mouseData.mouseReleased = true;
} else {
if (_mouseData.mouseJustPressed) {
_mouseData.mouseJustPressed = false;
_mouseData.mouseReleased = false;
_mouseData.mouseStillPressed = true;
}
if (_mouseData.mouseStillPressed) {
_mouseData.mouseTimePressed = _mouseData.mouseTimePressed + gameContext.getDT();
}
}
if (_global.handleMousePress) {
_global.handleMousePress = false;
_mouseData.mouseJustPressed = true;
_mouseData.mousePressedPosX = _root._xmouse;
_mouseData.mousePressedPosY = _root._ymouse;
_mouseData.mouseReleased = false;
_mouseData.mouseStillPressed = false;
_mouseData.mouseTimePressed = 0;
}
_mouseData.mousePosX = _root._xmouse;
_mouseData.mousePosY = _root._ymouse;
var _local6 = Key.getCode();
var _local4 = 0;
while (_local4 < _padData.length) {
if (Key.isDown(_padData[_local4].keyID)) {
if ((!_padData[_local4].keyPressed) && (!_padData[_local4].keyStillPressed)) {
if (_padData[_local4].keyID == _lastKeyPressed) {
if ((gameContext.getTimeManager().getCurTime() - _lastKeyReleaseTime) < 0.18) {
_padData[_local4].doubleTapped = true;
}
}
_padData[_local4].keyPressed = true;
_padData[_local4].keyStillPressed = false;
_padData[_local4].keyReleased = false;
_padData[_local4].timePressed = 0;
if (_keyTargeting) {
_keyTarget.parseKeyAction(_padData[_local4].keyAction, "KEYDOWN", false);
}
} else if (_padData[_local4].keyPressed || (_padData[_local4].keyStillPressed)) {
_padData[_local4].keyPressed = false;
_padData[_local4].keyStillPressed = true;
_padData[_local4].keyReleased = false;
_padData[_local4].timePressed = _padData[_local4].timePressed + gameContext.getDT();
if (_keyTargeting) {
_keyTarget.parseKeyAction(_padData[_local4].keyAction, "KEYHELD", false);
}
}
} else if (_padData[_local4].keyStillPressed || (_padData[_local4].keyPressed)) {
_padData[_local4].keyPressed = false;
_padData[_local4].keyStillPressed = false;
_padData[_local4].keyReleased = true;
_padData[_local4].doubleTapped = false;
_lastKeyPressed = _padData[_local4].keyID;
_lastKeyReleaseTime = gameContext.getTimeManager().getCurTime();
if (_keyTargeting) {
_keyTarget.parseKeyAction(_padData[_local4].keyAction, "KEYUP", false);
}
}
_local4++;
}
return(undefined);
}
function toString(Void) {
return("PadManager()");
}
var mouseListener = new Object();
}
Symbol 1671 MovieClip [__Packages.Base.SoundModule] Frame 0
class Base.SoundModule
{
var _mc, _hash, _num, _active_sounds, _fade_interval, _music_mute, _defaultVol, _musicOff, _curr_music, _fade_interval2;
function SoundModule (mc) {
_mc = mc;
_hash = {};
_num = 0;
_active_sounds = [];
_fade_interval = null;
_music_mute = _global.MUSIC_MUTE;
_defaultVol = 150;
_musicOff = false;
}
function SoundAvailable() {
return(_active_sounds.length < 16);
}
function LoadSound(sound_name) {
_num++;
var _local3 = "mySound" + _num;
_mc.createEmptyMovieClip(_local3, _num);
var _local2 = new Sound(_mc[_local3]);
_local2.parent = this;
_local2.lastStart = 0;
_local2.onSoundComplete = function () {
this.parent.DeactivateSound(sound_name);
};
_hash[sound_name] = _local2;
return(_local2);
}
function createSoundInstance(sound_instance, ownerID) {
var snd_Name = ((sound_instance + "_") + ownerID);
_num++;
var _local3 = "mySound" + _num;
_mc.createEmptyMovieClip(_local3, _num);
var _local2 = new Sound(_mc[_local3]);
_local2.parent = this;
_local2.lastStart = 0;
_local2.onSoundComplete = function () {
this.parent.DeactivateSound(snd_Name);
};
_hash[snd_Name] = _local2;
_local2.attachSound(sound_instance);
return(snd_Name);
}
function SetMusicMute(oBool) {
_music_mute = oBool;
if (_music_mute == true) {
StopMusic();
} else {
PlayMusic(_curr_music);
}
}
function GetMusicMute() {
return(_music_mute);
}
function StopMusic() {
var _local2 = _active_sounds.length;
while (_local2--) {
if (_active_sounds[_local2].indexOf("music") != -1) {
StopSound(_active_sounds[_local2]);
break;
}
}
_curr_music = "none";
}
function StopAllSounds() {
var _local2 = _active_sounds.length;
while (_local2--) {
if (_active_sounds[_local2].indexOf("music") == -1) {
StopSound(_active_sounds[_local2]);
}
}
}
function isPlayingPrefix(str) {
var _local2 = _active_sounds.length;
while (_local2--) {
if (_active_sounds[_local2].indexOf(str) != -1) {
return(true);
}
}
return(false);
}
function AdjustMusicVolume(vol) {
if (_curr_music == "none") {
return(undefined);
}
var _local2 = "music_" + _curr_music;
_hash[_local2].setVolume(vol);
}
function GetCurMusic(Void) {
return(_curr_music);
}
function getMusicOff() {
return(_musicOff);
}
function setMusicOff(toSet) {
_musicOff = toSet;
}
function PlayMusic(str, useCurrentVolume) {
if (_musicOff) {
return(undefined);
}
if (str == _curr_music) {
return(undefined);
}
if (str == "none") {
FadeSound("music_" + _curr_music, MUSIC_VOL, 0, 0.8);
_curr_music = str;
} else {
CrossFade("music_" + _curr_music, "music_" + str, 0.5, useCurrentVolume);
_curr_music = str;
}
}
function DeactivateSound(snd) {
var _local2 = _active_sounds.length;
while (_local2--) {
if (snd == _active_sounds[_local2]) {
_active_sounds.splice(_local2, 1);
break;
}
}
}
function DeactivateAllSounds() {
_active_sounds = [];
}
function StopSound(snd) {
var _local2 = _hash[snd];
_local2.stop();
DeactivateSound(snd);
}
function soundIsPlaying(snd) {
for (var _local2 in _active_sounds) {
if (_active_sounds[_local2] == snd) {
return(true);
}
}
return(false);
}
function PlaySound(snd, vol, pan, offset, loop, force) {
if (snd == undefined) {
return(undefined);
}
if ((snd.indexOf("music") != -1) && (_music_mute == true)) {
return(undefined);
}
for (var _local3 in _active_sounds) {
if (_active_sounds[_local3] == snd) {
}
}
if (_active_sounds.length < MAX_SOUNDS) {
var _local4 = _hash[snd];
if (vol == null) {
_local4.setVolume(_defaultVol);
} else {
_local4.setVolume(vol);
}
if (pan != null) {
_local4.setPan(pan);
}
if (offset == null) {
offset = 0;
}
if (loop == null) {
loop = 0;
}
_local4.start(offset, loop);
_active_sounds.push(snd);
}
}
function AdjustSoundVolume(snd, vol) {
_hash[snd].setVolume(vol);
}
function CrossFade(snd1, snd2, dur, useCurrentVolume) {
var _local2 = MUSIC_VOL;
if (useCurrentVolume != undefined) {
_local2 = _hash[snd1].getVolume();
}
FadeSound(snd1, _local2, 0, dur);
PlaySound(snd2, 0, 0, 0, 9999);
FadeSound2(snd2, 0, _local2, dur);
}
function FadeSound(snd, startVol, endVol, duration) {
if (_fade_interval != null) {
clearInterval(_fade_interval);
}
_hash[snd].setVolume(startVol);
var _local2 = 1;
if (endVol < startVol) {
_local2 = -1;
}
var _local5 = (duration / Math.abs(endVol - startVol)) * 1000;
_fade_interval = setInterval(this, "Fade_Sound_Update", _local5, [snd, endVol, _local2]);
}
function FadeSound2(snd, startVol, endVol, duration) {
if (_fade_interval2 != null) {
clearInterval(_fade_interval2);
}
_hash[snd].setVolume(startVol);
var _local2 = 1;
if (endVol < startVol) {
_local2 = -1;
}
var _local5 = (duration / Math.abs(endVol - startVol)) * 1000;
_fade_interval2 = setInterval(this, "Fade_Sound_Update2", _local5, [snd, endVol, _local2]);
}
function Fade_Sound_Update(sndAr) {
var _local3 = sndAr[0];
var _local5 = sndAr[1];
var _local4 = sndAr[2];
var _local2 = _hash[_local3].getVolume() + _local4;
if (((_local4 > 0) && (_local2 <= _local5)) || ((_local4 < 0) && (_local2 >= _local5))) {
_hash[_local3].setVolume(_local2);
if (_local2 <= 0) {
StopSound(_local3);
}
} else {
clearInterval(_fade_interval);
}
}
function Fade_Sound_Update2(sndAr) {
var _local3 = sndAr[0];
var _local5 = sndAr[1];
var _local4 = sndAr[2];
var _local2 = _hash[_local3].getVolume() + _local4;
if (((_local4 > 0) && (_local2 <= _local5)) || ((_local4 < 0) && (_local2 >= _local5))) {
_hash[_local3].setVolume(_local2);
if (_local2 <= 0) {
StopSound(_local3);
}
} else {
clearInterval(_fade_interval2);
}
}
function getSound(snd) {
return(_hash[snd]);
}
function toString() {
return("SoundModule()");
}
function unload() {
for (var _local3 in _hash) {
delete _hash[_local3];
}
var _local2 = 0;
while (_local2 < _num) {
_mc["mySound" + _num].removeMovieClip();
_local2++;
}
delete _hash;
}
static var MAX_SOUNDS = 16;
var MUSIC_VOL = 60;
}
Symbol 1672 MovieClip [__Packages.Game.GameData] Frame 0
class Game.GameData
{
var _gameContext, _lookingUp, _lookingDown, _lookingOffsetY, _musicOff, _savedGameData, _editLock, _heroEditSpawn, _isLevelLoaded, _gameObjects, _colGameObjects, _updGameObjects, _metalGameObjs, _checkpoints, _enemies, _tokensCollectedMin, _tokensCollectedMaj, _currLevel, _maxLevel, _currPathLevel, oX, oY, oXmin, oYmin, oXmax, oYmax, aHeroX, aHeroY, _heroSpawnPosX, _heroSpawnPosY, _heroSpawnLastPosX, _heroSpawnLastPosY, vWorldX, vWorldY, _camCenterX, _camCenterY, _showGrid, forceRedraw, _spawnTimerActive, _spawnCounter, _health, _soundMC, _soundModule, _tracker, _exitDoorMC, _GameMode, _BUFFER, _graphics, _isLevelComplete, gHero, oldax, olday, _previousWorldX, _previousWorldY, _masterPlats, _slavePlats, a, _railGameObjs, _blocksAbsorbed, _cameraShakeY, _cameraShakeX, oV, _sameAreaLastFrame, ar, _shakeIntensity, _shakeTime, _hud, _lives;
function GameData (gameContext) {
_gameContext = gameContext;
_gameContext.getPadManager().setKeyControls(_controls);
CreateBuffer();
_lookingUp = false;
_lookingDown = false;
_lookingOffsetY = 0;
_musicOff = 0;
_global.MUSIC_MUTE = false;
_global.MUSIC_VOL = 100;
Init();
}
function setCurrentLevelData(num) {
_savedGameData[0].currentLevel = num;
}
function getCurrentLevelData() {
return(_savedGameData[0].currentLevel);
}
function Init() {
_editLock = false;
_heroEditSpawn = false;
_isLevelLoaded = false;
setGamePaused(0);
setLevelLoaded(false);
setLevelComplete(false);
_gameObjects = [];
_colGameObjects = [];
_updGameObjects = [];
_metalGameObjs = [];
_checkpoints = [];
_enemies = [];
_tokensCollectedMin = [];
_tokensCollectedMaj = [];
_currLevel = 1;
_maxLevel = 0;
_currPathLevel = 0;
oX = [];
oY = [];
oXmin = [];
oYmin = [];
oXmax = [];
oYmax = [];
SCREEN_W = 600;
SCREEN_H = 400;
aHeroX = 0;
aHeroY = 0;
_heroSpawnPosX = 200;
_heroSpawnPosY = 3800;
_heroSpawnLastPosX = 60;
_heroSpawnLastPosY = 3850;
vWorldX = 0;
vWorldY = 0;
_camCenterX = 0;
_camCenterY = 0;
_showGrid = false;
forceRedraw = false;
_spawnTimerActive = false;
_spawnCounter = 0;
_health = 1;
_soundMC = _gameContext.getParent().createEmptyMovieClip("sound_mc", 12000);
_soundModule = new Base.SoundModule(_soundMC);
_global.MUSIC_MUTE = false;
var _local3 = 0;
while (_local3 < _soundList.length) {
var _local4 = _soundModule.LoadSound(_soundList[_local3]);
_local4.attachSound(_soundList[_local3]);
_local3++;
}
loadTracker();
}
function reset() {
resetHealth();
setCurrentLevel(1);
_gameObjects = [];
_colGameObjects = [];
_updGameObjects = [];
_metalGameObjs = [];
_checkpoints = [];
_enemies = [];
_tokensCollectedMin = [];
}
function loadTracker() {
_tracker = new Game.GameTrack_AS2(10000);
}
function getDataObject(sObject) {
return(this[sObject]);
}
function getSoundModule() {
return(_soundModule);
}
function getScreen(idx) {
return(_screens[idx]);
}
function getPlatformColor(nplatType) {
return(_platformColors[nplatType]);
}
function addEnemyOnScreen(enemy) {
_enemies.push(enemy);
}
function removeEnemyOnScreen(enemy) {
var _local2 = _enemies.length;
while (_local2--) {
if (_enemies[_local2]._idx == enemy._idx) {
_enemies.splice(_local2, 1);
return(undefined);
}
}
}
function isEnemyOnScreen() {
var _local2 = ((_enemies.length > 0) ? true : false);
return(_local2);
}
function setExitDoor(mc) {
_exitDoorMC = mc;
}
function setCheckpoint(checkpoint) {
if (checkpoint == getCurrentCheckpoint()) {
return(undefined);
}
_checkpoints.push(checkpoint);
if (_checkpoints.length > 1) {
_checkpoints[0].resetCheckpoint();
_checkpoints.splice(0, 1);
}
}
function getCurrentCheckpoint() {
return(_checkpoints[0]);
}
function addTokenCollected(token) {
_tokensCollectedMin.push(token);
}
function addTokensToBank(numTokens) {
_tokensCollectedMaj[_currLevel] = numTokens;
}
function getTokenTotal() {
return((_tokensCollectedMaj[1] + _tokensCollectedMaj[2]) + _tokensCollectedMaj[3]);
}
function updateCheeseCollected() {
addTokensToBank(_tokensCollectedMin.length);
}
function setGamePaused(nToggle) {
GAME_PAUSED = nToggle;
}
function getGamePaused() {
return(GAME_PAUSED);
}
function setGameMode(nMode) {
_GameMode = nMode;
}
function getGameMode() {
return(_GameMode);
}
function getIsEditLocked() {
return(_editLock);
}
function CreateBuffer() {
_BUFFER = _gameContext.getParent().createEmptyMovieClip("_buffer1", 30);
_BUFFER._x = 0;
_BUFFER._y = -3600;
_graphics = new Base.Graphics(_BUFFER);
}
function DeleteBuffer() {
}
function getBuffer() {
return(_BUFFER);
}
function UpdateBuffer() {
ClearBuffer();
}
function ClearBuffer() {
_graphics.Clear();
}
function cacheBuffer(bToggle) {
_BUFFER.cacheAsBitmap = bToggle;
}
function getGraphics() {
return(_graphics);
}
function RedrawBuffer() {
_graphics.Clear();
if (_showGrid) {
drawGrid();
}
var _local3 = 0;
while (_local3 < getNumGameObjects()) {
var _local2 = getGameObject(_local3);
if (_local2.getOnScreen() && (_local2.getActive())) {
_local2.RenderEntity();
}
_local3++;
}
}
function toggleForceRedraw(bToggle) {
forceRedraw = bToggle;
}
function getCurrentLevel() {
return(_currLevel);
}
function setCurrentLevel(nLevelNum) {
_currLevel = nLevelNum;
}
function setNextLevel() {
_currLevel++;
}
function setPrevLevel() {
_currLevel--;
}
function getMaxLevel() {
return(_maxLevel);
}
function setMaxLevel(level) {
_maxLevel = level;
}
function getLevelLoaded() {
return(_isLevelLoaded);
}
function setLevelLoaded(bToggle) {
_isLevelLoaded = bToggle;
}
function getLevelComplete() {
return(_isLevelComplete);
}
function setLevelComplete(bToggle) {
_isLevelComplete = bToggle;
}
function getCurrentLevelMap() {
return(SavedLevelMaps[_currLevel]);
}
function SaveCurrentLevelMap() {
SavedLevelMaps.splice(_currLevel, 1, getCurrentLevelMap());
return(true);
}
function DeleteLevelMap() {
var _local2 = 0;
while (_local2 < _gameObjects.length) {
var _local3 = getGameObject(_local2);
_local3.deleteSprites();
_local2++;
}
_gameObjects = [];
oX = [];
oY = [];
oXmin = [];
oYmin = [];
oXmax = [];
oYmax = [];
_tokensCollectedMin = [];
_checkpoints = [];
gHero.deleteSprites();
delete gHero;
_gameContext.getBackground().removeAllBackgrounds();
}
function GenerateLevel() {
_BUFFER._x = XMAX - SCREEN_W;
_BUFFER._y = -3600;
oldax = null;
olday = null;
vWorldX = (_previousWorldX = _BUFFER._x);
vWorldY = (_previousWorldY = _BUFFER._y);
CreateGameObjects();
RegisterObjectsToUpdate();
RegisterObjectsToAreas();
gHero = CreateHero();
if (getGameMode() == GAME_PLAY) {
checkWallBottoms();
layerItems();
layerDoorFronts();
layerDecoration();
_gameContext.getBackground().addBackground("wallbackground_bottom", 2, true, 0);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 400);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 800);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 1200);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 1600);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 2000);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 2400);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 2800);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 3200);
_gameContext.getBackground().addBackground("tile_wall", 2, true, 3600);
}
setLevelLoaded(true);
}
function CreateGameObjects() {
var _local5;
switch (_currLevel) {
case 1 :
_local5 = Game.MapData_1.getMapData();
break;
case 2 :
_local5 = Game.MapData_2.getMapData();
break;
case 3 :
_local5 = Game.MapData_3.getMapData();
}
var _local4 = doInitialSort(_local5);
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
createObject(_local3[0], _local3[1]);
_local2++;
}
linkSlavesToMasters();
seperateMetalObjects();
seperateRails();
installRailEnds();
_gameObjects.sortOn("_idx", Array.NUMERIC);
}
function layerDoorFronts() {
var _local3 = [];
var _local2 = _gameObjects.length;
while (_local2--) {
if (((_gameObjects[_local2]._type == DOOR1) || (_gameObjects[_local2]._type == DOOR2)) || (_gameObjects[_local2]._type == DOOR3)) {
_local3.push(_gameObjects[_local2]);
}
}
var _local4 = _local3.length;
while (_local4--) {
_local3[_local4].layerDoorFront();
}
}
function layerDecoration() {
var _local2 = _gameObjects.length;
while (_local2--) {
if (_gameObjects[_local2]._type == FENCE) {
_gameObjects[_local2].layerFence();
}
}
}
function layerItems() {
var _local3 = [];
var _local2 = _gameObjects.length;
while (_local2--) {
if ((_gameObjects[_local2]._type == ITEM_GUN) || (_gameObjects[_local2]._type == GSPIKE)) {
_local3.push(_gameObjects[_local2]);
}
}
var _local4 = _local3.length;
while (_local4--) {
_local3[_local4].layerItem();
}
}
function doInitialSort(data) {
var _local3 = 0;
var _local5 = new Array();
_masterPlats = [];
_slavePlats = [];
var _local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == RAIL) {
var _local7 = data[_local6];
_local5.push([_local3, _local7]);
_local3++;
}
_local6++;
}
var _local4 = new Array();
_local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == PLATFORM) {
var _local7 = data[_local6];
if ((((_local7[1] == SWITCH1) || (_local7[1] == SWITCH2)) || (_local7[1] == SWITCH3)) || (_local7[1] == SWITCH4)) {
_masterPlats.push(_local3);
}
if (((((((_local7[1] == DOOR1) || (_local7[1] == DOOR2)) || (_local7[1] == DOOR3)) || (_local7[1] == MOVEABLE5)) || (_local7[1] == MOVEABLE6)) || (_local7[1] == MOVEABLE7)) || (_local7[1] == MOVEABLE8)) {
_slavePlats.push(_local3);
}
_local4.push({oid:_local3, objClass:_local7[0], type:_local7[1], x:_local7[2], y:_local7[3], xw:_local7[4], yw:_local7[5]});
_local3++;
}
_local6++;
}
assignNumbers(_local4);
ySort(_local4);
checkPlats(_local4);
_local6 = 0;
while (_local6 < _local4.length) {
var _local7 = _local4[_local6];
_local5.push([_local4[_local6].oid, [_local4[_local6].objClass, _local4[_local6].type, _local4[_local6].x, _local4[_local6].y, _local4[_local6].xw, _local4[_local6].yw]]);
_local6++;
}
_local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == DECORATION) {
var _local7 = data[_local6];
_local5.push([_local3, _local7]);
_local3++;
}
_local6++;
}
_local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == SIGN) {
var _local7 = data[_local6];
_local5.push([_local3, _local7]);
_local3++;
}
_local6++;
}
_local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == ITEM) {
var _local7 = data[_local6];
_local5.push([_local3, _local7]);
_local3++;
}
_local6++;
}
_local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == SPIKE) {
var _local7 = data[_local6];
_local5.push([_local3, _local7]);
_local3++;
}
_local6++;
}
_local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == ENEMY) {
var _local7 = data[_local6];
_local5.push([_local3, _local7]);
_local3++;
}
_local6++;
}
var _local15 = 0;
_local6 = 0;
while (_local6 < data.length) {
if (data[_local6][0] == TOKEN) {
var _local7 = data[_local6];
_local5.push([_local3, _local7]);
_local3++;
_local15++;
}
_local6++;
}
return(_local5);
}
function sortPlatforms(a, b) {
var _local9 = a.x;
var _local15 = a.y;
var _local4 = _local9 - (a.xw / 2);
var _local13 = _local9 + (a.xw / 2);
var _local8 = b.x;
var _local14 = b.y;
var _local3 = _local8 - (b.xw / 2);
var _local12 = _local8 + (b.xw / 2);
var _local6 = a.y - (a.yw / 2);
var _local5 = b.y - (b.yw / 2);
var _local11 = a.y + (a.yw / 2);
var _local10 = b.y + (b.yw / 2);
var _local7 = Math.abs(_local6 - _local5);
if ((_local6 > _local5) && (_local7 > 5)) {
if (_local4 > _local3) {
if (((a.type == CLOUD) && (b.type == BLOCK_L)) && (_local11 <= _local10)) {
return(1);
}
if ((b.type == BLOCK_L) && (a.type == BLOCK_L)) {
return(1);
}
}
if ((a.type == BLOCK_L) && (b.type == CLOUD)) {
if (_local4 >= _local3) {
return(1);
}
}
return(-1);
}
if ((_local6 < _local5) && (_local7 > 5)) {
if (_local3 > _local4) {
if (((b.type == CLOUD) && (a.type == BLOCK_L)) || ((b.type == BLOCK_L) && (a.type == BLOCK_L))) {
return(-1);
}
}
return(1);
}
if ((b.type == BLOCK_L) && (a.type == BLOCK_L)) {
if (_local4 > _local3) {
return(1);
}
return(-1);
}
if (_local3 > _local4) {
if ((b.type == CLOUD) && (a.type == BLOCK_L)) {
return(-1);
}
return(1);
}
if ((a.type == CLOUD) && (b.type == BLOCK_L)) {
return(1);
}
return(-1);
}
function assignNumbers(p) {
var _local8 = p.length - 1;
var _local9 = new Object();
var _local1 = _local8;
while (_local1 >= 0) {
var _local5 = p[_local1].x;
var _local7 = p[_local1].y;
var _local4 = _local5 - (p[_local1].xw / 2);
var _local6 = 9000 - (p[_local1].y - (p[_local1].yw / 2));
var _local3 = 0;
if ((((((p[_local1].type != BLOCK_L) && (p[_local1].type != CLOUD)) && (p[_local1].type != WALL)) && (p[_local1].type != DOOR1)) && (p[_local1].type != DOOR2)) && (p[_local1].type != DOOR3)) {
_local3 = 1000000 /* 0x0F4240 */;
}
p[_local1].num = ((_local6 * 4000) + _local4) + _local3;
if (p[_local1].type == GROUND) {
p[_local1].num = _local4;
}
if (p[_local1].type == EXITDOOR) {
p[_local1].num = 9005;
}
_local1--;
}
}
function ySort(p) {
var _local19 = p.length - 1;
var _local10 = new Object();
var _local3 = _local19;
while (_local3 > 0) {
var _local2 = _local3 - 1;
while (_local2 >= 0) {
var _local5 = p[_local3].x;
var _local17 = p[_local3].y;
var _local18 = _local5 - (p[_local3].xw / 2);
var _local7 = _local5 + (p[_local3].xw / 2);
var _local4 = p[_local2].x;
var _local15 = p[_local2].y;
var _local8 = _local4 - (p[_local2].xw / 2);
var _local11 = _local4 + (p[_local2].xw / 2);
var _local9 = p[_local3].y - (p[_local3].yw / 2);
var _local16 = p[_local2].y - (p[_local2].yw / 2);
var _local12 = p[_local3].y + (p[_local3].yw / 2);
var _local6 = p[_local2].y + (p[_local2].yw / 2);
var _local13 = Math.abs(_local6 - _local9);
var _local14 = Math.abs(_local7 - _local8);
if (p[_local3].num < p[_local2].num) {
_local10 = p[_local2];
p.splice(_local3 + 1, 0, _local10);
p.splice(_local2, 1);
_local3++;
break;
}
_local2--;
}
_local3--;
}
}
function checkPlats(p) {
var _local19 = p.length - 1;
var _local6 = new Object();
var _local3 = _local19;
while (_local3 > 0) {
var _local2 = _local3 - 1;
while (_local2 >= 0) {
var _local11 = p[_local3].x;
var _local17 = p[_local3].y;
var _local18 = _local11 - (p[_local3].xw / 2);
var _local12 = _local11 + (p[_local3].xw / 2);
var _local10 = p[_local2].x;
var _local16 = p[_local2].y;
var _local13 = _local10 - (p[_local2].xw / 2);
var _local14 = _local10 + (p[_local2].xw / 2);
var _local5 = p[_local3].y - (p[_local3].yw / 2);
var _local4 = p[_local2].y - (p[_local2].yw / 2);
var _local9 = p[_local3].y + (p[_local3].yw / 2);
var _local8 = p[_local2].y + (p[_local2].yw / 2);
var _local15 = Math.abs(_local8 - _local5);
var _local7 = Math.abs(_local12 - _local13);
if (((p[_local3].type == BLOCK_L) || (p[_local3].type == WALL)) && (p[_local2].type == CLOUD)) {
if (((_local7 < 50) && (_local5 < _local4)) && (_local9 > _local4)) {
_local6 = p[_local2];
p.splice(_local3 + 1, 0, _local6);
p.splice(_local2, 1);
_local3++;
break;
}
}
if ((p[_local3].type == CLOUD) && (p[_local2].type == BLOCK_L)) {
if (((_local7 < 50) && (_local4 < _local5)) && (_local8 > _local5)) {
_local6 = p[_local2];
p.splice(_local3 + 1, 0, _local6);
p.splice(_local2, 1);
_local3++;
break;
}
}
if ((p[_local3].type == BLOCK_L) && (p[_local2].type == BLOCK_L)) {
if (((_local7 < 50) && (_local4 > _local5)) && (_local4 < _local9)) {
_local6 = p[_local2];
p.splice(_local3 + 1, 0, _local6);
p.splice(_local2, 1);
_local3++;
break;
}
}
_local2--;
}
_local3--;
}
}
function checkData(p) {
var _local18 = p.length - 1;
var _local19 = new Object();
var _local3 = _local18;
while (_local3 > 0) {
var _local2 = _local3 - 1;
while (_local2 >= 0) {
var _local6 = p[_local3].x;
var _local16 = p[_local3].y;
var _local17 = _local6 - (p[_local3].xw / 2);
var _local8 = _local6 + (p[_local3].xw / 2);
var _local4 = p[_local2].x;
var _local14 = p[_local2].y;
var _local9 = _local4 - (p[_local2].xw / 2);
var _local11 = _local4 + (p[_local2].xw / 2);
var _local10 = p[_local3].y - (p[_local3].yw / 2);
var _local15 = p[_local2].y - (p[_local2].yw / 2);
var _local12 = p[_local3].y + (p[_local3].yw / 2);
var _local7 = p[_local2].y + (p[_local2].yw / 2);
var _local13 = Math.abs(_local7 - _local10);
var _local5 = Math.abs(_local8 - _local9);
if (((p[_local3].type == BLOCK_L) || (p[_local3].type == CLOUD)) && ((p[_local2].type == BLOCK_L) || (p[_local2].type == CLOUD))) {
if ((_local5 > 10) && (_local5 < 20)) {
}
}
_local2--;
}
_local3--;
}
}
function linkSlavesToMasters() {
var _local11 = _gameObjects.length;
var _local10 = _masterPlats.length;
var _local12 = _slavePlats.length;
var _local6 = new Array();
if (_local10 != _local12) {
}
var _local5 = 0;
while (_local5 < _local11) {
if (_gameObjects[_local5]._class == PLATFORM) {
var _local8 = _gameObjects[_local5];
_local6.push(_local8);
}
_local5++;
}
var _local9 = _local6.length;
var _local4 = 0;
while (_local4 < _local10) {
var _local7 = _masterPlats[_local4];
var _local2 = 0;
while (_local2 < _local9) {
var _local3 = _local6[_local2];
if (_local3._idx == _local7) {
_local3.setSlavePlatform(getPlatToControl(_local4, _local6));
}
_local2++;
}
_local4++;
}
}
function getPlatToControl(slaveID, plats) {
var _local5 = plats.length;
var _local4 = _slavePlats[slaveID];
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = plats[_local2];
if (_local3._idx == _local4) {
return(_local3);
}
_local2++;
}
return(null);
}
function createObject(id, gObj) {
var _local2;
var _local4 = gObj[0];
switch (_local4) {
case PLATFORM :
_local2 = Game.Platform;
break;
case ITEM :
_local2 = Game.Item;
break;
case SPIKE :
_local2 = Game.Spike;
break;
case TOKEN :
_local2 = Game.Token;
break;
case RAIL :
_local2 = Game.Rail;
break;
case ENEMY :
_local2 = Game.Enemy;
break;
case SIGN :
_local2 = Game.Sign;
break;
case DECORATION :
_local2 = Game.Decoration;
break;
}
addGameObject(new _local2[undefined](_gameContext, id, gObj[1], gObj[2], gObj[3], gObj[4], gObj[5]));
}
function addGameObject(oGameObject) {
_gameObjects.push(oGameObject);
}
function deleteGameObject(oGameObject) {
var _local2 = 0;
while (_local2 < getNumGameObjects()) {
if (oGameObject.getID() == _gameObjects[_local2].getID()) {
_gameObjects[_local2].getShape().toggleDataBox("off");
oX.splice(_local2, 1);
oY.splice(_local2, 1);
oXmin.splice(_local2, 1);
oYmin.splice(_local2, 1);
oXmax.splice(_local2, 1);
oYmax.splice(_local2, 1);
_gameObjects.splice(_local2, 1);
break;
}
_local2++;
}
toggleForceRedraw(true);
}
function getNumGameObjects() {
return(_gameObjects.length);
}
function getGameObject(nPos) {
return(_gameObjects[nPos]);
}
function getNumColGameObjects() {
return(_colGameObjects.length);
}
function getColArray() {
return(_colGameObjects);
}
function getNumUpdateGameObjects() {
return(_updGameObjects.length);
}
function getUpdateArray() {
return(_updGameObjects);
}
function RegisterObjectsToUpdate() {
_updGameObjects = [];
var _local2 = 0;
while (_local2 < getNumGameObjects()) {
var _local3 = getGameObject(_local2);
if (_local3.getReqUpdate()) {
_updGameObjects.push(_local3);
}
_local2++;
}
return(undefined);
}
function updateGameObjects() {
var _local2 = getNumUpdateGameObjects();
while (_local2--) {
_updGameObjects[_local2].Update();
}
}
function ClearGameObjects() {
var _local4 = getNumGameObjects();
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = _gameObjects[_local2];
_local3.getShape().toggleDataBox("off");
_local2++;
}
_gameObjects = [];
oX = [];
oY = [];
oXmin = [];
oYmin = [];
oXmax = [];
oYmax = [];
_graphics.Clear();
return(true);
}
function UpdateObjCoords(obj) {
if (getGameMode() == GAME_PLAY) {
var _local5 = obj._idx;
var _local7 = screenPadY;
if ((obj._class == ITEM) || (obj._class == TOKEN)) {
_local7 = 10;
}
var _local6 = 0;
if (obj._type == BLOCK_L) {
_local6 = 17;
}
var _local4 = obj.getShape();
oX[_local5] = _local4.getCurrentPosition()._vx;
oY[_local5] = _local4.getCurrentPosition()._vy;
oXmin[_local5] = _local4.getMinX() - screenPadX;
oYmin[_local5] = _local4.getMinY() - _local7;
oXmax[_local5] = _local4.getMaxX() + screenPadX;
oYmax[_local5] = _local4.getMaxY() + _local6;
ReRegisterObjectToArea(_local5);
return(undefined);
}
var _local2 = 0;
while (_local2 < getNumGameObjects()) {
if (obj.getID() == _gameObjects[_local2].getID()) {
var _local5 = _local2;
break;
}
_local2++;
}
RegisterObjectsToAreas();
}
function ReRegisterObjectToArea(objID) {
var _local4 = objID;
var _local9 = Math.max;
var _local8 = _local9(int(oXmin[_local4] / SCREEN_W), 0);
var _local6 = _local9(int(oYmin[_local4] / SCREEN_H), 0);
var _local7 = _local9(int(oXmax[_local4] / SCREEN_W), 0);
var _local5 = _local9(int(oYmax[_local4] / SCREEN_H), 0);
var _local3 = _local8;
while (_local3 <= _local7) {
var _local2 = _local6;
while (_local2 <= _local5) {
if (a[_local3][_local2][_local4] == true) {
} else {
a[_local3][_local2][_local4] = true;
toggleForceRedraw(true);
}
_local2++;
}
_local3++;
}
}
function RegisterObjectsToAreas() {
if (!((SCREEN_W > 0) && (SCREEN_H > 0))) {
return(undefined);
}
a = [];
var _local8 = Math.max;
var _local13 = getNumGameObjects();
var _local3 = 0;
while (_local3 < _local13) {
var _local10 = screenPadY;
if ((_gameObjects[_local3]._class == ITEM) || (_gameObjects[_local3]._class == TOKEN)) {
_local10 = 10;
}
var _local9 = 0;
if (_gameObjects[_local3]._type == BLOCK_L) {
_local9 = 17;
}
var _local5 = _gameObjects[_local3].getShape();
oX[_local3] = _local5.getCurrentPosition()._vx;
oY[_local3] = _local5.getCurrentPosition()._vy;
oXmin[_local3] = _local5.getMinX() - screenPadX;
oYmin[_local3] = _local5.getMinY() - _local10;
oXmax[_local3] = _local5.getMaxX() + screenPadX;
oYmax[_local3] = _local5.getMaxY() + _local9;
var _local12 = _local8(int(oXmin[_local3] / SCREEN_W), 0);
var _local7 = _local8(int(oYmin[_local3] / SCREEN_H), 0);
var _local11 = _local8(int(oXmax[_local3] / SCREEN_W), 0);
var _local6 = _local8(int(oYmax[_local3] / SCREEN_H), 0);
var _local2 = _local12;
while (_local2 <= _local11) {
var _local4 = _local7;
while (_local4 <= _local6) {
if (a[_local2] == undefined) {
a[_local2] = [];
}
if (a[_local2][_local4] == undefined) {
a[_local2][_local4] = [];
}
a[_local2][_local4][_local3] = true;
_local4++;
}
_local2++;
}
_local3++;
}
}
function isPointOnScreen(x, y) {
var _local2 = getCurrentWorldBounds();
var _local4 = _local2[0];
var _local6 = _local2[1];
var _local3 = _local2[2];
var _local5 = _local2[3];
if ((((x >= _local4) && (x <= _local6)) && (y >= _local3)) && (y <= _local5)) {
return(true);
}
return(false);
}
function seperateRails() {
_railGameObjs = [];
var _local2 = _gameObjects.length;
while (_local2--) {
if (_gameObjects[_local2]._class == RAIL) {
_railGameObjs.push(_gameObjects[_local2]);
}
}
}
function seperateMetalObjects() {
_metalGameObjs = [];
var _local2 = _gameObjects.length;
while (_local2--) {
if (_gameObjects[_local2]._isMetal) {
_metalGameObjs.push(_gameObjects[_local2]);
}
}
}
function checkGroundEdges() {
var _local4 = _gameObjects.length;
var _local3 = [];
while (_local4--) {
if (_gameObjects[_local4].getType() == 13) {
_local3.push(_gameObjects[_local4]);
}
}
_local4 = 0;
while (_local4 < _local3.length) {
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local4 == _local2) {
} else {
var _local6 = _local3[_local4].getShape().getMaxX();
var _local5 = _local3[_local2].getShape().getMinX();
if (((_local6 - _local5) < 10) && ((_local6 - _local5) > -10)) {
_local3[_local4].fixRightEdge();
_local3[_local2].fixLeftEdge();
}
}
_local2++;
}
_local4++;
}
}
function installRailEnds() {
var _local16 = [];
var _local6 = 0;
while (_local6 < _railGameObjs.length) {
var _local4 = _railGameObjs[_local6].getShape().getCollisionPoints();
var _local15 = new flash.geom.Point(_local4[0].x, _local4[0].y);
var _local13 = new flash.geom.Point(_local4[_local4.length - 1].x, _local4[_local4.length - 1].y);
var _local9 = [];
var _local17 = 0;
var _local3 = 0;
while (_local3 < _railGameObjs.length) {
if (_local6 == _local3) {
} else {
var _local2 = _railGameObjs[_local3].getShape().getCollisionPoints();
var _local7 = new flash.geom.Point(_local2[0].x, _local2[0].y);
var _local5 = new flash.geom.Point(_local2[_local2.length - 1].x, _local2[_local2.length - 1].y);
var _local14 = Math.floor(Math.abs(_local7.x - _local13.x));
var _local11 = Math.floor(Math.abs(_local15.x - _local5.x));
var _local12 = Math.floor(Math.abs(_local7.y - _local13.y));
var _local10 = Math.floor(Math.abs(_local15.y - _local5.y));
if (((_local14 <= 20) || (_local11 <= 20)) && ((_local12 <= 20) || (_local10 <= 20))) {
_local9.push(_railGameObjs[_local3]);
}
}
_local3++;
}
if (_local9.length < 2) {
_local16.push([_railGameObjs[_local6], _local9[0]]);
}
_local6++;
}
var _local8 = 0;
while (_local8 < _local16.length) {
_local16[_local8][0].addRailEnd(_local16[_local8][1]);
_local8++;
}
}
function checkWallBottoms() {
var _local2 = _gameObjects.length;
var _local7 = [];
var _local8 = [];
var _local6 = [];
var _local5 = [];
while (_local2--) {
if (_gameObjects[_local2].getType() == WALL) {
_local7.push(_gameObjects[_local2]);
}
if (((_gameObjects[_local2].getType() == BLOCK_L) || (_gameObjects[_local2].getType() == CLOUD)) || (_gameObjects[_local2].getType() == GROUND)) {
_local8.push(_gameObjects[_local2]);
}
if (_gameObjects[_local2].getType() == BLOCK_L) {
_local6.push(_gameObjects[_local2]);
}
if (_gameObjects[_local2].getType() == CLOUD) {
_local5.push(_gameObjects[_local2]);
}
}
_local2 = 0;
while (_local2 < _local7.length) {
var _local9 = _local7[_local2].getShape().getMaxY();
var _local3 = 0;
while (_local3 < _local8.length) {
var _local4 = _local8[_local3].getShape().getMinY();
if (Math.abs(_local9 - _local4) < 5) {
_local7[_local2].swapBottomWallTile();
}
_local3++;
}
_local2++;
}
_local2 = 0;
while (_local2 < _local6.length) {
var _local10 = _local6[_local2].getShape().getMaxY();
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = _local5[_local3].getShape().getMinY();
if (Math.abs(_local10 - _local4) < 5) {
_local6[_local2].swapBottomBlockTile();
break;
}
_local3++;
}
_local2++;
}
}
function getObjectsBelow(obj) {
var _local10 = obj.getID();
var _local4 = new Array();
var _local12 = obj.getShape().getCurrentPosition();
var _local7 = Math.abs(int(_local12._vx / SCREEN_W));
var _local11 = Math.abs(int(_local12._vy / SCREEN_H));
var _local9 = a[_local7].length;
var _local5 = _local11;
while (_local5 < _local9) {
var _local6 = a[_local7][_local5].length;
var _local2 = 0;
while (_local2 < _local6) {
if (a[_local7][_local5][_local2] == true) {
_local4.push(_local2);
}
_local2++;
}
_local5++;
}
_local4.sort(16);
var _local8 = new Array();
var _local3 = 0;
while (_local3 < _local4.length) {
if ((_local4[_local3] != _local4[_local3 + 1]) && (_local4[_local3] != _local10)) {
_local8.push(_local4[_local3]);
}
_local3++;
}
return(_local8);
}
function getDistanceFromCurrentArea(obj) {
var _local10 = obj.getID();
var _local12 = new Array();
var _local2 = obj.getShape().getCurrentPosition();
var _local5 = Math.abs(int(_local2._vx / SCREEN_W));
var _local4 = Math.abs(int(_local2._vy / SCREEN_H));
var _local8 = Math.abs(int(vWorldX / SCREEN_W));
var _local7 = Math.abs(int(vWorldY / SCREEN_H));
var _local9 = Math.abs(_local5 - _local8);
var _local6 = Math.abs(_local4 - _local7);
var _local3 = Math.max(_local9, _local6);
return(_local3);
}
function setSpawnTimerActive(bToggle) {
_spawnTimerActive = bToggle;
}
function getSpawnTimerActive() {
return(_spawnTimerActive);
}
function resetSpawnTimer() {
_spawnCounter = 0;
}
function updateSpawnTimer() {
_spawnCounter++;
}
function getSpawnTimer() {
return(_spawnCounter);
}
function reSpawnBlocks() {
for (var _local2 in _blocksAbsorbed) {
_blocksAbsorbed[_local2].ReSpawn();
}
_blocksAbsorbed = [];
return(undefined);
}
function respawnEnemies() {
var _local2 = _gameObjects.length;
while (_local2--) {
if (_gameObjects[_local2]._class == ENEMY) {
if (_gameObjects[_local2]._isDismissed) {
_gameObjects[_local2].ReSpawn();
}
}
}
}
function CreateHero() {
var _local4 = _heroSpawnPosX;
var _local2 = _heroSpawnPosY;
var _local3 = new Game.Hero(_local4, _local2, _gameContext);
return(_local3);
}
function getHero() {
return(gHero);
}
function setHeroEditSpawn(bToggle) {
_heroEditSpawn = bToggle;
}
function getHeroEditSpawn() {
return(_heroEditSpawn);
}
function setHeroSpawnPosX(nXpos) {
_heroSpawnLastPosX = nXpos;
}
function setHeroSpawnPosY(nYpos) {
_heroSpawnLastPosY = nYpos;
}
function getHeroSpawnPosX() {
return(_heroSpawnLastPosX);
}
function getHeroSpawnPosY() {
return(_heroSpawnLastPosY);
}
function getAmILookingUpOrDown() {
return(_lookingOffsetY != 0);
}
function getIsLookingUp() {
return(_lookingOffsetY > 0);
}
function getIsLookingDown() {
return(_lookingOffsetY < 0);
}
function setIsLookingUp() {
_lookingUp = true;
}
function setIsLookingDown() {
_lookingDown = true;
}
function canILookDown() {
aHeroY = gHero.getShape().getCurrentPosition()._vy;
if (aHeroY > 3750) {
return(false);
}
return(true);
}
function lookUp() {
var _local2 = 26;
aHeroY = gHero.getShape().getCurrentPosition()._vy;
var _local3 = getCurrentWorldBounds();
var _local4 = _local3[3];
if (_lookingUp) {
if ((_lookingOffsetY < _local2) && ((aHeroY + 50) < _local4)) {
_lookingOffsetY = _lookingOffsetY + _lookSpeed;
}
} else {
_lookingOffsetY = _lookingOffsetY - _lookReturnSpeed;
if (_lookingOffsetY < 0) {
_lookingOffsetY = 0;
}
}
_lookingUp = false;
}
function setLookDownLimit() {
_lookDownLimit = -50;
if (gHero.getShape().getCurrentPosition()._vy > 3650) {
_lookDownLimit = -50;
}
var _local2 = -(3600 + vWorldY);
if (_local2 > _lookDownLimit) {
_lookDownLimit = _local2;
}
}
function lookDown() {
if (_lookingDown) {
if (_lookingOffsetY > _lookDownLimit) {
_lookingOffsetY = _lookingOffsetY - _lookSpeed;
}
} else {
_lookingOffsetY = _lookingOffsetY + _lookReturnSpeed;
if (_lookingOffsetY > 0) {
_lookingOffsetY = 0;
}
}
_lookingDown = false;
}
function getCurrentMapArea() {
return("a");
}
function getBufferMouseX() {
return(Math.floor(_BUFFER._xmouse));
}
function getBufferMouseY() {
return(Math.floor(_BUFFER._ymouse));
}
function getCurrentXCenter() {
return(_camCenterX);
}
function getCurrentYCenter() {
return(_camCenterY);
}
function getCurrentWorldBounds() {
var _local2 = [_camCenterX - (SCREEN_W / 2), _camCenterX + (SCREEN_W / 2), _camCenterY - (SCREEN_H / 2), _camCenterY + (SCREEN_H / 2)];
return(_local2);
}
function getWorldX() {
return(vWorldX);
}
function previousWorldX() {
return(_previousWorldX);
}
function getWorldY() {
return(vWorldY);
}
function previousWorldY() {
return(_previousWorldY);
}
function UpdateCamera() {
aHeroX = gHero.getShape().getCurrentPosition()._vx;
aHeroY = gHero.getShape().getCurrentPosition()._vy;
if (_lookingUp || (_lookingOffsetY > 0)) {
lookUp();
}
if (_lookingDown || (_lookingOffsetY < 0)) {
lookDown();
}
handleCameraShake();
_camCenterX = vWorldX + (SCREEN_W / 2);
_camCenterY = -(_BUFFER._y - (SCREEN_H / 2));
_previousWorldX = vWorldX;
_previousWorldY = vWorldY;
var _local4;
var _local5;
var _local8;
var _local9;
if (gHero._isStuckToRail) {
_local4 = _camCenterX;
_local5 = _camCenterY;
_local8 = 0.25;
_local9 = 0.25;
} else {
_local4 = _camCenterX + (125 * (gHero._isFacing * -1));
_local5 = _camCenterY + 60;
_local8 = 0.1;
_local9 = 0.25;
}
var _local11 = aHeroX - _local4;
var _local10 = aHeroY - _local5;
if (_local4 != aHeroX) {
var _local12 = _local11 * _local8;
var _local7 = vWorldX + _local12;
if (_local7 >= (XMAX - SCREEN_W)) {
vWorldX = XMAX - SCREEN_W;
} else if (_local7 <= XMIN) {
vWorldX = XMIN;
} else {
vWorldX = _local7;
}
}
if (_local5 != aHeroY) {
var _local12 = _local10 * _local9;
var _local6 = vWorldY - _local12;
if (_local6 >= 0) {
vWorldY = 0;
} else if (_local6 <= -3600) {
vWorldY = -3600;
} else {
vWorldY = _local6;
}
}
vWorldY = vWorldY + (_lookingOffsetY + _cameraShakeY);
vWorldX = vWorldX + _cameraShakeX;
var _local3 = vWorldX - _previousWorldX;
var _local2 = vWorldY - _previousWorldY;
_gameContext.getBackground().setAmountToMove(0, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(1, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(2, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(3, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(4, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(5, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(6, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(7, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(8, _local3, -_local2);
_gameContext.getBackground().setAmountToMove(9, _local3, -_local2);
drawScreen();
_BUFFER._x = -int(vWorldX);
_BUFFER._y = int(vWorldY);
}
function drawScreen() {
var _local3 = Math.abs(int(vWorldX / SCREEN_W));
var _local2 = Math.abs(int(vWorldY / SCREEN_H));
if (((_local3 == oldax) && (_local2 == olday)) && (!forceRedraw)) {
var _local7 = getNumGameObjects();
var _local9 = 0;
while (_local9 < _local7) {
if (!oV[_local9]) {
_gameObjects[_local9].setOnScreen(false);
}
_local9++;
}
_sameAreaLastFrame = true;
} else {
_sameAreaLastFrame = false;
toggleForceRedraw(false);
oldax = _local3;
olday = _local2;
ar = [];
for (var _local9 in a[_local3][_local2]) {
ar[_local9] = true;
}
for (var _local9 in a[_local3 + 1][_local2]) {
ar[_local9] = true;
}
for (var _local9 in a[_local3][_local2 + 1]) {
ar[_local9] = true;
}
for (var _local9 in a[_local3 + 1][_local2 + 1]) {
ar[_local9] = true;
}
}
var _local10 = getCurrentWorldBounds();
var _local5 = _local10[0];
var _local8 = _local10[1];
var _local4 = _local10[2];
var _local6 = _local10[3];
oV = [];
_colGameObjects = [];
for (var _local9 in ar) {
if (oXmax[_local9] > _local5) {
if (oXmin[_local9] < _local8) {
if (oYmax[_local9] > _local4) {
if (oYmin[_local9] < _local6) {
oV[_local9] = true;
_colGameObjects.push(_gameObjects[_local9]);
_gameObjects[_local9].setOnScreen(true);
}
}
}
}
}
}
function shakeCamera(intensity) {
_shakeIntensity = intensity;
if (intensity == 1) {
_shakeTime = 0.1;
}
if (intensity == 2) {
_shakeTime = 0.1;
}
}
function handleCameraShake() {
if (_cameraShakeY == 0) {
return(undefined);
}
if (_shakeTime > 0) {
_shakeTime = _shakeTime - _gameContext.getDT();
if (_shakeIntensity == 1) {
_cameraShakeY = (-(Math.random() * 15)) + 30;
} else {
_cameraShakeY = (-(Math.random() * 3)) + 6;
}
} else {
_cameraShakeY = 0;
_cameraShakeX = 0;
}
}
function showHUD() {
_hud = new Base.SpriteEntity(_gameContext, 7, 300, "scrn_interface", "interface", 20000, 0, 0, 2, -1, -1);
_hud.addChild("btn_instructions", 0, 0, 22, 22, 1, 1);
_hud.addChild("btn_music", 0, 0, 22, 22, 1, 2);
_hud.moveChildToFrame("btn_music", _musicOff * 20);
_hud.moveChildToFrame("health_bar", 1);
_hud.getChild("tokens").text = "0";
}
function removeHUD() {
_hud.removeSprite();
delete _hud;
}
function updateHUD() {
_hud.moveChildToFrame("health_bar", _health);
_hud.getChild("tokens").text = _tokensCollectedMin.length;
_hud.getChild("hX").text = "HeroX:" + aHeroX;
_hud.getChild("hY").text = "HeroY:" + aHeroY;
_hud.getChild("Ln").text = getCurrentLevel();
_hud.getChild("FR").text = _gameContext.getTimeManager().getFramerate();
var _local2 = false;
if (_hud.isMouseOverChild("btn_music")) {
_hud.moveChildToFrame("btn_music", 10 + (_musicOff * 20));
if (_gameContext.getPadManager().getMouseJustPressed()) {
_musicOff = _musicOff ^ 1;
if (_musicOff == 1) {
_soundModule.StopMusic();
_soundModule.setMusicOff(true);
} else {
_soundModule.setMusicOff(false);
getSoundModule().PlayMusic("puzzle");
}
}
} else {
_hud.moveChildToFrame("btn_music", 1 + (_musicOff * 20));
}
if (_hud.isMouseOverChild("btn_instructions")) {
_hud.moveChildToFrame("btn_instructions", 10);
if (_gameContext.getPadManager().getMouseJustPressed()) {
return(1);
}
} else {
_hud.moveChildToFrame("btn_instructions", 1);
}
if (_local2 == true) {
_gameContext.getUIManager().cursorOn();
_gameContext.getUIManager().setNonBufferCursorPosition();
} else {
_gameContext.getUIManager().cursorOff();
}
}
function getMusicOff() {
return(_musicOff);
}
function setHealth(amount) {
_health = amount;
}
function adjustHealth(amount) {
_health = _health + amount;
}
function getHealth() {
return(_health);
}
function resetHealth() {
_health = 1;
}
function setLives(amount) {
_lives = amount;
}
function adjustLives(amount) {
_lives = _lives + amount;
}
function getLives() {
return(_lives);
}
function CheckForSavedGame() {
var _local2 = SharedObject.getLocal(_localSavedGameRepository);
if (_local2.data.savedGameData != undefined) {
return(true);
}
return(false);
}
function LoadSavedGameToGame() {
var _local2 = SharedObject.getLocal(_localSavedGameRepository);
_savedGameData = _local2.data.savedGameData;
_lives = _savedGameData.lives;
_health = _savedGameData.health;
return(_savedGameData);
}
function SaveGameDataToShared() {
var _local2 = SharedObject.getLocal(_localSavedGameRepository);
_savedGameData.lives = _lives;
_savedGameData.health = _health;
_local2.data.savedGameData = _savedGameData;
_local2.flush();
return(true);
}
function toggleGrid(bToggle) {
_showGrid = bToggle;
}
function getGridVisible(Void) {
return(_showGrid);
}
function drawGrid() {
var _local3 = 50;
var _local12 = getCurrentWorldBounds();
var _local5 = _local12[0];
var _local7 = _local12[1];
var _local4 = _local12[2];
var _local6 = _local12[3];
var _local11 = _local5;
var _local9 = _local7;
var _local2 = 0;
while (_local2 < YMAX) {
if ((_local2 % SCREEN_H) == 0) {
_graphics.SetStyle(2, 153, 100);
} else {
_graphics.SetStyle(0, 13421772, 80);
}
if ((_local2 > _local4) && (_local2 < _local6)) {
_graphics.DrawLine_S(_local11, _local2, _local9, _local2);
}
_local2 = _local2 + _local3;
}
var _local10 = _local4;
var _local8 = _local6;
_local2 = 0;
while (_local2 < XMAX) {
if ((_local2 % SCREEN_W) == 0) {
_graphics.SetStyle(2, 153, 100);
} else {
_graphics.SetStyle(0, 13421772, 80);
}
if ((_local2 > _local5) && (_local2 < _local7)) {
_graphics.DrawLine_S(_local2, _local10, _local2, _local8);
}
_local2 = _local2 + _local3;
}
}
function isRollover(x, y, w, h) {
var _local3 = _gameContext.getPadManager().getMousePosX();
var _local2 = _gameContext.getPadManager().getMousePosY();
if (_local3 < x) {
return(false);
}
if (_local3 > (x + w)) {
return(false);
}
if (_local2 < y) {
return(false);
}
if (_local2 > (y + h)) {
return(false);
}
return(true);
}
function toString() {
return("GameData()");
}
var _invaded = false;
var _controls = [{keyAction:"LookUp", keyID:38}, {keyAction:"LookDown", keyID:40}, {keyAction:"MoveLeft", keyID:37}, {keyAction:"MoveRight", keyID:39}, {keyAction:"Magnetize", keyID:90}, {keyAction:"Jump", keyID:32}, {keyAction:"ResetHealth", keyID:72}, {keyAction:"LevelSkip", keyID:76}];
static var GAME_PAUSED = 0;
static var GAME_PLAY = 1;
static var GAME_EDIT = 2;
var _screens = [{id:6, idx:1, spriteName:"scrn_Titlecard", clipName:"titlecard", depth:50000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:1, children:[["btn_start", 0, 0, 239, 82, 1, 2, 60, false, 129, 1]]}, {id:6, idx:1, spriteName:"scrn_Instructions", clipName:"instructions", depth:50000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:1, children:[["btn_playnow", 0, 0, 260, 60, 1, 2, 60, false, 129, 1]]}, {id:6, idx:1, spriteName:"scrn_interface", clipName:"interface", depth:20000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:2, children:[["btn_instructions", 0, 0, 22, 22, 1, 2, 60, false, 129, 1], ["btn_music", 0, 0, 22, 22, 1, 2, 60, false, 129, 2]]}, {id:6, idx:1, spriteName:"LoadingLevelScreen", clipName:"trans", depth:60000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:0, children:[]}, {id:6, idx:1, spriteName:"scrn_Win", clipName:"trans", depth:60000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:2, children:[["btn_hub", 0, 0, 167, 60, 1, 2, 60, false, 129, 2], ["btn_play", 0, 0, 249, 60, 1, 2, 60, false, 129, 3]]}, {id:6, idx:1, spriteName:"scrn_TitlecardAlt", clipName:"titlecard", depth:50000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:1, children:[["btn_start", 0, 0, 239, 82, 1, 2, 60, false, 129, 1]]}, {id:6, idx:1, spriteName:"scrn_InstructionsAlt", clipName:"instructions", depth:50000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:1, children:[["btn_playnow", 0, 0, 260, 60, 1, 2, 60, false, 129, 1]]}, {id:6, idx:1, spriteName:"scrn_WinAlt", clipName:"trans", depth:60000, xPos:0, yPos:0, regPt:2, w:-1, h:-1, numChild:2, children:[["btn_play", 0, 0, 249, 60, 1, 2, 60, false, 129, 3]]}];
var _localDataRepository = "CNI_MagnetFace_Maps";
var SavedLevelMaps = [];
var InitLevelMaps = [];
var _localSavedGameRepository = "CNI_MagnetFace_GameData";
static var PLATFORM = 1;
static var ITEM = 2;
static var TOKEN = 3;
static var SPIKE = 4;
static var RAIL = 5;
static var ENEMY = 6;
static var SIGN = 7;
static var DECORATION = 8;
static var EMPTY = 0;
static var GROUND = 1;
static var CLOUD = 2;
static var MOVEABLE1 = 3;
static var MOVEABLE2 = 4;
static var MOVEABLE3 = 5;
static var MOVEABLE4 = 6;
static var MOVEABLE5 = 7;
static var MOVEABLE6 = 8;
static var MOVEABLE7 = 9;
static var MOVEABLE8 = 10;
static var BLOCK_S = 11;
static var BLOCK_M = 12;
static var BLOCK_L = 13;
static var WALL = 14;
static var DOOR1 = 15;
static var DOOR2 = 16;
static var DOOR3 = 17;
static var SWITCH1 = 18;
static var SWITCH2 = 19;
static var SWITCH3 = 20;
static var SWITCH4 = 21;
static var EXITDOOR = 22;
static var CHECKPOINT = 23;
static var ITEM_GUN = 24;
static var ITEM_BOX = 25;
static var GSPIKE = 26;
static var ASPIKE = 27;
static var TOKEN_MAJ = 28;
static var TOKEN_MIN = 29;
static var ENEMY1 = 30;
static var ENEMY2 = 31;
static var RAIL_HOR_lr = 32;
static var RAIL_HOR_rl = 33;
static var RAIL_VER_up = 34;
static var RAIL_VER_dn = 35;
static var RAIL_QTR1_ccl = 36;
static var RAIL_QTR1_cl = 37;
static var RAIL_QTR2_ccl = 38;
static var RAIL_QTR2_cl = 39;
static var RAIL_QTR3_ccl = 40;
static var RAIL_QTR3_cl = 41;
static var RAIL_QTR4_ccl = 42;
static var RAIL_QTR4_cl = 43;
static var RAIL_SNK1_lr = 44;
static var RAIL_SNK1_rl = 45;
static var RAIL_SNK2_lr = 46;
static var RAIL_SNK2_rl = 47;
static var RAIL_SNK3_lr = 48;
static var RAIL_SNK3_rl = 49;
static var RAIL_SNK4_lr = 50;
static var RAIL_SNK4_rl = 51;
static var SIGN_1 = 52;
static var SIGN_2 = 53;
static var SIGN_3 = 54;
static var SIGN_4 = 55;
static var SIGN_5 = 56;
static var SIGN_6 = 57;
static var GUN_CEIL_SM = 58;
static var GUN_FLOR_SM = 59;
static var GUN_FLOR_LG = 60;
static var WINDOW_SM = 61;
static var WINDOW_MD = 62;
static var WINDOW_LG = 63;
static var COMP_PARTS = 64;
static var FENCE = 65;
static var SIGN_7 = 66;
static var SIGN_8 = 67;
static var SIGN_9 = 68;
static var SIGN_10 = 69;
static var LAST_ITEM = 70;
static var vSIDE = 0;
static var vALL = 1;
static var vTOP = 2;
static var vNONE = 3;
static var SPIKE_DAMAGE = 20;
static var ENEMY1_DAMAGE = 20;
var _heroPhysics = {_acceleration:2, _speed:2, _speedMin:0.2, _speedMax:10, _friction:0.7, _gravity:2.4, _bounce:0.8, _jumpStrength:30, _fallMax:24, _wallBounce:4};
static var SCREEN_W = 400;
static var SCREEN_H = 600;
static var XMIN = 0;
static var XMAX = 9000;
static var YMIN = 0;
static var YMAX = 4000;
var moveBuffer = 20;
var camScrollZoneX = 20;
var camScrollZoneY = 20;
var _platformColors = [[0, 13421772], [3355392, 3355392], [6710784, 6710784], [6723993, 6723993], [13369344, 13369344], [13369344, 13369344], [10053120, 10053120], [10053120, 10053120], [10053120, 10053120], [13421772, 13421772], [13421772, 13421772], [16737792, 16737792], [16763904, 16763904], [39168, 39168]];
var _soundList = ["hero_run_loop", "hero_land", "hero_jump", "hero_hit_by_block", "hero_checkpoint", "hero_pickup_cheese", "object_block_push_loop", "her_vacuum_blow", "her_vacuum_suck", "hero_look_up", "hero_look_down", "hero_gun_stick_face", "magnet_ring_up1", "magnet_ring_cycle1", "magnet_ring_cycle2", "magnet_ring_cycle3", "magnet_rail_loop", "magnet_ring_down1", "magnet_hero_stick", "object_gun_impact", "object_gun_land", "object_block_land", "switch_activate", "switch_deactivate", "magnet_object_magnetized", "magnet_object_tow_loop", "enemy_hit_by_gun", "enemy_death", "obstacle_blades_loop", "enemy_hover_loop", "music_title", "music_puzzle", "music_battle", "cn_magnetface_levelcomplete", "music_gamecomplete", "btnPress"];
var screenPadX = 25;
var screenPadY = 42;
var _lookSpeed = 14;
var _lookReturnSpeed = 20;
var _lookDownLimit = -50;
}
Symbol 1673 MovieClip [__Packages.Base.Graphics] Frame 0
class Base.Graphics
{
var _buffer, _thickness, _rgb, _alpha;
function Graphics (buffer) {
_buffer = buffer;
_thickness = 0;
_rgb = 0;
_alpha = 100;
}
function Clear() {
_buffer.clear();
_buffer.lineStyle(_thickness, _rgb, _alpha);
}
function SetStyle(thick, rgb, alpha) {
_buffer.lineStyle(thick, rgb, alpha);
}
function StartFill(x, y, rgb, alpha) {
_buffer.moveTo(x, y);
_buffer.beginFill(rgb, alpha);
}
function EndFill() {
_buffer.endFill();
}
function StopFill() {
_buffer.endFill();
}
function DrawLine(va, vb) {
_buffer.moveTo(va.x, va.y);
_buffer.lineTo(vb.x, vb.y);
}
function DrawLine_S(x0, y0, x1, y1) {
_buffer.moveTo(x0, y0);
_buffer.lineTo(x1, y1);
}
function DrawLinestrip(vList) {
_buffer.moveTo(vList[0].x, vList[0].y);
var _local2 = 0;
while (_local2 < vList.length) {
_buffer.lineTo(vList[_local2].x, vList[_local2].y);
_local2++;
}
}
function DrawTri(va, vb, vc) {
_buffer.moveTo(va.x, va.y);
_buffer.lineTo(vb.x, vb.y);
_buffer.lineTo(vc.x, vc.y);
_buffer.lineTo(va.x, va.y);
}
function DrawTri_S(vax, vay, vbx, vby, vcx, vcy) {
_buffer.moveTo(vax, vay);
_buffer.lineTo(vbx, vby);
_buffer.lineTo(vcx, vcy);
_buffer.lineTo(vax, vay);
}
function DrawQuad(a, b, c, d) {
_buffer.moveTo(a._vx, a._vy);
_buffer.lineTo(b._vx, b._vy);
_buffer.lineTo(c._vx, c._vy);
_buffer.lineTo(d._vx, d._vy);
_buffer.lineTo(a._vx, a._vy);
}
function DrawQuad_S(ax, ay, bx, by, cx, cy, dx, dy) {
_buffer.moveTo(ax, ay);
_buffer.lineTo(bx, by);
_buffer.lineTo(cx, cy);
_buffer.lineTo(dx, dy);
_buffer.lineTo(ax, ay);
}
function DrawPlus(v) {
_buffer.moveTo(v._vx - 4, v._vy);
_buffer.lineTo(v._vx + 4, v._vy);
_buffer.moveTo(v._vx, v._vy - 4);
_buffer.lineTo(v._vx, v._vy + 4);
}
function DrawPlus_S(vx, vy) {
_buffer.moveTo(vx - 4, vy);
_buffer.lineTo(vx + 4, vy);
_buffer.moveTo(vx, vy - 4);
_buffer.lineTo(vx, vy + 4);
}
function DrawPlusR(v, r) {
_buffer.moveTo(v._vx - r, v._vy);
_buffer.lineTo(v._vx + r, v._vy);
_buffer.moveTo(v._vx, v._vy - r);
_buffer.lineTo(v._vx, v._vy + r);
}
function DrawCross(v) {
_buffer.moveTo(v._vx - 1, v._vy - 1);
_buffer.lineTo(v._vx + 1, v._vy + 1);
_buffer.moveTo(v._vx + 1, v._vy - 1);
_buffer.lineTo(v._vx - 1, v._vy + 1);
}
function DrawCross_S(vx, vy) {
_buffer.moveTo(vx - 1, vy - 1);
_buffer.lineTo(vx + 1, vy + 1);
_buffer.moveTo(vx + 1, vy - 1);
_buffer.lineTo(vx - 1, vy + 1);
}
function DrawCrossR(v, r) {
_buffer.moveTo(v._vx - r, v._vy - r);
_buffer.lineTo(v._vx + r, v._vy + r);
_buffer.moveTo(v._vx + r, v._vy - r);
_buffer.lineTo(v._vx - r, v._vy + r);
}
function DrawCircle(v, r) {
var _local4 = v._vx;
var _local3 = v._vy;
_buffer.moveTo(_local4 + r, _local3);
_buffer.curveTo(r + _local4, (0.4142 * r) + _local3, (0.7071 * r) + _local4, (0.7071 * r) + _local3);
_buffer.curveTo((0.4142 * r) + _local4, r + _local3, _local4, r + _local3);
_buffer.curveTo((-0.4142 * r) + _local4, r + _local3, (-0.7071 * r) + _local4, (0.7071 * r) + _local3);
_buffer.curveTo((-r) + _local4, (0.4142 * r) + _local3, (-r) + _local4, _local3);
_buffer.curveTo((-r) + _local4, (-0.4142 * r) + _local3, (-0.7071 * r) + _local4, (-0.7071 * r) + _local3);
_buffer.curveTo((-0.4142 * r) + _local4, (-r) + _local3, _local4, (-r) + _local3);
_buffer.curveTo((0.4142 * r) + _local4, (-r) + _local3, (0.7071 * r) + _local4, (-0.7071 * r) + _local3);
_buffer.curveTo(r + _local4, (-0.4142 * r) + _local3, r + _local4, _local3);
}
function DrawCircle_S(x, y, r) {
_buffer.moveTo(x + r, y);
_buffer.curveTo(r + x, (0.4142 * r) + y, (0.7071 * r) + x, (0.7071 * r) + y);
_buffer.curveTo((0.4142 * r) + x, r + y, x, r + y);
_buffer.curveTo((-0.4142 * r) + x, r + y, (-0.7071 * r) + x, (0.7071 * r) + y);
_buffer.curveTo((-r) + x, (0.4142 * r) + y, (-r) + x, y);
_buffer.curveTo((-r) + x, (-0.4142 * r) + y, (-0.7071 * r) + x, (-0.7071 * r) + y);
_buffer.curveTo((-0.4142 * r) + x, (-r) + y, x, (-r) + y);
_buffer.curveTo((0.4142 * r) + x, (-r) + y, (0.7071 * r) + x, (-0.7071 * r) + y);
_buffer.curveTo(r + x, (-0.4142 * r) + y, r + x, y);
}
function DrawArc(p0, p1, c) {
_buffer.moveTo(p0.x, p0.y);
_buffer.curveTo(c.x, c.y, p1.x, p1.y);
}
function DrawArc_S(x0, y0, x1, y1, xc, yc) {
_buffer.moveTo(x0, y0);
_buffer.curveTo(xc, yc, x1, y1);
}
function DrawAABB(p, xw, yw) {
var _local8 = new Base.VectorCoord(p._vx + xw, p._vy + yw);
var _local7 = new Base.VectorCoord(p._vx - xw, p._vy + yw);
var _local6 = new Base.VectorCoord(p._vx - xw, p._vy - yw);
var _local5 = new Base.VectorCoord(p._vx + xw, p._vy - yw);
DrawQuad(_local8, _local7, _local6, _local5);
}
function DrawAABB_S(minx, maxx, miny, maxy) {
var _local5 = new Base.VectorCoord(maxx, maxy);
var _local4 = new Base.VectorCoord(minx, maxy);
var _local3 = new Base.VectorCoord(minx, miny);
var _local2 = new Base.VectorCoord(maxx, miny);
DrawQuad(_local5, _local4, _local3, _local2);
}
function drawLine(oData, numPoints) {
var _local2 = 0;
while (_local2 <= (numPoints - 1)) {
_buffer.moveTo(oData["x" + _local2], oData["y" + _local2]);
var _local5 = (oData["x" + _local2] + oData["cx" + _local2]) / 2;
var _local4 = (oData["y" + _local2] + oData["cy" + _local2]) / 2;
_buffer.curveTo(_local5, _local4, oData["x" + (_local2 + 1)], oData["y" + (_local2 + 1)]);
_local2++;
}
}
function DrawSnake1(ptA, ptB) {
var _local8 = ptA.x + 135;
var _local6 = ptA.y;
var _local10 = ptA.x + 178;
var _local9 = ptA.y + 128;
var _local4 = ptA.x + 225;
var _local3 = ptA.y + 272;
var _local7 = _local4 + 40;
var _local5 = _local3 + 110;
_buffer.moveTo(ptA.x, ptA.y);
_buffer.curveTo(_local8, _local6, _local10, _local9);
_buffer.lineTo(_local4, _local3);
_buffer.curveTo(_local7, _local5, ptB.x, ptB.y);
}
function DrawSnake2(ptA, ptB) {
var _local8 = ptA.x;
var _local6 = ptA.y - 135;
var _local10 = ptA.x + 128;
var _local9 = ptA.y - 178;
var _local4 = ptA.x + 272;
var _local3 = ptA.y - 225;
var _local7 = _local4 + 110;
var _local5 = _local3 - 40;
_buffer.moveTo(ptA.x, ptA.y);
_buffer.curveTo(_local8, _local6, _local10, _local9);
_buffer.lineTo(_local4, _local3);
_buffer.curveTo(_local7, _local5, ptB.x, ptB.y);
}
function DrawSnake3(ptA, ptB) {
var _local8 = ptA.x;
var _local6 = ptA.y + 135;
var _local10 = ptA.x + 128;
var _local9 = ptA.y + 178;
var _local4 = ptA.x + 272;
var _local3 = ptA.y + 225;
var _local7 = _local4 + 110;
var _local5 = _local3 + 40;
_buffer.moveTo(ptA.x, ptA.y);
_buffer.curveTo(_local8, _local6, _local10, _local9);
_buffer.lineTo(_local4, _local3);
_buffer.curveTo(_local7, _local5, ptB.x, ptB.y);
}
function DrawSnake4(ptA, ptB) {
var _local8 = ptA.x + 135;
var _local6 = ptA.y;
var _local10 = ptA.x + 178;
var _local9 = ptA.y - 128;
var _local4 = ptA.x + 225;
var _local3 = ptA.y - 272;
var _local7 = _local4 + 40;
var _local5 = _local3 - 110;
_buffer.moveTo(ptA.x, ptA.y);
_buffer.curveTo(_local8, _local6, _local10, _local9);
_buffer.lineTo(_local4, _local3);
_buffer.curveTo(_local7, _local5, ptB.x, ptB.y);
}
function DrawConcaveCCWArc_S(cx, cy, px, py) {
var _local8 = px;
var _local7 = py;
var _local12 = _local8 - cx;
var _local11 = _local7 - cy;
var _local6 = Math.sqrt((_local12 * _local12) + (_local11 * _local11));
var _local17 = _local11;
var _local16 = -_local12;
var _local3 = (_local8 + _local17) - cx;
var _local2 = (_local7 + _local16) - cy;
var _local14 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local14;
_local2 = _local2 / _local14;
_local3 = _local3 * _local6;
_local2 = _local2 * _local6;
_local3 = _local3 + cx;
_local2 = _local2 + cy;
var _local5 = ((_local8 + _local3) * 0.5) - cx;
var _local4 = ((_local7 + _local2) * 0.5) - cy;
var _local13 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
var _local15 = _local6 - _local13;
_local5 = _local5 / _local13;
_local4 = _local4 / _local13;
_local5 = _local5 * (_local6 + _local15);
_local4 = _local4 * (_local6 + _local15);
_local5 = _local5 + cx;
_local4 = _local4 + cy;
_buffer.moveTo(_local8, _local7);
_buffer.curveTo(_local5, _local4, _local3, _local2);
_local8 = _local3;
_local7 = _local2;
_local12 = _local8 - cx;
_local11 = _local7 - cy;
_local6 = Math.sqrt((_local12 * _local12) + (_local11 * _local11));
_local17 = _local11;
_local16 = -_local12;
_local3 = (_local8 + _local17) - cx;
_local2 = (_local7 + _local16) - cy;
_local14 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local14;
_local2 = _local2 / _local14;
_local3 = _local3 * _local6;
_local2 = _local2 * _local6;
_local3 = _local3 + cx;
_local2 = _local2 + cy;
_local5 = ((_local8 + _local3) * 0.5) - cx;
_local4 = ((_local7 + _local2) * 0.5) - cy;
_local13 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_local15 = _local6 - _local13;
_local5 = _local5 / _local13;
_local4 = _local4 / _local13;
_local5 = _local5 * (_local6 + _local15);
_local4 = _local4 * (_local6 + _local15);
_local5 = _local5 + cx;
_local4 = _local4 + cy;
_buffer.curveTo(_local5, _local4, _local3, _local2);
}
function toString(Void) {
return("ShapeRender()");
}
}
Symbol 1674 MovieClip [__Packages.Base.VectorCoord] Frame 0
class Base.VectorCoord
{
var _vx, _vy;
function VectorCoord (x, y) {
_vx = x;
_vy = y;
}
function clone() {
var _local2 = new Base.VectorCoord(_vx, _vy);
return(_local2);
}
function plus(v2) {
var _local2 = new Base.VectorCoord(_vx + v2.x, _vy + v2.y);
return(_local2);
}
function minus(v2) {
var _local2 = new Base.VectorCoord(_vx - v2.x, _vy - v2.y);
return(_local2);
}
function normR() {
var _local2 = new Base.VectorCoord(_vy * -1, _vx);
return(_local2);
}
function dir() {
var _local2 = clone();
_local2.normalize();
return(_local2);
}
function proj(v2) {
var _local3 = v2.dot(v2);
var _local2;
if (_local3 == 0) {
_local2 = clone();
} else {
_local2 = v2.clone();
_local2.mult(dot(v2) / _local3);
}
return(_local2);
}
function projLen(v2) {
var _local2 = v2.dot(v2);
if (_local2 == 0) {
return(0);
}
return(Math.abs(dot(v2) / _local2));
}
function dot(v2) {
return((_vx * v2.x) + (_vy * v2.y));
}
function cross(v2) {
return((_vx * v2.y) - (_vy * v2.x));
}
function len() {
return(Math.sqrt((_vx * _vx) + (_vy * _vy)));
}
function copy(v2) {
_vx = v2.x;
_vy = v2.y;
}
function mult(s) {
_vx = _vx * s;
_vy = _vy * s;
}
function normalize() {
var _local2 = len();
if (_local2 != 0) {
_vx = _vx / _local2;
_vy = _vy / _local2;
}
}
function pluseq(v2) {
_vx = _vx + v2.x;
_vy = _vy + v2.y;
}
function minuseq(v2) {
_vx = _vx - v2.x;
_vy = _vy - v2.y;
}
function ToString() {
return(((("(" + _vx) + ",") + _vy) + ")");
}
}
Symbol 1675 MovieClip [__Packages.Game.GameTrack_AS2] Frame 0
class Game.GameTrack_AS2
{
var trkConnection;
function GameTrack_AS2 (level) {
trkConnection = new LocalConnection();
loadMovieNum ("tracker.swf", level);
}
function sendEventReplay() {
trackNewEvent("replay");
}
function sendEventWin() {
trackNewEvent("win");
}
function sendEventLose() {
trackNewEvent("lose");
}
function sendEventCustom(event) {
trackNewEvent("cust_" + event);
}
function trackNewEvent(eventName) {
trkConnection.send("trkConnection", "sendTracking", eventName);
}
}
Symbol 1676 MovieClip [__Packages.Base.Entity] Frame 0
class Base.Entity
{
var _gameContext, _currentAIState, _nextAIState, _id, _type, _cpuControlled, _networkControlled, _moveSpeed, _destPosX, _destPosY, _startingPositionX, _startingPositionY, _followingAIState;
function Entity (gameContext, entType, id, cpuControlled, networkControlled, state) {
_gameContext = gameContext;
_currentAIState = null;
_nextAIState = new state[undefined](this);
_id = id;
_type = entType;
}
function getID() {
return(_id);
}
function getType(Void) {
return(_type);
}
function isCPUControlled() {
return(_cpuControlled);
}
function isNetworkControlled() {
return(_networkControlled);
}
function setMoveSpeed(speed) {
_moveSpeed = speed;
}
function setDestPosX(pos) {
_destPosX = pos;
}
function setDestPosY(pos) {
_destPosY = pos;
}
function setStartingPositionToPosition() {
_startingPositionX = 0;
_startingPositionY = 0;
}
function getMoveSpeed() {
return(_moveSpeed);
}
function getDestPosX() {
return(_destPosX);
}
function getDestPosY() {
return(_destPosY);
}
function getStartingPositionX() {
return(_startingPositionX);
}
function getStartingPositionY() {
return(_startingPositionY);
}
function isAtDestination() {
return(true);
}
function setNextState(state) {
_nextAIState = new state[undefined](this);
}
function setFollowingState(state) {
_followingAIState = state;
}
function getFollowingState() {
return(_followingAIState);
}
function getCurrentState() {
return(_currentAIState);
}
function Update() {
if (_currentAIState != _nextAIState) {
_currentAIState = _nextAIState;
_currentAIState.Entry(_gameContext);
} else if (_currentAIState == _nextAIState) {
_currentAIState.PadInput(_gameContext);
_currentAIState.Update(_gameContext);
if (_currentAIState != _nextAIState) {
_currentAIState.Exit(_gameContext);
delete _currentAIState;
if (!_nextAIState) {
return(1);
}
}
}
return(0);
}
function toString(Void) {
return("Entity()");
}
}
Symbol 1677 MovieClip [__Packages.Base.State] Frame 0
class Base.State
{
function State () {
}
function CPUDecision(gameContext) {
return(undefined);
}
function NetworkDecision(gameContext) {
return(undefined);
}
function PadInput(gameContext) {
return(undefined);
}
function Entry(gameContext) {
return(undefined);
}
function Update(gameContext) {
return(undefined);
}
function Exit(gameContext) {
return(undefined);
}
}
Symbol 1678 MovieClip [__Packages.Base.AIState] Frame 0
class Base.AIState extends Base.State
{
function AIState () {
super();
}
function CPUDecision(gameContext) {
return(undefined);
}
function NetworkDecision(gameContext) {
return(undefined);
}
function PadInput(gameContext) {
return(undefined);
}
function Entry(gameContext) {
return(undefined);
}
function Update(gameContext) {
return(undefined);
}
function Exit(gameContext) {
return(undefined);
}
}
Symbol 1679 MovieClip [__Packages.Game.Hero] Frame 0
class Game.Hero extends Base.Entity
{
var _gameContext, _gameData, _type, _gameMode, _onFloor, _onPlatform, _isMoving, _isFacing, _yPosChange, _endLevel, _isOnSpikes, _isPushing, _isKnockDown, _canGetKnockedDown, _hasJumped, _hasPopped, _hasJustSpawned, _isMagnetActive, _isMagnetStuck, _isMagnetLocked, _isMagnetChanging, _magnetSize, _magnetCounter, _magnetTime, _isAttractedToRail, _isStuckToRail, _railToFollow, _railAccel, _shouldStartFlipped, _curPlatAttract, _isAttractedToPlat, _isStuckToPlat, _fx, _fy, _damageTimerActive, _damageCounter, _damageTime, _lineColor, _fillColor, _playMode, _editSelected, _isLocationEdit, _sHead, _sBody, _sMagnet, _spriteHero, _spriteHitSpark, _spriteHitSpark2, _spriteMagnetRadius, spriteColorLeft, colorBright, colorNorm, _bright, _timer, _numReturns, _curPlatform, _attRail, _preRail, _curRail, _nxtRail, _curStuckItem, getCurrentState, setNextState;
function Hero (x, y, gameContext) {
super(gameContext, 0, 1, false, false, Game.AIStates.Hero_Spawn);
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_type = 0;
Init(x, y);
}
function Init(x, y) {
_gameMode = _gameData.getGameMode();
_onFloor = false;
_onPlatform = false;
_isMoving = 0;
_isFacing = 1;
_yPosChange = 15;
_endLevel = false;
_isOnSpikes = false;
_isPushing = false;
_isKnockDown = false;
_canGetKnockedDown = true;
_hasJumped = false;
_hasPopped = false;
_hasJustSpawned = false;
_isMagnetActive = false;
_isMagnetStuck = false;
_isMagnetLocked = false;
_isMagnetChanging = false;
_magnetSize = 0;
_magnetCounter = 0;
_magnetTime = 32;
_isAttractedToRail = false;
_isStuckToRail = false;
_railToFollow = null;
_railAccel = 0.02;
_shouldStartFlipped = 1;
_curPlatAttract = null;
_isAttractedToPlat = false;
_isStuckToPlat = false;
_fx = 0;
_fy = 0;
_damageTimerActive = false;
_damageCounter = 0;
_damageTime = 50;
if (_gameMode == Game.GameData.GAME_EDIT) {
var _local5 = _gameData.getPlatformColor(0);
_lineColor = _local5[0];
_fillColor = _local5[1];
}
_playMode = true;
_editSelected = false;
_isLocationEdit = false;
var _local2 = new Base.VectorCoord(x, y);
_sHead = new Base.ShapeEntity(_gameContext, _local2, 24, 12, 12, this, Base.ShapeEntity.TID_CIRCLE, _gameData.getGraphics(), true);
_sBody = new Base.ShapeEntity(_gameContext, _local2, 23, 46, 46, this, Base.ShapeEntity.TID_AABB, _gameData.getGraphics(), true);
_sMagnet = new Base.ShapeEntity(_gameContext, _local2, 14, 7, 7, this, Base.ShapeEntity.TID_CIRCLE, _gameData.getGraphics(), true);
_spriteHero = new Base.SpriteEntity(_gameContext, 1, 1, "_hero", "_hero", _gameData.getBuffer().getNextHighestDepth(), x, y + 32, 1, -1, -1);
_spriteHitSpark = new Base.SpriteEntity(_gameContext, 1, 1, "hitspark01", "_hitspark01", _gameData.getBuffer().getNextHighestDepth(), x, y, 1, -1, -1);
_spriteHitSpark.setVisibility(false);
_spriteHitSpark2 = new Base.SpriteEntity(_gameContext, 1, 1, "hitspark02", "_hitspark02", _gameData.getBuffer().getNextHighestDepth(), x, y, 1, -1, -1);
_spriteHitSpark2.setVisibility(false);
_spriteMagnetRadius = new Base.SpriteEntity(_gameContext, 1, 1, "magnetField", "_magnetField", _gameData.getBuffer().getNextHighestDepth(), x, y, 1, -1, -1);
_spriteMagnetRadius.setVisibility(false);
spriteColorLeft = new Color(_spriteHero.getMovieClip());
colorBright = {rb:"125", gb:"125", bb:"125"};
colorNorm = {rb:"0", gb:"0", bb:"0"};
_bright = false;
_timer = 0.0666666666666667;
}
function getType() {
return(_type);
}
function toggleBright() {
if (_bright) {
spriteColorLeft.setTransform(colorBright);
_bright = false;
} else {
spriteColorLeft.setTransform(colorNorm);
_bright = true;
}
}
function toggleBrightOff() {
spriteColorLeft.setTransform(colorNorm);
_bright = false;
}
function RenderEntity() {
_sHead.updateMinMaxVectors();
_sBody.updateMinMaxVectors();
_sMagnet.updateMinMaxVectors();
if (_isMagnetChanging) {
magnetAnimateChange();
} else {
_spriteMagnetRadius.animateSprite();
}
if (((_isMagnetActive && (!_isMagnetStuck)) && (!_isMagnetLocked)) && (_isMoving == 0)) {
if (isMagnetTimeUp()) {
magnetAddSize();
}
}
_spriteHero.setPosition(_sHead.getCurrentPosition()._vx, _sHead.getCurrentPosition()._vy);
_spriteMagnetRadius.setPosition(_sHead.getCurrentPosition()._vx, _sHead.getCurrentPosition()._vy);
if ((!getLocationEdit()) && (getPlayMode())) {
animateSprite();
} else {
setHeadPosition();
setMagnetPosition();
}
if (_damageTimerActive) {
_timer = _timer - _gameContext.getDT();
if (_timer > 0.0015) {
_numReturns++;
return(undefined);
}
_numReturns = 0;
_timer = 0.0333333333333333;
toggleBright();
} else if (!_bright) {
toggleBrightOff();
}
}
function setOnFloor(bToggle) {
_onFloor = bToggle;
}
function getOnFloor() {
return(_onFloor);
}
function setOnPlatform(bToggle) {
_onPlatform = bToggle;
}
function getOnPlatform() {
return(_onPlatform);
}
function getCurrentPlatform() {
return(_curPlatform);
}
function resetCurrentPlatform() {
_curPlatform = null;
}
function getLocationEdit() {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
return(undefined);
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
return(undefined);
}
function getIsSelected() {
return(_editSelected);
}
function resetHeroPosition(x, y) {
_sBody.setNewPosition(x, y);
_spriteHero.setPosition(x, y);
}
function deleteSprites(Void) {
_spriteHero.removeSprite();
_spriteHitSpark.removeSprite();
_spriteHitSpark2.removeSprite();
_spriteMagnetRadius.removeSprite();
delete _spriteHero;
delete _spriteHitSpark;
delete _spriteHitSpark2;
delete _spriteMagnetRadius;
return(undefined);
}
function getHeroSprite() {
(_spriteHero);// not popped
}
function getBody() {
return(_sBody);
}
function getHead() {
return(_sHead);
}
function getMagnet() {
return(_sMagnet);
}
function getShape() {
return(_sBody);
}
function setHeadPosition() {
_sHead.setNewPosition(_sBody._curPos._vx, _sBody._curPos._vy - 40);
}
function setBodyPosition() {
_sBody.setNewPosition(_sHead._curPos._vx, _sHead._curPos._vy + 40);
}
function setMagnetPosition() {
_sMagnet.setNewPosition(_sHead._curPos._vx, _sHead._curPos._vy);
}
function getPhysics() {
return(_physics);
}
function setIsFacing(nDir) {
_isFacing = nDir;
switch (nDir) {
case Left :
_spriteHero.playFlipped();
break;
case Right :
_spriteHero.playUnflipped();
}
}
function getIsFacing() {
return(_isFacing);
}
function setRotation(rotation) {
_spriteHero.setRotation(rotation);
}
function setIsMoving(nToggle) {
_isMoving = nToggle;
}
function getIsMoving() {
return(_isMoving);
}
function initRailAttract(rail, ptX, ptY, t) {
_attRail = new Object();
_attRail = {Rail:rail, x:ptX, y:ptY, t:t};
_isAttractedToRail = true;
}
function initRailRide() {
_isAttractedToRail = false;
_isStuckToRail = true;
_preRail = _attRail.Rail;
_curRail = _attRail.Rail;
magnetStuck(_curRail);
_shouldStartFlipped = ((_curRail._signx < 0) ? -1 : 1);
var _local2 = ((_attRail.t > 0) ? (_attRail.t - 1) : 0);
_curRail.initFollow(_local2);
_gameData.getSoundModule().StopSound("magnet_ring_cycle1");
_gameData.getSoundModule().StopSound("magnet_ring_cycle2");
_gameData.getSoundModule().StopSound("magnet_ring_cycle3");
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_rail_loop")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_rail_loop", 100, 0, 0, 2000);
}
delete _nxtRail;
delete _attRail;
}
function switchRails() {
_preRail = _curRail;
_curRail = _nxtRail;
_curRail.initFollow(-1);
delete _nxtRail;
}
function popOffRail() {
_gameData.getSoundModule().StopSound("magnet_rail_loop");
startAnimating(ANMIMATIONS.RailOff.start, ANMIMATIONS.RailOff.end, 32, ANMIMATIONS.RailOff.loop);
_isMagnetStuck = false;
_isMagnetLocked = false;
setRotation(0);
_fx = 15 * _curRail._signx;
_fy = 1;
resetRailData();
}
function resetRailData() {
_isAttractedToRail = false;
_isStuckToRail = false;
delete _attRail;
delete _curRail;
delete _nxtRail;
}
function magnetStart() {
if (!_spriteMagnetRadius.getVisibility()) {
_spriteMagnetRadius.setVisibility(true);
}
_magnetCounter = 0;
_isMagnetActive = true;
_isMagnetLocked = false;
_isMagnetStuck = false;
_isAttractedToRail = false;
_isStuckToRail = false;
_isAttractedToPlat = false;
_isStuckToPlat = false;
_curPlatAttract = null;
magnetSetSize(1);
startAnimating(ANMIMATIONS.MagnetPower1.start, ANMIMATIONS.MagnetPower1.end, 32, ANMIMATIONS.MagnetPower1.loop);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_ring_up1")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_up1", 100, 0, 0, 0);
}
}
function magnetStop() {
if (_spriteMagnetRadius.getVisibility()) {
_spriteMagnetRadius.setVisibility(false);
}
startAnimating(ANMIMATIONS.Idle.start, ANMIMATIONS.Idle.end, 32, ANMIMATIONS.Idle.loop);
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_down1", 100, 0, 0, 0);
magnetSetSize(0);
_isMagnetLocked = false;
_isMagnetActive = false;
_isMagnetStuck = false;
_isAttractedToRail = false;
_isStuckToRail = false;
_isAttractedToPlat = false;
_isStuckToPlat = false;
_curPlatAttract = null;
}
function magnetStuck(obj) {
magnetSetSize(4);
_isMagnetChanging = true;
_isMagnetStuck = true;
_curStuckItem = obj;
}
function setHeroMagnetAnimation() {
switch (_magnetSize) {
case 1 :
startAnimating(ANMIMATIONS.MagnetPower1.start, ANMIMATIONS.MagnetPower1.end, 32, ANMIMATIONS.MagnetPower1.loop);
break;
case 2 :
startAnimating(ANMIMATIONS.MagnetPower2.start, ANMIMATIONS.MagnetPower2.end, 32, ANMIMATIONS.MagnetPower2.loop);
break;
case 3 :
startAnimating(ANMIMATIONS.MagnetPower3.start, ANMIMATIONS.MagnetPower3.end, 32, ANMIMATIONS.MagnetPower3.loop);
break;
case 4 :
startAnimating(ANMIMATIONS.MagnetPower1.start, ANMIMATIONS.MagnetPower1.end, 32, ANMIMATIONS.MagnetPower1.loop);
}
}
function magnetAddSize() {
if (_magnetSize == 3) {
return(undefined);
}
_magnetSize++;
_sMagnet.setNewRadius(_magnetSizexw[_magnetSize]);
_sMagnet.updateMinMaxVectors();
switch (_magnetSize) {
case 1 :
startAnimating(ANMIMATIONS.MagnetPower1.start, ANMIMATIONS.MagnetPower1.end, 32, ANMIMATIONS.MagnetPower1.loop);
_spriteMagnetRadius.startAnimating(1, 8, 32, false);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_ring_cycle1")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_cycle1", 100, 0, 0, 2000);
}
break;
case 2 :
startAnimating(ANMIMATIONS.MagnetPower2.start, ANMIMATIONS.MagnetPower2.end, 32, ANMIMATIONS.MagnetPower2.loop);
_spriteMagnetRadius.startAnimating(17, 24, 32, false);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_ring_cycle2")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_cycle2", 100, 0, 0, 2000);
}
_gameData.getSoundModule().StopSound("magnet_ring_cycle1");
break;
case 3 :
startAnimating(ANMIMATIONS.MagnetPower3.start, ANMIMATIONS.MagnetPower3.end, 32, ANMIMATIONS.MagnetPower3.loop);
_spriteMagnetRadius.startAnimating(33, 40, 32, false);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_ring_cycle3")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_cycle3", 100, 0, 0, 2000);
}
_gameData.getSoundModule().StopSound("magnet_ring_cycle2");
}
_isMagnetChanging = true;
}
function magnetSetSize(newSize) {
if (((newSize <= 4) && (_magnetSize != newSize)) && (_isMagnetActive)) {
_magnetSize = newSize;
_sMagnet.setNewRadius(_magnetSizexw[_magnetSize]);
_sMagnet.updateMinMaxVectors();
switch (_magnetSize) {
case 0 :
_gameData.getSoundModule().StopSound("magnet_rail_loop");
_gameData.getSoundModule().StopSound("magnet_ring_up1");
_gameData.getSoundModule().StopSound("magnet_ring_cycle1");
_gameData.getSoundModule().StopSound("magnet_ring_cycle2");
_gameData.getSoundModule().StopSound("magnet_ring_cycle3");
return(undefined);
case 1 :
_spriteMagnetRadius.startAnimating(1, 8, 32, false);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_ring_cycle1")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_cycle1", 100, 0, 0, 2000);
}
break;
case 2 :
_spriteMagnetRadius.startAnimating(17, 24, 32, false);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_ring_cycle2")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_cycle2", 100, 0, 0, 2000);
}
_gameData.getSoundModule().StopSound("magnet_ring_cycle1");
break;
case 3 :
_spriteMagnetRadius.startAnimating(33, 40, 32, false);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_ring_cycle2")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_ring_cycle2", 100, 0, 0, 2000);
}
_gameData.getSoundModule().StopSound("magnet_ring_cycle2");
break;
case 4 :
_spriteMagnetRadius.startAnimating(49, 56, 32, false);
}
_isMagnetChanging = true;
}
}
function magnetAnimateChange() {
var _local2 = _spriteMagnetRadius.animateSprite();
if (_local2 == 1) {
switch (_magnetSize) {
case 1 :
_spriteMagnetRadius.startAnimating(9, 16, 32, true);
break;
case 2 :
_spriteMagnetRadius.startAnimating(25, 32, 32, true);
break;
case 3 :
_spriteMagnetRadius.startAnimating(41, 48, 32, true);
break;
case 4 :
_spriteMagnetRadius.startAnimating(49, 56, 32, true);
}
_isMagnetChanging = false;
return(1);
}
}
function isMagnetTimeUp() {
_magnetCounter++;
if (_magnetCounter >= _magnetTime) {
_magnetCounter = 0;
return(true);
}
return(false);
}
function handleCollision(px, py, dx, dy, obj, tile) {
var _local3 = obj._curPos;
var _local14 = obj._oldPos;
var _local12 = _local3._vx - _local14._vx;
var _local13 = _local3._vy - _local14._vy;
var _local15 = (_local12 * dx) + (_local13 * dy);
var _local21 = _local15 * dx;
var _local19 = _local15 * dy;
var _local6 = _local12 - _local21;
var _local9 = _local13 - _local19;
var _local16 = typeof(tile);
if (_local16 != "string") {
var _local5 = tile.getOwner().getType();
if (_local5 >= Game.GameData.RAIL_HOR_lr) {
if ((obj == _sMagnet) && (_isStuckToRail)) {
if (((tile != _curRail) && (tile != _preRail)) && ((_nxtRail == undefined) || (tile != _nxtRail))) {
_nxtRail = tile;
}
}
if ((((obj == _sMagnet) && (!_isAttractedToRail)) && (!_isStuckToRail)) && (!_isMagnetLocked)) {
if (_gameContext.getGameData().isPointOnScreen(dx, dy)) {
_isMagnetLocked = true;
initRailAttract(tile, dx, dy, px);
}
}
return(undefined);
}
if ((_local5 == Game.GameData.ENEMY1) || (_local5 == Game.GameData.ENEMY2)) {
if ((tile == tile.getOwner()._shape) && (!_damageTimerActive)) {
var _local17 = (((_local3._vx - tile.getOwner()._hitShape._curPos._vx) < 0) ? -1 : 1);
tile.getOwner().heroIsPresent(_local17);
}
if (tile == tile.getOwner()._hitShape) {
if (_isMagnetActive) {
magnetStop();
return(undefined);
}
if (!_damageTimerActive) {
if (((((!_isPushing) && (_isMoving != 0)) && (!_hasJumped)) && (_isFacing != dx)) && (dy == 0)) {
_isPushing = true;
_local3._vx = _local3._vx + (px + _local6);
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameData.getSoundModule().StopSound("hero_run_loop");
}
startAnimating(ANMIMATIONS.Push.start, ANMIMATIONS.Push.end, 32, ANMIMATIONS.Push.loop);
} else if (_isPushing && (_isFacing != dx)) {
tile.getOwner().setIsPushed(true);
tile.getOwner()._fx = _fx;
_local3._vx = _local3._vx + (px + _local6);
}
}
}
if (((tile == tile.getOwner()._attackShape) && (tile.getOwner()._isAttacking)) && (!_damageTimerActive)) {
if (_isMagnetActive) {
magnetStop();
}
_isPushing = false;
_local3._vx = _local3._vx + (px + _local6);
doHitDamage(tile.getOwner()._curDirection, Game.GameData.ENEMY1_DAMAGE);
return(undefined);
}
} else if (_local5 == Game.GameData.GSPIKE) {
if (getCurrentState() == Game.AIStates.Hero_Die) {
return(undefined);
}
if (((_isMagnetActive && (!_isMagnetLocked)) && (tile.getOwner()._isStuckToMagnet == false)) && (tile.getOwner()._isAttractedToMagnet == false)) {
_isMagnetLocked = true;
_gameContext.getGameData().getSoundModule().PlaySound("magnet_object_magnetized", 100, 0, 0, 0);
tile.getOwner().moveToMagnet();
} else if ((!_isMagnetActive) || (((tile.getOwner()._isStuckToMagnet == false) && (_isMagnetLocked && (tile.getOwner()._isAttractedToMagnet == false))) && (obj == _sBody))) {
if (_damageTimerActive) {
return(undefined);
}
if (_isMagnetActive) {
magnetStop();
}
_local3._vx = _local3._vx + (px + _local6);
doHitDamage(dx, Game.GameData.SPIKE_DAMAGE);
}
} else if (_local5 == Game.GameData.ASPIKE) {
if (!_damageTimerActive) {
if (_isStuckToRail) {
doSpikeRailDamage(Game.GameData.SPIKE_DAMAGE);
} else {
_local3._vx = _local3._vx + (px + _local6);
_local3._vy = _local3._vy + (py + _local9);
if (_isMagnetActive) {
magnetStop();
}
doHitDamage(dx, Game.GameData.SPIKE_DAMAGE);
}
}
} else {
if (_local5 == Game.GameData.CHECKPOINT) {
tile.getOwner().raiseFlag();
_gameData.setCheckpoint(tile.getOwner());
return(undefined);
}
if (_local5 == Game.GameData.EXITDOOR) {
_endLevel = true;
return(undefined);
}
if ((_local5 > Game.GameData.EMPTY) && (_local5 <= Game.GameData.DOOR3)) {
if (tile.getOwner().getIsCloud()) {
if (_isMagnetActive && (tile.getOwner()._isMetal)) {
if (((obj == _sHead) && _isAttractedToPlat) && (!_isStuckToPlat)) {
_isStuckToPlat = true;
magnetStuck(tile);
return(undefined);
}
if ((((obj == _sMagnet) && (!_isAttractedToPlat)) && (!_isStuckToPlat)) && (!_isMagnetLocked)) {
_curPlatAttract = tile;
_isAttractedToPlat = true;
_isMagnetLocked = true;
}
}
var _local20 = obj.getMaxY();
var _local18 = tile.getMinY();
if ((py <= 0) && (_local20 <= (_local18 + 5))) {
_fy = 0;
_local3._vy = _local3._vy + (py + _local9);
getCurrentState()._accelY = 0;
if (!getOnPlatform()) {
setOnPlatform(true);
}
if (tile.getOwner()._isMoving) {
_local3._vx = _local3._vx + (tile.getOwner()._moveSpeed * tile.getOwner()._curDirection);
}
return(undefined);
}
// unexpected jump
}
if (dy == -1) {
if ((((_local5 == Game.GameData.BLOCK_L) || (_local5 == Game.GameData.DOOR1)) || (_local5 == Game.GameData.DOOR2)) || (_local5 == Game.GameData.DOOR3)) {
_fx = 0;
_local3._vx = _local3._vx + (px + _local6);
getCurrentState()._accelX = 0;
return(undefined);
}
if (!getOnPlatform()) {
setOnPlatform(true);
}
_fy = 0;
_local3._vy = _local3._vy + (py + _local9);
getCurrentState()._accelY = 0;
return(undefined);
}
if (dy == 1) {
_fy = 0;
_local3._vy = _local3._vy + (py + _local9);
getCurrentState()._accelY = 0;
return(undefined);
}
if (_local5 == Game.GameData.GROUND) {
return(undefined);
}
if (_isMoving != 0) {
_fx = 0;
_local3._vx = _local3._vx + (px + _local6);
getCurrentState()._accelX = 0;
return(undefined);
}
if (((_local12 < 0) && (px < 0)) || ((_local12 > 0) && (px > 0))) {
if (_isPushing) {
return(undefined);
}
_local3._vx = _local3._vx + (_local12 * -1);
} else {
_local3._vx = _local3._vx + (px + _local6);
}
_fx = 0;
_local3._vx = _local3._vx + (px + _local6);
getCurrentState()._accelX = 0;
return(undefined);
}
if (_local5 == Game.GameData.ITEM_BOX) {
if (_isMagnetActive) {
if (tile.getOwner()._isStuckToMagnet && (!_isMagnetStuck)) {
magnetStuck(tile);
return(undefined);
}
if (((tile.getOwner()._isAttractedToMagnet == false) && (tile.getOwner()._isStuckToMagnet == false)) && (!_isMagnetLocked)) {
_isMagnetLocked = true;
_gameContext.getGameData().getSoundModule().PlaySound("magnet_object_magnetized", 100, 0, 0, 0);
tile.getOwner().moveToMagnet();
return(undefined);
}
if (tile.getOwner()._isAttractedToMagnet == false) {
if ((dy == -1) && (obj == _sBody)) {
_fy = 0;
_local3._vy = _local3._vy + (py + _local9);
if (!getOnPlatform()) {
setOnPlatform(true);
}
return(undefined);
}
if ((dx != 0) && (dy == 0)) {
_local3._vx = _local3._vx + (px + _local6);
return(undefined);
}
}
} else {
if (dy == -1) {
_fy = 0;
_local3._vy = _local3._vy + (py + _local9);
if (!getOnPlatform()) {
setOnPlatform(true);
}
return(undefined);
}
if (((dx != 0) && (dy == 0)) && (_fy >= 0)) {
if (_isMagnetActive) {
return(undefined);
}
if ((((!_isPushing) && (_isMoving != None)) && (_isMoving != Jump)) && (_isFacing != dx)) {
_isPushing = true;
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("object_block_push_loop")) {
_gameContext.getGameData().getSoundModule().PlaySound("object_block_push_loop", 0, 0, 0, 2000);
}
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameData.getSoundModule().StopSound("hero_run_loop");
}
startAnimating(ANMIMATIONS.Push.start, ANMIMATIONS.Push.end, 32, ANMIMATIONS.Push.loop);
_local3._vx = _local3._vx + (px + _local6);
return(undefined);
}
if (_isPushing && (_isFacing != dx)) {
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameData.getSoundModule().StopSound("hero_run_loop");
}
tile.getOwner().setCollisionActive(true);
_local3._vx = _local3._vx + (px + _local6);
tile.getOwner()._fx = _fx;
return(undefined);
}
if (_fx != 0) {
_local3._vx = _local3._vx + (px + _local6);
}
tile.getOwner().setCollisionActive(true);
tile.getOwner()._fx = 5 * (dx * -1);
return(undefined);
}
}
} else if (_local5 == Game.GameData.ITEM_GUN) {
if (tile.getOwner()._isStuckToMagnet && (!_isMagnetStuck)) {
magnetStuck(tile);
return(undefined);
}
if (((_isMagnetActive && (!_isMagnetLocked)) && (tile.getOwner()._isStuckToMagnet == false)) && (tile.getOwner()._isAttractedToMagnet == false)) {
_isMagnetLocked = true;
_gameContext.getGameData().getSoundModule().PlaySound("magnet_object_magnetized", 100, 0, 0, 0);
tile.getOwner().moveToMagnet();
}
} else if (_local5 == Game.GameData.TOKEN_MIN) {
if (_gameMode == Game.GameData.GAME_PLAY) {
if (tile.getOwner().getActive()) {
tile.getOwner().doCollected();
}
}
}
}
} else if (tile == "WorldBottom") {
} else if (tile == "WorldLeft") {
_local3._vx = _local3._vx + (px + _local6);
} else if (tile == "WorldRight") {
_local3._vx = _local3._vx + (px + _local6);
} else {
if (dy == 0) {
_fx = 0;
}
if (dx == 0) {
_fy = 0;
}
if (dy == -1) {
_fy = 0;
}
_local3._vx = _local3._vx + (px + _local6);
_local3._vy = _local3._vy + (py + _local9);
}
}
function doHitDamage(sx, damage) {
if (!_damageTimerActive) {
resetDamageCounter();
setDamageTimerActive(true);
doHitBounce(sx);
playHitSpark(2, sx);
_gameData.adjustHealth(damage);
setNextState(Game.AIStates.Hero_Hit);
}
}
function doSpikeRailDamage(damage) {
if (!_damageTimerActive) {
resetDamageCounter();
setDamageTimerActive(true);
_gameData.adjustHealth(damage);
if (_gameContext.getGameData().getHealth() >= 100) {
magnetStop();
_isMoving = None;
setRotation(0);
setNextState(Game.AIStates.Hero_Die);
return(undefined);
}
}
}
function doKnockDownByItem(p, vel) {
var _local5 = 40;
var _local2 = ((vel < 0) ? -1 : 1);
if (_isFacing == _local2) {
startAnimating(ANMIMATIONS.HitFromBack.start, ANMIMATIONS.HitFromBack.end, 32, ANMIMATIONS.HitFromBack.loop);
} else {
startAnimating(ANMIMATIONS.HitFromFront.start, ANMIMATIONS.HitFromFront.end, 32, ANMIMATIONS.HitFromFront.loop);
}
_gameContext.getGameData().getSoundModule().PlaySound("hero_hit_by_block", 100, 0, 0, 0);
var _local4 = _local5 * _local2;
var _local3 = 0;
_fx = _local4;
_fy = _local3;
playHitSpark(2, _local2);
setNextState(Game.AIStates.Hero_KnockDown);
}
function doSpikeDamage(p, vel) {
var _local5 = 20;
var _local2 = ((vel < 0) ? -1 : 1);
var _local4 = _local5 * _local2;
var _local3 = 0;
_fx = _local4;
_fy = _local3;
if (!_damageTimerActive) {
resetDamageCounter();
setDamageTimerActive(true);
playHitSpark(1, _local2);
_gameData.adjustHealth(Game.GameData.SPIKE_DAMAGE);
setNextState(Game.AIStates.Hero_Hit);
}
}
function doHitBounce(sx) {
var _local2 = 15;
if (getOnPlatform()) {
setOnPlatform(false);
}
var _local4 = _local2 * sx;
var _local3 = -_local2;
_fx = _local4;
_fy = _local3;
return(undefined);
}
function doBoxBounce(p, dx, dy, px, py, tanX, tanY) {
var _local2 = 10;
if (getOnPlatform()) {
setOnPlatform(false);
}
var _local4 = (-_isFacing) * _local2;
var _local3 = -_local2;
p._vx = p._vx + ((px + _local4) + tanX);
p._vy = p._vy + ((py + _local3) + tanY);
_fx = _local2 * (-_isFacing);
_fy = -_local2;
setNextState(Game.AIStates.Hero_Walk);
return(undefined);
}
function doTopBounce(p, dx, dy, px, py, tanX, tanY) {
if (getOnPlatform()) {
setOnPlatform(false);
}
var _local3 = (-_isFacing) * getPhysics()._wallBounce;
var _local2 = -getPhysics()._wallBounce;
p._vx = p._vx + ((px + _local3) + tanX);
p._vy = p._vy + ((py + _local2) + tanY);
_fx = getPhysics()._wallBounce * (-_isFacing);
_fy = 0;
startAnimating(ANMIMATIONS.Idle.start, ANMIMATIONS.Idle.end, 32, ANMIMATIONS.Idle.loop);
setNextState(Game.AIStates.Hero_Walk);
return(undefined);
}
function startAnimating(startFrame, endFrame, frameRate, looping) {
_spriteHero.startAnimating(startFrame, endFrame, frameRate, looping);
}
function isLookingUpOrDown() {
if (((_spriteHero.getCurrentFrame() >= ANMIMATIONS.LookUp.start) && (_spriteHero.getCurrentFrame() <= ANMIMATIONS.LookUp.End)) || ((_spriteHero.getCurrentFrame() >= ANMIMATIONS.LookDown.start) && (_spriteHero.getCurrentFrame() <= ANMIMATIONS.LookDown.End))) {
return(true);
}
return(false);
}
function isRunning() {
if ((_spriteHero.getCurrentFrame() >= ANMIMATIONS.Run.start) && (_spriteHero.getCurrentFrame() <= ANMIMATIONS.Run.End)) {
return(true);
}
return(false);
}
function animateSprite() {
return(_spriteHero.animateSprite());
}
function playHitSpark(hitNum, sx) {
var _local5 = _spriteHero.getPositionX();
var _local4 = _spriteHero.getPositionY() + 20;
var _local2 = ((hitNum < 2) ? (_spriteHitSpark) : (_spriteHitSpark2));
var _local3 = ((hitNum < 3) ? 1 : 15);
switch (_isFacing) {
case Left :
if (_isFacing == sx) {
_local2.playFlipped();
} else {
_local2.playUnflipped();
}
break;
case Right :
if (_isFacing == sx) {
_local2.playUnflipped();
} else {
_local2.playFlipped();
}
}
_local2.setPosition(_local5, _local4);
_local2.setVisibility(true);
_local2.getMovieClip().gotoAndPlay(_local3);
}
function setDamageTimerActive(bToggle) {
_damageTimerActive = bToggle;
}
function getdamageTimerActive() {
return(_damageTimerActive);
}
function isDamageTimeUp() {
_damageCounter++;
if (_damageCounter >= _damageTime) {
_damageCounter = 0;
_damageTimerActive = false;
toggleBrightOff();
return(true);
}
return(false);
}
function resetDamageCounter() {
_damageCounter = 0;
}
function setPlayMode(bToggle) {
_playMode = bToggle;
}
function getPlayMode() {
return(_playMode);
}
function toString(Void) {
return("Hero()");
}
var Left = -1;
var None = 0;
var Right = 1;
var Jump = 2;
var _magnetSizexw = [0, 100, 250, 400, 100];
var _physics = {_acceleration:2, _speed:2, _speedMin:0.2, _speedMax:10, _friction:0.7, _gravity:2.4, _bounce:0.8, _jumpStrength:30, _fallMax:20, _wallBounce:4};
static var ANMIMATIONS = {Idle:{start:0, end:129, loop:true}, Idle2:{start:0, end:30, loop:true}, RailAttract:{start:130, end:130, loop:true}, RailStick:{start:140, end:143, loop:false}, RailPull:{start:150, end:165, loop:false}, RailRideHeadUp:{start:170, end:175, loop:true}, RailRideHeadDwn:{start:180, end:185, loop:true}, RailFlipStart:{start:190, end:194, loop:false}, RailFlipFinish:{start:195, end:196, loop:false}, RailOff:{start:210, end:227, loop:false}, HitSmall:{start:486, end:491, loop:false}, HitFromBack:{start:240, end:259, loop:false}, HitFromFront:{start:266, end:285, loop:false}, MagnetPower1:{start:296, end:296, loop:false}, MagnetPower2:{start:306, end:312, loop:false}, MagnetPower3:{start:326, end:336, loop:false}, JumpUp:{start:346, end:350, loop:false}, JumpAir:{start:350, end:350, loop:true}, JumpAirDown:{start:366, end:366, loop:true}, JumpLand:{start:367, end:367, loop:false}, Run:{start:376, end:387, loop:true}, LookDown:{start:406, end:439, loop:true}, LookUp:{start:446, end:479, loop:false}, Push:{start:506, end:529, loop:true}, Death:{start:532, end:548, loop:false}, RespawnStart:{start:550, end:556, loop:false}, RespawnEnd:{start:557, end:588, loop:false}, HitDie:{start:494, end:499, loop:false}};
}
Symbol 1680 MovieClip [__Packages.Base.ShapeEntity] Frame 0
class Base.ShapeEntity
{
var _gameContext, _owner, _OTYPE, _CTYPE, _showdataBox, _sx, _sy, _signx, _signy, _collision, _render, _tf, _curPos, _oldPos, _rad, _xw, _yw, _minx, _maxx, _miny, _maxy, _fmt, _mouseRollOn, _mouseRollOff, _mouseIsOver;
function ShapeEntity (gameContext, pos, rad, xw, yw, oOwner, oType, renderEngine, showdatabox) {
_gameContext = gameContext;
_owner = oOwner;
_OTYPE = oType;
_CTYPE = oType;
initSize(rad, xw, yw);
initPosition(pos);
_showdataBox = showdatabox;
_sx = 0;
_sy = 0;
_signx = 0;
_signy = 0;
SetShapeFlags();
_collision = new Base.ShapeCollision();
_render = renderEngine;
_tf = "vtf_" + _owner.getID();
}
function getOwner() {
return(_owner);
}
function getCurrentPosition() {
return(_curPos);
}
function getOldPosition() {
return(_oldPos);
}
function initPosition(oPos) {
_curPos = oPos.clone();
_oldPos = oPos.clone();
updateMinMaxVectors();
}
function getCurrentPositionX() {
return(_curPos._vx);
}
function setNewPosition(nXpos, nYpos) {
_curPos._vx = nXpos;
_curPos._vy = nYpos;
updateMinMaxVectors();
}
function initSize(rad, xw, yw) {
_rad = Math.abs(rad);
_xw = Math.abs(xw / 2);
_yw = Math.abs(yw / 2);
}
function setNewSize(sAxis, nVar) {
switch (sAxis) {
case "x" :
_xw = _xw + nVar;
break;
case "y" :
_yw = _yw + nVar;
}
}
function setNewRadius(nRad) {
_rad = Math.abs(nRad);
_xw = Math.abs(nRad * 2);
_yw = Math.abs(nRad * 2);
}
function updateMinMaxVectors() {
if (_OTYPE == TID_CIRCLE) {
_minx = _curPos._vx - _rad;
_maxx = _curPos._vx + _rad;
_miny = _curPos._vy - _rad;
_maxy = _curPos._vy + _rad;
} else {
_minx = _curPos._vx - _xw;
_maxx = _curPos._vx + _xw;
_miny = _curPos._vy - _yw;
_maxy = _curPos._vy + _yw;
}
}
function getMinX() {
return(_minx);
}
function getMinY() {
return(_miny);
}
function getMaxX() {
return(_maxx);
}
function getMaxY() {
return(_maxy);
}
function adjustXScale(nVar) {
_maxx = _maxx + nVar;
_xw = _xw + (nVar / 2);
_curPos._vx = _curPos._vx + (nVar / 2);
}
function adjustYScale(nVar) {
_miny = _miny - nVar;
_yw = _yw + (nVar / 2);
_curPos._vy = _curPos._vy - (nVar / 2);
}
function getXW() {
return(_xw * 2);
}
function getYW() {
return(_yw * 2);
}
function toggleDataBox(sToggle) {
if (_showdataBox) {
switch (sToggle) {
case "on" :
_fmt = new TextFormat();
_fmt.font = "Verdana10";
_fmt.size = 8;
_fmt.color = 0;
this[_tf] = _gameContext.getGameData().getBuffer().createTextField("Vtxt", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _minx + 2.5, _miny + 5, _yw, 12);
this[_tf].border = true;
this[_tf].backgroundColor = 16777215 /* 0xFFFFFF */;
this[_tf].background = true;
this[_tf].autoSize = true;
this[_tf].selectable = false;
this[_tf].antiAliasType = "advanced";
this[_tf].embedFonts = true;
this[_tf].gridFitType = "pixel";
this[_tf].sharpness = -400;
this[_tf].text = (((((_owner.getName() + newline) + "x:") + Math.round(_minx)) + newline) + "y:") + Math.round(_maxy);
this[_tf].setTextFormat(_fmt);
break;
case "off" :
if (this[_tf] == undefined) {
break;
}
this[_tf].removeTextField();
}
}
}
function updateDataBoxPosition(Void) {
if (_showdataBox) {
this[_tf]._x = _minx + 2.5;
this[_tf]._y = _miny + 5;
this[_tf].text = (((((_owner.getName() + newline) + "x:") + Math.floor(_minx)) + newline) + "y:") + Math.floor(_maxy);
this[_tf].setNewTextFormat(_fmt);
}
}
function DrawScaler(sAxis) {
var _local3 = 5;
var _local2 = 2.5;
switch (sAxis) {
case "x" :
_render.StartFill(_maxx - _local3, _curPos._vy, 0, 100);
_render.DrawAABB_S(_maxx - _local3, _maxx, _curPos._vy + _local2, _curPos._vy - _local2);
break;
case "y" :
_render.StartFill(_curPos._vx - _local2, _miny, 0, 100);
_render.DrawAABB_S(_curPos._vx - _local2, _curPos._vx + _local2, _miny, _miny + _local3);
}
_render.EndFill();
}
function Draw() {
_render.SetStyle(0, _owner._lineColor, 100);
_render.StartFill(_curPos._vx, _curPos._vy, _owner._fillColor, 100);
if (_OTYPE == TID_AABB) {
_render.DrawAABB(_curPos, _xw, _yw);
_render.DrawPlus_S(_curPos._vx, _curPos._vy);
} else if (_OTYPE == TID_CIRCLE) {
_render.DrawCircle(_curPos, _rad);
_render.DrawPlus_S(_curPos._vx, _curPos._vy);
} else if (_OTYPE == TID_CONVEXpn) {
_render.DrawConcaveCCWArc_S(_curPos._vx - _rad, _curPos._vy + _rad, _curPos._vx + _rad, _curPos._vy + _rad);
_render.DrawPlus_S(_curPos._vx - _rad, _curPos._vy + _rad);
} else if (_OTYPE == TID_CONVEXnn) {
_render.DrawConcaveCCWArc_S(_curPos._vx + _rad, _curPos._vy + _rad, _curPos._vx + _rad, _curPos._vy - _rad);
_render.DrawPlus_S(_curPos._vx + _rad, _curPos._vy + _rad);
} else if (_OTYPE == TID_CONVEXnp) {
_render.DrawConcaveCCWArc_S(_curPos._vx + _rad, _curPos._vy - _rad, _curPos._vx - _rad, _curPos._vy - _rad);
_render.DrawPlus_S(_curPos._vx + _rad, _curPos._vy - _rad);
} else if (_OTYPE == TID_CONVEXpp) {
_render.DrawConcaveCCWArc_S(_curPos._vx - _rad, _curPos._vy - _rad, _curPos._vx - _rad, _curPos._vy + _rad);
_render.DrawPlus_S(_curPos._vx - _rad, _curPos._vy - _rad);
}
_render.EndFill();
}
function drawBoundingBox() {
_render.SetStyle(0, 0, 100);
_render.StartFill(_curPos._vx, _curPos._vy, 16777215, 0);
if (_OTYPE == TID_AABB) {
_render.DrawAABB(_curPos, _xw, _yw);
_render.DrawPlus_S(_curPos._vx, _curPos._vy);
} else if (_OTYPE == TID_CIRCLE) {
_render.DrawCircle(_curPos, _rad);
_render.DrawPlus_S(_curPos._vx, _curPos._vy);
}
_render.EndFill();
}
function isMouseRollOn() {
return(_mouseRollOn);
}
function isMouseRollOff() {
return(_mouseRollOff);
}
function isMouseOver() {
var _local2 = false;
if (_mouseIsOver) {
_mouseRollOn = false;
_local2 = true;
} else {
_mouseRollOn = true;
}
_mouseRollOff = false;
_mouseIsOver = false;
if ((((_gameContext.getGameData().getBufferMouseX() < _minx) || (_gameContext.getGameData().getBufferMouseX() > _maxx)) || (_gameContext.getGameData().getBufferMouseY() < _miny)) || (_gameContext.getGameData().getBufferMouseY() > _maxy)) {
if (_local2) {
_mouseRollOff = true;
}
return(false);
}
_mouseIsOver = true;
return(true);
}
function isMouseOverXscaler() {
var _local3 = 5;
var _local2 = 2.5;
if ((((_gameContext.getGameData().getBufferMouseX() < (_maxx - _local3)) || (_gameContext.getGameData().getBufferMouseX() > _maxx)) || (_gameContext.getGameData().getBufferMouseY() > (_curPos._vy + _local2))) || (_gameContext.getGameData().getBufferMouseY() < (_curPos._vy - _local2))) {
return(false);
}
return(true);
}
function isMouseOverYscaler() {
var _local3 = 5;
var _local2 = 2.5;
if ((((_gameContext.getGameData().getBufferMouseX() < (_curPos._vx - _local2)) || (_gameContext.getGameData().getBufferMouseX() > (_curPos._vx + _local2))) || (_gameContext.getGameData().getBufferMouseY() > (_miny + _local3))) || (_gameContext.getGameData().getBufferMouseY() < _miny)) {
return(false);
}
return(true);
}
function CollideVsWorldBounds() {
if (_OTYPE == TID_AABB) {
_collision.CollideAABBVsWorldBounds(this);
} else if (_OTYPE == TID_CIRCLE) {
_collision.CollideCircleVsWorldBounds(this);
}
}
function CollideVsTile(oTile) {
if (_OTYPE == TID_AABB) {
_collision.CollideAABBVsTile(this, oTile);
} else if (_OTYPE == TID_CIRCLE) {
_collision.CollideCircleVsTile(this, oTile);
}
}
function CollideVsLine(oLine) {
_collision.CollideCircleVsLine(this, oLine);
}
function SetShapeFlags() {
if (-1 < _OTYPE) {
if (_OTYPE < CTYPE_CIRCLE) {
_CTYPE = CTYPE_AABB;
_signx = 0;
_signy = 0;
_sx = 0;
_sy = 0;
} else if (_OTYPE < CTYPE_45DEG) {
_CTYPE = CTYPE_CIRCLE;
_signx = 0;
_signy = 0;
_sx = 0;
_sy = 0;
} else if (_OTYPE < CTYPE_CONCAVE) {
_CTYPE = CTYPE_45DEG;
if (_OTYPE == TID_45DEGpn) {
_signx = 1;
_signy = -1;
_sx = _signx / Math.SQRT2;
_sy = _signy / Math.SQRT2;
} else if (_OTYPE == TID_45DEGnn) {
_signx = -1;
_signy = -1;
_sx = _signx / Math.SQRT2;
_sy = _signy / Math.SQRT2;
} else if (_OTYPE == TID_45DEGnp) {
_signx = -1;
_signy = 1;
_sx = _signx / Math.SQRT2;
_sy = _signy / Math.SQRT2;
} else if (_OTYPE == TID_45DEGpp) {
_signx = 1;
_signy = 1;
_sx = _signx / Math.SQRT2;
_sy = _signy / Math.SQRT2;
} else {
return(false);
}
} else if (_OTYPE < CTYPE_CONVEX) {
_CTYPE = CTYPE_CONCAVE;
if (_OTYPE == TID_CONCAVEpn) {
_signx = 1;
_signy = -1;
_sx = 0;
_sy = 0;
} else if (_OTYPE == TID_CONCAVEnn) {
_signx = -1;
_signy = -1;
_sx = 0;
_sy = 0;
} else if (_OTYPE == TID_CONCAVEnp) {
_signx = -1;
_signy = 1;
_sx = 0;
_sy = 0;
} else if (_OTYPE == TID_CONCAVEpp) {
_signx = 1;
_signy = 1;
_sx = 0;
_sy = 0;
} else {
return(false);
}
} else if (_OTYPE < CTYPE_22DEGs) {
_CTYPE = CTYPE_CONVEX;
if (_OTYPE == TID_CONVEXpn) {
_signx = 1;
_signy = -1;
_sx = 0;
_sy = 0;
} else if (_OTYPE == TID_CONVEXnn) {
_signx = -1;
_signy = -1;
_sx = 0;
_sy = 0;
} else if (_OTYPE == TID_CONVEXnp) {
_signx = -1;
_signy = 1;
_sx = 0;
_sy = 0;
} else if (_OTYPE == TID_CONVEXpp) {
_signx = 1;
_signy = 1;
_sx = 0;
_sy = 0;
} else {
return(false);
}
} else if (_OTYPE < CTYPE_22DEGb) {
_CTYPE = CTYPE_22DEGs;
if (_OTYPE == TID_22DEGpnS) {
_signx = 1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else if (_OTYPE == TID_22DEGnnS) {
_signx = -1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else if (_OTYPE == TID_22DEGnpS) {
_signx = -1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else if (_OTYPE == TID_22DEGppS) {
_signx = 1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else {
return(false);
}
} else if (_OTYPE < CTYPE_67DEGs) {
_CTYPE = CTYPE_22DEGb;
if (_OTYPE == TID_22DEGpnB) {
_signx = 1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else if (_OTYPE == TID_22DEGnnB) {
_signx = -1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else if (_OTYPE == TID_22DEGnpB) {
_signx = -1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else if (_OTYPE == TID_22DEGppB) {
_signx = 1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 1) / _local2;
_sy = (_signy * 2) / _local2;
} else {
return(false);
}
} else if (_OTYPE < CTYPE_67DEGb) {
_CTYPE = CTYPE_67DEGs;
if (_OTYPE == TID_67DEGpnS) {
_signx = 1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else if (_OTYPE == TID_67DEGnnS) {
_signx = -1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else if (_OTYPE == TID_67DEGnpS) {
_signx = -1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else if (_OTYPE == TID_67DEGppS) {
_signx = 1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else {
return(false);
}
} else {
_CTYPE = CTYPE_67DEGb;
if (_OTYPE == TID_67DEGpnB) {
_signx = 1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else if (_OTYPE == TID_67DEGnnB) {
_signx = -1;
_signy = -1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else if (_OTYPE == TID_67DEGnpB) {
_signx = -1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else if (_OTYPE == TID_67DEGppB) {
_signx = 1;
_signy = 1;
var _local2 = 2.23606797749979;
_sx = (_signx * 2) / _local2;
_sy = (_signy * 1) / _local2;
} else {
return(false);
}
}
} else {
_signx = 0;
_signy = 0;
_sx = 0;
_sy = 0;
return(false);
}
}
function toString() {
if (_OTYPE == TID_AABB) {
return(("AABB(" + _owner.getID()) + ")");
}
if (_OTYPE == TID_CIRCLE) {
return(("CIRCLE(" + _owner.getID()) + ")");
}
}
function Circlefoo() {
var _local3 = 100;
var _local2 = 280;
var _local5 = 10;
var _local6 = 10;
var _local4 = TID_CONVEXpn;
var _local1 = false;
_local3 = 80;
_local2 = 280;
_local5 = 10;
_local6 = 10;
_local4 = TID_CONVEXnn;
_local1 = false;
_local3 = 80;
_local2 = 300;
_local5 = 10;
_local6 = 10;
_local4 = TID_CONVEXnp;
_local1 = false;
_local3 = 100;
_local2 = 300;
_local5 = 10;
_local6 = 10;
_local4 = TID_CONVEXpp;
_local1 = false;
}
static var CTYPE_AABB = 0;
static var CTYPE_CIRCLE = 1;
static var CTYPE_45DEG = 2;
static var CTYPE_CONCAVE = 6;
static var CTYPE_CONVEX = 10;
static var CTYPE_22DEGs = 14;
static var CTYPE_22DEGb = 18;
static var CTYPE_67DEGs = 22;
static var CTYPE_67DEGb = 26;
static var TID_AABB = 0;
static var TID_CIRCLE = 1;
static var TID_45DEGpn = 2;
static var TID_45DEGnn = 3;
static var TID_45DEGnp = 4;
static var TID_45DEGpp = 5;
static var TID_CONCAVEpn = 6;
static var TID_CONCAVEnn = 7;
static var TID_CONCAVEnp = 8;
static var TID_CONCAVEpp = 9;
static var TID_CONVEXpn = 10;
static var TID_CONVEXnn = 11;
static var TID_CONVEXnp = 12;
static var TID_CONVEXpp = 13;
static var TID_22DEGpnS = 14;
static var TID_22DEGnnS = 15;
static var TID_22DEGnpS = 16;
static var TID_22DEGppS = 17;
static var TID_22DEGpnB = 18;
static var TID_22DEGnnB = 19;
static var TID_22DEGnpB = 20;
static var TID_22DEGppB = 21;
static var TID_67DEGpnS = 22;
static var TID_67DEGnnS = 23;
static var TID_67DEGnpS = 24;
static var TID_67DEGppS = 25;
static var TID_67DEGpnB = 26;
static var TID_67DEGnnB = 27;
static var TID_67DEGnpB = 28;
static var TID_67DEGppB = 29;
}
Symbol 1681 MovieClip [__Packages.Base.ShapeCollision] Frame 0
class Base.ShapeCollision
{
var Proj_AABBTile, Proj_CircleTile, XMIN, XMAX, YMIN, YMAX;
function ShapeCollision () {
Proj_AABBTile = new Object();
Proj_AABBTile[Base.ShapeEntity.CTYPE_AABB] = mx.utils.Delegate.create(this, ProjAABB_AABB);
Proj_AABBTile[Base.ShapeEntity.CTYPE_CIRCLE] = mx.utils.Delegate.create(this, ProjAABB_CIRCLE);
Proj_AABBTile[Base.ShapeEntity.CTYPE_45DEG] = mx.utils.Delegate.create(this, ProjAABB_45Deg);
Proj_AABBTile[Base.ShapeEntity.CTYPE_CONCAVE] = mx.utils.Delegate.create(this, ProjAABB_Concave);
Proj_AABBTile[Base.ShapeEntity.CTYPE_CONVEX] = mx.utils.Delegate.create(this, ProjAABB_Convex);
Proj_AABBTile[Base.ShapeEntity.CTYPE_22DEGs] = mx.utils.Delegate.create(this, ProjAABB_22DegS);
Proj_AABBTile[Base.ShapeEntity.CTYPE_22DEGb] = mx.utils.Delegate.create(this, ProjAABB_22DegB);
Proj_AABBTile[Base.ShapeEntity.CTYPE_67DEGs] = mx.utils.Delegate.create(this, ProjAABB_67DegS);
Proj_AABBTile[Base.ShapeEntity.CTYPE_67DEGb] = mx.utils.Delegate.create(this, ProjAABB_67DegB);
Proj_CircleTile = new Object();
Proj_CircleTile[Base.ShapeEntity.CTYPE_AABB] = mx.utils.Delegate.create(this, ProjCircle_AABB);
Proj_CircleTile[Base.ShapeEntity.CTYPE_CIRCLE] = mx.utils.Delegate.create(this, ProjCircle_Circle);
Proj_CircleTile[Base.ShapeEntity.CTYPE_45DEG] = mx.utils.Delegate.create(this, ProjCircle_45Deg);
Proj_CircleTile[Base.ShapeEntity.CTYPE_CONCAVE] = mx.utils.Delegate.create(this, ProjCircle_Concave);
Proj_CircleTile[Base.ShapeEntity.CTYPE_CONVEX] = mx.utils.Delegate.create(this, ProjCircle_Convex);
Proj_CircleTile[Base.ShapeEntity.CTYPE_22DEGs] = mx.utils.Delegate.create(this, ProjCircle_22DegS);
Proj_CircleTile[Base.ShapeEntity.CTYPE_22DEGb] = mx.utils.Delegate.create(this, ProjCircle_22DegB);
Proj_CircleTile[Base.ShapeEntity.CTYPE_67DEGs] = mx.utils.Delegate.create(this, ProjCircle_67DegS);
Proj_CircleTile[Base.ShapeEntity.CTYPE_67DEGb] = mx.utils.Delegate.create(this, ProjCircle_67DegB);
XMIN = Game.GameData.XMIN;
XMAX = Game.GameData.XMAX;
YMIN = Game.GameData.YMIN;
YMAX = Game.GameData.YMAX;
}
function CollideAABBVsTile(obj, oTile) {
var _local4 = oTile;
var _local15 = obj._curPos._vx;
var _local13 = obj._curPos._vy;
var _local9 = obj._xw;
var _local8 = obj._yw;
var _local11 = _local4._curPos._vx;
var _local10 = _local4._curPos._vy;
var _local14 = _local4._xw;
var _local12 = _local4._yw;
var _local7 = _local15 - _local11;
var _local3 = (_local14 + _local9) - Math.abs(_local7);
if (0 < _local3) {
var _local6 = _local13 - _local10;
var _local2 = (_local12 + _local8) - Math.abs(_local6);
if (0 < _local2) {
if (_local3 < _local2) {
if (_local7 < 0) {
_local3 = _local3 * -1;
_local2 = 0;
} else {
_local2 = 0;
}
} else if (_local6 < 0) {
_local3 = 0;
_local2 = _local2 * -1;
} else {
_local3 = 0;
}
var _local16 = ResolveAABBvsTile(_local3, _local2, obj, _local4);
}
}
}
function ResolveAABBvsTile(x, y, obj, tile) {
if (-1 < tile._OTYPE) {
return(Proj_AABBTile[tile._CTYPE](x, y, obj, tile));
}
return(false);
}
function CollideCircleVsTile(obj, oTile) {
var _local2 = oTile;
var _local16 = obj._curPos._vx;
var _local15 = obj._curPos._vy;
var _local18 = obj._xw;
var _local17 = obj._yw;
var _local10 = obj._rad;
var _local14 = _local2._curPos._vx;
var _local13 = _local2._curPos._vy;
var _local7 = _local2._xw;
var _local6 = _local2._yw;
var _local5 = _local16 - _local14;
var _local12 = (_local7 + _local10) - Math.abs(_local5);
if (0 < _local12) {
var _local4 = _local15 - _local13;
var _local11 = (_local6 + _local10) - Math.abs(_local4);
if (0 < _local11) {
var _local8 = 0;
var _local9 = 0;
if (_local5 < (-_local7)) {
_local8 = -1;
} else if (_local7 < _local5) {
_local8 = 1;
}
if (_local4 < (-_local6)) {
_local9 = -1;
} else if (_local6 < _local4) {
_local9 = 1;
}
var _local19 = ResolveCircleTile(_local12, _local11, _local8, _local9, _local2, obj);
}
}
}
function ResolveCircleTile(x, y, oH, oV, tile, obj) {
if (-1 < tile._OTYPE) {
return(Proj_CircleTile[tile._CTYPE](x, y, oH, oV, obj, tile));
}
return(false);
}
function CollideCircleVsLine(obj, oLine) {
var _local13 = Math.round(obj._curPos._vx);
var _local12 = Math.round(obj._curPos._vy);
var _local11 = obj._rad;
var _local10 = oLine.getCollisionPoints();
var _local3 = [];
var _local17 = _local10.length;
var _local4 = 0;
while (_local4 < _local17) {
var _local22 = _local10[_local4].x;
var _local21 = _local10[_local4].y;
var _local6 = Math.round(Math.abs(_local13 - _local22));
var _local5 = Math.round(Math.abs(_local12 - _local21));
var _local7 = Math.atan2(_local6, _local5);
var _local9 = Math.round(Math.abs(_local11 * Math.sin(_local7)));
var _local8 = Math.round(Math.abs(_local11 * Math.cos(_local7)));
if ((_local6 <= _local9) && (_local5 <= _local8)) {
_local3.push({t:_local4, x:_local22, y:_local21});
}
_local4++;
}
if (_local3.length > 0) {
var _local2 = 0;
while (_local2 < _local3.length) {
var _local22 = Math.round(_local13 - _local3[_local2].x);
var _local21 = Math.round(_local12 - _local3[_local2].y);
_local3[_local2].pd = (_local22 * _local22) + (_local21 * _local21);
_local3[_local2].t = _local3[_local2].t;
_local2++;
}
_local3.sortOn("pd");
var _local20 = _local3[0].x;
var _local19 = _local3[0].y;
var _local22 = _local3[0].t;
var _local21 = _local3[0].pd;
ReportCollisionVsWorld(_local22, _local21, _local20, _local19, obj, oLine);
}
}
function CollideAABBVsWorldBounds(obj) {
var _local5 = obj._curPos;
var _local6 = obj._xw;
var _local7 = obj._yw;
var _local3 = XMIN - (_local5._vx - _local6);
if (0 < _local3) {
ReportCollisionVsWorld(_local3, 0, 1, 0, obj, "WorldLeft");
} else {
_local3 = (_local5._vx + _local6) - XMAX;
if (0 < _local3) {
ReportCollisionVsWorld(-_local3, 0, -1, 0, obj, "WorldRight");
}
}
var _local2 = YMIN - (_local5._vy - _local7);
if (0 < _local2) {
ReportCollisionVsWorld(0, _local2, 0, 1, obj, "WorldTop");
} else {
_local2 = (_local5._vy + _local7) - YMAX;
if (0 < _local2) {
ReportCollisionVsWorld(0, -_local2, 0, -1, obj, "WorldBottom");
}
}
}
function CollideCircleVsWorldBounds(obj) {
var _local5 = obj._curPos;
var _local4 = obj._rad;
var _local3 = XMIN - (_local5._vx - _local4);
if (0 < _local3) {
ReportCollisionVsWorld(_local3, 0, 1, 0, obj, "WorldLeft");
} else {
_local3 = (_local5._vx + _local4) - XMAX;
if (0 < _local3) {
ReportCollisionVsWorld(-_local3, 0, -1, 0, obj, "WorldRight");
}
}
var _local2 = YMIN - (_local5._vy - _local4);
if (0 < _local2) {
ReportCollisionVsWorld(0, _local2, 0, 1, obj, "WorldTop");
} else {
_local2 = (_local5._vy + _local4) - YMAX;
if (0 < _local2) {
ReportCollisionVsWorld(0, -_local2, 0, -1, obj, "WorldBottom");
}
}
}
function ReportCollisionVsWorld(px, py, dx, dy, obj, tile) {
obj.getOwner().handleCollision(px, py, dx, dy, obj, tile);
}
function ProjAABB_AABB(x, y, obj, tile) {
var _local2 = Math.sqrt((x * x) + (y * y));
ReportCollisionVsWorld(x, y, x / _local2, y / _local2, obj, tile);
return(COL_AXIS);
}
function ProjAABB_CIRCLE(x, y, obj, tile) {
var _local2 = Math.sqrt((x * x) + (y * y));
ReportCollisionVsWorld(x, y, x / _local2, y / _local2, obj, tile);
return(COL_AXIS);
}
function ProjAABB_Concave(x, y, obj, tile) {
var _local13 = tile._signx;
var _local12 = tile._signy;
var _local4 = (tile._curPos._vx + (_local13 * tile._xw)) - (obj._curPos._vx - (_local13 * obj._xw));
var _local3 = (tile._curPos._vy + (_local12 * tile._yw)) - (obj._curPos._vy - (_local12 * obj._yw));
var _local9 = tile._xw * 2;
var _local14 = Math.sqrt((_local9 * _local9) + 0);
var _local7 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local5 = _local7 - _local14;
if (0 < _local5) {
var _local8 = Math.sqrt((x * x) + (y * y));
if (_local8 < _local5) {
ReportCollisionVsWorld(x, y, x / _local8, y / _local8, obj, tile);
return(COL_AXIS);
}
_local4 = _local4 / _local7;
_local3 = _local3 / _local7;
ReportCollisionVsWorld(_local4 * _local5, _local3 * _local5, _local4, _local3, obj, tile);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_Convex(x, y, obj, tile) {
var _local9 = tile._signx;
var _local8 = tile._signy;
var _local4 = (obj._curPos._vx - (_local9 * obj._xw)) - (tile._curPos._vx - (_local9 * tile._xw));
var _local3 = (obj._curPos._vy - (_local8 * obj._yw)) - (tile._curPos._vy - (_local8 * tile._yw));
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local10 = tile._xw * 2;
var _local14 = Math.sqrt((_local10 * _local10) + 0);
var _local7 = _local14 - _local6;
if (((_local9 * _local4) < 0) || ((_local8 * _local3) < 0)) {
var _local11 = Math.sqrt((x * x) + (y * y));
ReportCollisionVsWorld(x, y, x / _local11, y / _local11, obj, tile);
return(COL_AXIS);
}
if (0 < _local7) {
_local4 = _local4 / _local6;
_local3 = _local3 / _local6;
ReportCollisionVsWorld(_local4 * _local7, _local3 * _local7, _local4, _local3, obj, tile);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_45Deg(x, y, obj, tile) {
var _local14 = tile._signx;
var _local13 = tile._signy;
var _local11 = (obj._curPos._vx - (_local14 * obj.xw)) - tile._curPos._vx;
var _local10 = (obj._curPos._vy - (_local13 * obj.yw)) - tile._curPos._vy;
var _local4 = tile._sx;
var _local3 = tile._sy;
var _local7 = (_local11 * _local4) + (_local10 * _local3);
if (_local7 < 0) {
_local4 = _local4 * (-_local7);
_local3 = _local3 * (-_local7);
var _local12 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6 = Math.sqrt((x * x) + (y * y));
if (_local6 < _local12) {
ReportCollisionVsWorld(x, y, x / _local6, y / _local6, obj, tile);
return(COL_AXIS);
}
ReportCollisionVsWorld(_local4, _local3, tile._sx, tile._sy, obj, tile);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_22DegS(x, y, obj, tile) {
var _local14 = tile._signx;
var _local9 = tile._signy;
var _local15 = obj._curPos._vy - (_local9 * obj.yw);
var _local4 = tile._curPos._vy - _local15;
if (0 < (_local4 * _local9)) {
var _local17 = (obj._curPos._vx - (_local14 * obj.xw)) - (tile._curPos._vx + (_local14 * tile._xw));
var _local16 = (obj._curPos._vy - (_local9 * obj.yw)) - (tile._curPos._vy - (_local9 * tile._yw));
var _local6 = tile._sx;
var _local5 = tile._sy;
var _local10 = (_local17 * _local6) + (_local16 * _local5);
if (_local10 < 0) {
_local6 = _local6 * (-_local10);
_local5 = _local5 * (-_local10);
var _local11 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local8 = Math.sqrt((x * x) + (y * y));
var _local7 = Math.abs(_local4);
if (_local8 < _local11) {
if (_local7 < _local8) {
ReportCollisionVsWorld(0, _local4, 0, _local4 / _local7, obj, tile);
return(COL_OTHER);
}
ReportCollisionVsWorld(x, y, x / _local8, y / _local8, obj, tile);
return(COL_AXIS);
}
if (_local7 < _local11) {
ReportCollisionVsWorld(0, _local4, 0, _local4 / _local7, obj, tile);
return(COL_OTHER);
}
ReportCollisionVsWorld(_local6, _local5, tile._sx, tile._sy, obj, tile);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjAABB_22DegB(x, y, obj, tile) {
var _local11 = tile._signx;
var _local10 = tile._signy;
var _local13 = (obj._curPos._vx - (_local11 * obj.xw)) - (tile._curPos._vx - (_local11 * tile._xw));
var _local12 = (obj._curPos._vy - (_local10 * obj.yw)) - (tile._curPos._vy + (_local10 * tile._yw));
var _local4 = tile._sx;
var _local3 = tile._sy;
var _local7 = (_local13 * _local4) + (_local12 * _local3);
if (_local7 < 0) {
_local4 = _local4 * (-_local7);
_local3 = _local3 * (-_local7);
var _local14 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6 = Math.sqrt((x * x) + (y * y));
if (_local6 < _local14) {
ReportCollisionVsWorld(x, y, x / _local6, y / _local6, obj, tile);
return(COL_AXIS);
}
ReportCollisionVsWorld(_local4, _local3, tile._sx, tile._sy, obj, tile);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_67DegS(x, y, obj, tile) {
var _local9 = tile._signx;
var _local14 = tile._signy;
var _local15 = obj._curPos._vx - (_local9 * obj.xw);
var _local4 = tile._curPos._vx - _local15;
if (0 < (_local4 * _local9)) {
var _local17 = (obj._curPos._vx - (_local9 * obj.xw)) - (tile._curPos._vx - (_local9 * tile._xw));
var _local16 = (obj._curPos._vy - (_local14 * obj.yw)) - (tile._curPos._vy + (_local14 * tile._yw));
var _local6 = tile._sx;
var _local5 = tile._sy;
var _local10 = (_local17 * _local6) + (_local16 * _local5);
if (_local10 < 0) {
_local6 = _local6 * (-_local10);
_local5 = _local5 * (-_local10);
var _local11 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local8 = Math.sqrt((x * x) + (y * y));
var _local7 = Math.abs(_local4);
if (_local8 < _local11) {
if (_local7 < _local8) {
obj.ReportCollisionVsWorld(_local4, 0, _local4 / _local7, 0, obj, tile);
return(COL_OTHER);
}
obj.ReportCollisionVsWorld(x, y, x / _local8, y / _local8, obj, tile);
return(COL_AXIS);
}
if (_local7 < _local11) {
ReportCollisionVsWorld(_local4, 0, _local4 / _local7, 0, obj, tile);
return(COL_OTHER);
}
ReportCollisionVsWorld(_local6, _local5, tile._sx, tile._sy, obj, tile);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjAABB_67DegB(x, y, obj, tile) {
var _local11 = tile._signx;
var _local10 = tile._signy;
var _local13 = (obj._curPos._vx - (_local11 * obj.xw)) - (tile._curPos._vx + (_local11 * tile._xw));
var _local12 = (obj._curPos._vy - (_local10 * obj.yw)) - (tile._curPos._vy - (_local10 * tile._yw));
var _local4 = tile._sx;
var _local3 = tile._sy;
var _local7 = (_local13 * _local4) + (_local12 * _local3);
if (_local7 < 0) {
_local4 = _local4 * (-_local7);
_local3 = _local3 * (-_local7);
var _local14 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6 = Math.sqrt((x * x) + (y * y));
if (_local6 < _local14) {
ReportCollisionVsWorld(x, y, x / _local6, y / _local6, obj, tile);
return(COL_AXIS);
}
ReportCollisionVsWorld(_local4, _local3, tile._sx, tile._sy, obj, tile);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjCircle_AABB(x, y, oH, oV, obj, tile) {
if (oH == 0) {
if (oV == 0) {
if (x < y) {
var _local5 = obj._curPos._vx - tile._curPos._vx;
if (_local5 < 0) {
ReportCollisionVsWorld(-x, 0, -1, 0, obj, tile);
return(COL_AXIS);
}
ReportCollisionVsWorld(x, 0, 1, 0, obj, tile);
return(COL_AXIS);
}
var _local4 = obj._curPos._vy - tile._curPos._vy;
if (_local4 < 0) {
ReportCollisionVsWorld(0, -y, 0, -1, obj, tile);
return(COL_AXIS);
}
ReportCollisionVsWorld(0, y, 0, 1, obj, tile);
return(COL_AXIS);
}
ReportCollisionVsWorld(0, y * oV, 0, oV, obj, tile);
return(COL_AXIS);
}
if (oV == 0) {
var _local14 = x * oH;
ReportCollisionVsWorld(_local14, 0, oH, 0, obj, tile);
} else {
var _local13 = tile._curPos._vx + (oH * tile._xw);
var _local12 = tile._curPos._vy + (oV * tile._yw);
var _local5 = obj._curPos._vx - _local13;
var _local4 = obj._curPos._vy - _local12;
var _local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
var _local8 = obj._rad - _local6;
if (0 < _local8) {
if (_local6 == 0) {
_local5 = oH / Math.SQRT2;
_local4 = oV / Math.SQRT2;
} else {
_local5 = _local5 / _local6;
_local4 = _local4 / _local6;
}
ReportCollisionVsWorld(_local5 * _local8, _local4 * _local8, _local5, _local4, obj, tile);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_Circle(x, y, oH, oV, obj, tile) {
ReportCollisionVsWorld(x, y, oH, oV, obj, tile);
}
function ProjCircle_45Deg(x, y, oH, oV, obj, tile) {
var _local13 = tile._signx;
var _local12 = tile._signy;
if (oH == 0) {
if (oV == 0) {
var _local16 = tile._sx;
var _local15 = tile._sy;
var _local4 = (obj._curPos._vx - (_local16 * obj._rad)) - tile._curPos._vx;
var _local3 = (obj._curPos._vy - (_local15 * obj._rad)) - tile._curPos._vy;
var _local21 = (_local4 * _local16) + (_local3 * _local15);
if (_local21 < 0) {
_local16 = _local16 * (-_local21);
_local15 = _local15 * (-_local21);
var _local9;
if (x < y) {
_local9 = x;
y = 0;
if ((obj._curPos._vx - tile._curPos._vx) < 0) {
x = x * -1;
}
} else {
_local9 = y;
x = 0;
if ((obj._curPos._vy - tile._curPos._vy) < 0) {
y = y * -1;
}
}
var _local22 = Math.sqrt((_local16 * _local16) + (_local15 * _local15));
if (_local9 < _local22) {
obj.ReportCollisionVsWorld(x, y, x / _local9, y / _local9);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local16, _local15, tile._sx, tile._sy);
return(COL_OTHER);
}
} else {
if ((_local12 * oV) < 0) {
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
var _local16 = tile._sx;
var _local15 = tile._sy;
var _local4 = obj._curPos._vx - (tile._curPos._vx - (_local13 * tile._xw));
var _local3 = obj._curPos._vy - (tile._curPos._vy + (oV * tile._yw));
var _local18 = (_local4 * (-_local15)) + (_local3 * _local16);
if (0 < ((_local18 * _local13) * _local12)) {
var _local14 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local17 = obj._rad - _local14;
if (0 < _local17) {
_local4 = _local4 / _local14;
_local3 = _local3 / _local14;
obj.ReportCollisionVsWorld(_local4 * _local17, _local3 * _local17, _local4, _local3);
return(COL_OTHER);
}
} else {
var _local21 = (_local4 * _local16) + (_local3 * _local15);
var _local17 = obj._rad - Math.abs(_local21);
if (0 < _local17) {
obj.ReportCollisionVsWorld(_local16 * _local17, _local15 * _local17, _local16, _local15);
return(COL_OTHER);
}
}
}
} else if (oV == 0) {
if ((_local13 * oH) < 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local16 = tile._sx;
var _local15 = tile._sy;
var _local4 = obj._curPos._vx - (tile._curPos._vx + (oH * tile._xw));
var _local3 = obj._curPos._vy - (tile._curPos._vy - (_local12 * tile._yw));
var _local18 = (_local4 * (-_local15)) + (_local3 * _local16);
if (((_local18 * _local13) * _local12) < 0) {
var _local14 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local17 = obj._rad - _local14;
if (0 < _local17) {
_local4 = _local4 / _local14;
_local3 = _local3 / _local14;
obj.ReportCollisionVsWorld(_local4 * _local17, _local3 * _local17, _local4, _local3);
return(COL_OTHER);
}
} else {
var _local21 = (_local4 * _local16) + (_local3 * _local15);
var _local17 = obj._rad - Math.abs(_local21);
if (0 < _local17) {
obj.ReportCollisionVsWorld(_local16 * _local17, _local15 * _local17, _local16, _local15);
return(COL_OTHER);
}
}
} else {
if (0 < ((_local13 * oH) + (_local12 * oV))) {
return(COL_NONE);
}
var _local20 = tile._curPos._vx + (oH * tile._xw);
var _local19 = tile._curPos._vy + (oV * tile._yw);
var _local7 = obj._curPos._vx - _local20;
var _local6 = obj._curPos._vy - _local19;
var _local14 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
var _local17 = obj._rad - _local14;
if (0 < _local17) {
if (_local14 == 0) {
_local7 = oH / Math.SQRT2;
_local6 = oV / Math.SQRT2;
} else {
_local7 = _local7 / _local14;
_local6 = _local6 / _local14;
}
obj.ReportCollisionVsWorld(_local7 * _local17, _local6 * _local17, _local7, _local6);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_Concave(x, y, oH, oV, obj, tile) {
var _local14 = tile._signx;
var _local13 = tile._signy;
if (oH == 0) {
if (oV == 0) {
var _local8 = (tile._curPos._vx + (_local14 * tile._xw)) - obj._curPos._vx;
var _local7 = (tile._curPos._vy + (_local13 * tile._yw)) - obj._curPos._vy;
var _local16 = tile._xw * 2;
var _local19 = Math.sqrt((_local16 * _local16) + 0);
var _local11 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
var _local15 = (_local11 + obj._rad) - _local19;
var _local12;
if (0 < _local15) {
if (x < y) {
_local12 = x;
y = 0;
if ((obj._curPos._vx - tile._curPos._vx) < 0) {
x = x * -1;
}
} else {
_local12 = y;
x = 0;
if ((obj._curPos._vy - tile._curPos._vy) < 0) {
y = y * -1;
}
}
if (_local12 < _local15) {
obj.ReportCollisionVsWorld(x, y, x / _local12, y / _local12);
return(COL_AXIS);
}
_local8 = _local8 / _local11;
_local7 = _local7 / _local11;
obj.ReportCollisionVsWorld(_local8 * _local15, _local7 * _local15, _local8, _local7);
return(COL_OTHER);
}
return(COL_NONE);
}
if ((_local13 * oV) < 0) {
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
var _local18 = tile._curPos._vx - (_local14 * tile._xw);
var _local17 = tile._curPos._vy + (oV * tile._yw);
var _local6 = obj._curPos._vx - _local18;
var _local5 = obj._curPos._vy - _local17;
var _local11 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
if (_local11 == 0) {
_local6 = 0;
_local5 = oV;
} else {
_local6 = _local6 / _local11;
_local5 = _local5 / _local11;
}
obj.ReportCollisionVsWorld(_local6 * _local15, _local5 * _local15, _local6, _local5);
return(COL_OTHER);
}
} else if (oV == 0) {
if ((_local14 * oH) < 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local18 = tile._curPos._vx + (oH * tile._xw);
var _local17 = tile._curPos._vy - (_local13 * tile._yw);
var _local6 = obj._curPos._vx - _local18;
var _local5 = obj._curPos._vy - _local17;
var _local11 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
if (_local11 == 0) {
_local6 = oH;
_local5 = 0;
} else {
_local6 = _local6 / _local11;
_local5 = _local5 / _local11;
}
obj.ReportCollisionVsWorld(_local6 * _local15, _local5 * _local15, _local6, _local5);
return(COL_OTHER);
}
} else {
if (0 < ((_local14 * oH) + (_local13 * oV))) {
return(COL_NONE);
}
var _local18 = tile._curPos._vx + (oH * tile._xw);
var _local17 = tile._curPos._vy + (oV * tile._yw);
var _local6 = obj._curPos._vx - _local18;
var _local5 = obj._curPos._vy - _local17;
var _local11 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
if (_local11 == 0) {
_local6 = oH / Math.SQRT2;
_local5 = oV / Math.SQRT2;
} else {
_local6 = _local6 / _local11;
_local5 = _local5 / _local11;
}
obj.ReportCollisionVsWorld(_local6 * _local15, _local5 * _local15, _local6, _local5);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_Convex(x, y, oH, oV, obj, tile) {
var _local7 = tile._signx;
var _local6 = tile._signy;
if (oH == 0) {
if (oV == 0) {
var _local9 = obj._curPos._vx - (tile._curPos._vx - (_local7 * tile._xw));
var _local8 = obj._curPos._vy - (tile._curPos._vy - (_local6 * tile._yw));
var _local16 = tile._xw * 2;
var _local19 = Math.sqrt((_local16 * _local16) + 0);
var _local13 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
var _local15 = (_local19 + obj._rad) - _local13;
if (0 < _local15) {
var _local14;
if (x < y) {
_local14 = x;
y = 0;
if ((obj._curPos._vx - tile._curPos._vx) < 0) {
x = x * -1;
}
} else {
_local14 = y;
x = 0;
if ((obj._curPos._vy - tile._curPos._vy) < 0) {
y = y * -1;
}
}
if (_local14 < _local15) {
obj.ReportCollisionVsWorld(x, y, x / _local14, y / _local14);
return(COL_AXIS);
}
_local9 = _local9 / _local13;
_local8 = _local8 / _local13;
obj.ReportCollisionVsWorld(_local9 * _local15, _local8 * _local15, _local9, _local8);
return(COL_OTHER);
}
} else {
if ((_local6 * oV) < 0) {
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
var _local9 = obj._curPos._vx - (tile._curPos._vx - (_local7 * tile._xw));
var _local8 = obj._curPos._vy - (tile._curPos._vy - (_local6 * tile._yw));
var _local16 = tile._xw * 2;
var _local19 = Math.sqrt((_local16 * _local16) + 0);
var _local13 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
var _local15 = (_local19 + obj._rad) - _local13;
if (0 < _local15) {
_local9 = _local9 / _local13;
_local8 = _local8 / _local13;
obj.ReportCollisionVsWorld(_local9 * _local15, _local8 * _local15, _local9, _local8);
return(COL_OTHER);
}
}
} else if (oV == 0) {
if ((_local7 * oH) < 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local9 = obj._curPos._vx - (tile._curPos._vx - (_local7 * tile._xw));
var _local8 = obj._curPos._vy - (tile._curPos._vy - (_local6 * tile._yw));
var _local16 = tile._xw * 2;
var _local19 = Math.sqrt((_local16 * _local16) + 0);
var _local13 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
var _local15 = (_local19 + obj._rad) - _local13;
if (0 < _local15) {
_local9 = _local9 / _local13;
_local8 = _local8 / _local13;
obj.ReportCollisionVsWorld(_local9 * _local15, _local8 * _local15, _local9, _local8);
return(COL_OTHER);
}
} else if (0 < ((_local7 * oH) + (_local6 * oV))) {
var _local9 = obj._curPos._vx - (tile._curPos._vx - (_local7 * tile._xw));
var _local8 = obj._curPos._vy - (tile._curPos._vy - (_local6 * tile._yw));
var _local16 = tile._xw * 2;
var _local19 = Math.sqrt((_local16 * _local16) + 0);
var _local13 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
var _local15 = (_local19 + obj._rad) - _local13;
if (0 < _local15) {
_local9 = _local9 / _local13;
_local8 = _local8 / _local13;
obj.ReportCollisionVsWorld(_local9 * _local15, _local8 * _local15, _local9, _local8);
return(COL_OTHER);
}
} else {
var _local18 = tile._curPos._vx + (oH * tile._xw);
var _local17 = tile._curPos._vy + (oV * tile._yw);
var _local4 = obj._curPos._vx - _local18;
var _local3 = obj._curPos._vy - _local17;
var _local13 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local15 = obj._rad - _local13;
if (0 < _local15) {
if (_local13 == 0) {
_local4 = oH / Math.SQRT2;
_local3 = oV / Math.SQRT2;
} else {
_local4 = _local4 / _local13;
_local3 = _local3 / _local13;
}
obj.ReportCollisionVsWorld(_local4 * _local15, _local3 * _local15, _local4, _local3);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_22DegS(x, y, oH, oV, obj, tile) {
var _local12 = tile._signx;
var _local11 = tile._signy;
if (0 < (_local11 * oV)) {
return(COL_NONE);
}
if (oH == 0) {
if (oV == 0) {
var _local15 = tile._sx;
var _local14 = tile._sy;
var _local17 = obj._rad;
var _local4 = obj._curPos._vx - (tile._curPos._vx - (_local12 * tile._xw));
var _local3 = obj._curPos._vy - tile._curPos._vy;
var _local19 = (_local4 * (-_local14)) + (_local3 * _local15);
if (0 < ((_local19 * _local12) * _local11)) {
var _local13 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local18 = _local17 - _local13;
if (0 < _local18) {
_local4 = _local4 / _local13;
_local3 = _local3 / _local13;
obj.ReportCollisionVsWorld(_local4 * _local18, _local3 * _local18, _local4, _local3);
return(COL_OTHER);
}
} else {
_local4 = _local4 - (_local17 * _local15);
_local3 = _local3 - (_local17 * _local14);
var _local22 = (_local4 * _local15) + (_local3 * _local14);
if (_local22 < 0) {
_local15 = _local15 * (-_local22);
_local14 = _local14 * (-_local22);
var _local23 = Math.sqrt((_local15 * _local15) + (_local14 * _local14));
var _local16;
if (x < y) {
_local16 = x;
y = 0;
if ((obj._curPos._vx - tile._curPos._vx) < 0) {
x = x * -1;
}
} else {
_local16 = y;
x = 0;
if ((obj._curPos._vy - tile._curPos._vy) < 0) {
y = y * -1;
}
}
if (_local16 < _local23) {
obj.ReportCollisionVsWorld(x, y, x / _local16, y / _local16);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local15, _local14, tile._sx, tile._sy);
return(COL_OTHER);
}
}
// unexpected jump
}
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
if (oV == 0) {
if ((_local12 * oH) < 0) {
var _local21 = tile._curPos._vx - (_local12 * tile._xw);
var _local20 = tile._curPos._vy;
var _local6 = obj._curPos._vx - _local21;
var _local5 = obj._curPos._vy - _local20;
if ((_local5 * _local11) < 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local13 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local18 = obj._rad - _local13;
if (0 < _local18) {
if (_local13 == 0) {
_local6 = oH / Math.SQRT2;
_local5 = oV / Math.SQRT2;
} else {
_local6 = _local6 / _local13;
_local5 = _local5 / _local13;
}
obj.ReportCollisionVsWorld(_local6 * _local18, _local5 * _local18, _local6, _local5);
return(COL_OTHER);
}
} else {
var _local15 = tile._sx;
var _local14 = tile._sy;
var _local4 = obj._curPos._vx - (tile._curPos._vx + (oH * tile._xw));
var _local3 = obj._curPos._vy - (tile._curPos._vy - (_local11 * tile._yw));
var _local19 = (_local4 * (-_local14)) + (_local3 * _local15);
if (((_local19 * _local12) * _local11) < 0) {
var _local13 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local18 = obj._rad - _local13;
if (0 < _local18) {
_local4 = _local4 / _local13;
_local3 = _local3 / _local13;
obj.ReportCollisionVsWorld(_local4 * _local18, _local3 * _local18, _local4, _local3);
return(COL_OTHER);
}
} else {
var _local22 = (_local4 * _local15) + (_local3 * _local14);
var _local18 = obj._rad - Math.abs(_local22);
if (0 < _local18) {
obj.ReportCollisionVsWorld(_local15 * _local18, _local14 * _local18, _local15, _local14);
return(COL_OTHER);
}
}
}
} else {
var _local21 = tile._curPos._vx + (oH * tile._xw);
var _local20 = tile._curPos._vy + (oV * tile._yw);
var _local6 = obj._curPos._vx - _local21;
var _local5 = obj._curPos._vy - _local20;
var _local13 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local18 = obj._rad - _local13;
if (0 < _local18) {
if (_local13 == 0) {
_local6 = oH / Math.SQRT2;
_local5 = oV / Math.SQRT2;
} else {
_local6 = _local6 / _local13;
_local5 = _local5 / _local13;
}
obj.ReportCollisionVsWorld(_local6 * _local18, _local5 * _local18, _local6, _local5);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_22DegB(x, y, oH, oV, obj, tile) {
var _local4 = tile._signx;
var _local3 = tile._signy;
if (oH == 0) {
if (oV == 0) {
var _local14 = tile._sx;
var _local13 = tile._sy;
var _local17 = obj._rad;
var _local23 = (obj._curPos._vx - (_local14 * _local17)) - (tile._curPos._vx - (_local4 * tile._xw));
var _local22 = (obj._curPos._vy - (_local13 * _local17)) - (tile._curPos._vy + (_local3 * tile._yw));
var _local16 = (_local23 * _local14) + (_local22 * _local13);
if (_local16 < 0) {
_local14 = _local14 * (-_local16);
_local13 = _local13 * (-_local16);
var _local24 = Math.sqrt((_local14 * _local14) + (_local13 * _local13));
var _local12;
if (x < y) {
_local12 = x;
y = 0;
if ((obj._curPos._vx - tile._curPos._vx) < 0) {
x = x * -1;
}
} else {
_local12 = y;
x = 0;
if ((obj._curPos._vy - tile._curPos._vy) < 0) {
y = y * -1;
}
}
if (_local12 < _local24) {
obj.ReportCollisionVsWorld(x, y, x / _local12, y / _local12);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local14, _local13, tile._sx, tile._sy);
return(COL_OTHER);
}
} else {
if ((_local3 * oV) < 0) {
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
var _local14 = tile._sx;
var _local13 = tile._sy;
var _local23 = obj._curPos._vx - (tile._curPos._vx - (_local4 * tile._xw));
var _local22 = obj._curPos._vy - (tile._curPos._vy + (_local3 * tile._yw));
var _local19 = (_local23 * (-_local13)) + (_local22 * _local14);
if (0 < ((_local19 * _local4) * _local3)) {
var _local11 = Math.sqrt((_local23 * _local23) + (_local22 * _local22));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
_local23 = _local23 / _local11;
_local22 = _local22 / _local11;
obj.ReportCollisionVsWorld(_local23 * _local15, _local22 * _local15, _local23, _local22);
return(COL_OTHER);
}
} else {
var _local16 = (_local23 * _local14) + (_local22 * _local13);
var _local15 = obj._rad - Math.abs(_local16);
if (0 < _local15) {
obj.ReportCollisionVsWorld(_local14 * _local15, _local13 * _local15, _local14, _local13);
return(COL_OTHER);
}
}
}
} else if (oV == 0) {
if ((_local4 * oH) < 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local23 = obj._curPos._vx - (tile._curPos._vx + (_local4 * tile._xw));
var _local22 = obj._curPos._vy - tile._curPos._vy;
if ((_local22 * _local3) < 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local14 = tile._sx;
var _local13 = tile._sy;
var _local19 = (_local23 * (-_local13)) + (_local22 * _local14);
if (((_local19 * _local4) * _local3) < 0) {
var _local11 = Math.sqrt((_local23 * _local23) + (_local22 * _local22));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
_local23 = _local23 / _local11;
_local22 = _local22 / _local11;
obj.ReportCollisionVsWorld(_local23 * _local15, _local22 * _local15, _local23, _local22);
return(COL_OTHER);
}
} else {
var _local16 = (_local23 * _local14) + (_local22 * _local13);
var _local15 = obj._rad - Math.abs(_local16);
if (0 < _local15) {
obj.ReportCollisionVsWorld(_local14 * _local15, _local13 * _local15, tile._sx, tile._sy);
return(COL_OTHER);
}
}
} else {
if (0 < ((_local4 * oH) + (_local3 * oV))) {
var _local18 = 2.23606797749979;
var _local14 = (_local4 * 1) / _local18;
var _local13 = (_local3 * 2) / _local18;
var _local17 = obj._rad;
var _local23 = (obj._curPos._vx - (_local14 * _local17)) - (tile._curPos._vx - (_local4 * tile._xw));
var _local22 = (obj._curPos._vy - (_local13 * _local17)) - (tile._curPos._vy + (_local3 * tile._yw));
var _local16 = (_local23 * _local14) + (_local22 * _local13);
if (_local16 < 0) {
obj.ReportCollisionVsWorld((-_local14) * _local16, (-_local13) * _local16, tile._sx, tile._sy);
return(COL_OTHER);
}
return(COL_NONE);
}
var _local21 = tile._curPos._vx + (oH * tile._xw);
var _local20 = tile._curPos._vy + (oV * tile._yw);
var _local7 = obj._curPos._vx - _local21;
var _local6 = obj._curPos._vy - _local20;
var _local11 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
if (_local11 == 0) {
_local7 = oH / Math.SQRT2;
_local6 = oV / Math.SQRT2;
} else {
_local7 = _local7 / _local11;
_local6 = _local6 / _local11;
}
obj.ReportCollisionVsWorld(_local7 * _local15, _local6 * _local15, _local7, _local6);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_67DegS(x, y, oH, oV, obj, tile) {
var _local12 = tile._signx;
var _local11 = tile._signy;
if (0 < (_local12 * oH)) {
return(COL_NONE);
}
if (oH == 0) {
if (oV == 0) {
var _local17 = tile._sx;
var _local15 = tile._sy;
var _local16 = obj._rad;
var _local4 = obj._curPos._vx - tile._curPos._vx;
var _local3 = obj._curPos._vy - (tile._curPos._vy - (_local11 * tile._yw));
var _local19 = (_local4 * (-_local15)) + (_local3 * _local17);
if (((_local19 * _local12) * _local11) < 0) {
var _local13 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local18 = _local16 - _local13;
if (0 < _local18) {
_local4 = _local4 / _local13;
_local3 = _local3 / _local13;
obj.ReportCollisionVsWorld(_local4 * _local18, _local3 * _local18, _local4, _local3);
return(COL_OTHER);
}
} else {
_local4 = _local4 - (_local16 * _local17);
_local3 = _local3 - (_local16 * _local15);
var _local22 = (_local4 * _local17) + (_local3 * _local15);
if (_local22 < 0) {
_local17 = _local17 * (-_local22);
_local15 = _local15 * (-_local22);
var _local23 = Math.sqrt((_local17 * _local17) + (_local15 * _local15));
var _local14;
if (x < y) {
_local14 = x;
y = 0;
if ((obj._curPos._vx - tile._curPos._vx) < 0) {
x = x * -1;
}
} else {
_local14 = y;
x = 0;
if ((obj._curPos._vy - tile._curPos._vy) < 0) {
y = y * -1;
}
}
if (_local14 < _local23) {
obj.ReportCollisionVsWorld(x, y, x / _local14, y / _local14);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local17, _local15, tile._sx, tile._sy);
return(COL_OTHER);
}
}
} else if ((_local11 * oV) < 0) {
var _local21 = tile._curPos._vx;
var _local20 = tile._curPos._vy - (_local11 * tile._yw);
var _local7 = obj._curPos._vx - _local21;
var _local6 = obj._curPos._vy - _local20;
if ((_local7 * _local12) < 0) {
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
var _local13 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
var _local18 = obj._rad - _local13;
if (0 < _local18) {
if (_local13 == 0) {
_local7 = oH / Math.SQRT2;
_local6 = oV / Math.SQRT2;
} else {
_local7 = _local7 / _local13;
_local6 = _local6 / _local13;
}
obj.ReportCollisionVsWorld(_local7 * _local18, _local6 * _local18, _local7, _local6);
return(COL_OTHER);
}
} else {
var _local17 = tile._sx;
var _local15 = tile._sy;
var _local4 = obj._curPos._vx - (tile._curPos._vx - (_local12 * tile._xw));
var _local3 = obj._curPos._vy - (tile._curPos._vy + (oV * tile._yw));
var _local19 = (_local4 * (-_local15)) + (_local3 * _local17);
if (0 < ((_local19 * _local12) * _local11)) {
var _local13 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local18 = obj._rad - _local13;
if (0 < _local18) {
_local4 = _local4 / _local13;
_local3 = _local3 / _local13;
obj.ReportCollisionVsWorld(_local4 * _local18, _local3 * _local18, _local4, _local3);
return(COL_OTHER);
}
} else {
var _local22 = (_local4 * _local17) + (_local3 * _local15);
var _local18 = obj._rad - Math.abs(_local22);
if (0 < _local18) {
obj.ReportCollisionVsWorld(_local17 * _local18, _local15 * _local18, tile._sx, tile._sy);
return(COL_OTHER);
}
}
}
} else {
if (oV == 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local21 = tile._curPos._vx + (oH * tile._xw);
var _local20 = tile._curPos._vy + (oV * tile._yw);
var _local7 = obj._curPos._vx - _local21;
var _local6 = obj._curPos._vy - _local20;
var _local13 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
var _local18 = obj._rad - _local13;
if (0 < _local18) {
if (_local13 == 0) {
_local7 = oH / Math.SQRT2;
_local6 = oV / Math.SQRT2;
} else {
_local7 = _local7 / _local13;
_local6 = _local6 / _local13;
}
obj.ReportCollisionVsWorld(_local7 * _local18, _local6 * _local18, _local7, _local6);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_67DegB(x, y, oH, oV, obj, tile) {
var _local4 = tile._signx;
var _local3 = tile._signy;
if (oH == 0) {
if (oV == 0) {
var _local14 = tile._sx;
var _local13 = tile._sy;
var _local17 = obj._rad;
var _local23 = (obj._curPos._vx - (_local14 * _local17)) - (tile._curPos._vx + (_local4 * tile._xw));
var _local22 = (obj._curPos._vy - (_local13 * _local17)) - (tile._curPos._vy - (_local3 * tile._yw));
var _local16 = (_local23 * _local14) + (_local22 * _local13);
if (_local16 < 0) {
_local14 = _local14 * (-_local16);
_local13 = _local13 * (-_local16);
var _local24 = Math.sqrt((_local14 * _local14) + (_local13 * _local13));
var _local12;
if (x < y) {
_local12 = x;
y = 0;
if ((obj._curPos._vx - tile._curPos._vx) < 0) {
x = x * -1;
}
} else {
_local12 = y;
x = 0;
if ((obj._curPos._vy - tile._curPos._vy) < 0) {
y = y * -1;
}
}
if (_local12 < _local24) {
obj.ReportCollisionVsWorld(x, y, x / _local12, y / _local12);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local14, _local13, tile._sx, tile._sy);
return(COL_OTHER);
}
} else {
if ((_local3 * oV) < 0) {
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
var _local23 = obj._curPos._vx - tile._curPos._vx;
var _local22 = obj._curPos._vy - (tile._curPos._vy + (_local3 * tile._yw));
if ((_local23 * _local4) < 0) {
obj.ReportCollisionVsWorld(0, y * oV, 0, oV);
return(COL_AXIS);
}
var _local14 = tile._sx;
var _local13 = tile._sy;
var _local19 = (_local23 * (-_local13)) + (_local22 * _local14);
if (0 < ((_local19 * _local4) * _local3)) {
var _local11 = Math.sqrt((_local23 * _local23) + (_local22 * _local22));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
_local23 = _local23 / _local11;
_local22 = _local22 / _local11;
obj.ReportCollisionVsWorld(_local23 * _local15, _local22 * _local15, _local23, _local22);
return(COL_OTHER);
}
} else {
var _local16 = (_local23 * _local14) + (_local22 * _local13);
var _local15 = obj._rad - Math.abs(_local16);
if (0 < _local15) {
obj.ReportCollisionVsWorld(_local14 * _local15, _local13 * _local15, _local14, _local13);
return(COL_OTHER);
}
}
}
} else if (oV == 0) {
if ((_local4 * oH) < 0) {
obj.ReportCollisionVsWorld(x * oH, 0, oH, 0);
return(COL_AXIS);
}
var _local18 = 2.23606797749979;
var _local14 = (_local4 * 2) / _local18;
var _local13 = (_local3 * 1) / _local18;
var _local23 = obj._curPos._vx - (tile._curPos._vx + (_local4 * tile._xw));
var _local22 = obj._curPos._vy - (tile._curPos._vy - (_local3 * tile._yw));
var _local19 = (_local23 * (-_local13)) + (_local22 * _local14);
if (((_local19 * _local4) * _local3) < 0) {
var _local11 = Math.sqrt((_local23 * _local23) + (_local22 * _local22));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
_local23 = _local23 / _local11;
_local22 = _local22 / _local11;
obj.ReportCollisionVsWorld(_local23 * _local15, _local22 * _local15, _local23, _local22);
return(COL_OTHER);
}
} else {
var _local16 = (_local23 * _local14) + (_local22 * _local13);
var _local15 = obj._rad - Math.abs(_local16);
if (0 < _local15) {
obj.ReportCollisionVsWorld(_local14 * _local15, _local13 * _local15, tile._sx, tile._sy);
return(COL_OTHER);
}
}
} else {
if (0 < ((_local4 * oH) + (_local3 * oV))) {
var _local14 = tile._sx;
var _local13 = tile._sy;
var _local17 = obj._rad;
var _local23 = (obj._curPos._vx - (_local14 * _local17)) - (tile._curPos._vx + (_local4 * tile._xw));
var _local22 = (obj._curPos._vy - (_local13 * _local17)) - (tile._curPos._vy - (_local3 * tile._yw));
var _local16 = (_local23 * _local14) + (_local22 * _local13);
if (_local16 < 0) {
obj.ReportCollisionVsWorld((-_local14) * _local16, (-_local13) * _local16, tile._sx, tile._sy);
return(COL_OTHER);
}
return(COL_NONE);
}
var _local21 = tile._curPos._vx + (oH * tile._xw);
var _local20 = tile._curPos._vy + (oV * tile._yw);
var _local7 = obj._curPos._vx - _local21;
var _local6 = obj._curPos._vy - _local20;
var _local11 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
var _local15 = obj._rad - _local11;
if (0 < _local15) {
if (_local11 == 0) {
_local7 = oH / Math.SQRT2;
_local6 = oV / Math.SQRT2;
} else {
_local7 = _local7 / _local11;
_local6 = _local6 / _local11;
}
obj.ReportCollisionVsWorld(_local7 * _local15, _local6 * _local15, _local7, _local6);
return(COL_OTHER);
}
}
return(COL_NONE);
}
static var COL_NONE = 0;
static var COL_AXIS = 1;
static var COL_OTHER = 2;
}
Symbol 1682 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1683 MovieClip [__Packages.Base.LineEntity] Frame 0
class Base.LineEntity
{
var _gameContext, _owner, _LTYPE, _ptData, _colPoints, _numPoints, _nextPoint, _pointNum, _t, _isLastPoint, _numLngSteps, _numMedSteps, _numShtSteps, _thickness, _halfThick, _showdataBox, _tf, _render, _curPos, _oldPos, _rad, _xw, _yw, _upLeftPt, _lwLeftPt, _upRightPt, _lwRightPt, _minx, _maxx, _miny, _maxy, _fmt, _LCLASS, _signx, _signy, _mouseRollOn, _mouseRollOff, _mouseIsOver;
function LineEntity (gameContext, pos, rad, xw, yw, oOwner, oType, renderEngine, showdatabox) {
_gameContext = gameContext;
_owner = oOwner;
_LTYPE = oType;
_ptData = new Object();
_colPoints = [];
_numPoints = 0;
_nextPoint = new flash.geom.Point();
_pointNum = 0;
_t = 0;
_isLastPoint = false;
_numLngSteps = 20;
_numMedSteps = 15;
_numShtSteps = 10;
_thickness = 14;
_halfThick = 7;
initSize(rad, xw, yw);
initPosition(pos);
initLine();
_showdataBox = showdatabox;
_tf = "vtf_" + _owner.getID();
_render = renderEngine;
}
function getOwner() {
return(_owner);
}
function getCurrentPosition() {
return(_curPos);
}
function getOldPosition() {
return(_oldPos);
}
function initPosition(oPos) {
_curPos = oPos.clone();
_oldPos = oPos.clone();
updateMinMaxVectors();
}
function getCurrentPositionX() {
return(_curPos._vx);
}
function setNewPosition(nXpos, nYpos) {
_curPos._vx = nXpos;
_curPos._vy = nYpos;
updateMinMaxVectors();
}
function initSize(rad, xw, yw) {
_rad = Math.abs(rad);
_xw = Math.abs(xw);
_yw = Math.abs(yw);
}
function setNewSize(sAxis, nVar) {
switch (sAxis) {
case "x" :
_xw = _xw + nVar;
break;
case "y" :
_yw = _yw + nVar;
}
}
function updateMinMaxVectors() {
_upLeftPt = new flash.geom.Point(_curPos._vx - (_xw / 2), _curPos._vy - (_yw / 2));
_lwLeftPt = new flash.geom.Point(_curPos._vx - (_xw / 2), _curPos._vy + (_yw / 2));
_upRightPt = new flash.geom.Point(_curPos._vx + (_xw / 2), _curPos._vy - (_yw / 2));
_lwRightPt = new flash.geom.Point(_curPos._vx + (_xw / 2), _curPos._vy + (_yw / 2));
_minx = _upLeftPt.x;
_maxx = _upRightPt.x;
_miny = _upLeftPt.y;
_maxy = _lwLeftPt.y;
}
function getMinX() {
return(_minx);
}
function getMinY() {
return(_miny);
}
function getMaxX() {
return(_maxx);
}
function getMaxY() {
return(_maxy);
}
function getXW() {
return(_xw);
}
function getYW() {
return(_yw);
}
function toggleDataBox(sToggle) {
if (_showdataBox) {
switch (sToggle) {
case "on" :
_fmt = new TextFormat();
_fmt.font = "Verdana10";
_fmt.size = 8;
_fmt.color = 0;
this[_tf] = _gameContext.getGameData().getBuffer().createTextField("Vtxt", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _curPos._vx, _curPos._vy, _yw, 12);
this[_tf].border = true;
this[_tf].backgroundColor = 16777215 /* 0xFFFFFF */;
this[_tf].background = true;
this[_tf].autoSize = true;
this[_tf].selectable = false;
this[_tf].antiAliasType = "advanced";
this[_tf].embedFonts = true;
this[_tf].gridFitType = "pixel";
this[_tf].sharpness = -400;
this[_tf].text = (((((_owner.getName() + newline) + "x:") + _curPos._vx) + newline) + "y:") + _curPos._vy;
this[_tf].setTextFormat(_fmt);
break;
case "off" :
if (this[_tf] == undefined) {
break;
}
this[_tf].removeTextField();
}
}
}
function updateDataBoxPosition() {
if (_showdataBox) {
this[_tf]._x = _curPos._vx;
this[_tf]._y = _curPos._vy;
this[_tf].text = (((((_owner.getName() + newline) + "x:") + Math.floor(_curPos._vx)) + newline) + "y:") + Math.floor(_curPos._vy);
this[_tf].setNewTextFormat(_fmt);
}
}
function Draw() {
switch (_LTYPE) {
case LID_HOR_Pos :
var _local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local5 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
var _local10 = new flash.geom.Point(_upLeftPt.x + (_xw / 2), _upLeftPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawLine(_local11, _local5);
setCollisionPoints(_local11, _local10, _local5);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local5.x, _local5.y);
break;
case LID_HOR_Neg :
_local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
_local5 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
_local10 = new flash.geom.Point(_upLeftPt.x + (_xw / 2), _upLeftPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawLine(_local5, _local11);
setCollisionPoints(_local5, _local10, _local11);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local11.x, _local11.y);
break;
case LID_VER_Pos :
_local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
_local5 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
_local10 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + (_yw / 2));
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawLine(_local11, _local5);
setCollisionPoints(_local11, _local10, _local5);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local5.x, _local5.y);
break;
case LID_VER_Neg :
_local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
_local5 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
_local10 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + (_yw / 2));
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawLine(_local11, _local5);
setCollisionPoints(_local5, _local10, _local11);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local11.x, _local11.y);
break;
case LID_QTR1_Pos :
_local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
_local5 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
_local10 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local11, _local5, _local10);
setCollisionPoints(_local11, _local10, _local5);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local5.x, _local5.y);
break;
case LID_QTR1_Neg :
_local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
_local5 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
_local10 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local11, _local5, _local10);
setCollisionPoints(_local5, _local10, _local11);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local11.x, _local11.y);
break;
case LID_QTR2_Pos :
_local11 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
_local5 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
_local10 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y - _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local5, _local11, _local10);
setCollisionPoints(_local5, _local10, _local11);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local11.x, _local11.y);
break;
case LID_QTR2_Neg :
_local11 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
_local5 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
_local10 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y - _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local11, _local5, _local10);
setCollisionPoints(_local11, _local10, _local5);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local5.x, _local5.y);
break;
case LID_QTR3_Pos :
_local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
_local5 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
_local10 = new flash.geom.Point(_upLeftPt.x + _halfThick, _lwRightPt.y - _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local11, _local5, _local10);
setCollisionPoints(_local11, _local10, _local5);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local11.x, _local11.y);
break;
case LID_QTR3_Neg :
_local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
_local5 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
_local10 = new flash.geom.Point(_upLeftPt.x + _halfThick, _lwRightPt.y - _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local11, _local5, _local10);
setCollisionPoints(_local5, _local10, _local11);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local5.x, _local5.y);
break;
case LID_QTR4_Pos :
_local11 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
_local5 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
_local10 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local11, _local5, _local10);
setCollisionPoints(_local5, _local10, _local11);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local11.x, _local11.y);
break;
case LID_QTR4_Neg :
_local11 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
_local5 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
_local10 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local11, _local5, _local10);
setCollisionPoints(_local11, _local10, _local5);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local5.x, _local5.y);
break;
case LID_SNK1_Pos :
var _local2 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local9 = new flash.geom.Point(_local2.x + 135, _local2.y);
var _local4 = new flash.geom.Point(_local2.x + 178, _local2.y + 128);
var _local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 225, _local2.y + 272);
var _local7 = new flash.geom.Point(_local3.x + 40, _local3.y + 110);
var _local6 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local2, _local4, _local9);
_render.DrawArc(_local4, _local3, _local8);
_render.DrawArc(_local3, _local6, _local7);
setCollisionPoints(_local2, _local9, _local4);
addCollisionPoints(_local4, _local8, _local3, _numShtSteps);
addCollisionPoints(_local3, _local7, _local6, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local6.x, _local6.y);
break;
case LID_SNK1_Neg :
_local2 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
_local9 = new flash.geom.Point(_local2.x + 135, _local2.y);
_local4 = new flash.geom.Point(_local2.x + 178, _local2.y + 128);
_local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
_local3 = new flash.geom.Point(_local2.x + 225, _local2.y + 272);
_local7 = new flash.geom.Point(_local3.x + 40, _local3.y + 110);
_local6 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local6, _local3, _local7);
_render.DrawArc(_local3, _local4, _local8);
_render.DrawArc(_local4, _local2, _local9);
setCollisionPoints(_local6, _local7, _local3);
addCollisionPoints(_local3, _local8, _local4, _numShtSteps);
addCollisionPoints(_local4, _local9, _local2, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local2.x, _local2.y);
break;
case LID_SNK2_Pos :
_local2 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
_local9 = new flash.geom.Point(_local2.x, _local2.y - 135);
_local4 = new flash.geom.Point(_local2.x + 128, _local2.y - 178);
_local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
_local3 = new flash.geom.Point(_local2.x + 272, _local2.y - 225);
_local7 = new flash.geom.Point(_local3.x + 110, _local3.y - 40);
_local6 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local2, _local4, _local9);
_render.DrawArc(_local4, _local3, _local8);
_render.DrawArc(_local3, _local6, _local7);
setCollisionPoints(_local2, _local9, _local4);
addCollisionPoints(_local4, _local8, _local3, _numShtSteps);
addCollisionPoints(_local3, _local7, _local6, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local6.x, _local6.y);
break;
case LID_SNK2_Neg :
_local2 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
_local9 = new flash.geom.Point(_local2.x, _local2.y - 135);
_local4 = new flash.geom.Point(_local2.x + 128, _local2.y - 178);
_local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
_local3 = new flash.geom.Point(_local2.x + 272, _local2.y - 225);
_local7 = new flash.geom.Point(_local3.x + 110, _local3.y - 40);
_local6 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local6, _local3, _local7);
_render.DrawArc(_local3, _local4, _local8);
_render.DrawArc(_local4, _local2, _local9);
setCollisionPoints(_local6, _local7, _local3);
addCollisionPoints(_local3, _local8, _local4, _numShtSteps);
addCollisionPoints(_local4, _local9, _local2, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local2.x, _local2.y);
break;
case LID_SNK3_Pos :
_local2 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
_local9 = new flash.geom.Point(_local2.x, _local2.y + 135);
_local4 = new flash.geom.Point(_local2.x + 128, _local2.y + 178);
_local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
_local3 = new flash.geom.Point(_local2.x + 272, _local2.y + 225);
_local7 = new flash.geom.Point(_local3.x + 110, _local3.y + 40);
_local6 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local2, _local4, _local9);
_render.DrawArc(_local4, _local3, _local8);
_render.DrawArc(_local3, _local6, _local7);
setCollisionPoints(_local2, _local9, _local4);
addCollisionPoints(_local4, _local8, _local3, _numShtSteps);
addCollisionPoints(_local3, _local7, _local6, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local6.x, _local6.y);
break;
case LID_SNK3_Neg :
_local2 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
_local9 = new flash.geom.Point(_local2.x, _local2.y + 135);
_local4 = new flash.geom.Point(_local2.x + 128, _local2.y + 178);
_local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
_local3 = new flash.geom.Point(_local2.x + 272, _local2.y + 225);
_local7 = new flash.geom.Point(_local3.x + 110, _local3.y + 40);
_local6 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local6, _local3, _local7);
_render.DrawArc(_local3, _local4, _local8);
_render.DrawArc(_local4, _local2, _local9);
setCollisionPoints(_local6, _local7, _local3);
addCollisionPoints(_local3, _local8, _local4, _numShtSteps);
addCollisionPoints(_local4, _local9, _local2, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local2.x, _local2.y);
break;
case LID_SNK4_Pos :
_local2 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
_local9 = new flash.geom.Point(_local2.x + 135, _local2.y);
_local4 = new flash.geom.Point(_local2.x + 178, _local2.y - 128);
_local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
_local3 = new flash.geom.Point(_local2.x + 225, _local2.y - 272);
_local7 = new flash.geom.Point(_local3.x + 40, _local3.y - 110);
_local6 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local2, _local4, _local9);
_render.DrawArc(_local4, _local3, _local8);
_render.DrawArc(_local3, _local6, _local7);
setCollisionPoints(_local2, _local9, _local4);
addCollisionPoints(_local4, _local8, _local3, _numShtSteps);
addCollisionPoints(_local3, _local7, _local6, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local6.x, _local6.y);
break;
case LID_SNK4_Neg :
_local2 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
_local9 = new flash.geom.Point(_local2.x + 135, _local2.y);
_local4 = new flash.geom.Point(_local2.x + 178, _local2.y - 128);
_local8 = new flash.geom.Point(_curPos._vx, _curPos._vy);
_local3 = new flash.geom.Point(_local2.x + 225, _local2.y - 272);
_local7 = new flash.geom.Point(_local3.x + 40, _local3.y - 110);
_local6 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
_render.SetStyle(_thickness, _owner._lineColor, 100);
_render.DrawArc(_local6, _local3, _local7);
_render.DrawArc(_local3, _local4, _local8);
_render.DrawArc(_local4, _local2, _local9);
setCollisionPoints(_local6, _local7, _local3);
addCollisionPoints(_local3, _local8, _local4, _numShtSteps);
addCollisionPoints(_local4, _local9, _local2, _numLngSteps);
_render.SetStyle(2, 16711680, 100);
_render.DrawPlus_S(_local2.x, _local2.y);
}
}
function getCollisionPoints() {
return(_colPoints);
}
function setCollisionPoints(p1, ctp, p2) {
_colPoints = [];
var _local2 = 0;
while (_local2 <= 1) {
var _local3 = 1 - _local2;
var _local4 = _local3 * _local3;
var _local6 = _local2 * _local2;
var _local5 = (2 * _local2) * _local3;
var _local11 = ((_local4 * p1.x) + (_local5 * ctp.x)) + (_local6 * p2.x);
var _local10 = ((_local4 * p1.y) + (_local5 * ctp.y)) + (_local6 * p2.y);
_colPoints.push({x:_local11, y:_local10});
_local2 = _local2 + (1 / _numLngSteps);
}
_local2 = 0;
while (_local2 <= _colPoints.length) {
_render.SetStyle(1, 16711680, 100);
_render.DrawPlus_S(_colPoints[_local2].x, _colPoints[_local2].y);
_local2++;
}
}
function addCollisionPoints(p1, ctp, p2, steps) {
var _local2 = 0;
var _local4 = [];
while (_local2 < 0.99) {
var _local3 = 1 - _local2;
var _local5 = _local3 * _local3;
var _local7 = _local2 * _local2;
var _local6 = (2 * _local2) * _local3;
var _local12 = ((_local5 * p1.x) + (_local6 * ctp.x)) + (_local7 * p2.x);
var _local11 = ((_local5 * p1.y) + (_local6 * ctp.y)) + (_local7 * p2.y);
_colPoints.push({x:_local12, y:_local11});
_local4.push({x:_local12, y:_local11});
_local2 = _local2 + (1 / steps);
}
_local2 = 0;
while (_local2 <= _local4.length) {
_render.SetStyle(1, 16711680, 100);
_render.DrawPlus_S(_local4[_local2].x, _local4[_local2].y);
_local2++;
}
}
function setPointData(points, ctrlPts) {
_numPoints = points.length;
var _local3 = 0;
while (_local3 < _numPoints) {
_ptData["x" + _local3] = points[_local3].x;
_ptData["y" + _local3] = points[_local3].y;
_local3++;
}
var _local2 = 0;
while (_local2 < ctrlPts.length) {
_ptData["cx" + _local2] = ctrlPts[_local2].x;
_ptData["cy" + _local2] = ctrlPts[_local2].y;
_local2++;
}
}
function followLine(speed) {
_t = _t + speed;
_pointNum = (_pointNum + (_t >= 1)) * (_pointNum < (_numPoints - 1));
_t = _t % 1;
if (_pointNum < (_numPoints - 1)) {
var _local2 = 0;
while (_local2 <= (_numPoints - 1)) {
if (_pointNum == _local2) {
var _local4 = _ptData["cx" + _local2];
var _local3 = _ptData["cy" + _local2];
var _local6 = _ptData["x" + _local2];
var _local5 = _ptData["y" + _local2];
var _local8 = _ptData["x" + (_local2 + 1)];
var _local7 = _ptData["y" + (_local2 + 1)];
}
_local2++;
}
_nextPoint.x = setBezierPos(_local6, _local8, _local4, _t);
_nextPoint.y = setBezierPos(_local5, _local7, _local3, _t);
} else {
_nextPoint.x = -1;
_nextPoint.y = -1;
}
return(_nextPoint);
}
function followPoints() {
_t = _t + 1;
if (_t < _colPoints.length) {
_nextPoint.x = _colPoints[_t].x;
_nextPoint.y = _colPoints[_t].y;
_isLastPoint = ((_t == (_colPoints.length - 1)) ? true : false);
} else {
_t = 0;
_nextPoint.x = -1;
_nextPoint.y = -1;
}
return(_nextPoint);
}
function initFollow(t) {
_t = t;
_isLastPoint = false;
}
function setBezierPos(p1, p2, pc, tx) {
return((((p1 * (1 - tx)) * (1 - tx)) + (((2 * pc) * (1 - tx)) * tx)) + ((p2 * tx) * tx));
}
function drawBoundingBox() {
_render.SetStyle(0, 0, 100);
_render.DrawAABB(_curPos, _xw, _yw);
_render.DrawPlus_S(_curPos._vx, _curPos._vy);
}
function initLine() {
if (-1 < _LTYPE) {
if (_LTYPE < LTYPE_VER) {
_LCLASS = LTYPE_HOR;
if (_LTYPE == LID_HOR_Pos) {
_signx = 1;
_signy = 0;
var _local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local10 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
var _local9 = new flash.geom.Point(_upLeftPt.x + (_xw / 2), _upLeftPt.y + _halfThick);
setCollisionPoints(_local11, _local9, _local10);
setPointData([_local11, _local10], [_local9]);
} else if (_LTYPE == LID_HOR_Neg) {
_signx = -1;
_signy = 0;
var _local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local10 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
var _local9 = new flash.geom.Point(_upLeftPt.x + (_xw / 2), _upLeftPt.y + _halfThick);
setCollisionPoints(_local10, _local9, _local11);
setPointData([_local10, _local11], [_local9]);
}
} else if (_LTYPE < LTYPE_QTR) {
_LCLASS = LTYPE_VER;
if (_LTYPE == LID_VER_Pos) {
_signx = 0;
_signy = 1;
var _local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
var _local10 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
var _local9 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + (_yw / 2));
setCollisionPoints(_local11, _local9, _local10);
setPointData([_local11, _local10], [_local9]);
} else if (_LTYPE == LID_VER_Neg) {
_signx = 0;
_signy = -1;
var _local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
var _local10 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
var _local9 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + (_yw / 2));
setCollisionPoints(_local10, _local9, _local11);
setPointData([_local10, _local11], [_local9]);
}
} else if (_LTYPE < LTYPE_SNK) {
_LCLASS = LTYPE_QTR;
if (_LTYPE == LID_QTR1_Pos) {
_signx = 1;
_signy = 1;
var _local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local10 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
var _local9 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y + _halfThick);
setCollisionPoints(_local11, _local9, _local10);
setPointData([_local11, _local10], [_local9]);
} else if (_LTYPE == LID_QTR1_Neg) {
_signx = -1;
_signy = -1;
var _local11 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local10 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
var _local9 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y + _halfThick);
setCollisionPoints(_local10, _local9, _local11);
setPointData([_local10, _local11], [_local9]);
} else if (_LTYPE == LID_QTR2_Pos) {
_signx = 1;
_signy = -1;
var _local11 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
var _local10 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
var _local9 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y - _halfThick);
setCollisionPoints(_local10, _local9, _local11);
setPointData([_local10, _local11], [_local9]);
} else if (_LTYPE == LID_QTR2_Neg) {
_signx = -1;
_signy = 1;
var _local11 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
var _local10 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
var _local9 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y - _halfThick);
setCollisionPoints(_local11, _local9, _local10);
setPointData([_local11, _local10], [_local9]);
} else if (_LTYPE == LID_QTR3_Pos) {
_signx = 1;
_signy = 1;
var _local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
var _local10 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
var _local9 = new flash.geom.Point(_upLeftPt.x + _halfThick, _lwRightPt.y - _halfThick);
setCollisionPoints(_local11, _local9, _local10);
setPointData([_local11, _local10], [_local9]);
} else if (_LTYPE == LID_QTR3_Neg) {
_signx = -1;
_signy = -1;
var _local11 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
var _local10 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
var _local9 = new flash.geom.Point(_upLeftPt.x + _halfThick, _lwRightPt.y - _halfThick);
setCollisionPoints(_local10, _local9, _local11);
setPointData([_local10, _local11], [_local9]);
} else if (_LTYPE == LID_QTR4_Pos) {
_signx = 1;
_signy = -1;
var _local11 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
var _local10 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
var _local9 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + _halfThick);
setCollisionPoints(_local10, _local9, _local11);
setPointData([_local10, _local11], [_local9]);
} else if (_LTYPE == LID_QTR4_Neg) {
_signx = -1;
_signy = 1;
var _local11 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
var _local10 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
var _local9 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y + _halfThick);
setCollisionPoints(_local11, _local9, _local10);
setPointData([_local11, _local10], [_local9]);
} else {
return(false);
}
} else {
_LCLASS = LTYPE_SNK;
if (_LTYPE == LID_SNK1_Pos) {
_signx = 1;
_signy = 1;
var _local2 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local8 = new flash.geom.Point(_local2.x + 135, _local2.y);
var _local4 = new flash.geom.Point(_local2.x + 178, _local2.y + 128);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 225, _local2.y + 272);
var _local6 = new flash.geom.Point(_local3.x + 40, _local3.y + 110);
var _local5 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
setCollisionPoints(_local2, _local8, _local4);
addCollisionPoints(_local4, _local7, _local3, _numShtSteps);
addCollisionPoints(_local3, _local6, _local5, _numLngSteps);
setPointData([_local2, _local4, _local3, _local5], [_local8, _local7, _local6]);
} else if (_LTYPE == LID_SNK1_Neg) {
_signx = -1;
_signy = -1;
var _local2 = new flash.geom.Point(_upLeftPt.x, _upLeftPt.y + _halfThick);
var _local8 = new flash.geom.Point(_local2.x + 135, _local2.y);
var _local4 = new flash.geom.Point(_local2.x + 178, _local2.y + 128);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 225, _local2.y + 272);
var _local6 = new flash.geom.Point(_local3.x + 40, _local3.y + 110);
var _local5 = new flash.geom.Point(_lwRightPt.x, _lwRightPt.y - _halfThick);
setCollisionPoints(_local5, _local6, _local3);
addCollisionPoints(_local3, _local7, _local4, _numShtSteps);
addCollisionPoints(_local4, _local8, _local2, _numLngSteps);
setPointData([_local5, _local3, _local4, _local2], [_local6, _local7, _local8]);
} else if (_LTYPE == LID_SNK2_Pos) {
_signx = 1;
_signy = -1;
var _local2 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
var _local8 = new flash.geom.Point(_local2.x, _local2.y - 135);
var _local4 = new flash.geom.Point(_local2.x + 128, _local2.y - 178);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 272, _local2.y - 225);
var _local6 = new flash.geom.Point(_local3.x + 110, _local3.y - 40);
var _local5 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
setCollisionPoints(_local2, _local8, _local4);
addCollisionPoints(_local4, _local7, _local3, _numShtSteps);
addCollisionPoints(_local3, _local6, _local5, _numLngSteps);
setPointData([_local2, _local4, _local3, _local5], [_local8, _local7, _local6]);
} else if (_LTYPE == LID_SNK2_Neg) {
_signx = -1;
_signy = 1;
var _local2 = new flash.geom.Point(_lwLeftPt.x + _halfThick, _lwLeftPt.y);
var _local8 = new flash.geom.Point(_local2.x, _local2.y - 135);
var _local4 = new flash.geom.Point(_local2.x + 128, _local2.y - 178);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 272, _local2.y - 225);
var _local6 = new flash.geom.Point(_local3.x + 110, _local3.y - 40);
var _local5 = new flash.geom.Point(_upRightPt.x - _halfThick, _upRightPt.y);
setCollisionPoints(_local5, _local6, _local3);
addCollisionPoints(_local3, _local7, _local4, _numShtSteps);
addCollisionPoints(_local4, _local8, _local2, _numLngSteps);
setPointData([_local5, _local3, _local4, _local2], [_local6, _local7, _local8]);
} else if (_LTYPE == LID_SNK3_Pos) {
_signx = 1;
_signy = 1;
var _local2 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
var _local8 = new flash.geom.Point(_local2.x, _local2.y + 135);
var _local4 = new flash.geom.Point(_local2.x + 128, _local2.y + 178);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 272, _local2.y + 225);
var _local6 = new flash.geom.Point(_local3.x + 110, _local3.y + 40);
var _local5 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
setCollisionPoints(_local2, _local8, _local4);
addCollisionPoints(_local4, _local7, _local3, _numShtSteps);
addCollisionPoints(_local3, _local6, _local5, _numLngSteps);
setPointData([_local2, _local4, _local3, _local5], [_local8, _local7, _local6]);
} else if (_LTYPE == LID_SNK3_Neg) {
_signx = -1;
_signy = -1;
var _local2 = new flash.geom.Point(_upLeftPt.x + _halfThick, _upLeftPt.y);
var _local8 = new flash.geom.Point(_local2.x, _local2.y + 135);
var _local4 = new flash.geom.Point(_local2.x + 128, _local2.y + 178);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 272, _local2.y + 225);
var _local6 = new flash.geom.Point(_local3.x + 110, _local3.y + 40);
var _local5 = new flash.geom.Point(_lwRightPt.x - _halfThick, _lwRightPt.y);
setCollisionPoints(_local5, _local6, _local3);
addCollisionPoints(_local3, _local7, _local4, _numShtSteps);
addCollisionPoints(_local4, _local8, _local2, _numLngSteps);
setPointData([_local5, _local3, _local4, _local2], [_local6, _local7, _local8]);
} else if (_LTYPE == LID_SNK4_Pos) {
_signx = 1;
_signy = -1;
var _local2 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
var _local8 = new flash.geom.Point(_local2.x + 135, _local2.y);
var _local4 = new flash.geom.Point(_local2.x + 178, _local2.y - 128);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 225, _local2.y - 272);
var _local6 = new flash.geom.Point(_local3.x + 40, _local3.y - 110);
var _local5 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
setCollisionPoints(_local2, _local8, _local4);
addCollisionPoints(_local4, _local7, _local3, _numShtSteps);
addCollisionPoints(_local3, _local6, _local5, _numLngSteps);
setPointData([_local2, _local4, _local3, _local5], [_local8, _local7, _local6]);
} else if (_LTYPE == LID_SNK4_Neg) {
_signx = -1;
_signy = 1;
var _local2 = new flash.geom.Point(_lwLeftPt.x, _lwLeftPt.y - _halfThick);
var _local8 = new flash.geom.Point(_local2.x + 135, _local2.y);
var _local4 = new flash.geom.Point(_local2.x + 178, _local2.y - 128);
var _local7 = new flash.geom.Point(_curPos._vx, _curPos._vy);
var _local3 = new flash.geom.Point(_local2.x + 220, _local2.y - 272);
var _local6 = new flash.geom.Point(_local3.x + 40, _local3.y - 110);
var _local5 = new flash.geom.Point(_upRightPt.x, _upRightPt.y + _halfThick);
setCollisionPoints(_local5, _local6, _local3);
addCollisionPoints(_local3, _local7, _local4, _numShtSteps);
addCollisionPoints(_local4, _local8, _local2, _numLngSteps);
setPointData([_local5, _local3, _local4, _local2], [_local6, _local7, _local8]);
} else {
return(false);
}
}
} else {
_signx = 0;
_signy = 0;
return(false);
}
}
function isMouseRollOn() {
return(_mouseRollOn);
}
function isMouseRollOff() {
return(_mouseRollOff);
}
function isMouseOver() {
var _local2 = false;
if (_mouseIsOver) {
_mouseRollOn = false;
_local2 = true;
} else {
_mouseRollOn = true;
}
_mouseRollOff = false;
_mouseIsOver = false;
if ((((_gameContext.getGameData().getBufferMouseX() < _minx) || (_gameContext.getGameData().getBufferMouseX() > _maxx)) || (_gameContext.getGameData().getBufferMouseY() < _miny)) || (_gameContext.getGameData().getBufferMouseY() > _maxy)) {
if (_local2) {
_mouseRollOff = true;
}
return(false);
}
_mouseIsOver = true;
return(true);
}
function isMouseOverXscaler() {
var _local3 = 5;
var _local2 = 2.5;
if ((((_gameContext.getGameData().getBufferMouseX() < (_maxx - _local3)) || (_gameContext.getGameData().getBufferMouseX() > _maxx)) || (_gameContext.getGameData().getBufferMouseY() > (_curPos._vy + _local2))) || (_gameContext.getGameData().getBufferMouseY() < (_curPos._vy - _local2))) {
return(false);
}
return(true);
}
function isMouseOverYscaler() {
var _local3 = 5;
var _local2 = 2.5;
if ((((_gameContext.getGameData().getBufferMouseX() < (_curPos._vx - _local2)) || (_gameContext.getGameData().getBufferMouseX() > (_curPos._vx + _local2))) || (_gameContext.getGameData().getBufferMouseY() > (_miny + _local3))) || (_gameContext.getGameData().getBufferMouseY() < _miny)) {
return(false);
}
return(true);
}
function toString() {
return("Rail()");
}
static var LTYPE_HOR = 0;
static var LTYPE_VER = 2;
static var LTYPE_QTR = 4;
static var LTYPE_SNK = 12;
static var LID_HOR_Pos = 0;
static var LID_HOR_Neg = 1;
static var LID_VER_Pos = 2;
static var LID_VER_Neg = 3;
static var LID_QTR1_Pos = 4;
static var LID_QTR1_Neg = 5;
static var LID_QTR2_Pos = 6;
static var LID_QTR2_Neg = 7;
static var LID_QTR3_Pos = 8;
static var LID_QTR3_Neg = 9;
static var LID_QTR4_Pos = 10;
static var LID_QTR4_Neg = 11;
static var LID_SNK1_Pos = 12;
static var LID_SNK1_Neg = 13;
static var LID_SNK2_Pos = 14;
static var LID_SNK2_Neg = 15;
static var LID_SNK3_Pos = 16;
static var LID_SNK3_Neg = 17;
static var LID_SNK4_Pos = 18;
static var LID_SNK4_Neg = 19;
}
Symbol 1684 MovieClip [__Packages.Game.AIStates.Hero_Spawn] Frame 0
class Game.AIStates.Hero_Spawn extends Base.AIState
{
var _entity, _gameContext, spawnX, spawnY, fx, fy, _accel, _spriteDeathTube, _doorResetFrame, _stage, _counter, _delay;
function Hero_Spawn (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._hasJustSpawned = true;
spawnX = _gameContext.getGameData()._heroSpawnPosX;
spawnY = _gameContext.getGameData()._heroSpawnPosY;
fx = 0;
fy = 0;
_accel = 0;
_entity._sBody._curPos._vx = 8600;
_spriteDeathTube = new Base.SpriteEntity(_gameContext, 1, 1, "deathtube", "deathtube", 3000, 200, 0, 1, -1, -1);
_spriteDeathTube.startAnimating(1, 30, 32, false);
_doorResetFrame = _gameContext.getGameData()._exitDoorMC._currentframe;
_gameContext.getGameData()._exitDoorMC.gotoAndStop(14);
_entity.RenderEntity();
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
switch (_stage) {
case 1 :
var _local11 = _spriteDeathTube.animateSprite();
if (_local11 == 1) {
_stage++;
}
break;
case 2 :
_gameContext.getGameData()._exitDoorMC.gotoAndStop(_gameContext.getGameData()._exitDoorMC._currentframe - 1);
_local11 = _gameContext.getGameData()._exitDoorMC._currentframe;
if (_local11 == 1) {
_stage++;
}
break;
case 3 :
if (_accel < 60) {
_accel = _accel + 5;
}
var _local13 = _entity._sBody._curPos._vx - spawnX;
var _local12 = _entity._sBody._curPos._vy - spawnY;
var _local9 = (-Math.atan2(_local13, _local12)) / (Math.PI/180);
fx = _accel * Math.sin(_local9 * (Math.PI/180));
fy = _accel * Math.cos(_local9 * (Math.PI/180));
var _local8 = _entity._sBody._curPos._vx + fx;
var _local7 = _entity._sBody._curPos._vy - fy;
if ((((_local8 <= (spawnX + 35)) && (_local8 >= (spawnX - 35))) && (_local7 <= (spawnY + 35))) && (_local7 >= (spawnY - 35))) {
_entity._sBody._curPos._vx = spawnX;
_entity._sBody._curPos._vy = spawnY;
_entity.setHeadPosition();
_entity.setMagnetPosition();
_accel = 0;
_counter = 0;
_delay = 45;
_gameContext.getGameData().getSoundModule().PlaySound("her_vacuum_blow", 100, 0, 0, 0);
_stage++;
return(undefined);
}
_entity._sBody.setNewPosition(_local8, _local7);
break;
case 4 :
_counter++;
if (_counter >= _delay) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.RespawnStart.start, Game.Hero.ANMIMATIONS.RespawnStart.end, 32, Game.Hero.ANMIMATIONS.RespawnStart.loop);
_entity._spriteHero.setVisibility(true);
_entity.setOnPlatform(false);
_stage++;
}
break;
case 5 :
_entity._fy = 12;
var _local6;
var _local10;
_local6 = _entity.getBody()._curPos;
_local10 = _entity.getBody()._oldPos;
_local10._vx = _local6._vx;
_local10._vy = _local6._vy;
_local6._vx = _local6._vx + _entity._fx;
_local6._vy = _local6._vy + _entity._fy;
var _local5 = _gameContext.getGameData().getColArray();
var _local4 = _gameContext.getGameData().getNumColGameObjects();
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = _local5[_local3];
if ((_local2.getActive() && (!_local2.getIsMultiVector())) && (_local2._class != Game.GameData.RAIL)) {
_entity.getBody().CollideVsTile(_local2.getHitShape());
}
_local3++;
}
_entity.setHeadPosition();
_entity.setMagnetPosition();
if (_entity.getOnPlatform()) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.RespawnEnd.start, Game.Hero.ANMIMATIONS.RespawnEnd.end, 32, Game.Hero.ANMIMATIONS.RespawnEnd.loop);
_stage++;
}
_entity.RenderEntity();
break;
case 6 :
_local11 = _entity.animateSprite();
if (_local11 == 1) {
_spriteDeathTube.startAnimating(36, 50, 32, false);
_stage++;
}
_entity.RenderEntity();
break;
case 7 :
_local11 = _spriteDeathTube.animateSprite();
if (_local11 != 1) {
break;
}
_spriteDeathTube.removeSprite();
delete _spriteDeathTube;
_gameContext.getGameData()._exitDoorMC.gotoAndStop(_doorResetFrame);
_entity.setNextState(Game.AIStates.Hero_Walk);
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Hero_Spawn()");
}
}
Symbol 1685 MovieClip [__Packages.Game.AIStates.Hero_Walk] Frame 0
class Game.AIStates.Hero_Walk extends Base.AIState
{
var _entity, _timer, _gameContext, _gameData, _hasMovedHor, _hasMovedVer, _idleTrigger;
function Hero_Walk (entity) {
super();
_entity = entity;
_timer = 0.0333333333333333;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_hasMovedHor = true;
_hasMovedVer = true;
_idleTrigger = false;
_entity._isPushing = false;
_entity.resetRailData();
return(undefined);
}
function PadInput() {
if (_entity._endLevel) {
_entity._isMoving = _entity.None;
return(undefined);
}
if (((!_entity.getIsMoving()) && (_entity._fy == 0)) && (_entity._isMagnetActive == false)) {
if (_gameContext.getPadManager().getCurrentKeyAction() == "LookDown") {
_gameData.setLookDownLimit();
if (_gameData.canILookDown()) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_look_down", 100, 0, 0, 0);
}
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "LookUp") {
_gameContext.getGameData().getSoundModule().PlaySound("hero_look_up", 100, 0, 0, 0);
}
if (_gameContext.getPadManager().getCurrentKeyActionHeld() == "LookUp") {
_entity.startAnimating(Game.Hero.ANMIMATIONS.LookUp.start, Game.Hero.ANMIMATIONS.LookUp.end, 32, Game.Hero.ANMIMATIONS.LookUp.loop);
_gameData.setIsLookingUp();
return(undefined);
}
if (_gameContext.getPadManager().getCurrentKeyActionHeld() == "LookDown") {
if (_gameData.canILookDown()) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.LookDown.start, Game.Hero.ANMIMATIONS.LookDown.end, 32, Game.Hero.ANMIMATIONS.LookDown.loop);
_gameData.setIsLookingDown();
return(undefined);
}
}
if (!_gameData.getAmILookingUpOrDown()) {
if (_entity.isLookingUpOrDown()) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Idle.start, Game.Hero.ANMIMATIONS.Idle.end, 32, Game.Hero.ANMIMATIONS.Idle.loop);
return(undefined);
}
} else {
return(undefined);
}
}
if (_gameContext.getPadManager().getKeyActionHeld("Magnetize")) {
} else if (_entity._isMagnetActive) {
_entity.magnetStop();
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Magnetize") {
if (_entity._isPushing == false) {
_entity.magnetStart();
}
}
if ((_gameContext.getPadManager().getCurrentKeyActionHeld() == "Jump") && (_gameContext.getPadManager().getTimeKeyActionHeld() < 0.1)) {
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Jump") {
if (_entity._isPushing == false) {
_entity._fy = -_entity.getPhysics()._jumpStrength;
_entity.setNextState(Game.AIStates.Hero_Jump);
return(undefined);
}
}
if (_gameContext.getPadManager().getKeyActionHeld("MoveLeft")) {
_entity._isMoving = _entity.Left;
_entity.setIsFacing(_entity.Left);
_hasMovedHor = true;
if ((!_entity.isRunning()) && (!_entity._isPushing)) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Run.start, Game.Hero.ANMIMATIONS.Run.end, 32, Game.Hero.ANMIMATIONS.Run.loop);
}
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_run_loop", 100, 0, 0, 2000);
}
} else if (_gameContext.getPadManager().getKeyActionHeld("MoveRight")) {
_entity._isMoving = _entity.Right;
_entity.setIsFacing(_entity.Right);
_hasMovedHor = true;
if ((!_entity.isRunning()) && (!_entity._isPushing)) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Run.start, Game.Hero.ANMIMATIONS.Run.end, 32, Game.Hero.ANMIMATIONS.Run.loop);
}
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_run_loop", 100, 0, 0, 2000);
}
} else {
_entity._isMoving = _entity.None;
_entity._isPushing = false;
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "MoveRight") {
_entity._isMoving = _entity.Right;
_entity.setIsFacing(_entity.Right);
_entity._isPushing = false;
_hasMovedHor = true;
_entity.startAnimating(Game.Hero.ANMIMATIONS.Run.start, Game.Hero.ANMIMATIONS.Run.end, 32, Game.Hero.ANMIMATIONS.Run.loop);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_run_loop", 100, 0, 0, 2000);
}
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "MoveLeft") {
_entity._isMoving = _entity.Left;
_entity.setIsFacing(_entity.Left);
_entity._isPushing = false;
_hasMovedHor = true;
_entity.startAnimating(Game.Hero.ANMIMATIONS.Run.start, Game.Hero.ANMIMATIONS.Run.end, 32, Game.Hero.ANMIMATIONS.Run.loop);
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_run_loop", 100, 0, 0, 2000);
}
}
}
function Update() {
if (_entity.getLocationEdit()) {
_entity.RenderEntity();
return(undefined);
}
_entity._canGetKnockedDown = true;
var _local14 = _entity.getPhysics()._speedMax;
if (_entity._isMoving == _entity.Left) {
if (_entity._fx > (-_local14)) {
_entity._fx = _entity._fx - _entity.getPhysics()._acceleration;
}
} else if (_entity._isMoving == _entity.Right) {
if (_entity._fx < _local14) {
_entity._fx = _entity._fx + _entity.getPhysics()._acceleration;
}
} else {
_entity._fx = _entity._fx * _entity.getPhysics()._friction;
if ((_entity._fx > (-_entity.getPhysics()._acceleration)) && (_entity._fx < _entity.getPhysics()._acceleration)) {
_entity._fx = 0;
if (_hasMovedHor) {
_hasMovedHor = false;
_entity._hasPopped = false;
_entity._isPushing = false;
_gameData.getSoundModule().StopSound("hero_run_loop");
if (_entity._isMagnetActive && (!_entity._isMagnetStuck)) {
_entity.setHeroMagnetAnimation();
} else if (_entity._hasPopped == false) {
var _local16 = Math.random() * 100;
if (_local16 < 15) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Idle.start, Game.Hero.ANMIMATIONS.Idle.end, 32, Game.Hero.ANMIMATIONS.Idle.loop);
} else {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Idle2.start, Game.Hero.ANMIMATIONS.Idle2.end, 32, Game.Hero.ANMIMATIONS.Idle2.loop);
}
}
}
}
}
if (_entity._fy < _entity.getPhysics()._fallMax) {
_entity._fy = _entity._fy + _entity.getPhysics()._gravity;
}
var _local13;
var _local15;
_local13 = _entity.getBody()._curPos;
_local15 = _entity.getBody()._oldPos;
_local15._vx = _local13._vx;
_local15._vy = _local13._vy;
_local13._vx = _local13._vx + _entity._fx;
_local13._vy = _local13._vy + _entity._fy;
var _local11 = _gameData.getColArray();
var _local10 = _gameData.getNumColGameObjects();
var _local5 = 0;
while (_local5 < _local10) {
var _local3 = _local11[_local5];
if ((_local3.getActive() && (!_local3.getIsMultiVector())) && (_local3._class != Game.GameData.RAIL)) {
_entity.getBody().CollideVsTile(_local3.getHitShape());
} else if (_local3.getActive() && (_local3.getIsMultiVector())) {
var _local6 = _local3.getVectorArray();
var _local8 = _local6.length;
var _local2 = 0;
while (_local2 < _local8) {
_entity.getBody().CollideVsTile(_local6[_local2]);
_local2++;
}
}
_local5++;
}
_entity.setHeadPosition();
_entity.setMagnetPosition();
if (_entity._isMagnetActive) {
var _local12 = _gameData._metalGameObjs.length;
_local5 = 0;
while (_local5 < _local12) {
var _local3 = _gameData._metalGameObjs[_local5];
if (_local3.getActive() && (_local3.getOnScreen())) {
_entity.getMagnet().CollideVsTile(_local3.getHitShape());
}
if (_entity._isAttractedToPlat) {
_entity.setNextState(Game.AIStates.Hero_AttractToPlatform);
}
_local5++;
}
var _local9 = _gameData._railGameObjs.length;
var _local7 = 0;
while (_local7 < _local9) {
var _local4 = _gameData._railGameObjs[_local7];
if (_local4.getActive() && (_local4.getOnScreen())) {
if (_entity._isAttractedToRail) {
_entity.setNextState(Game.AIStates.Hero_AttractToRail);
} else if (!_entity._isMagnetStuck) {
_entity.getMagnet().CollideVsLine(_local4.getShape());
}
}
_local7++;
}
}
_entity.getBody().CollideVsWorldBounds();
if (_entity._fy > 0) {
_hasMovedVer = true;
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("hero_run_loop")) {
_gameData.getSoundModule().StopSound("hero_run_loop");
}
if (_entity._hasPopped == false) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.JumpAirDown.start, Game.Hero.ANMIMATIONS.JumpAirDown.end, 32, Game.Hero.ANMIMATIONS.JumpAirDown.loop);
}
if (_entity.getOnPlatform()) {
_entity.setOnPlatform(false);
}
} else if (_hasMovedVer) {
if (_entity._hasJustSpawned) {
_entity._hasJustSpawned = false;
} else if (_entity._hasJumped) {
_entity._hasJumped = false;
} else {
_gameContext.getGameData().getSoundModule().PlaySound("hero_land", 100, 0, 0, 0);
}
if (_entity.getIsMoving() == _entity.None) {
_entity._hasPopped = false;
_entity._fx = 0;
_hasMovedHor = false;
_gameData.getSoundModule().StopSound("hero_run_loop");
if (_entity._isMagnetActive && (!_entity._isMagnetStuck)) {
_entity.setHeroMagnetAnimation();
} else {
var _local16 = Math.random() * 100;
if (_local16 < 15) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Idle.start, Game.Hero.ANMIMATIONS.Idle.end, 32, Game.Hero.ANMIMATIONS.Idle.loop);
} else {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Idle2.start, Game.Hero.ANMIMATIONS.Idle2.end, 32, Game.Hero.ANMIMATIONS.Idle2.loop);
}
}
} else {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Run.start, Game.Hero.ANMIMATIONS.Run.end, 32, Game.Hero.ANMIMATIONS.Run.loop);
}
_hasMovedVer = false;
_entity._isPushing = false;
}
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
_entity.RenderEntity();
return(undefined);
}
function Exit() {
_gameData.getSoundModule().StopSound("hero_run_loop");
return(undefined);
}
function toString() {
return("Hero_Walk()");
}
}
Symbol 1686 MovieClip [__Packages.Game.AIStates.Hero_Jump] Frame 0
class Game.AIStates.Hero_Jump extends Base.AIState
{
var _entity, _gameContext, _jumpTimer, _hasLanded, _falling;
function Hero_Jump (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._isPushing = false;
_entity._hasJumped = true;
_entity.setOnPlatform(false);
_entity._isMoving = _entity.Jump;
_entity.startAnimating(Game.Hero.ANMIMATIONS.JumpUp.start, Game.Hero.ANMIMATIONS.JumpUp.end, 32, Game.Hero.ANMIMATIONS.JumpUp.loop);
_gameContext.getGameData().getSoundModule().PlaySound("hero_jump", 100, 0, 0, 0);
_jumpTimer = 0;
_hasLanded = false;
_falling = false;
return(undefined);
}
function PadInput(gameContext) {
if (_gameContext.getPadManager().getKeyActionHeld("Magnetize")) {
} else if (_entity._isMagnetActive) {
_entity.magnetStop();
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Magnetize") {
if (_entity._isPushing == false) {
_entity.magnetStart();
}
}
if (gameContext.getPadManager().getCurrentKeyAction() == "Jump") {
_jumpTimer = 0.1;
}
if (gameContext.getPadManager().getKeyActionHeld("MoveLeft")) {
_entity._isMoving = _entity.Left;
} else if (gameContext.getPadManager().getKeyActionHeld("MoveRight")) {
_entity._isMoving = _entity.Right;
}
if (gameContext.getPadManager().getCurrentKeyAction() == "MoveRight") {
_entity._fx = 0;
_entity._isMoving = _entity.Right;
_entity.setIsFacing(_entity.Right);
}
if (gameContext.getPadManager().getCurrentKeyAction() == "MoveLeft") {
_entity._fx = 0;
_entity._isMoving = _entity.Left;
_entity.setIsFacing(_entity.Left);
}
}
function Update(gameContext) {
if (_hasLanded) {
_entity.setNextState(Game.AIStates.Hero_Walk);
}
if (_jumpTimer >= 0) {
_jumpTimer = _jumpTimer - gameContext.getDT();
}
if (_entity._isMoving == _entity.Left) {
if (_entity._fx > (-_entity.getPhysics()._speedMax)) {
_entity._fx = _entity._fx - _entity.getPhysics()._acceleration;
}
} else if (_entity._isMoving == _entity.Right) {
if (_entity._fx < _entity.getPhysics()._speedMax) {
_entity._fx = _entity._fx + _entity.getPhysics()._acceleration;
}
} else {
_entity._fx = _entity._fx * _entity.getPhysics()._friction;
if ((_entity._fx > (-_entity.getPhysics()._acceleration)) && (_entity._fx < _entity.getPhysics()._acceleration)) {
_entity._fx = 0;
}
}
if (_entity.getOnPlatform()) {
if (_jumpTimer > 0) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_land", 100, 0, 0, 0);
_entity._fy = -_entity.getPhysics()._jumpStrength;
Entry(gameContext);
return(undefined);
}
if (!_hasLanded) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_land", 100, 0, 0, 0);
}
_entity.startAnimating(Game.Hero.ANMIMATIONS.JumpLand.start, Game.Hero.ANMIMATIONS.JumpLand.end, 32, Game.Hero.ANMIMATIONS.JumpLand.loop);
_hasLanded = true;
}
if (_entity._fy < _entity.getPhysics()._fallMax) {
_entity._fy = _entity._fy + _entity.getPhysics()._gravity;
}
if ((_entity._fy > 0) && (!_falling)) {
_falling = true;
_entity.startAnimating(Game.Hero.ANMIMATIONS.JumpAirDown.start, Game.Hero.ANMIMATIONS.JumpAirDown.end, 32, Game.Hero.ANMIMATIONS.JumpAirDown.loop);
}
var _local12 = _entity.getBody()._curPos;
var _local13 = _entity.getBody()._oldPos;
_local13._vx = _local12._vx;
_local13._vy = _local12._vy;
_local12._vx = _local12._vx + _entity._fx;
_local12._vy = _local12._vy + _entity._fy;
_entity.setHeadPosition();
_entity.setMagnetPosition();
var _local10 = gameContext.getGameData().getColArray();
var _local5 = 0;
while (_local5 < gameContext.getGameData().getNumColGameObjects()) {
var _local3 = _local10[_local5];
if (_local3.getActive() && (!_local3.getIsMultiVector())) {
_entity.getBody().CollideVsTile(_local3.getHitShape());
} else if (_local3.getActive() && (_local3.getIsMultiVector())) {
var _local7 = _local3.getVectorArray();
var _local2 = 0;
while (_local2 < _local3.getNumVectors()) {
_entity.getBody().CollideVsTile(_local7[_local2]);
_local2++;
}
}
_local5++;
}
if (_entity._isMagnetActive) {
var _local9 = gameContext.getGameData()._railGameObjs.length;
var _local6 = 0;
while (_local6 < _local9) {
var _local4 = gameContext.getGameData()._railGameObjs[_local6];
if (_local4.getActive() && (_local4.getOnScreen())) {
if (_entity._isAttractedToRail) {
_entity.setNextState(Game.AIStates.Hero_AttractToRail);
} else if (!_entity._isMagnetStuck) {
_entity.getMagnet().CollideVsLine(_local4.getShape());
}
}
_local6++;
}
var _local11 = gameContext.getGameData()._metalGameObjs.length;
_local5 = 0;
while (_local5 < _local11) {
var _local3 = gameContext.getGameData()._metalGameObjs[_local5];
if (_local3.getActive() && (_local3.getOnScreen())) {
_entity.getMagnet().CollideVsTile(_local3.getHitShape());
}
if (_entity._isAttractedToPlat) {
_entity.setNextState(Game.AIStates.Hero_AttractToPlatform);
}
_local5++;
}
}
_entity.getBody().CollideVsWorldBounds();
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
_entity.RenderEntity();
return(undefined);
}
function Exit(gameContext) {
return(undefined);
}
function toString(Void) {
return("Hero_Jump()");
}
}
Symbol 1687 MovieClip [__Packages.Game.AIStates.Hero_AttractToRail] Frame 0
class Game.AIStates.Hero_AttractToRail extends Base.AIState
{
var _entity, _gameContext, _gameData, _accel, _accelX, _accelY, _accelMax;
function Hero_AttractToRail (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_accel = 5;
_accelX = 0;
_accelY = 0;
_accelMax = 25;
_entity.setOnPlatform(false);
_entity.startAnimating(Game.Hero.ANMIMATIONS.RailAttract.start, Game.Hero.ANMIMATIONS.RailAttract.end, 32, Game.Hero.ANMIMATIONS.RailAttract.loop);
return(undefined);
}
function PadInput() {
if ((!_entity.getLocationEdit()) && (_entity.getPlayMode())) {
if (_gameContext.getPadManager().getKeyActionHeld("Magnetize")) {
} else if (_entity._isMagnetActive) {
_entity.magnetStop();
}
if ((_gameContext.getPadManager().getCurrentKeyAction() == "Magnetize") && (!_entity.getdamageTimerActive())) {
_entity.magnetStart();
}
if ((_gameContext.getPadManager().getCurrentKeyActionHeld() == "Jump") && (_gameContext.getPadManager().getTimeKeyActionHeld() < 0.1)) {
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Jump") {
}
}
}
function Update() {
if (_entity._isMagnetActive && (!_entity._isMagnetStuck)) {
var _local8;
var _local16;
_local8 = _entity.getHead()._curPos;
_local16 = _entity.getHead()._oldPos;
_local16._vx = _local8._vx;
_local16._vy = _local8._vy;
var _local18 = Math.round(_local8._vx - _entity._attRail.x);
var _local17 = Math.round(_local8._vy - _entity._attRail.y);
var _local9 = -Math.atan2(_local18, _local17);
if (_accelX < _accelMax) {
_accelX = _accelX + _accel;
}
if (_accelY < _accelMax) {
_accelY = _accelY + _accel;
}
var _local10 = _accelMax / 2;
if ((((_local8._vx >= (_entity._attRail.x - _local10)) && (_local8._vx <= (_entity._attRail.x + _local10))) && (_local8._vy <= (_entity._attRail.y + _local10))) && (_local8._vy >= (_entity._attRail.y - _local10))) {
_local8._vx = _entity._attRail.x;
_local8._vy = _entity._attRail.y;
_entity.initRailRide();
} else if ((_local8._vx >= (_entity._attRail.x - _local10)) && (_local8._vx <= (_entity._attRail.x + _local10))) {
if (_accelX > _accel) {
_local8._vx = _entity._attRail.x;
}
var _local13 = (-_accelY) * Math.cos(_local9);
if (Math.abs(_local13) >= Math.abs(_entity._fy)) {
_entity._fy = _local13;
} else {
var _local15 = Math.floor(Math.abs(_entity._fy / Math.cos(_local9)));
_accelY = _local15;
_entity._fy = (-_accelY) * Math.cos(_local9);
}
_local8._vy = _local8._vy + _entity._fy;
} else if ((_local8._vy <= (_entity._attRail.y + _local10)) && (_local8._vy >= (_entity._attRail.y - _local10))) {
var _local14 = _accelX * Math.sin(_local9);
if (Math.abs(_local14) >= Math.abs(_entity._fx)) {
_entity._fx = _local14;
} else {
var _local15 = Math.floor(Math.abs(_entity._fx / Math.sin(_local9)));
_accelX = _local15;
_entity._fx = _accelX * Math.sin(_local9);
}
_local8._vx = _local8._vx + _entity._fx;
if (_accelX > _accel) {
_local8._vy = _entity._attRail.y;
}
} else {
var _local14 = _accelX * Math.sin(_local9);
if (Math.abs(_local14) >= Math.abs(_entity._fx)) {
_entity._fx = _local14;
}
var _local13 = (-_accelY) * Math.cos(_local9);
if (Math.abs(_local13) >= Math.abs(_entity._fy)) {
_entity._fy = _local13;
}
_local8._vx = _local8._vx + _entity._fx;
_local8._vy = _local8._vy + _entity._fy;
}
_entity.setMagnetPosition();
_entity.setBodyPosition();
var _local12 = _gameData.getColArray();
var _local5 = 0;
while (_local5 < _gameData.getNumColGameObjects()) {
var _local2 = _local12[_local5];
if ((_local2.getActive() && (!_local2.getIsMultiVector())) && (_local2._class != Game.GameData.RAIL)) {
_entity.getBody().CollideVsTile(_local2.getHitShape());
} else if (_local2.getActive() && (_local2.getIsMultiVector())) {
var _local7 = _local2.getVectorArray();
var _local3 = 0;
while (_local3 < _local2.getNumVectors()) {
_entity.getBody().CollideVsTile(_local7[_local3]);
_local3++;
}
}
_local5++;
}
_entity.setHeadPosition();
_entity.setMagnetPosition();
var _local11 = _gameData._railGameObjs.length;
var _local6 = 0;
while (_local6 < _local11) {
var _local4 = _gameData._railGameObjs[_local6];
if (_local4.getActive() && (_local4.getOnScreen())) {
_entity.getMagnet().CollideVsLine(_local4.getShape());
_entity.getHead().CollideVsLine(_local4.getShape());
}
_local6++;
}
_entity.getBody().CollideVsWorldBounds();
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
_entity.RenderEntity();
return(undefined);
}
if (_entity._isStuckToRail) {
_entity.setNextState(Game.AIStates.Hero_RideOnRail);
} else {
_entity.setNextState(Game.AIStates.Hero_Walk);
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Hero_AttractToRail()");
}
}
Symbol 1688 MovieClip [__Packages.Game.AIStates.Hero_RideOnRail] Frame 0
class Game.AIStates.Hero_RideOnRail extends Base.AIState
{
var _entity, _gameContext, _gameData, _newRotation, _startFlip, _flipped, _isPlayingRideAnim, _thisRail;
function Hero_RideOnRail (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_entity._fx = 0;
_entity._fy = 0;
_newRotation = 0;
_startFlip = false;
_flipped = _entity._shouldStartFlipped;
_isPlayingRideAnim = false;
_thisRail = _entity._curRail;
_entity.startAnimating(Game.Hero.ANMIMATIONS.RailRideHeadUp.start, Game.Hero.ANMIMATIONS.RailRideHeadUp.end, 32, Game.Hero.ANMIMATIONS.RailRideHeadUp.loop);
return(undefined);
}
function PadInput() {
if (_gameContext.getPadManager().getKeyActionHeld("Magnetize")) {
} else if (_entity._isMagnetActive) {
_entity.magnetStop();
}
if ((_gameContext.getPadManager().getCurrentKeyAction() == "Magnetize") && (!_entity.getdamageTimerActive())) {
_entity.magnetStart();
}
if ((_gameContext.getPadManager().getCurrentKeyActionHeld() == "Jump") && (_gameContext.getPadManager().getTimeKeyActionHeld() < 0.1)) {
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Jump") {
_startFlip = true;
_entity.startAnimating(Game.Hero.ANMIMATIONS.RailFlipStart.start, Game.Hero.ANMIMATIONS.RailFlipStart.end, 32, Game.Hero.ANMIMATIONS.RailFlipStart.loop);
}
}
function Update() {
if (_entity._isMagnetActive) {
if (_startFlip) {
var _local14 = _entity.animateSprite();
if (_local14 == 1) {
_flipped = _flipped * -1;
_startFlip = false;
_entity.startAnimating(Game.Hero.ANMIMATIONS.RailRideHeadUp.start, Game.Hero.ANMIMATIONS.RailRideHeadUp.end, 32, Game.Hero.ANMIMATIONS.RailRideHeadUp.loop);
}
}
var _local8 = _gameData._railGameObjs.length;
var _local6 = 0;
while (_local6 < _local8) {
var _local4 = _gameData._railGameObjs[_local6];
if (_local4.getActive() && (_local4.getOnScreen())) {
_entity.getMagnet().CollideVsLine(_local4.getShape());
}
_local6++;
}
var _local18 = _entity._sMagnet.getCurrentPosition()._vx;
var _local16 = _entity._sMagnet.getCurrentPosition()._vy;
var _local10 = _entity._curRail.followPoints();
if (_thisRail._isLastPoint) {
if (_entity._nxtRail == undefined) {
_entity.magnetStop();
} else {
_entity.switchRails();
}
}
if ((_local10.x >= 0) && (_local10.y >= 0)) {
_entity._sMagnet.getCurrentPosition()._vx = _local10.x;
_entity._sMagnet.getCurrentPosition()._vy = _local10.y;
var _local13 = _entity._sMagnet.getCurrentPosition()._vx - _local18;
var _local12 = _entity._sMagnet.getCurrentPosition()._vy - _local16;
_newRotation = (Math.atan2(_local12, _local13) * 180) / Math.PI;
if (_thisRail._signx != 0) {
if (_thisRail._signx < 0) {
if (_flipped > 0) {
_entity.setIsFacing(-_thisRail._signx);
} else {
_newRotation = _newRotation + 180;
_entity.setIsFacing(_thisRail._signx);
}
} else if (_flipped > 0) {
_entity.setIsFacing(_thisRail._signx);
} else {
_newRotation = _newRotation + 180;
_entity.setIsFacing(-_thisRail._signx);
}
} else {
if (_flipped < 0) {
_newRotation = _newRotation + 180;
}
if (_local12 < 0) {
_entity.setIsFacing(_thisRail._signy * (-_flipped));
} else {
_entity.setIsFacing(_thisRail._signy * _flipped);
}
}
_entity.setRotation(_newRotation);
var _local11 = ((_newRotation + 90) * Math.PI) / 180;
var _local17 = 40 * Math.cos(_local11);
var _local15 = 40 * Math.sin(_local11);
_entity._sHead.setNewPosition(_entity._sMagnet.getCurrentPosition()._vx, _entity._sMagnet.getCurrentPosition()._vy);
_entity._sBody.setNewPosition(_entity._sHead._curPos._vx + _local17, _entity._sHead._curPos._vy + _local15);
if (!_isPlayingRideAnim) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.RailRideHeadUp.start, Game.Hero.ANMIMATIONS.RailRideHeadUp.end, 32, Game.Hero.ANMIMATIONS.RailRideHeadUp.loop);
_isPlayingRideAnim = true;
}
}
_thisRail = ((_thisRail != _entity._curRail) ? (_entity._curRail) : (_thisRail));
var _local9 = _gameData.getColArray();
var _local5 = 0;
while (_local5 < _gameData.getNumColGameObjects()) {
var _local2 = _local9[_local5];
if ((_local2.getActive() && (!_local2.getIsMultiVector())) && (_local2._class != Game.GameData.RAIL)) {
_entity.getBody().CollideVsTile(_local2.getHitShape());
} else if (_local2.getActive() && (_local2.getIsMultiVector())) {
var _local7 = _local2.getVectorArray();
var _local3 = 0;
while (_local3 < _local2.getNumVectors()) {
_entity.getBody().CollideVsTile(_local7[_local3]);
_local3++;
}
}
_local5++;
}
_entity.getBody().CollideVsWorldBounds();
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
_entity.RenderEntity();
return(undefined);
}
_entity._hasPopped = true;
_entity.popOffRail();
_entity.setNextState(Game.AIStates.Hero_Walk);
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Hero_RideOnRail()");
}
}
Symbol 1689 MovieClip [__Packages.Game.AIStates.Hero_AttractToPlatform] Frame 0
class Game.AIStates.Hero_AttractToPlatform extends Base.AIState
{
var _entity, _gameContext, _gameData;
function Hero_AttractToPlatform (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_entity.setOnPlatform(false);
_entity.startAnimating(Game.Hero.ANMIMATIONS.RailAttract.start, Game.Hero.ANMIMATIONS.RailAttract.end, 32, Game.Hero.ANMIMATIONS.RailAttract.loop);
return(undefined);
}
function PadInput() {
if ((!_entity.getLocationEdit()) && (_entity.getPlayMode())) {
if (_gameContext.getPadManager().getKeyActionHeld("Magnetize")) {
} else if (_entity._isMagnetActive) {
_entity.magnetStop();
}
if ((_gameContext.getPadManager().getCurrentKeyAction() == "Magnetize") && (!_entity.getdamageTimerActive())) {
_entity.magnetStart();
}
if ((_gameContext.getPadManager().getCurrentKeyActionHeld() == "Jump") && (_gameContext.getPadManager().getTimeKeyActionHeld() < 0.1)) {
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Jump") {
}
}
}
function Update() {
if (_entity._isMagnetActive && (!_entity._isMagnetStuck)) {
var _local6;
var _local9;
_local6 = _entity.getHead()._curPos;
_local9 = _entity.getHead()._oldPos;
_local9._vx = _local6._vx;
_local9._vy = _local6._vy;
var _local8 = 5;
var _local12 = Math.round(_entity._curPlatAttract._curPos._vx - _local6._vx);
var _local11 = Math.round(_entity._curPlatAttract._curPos._vy - _local6._vy);
var _local10 = Math.atan2(_local12, _local11);
_entity._fx = _entity._fx + Math.round(_local8 * Math.sin(_local10));
_entity._fy = _entity._fy + Math.round(_local8 * Math.cos(_local10));
_local6._vx = _local6._vx + _entity._fx;
_local6._vy = _local6._vy + _entity._fy;
_entity.setMagnetPosition();
_entity.setBodyPosition();
var _local7 = _gameData.getColArray();
var _local4 = 0;
while (_local4 < _gameData.getNumColGameObjects()) {
var _local2 = _local7[_local4];
if ((_local2.getActive() && (!_local2.getIsMultiVector())) && (_local2._class != Game.GameData.RAIL)) {
_entity.getBody().CollideVsTile(_local2.getHitShape());
} else if (_local2.getActive() && (_local2.getIsMultiVector())) {
var _local5 = _local2.getVectorArray();
var _local3 = 0;
while (_local3 < _local2.getNumVectors()) {
_entity.getBody().CollideVsTile(_local5[_local3]);
_local3++;
}
}
_local4++;
}
_entity.getHead().CollideVsTile(_entity._curPlatAttract);
_entity.getBody().CollideVsWorldBounds();
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
_entity.RenderEntity();
return(undefined);
}
if (_entity._isStuckToPlat) {
_entity.setNextState(Game.AIStates.Hero_StickToPlatform);
} else {
_entity.setNextState(Game.AIStates.Hero_Walk);
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Hero_AttractToPlatform()");
}
}
Symbol 1690 MovieClip [__Packages.Game.AIStates.Hero_StickToPlatform] Frame 0
class Game.AIStates.Hero_StickToPlatform extends Base.AIState
{
var _entity, _gameContext, _gameData;
function Hero_StickToPlatform (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_entity._fx = 0;
_entity._fy = 0;
_entity.startAnimating(Game.Hero.ANMIMATIONS.RailRideHeadUp.start, Game.Hero.ANMIMATIONS.RailRideHeadUp.end, 32, Game.Hero.ANMIMATIONS.RailRideHeadUp.loop);
return(undefined);
}
function PadInput() {
if (_gameContext.getPadManager().getKeyActionHeld("Magnetize")) {
} else if (_entity._isMagnetActive) {
_entity.magnetStop();
}
if ((_gameContext.getPadManager().getCurrentKeyAction() == "Magnetize") && (!_entity.getdamageTimerActive())) {
_entity.magnetStart();
}
if ((_gameContext.getPadManager().getCurrentKeyActionHeld() == "Jump") && (_gameContext.getPadManager().getTimeKeyActionHeld() < 0.1)) {
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Jump") {
}
}
function Update() {
if (_entity._isMagnetActive) {
var _local7;
_local7 = _entity.getHead()._curPos;
_local7._vx = _entity._curPlatAttract._curPos._vx;
_local7._vy = _entity._curPlatAttract._curPos._vy;
_entity.setMagnetPosition();
_entity.setBodyPosition();
var _local6 = _gameData.getColArray();
var _local4 = 0;
while (_local4 < _gameData.getNumColGameObjects()) {
var _local2 = _local6[_local4];
if ((_local2.getActive() && (!_local2.getIsMultiVector())) && (_local2._class != Game.GameData.RAIL)) {
_entity.getBody().CollideVsTile(_local2.getHitShape());
} else if (_local2.getActive() && (_local2.getIsMultiVector())) {
var _local5 = _local2.getVectorArray();
var _local3 = 0;
while (_local3 < _local2.getNumVectors()) {
_entity.getBody().CollideVsTile(_local5[_local3]);
_local3++;
}
}
_local4++;
}
_entity.getBody().CollideVsWorldBounds();
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
_entity.RenderEntity();
return(undefined);
}
_entity._hasPopped = true;
_entity.setNextState(Game.AIStates.Hero_Walk);
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Hero_StickToPlatform()");
}
}
Symbol 1691 MovieClip [__Packages.Game.AIStates.Hero_Die] Frame 0
class Game.AIStates.Hero_Die extends Base.AIState
{
var _entity, _gameContext, _spriteMotionLines, _spriteBlackScreen, _spriteDeathTube, fx, fy, _accel, _stage, target, spawnX, spawnY, _counter, _delay;
function Hero_Die (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_spriteMotionLines = new Base.SpriteEntity(_gameContext, 1, 1, "motionLines", "motionLines", 3000, 0, 0, 1, -1, -1);
_spriteBlackScreen = new Base.SpriteEntity(_gameContext, 1, 1, "scrn_Black", "blackscreen", 3010, 300, 200, 1, -1, -1);
_spriteDeathTube = new Base.SpriteEntity(_gameContext, 1, 1, "deathtube", "deathtube", 3020, 200, 0, 1, -1, -1);
fx = 0;
fy = 0;
_accel = 0;
_entity._hasJustSpawned = true;
_entity.startAnimating(Game.Hero.ANMIMATIONS.HitDie.start, Game.Hero.ANMIMATIONS.HitDie.end, 32, Game.Hero.ANMIMATIONS.HitDie.loop);
_entity.playHitSpark(3, _entity.getIsFacing() * -1);
_spriteMotionLines.startAnimating(1, 10, 32, false);
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
switch (_stage) {
case 1 :
_spriteMotionLines.animateSprite();
var _local14 = _entity.animateSprite();
if (_local14 == 1) {
_spriteBlackScreen.startAnimating(1, 10, 32, false);
_stage++;
}
break;
case 2 :
_entity.animateSprite();
_spriteBlackScreen.animateSprite();
_local14 = _spriteMotionLines.animateSprite();
if (_local14 == 1) {
_stage++;
}
break;
case 3 :
_spriteBlackScreen.animateSprite();
_spriteDeathTube.startAnimating(1, 30, 32, false);
_stage++;
break;
case 4 :
_entity.animateSprite();
_spriteBlackScreen.animateSprite();
_local14 = _spriteDeathTube.animateSprite();
if (_local14 == 1) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.Death.start, Game.Hero.ANMIMATIONS.Death.end, 32, Game.Hero.ANMIMATIONS.Death.loop);
_stage++;
}
break;
case 5 :
_local14 = _entity.animateSprite();
if (_local14 == 1) {
target = new flash.geom.Point(170, 120);
_gameContext.getGameData().getBuffer().globalToLocal(target);
_gameContext.getGameData().getSoundModule().PlaySound("her_vacuum_suck", 100, 0, 0, 0);
_stage++;
}
break;
case 6 :
_entity.animateSprite();
if (_accel < 14) {
_accel = _accel + 2;
}
var _local16 = _entity._spriteHero.getPositionX() - target.x;
var _local15 = _entity._spriteHero.getPositionY() - target.y;
var _local12 = (-Math.atan2(_local16, _local15)) / (Math.PI/180);
var _local9 = _accel * Math.sin(_local12 * (Math.PI/180));
var _local8 = _accel * Math.cos(_local12 * (Math.PI/180));
var _local11 = _entity._spriteHero.getPositionX() + _local9;
var _local10 = _entity._spriteHero.getPositionY() - _local8;
if (_local10 <= (target.y + 50)) {
_entity._spriteHero.setVisibility(false);
_entity.setIsFacing(1);
_accel = 0;
_stage++;
}
_entity._spriteHero.setPosition(_local11, _local10);
break;
case 7 :
var _local6 = _gameContext.getGameData().getCurrentCheckpoint();
if (_local6 == undefined) {
spawnX = _gameContext.getGameData()._heroSpawnPosX;
spawnY = _gameContext.getGameData()._heroSpawnPosY;
} else {
spawnX = _local6.getHitShape()._curPos._vx;
spawnY = _local6.getHitShape()._curPos._vy - 100;
}
_stage++;
break;
case 8 :
if (_accel < 50) {
_accel = _accel + 5;
}
_local16 = _entity._sBody._curPos._vx - spawnX;
_local15 = _entity._sBody._curPos._vy - spawnY;
_local12 = (-Math.atan2(_local16, _local15)) / (Math.PI/180);
_local9 = _accel * Math.sin(_local12 * (Math.PI/180));
_local8 = _accel * Math.cos(_local12 * (Math.PI/180));
_local11 = _entity._sBody._curPos._vx + _local9;
_local10 = _entity._sBody._curPos._vy - _local8;
if ((((_local11 <= (spawnX + 60)) && (_local11 >= (spawnX - 60))) && (_local10 <= (spawnY + 60))) && (_local10 >= (spawnY - 60))) {
_entity._sBody._curPos._vx = spawnX;
_entity._sBody._curPos._vy = spawnY;
_entity.setHeadPosition();
_entity.setMagnetPosition();
_accel = 0;
_counter = 0;
_delay = 45;
_gameContext.getGameData().getSoundModule().PlaySound("her_vacuum_blow", 100, 0, 0, 0);
_stage++;
return(undefined);
}
_entity._sBody.setNewPosition(_local11, _local10);
break;
case 9 :
_counter++;
if (_counter >= _delay) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.RespawnStart.start, Game.Hero.ANMIMATIONS.RespawnStart.end, 32, Game.Hero.ANMIMATIONS.RespawnStart.loop);
_entity._spriteHero.setVisibility(true);
_entity.setOnPlatform(false);
_gameContext.getGameData().getSoundModule().PlaySound("her_vacuum_blow", 100, 0, 0, 0);
_gameContext.getGameData().resetHealth();
_stage++;
}
break;
case 10 :
_entity._fy = 12;
_entity._fx = 0;
var _local7;
var _local13;
_local7 = _entity.getBody()._curPos;
_local13 = _entity.getBody()._oldPos;
_local13._vx = _local7._vx;
_local13._vy = _local7._vy;
_local7._vx = _local7._vx + _entity._fx;
_local7._vy = _local7._vy + _entity._fy;
var _local5 = _gameContext.getGameData().getColArray();
var _local4 = _gameContext.getGameData().getNumColGameObjects();
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = _local5[_local3];
if (_local2.getActive() && (_local2._class == Game.GameData.PLATFORM)) {
_entity.getBody().CollideVsTile(_local2.getHitShape());
}
_local3++;
}
_entity.setHeadPosition();
_entity.setMagnetPosition();
if (_entity.getOnPlatform()) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.RespawnEnd.start, Game.Hero.ANMIMATIONS.RespawnEnd.end, 32, Game.Hero.ANMIMATIONS.RespawnEnd.loop);
_stage++;
}
_entity.RenderEntity();
break;
case 11 :
_local14 = _entity.animateSprite();
if (_local14 == 1) {
_spriteDeathTube.startAnimating(36, 50, 32, false);
_stage++;
}
_entity.RenderEntity();
break;
case 12 :
_local14 = _spriteDeathTube.animateSprite();
if (_local14 != 1) {
break;
}
_gameContext.getGameData().respawnEnemies();
_gameContext.getGameData().toggleForceRedraw(true);
_spriteDeathTube.removeSprite();
delete _spriteDeathTube;
_spriteMotionLines.removeSprite();
delete _spriteMotionLines;
_spriteBlackScreen.removeSprite();
delete _spriteBlackScreen;
_entity.setNextState(Game.AIStates.Hero_Walk);
}
_entity.isDamageTimeUp();
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Hero_Die()");
}
}
Symbol 1692 MovieClip [__Packages.Game.Platform] Frame 0
class Game.Platform extends Base.Entity
{
var _gameContext, _gameData, _class, _type, _idx, _xw, _yw, _curPosition, _isActive, _isOnScreen, _isCollidable, _isMoveable, _isMoving, _moveSpeed, _initDirection, _curDirection, _isSlave, _isMaster, _isMetal, _reqUpdate, _isON, _doorOpen, _curMapArea, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _sprites, _unitXW, _unitYW, _minXW, _minYW, _maxNumUnitsY, _maxNumUnitsX, _numUnitsMinY, _numUnitsMinX, _numUnitsX, _numUnitsY, _isCloud, _leftStop, _rightStop, _spawnPos, _shape, _hitShape, setNextState, _lineColor, _fillColor, _multiShape, _shapes, _xScaleable, _yScaleable, _triggerItem, _slavePlatform, _homeFrame, _masterPlatform, _doorOpenFrame;
function Platform (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super(gameContext, 0, idx, false, false, null);
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_class = Game.GameData.PLATFORM;
_type = ntype;
_idx = idx;
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = true;
_isOnScreen = false;
_isCollidable = true;
_isMoveable = false;
_isMoving = false;
_moveSpeed = 10;
_initDirection = 0;
_curDirection = 0;
_isSlave = false;
_isMaster = false;
_isMetal = false;
_reqUpdate = false;
_isON = false;
_doorOpen = false;
_curMapArea = _gameData.getCurrentMapArea();
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_sprites = [];
var _local2;
var _local3 = null;
switch (_type) {
case Game.GameData.CLOUD :
_unitXW = 100;
_unitYW = 32;
_minXW = 100;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
break;
case Game.GameData.MOVEABLE1 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
var _local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_leftStop, _curPosition._vy);
_initDirection = 1;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Move;
break;
case Game.GameData.MOVEABLE2 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_rightStop, _curPosition._vy);
_initDirection = -1;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Move;
break;
case Game.GameData.MOVEABLE3 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_leftStop, _curPosition._vy);
_initDirection = 1;
_isMetal = true;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Move;
break;
case Game.GameData.MOVEABLE4 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_rightStop, _curPosition._vy);
_initDirection = -1;
_isMetal = true;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Move;
break;
case Game.GameData.MOVEABLE5 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_leftStop, _curPosition._vy);
_initDirection = 1;
_isSlave = true;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.MOVEABLE6 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_rightStop, _curPosition._vy);
_initDirection = -1;
_isSlave = true;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.MOVEABLE7 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_leftStop, _curPosition._vy);
_initDirection = 1;
_isSlave = true;
_isMetal = true;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.MOVEABLE8 :
_unitXW = 100;
_unitYW = 32;
_minXW = 130;
_minYW = 32;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local5 = 50;
_leftStop = _curPosition._vx - ((_xw / 2) - _local5);
_rightStop = _curPosition._vx + ((_xw / 2) - _local5);
_spawnPos = new Base.VectorCoord(_rightStop, _curPosition._vy);
_initDirection = -1;
_isSlave = true;
_isMetal = true;
_isMoveable = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.BLOCK_L :
_unitXW = 100;
_unitYW = 100;
_minXW = 100;
_minYW = 100;
_maxNumUnitsY = null;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
break;
case Game.GameData.BLOCK_M :
_unitXW = 48;
_unitYW = 20;
_minXW = 64;
_minYW = 52;
_maxNumUnitsY = null;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
break;
case Game.GameData.BLOCK_S :
_unitXW = 50;
_unitYW = 50;
_minXW = 50;
_minYW = 50;
_xw = _minXW;
_yw = _minYW;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
break;
case Game.GameData.WALL :
_unitXW = 40;
_unitYW = 50;
_minXW = 40;
_minYW = 50;
_xw = _minXW;
_maxNumUnitsY = null;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
break;
case Game.GameData.DOOR1 :
_unitXW = 40;
_unitYW = 130;
_minXW = 40;
_minYW = 130;
_xw = _minXW;
_yw = _minYW;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
_isSlave = true;
_reqUpdate = true;
_local3 = Game.AIStates.PlatDoor_Close;
break;
case Game.GameData.DOOR2 :
_unitXW = 40;
_unitYW = 130;
_minXW = 40;
_minYW = 130;
_xw = _minXW;
_yw = _minYW;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
_isSlave = true;
_reqUpdate = true;
_local3 = Game.AIStates.PlatDoor_Close;
break;
case Game.GameData.DOOR3 :
_unitXW = 40;
_unitYW = 130;
_minXW = 40;
_minYW = 130;
_xw = _minXW;
_yw = _minYW;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
_isSlave = true;
_reqUpdate = true;
_local3 = Game.AIStates.PlatDoor_Close;
break;
case Game.GameData.SWITCH1 :
_unitXW = 60;
_unitYW = 15;
_minXW = 60;
_minYW = 15;
_yw = 125;
_curPosition._vy = _curPosition._vy - 62.5;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_isMaster = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.SWITCH2 :
_unitXW = 60;
_unitYW = 15;
_minXW = 60;
_minYW = 15;
_yw = 125;
_curPosition._vy = _curPosition._vy - 62.5;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_isMaster = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.SWITCH3 :
_unitXW = 60;
_unitYW = 15;
_minXW = 60;
_minYW = 15;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_yw = 125;
_curPosition._vy = _curPosition._vy - 62.5;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_isMaster = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.SWITCH4 :
_unitXW = 60;
_unitYW = 15;
_minXW = 60;
_minYW = 15;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_yw = 125;
_curPosition._vy = _curPosition._vy - 62.5;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_isMaster = true;
_reqUpdate = true;
_local3 = Game.AIStates.Plat_Idle;
break;
case Game.GameData.CHECKPOINT :
_unitXW = 67;
_unitYW = 145;
_minXW = 67;
_minYW = 145;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local3 = null;
break;
case Game.GameData.EXITDOOR :
_unitXW = _xw;
_unitYW = _yw;
_minXW = _xw;
_minYW = _yw;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = true;
_local2 = Base.ShapeEntity.TID_AABB;
_local3 = null;
break;
case Game.GameData.GROUND :
_unitXW = 600;
_unitYW = 40;
_minXW = 600;
_minYW = 40;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isCloud = false;
_local2 = Base.ShapeEntity.TID_AABB;
}
if (_gameData.getGameMode() == Game.GameData.GAME_PLAY) {
if (_isMoveable) {
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _xw / 2, _xw, _yw, this, _local2, _gameData.getGraphics(), true);
_hitShape = new Base.ShapeEntity(_gameContext, _spawnPos, _minXW / 2, _minXW, _minYW, this, _local2, _gameData.getGraphics(), true);
} else {
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _xw / 2, _xw, _yw, this, _local2, _gameData.getGraphics(), true);
_hitShape = _shape;
}
createSprites();
setNextState(_local3);
} else if (_gameData.getGameMode() == Game.GameData.GAME_EDIT) {
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _xw / 2, _xw, _yw, this, _local2, _gameData.getGraphics(), true);
var _local4 = _gameData.getPlatformColor(_type);
_lineColor = _local4[0];
_fillColor = _local4[1];
}
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_shape);
}
function getHitShape() {
return(_hitShape);
}
function getIsMultiVector() {
return(_multiShape);
}
function getVectorArray() {
return(_shapes);
}
function getNumVectors() {
return(_shapes.length);
}
function setActive(bToggle) {
_isActive = bToggle;
}
function getActive() {
return(_isActive);
}
function setCollidable(bToggle) {
_isCollidable = bToggle;
}
function getCollidable() {
return(_isCollidable);
}
function getOnScreen() {
return(_isOnScreen);
}
function setOnScreen(bToggle) {
_isOnScreen = bToggle;
toggleSprites(_isOnScreen);
if ((_type == Game.GameData.EXITDOOR) && (_gameContext.getGameData().getHero()._hasJustSpawned == false)) {
switch (_isOnScreen) {
case true :
openExitDoor();
break;
case false :
closeExitDoor();
}
}
}
function getReqUpdate() {
return(_reqUpdate);
}
function getIsCloud() {
return(_isCloud);
}
function getScaleableX() {
return(_xScaleable);
}
function getScaleableY() {
return(_yScaleable);
}
function getLocationEdit() {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
}
function getSizeEditX() {
return(_isSizeEditX);
}
function setSizeEditX(bToggle) {
_isSizeEditX = bToggle;
}
function getSizeEditY() {
return(_isSizeEditY);
}
function setSizeEditY(bToggle) {
_isSizeEditY = bToggle;
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
}
function getIsSelected() {
return(_editSelected);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getUnitXW() {
return(_unitXW);
}
function getUnitYW() {
return(_unitYW);
}
function getMinXW() {
return(_minXW);
}
function getMinYW() {
return(_minYW);
}
function getNumUnitsX() {
return(_numUnitsX);
}
function toggleMasterSwitch(bTog, item) {
if (_isON == bTog) {
return(undefined);
}
if (bTog == false) {
if (_triggerItem == item) {
_isON = bTog;
_triggerItem = null;
_slavePlatform.toggleSlaveSwitch(_isON);
_sprites[0].gotoAndStop(_homeFrame);
_gameContext.getGameData().getSoundModule().PlaySound("switch_deactivate", 100, 0, 0, 0);
}
} else {
_isON = bTog;
_triggerItem = item;
_slavePlatform.toggleSlaveSwitch(_isON);
_sprites[0].gotoAndPlay(10);
_gameContext.getGameData().getSoundModule().PlaySound("switch_activate", 100, 0, 0, 0);
}
}
function isMasterSwitchOn() {
return(_isON);
}
function toggleSlaveSwitch(bTog) {
if (_isON == bTog) {
return(undefined);
}
_isON = bTog;
}
function setSlavePlatform(platToControl) {
_masterPlatform = this;
_slavePlatform = platToControl;
_slavePlatform.setMasterPlatform(this);
}
function setMasterPlatform(platToObey) {
_slavePlatform = this;
_masterPlatform = platToObey;
}
function toggleSprites(bVisible) {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2]._visible = bVisible;
_local2++;
}
return(undefined);
}
function createSprites() {
switch (_type) {
case Game.GameData.CLOUD :
var _local11 = 44;
_numUnitsX = _xw / _unitXW;
if (_numUnitsX > 2) {
var _local7 = _gameData.getBuffer().attachMovie("plat_cloud_left", _idx + "plat_cloud_left", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - _local11;
_local7._x = getShape().getMinX();
_sprites.push(_local7);
var _local5 = getShape().getMinX() + _unitXW;
var _local13 = random(7) + 2;
var _local8 = _numUnitsX - 2;
var _local15 = 0;
var _local14 = Boolean((((_local8 > 2) && (Math.random() < 0.5)) && (DECORATE_PLATFORMS)) && (_curMapArea == "a"));
var _local4 = 0;
while (_local4 < _local8) {
_local7 = _gameData.getBuffer().attachMovie("plat_cloud_middle", (_idx + "plat_cloud_middle") + _local4, _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - _local11;
_local7._x = _local5 + (_local4 * _unitXW);
_sprites.push(_local7);
_local4++;
}
_local7 = _gameData.getBuffer().attachMovie("plat_cloud_right", _idx + "_a_plat3", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - _local11;
_local7._x = getShape().getMaxX() - _unitXW;
_sprites.push(_local7);
} else if (_numUnitsX > 1) {
var _local7 = _gameData.getBuffer().attachMovie("plat_cloud_left", _idx + "plat_cloud_left", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - _local11;
_local7._x = getShape().getMinX();
_sprites.push(_local7);
_local7 = _gameData.getBuffer().attachMovie("plat_cloud_right", _idx + "_a_plat3", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - _local11;
_local7._x = getShape().getMaxX() - _unitXW;
_sprites.push(_local7);
} else {
var _local7 = _gameData.getBuffer().attachMovie("plat_cloud_left", _idx + "_a_plat_single", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - _local11;
_local7._x = getShape().getCurrentPosition()._vx;
_sprites.push(_local7);
}
break;
case Game.GameData.MOVEABLE1 :
createMoveableBackgrounds();
_local11 = 44;
var _local7 = _gameData.getBuffer().attachMovie("plat_moving_norm", _idx + "plat_moving_norm", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.MOVEABLE2 :
createMoveableBackgrounds();
_local7 = _gameData.getBuffer().attachMovie("plat_moving_norm", _idx + "plat_moving_norm", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.MOVEABLE5 :
createMoveableBackgrounds();
_local11 = 44;
_local7 = _gameData.getBuffer().attachMovie("plat_moving_norm", _idx + "plat_moving_norm", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.MOVEABLE6 :
createMoveableBackgrounds();
_local7 = _gameData.getBuffer().attachMovie("plat_moving_norm", _idx + "plat_moving_norm", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.MOVEABLE3 :
createMoveableBackgrounds();
_local11 = 44;
_local7 = _gameData.getBuffer().attachMovie("plat_moving_mag", _idx + "plat_moving_mag", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.MOVEABLE4 :
createMoveableBackgrounds();
_local7 = _gameData.getBuffer().attachMovie("plat_moving_mag", _idx + "plat_moving_mag", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.MOVEABLE7 :
createMoveableBackgrounds();
_local11 = 44;
_local7 = _gameData.getBuffer().attachMovie("plat_moving_mag", _idx + "plat_moving_mag", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.MOVEABLE8 :
createMoveableBackgrounds();
_local7 = _gameData.getBuffer().attachMovie("plat_moving_mag", _idx + "plat_moving_mag", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getHitShape().getCurrentPosition()._vx;
_local7._y = getHitShape().getCurrentPosition()._vy - _local11;
_sprites.push(_local7);
_sprites.reverse();
break;
case Game.GameData.BLOCK_L :
_numUnitsX = Math.floor(_xw / _unitXW);
_numUnitsY = Math.floor(_yw / _unitYW);
var _local5 = getShape().getMinX();
var _local9 = getShape().getMinY();
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_L", _idx + "plat_blockLG_L", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getMinX();
_local7._y = getShape().getMinY();
_sprites.push(_local7);
var _local4 = 0;
while (_local4 < (_numUnitsX - 1)) {
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_M", (_idx + "plat_blockLG_M") + _local4, _gameData.getBuffer().getNextHighestDepth());
_local7._x = _local5 + (_local4 * _unitXW);
_local7._y = getShape().getMinY();
_sprites.push(_local7);
_local4++;
}
if (_numUnitsY > 1) {
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_Rtop", _idx + "plat_blockLG_Rtop", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getMaxX() - 100;
_local7._y = getShape().getMinY();
_sprites.push(_local7);
} else {
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_Rsingle", _idx + "plat_blockLG_Rsingle", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getMaxX() - 100;
_local7._y = getShape().getMinY();
_sprites.push(_local7);
}
var _local3 = 0;
while (_local3 < _numUnitsY) {
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_L", _idx + "plat_blockLG_L", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getMinX();
_local7._y = _local9 + (_local3 * _unitYW);
_sprites.push(_local7);
var _local2 = 0;
while (_local2 < (_numUnitsX - 1)) {
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_M", (_idx + "plat_blockLG_M") + _local2, _gameData.getBuffer().getNextHighestDepth());
_local7._x = _local5 + (_local2 * _unitXW);
_local7._y = _local9 + (_local3 * _unitYW);
_sprites.push(_local7);
_local2++;
}
if (_local3 < (_numUnitsY - 1)) {
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_Rmid", _idx + "plat_blockLG_Rmid", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getMaxX() - 100;
_local7._y = _local9 + (_local3 * _unitYW);
_sprites.push(_local7);
} else {
_local7 = _gameData.getBuffer().attachMovie("plat_blockLG_Rbot", _idx + "plat_blockLG_Rbot", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getMaxX() - 100;
_local7._y = _local9 + (_local3 * _unitYW);
_sprites.push(_local7);
}
_local3++;
}
break;
case Game.GameData.BLOCK_M :
break;
case Game.GameData.BLOCK_S :
_local7 = _gameData.getBuffer().attachMovie("Block_Lip", _idx + "Block_Lip", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx;
_local7._y = getShape().getCurrentPosition()._vy;
_sprites.push(_local7);
break;
case Game.GameData.WALL :
_numUnitsY = _yw / _unitYW;
var _local10 = (((_numUnitsY % 1) != 0) ? true : false);
_numUnitsY = Math.floor(_yw / _unitYW);
if (_numUnitsY > 2) {
_local7 = _gameData.getBuffer().attachMovie("plat_wall_bottomDoor", _idx + "_wall_bottomDoor", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getMaxY();
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
_local9 = getShape().getMaxY() - 50;
var _local6;
_local4 = 0;
while (_local4 < (_numUnitsY - 1)) {
_local7 = _gameData.getBuffer().attachMovie("plat_wall_middle", (_idx + "_wall_mid") + _local4, _gameData.getBuffer().getNextHighestDepth());
_local6 = _local9 + (_local4 * (-_unitYW));
_local7._y = _local6;
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
_local4++;
}
if (_local10) {
_local7 = _gameData.getBuffer().attachMovie("plat_wall_middleHalf", _idx + "_wall_midHalf", _gameData.getBuffer().getNextHighestDepth());
_local7._y = _local6 + -50;
_local6 = _local6 + -25;
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
}
_local7 = _gameData.getBuffer().attachMovie("plat_wall_top", _idx + "_wall_top", _gameData.getBuffer().getNextHighestDepth());
_local7._y = _local6 - 50;
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
} else if (_numUnitsY > 1) {
_local9 = getShape().getMaxY() - 50;
_local7 = _gameData.getBuffer().attachMovie("plat_wall_bottomDoor", _idx + "plat_wall_bottomDoor", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getMaxY();
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
if (_local10) {
_local7 = _gameData.getBuffer().attachMovie("plat_wall_middleHalf", _idx + "_wall_midHalf", _gameData.getBuffer().getNextHighestDepth());
_local7._y = _local9;
_local9 = _local9 + 25;
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
} else {
_local7 = _gameData.getBuffer().attachMovie("plat_wall_middle", _idx + "_wall_mid", _gameData.getBuffer().getNextHighestDepth());
_local7._y = _local9;
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
}
_local7 = _gameData.getBuffer().attachMovie("plat_wall_top", _idx + "_a_wall_top", _gameData.getBuffer().getNextHighestDepth());
_local7._y = _local9 - 50;
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
} else {
_local7 = _gameData.getBuffer().attachMovie("plat_wall_bottomDoor", _idx + "plat_wall_bottomDoor", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getMaxY();
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
_local7 = _gameData.getBuffer().attachMovie("plat_wall_top", _idx + "_a_wall_top", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getMaxY() - 50;
_local7._x = getShape().getCurrentPosition()._vx - 20;
_sprites.push(_local7);
}
break;
case Game.GameData.GROUND :
_numUnitsX = _xw / _unitXW;
if (_numUnitsX > 2) {
_local4 = 0;
while (_local4 < _numUnitsX) {
_local7 = _gameData.getBuffer().attachMovie("plat_ground", _idx + "plat_ground", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - 69;
_local7._x = _local4 * _unitXW;
_sprites.push(_local7);
_local4++;
}
} else {
_local7 = _gameData.getBuffer().attachMovie("plat_ground", _idx + "plat_ground", _gameData.getBuffer().getNextHighestDepth());
_local7._y = getShape().getCurrentPosition()._vy - 69;
_local7._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_sprites.push(_local7);
}
break;
case Game.GameData.DOOR1 :
_local7 = _gameData.getBuffer().attachMovie("plat_door_Back", _idx + "plat_door_Back", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx - 20;
_local7._y = getShape().getCurrentPosition()._vy - ((_yw / 2) + 15);
_local7.gotoAndStop(1);
_sprites.push(_local7);
_local7 = _gameData.getBuffer().attachMovie("plat_door_Front", _idx + "plat_door_Front", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx - 20;
_local7._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local7);
break;
case Game.GameData.DOOR2 :
_local7 = _gameData.getBuffer().attachMovie("plat_door_Back", _idx + "plat_door_Back", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx - 20;
_local7._y = getShape().getCurrentPosition()._vy - ((_yw / 2) + 15);
_local7.gotoAndStop(11);
_sprites.push(_local7);
_local7 = _gameData.getBuffer().attachMovie("plat_door_Front", _idx + "plat_door_Front", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx - 20;
_local7._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local7);
break;
case Game.GameData.DOOR3 :
_local7 = _gameData.getBuffer().attachMovie("plat_door_Back", _idx + "plat_door_Back", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx - 20;
_local7._y = getShape().getCurrentPosition()._vy - ((_yw / 2) + 15);
_local7.gotoAndStop(21);
_sprites.push(_local7);
_local7 = _gameData.getBuffer().attachMovie("plat_door_Front", _idx + "plat_door_Front", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx - 20;
_local7._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local7);
break;
case Game.GameData.SWITCH1 :
_local7 = _gameData.getBuffer().attachMovie("plat_switch", _idx + "plat_switch", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx;
_local7._y = getShape().getCurrentPosition()._vy + 62.5;
_homeFrame = 1;
_local7.gotoAndStop(_homeFrame);
_sprites.push(_local7);
break;
case Game.GameData.SWITCH2 :
_local7 = _gameData.getBuffer().attachMovie("plat_switch", _idx + "plat_switch", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx;
_local7._y = getShape().getCurrentPosition()._vy + 62.5;
_homeFrame = 2;
_local7.gotoAndStop(_homeFrame);
_sprites.push(_local7);
break;
case Game.GameData.SWITCH3 :
_local7 = _gameData.getBuffer().attachMovie("plat_switch", _idx + "plat_switch", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx;
_local7._y = getShape().getCurrentPosition()._vy + 62.5;
_homeFrame = 3;
_local7.gotoAndStop(_homeFrame);
_sprites.push(_local7);
break;
case Game.GameData.SWITCH4 :
_local7 = _gameData.getBuffer().attachMovie("plat_switch", _idx + "plat_switch", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx;
_local7._y = getShape().getCurrentPosition()._vy + 62.5;
_homeFrame = 3;
_local7.gotoAndStop(_homeFrame);
_sprites.push(_local7);
break;
case Game.GameData.CHECKPOINT :
_local7 = _gameData.getBuffer().attachMovie("Flag_checkpoint", _idx + "Flag_checkpoint", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx;
_local7._y = getShape().getCurrentPosition()._vy + ((_yw / 2) - 10);
_local7.gotoAndStop(1);
_sprites.push(_local7);
break;
case Game.GameData.EXITDOOR :
_local7 = _gameData.getBuffer().attachMovie("End_Door", _idx + "End_Door", _gameData.getBuffer().getNextHighestDepth());
_local7._x = getShape().getCurrentPosition()._vx;
_local7._y = getShape().getCurrentPosition()._vy;
var _local12 = _gameData.getCurrentLevel();
switch (_local12) {
case 1 :
_doorOpenFrame = 1;
_local7.gotoAndStop(1);
break;
case 2 :
_doorOpenFrame = 15;
_local7.gotoAndStop(15);
break;
case 3 :
_doorOpenFrame = 29;
_local7.gotoAndStop(29);
}
_sprites.push(_local7);
_gameData.setExitDoor(_local7);
}
toggleSprites(false);
}
function openExitDoor() {
if (!_doorOpen) {
_sprites[0].gotoAndPlay(_doorOpenFrame);
_doorOpen = true;
}
}
function closeExitDoor() {
if (_doorOpen) {
_sprites[0].gotoAndStop(_doorOpenFrame);
_doorOpen = false;
}
}
function raiseFlag() {
if (_sprites[0]._currentframe == 1) {
_gameContext.getGameData().getSoundModule().PlaySound("hero_checkpoint", 100, 0, 0, 0);
_sprites[0].play();
}
}
function resetCheckpoint() {
_sprites[0].gotoAndStop(1);
}
function layerDoorFront() {
_sprites[1].swapDepths(_gameData.getBuffer().getNextHighestDepth());
}
function swapBottomWallTile() {
var _local2 = _sprites[0];
var _local6 = _local2.getDepth();
var _local5 = _local2._x;
var _local4 = _local2._y;
_local2.removeMovieClip();
var _local3 = _gameData.getBuffer().attachMovie("plat_wall_bottom", _idx + "_plat_wall_bot", _local6);
_local3._x = _local5;
_local3._y = _local4;
_sprites.splice(0, 1, _local3);
}
function swapBottomBlockTile() {
var _local4 = _sprites[0];
var _local7 = _local4.getDepth();
var _local6 = _local4._x;
var _local5 = _local4._y;
var _local3;
var _local8 = _sprites.length - (_numUnitsX + 1);
var _local2 = _local8;
while (_local2 < _sprites.length) {
_local3 = "";
if (_sprites[_local2]._name.indexOf("plat_blockLG_L") != -1) {
_local3 = "plat_blockLG_L_ALT";
}
if (_sprites[_local2]._name.indexOf("plat_blockLG_M") != -1) {
_local3 = "plat_blockLG_M_ALT";
}
if (_sprites[_local2]._name.indexOf("plat_blockLG_Rbot") != -1) {
_local3 = "plat_blockLG_Rbot_ALT";
}
if (_sprites[_local2]._name.indexOf("plat_blockLG_Rsingle") != -1) {
_local3 = "plat_blockLG_Rsingle_ALT";
}
if (_local3.length > 0) {
_local4 = _sprites[_local2];
_local7 = _local4.getDepth();
_local6 = _local4._x;
_local5 = _local4._y;
_local4.removeMovieClip();
_sprites[_local2] = _gameData.getBuffer().attachMovie(_local3, _idx + _local3, _local7);
_sprites[_local2]._x = _local6;
_sprites[_local2]._y = _local5;
}
_local2++;
}
}
function createMoveableBackgrounds() {
_numUnitsX = _xw / _unitXW;
var _local3 = _gameData.getBuffer().attachMovie("plat_moving_Rail_noSw_left", _idx + "plat_moving_Rail_noSw_left", _gameData.getBuffer().getNextHighestDepth());
_local3._y = getShape().getCurrentPosition()._vy - 44;
_local3._x = getShape().getMinX();
_sprites.push(_local3);
var _local5 = getShape().getMinX();
var _local4;
var _local2 = 0;
while (_local2 < _numUnitsX) {
_local3 = _gameData.getBuffer().attachMovie("plat_moving_Rail_mid", (_idx + "plat_moving_Rail_mid") + _local2, _gameData.getBuffer().getNextHighestDepth());
_local4 = _local5 + (_local2 * _unitXW);
_local3._y = getShape().getCurrentPosition()._vy - 44;
_local3._x = _local4;
_sprites.push(_local3);
_local2++;
}
_local3 = _gameData.getBuffer().attachMovie("plat_moving_Rail_noSw_right", _idx + "plat_moving_Rail_noSw_right", _gameData.getBuffer().getNextHighestDepth());
_local3._y = getShape().getCurrentPosition()._vy - 44;
_local3._x = _local4 + _unitXW;
_sprites.push(_local3);
}
function fixLeftEdge() {
var _local2 = _sprites[0];
var _local5 = _local2.getDepth();
var _local4 = _local2._x;
var _local3 = _local2._y;
_local2.removeMovieClip();
_sprites[0] = _gameData.getBuffer().attachMovie("plat_ground", _idx + "plat_ground", _local5);
_sprites[0]._x = _local4;
_sprites[0]._y = _local3;
}
function fixRightEdge() {
var _local2 = _sprites[_sprites.length - 1];
var _local5 = _local2.getDepth();
var _local4 = _local2._x;
var _local3 = _local2._y;
_local2.removeMovieClip();
_sprites[_sprites.length - 1] = _gameData.getBuffer().attachMovie("plat_ground", _idx + "plat_ground", _local5);
_sprites[_sprites.length - 1]._x = _local4;
_sprites[_sprites.length - 1]._y = _local3;
}
function deleteSprites() {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2].removeMovieClip();
_local2++;
}
return(undefined);
}
function updateSpritePositions() {
_sprites[0]._x = getHitShape().getCurrentPosition()._vx;
_sprites[0]._y = getHitShape().getCurrentPosition()._vy - 44;
}
function RenderEntity() {
if (_editSelected) {
_lineColor = 0;
} else {
var _local2 = _gameData.getPlatformColor(_type);
_lineColor = _local2[0];
}
_shape.Draw();
if (_maxNumUnitsY == null) {
_shape.DrawScaler("y");
_yScaleable = true;
}
if (_maxNumUnitsX == null) {
_shape.DrawScaler("x");
_xScaleable = true;
}
}
function getName() {
switch (_type) {
case Game.GameData.CLOUD :
return(("Cloud(" + _idx) + ")");
case Game.GameData.MOVEABLE1 :
return(("Mv LR(" + _idx) + ")");
case Game.GameData.MOVEABLE2 :
return(("Mv LR(" + _idx) + ")");
case Game.GameData.MOVEABLE3 :
return(("MvMag RL(" + _idx) + ")");
case Game.GameData.MOVEABLE4 :
return(("MvMag LR(" + _idx) + ")");
case Game.GameData.MOVEABLE5 :
return(("MvSw RL(" + _idx) + ")");
case Game.GameData.MOVEABLE6 :
return(("MvSw LR(" + _idx) + ")");
case Game.GameData.MOVEABLE7 :
return(("MvSwMag LR(" + _idx) + ")");
case Game.GameData.MOVEABLE8 :
return(("MvSwMag RL(" + _idx) + ")");
case Game.GameData.BLOCK_L :
return(("Block l(" + _idx) + ")");
case Game.GameData.BLOCK_M :
return(("Block m(" + _idx) + ")");
case Game.GameData.BLOCK_S :
return(("Block s(" + _idx) + ")");
case Game.GameData.WALL :
return(("Wall(" + _idx) + ")");
case Game.GameData.DOOR1 :
return(("Door1(" + _idx) + ")");
case Game.GameData.DOOR2 :
return(("Door2(" + _idx) + ")");
case Game.GameData.DOOR3 :
return(("Door3(" + _idx) + ")");
case Game.GameData.SWITCH1 :
return(("Swtch1(" + _idx) + ")");
case Game.GameData.SWITCH2 :
return(("Swtch2(" + _idx) + ")");
case Game.GameData.SWITCH3 :
return(("Swtch3(" + _idx) + ")");
case Game.GameData.SWITCH4 :
return(("Swtch4(" + _idx) + ")");
case Game.GameData.GROUND :
return(("Grnd(" + _idx) + ")");
}
}
function toString() {
return(("Platform(" + getName()) + ")");
}
var DECORATE_PLATFORMS = false;
}
Symbol 1693 MovieClip [__Packages.Game.Item] Frame 0
class Game.Item extends Base.Entity
{
var _gameContext, _idx, _type, _class, _xw, _yw, _curPosition, _spawnPos, _isActive, _isOnScreen, _isCollidable, _reqUpdate, _gameMode, _hitSoundActive, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _isTowing, _isStuckToMagnet, _isAttractedToMagnet, _knockedOffMagnet, _onFloor, _onPlatform, _isCollideOn, _myCollideObjs, _fx, _fy, _isAbsorbed, _sprites, _unitXW, _unitYW, _minXW, _minYW, _rad, _maxNumUnitsY, _maxNumUnitsX, _numUnitsMinY, _numUnitsMinX, _numUnitsX, _numUnitsY, _spriteOffx, _spriteOffy, _blockSize, _isMetal, _physics, _shape, _lineColor, _fillColor, _multiShape, _shapes, _playMode, _xScaleable, _yScaleable, _spriteShadow, setNextState, getCurrentState;
function Item (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super(gameContext, 0, idx, false, false, Game.AIStates.Item_Static);
_gameContext = gameContext;
_idx = idx;
_type = ntype;
_class = Game.GameData.ITEM;
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
_spawnPos = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = true;
_isOnScreen = false;
_isCollidable = true;
_reqUpdate = true;
_gameMode = _gameContext.getGameData().getGameMode();
_hitSoundActive = false;
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_isTowing = false;
_isStuckToMagnet = false;
_isAttractedToMagnet = false;
_knockedOffMagnet = false;
_onFloor = false;
_onPlatform = true;
_isCollideOn = false;
_myCollideObjs = [];
_fx = 0;
_fy = 0;
_isAbsorbed = false;
_sprites = [];
var _local2;
switch (_type) {
case Game.GameData.ITEM_GUN :
_unitXW = 36;
_unitYW = 36;
_minXW = 36;
_minYW = 36;
_rad = 16;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_spriteOffx = 0;
_spriteOffy = 0;
_blockSize = 1;
_isMetal = true;
_physics = {_acceleration:5, _speed:1, _speedMin:0.2, _speedMax:20, _friction:0.99, _groundFr:0.8, _gravity:2, _bounce:0.8, _jumpStrength:0, _fallMax:8};
_local2 = Base.ShapeEntity.TID_CIRCLE;
break;
case Game.GameData.ITEM_BOX :
_unitXW = 70;
_unitYW = 70;
_minXW = 74;
_minYW = 66;
_rad = 37;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_spriteOffx = -5;
_spriteOffy = 0;
_isMetal = true;
_blockSize = 2;
_physics = {_acceleration:2, _speed:1, _speedMin:0.2, _speedMax:30, _friction:0.99, _groundFr:0.85, _gravity:3, _bounce:0.8, _jumpStrength:0, _fallMax:12};
_local2 = Base.ShapeEntity.TID_AABB;
break;
case Game.GameData.GSPIKE :
_unitXW = 70;
_unitYW = 70;
_minXW = 70;
_minYW = 70;
_rad = 35;
_xw = 70;
_yw = 70;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_isMetal = true;
_blockSize = 3;
_physics = {_acceleration:2, _speed:1, _speedMin:0.2, _speedMax:30, _friction:0.99, _groundFr:0.9, _gravity:3, _bounce:0.8, _jumpStrength:0, _fallMax:12};
_local2 = Base.ShapeEntity.TID_CIRCLE;
}
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _rad, _minXW, _minYW, this, _local2, _gameContext.getGameData().getGraphics(), true);
if (_gameMode == Game.GameData.GAME_PLAY) {
createSprites();
} else if (_gameMode == Game.GameData.GAME_EDIT) {
_lineColor = 0;
_fillColor = 13421772 /* 0xCCCCCC */;
}
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_shape);
}
function getHitShape() {
return(_shape);
}
function getIsMultiVector() {
return(_multiShape);
}
function getVectorArray() {
return(_shapes);
}
function getNumVectors() {
return(_shapes.length);
}
function setActive(bToggle) {
_isActive = bToggle;
}
function getActive() {
return(_isActive);
}
function setCollidable(bToggle) {
_isCollidable = bToggle;
}
function getCollidable() {
return(_isCollidable);
}
function getOnScreen() {
return(_isOnScreen);
}
function setOnScreen(bToggle) {
_isOnScreen = bToggle;
if ((!_isAbsorbed) && (_isOnScreen)) {
toggleSprites(true);
} else if (!_isOnScreen) {
toggleSprites(false);
}
}
function getReqUpdate() {
return(_reqUpdate);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getUnitXW() {
return(_unitXW);
}
function getUnitYW() {
return(_unitYW);
}
function getMinXW() {
return(_minXW);
}
function getMinYW() {
return(_minYW);
}
function getPlayMode(Void) {
return(_playMode);
}
function setPlayMode(bToggle) {
_playMode = bToggle;
}
function getScaleableX(Void) {
return(_xScaleable);
}
function getScaleableY(Void) {
return(_yScaleable);
}
function getLocationEdit(Void) {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
return(undefined);
}
function getSizeEditX(Void) {
return(_isSizeEditX);
}
function setSizeEditX(bToggle) {
_isSizeEditX = bToggle;
return(undefined);
}
function getSizeEditY(Void) {
return(_isSizeEditY);
}
function setSizeEditY(bToggle) {
_isSizeEditY = bToggle;
return(undefined);
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
return(undefined);
}
function getIsSelected(Void) {
return(_editSelected);
}
function createSprites() {
switch (_type) {
case Game.GameData.ITEM_GUN :
var _local2 = _gameContext.getGameData().getBuffer().attachMovie("item_Gun", _idx + "item_Gun", _gameContext.getGameData().getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - _spriteOffx;
_local2._y = getShape().getCurrentPosition()._vy - _spriteOffy;
_local2.gotoAndStop(1);
_local2._visible = false;
_sprites.push(_local2);
break;
case Game.GameData.ITEM_BOX :
_local2 = _gameContext.getGameData().getBuffer().attachMovie("item_Box", _idx + "item_Box", _gameContext.getGameData().getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - _spriteOffx;
_local2._y = getShape().getCurrentPosition()._vy - _spriteOffy;
_local2.gotoAndStop(1);
_local2._visible = false;
_sprites.push(_local2);
break;
case Game.GameData.GSPIKE :
_local2 = _gameContext.getGameData().getBuffer().attachMovie("spike_grndBall", _idx + "spike_grndBall", _gameContext.getGameData().getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx;
_local2._y = getShape().getCurrentPosition()._vy;
_local2.gotoAndStop(1);
_sprites.push(_local2);
}
}
function toggleSprites(bVisible) {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2]._visible = bVisible;
_local2++;
}
return(undefined);
}
function updateSpritePositions() {
switch (_type) {
case Game.GameData.GSPIKE :
_sprites[0]._x = getShape().getCurrentPosition()._vx;
_sprites[0]._y = getShape().getCurrentPosition()._vy;
break;
default :
_sprites[0]._x = getShape().getCurrentPosition()._vx - _spriteOffx;
_sprites[0]._y = getShape().getCurrentPosition()._vy - _spriteOffy;
}
return(undefined);
}
function layerItem() {
_sprites[0].swapDepths(_gameContext.getGameData().getBuffer().getNextHighestDepth());
}
function deleteSprites() {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2].removeMovieClip();
_local2++;
}
_spriteShadow.removeSprite();
return(undefined);
}
function shadowOn() {
_spriteShadow.setPosition(getShape().getCurrentPosition()._vx, 1950);
_spriteShadow.setVisibility(true);
}
function shadowOff() {
_spriteShadow.setVisibility(false);
}
function ReSpawn() {
_isActive = true;
_shape.setNewPosition(_spawnPos._vx, _spawnPos._vy);
_gameContext.getGameData().UpdateObjCoords(this);
updateSpritePositions();
toggleSprites(true);
setCollisionActive(true);
_hitSoundActive = false;
return(undefined);
}
function RenderEntity() {
if (!_gameMode) {
_shape.Draw();
} else {
if (_editSelected) {
_lineColor = 0;
} else {
var _local2 = _gameContext.getGameData().getPlatformColor(_type);
_lineColor = _local2[0];
}
_shape.Draw();
if (_maxNumUnitsY == null) {
_shape.DrawScaler("y");
_yScaleable = true;
}
if (_maxNumUnitsX == null) {
_shape.DrawScaler("x");
_xScaleable = true;
}
}
}
function getHitSoundActive() {
return(_hitSoundActive);
}
function setHitSoundActive(bTog) {
_hitSoundActive = bTog;
}
function getPhysics() {
return(_physics);
}
function setOnPlatform(bTog) {
_onPlatform = bTog;
}
function getOnPlatform() {
return(_onPlatform);
}
function setCollisionActive(bToggle) {
if ((!_isCollideOn) && (bToggle)) {
_myCollideObjs = [];
_myCollideObjs = _gameContext.getGameData().getObjectsBelow(this);
_isCollideOn = true;
} else if (!bToggle) {
shadowOff();
_isCollideOn = false;
}
}
function getCollisionActive() {
return(_isCollideOn);
}
function getCollideObjs() {
return(_myCollideObjs);
}
function updateCollideObjs() {
_myCollideObjs = [];
_myCollideObjs = _gameContext.getGameData().getObjectsBelow(this);
return(_myCollideObjs);
}
function moveToMagnet() {
if ((!_isAttractedToMagnet) || (!_isStuckToMagnet)) {
_isAttractedToMagnet = true;
setNextState(Game.AIStates.Item_AttractToMagnet);
}
}
function handleCollision(px, py, dx, dy, obj, tile) {
var _local4 = obj._curPos;
var _local18 = obj._oldPos;
var _local3 = _local4._vx - _local18._vx;
var _local10 = _local4._vy - _local18._vy;
var _local19 = (_local3 * dx) + (_local10 * dy);
var _local27 = _local19 * dx;
var _local25 = _local19 * dy;
var _local6 = _local3 - _local27;
var _local11 = _local10 - _local25;
var _local22 = typeof(tile);
if (_local22 != "string") {
var _local7 = tile.getOwner().getType();
var _local12 = tile.getOwner()._class;
if (_local12 == Game.GameData.ENEMY) {
switch (getType()) {
case Game.GameData.ITEM_GUN :
if (_isStuckToMagnet) {
_knockedOffMagnet = true;
}
if (_isAttractedToMagnet) {
_fx = 0;
_fy = 0;
getCurrentState()._accelX = 0;
getCurrentState()._accelY = 0;
_local4._vx = _local4._vx + (_local3 * -1);
}
if (((!_isStuckToMagnet) && (!_isAttractedToMagnet)) && (Math.abs(_local3) > 20)) {
_local4._vy = _local4._vy - _local10;
_local4._vx = _local4._vx + (_local3 * -1);
doGunBounce(_local3);
tile.getOwner().takeDamage(_local3, 1);
return(undefined);
}
_local4._vx = _local4._vx + (_local3 * -1);
break;
case Game.GameData.GSPIKE :
tile.getOwner().takeDamage(_local3, 3);
break;
case Game.GameData.ITEM_BOX :
_local4._vx = _local4._vx + (px + _local6);
}
return(undefined);
}
if (_local12 == Game.GameData.ITEM) {
if ((getType() != Game.GameData.ITEM_GUN) && (_local7 != Game.GameData.ITEM_GUN)) {
_local4._vx = _local4._vx + (px + _local6);
}
return(undefined);
}
if (_local12 == Game.GameData.PLATFORM) {
if (_local7 <= Game.GameData.DOOR3) {
if (tile.getOwner().getIsCloud()) {
var _local26 = obj.getMaxY();
var _local23 = tile.getMinY();
if ((_fy > 0) && (_local26 <= (_local23 + 5))) {
if (!getOnPlatform()) {
setOnPlatform(true);
if (_isOnScreen) {
switch (_type) {
case Game.GameData.ITEM_BOX :
if (_fy > 10) {
_gameContext.getGameData().getSoundModule().PlaySound("object_block_land", 100, 0, 0, 0);
}
break;
case Game.GameData.ITEM_GUN :
_gameContext.getGameData().getSoundModule().PlaySound("object_gun_land", 100, 0, 0, 0);
break;
case Game.GameData.GSPIKE :
if (_fy <= 10) {
break;
}
_gameContext.getGameData().getSoundModule().PlaySound("object_block_land", 100, 0, 0, 0);
}
}
}
if ((!_isAttractedToMagnet) && (!_isStuckToMagnet)) {
_sprites[0].gotoAndStop(1);
}
getCurrentState()._accelY = 0;
_fy = 0;
_local4._vy = _local4._vy + (py + _local11);
return(undefined);
}
if ((dx != 0) && (tile.getOwner()._isON == false)) {
if (((_local3 < 0) && (px <= 0)) || ((_local3 > 0) && (px >= 0))) {
_local4._vx = _local4._vx + (_local3 * -1);
} else {
_local4._vx = _local4._vx + (px + _local6);
}
_fx = 0;
getCurrentState()._accelX = 0;
if (getType() == Game.GameData.ITEM_GUN) {
setOnPlatform(false);
}
}
} else {
if (tile.getOwner()._type == Game.GameData.BLOCK_S) {
if (((_local3 < 0) && (px <= 0)) || ((_local3 > 0) && (px >= 0))) {
_local4._vx = _local4._vx + (_local3 * -1);
} else {
_local4._vx = _local4._vx + (px + _local6);
}
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("object_block_push_loop")) {
_gameContext.getGameData().getSoundModule().StopSound("object_block_push_loop");
}
_fx = 0;
getCurrentState()._accelX = 0;
return(undefined);
}
if (dy < 0) {
if (!getOnPlatform()) {
setOnPlatform(true);
if (_isOnScreen) {
switch (_type) {
case Game.GameData.ITEM_BOX :
if (_fy > 10) {
_gameContext.getGameData().getSoundModule().PlaySound("object_block_land", 100, 0, 0, 0);
}
break;
case Game.GameData.ITEM_GUN :
_gameContext.getGameData().getSoundModule().PlaySound("object_gun_land", 100, 0, 0, 0);
break;
case Game.GameData.GSPIKE :
if (_fy <= 10) {
break;
}
_gameContext.getGameData().getSoundModule().PlaySound("object_block_land", 100, 0, 0, 0);
}
}
}
if ((!_isAttractedToMagnet) && (!_isStuckToMagnet)) {
_sprites[0].gotoAndStop(1);
}
_fy = 0;
_local4._vy = _local4._vy + (py + _local11);
getCurrentState()._accelY = 0;
if ((_local7 == Game.GameData.BLOCK_L) && (_type == Game.GameData.ITEM_GUN)) {
_local4._vy = _local4._vy - 50;
setOnPlatform(false);
return(undefined);
}
return(undefined);
}
if (dx != 0) {
if (_local7 == Game.GameData.GROUND) {
return(undefined);
}
if (getOnPlatform()) {
setOnPlatform(false);
}
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("object_block_push_loop")) {
_gameContext.getGameData().getSoundModule().StopSound("object_block_push_loop");
}
if ((_type == Game.GameData.ITEM_BOX) || (_type == Game.GameData.GSPIKE)) {
if (Math.abs(px) < 4) {
}
} else if (Math.abs(_local3) > 30) {
_gameContext.getGameData().getSoundModule().PlaySound("object_gun_impact", 80, 0, 0, 0);
}
if (((_local3 < 0) && (px < 0)) || ((_local3 > 0) && (px > 0))) {
_local4._vx = _local4._vx + (_local3 * -1);
} else {
_local4._vx = _local4._vx + (px + _local6);
}
_fx = 0;
getCurrentState()._accelX = 0;
return(undefined);
}
}
} else if ((_local7 >= Game.GameData.SWITCH1) && (_local7 <= Game.GameData.SWITCH4)) {
if ((getType() == Game.GameData.ITEM_BOX) || (getType() == Game.GameData.GSPIKE)) {
var _local20 = 22;
var _local28 = 8;
var _local16 = Math.abs(_local4._vx - tile._curPos._vx);
var _local15 = Math.abs(_local4._vy - tile._curPos._vy);
if ((_local16 <= _local20) && (_local15 <= 40)) {
if (_isTowing) {
return(undefined);
}
if (_local16 <= _local28) {
_local4._vx = tile._curPos._vx;
}
if (tile.getOwner().isMasterSwitchOn()) {
return(undefined);
}
tile.getOwner().toggleMasterSwitch(true, this);
} else {
if (tile.getOwner().isMasterSwitchOn() == false) {
return(undefined);
}
tile.getOwner().toggleMasterSwitch(false, this);
}
}
return(undefined);
}
} else if (_local7 == 0) {
switch (getType()) {
case Game.GameData.ITEM_GUN :
if (tile == tile.getOwner()._sHead) {
if (_isAttractedToMagnet) {
_isStuckToMagnet = true;
}
}
break;
case Game.GameData.ITEM_BOX :
if (tile.getOwner()._isPushing == false) {
if (_isAttractedToMagnet) {
if ((tile == tile.getOwner()._sBody) || (tile == tile.getOwner()._sHead)) {
_local4._vx = _local4._vx + (px + _local6);
_gameContext.getGameData().getHero().magnetStop();
_gameContext.getGameData().getHero().doKnockDownByItem(tile.getOwner()._sBody._curPos, _local3);
doBoxBounce(_local3);
return(undefined);
}
if (tile == tile.getOwner()._sMagnet) {
var _local14 = tile.getOwner()._isMoving;
var _local29 = tile._curPos._vy - 40;
var _local24 = tile._curPos._vy + 40;
var _local21 = (((_local4._vy > _local29) && (_local4._vy < _local24)) ? true : false);
if ((_local14 != 0) && _local21) {
if (((_local3 < 0) && (_local14 < 0)) || ((_local3 > 0) && (_local14 > 0))) {
_isStuckToMagnet = true;
return(undefined);
}
}
return(undefined);
}
} else if (((tile == tile.getOwner()._sBody) || (tile == tile.getOwner()._sHead)) && (tile.getOwner()._isKnockDown == false)) {
_local4._vx = _local4._vx + (px + _local6);
if (Math.abs(_local3) > 10) {
_gameContext.getGameData().getHero().doKnockDownByItem(tile.getOwner()._sBody._curPos, _local3);
doBoxBounce(_local3);
}
return(undefined);
}
}
break;
case Game.GameData.GSPIKE :
if (_isAttractedToMagnet) {
if (tile == tile.getOwner()._sHead) {
_local4._vx = _local4._vx + (px + _local6);
_gameContext.getGameData().getHero().magnetStop();
_gameContext.getGameData().getHero().doSpikeDamage(tile.getOwner()._sBody._curPos, _local3);
doSpikeBounce(_local3);
return(undefined);
}
if (tile == tile.getOwner()._sMagnet) {
var _local14 = tile.getOwner()._isMoving;
var _local29 = tile._curPos._vy - 40;
var _local24 = tile._curPos._vy + 40;
var _local21 = (((_local4._vy > _local29) && (_local4._vy < _local24)) ? true : false);
if ((_local14 != 0) && (_local21)) {
if (((_local3 < 0) && (_local14 < 0)) || ((_local3 > 0) && (_local14 > 0))) {
tile.getOwner().magnetStuck(obj);
_isStuckToMagnet = true;
return(undefined);
}
}
}
} else {
if (tile != tile.getOwner()._sHead) {
break;
}
_local4._vx = _local4._vx + (px + _local6);
_gameContext.getGameData().getHero().doSpikeDamage(tile.getOwner()._sBody._curPos, _local3);
doSpikeBounce(_local3);
return(undefined);
}
}
return(undefined);
}
} else if (tile == "WorldBottom") {
ReSpawn();
} else if (tile == "WorldLeft") {
_local4._vx = _local4._vx + (px + _local6);
} else if (tile == "WorldRight") {
_local4._vx = _local4._vx + (px + _local6);
} else {
if (dy == 0) {
_fx = 0;
}
if (dx == 0) {
_fy = 0;
}
if (dy == -1) {
_fy = 0;
}
_local4._vx = _local4._vx + (px + _local6);
_local4._vy = _local4._vy + (py + _local11);
}
}
function doBoxBounce(vel) {
var _local6 = Math.abs(vel);
var _local3 = ((vel < 0) ? 1 : -1);
var _local2 = ((_local6 > (_physics._speedMax * 0.6)) ? 4 : 2);
var _local5 = ((_local2 > 2) ? (_local2 * _local3) : (5 * _local3));
var _local4 = ((_local2 > 2) ? ((-_local2) * 10) : -5);
if (_local4 < -5) {
_sprites[0].gotoAndPlay(30);
}
if (getOnPlatform()) {
setOnPlatform(false);
}
setCollisionActive(true);
_fx = _local5;
_fy = _local4;
return(undefined);
}
function doSpikeBounce(vel) {
var _local2 = Math.abs(vel);
var _local4 = ((vel < 0) ? 1 : -1);
var _local3 = ((_local2 > (_physics._speedMax / 2)) ? 10 : (_local2));
var _local6 = _local3 * _local4;
var _local5 = (-_local3) * 2;
if (getOnPlatform()) {
setOnPlatform(false);
}
setCollisionActive(true);
_fx = _local6;
_fy = _local5;
return(undefined);
}
function doGunBounce(vel) {
var _local3 = ((vel <= 0) ? 1 : -1);
var _local2 = 10;
var _local5 = _local2 * _local3;
var _local4 = (-_local2) * 3;
if (getOnPlatform()) {
setOnPlatform(false);
}
setCollisionActive(true);
_fx = _local5;
_fy = _local4;
return(undefined);
}
function doWallBounce(vel) {
var _local6 = Math.abs(vel);
var _local2 = ((vel < 0) ? 1 : -1);
var _local4 = 1;
var _local3 = _local4 * _local2;
var _local5 = 0;
if (getOnPlatform()) {
setOnPlatform(false);
}
setCollisionActive(true);
_fx = _local3;
_fy = 1;
return(undefined);
}
function getName() {
switch (_type) {
case Game.GameData.ITEM_GUN :
return(("Gun(" + _idx) + ")");
case Game.GameData.ITEM_BOX :
return(("Box(" + _idx) + ")");
case Game.GameData.GSPIKE :
return(("Spike(" + _idx) + ")");
}
}
function toString(Void) {
return(("Item(" + getName()) + ")");
}
}
Symbol 1694 MovieClip [__Packages.Game.AIStates.Item_Static] Frame 0
class Game.AIStates.Item_Static extends Base.AIState
{
var _entity, _gameContext, _gameData, _hasItemMovedX;
function Item_Static (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_hasItemMovedX = false;
_entity._isStuckToMagnet = false;
_entity._isAttractedToMagnet = false;
_entity.setOnPlatform(false);
_entity.setCollisionActive(true);
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if (((((_entity._fx == 0) && (_entity._fy == 0)) && (!_entity._isAttractedToMagnet)) && (_entity.getOnPlatform())) && (_entity.getCollisionActive())) {
_entity._sprites[0].gotoAndStop(1);
_entity.setCollisionActive(false);
_gameContext.getGameData().getSoundModule().StopSound("object_block_push_loop");
return(undefined);
}
if (_entity.getCollisionActive()) {
var _local7;
if (_entity.getOnPlatform()) {
_local7 = _entity.getPhysics()._groundFr;
} else {
_local7 = _entity.getPhysics()._friction;
}
_entity._fx = _entity._fx * _local7;
if ((_entity._fx > (-_entity.getPhysics()._acceleration)) && (_entity._fx < _entity.getPhysics()._acceleration)) {
_gameContext.getGameData().getSoundModule().StopSound("object_block_push_loop");
_entity._fx = 0;
}
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("object_block_push_loop")) {
var _local8 = Math.abs(_entity._fx * 10);
_gameContext.getGameData().getSoundModule().AdjustSoundVolume("object_block_push_loop", _local8);
}
if (_entity._fy <= 40) {
_entity._fy = _entity._fy + _entity.getPhysics()._gravity;
}
var _local5 = _entity.getShape()._curPos;
var _local6 = _entity.getShape()._oldPos;
_local6._vx = _local5._vx;
_local6._vy = _local5._vy;
_local5._vx = _local5._vx + _entity._fx;
_local5._vy = _local5._vy + _entity._fy;
var _local9 = Math.abs(_local5._vx - _local6._vx);
var _local4 = _entity.updateCollideObjs();
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _gameContext.getGameData().getGameObject(_local4[_local2]);
if (_local3.getCollidable()) {
_entity.getShape().CollideVsTile(_local3.getHitShape());
}
_local2++;
}
_entity.getShape().CollideVsWorldBounds();
_entity.getShape().CollideVsTile(_gameData.getHero().getHead());
_entity.getShape().setNewPosition(_local5._vx, _local5._vy);
_gameContext.getGameData().UpdateObjCoords(_entity);
_entity.updateSpritePositions();
return(undefined);
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Item_Static()");
}
}
Symbol 1695 MovieClip [__Packages.Game.AIStates.Item_AttractToMagnet] Frame 0
class Game.AIStates.Item_AttractToMagnet extends Base.AIState
{
var _entity, _gameContext, _gameData, bY, mY, _accel, _accelX, _accelY, _accelMax;
function Item_AttractToMagnet (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_entity._isStuckToMagnet = false;
_entity._isAttractedToMagnet = true;
_entity.setOnPlatform(false);
_entity.setCollisionActive(true);
bY = _entity.getShape()._curPos._vy;
mY = _entity.getShape()._curPos._vy - dY;
_accel = 10;
_accelX = 0;
_accelY = 0;
_accelMax = 50;
_entity._sprites[0].gotoAndPlay(10);
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("object_block_push_loop")) {
_gameContext.getGameData().getSoundModule().StopSound("object_block_push_loop");
}
if (!_gameContext.getGameData().getSoundModule().soundIsPlaying("magnet_object_tow_loop")) {
_gameContext.getGameData().getSoundModule().PlaySound("magnet_object_tow_loop", 100, 0, 0, 2000);
}
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if ((_gameData.getHero()._isMagnetActive == false) || (_gameData.getHero()._isMagnetStuck)) {
if (_entity._isStuckToMagnet) {
if (_entity.getType() == Game.GameData.ITEM_GUN) {
_gameContext.getGameData().getSoundModule().StopSound("magnet_object_tow_loop");
_entity.setNextState(Game.AIStates.Item_StickToMagnet);
} else if (_gameData.getHero()._isMoving != 0) {
_entity.setNextState(Game.AIStates.Item_TowFromMagnet);
} else {
_gameContext.getGameData().getSoundModule().StopSound("magnet_object_tow_loop");
_entity.setNextState(Game.AIStates.Item_Static);
}
} else {
_gameContext.getGameData().getSoundModule().StopSound("magnet_object_tow_loop");
_entity.setNextState(Game.AIStates.Item_Static);
}
return(undefined);
}
var _local3 = _entity.getShape()._curPos;
var _local11 = _entity.getShape()._oldPos;
_local11._vx = _local3._vx;
_local11._vy = _local3._vy;
var _local13 = _entity.getShape()._curPos._vx - _gameData.getHero().getHead()._curPos._vx;
var _local12 = _entity.getShape()._curPos._vy - _gameData.getHero().getHead()._curPos._vy;
var _local6 = -Math.atan2(_local13, _local12);
if (_accelX < _accelMax) {
_accelX = _accelX + _accel;
}
if (_accelY < _accelMax) {
_accelY = _accelY + _accel;
}
if (_entity._type != Game.GameData.ITEM_GUN) {
if ((_local3._vx >= (_gameData.getHero().getHead()._curPos._vx - 20)) && (_local3._vx <= (_gameData.getHero().getHead()._curPos._vx + 20))) {
_accelX = 0;
_entity._fx = 0;
_local3._vx = _gameData.getHero().getHead()._curPos._vx;
if (_entity._fy <= 20) {
_entity._fy = _entity._fy + _entity.getPhysics()._gravity;
}
_local3._vy = _local3._vy + _entity._fy;
} else {
if (_entity._fx < _entity._physics._speedMax) {
_entity._fx = _entity._fx + (_entity._physics._acceleration * Math.sin(_local6));
}
_local3._vx = _local3._vx + _entity._fx;
if (_entity._fy <= 20) {
_entity._fy = _entity._fy + _entity.getPhysics()._gravity;
}
_local3._vy = _local3._vy + _entity._fy;
}
} else {
var _local7 = _accelMax / 2;
if ((((_local3._vx >= (_gameData.getHero().getHead()._curPos._vx - _local7)) && (_local3._vx <= (_gameData.getHero().getHead()._curPos._vx + _local7))) && (_local3._vy <= (_gameData.getHero().getHead()._curPos._vy + _local7))) && (_local3._vy >= (_gameData.getHero().getHead()._curPos._vy - _local7))) {
_local3._vx = _gameData.getHero().getHead()._curPos._vx;
_local3._vy = _gameData.getHero().getHead()._curPos._vy;
} else if ((_local3._vx >= (_gameData.getHero().getHead()._curPos._vx - _local7)) && (_local3._vx <= (_gameData.getHero().getHead()._curPos._vx + _local7))) {
if (_accelX > _accel) {
_local3._vx = _gameData.getHero().getHead()._curPos._vx;
}
var _local8 = (-_accelY) * Math.cos(_local6);
if (Math.abs(_local8) >= Math.abs(_entity._fy)) {
_entity._fy = _local8;
} else {
var _local10 = Math.floor(Math.abs(_entity._fy / Math.cos(_local6)));
_accelY = _local10;
_entity._fy = (-_accelY) * Math.cos(_local6);
}
_local3._vy = _local3._vy + _entity._fy;
} else if ((_local3._vy <= (_gameData.getHero().getHead()._curPos._vy + _local7)) && (_local3._vy >= (_gameData.getHero().getHead()._curPos._vy - _local7))) {
var _local9 = _accelX * Math.sin(_local6);
if (Math.abs(_local9) >= Math.abs(_entity._fx)) {
_entity._fx = _local9;
} else {
var _local10 = Math.floor(Math.abs(_entity._fx / Math.sin(_local6)));
_accelX = _local10;
_entity._fx = _accelX * Math.sin(_local6);
}
_local3._vx = _local3._vx + _entity._fx;
if (_accelX > _accel) {
_local3._vy = _gameData.getHero().getHead()._curPos._vy;
}
} else {
var _local9 = _accelX * Math.sin(_local6);
if (Math.abs(_local9) >= Math.abs(_entity._fx)) {
_entity._fx = _local9;
}
var _local8 = (-_accelY) * Math.cos(_local6);
if (Math.abs(_local8) >= Math.abs(_entity._fy)) {
_entity._fy = _local8;
}
_local3._vx = _local3._vx + _entity._fx;
_local3._vy = _local3._vy + _entity._fy;
}
}
var _local5 = _entity.updateCollideObjs();
var _local2 = 0;
while (_local2 < _local5.length) {
var _local4 = _gameContext.getGameData().getGameObject(_local5[_local2]);
if (_local4.getCollidable()) {
_entity.getHitShape().CollideVsTile(_local4.getHitShape());
}
_local2++;
}
_entity.getShape().setNewPosition(_local3._vx, _local3._vy);
_entity._spriteMagnetRadius.animateSprite();
_entity.getShape().CollideVsTile(_gameData.getHero().getMagnet());
_entity.getShape().CollideVsTile(_gameData.getHero().getHead());
_entity.getShape().CollideVsWorldBounds();
_gameContext.getGameData().UpdateObjCoords(_entity);
_entity.updateSpritePositions();
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Item_AttractToMagnet()");
}
var dY = 5;
}
Symbol 1696 MovieClip [__Packages.Game.AIStates.Item_StickToMagnet] Frame 0
class Game.AIStates.Item_StickToMagnet extends Base.AIState
{
var _entity, _gameContext, _gameData;
function Item_StickToMagnet (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_gameContext.getGameData().getSoundModule().PlaySound("hero_gun_stick_face", 100, 0, 0, 0);
_entity._knockedOffMagnet = false;
_entity._isStuckToMagnet = true;
_entity._isAttractedToMagnet = false;
_entity.setCollisionActive(true);
_entity._sprites[0].gotoAndStop(9);
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if (_gameData.getHero()._isMagnetActive) {
var _local5 = _entity.getShape()._curPos;
var _local6 = _entity.getShape()._oldPos;
_local6._vx = _local5._vx;
_local6._vy = _local5._vy;
switch (_gameData.getHero().getIsFacing()) {
case _gameData.getHero().Right :
_local5._vx = _gameData.getHero().getHead()._curPos._vx + 10;
_entity._sprites[0]._xscale = -100;
break;
case _gameData.getHero().Left :
_local5._vx = _gameData.getHero().getHead()._curPos._vx - 10;
_entity._sprites[0]._xscale = 100;
}
_local5._vy = _gameData.getHero().getHead()._curPos._vy;
var _local4 = _entity.updateCollideObjs();
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _gameContext.getGameData().getGameObject(_local4[_local2]);
if (_local3.getCollidable()) {
_entity.getShape().CollideVsTile(_local3.getHitShape());
}
_local2++;
}
_entity.getShape().CollideVsWorldBounds();
_entity.getShape().setNewPosition(_local5._vx, _local5._vy);
_entity._spriteMagnetRadius.setPosition(_local5._vx, _local5._vy);
_entity._spriteMagnetRadius.animateSprite();
_gameContext.getGameData().UpdateObjCoords(_entity);
_entity.updateSpritePositions();
} else {
if (!_entity._knockedOffMagnet) {
switch (_gameData.getHero().getIsFacing()) {
case _gameData.getHero().Right :
_entity._fx = 35;
_entity._fy = -8;
break;
case _gameData.getHero().Left :
_entity._fx = -35;
_entity._fy = -8;
}
}
_entity._sprites[0].gotoAndPlay(26);
_entity.setNextState(Game.AIStates.Item_Static);
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Item_StickToMagnet()");
}
}
Symbol 1697 MovieClip [__Packages.Game.AIStates.Item_TowFromMagnet] Frame 0
class Game.AIStates.Item_TowFromMagnet extends Base.AIState
{
var _entity, _gameContext, _gameData, _towDirection, _velX, _hasHeroJumped, _waitToLetGo, _letGo, _padCount, _counter;
function Item_TowFromMagnet (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_towDirection = _gameData.getHero()._isFacing;
_velX = 0;
_entity._isStuckToMagnet = true;
_entity._isTowing = true;
_entity._isAttractedToMagnet = false;
_entity.setCollisionActive(true);
_hasHeroJumped = 0;
_waitToLetGo = false;
_letGo = false;
_padCount = 4;
_counter = 0;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if ((!_waitToLetGo) && ((((_gameData.getHero()._isMagnetActive == false) || (_gameData.getHero()._isFacing != _towDirection)) || (_gameData.getHero()._fx == 0)) || (!_entity._isOnScreen))) {
_waitToLetGo = true;
}
if (_waitToLetGo) {
if (_gameData.getHero()._hasJumped && (_entity._isOnScreen)) {
addVelocity();
_letGo = true;
}
if (_counter >= _padCount) {
_letGo = true;
} else {
_counter++;
}
if (_letGo) {
_entity._isStuckToMagnet = false;
if (_gameData.getHero()._isMagnetActive && (_entity._isOnScreen)) {
_entity._isTowing = false;
_entity._isAttractedToMagnet = true;
_gameData.getHero()._isMagnetStuck = false;
_entity.setNextState(Game.AIStates.Item_AttractToMagnet);
} else {
_entity._isTowing = false;
_entity.setNextState(Game.AIStates.Item_Static);
}
}
return(undefined);
}
var _local4 = _entity.getShape()._curPos;
var _local7 = _entity.getShape()._oldPos;
_local7._vx = _local4._vx;
var _local6;
switch (_gameData.getHero()._isMoving) {
case _gameData.getHero().Right :
_local6 = _gameData.getHero().getMagnet()._minx - _entity.getShape()._xw;
_local4._vx = ((_local4._vx > _local6) ? (_local4._vx) : (_local4._vx + _entity._fx));
_entity._fx = ((_local4._vx > _local6) ? (_gameData.getHero()._fx) : (_gameData.getHero()._fx * 1.5));
break;
case _gameData.getHero().Left :
_local6 = _gameData.getHero().getMagnet()._maxx + _entity.getShape()._xw;
_local4._vx = ((_local4._vx < _local6) ? (_local4._vx) : (_local4._vx + _entity._fx));
_entity._fx = ((_local4._vx < _local6) ? (_gameData.getHero()._fx) : (_gameData.getHero()._fx * 1.5));
}
var _local5 = _entity.updateCollideObjs();
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _gameContext.getGameData().getGameObject(_local5[_local2]);
if (_local3.getCollidable()) {
_entity.getHitShape().CollideVsTile(_local3.getHitShape());
}
_local2++;
}
_entity.getShape().CollideVsWorldBounds();
_entity.getShape().setNewPosition(_local4._vx, _local4._vy);
_entity._spriteMagnetRadius.setPosition(_local4._vx, _local4._vy);
_entity._spriteMagnetRadius.animateSprite();
_gameContext.getGameData().UpdateObjCoords(_entity);
_entity.updateSpritePositions();
_velX = Math.abs(_local4._vx - _local7._vx);
return(undefined);
}
function addVelocity() {
switch (_towDirection) {
case _gameData.getHero().Right :
_entity._fx = 65;
break;
case _gameData.getHero().Left :
_entity._fx = -65;
}
}
function Exit() {
_gameContext.getGameData().getSoundModule().StopSound("magnet_object_tow_loop");
return(undefined);
}
function toString() {
return("Item_TowFromMagnet()");
}
}
Symbol 1698 MovieClip [__Packages.Game.AIStates.Plat_Move] Frame 0
class Game.AIStates.Plat_Move extends Base.AIState
{
var _entity, _gameContext, _moveDir, _pauseCounter, _stage, _randomPauseTime;
function Plat_Move (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_moveDir = eRight;
if (_entity._initDirection < 0) {
_moveDir = eLeft;
}
_entity._isMoving = true;
_entity._curDirection = _moveDir;
_pauseCounter = 0;
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if (!_entity._isOnScreen) {
return(undefined);
}
switch (_stage) {
case 1 :
var _local2 = _entity.getHitShape().getCurrentPosition();
if ((_moveDir == eRight) && (_entity.getHitShape().getCurrentPosition()._vx < _entity._rightStop)) {
_entity.getHitShape().setNewPosition((_local2._vx = _local2._vx + _entity._moveSpeed), _local2._vy);
_entity.updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(_entity);
_entity._isMoving = true;
} else if ((_moveDir == eLeft) && (_entity.getHitShape().getCurrentPosition()._vx > _entity._leftStop)) {
_entity.getHitShape().setNewPosition((_local2._vx = _local2._vx - _entity._moveSpeed), _local2._vy);
_entity.updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(_entity);
_entity._isMoving = true;
} else {
_entity._isMoving = false;
_randomPauseTime = 60;
_entity._curDirection = 0;
_moveDir = _moveDir * -1;
_stage = 2;
}
break;
case 2 :
if (_pauseCounter < _randomPauseTime) {
_pauseCounter++;
} else {
_pauseCounter = 0;
_entity._curDirection = _moveDir;
_stage = 1;
}
}
return(undefined);
}
function Exit() {
_entity._isMoving = false;
return(undefined);
}
function toString() {
return("Plat_Move()");
}
var eRight = 1;
var eLeft = -1;
var eNone = 0;
var _pauseTime = 90;
}
Symbol 1699 MovieClip [__Packages.Game.AIStates.Plat_Idle] Frame 0
class Game.AIStates.Plat_Idle extends Base.AIState
{
var _entity, _gameContext;
function Plat_Idle (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Plat_Idle()");
}
}
Symbol 1700 MovieClip [__Packages.Game.AIStates.PlatDoor_Close] Frame 0
class Game.AIStates.PlatDoor_Close extends Base.AIState
{
var _entity, _gameContext, _fr, doorCloseFrame, state;
function PlatDoor_Close (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._isCloud = false;
_entity._isActive = true;
_fr = _entity._sprites[0]._currentframe;
switch (_entity._type) {
case Game.GameData.DOOR1 :
doorCloseFrame = 1;
break;
case Game.GameData.DOOR2 :
doorCloseFrame = 11;
break;
case Game.GameData.DOOR3 :
doorCloseFrame = 21;
}
state = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if (_entity._isON) {
_entity.setNextState(Game.AIStates.PlatDoor_Open);
}
switch (state) {
case 1 :
state = ((_fr == doorCloseFrame) ? 3 : 2);
break;
case 2 :
_fr--;
_entity._sprites[0].gotoAndStop(_fr);
if (_fr == doorCloseFrame) {
state++;
}
break;
case 3 :
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("PlatDoor_Close()");
}
}
Symbol 1701 MovieClip [__Packages.Game.AIStates.PlatDoor_Open] Frame 0
class Game.AIStates.PlatDoor_Open extends Base.AIState
{
var _entity, _gameContext, doorOpenFrame, state;
function PlatDoor_Open (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
switch (_entity._type) {
case Game.GameData.DOOR1 :
doorOpenFrame = 2;
break;
case Game.GameData.DOOR2 :
doorOpenFrame = 12;
break;
case Game.GameData.DOOR3 :
doorOpenFrame = 22;
}
_entity._isCloud = true;
_entity._isActive = false;
state = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if (!_entity._isON) {
_entity.setNextState(Game.AIStates.PlatDoor_Close);
}
switch (state) {
case 1 :
_entity._sprites[0].gotoAndPlay(doorOpenFrame);
state++;
break;
case 2 :
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("PlatDoor_Open()");
}
}
Symbol 1702 MovieClip [__Packages.Game.AIStates.Hero_Hit] Frame 0
class Game.AIStates.Hero_Hit extends Base.AIState
{
var _entity, _gameContext, _heroDie;
function Hero_Hit (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._isMoving = _entity.None;
_entity.setRotation(0);
_gameContext.getGameData().getSoundModule().PlaySound("enemy_hit_by_gun", 100, 0, 0, 0);
if (gameContext.getGameData().getHealth() >= 100) {
if (gameContext.getGameData().getGameMode() == Game.GameData.GAME_PLAY) {
_entity.setNextState(Game.AIStates.Hero_Die);
return(undefined);
}
} else if (_entity._isStuckToRail == false) {
_entity.startAnimating(Game.Hero.ANMIMATIONS.HitSmall.start, Game.Hero.ANMIMATIONS.HitSmall.end, 32, Game.Hero.ANMIMATIONS.HitSmall.loop);
}
return(undefined);
}
function PadInput() {
if ((!_entity.getOnPlatform()) || (_heroDie)) {
return(undefined);
}
if (_gameContext.getPadManager().getKeyActionHeld("Magnetize")) {
} else if (_entity._isMagnetActive) {
_entity.magnetStop();
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Magnetize") {
if (_entity._isPushing == false) {
_entity.magnetStart();
}
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "Jump") {
_entity._fy = _entity._fy - _entity.getPhysics()._jumpStrength;
_entity.setNextState(Game.AIStates.Hero_Jump);
return(undefined);
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "MoveRight") {
_entity._isMoving = _entity.Right;
_entity.setIsFacing(_entity.Right);
_entity.setNextState(Game.AIStates.Hero_Walk);
}
if (_gameContext.getPadManager().getCurrentKeyAction() == "MoveLeft") {
_entity._isMoving = _entity.Left;
_entity.setIsFacing(_entity.Left);
_entity.setNextState(Game.AIStates.Hero_Walk);
}
}
function Update() {
if (_entity._isMoving == _entity.Left) {
if (_entity._fx > (-_entity.getPhysics()._speedMax)) {
_entity._fx = _entity._fx - _entity.getPhysics()._acceleration;
}
} else if (_entity._isMoving == _entity.Right) {
if (_entity._fx < _entity.getPhysics()._speedMax) {
_entity._fx = _entity._fx + _entity.getPhysics()._acceleration;
}
} else if (_entity.getOnPlatform()) {
_entity._fx = _entity._fx * _entity.getPhysics()._friction;
if ((_entity._fx > (-_entity.getPhysics()._acceleration)) && (_entity._fx < _entity.getPhysics()._acceleration)) {
_entity._fx = 0;
_entity.setNextState(Game.AIStates.Hero_Walk);
}
}
if (_entity._fy < _entity.getPhysics()._fallMax) {
_entity._fy = _entity._fy + _entity.getPhysics()._gravity;
}
var _local5 = _entity.getBody()._curPos;
var _local6 = _entity.getBody()._oldPos;
_local6._vx = _local5._vx;
_local6._vy = _local5._vy;
_local5._vx = _local5._vx + _entity._fx;
_local5._vy = _local5._vy + _entity._fy;
_entity.setHeadPosition();
_entity.setMagnetPosition();
var _local4 = _gameContext.getGameData().getColArray();
var _local2 = 0;
while (_local2 < _gameContext.getGameData().getNumColGameObjects()) {
var _local3 = _local4[_local2];
if (_local3.getActive()) {
_entity.getBody().CollideVsTile(_local3.getHitShape());
}
_local2++;
}
_entity.getBody().CollideVsWorldBounds();
if (_entity.isDamageTimeUp()) {
_entity.setNextState(Game.AIStates.Hero_Walk);
}
_entity.RenderEntity();
return(undefined);
}
function Exit() {
return(undefined);
}
function toString(Void) {
return("Hero_Hit()");
}
}
Symbol 1703 MovieClip [__Packages.Game.AIStates.Hero_KnockDown] Frame 0
class Game.AIStates.Hero_KnockDown extends Base.AIState
{
var _entity;
function Hero_KnockDown (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_entity._isMoving = _entity.None;
_entity.setRotation(0);
_entity._isKnockDown = true;
return(undefined);
}
function PadInput(gameContext) {
}
function Update(gameContext) {
_entity._fx = _entity._fx * _entity.getPhysics()._friction;
if ((_entity._fx > (-_entity.getPhysics()._acceleration)) && (_entity._fx < _entity.getPhysics()._acceleration)) {
_entity._fx = 0;
}
if (_entity._fy < _entity.getPhysics()._fallMax) {
_entity._fy = _entity._fy + _entity.getPhysics()._gravity;
}
var _local6 = _entity.getBody()._curPos;
var _local7 = _entity.getBody()._oldPos;
_local7._vx = _local6._vx;
_local7._vy = _local6._vy;
_local6._vx = _local6._vx + _entity._fx;
_local6._vy = _local6._vy + _entity._fy;
_entity.setHeadPosition();
_entity.setMagnetPosition();
var _local4 = gameContext.getGameData().getColArray();
var _local2 = 0;
while (_local2 < gameContext.getGameData().getNumColGameObjects()) {
var _local3 = _local4[_local2];
if (_local3.getActive()) {
_entity.getBody().CollideVsTile(_local3.getHitShape());
}
_local2++;
}
_entity.getBody().CollideVsWorldBounds();
var _local8 = _entity.animateSprite();
if (_local8) {
_entity.setNextState(Game.AIStates.Hero_Walk);
}
_entity.RenderEntity();
return(undefined);
}
function Exit(gameContext) {
_entity._isKnockDown = false;
return(undefined);
}
function toString(Void) {
return("Hero_KnockDown()");
}
}
Symbol 1704 MovieClip [__Packages.Game.Enemy] Frame 0
class Game.Enemy extends Base.Entity
{
var _gameContext, _gameData, _idx, _type, _class, _xw, _yw, _curPosition, _isActive, _isOnScreen, _isCollidable, _reqUpdate, _playExplosion, _hitPoints, _playHit, _isPushed, _isAttacking, _isHit, _multiShape, _shapes, _curDirection, _attackDirection, _isHeroPresent, _damageCounter, _damageTime, _gameMode, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _isDismissed, _sprites, _soundList, _variant, _killPoints, _isVulnerable, _unitXW, _unitYW, _minXW, _minYW, _rad, _maxNumUnitsY, _maxNumUnitsX, _numUnitsMinY, _numUnitsMinX, _numUnitsX, _numUnitsY, _isPatrolling, _leftStop, _rightStop, _spawnPos, _shape, _hitShape, _attackShape, setNextState, _lineColor, _fillColor, _spriteColor, _spriteEnemy, _colorBright, _colorNorm, _bright, _timer, _playMode, _xScaleable, _yScaleable, _spriteStaticY, _spriteHitSpark, _damageTimerActive, _numReturns, _attackDir, _frameCapture;
function Enemy (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super(gameContext, 0, idx, false, false, Game.AIStates.Enemy_Static);
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_idx = idx;
_type = ntype;
_class = Game.GameData.ENEMY;
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = true;
_isOnScreen = false;
_isCollidable = true;
_reqUpdate = true;
_playExplosion = false;
_hitPoints = 0;
_playHit = false;
_isPushed = false;
_isAttacking = false;
_isHit = false;
_multiShape = true;
_shapes = new Array();
_curDirection = -1;
_attackDirection = 0;
_isHeroPresent = 0;
_damageCounter = 0;
_damageTime = 12;
_gameMode = _gameContext.getGameData().getGameMode();
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_isDismissed = false;
_sprites = [];
_soundList = [];
var _local2;
var _local3;
switch (_type) {
case Game.GameData.ENEMY1 :
_variant = 1;
_killPoints = 3;
_isVulnerable = Game.GameData.vALL;
_unitXW = 6;
_unitYW = 6;
_minXW = 90;
_minYW = 95;
_rad = 45;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_AABB;
_local3 = Base.ShapeEntity.TID_CIRCLE;
break;
case Game.GameData.ENEMY2 :
_variant = 2;
_killPoints = 3;
_isVulnerable = Game.GameData.vALL;
_unitXW = 6;
_unitYW = 6;
_minXW = 90;
_minYW = 95;
_rad = 45;
_maxNumUnitsY = 1;
_maxNumUnitsX = null;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_AABB;
_local3 = Base.ShapeEntity.TID_CIRCLE;
}
if (_gameMode == Game.GameData.GAME_PLAY) {
if (_xw > 160) {
_isPatrolling = true;
} else {
_isPatrolling = false;
}
var _local4 = _minXW / 2;
_leftStop = _curPosition._vx - ((_xw / 2) - _local4);
_rightStop = _curPosition._vx + ((_xw / 2) - _local4);
if (_isPatrolling) {
_spawnPos = new Base.VectorCoord(_leftStop, _curPosition._vy);
} else {
_spawnPos = new Base.VectorCoord(_curPosition._vx, _curPosition._vy);
}
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _xw, _xw, _yw, this, _local2, _gameData.getGraphics(), true);
_hitShape = new Base.ShapeEntity(_gameContext, _spawnPos, _rad, _minXW, _minXW, this, _local3, _gameData.getGraphics(), true);
_attackShape = new Base.ShapeEntity(_gameContext, _curPosition, 60, 120, 20, this, _local2, _gameData.getGraphics(), true);
_shapes.push(_attackShape);
_shapes.push(_hitShape);
_shapes.push(_shape);
createSprites();
if (_isPatrolling) {
setNextState(Game.AIStates.Enemy_Patrol);
} else {
setNextState(Game.AIStates.Enemy_Idle);
}
} else if (_gameMode == Game.GameData.GAME_EDIT) {
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _xw, _xw, _yw, this, _local2, _gameData.getGraphics(), true);
_hitShape = _local2;
_lineColor = 0;
_fillColor = 13421772 /* 0xCCCCCC */;
}
_spriteColor = new Color(_spriteEnemy.getMovieClip());
_colorBright = {rb:"125", gb:"0", bb:"0"};
_colorNorm = {rb:"0", gb:"0", bb:"0"};
_bright = false;
_timer = 0.0666666666666667;
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_shape);
}
function getHitShape() {
return(_hitShape);
}
function getIsMultiVector() {
return(_multiShape);
}
function getVectorArray() {
return(_shapes);
}
function getNumVectors() {
return(_shapes.length);
}
function setActive(bToggle) {
_isActive = bToggle;
}
function getActive() {
return(_isActive);
}
function setCollidable(bToggle) {
_isCollidable = bToggle;
}
function getCollidable() {
return(_isCollidable);
}
function setVulnerable(nToggle) {
_isVulnerable = nToggle;
}
function getVulnerable() {
return(_isVulnerable);
}
function getOnScreen() {
return(_isOnScreen);
}
function setOnScreen(bToggle) {
if (_isOnScreen == bToggle) {
return(undefined);
}
_isOnScreen = bToggle;
if (((!_isDismissed) && (_isOnScreen)) && (_isActive)) {
toggleSprites(true);
_gameContext.getGameData().addEnemyOnScreen(this);
} else if ((!_isDismissed) && (!_isOnScreen)) {
toggleSprites(false);
_gameContext.getGameData().removeEnemyOnScreen(this);
}
if (((_gameContext.getGameData().getHero()._hasJustSpawned == false) && (_isOnScreen)) && (!_gameContext.getGameData().getSoundModule().soundIsPlaying("enemy_hover_loop"))) {
_gameContext.getGameData().getSoundModule().PlaySound("enemy_hover_loop", 0, 0, 0, 2000);
} else {
if (_gameContext.getGameData().isEnemyOnScreen()) {
return(undefined);
}
_gameContext.getGameData().getSoundModule().StopSound("enemy_hover_loop");
}
}
function getReqUpdate() {
return(_reqUpdate);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getUnitXW() {
return(_unitXW);
}
function getUnitYW() {
return(_unitYW);
}
function getMinXW() {
return(_minXW);
}
function getMinYW() {
return(_minYW);
}
function getSpawnPosition() {
return(_spawnPos);
}
function getLeftStop() {
return(_leftStop);
}
function getRightStop() {
return(_rightStop);
}
function getPlayMode() {
return(_playMode);
}
function setPlayMode(bToggle) {
_playMode = bToggle;
}
function getScaleableX() {
return(_xScaleable);
}
function getScaleableY() {
return(_yScaleable);
}
function getLocationEdit() {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
return(undefined);
}
function getSizeEditX() {
return(_isSizeEditX);
}
function setSizeEditX(bToggle) {
_isSizeEditX = bToggle;
return(undefined);
}
function getSizeEditY() {
return(_isSizeEditY);
}
function setSizeEditY(bToggle) {
_isSizeEditY = bToggle;
return(undefined);
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
return(undefined);
}
function getIsSelected() {
return(_editSelected);
}
function allSfxOff() {
var _local2 = 0;
while (_local2 < _soundList.length) {
_gameContext.getGameData().getSoundModule().StopSound(_soundList[_local2]);
_local2++;
}
}
function toggleSprites(bVisible) {
_spriteEnemy.setVisibility(bVisible);
return(undefined);
}
function updateSpritePositions() {
_spriteEnemy.setPosition(getHitShape().getCurrentPosition()._vx, _spriteStaticY);
return(undefined);
}
function createSprites() {
_spriteStaticY = getHitShape().getCurrentPosition()._vy;
if (_isPatrolling) {
_spriteEnemy = new Base.SpriteEntity(_gameContext, 1, _idx, "alien1", _idx + "alien1", _gameContext.getGameData().getBuffer().getNextHighestDepth(), getHitShape().getCurrentPosition()._vx, _spriteStaticY, 1, -1, -1);
} else {
_spriteEnemy = new Base.SpriteEntity(_gameContext, 1, _idx, "alien2", _idx + "alien2", _gameContext.getGameData().getBuffer().getNextHighestDepth(), getHitShape().getCurrentPosition()._vx, _spriteStaticY, 1, -1, -1);
}
_spriteHitSpark = new Base.SpriteEntity(_gameContext, 1, 1, "hitspark01", "_hitspark01", _gameData.getBuffer().getNextHighestDepth(), getHitShape().getCurrentPosition()._vx, _spriteStaticY, 1, -1, -1);
_spriteHitSpark.setVisibility(false);
}
function orientSprite() {
switch (_curDirection) {
case 1 :
_spriteEnemy.playFlipped();
break;
case -1 :
_spriteEnemy.playUnflipped();
break;
default :
_spriteEnemy.playUnflipped();
}
}
function getSprite() {
return(_spriteEnemy);
}
function deleteSprites() {
_spriteHitSpark.removeSprite();
delete _spriteHitSpark;
_spriteEnemy.removeSprite();
delete _spriteEnemy;
return(undefined);
}
function setIsPushed(bTog) {
_isPushed = bTog;
}
function heroIsPresent(onSide) {
_isHeroPresent = onSide;
_attackDirection = onSide;
}
function playHitSpark(dir) {
switch (true) {
case dir < 0 :
var _local3 = _hitShape.getCurrentPosition()._vx + 20;
_spriteHitSpark.playUnflipped();
break;
case dir > 0 :
_local3 = _hitShape.getCurrentPosition()._vx - 20;
_spriteHitSpark.playFlipped();
}
var _local2 = _hitShape.getCurrentPosition()._vy;
_spriteHitSpark.setPosition(_local3, _local2);
_spriteHitSpark.setVisibility(true);
_spriteHitSpark.getMovieClip().gotoAndPlay(1);
}
function toggleBright() {
if (_bright) {
_spriteColor.setTransform(_colorBright);
_bright = false;
} else {
_spriteColor.setTransform(_colorNorm);
_bright = true;
}
}
function toggleBrightOff() {
_spriteColor.setTransform(_colorNorm);
_bright = false;
}
function playDamamgeBlink() {
if (_damageTimerActive) {
_timer = _timer - _gameContext.getDT();
if (_timer > 0.0015) {
_numReturns++;
return(undefined);
}
_numReturns = 0;
_timer = 0.0333333333333333;
toggleBright();
} else if (!_bright) {
toggleBrightOff();
}
}
function setDamageTimerActive(bToggle) {
_damageTimerActive = bToggle;
}
function getdamageTimerActive() {
return(_damageTimerActive);
}
function isDamageTimeUp() {
playDamamgeBlink();
_damageCounter++;
if (_damageCounter >= _damageTime) {
_damageCounter = 0;
_damageTimerActive = false;
toggleBrightOff();
return(true);
}
return(false);
}
function resetDamageCounter() {
_damageCounter = 0;
}
function ReSpawn() {
_isActive = true;
_isDismissed = false;
_isCollidable = true;
_spriteHitSpark.setVisibility(false);
_hitShape.setNewPosition(_spawnPos._vx, _spawnPos._vy);
updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(this);
return(undefined);
}
function takeDamage(nDir, pts) {
if (_isHit) {
return(undefined);
}
_hitPoints = _hitPoints + pts;
playHitSpark(nDir);
if (_hitPoints >= _killPoints) {
doDismissed();
setNextState(Game.AIStates.Enemy_Die);
} else {
_attackDir = nDir;
resetDamageCounter();
setDamageTimerActive(true);
setNextState(Game.AIStates.Enemy_Hit);
}
}
function getFrameCapture() {
var _local2 = _frameCapture;
_frameCapture = 1;
return(_local2);
}
function doHitMove(nDir) {
var _local2 = getHitShape().getCurrentPosition()._vx + (5 * nDir);
_shape.setNewPosition(_local2, getHitShape().getCurrentPosition()._vy);
updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(this);
}
function doDismissed() {
_hitPoints = 0;
_isActive = false;
_isDismissed = true;
_isCollidable = false;
_gameContext.getGameData().removeEnemyOnScreen(this);
}
function restoreEntity() {
if (!_isDismissed) {
_isActive = true;
_playHit = false;
_spriteColor.setTransform(_colorNorm);
getSprite().moveToFrame(getFrameCapture());
}
}
function getPlayHit() {
return(_playHit);
}
function getIsDismissed() {
return(_isDismissed);
}
function setPlayExplosion(bToggle) {
_playExplosion = bToggle;
}
function getPlayExplosion() {
return(_playExplosion);
}
function RenderEntity() {
if (_editSelected) {
_lineColor = 0;
} else {
var _local2 = _gameContext.getGameData().getPlatformColor(15);
_lineColor = _local2[0];
}
_shape.Draw();
_hitShape.Draw();
_attackShape.Draw();
if (_maxNumUnitsY == null) {
_shape.DrawScaler("y");
_yScaleable = true;
}
if (_maxNumUnitsX == null) {
_shape.DrawScaler("x");
_xScaleable = true;
}
}
function getName() {
return("Enemy_" + _variant);
}
function toString() {
return("Enemy()");
}
static var ANMIMATIONS = {Idle:{start:0, end:99, loop:true}, Seek:{start:101, end:139, loop:true}, AttackStart:{start:140, end:160, loop:false}, Attack:{start:161, end:166, loop:false}, Hit1:{start:167, end:173, loop:false}, Hit2:{start:174, end:180, loop:false}, Pushed:{start:181, end:186, loop:true}, Die:{start:187, end:206, loop:false}, Arm:{start:100, end:114, loop:false}, Attack2:{start:115, end:117, loop:true}};
}
Symbol 1705 MovieClip [__Packages.Game.AIStates.Enemy_Static] Frame 0
class Game.AIStates.Enemy_Static extends Base.AIState
{
var _entity, _gameContext;
function Enemy_Static (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
if (_entity._isOnScreen && (_entity._isActive)) {
if (_entity._isPatrolling) {
_entity.setNextState(Game.AIStates.Enemy_Patrol);
} else {
_entity.setNextState(Game.AIStates.Enemy_Idle);
}
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Enemy_Static()");
}
}
Symbol 1706 MovieClip [__Packages.Game.AIStates.Enemy_Patrol] Frame 0
class Game.AIStates.Enemy_Patrol extends Base.AIState
{
var _entity, _gameContext, _moveDir, _pauseCounter, _stage, _randomPauseTime;
function Enemy_Patrol (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.Idle.start, Game.Enemy.ANMIMATIONS.Idle.end, 32, Game.Enemy.ANMIMATIONS.Idle.loop);
_entity._isMoving = true;
_moveDir = _entity._curDirection;
_entity.orientSprite();
_pauseCounter = 0;
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
_entity._spriteEnemy.animateSprite();
if (!_entity._isOnScreen) {
_entity.setNextState(Game.AIStates.Enemy_Static);
}
if (_entity._isHeroPresent != 0) {
_entity.setNextState(Game.AIStates.Enemy_Attack_Seek);
}
switch (_stage) {
case 1 :
var _local2 = _entity.getHitShape().getCurrentPosition();
if ((_moveDir == eRight) && (_entity.getHitShape().getCurrentPosition()._vx < _entity._rightStop)) {
_entity._isMoving = true;
_entity.getHitShape().setNewPosition((_local2._vx = _local2._vx + 1), _local2._vy);
_entity.updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(_entity);
} else if ((_moveDir == eLeft) && (_entity.getHitShape().getCurrentPosition()._vx > _entity._leftStop)) {
_entity._isMoving = true;
_entity.getHitShape().setNewPosition((_local2._vx = _local2._vx - 1), _local2._vy);
_entity.updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(_entity);
} else {
_entity._isMoving = false;
_randomPauseTime = 30;
_moveDir = _moveDir * -1;
_stage = 2;
}
break;
case 2 :
if (_pauseCounter < _randomPauseTime) {
_pauseCounter++;
} else {
_pauseCounter = 0;
_entity._curDirection = _moveDir;
_entity.orientSprite();
_stage = 1;
}
}
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
return(undefined);
}
function Exit() {
_entity._isPushed = false;
return(undefined);
}
function toString() {
return("Enemy_Patrol()");
}
var eRight = 1;
var eLeft = -1;
var eNone = 0;
var _pauseTime = 90;
}
Symbol 1707 MovieClip [__Packages.Game.AIStates.Enemy_Attack_Seek] Frame 0
class Game.AIStates.Enemy_Attack_Seek extends Base.AIState
{
var _entity, _gameContext, _moveDir, _pauseCounter, _stage;
function Enemy_Attack_Seek (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.Arm.start, Game.Enemy.ANMIMATIONS.Arm.end, 32, Game.Enemy.ANMIMATIONS.Arm.loop);
_entity._isMoving = true;
_moveDir = (_entity._curDirection = _entity._attackDirection);
_entity._attackShape.setNewPosition(_entity.getHitShape()._curPos._vx, _entity.getHitShape()._curPos._vy);
_entity.orientSprite();
_pauseCounter = 0;
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
switch (_stage) {
case 1 :
var _local3 = _entity._spriteEnemy.animateSprite();
if (_local3 == 1) {
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.Attack2.start, Game.Enemy.ANMIMATIONS.Attack2.end, 32, Game.Enemy.ANMIMATIONS.Attack2.loop);
_entity._isAttacking = true;
_stage++;
}
break;
case 2 :
_entity.getSprite().animateSprite();
var _local2 = _entity.getHitShape().getCurrentPosition();
if ((_moveDir == eRight) && (_entity.getHitShape().getCurrentPosition()._vx < _entity._rightStop)) {
_entity._isMoving = true;
_entity.getHitShape().setNewPosition((_local2._vx = _local2._vx + 14), _local2._vy);
_entity._attackShape.setNewPosition(_entity.getHitShape()._curPos._vx, _entity.getHitShape()._curPos._vy + 25);
_entity.updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(_entity);
} else if ((_moveDir == eLeft) && (_entity.getHitShape().getCurrentPosition()._vx > _entity._leftStop)) {
_entity._isMoving = true;
_entity.getHitShape().setNewPosition((_local2._vx = _local2._vx - 14), _local2._vy);
_entity._attackShape.setNewPosition(_entity.getHitShape()._curPos._vx, _entity.getHitShape()._curPos._vy + 25);
_entity.updateSpritePositions();
_gameContext.getGameData().UpdateObjCoords(_entity);
} else {
_entity._curDirection = _entity._curDirection * -1;
_stage++;
}
break;
case 3 :
_entity._isAttacking = false;
if (_entity._isPatrolling) {
_entity.setNextState(Game.AIStates.Enemy_Patrol);
} else {
_entity.setNextState(Game.AIStates.Enemy_Idle);
}
}
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
return(undefined);
}
function Exit() {
_entity._isHeroPresent = 0;
return(undefined);
}
function toString() {
return("Enemy_Attack_Seek()");
}
var eRight = 1;
var eLeft = -1;
var eNone = 0;
var _pauseTime = 90;
}
Symbol 1708 MovieClip [__Packages.Game.AIStates.Enemy_Idle] Frame 0
class Game.AIStates.Enemy_Idle extends Base.AIState
{
var _entity, _gameContext;
function Enemy_Idle (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.Idle.start, Game.Enemy.ANMIMATIONS.Idle.end, 32, Game.Enemy.ANMIMATIONS.Idle.loop);
_entity.orientSprite();
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
_entity._spriteEnemy.animateSprite();
if (!_entity._isOnScreen) {
_entity.setNextState(Game.AIStates.Enemy_Static);
}
if (_entity._isHeroPresent != 0) {
_entity.setNextState(Game.AIStates.Enemy_Attack_Melee);
}
if (_gameContext.getGameData().getSoundModule().soundIsPlaying("enemy_hover_loop")) {
var _local3 = Math.floor(Math.abs(_entity._hitShape._curPos._vx - _gameContext.getGameData().getHero()._sBody._curPos._vx));
var _local2 = Math.abs(((_local3 * 100) / _soundRange) - 100);
_gameContext.getGameData().getSoundModule().AdjustSoundVolume("enemy_hover_loop", _local2);
}
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Enemy_Idle()");
}
var _soundRange = 500;
}
Symbol 1709 MovieClip [__Packages.Game.AIStates.Enemy_Attack_Melee] Frame 0
class Game.AIStates.Enemy_Attack_Melee extends Base.AIState
{
var _entity, _gameContext, _pauseCounter, _stage;
function Enemy_Attack_Melee (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.AttackStart.start, Game.Enemy.ANMIMATIONS.AttackStart.end, 32, Game.Enemy.ANMIMATIONS.AttackStart.loop);
_entity._curDirection = _entity._attackDirection;
_entity.orientSprite();
_pauseCounter = 0;
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
switch (_stage) {
case 1 :
var _local2 = _entity._spriteEnemy.animateSprite();
if (_local2 == 1) {
_entity._isAttacking = true;
_entity._attackShape.setNewPosition(_entity.getHitShape()._curPos._vx + (_entity._attackShape._xw * _entity._curDirection), _entity.getHitShape()._curPos._vy + 25);
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.Attack.start, Game.Enemy.ANMIMATIONS.Attack.end, 32, Game.Enemy.ANMIMATIONS.Attack.loop);
_stage++;
}
break;
case 2 :
_local2 = _entity._spriteEnemy.animateSprite();
if (_local2 == 1) {
_stage++;
}
break;
case 3 :
_entity._isAttacking = false;
if (_entity._isPatrolling) {
_entity.setNextState(Game.AIStates.Enemy_Patrol);
} else {
_entity.setNextState(Game.AIStates.Enemy_Idle);
}
}
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
return(undefined);
}
function Exit() {
_entity._isHeroPresent = 0;
return(undefined);
}
function toString() {
return("Enemy_Attack_Melee()");
}
var eRight = 1;
var eLeft = -1;
var eNone = 0;
var _pauseTime = 90;
}
Symbol 1710 MovieClip [__Packages.Game.AIStates.Enemy_Die] Frame 0
class Game.AIStates.Enemy_Die extends Base.AIState
{
var _entity, _gameContext, _pauseCounter, _stage;
function Enemy_Die (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.Die.start, Game.Enemy.ANMIMATIONS.Die.end, 32, Game.Enemy.ANMIMATIONS.Die.loop);
if (!_gameContext.getGameData().isEnemyOnScreen()) {
_gameContext.getGameData().getSoundModule().StopSound("enemy_hover_loop");
}
_gameContext.getGameData().getSoundModule().PlaySound("enemy_death", 100, 0, 0, 0);
_pauseCounter = 0;
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
switch (_stage) {
case 1 :
var _local2 = _entity._spriteEnemy.animateSprite();
if (_local2 == 1) {
_stage++;
}
break;
case 2 :
_entity.toggleSprites(false);
_entity.setNextState(Game.AIStates.Enemy_Static);
}
return(undefined);
}
function Exit() {
return(undefined);
}
function toString() {
return("Enemy_Die()");
}
var eRight = 1;
var eLeft = -1;
var eNone = 0;
var _pauseTime = 90;
}
Symbol 1711 MovieClip [__Packages.Game.AIStates.Enemy_Hit] Frame 0
class Game.AIStates.Enemy_Hit extends Base.AIState
{
var _entity, _gameContext, _pauseCounter, _stage;
function Enemy_Hit (entity) {
super();
_entity = entity;
}
function Entry(gameContext) {
_gameContext = gameContext;
_entity._isHit = true;
_entity._spriteEnemy.startAnimating(Game.Enemy.ANMIMATIONS.Hit1.start, Game.Enemy.ANMIMATIONS.Hit1.end, 32, Game.Enemy.ANMIMATIONS.Hit1.loop);
_gameContext.getGameData().getSoundModule().PlaySound("enemy_hit_by_gun", 100, 0, 0, 0);
_pauseCounter = 0;
_stage = 1;
return(undefined);
}
function PadInput() {
return(undefined);
}
function Update() {
switch (_stage) {
case 1 :
var _local2 = _entity._spriteEnemy.animateSprite();
if (_local2 == 1) {
_stage++;
}
break;
case 2 :
if (_entity._isPatrolling) {
_entity.setNextState(Game.AIStates.Enemy_Patrol);
} else {
_entity.setNextState(Game.AIStates.Enemy_Idle);
}
_stage = 0;
}
if (_entity.getdamageTimerActive()) {
_entity.isDamageTimeUp();
}
return(undefined);
}
function Exit() {
_entity._isActive = true;
_entity._isHit = false;
return(undefined);
}
function toString() {
return("Enemy_Hit()");
}
var eRight = 1;
var eLeft = -1;
var eNone = 0;
var _pauseTime = 90;
}
Symbol 1712 MovieClip [__Packages.Game.Token] Frame 0
class Game.Token extends Base.Entity
{
var _gameContext, _idx, _type, _class, _xw, _yw, _curPosition, _spritePos, _spawnPos, _isActive, _isOnScreen, _isCollidable, _collectionDone, _reqUpdate, _isCollected, _gameMode, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _sprites, _unitXW, _unitYW, _minXW, _minYW, _rad, _maxNumUnitsY, _maxNumUnitsX, _numUnitsMinY, _numUnitsMinX, _numUnitsX, _numUnitsY, _shape, _lineColor, _fillColor, _sprite, _multiVector, _vectors, _playMode, _xScaleable, _yScaleable;
function Token (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super();
_gameContext = gameContext;
_idx = idx;
_type = ntype;
_class = Game.GameData.TOKEN;
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
_spritePos = new Base.VectorCoord(xPos, yPos);
_spawnPos = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = true;
_isOnScreen = false;
_isCollidable = true;
_collectionDone = false;
_reqUpdate = false;
_isCollected = false;
_gameMode = _gameContext.getGameData().getGameMode();
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_sprites = [];
var _local2;
switch (_type) {
case Game.GameData.TOKEN_MAJ :
_unitXW = 40;
_unitYW = 30;
_minXW = 40;
_minYW = 30;
_rad = 20;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_AABB;
break;
case Game.GameData.TOKEN_MIN :
_unitXW = 70;
_unitYW = 70;
_minXW = 70;
_minYW = 70;
_xw = 70;
_yw = 70;
_rad = 35;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_CIRCLE;
}
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _rad, _unitXW, _unitYW, this, _local2, _gameContext.getGameData().getGraphics(), true);
if (_gameMode == Game.GameData.GAME_PLAY) {
createSprites();
} else if (_gameMode == Game.GameData.GAME_EDIT) {
_lineColor = 0;
_fillColor = 15910144 /* 0xF2C500 */;
}
}
function Update() {
if (_isCollected && (!_collectionDone)) {
var _local2 = _sprite.animateSprite();
if (_local2 == 1) {
_collectionDone = true;
toggleSprites(false);
}
}
RenderEntity();
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_shape);
}
function getHitShape() {
return(_shape);
}
function getIsMultiVector() {
return(_multiVector);
}
function getVectorArray() {
return(_vectors);
}
function getNumVectors() {
return(_vectors.length);
}
function setActive(bToggle) {
_isActive = bToggle;
}
function getActive(Void) {
return(_isActive);
}
function setCollidable(bToggle) {
_isCollidable = bToggle;
}
function getCollidable(Void) {
return(_isCollidable);
}
function getOnScreen(Void) {
return(_isOnScreen);
}
function setOnScreen(bToggle) {
_isOnScreen = bToggle;
if (_isOnScreen && (!_isCollected)) {
toggleSprites(true);
} else if (!_isOnScreen) {
toggleSprites(false);
}
}
function getReqUpdate() {
return(_reqUpdate);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getUnitXW() {
return(_unitXW);
}
function getUnitYW() {
return(_unitYW);
}
function getMinXW() {
return(_minXW);
}
function getMinYW() {
return(_minYW);
}
function getPlayMode(Void) {
return(_playMode);
}
function setPlayMode(bToggle) {
_playMode = bToggle;
}
function getScaleableX(Void) {
return(_xScaleable);
}
function getScaleableY(Void) {
return(_yScaleable);
}
function getLocationEdit(Void) {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
return(undefined);
}
function getSizeEditX(Void) {
return(_isSizeEditX);
}
function setSizeEditX(bToggle) {
_isSizeEditX = bToggle;
return(undefined);
}
function getSizeEditY(Void) {
return(_isSizeEditY);
}
function setSizeEditY(bToggle) {
_isSizeEditY = bToggle;
return(undefined);
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
return(undefined);
}
function getIsSelected(Void) {
return(_editSelected);
}
function toggleSprites(bVisible) {
_sprite.setVisibility(bVisible);
return(undefined);
}
function createSprites() {
switch (_type) {
case Game.GameData.TOKEN_MAJ :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "token_Cheese", _idx + "token_Cheese", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.setPosition(getShape().getCurrentPosition()._vx, getShape().getCurrentPosition()._vy);
break;
case Game.GameData.TOKEN_MIN :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "token_Cheese", _idx + "token_Cheese", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
}
toggleSprites(false);
}
function deleteSprites(Void) {
_sprite.removeSprite();
return(undefined);
}
function RenderEntity(Void) {
if (!_gameMode) {
_shape.Draw();
} else {
if (_editSelected) {
_lineColor = 0;
} else {
var _local2 = _gameContext.getGameData().getPlatformColor(_type);
_lineColor = _local2[0];
}
_shape.Draw();
if (_maxNumUnitsY == null) {
_shape.DrawScaler("y");
_yScaleable = true;
}
if (_maxNumUnitsX == null) {
_shape.DrawScaler("x");
_xScaleable = true;
}
}
}
function doCollected() {
_sprite.getMovieClip().gotoAndPlay(10);
_gameContext.getGameData().getSoundModule().PlaySound("hero_pickup_cheese", 100, 0, 0, 0);
_isCollected = true;
_collectionDone = false;
_isActive = false;
_gameContext.getGameData().addTokenCollected(this);
}
function ReSpawn(Void) {
_isActive = true;
_isCollected = false;
_collectionDone = false;
_shape.setNewPosition(_spritePos._vx, _spritePos._vy);
_gameContext.getGameData().UpdateObjCoords(this);
toggleSprites(true);
return(undefined);
}
function getName(Void) {
switch (_type) {
case Game.GameData.TOKEN_MAJ :
return("TokenMaj");
case Game.GameData.TOKEN_MIN :
return("Token");
}
}
function toString(Void) {
return("Token()");
}
}
Symbol 1713 MovieClip [__Packages.Game.MapData_1] Frame 0
class Game.MapData_1
{
function MapData_1 () {
}
static function getMapData() {
return(levelMaps);
}
static var levelMaps = [[5, 35, 8885, 3273, 14, 300], [5, 33, 2339, 3573, 300, 14], [5, 32, 2494, 316, 300, 14], [5, 43, 2244, 409, 200, 200], [5, 34, 2151, 659, 14, 300], [5, 38, 2058, 909, 200, 200], [5, 50, 1758, 1195, 400, 400], [5, 32, 1408, 1388, 300, 14], [5, 43, 1158, 1481, 200, 200], [5, 41, 1158, 1681, 200, 200], [5, 33, 1408, 1774, 300, 14], [5, 33, 1708, 1774, 300, 14], [5, 33, 2008, 1774, 300, 14], [5, 33, 2308, 1774, 300, 14], [5, 36, 2558, 1867, 200, 200], [5, 49, 2844, 2167, 400, 400], [5, 32, 2694, 2560, 300, 14], [5, 32, 2394, 2560, 300, 14], [5, 38, 2944, 2467, 200, 200], [5, 32, 4850, 1536, 300, 14], [5, 32, 4550, 1536, 300, 14], [5, 32, 4250, 1536, 300, 14], [5, 35, 420, 2712, 14, 300], [5, 35, 420, 2412, 14, 300], [5, 47, 613, 1762, 400, 400], [5, 35, 420, 2112, 14, 300], [5, 32, 763, 3055, 300, 14], [5, 40, 513, 2962, 200, 200], [5, 33, 8044, 450, 300, 14], [5, 33, 8344, 450, 300, 14], [5, 36, 8594, 543, 200, 200], [5, 46, 8494, 1443, 400, 400], [5, 49, 8494, 1843, 400, 400], [5, 34, 8687, 793, 14, 300], [5, 34, 8687, 1093, 14, 300], [5, 32, 8344, 2536, 300, 14], [5, 34, 8687, 2193, 14, 300], [5, 38, 8594, 2443, 200, 200], [5, 33, 5706, 1996, 300, 14], [5, 33, 6006, 1996, 300, 14], [5, 33, 6306, 1996, 300, 14], [5, 33, 6606, 1996, 300, 14], [5, 33, 6906, 1996, 300, 14], [5, 33, 7206, 1996, 300, 14], [5, 32, 7506, 2682, 300, 14], [5, 33, 7506, 1996, 300, 14], [5, 36, 7756, 2089, 200, 200], [5, 34, 7849, 2339, 14, 300], [5, 38, 7756, 2589, 200, 200], [5, 33, 8242, 3616, 300, 14], [5, 33, 8542, 3616, 300, 14], [5, 39, 8792, 3523, 200, 200], [5, 37, 8792, 3023, 200, 200], [5, 32, 8542, 2930, 300, 14], [5, 32, 7244, 3326, 300, 14], [5, 32, 6944, 3326, 300, 14], [5, 33, 2039, 3573, 300, 14], [5, 33, 2639, 3573, 300, 14], [5, 33, 2939, 3573, 300, 14], [5, 33, 3239, 3573, 300, 14], [5, 33, 3539, 3573, 300, 14], [5, 37, 713, 1462, 200, 200], [5, 32, 463, 1369, 300, 14], [5, 40, 213, 1276, 200, 200], [5, 35, 120, 1026, 14, 300], [5, 35, 120, 726, 14, 300], [5, 42, 213, 476, 200, 200], [5, 33, 463, 383, 300, 14], [5, 32, 6644, 3326, 300, 14], [5, 50, 3900, 1729, 400, 400], [5, 50, 5200, 1343, 400, 400], [5, 50, 5600, 957, 400, 400], [5, 50, 6294, 3519, 400, 400], [5, 32, 5944, 3712, 300, 14], [5, 32, 5950, 764, 300, 14], [5, 32, 3550, 1922, 300, 14], [1, 14, 7536, 691, 40, 150], [1, 14, 6813, 691, 40, 150], [1, 14, 7034, 2224.5, 40, 75], [1, 14, 5586, 3013, 40, 50], [1, 11, 4125, 3935, 50, 50], [3, 29, 3777, 3915, 90, 90], [1, 11, 6388, 567, 50, 50], [1, 11, 5712, 1591, 50, 50], [1, 11, 7915, 3079, 50, 50], [1, 2, 2003, 1409, 200, 32], [1, 11, 1892, 598, 50, 50], [3, 29, 3645, 2829, 90, 90], [3, 29, 6320, 2685, 90, 90], [3, 29, 6600, 3914, 90, 90], [3, 29, 6600, 3804, 90, 90], [3, 29, 5780, 3123, 90, 90], [3, 29, 7253, 750, 90, 90], [3, 29, 7253, 851, 90, 90], [3, 29, 5009, 694, 90, 90], [3, 29, 4831, 694, 90, 90], [3, 29, 4653, 694, 90, 90], [3, 29, 5260, 1709, 90, 90], [3, 29, 5015, 1709, 90, 90], [3, 29, 122, 3527, 90, 90], [3, 29, 2221, 3625, 90, 90], [3, 29, 1948, 3625, 90, 90], [3, 29, 8445, 3430, 90, 90], [3, 29, 8175, 3430, 90, 90], [3, 29, 7905, 3430, 90, 90], [3, 29, 7701, 3574, 90, 90], [3, 29, 7928, 3743, 90, 90], [3, 29, 8892, 3582, 90, 90], [3, 29, 7696, 2899, 90, 90], [3, 29, 7508, 2899, 90, 90], [3, 29, 6121, 2685, 90, 90], [3, 29, 6121, 2565, 90, 90], [3, 29, 6121, 2445, 90, 90], [1, 11, 6445, 2919, 50, 50], [3, 29, 1087, 2259, 90, 90], [2, 24, 1535, 2285, 40, 38], [3, 29, 1057, 2488, 90, 90], [3, 29, 898, 1999, 90, 90], [3, 29, 898, 2093, 90, 90], [3, 29, 851, 2388, 90, 90], [3, 29, 1998, 2488, 90, 90], [3, 29, 1810, 2488, 90, 90], [3, 29, 1621, 2488, 90, 90], [3, 29, 1433, 2488, 90, 90], [3, 29, 1245, 2488, 90, 90], [3, 29, 851, 2488, 90, 90], [3, 29, 680, 2488, 90, 90], [3, 29, 4443, 440, 90, 90], [3, 29, 4443, 547, 90, 90], [1, 2, 1350, 2550, 1500, 32], [2, 26, 7644, 2342, 100, 100], [1, 13, 7594, 2242, 200, 100], [1, 11, 6219, 2367, 50, 50], [1, 2, 3037, 1569, 200, 32], [1, 11, 6924, 2919, 50, 50], [3, 29, 8942, 3270, 90, 90], [1, 2, 8582, 3164, 200, 32], [1, 11, 8265, 3079, 50, 50], [1, 3, 2995, 3260, 1300, 32], [1, 4, 3648, 608, 1200, 32], [1, 14, 1147, 380.5, 40, 225], [1, 2, 3178, 2684, 300, 32], [3, 29, 7071, 3378, 90, 90], [1, 2, 8173, 3493, 900, 32], [1, 14, 7515, 3398, 40, 100], [1, 2, 7136, 3464, 800, 32], [1, 14, 8270, 3161, 40, 50], [1, 14, 8533, 3805, 40, 50], [1, 14, 7328, 3805, 40, 50], [1, 14, 6756, 3872.5, 40, 175], [1, 14, 3621, 3805, 40, 50], [1, 14, 7066, 2664, 40, 300], [3, 29, 2963, 1224, 90, 90], [3, 29, 5692, 2048, 90, 90], [3, 29, 5994, 2048, 90, 90], [3, 29, 6296, 1944, 90, 90], [3, 29, 6598, 1944, 90, 90], [3, 29, 6900, 1944, 90, 90], [3, 29, 7202, 2048, 90, 90], [3, 29, 7504, 2048, 90, 90], [3, 29, 7835, 2024, 90, 90], [3, 29, 7901, 2346, 90, 90], [3, 29, 7833, 2654, 90, 90], [3, 29, 7508, 2734, 90, 90], [3, 29, 8043, 502, 90, 90], [3, 29, 8348, 502, 90, 90], [3, 29, 8593, 548, 90, 90], [3, 29, 8739, 792, 90, 90], [3, 29, 8739, 1102, 90, 90], [3, 29, 8615, 1333, 90, 90], [3, 29, 8330, 1463, 90, 90], [3, 29, 8318, 1814, 90, 90], [3, 29, 8619, 1955, 90, 90], [3, 29, 8739, 2203, 90, 90], [3, 29, 8673, 2500, 90, 90], [3, 29, 8902, 2623, 90, 90], [3, 29, 8348, 2588, 90, 90], [3, 29, 5951, 816, 90, 90], [3, 29, 5677, 885, 90, 90], [3, 29, 5524, 1173, 90, 90], [3, 29, 5260, 1338, 90, 90], [4, 27, 5472, 976, 200, 200], [3, 29, 4961, 1484, 90, 90], [3, 29, 4649, 1484, 90, 90], [3, 29, 4337, 1484, 90, 90], [3, 29, 4009, 1611, 90, 90], [3, 29, 3897, 1873, 90, 90], [3, 29, 8036, 713, 90, 90], [3, 29, 8216, 713, 90, 90], [3, 29, 8396, 713, 90, 90], [3, 29, 4735, 1877, 90, 90], [3, 29, 4109, 2281, 90, 90], [3, 29, 3119, 845, 90, 90], [3, 29, 2281, 1215, 90, 90], [3, 29, 2967, 1808, 90, 90], [3, 29, 3551, 1974, 90, 90], [3, 29, 3983, 2967, 90, 90], [3, 29, 4027, 2577, 90, 90], [3, 29, 3782, 2577, 90, 90], [3, 29, 3536, 2577, 90, 90], [3, 29, 3291, 2577, 90, 90], [3, 29, 8342, 3668, 90, 90], [3, 29, 8642, 3668, 90, 90], [3, 29, 8542, 2983, 90, 90], [3, 29, 8888, 2955, 90, 90], [3, 29, 3933, 3259, 90, 90], [3, 29, 1500, 3068, 90, 90], [3, 29, 1917, 2898, 90, 90], [3, 29, 1500, 2904, 90, 90], [4, 27, 464, 262, 200, 200], [4, 27, 558, 2925, 200, 200], [3, 29, 432, 3029, 90, 90], [3, 29, 368, 2795, 90, 90], [3, 29, 368, 2515, 90, 90], [3, 29, 368, 2235, 90, 90], [3, 29, 371, 1955, 90, 90], [3, 29, 592, 1719, 90, 90], [3, 29, 720, 1475, 90, 90], [4, 27, 814, 1302, 200, 200], [3, 29, 462, 1421, 90, 90], [3, 29, 220, 1284, 90, 90], [3, 29, 173, 1022, 90, 90], [3, 29, 173, 727, 90, 90], [3, 29, 197, 493, 90, 90], [3, 29, 6509, 605, 90, 90], [3, 29, 4666, 315, 90, 90], [3, 29, 4105, 547, 90, 90], [3, 29, 3875, 547, 90, 90], [3, 29, 3645, 547, 90, 90], [3, 29, 3415, 547, 90, 90], [3, 29, 3185, 547, 90, 90], [3, 29, 1578, 578, 90, 90], [3, 29, 931, 481, 90, 90], [3, 29, 794, 481, 90, 90], [3, 29, 657, 481, 90, 90], [3, 29, 931, 578, 90, 90], [3, 29, 794, 578, 90, 90], [3, 29, 657, 578, 90, 90], [3, 29, 461, 435, 90, 90], [3, 29, 2205, 721, 90, 90], [3, 29, 2593, 368, 90, 90], [3, 29, 2239, 411, 90, 90], [3, 29, 2067, 1034, 90, 90], [3, 29, 1813, 1204, 90, 90], [4, 27, 2004, 872, 200, 200], [3, 29, 1523, 1336, 90, 90], [3, 29, 1187, 1355, 90, 90], [3, 29, 1015, 1605, 90, 90], [4, 27, 2914, 2376, 200, 200], [3, 29, 1186, 1812, 90, 90], [3, 29, 1498, 1826, 90, 90], [3, 29, 1802, 1826, 90, 90], [3, 29, 2106, 1826, 90, 90], [3, 29, 2410, 1826, 90, 90], [3, 29, 2702, 1927, 90, 90], [3, 29, 2894, 2131, 90, 90], [3, 29, 3083, 2298, 90, 90], [3, 29, 3005, 2555, 90, 90], [3, 29, 2781, 2612, 90, 90], [3, 29, 2489, 2612, 90, 90], [3, 29, 640, 3107, 90, 90], [3, 29, 862, 3107, 90, 90], [3, 29, 3537, 3189, 90, 90], [3, 29, 3316, 3189, 90, 90], [3, 29, 3095, 3189, 90, 90], [3, 29, 2875, 3189, 90, 90], [3, 29, 2654, 3189, 90, 90], [3, 29, 2433, 3189, 90, 90], [1, 2, 122, 1817, 400, 32], [1, 13, 3178, 2882, 300, 100], [1, 13, 8928, 2750, 300, 100], [1, 2, 8928, 2684, 300, 32], [1, 13, 8347, 2750, 300, 100], [1, 2, 8347, 2684, 300, 32], [1, 13, 2560, 2750, 300, 100], [1, 2, 2560, 2684, 300, 32], [1, 5, 3670, 2516, 900, 32], [1, 2, 4883, 485, 200, 32], [1, 13, 4672, 492, 200, 200], [1, 2, 4672, 376, 200, 32], [2, 24, 2237, 2285, 40, 38], [1, 13, 700, 2154, 200, 300], [1, 2, 700, 1988, 200, 32], [2, 24, 1182, 2285, 40, 38], [1, 13, 2398, 2154, 200, 300], [1, 2, 902, 2156, 200, 32], [1, 2, 1748, 1988, 1500, 32], [1, 2, 5950, 2344, 200, 32], [2, 25, 6771, 2125, 70, 70], [1, 18, 6874, 2384.5, 100, 15], [1, 15, 7034, 2327, 40, 130], [3, 29, 7167, 2242, 90, 90], [3, 29, 7167, 2347, 90, 90], [3, 29, 7281, 2242, 90, 90], [3, 29, 7281, 2347, 90, 90], [3, 29, 7395, 2242, 90, 90], [3, 29, 7395, 2347, 90, 90], [1, 2, 7144, 2176, 1100, 32], [1, 2, 5678, 1282, 300, 32], [1, 2, 7545, 608, 1884, 32], [1, 11, 1716, 375, 50, 50], [1, 2, 1591, 416, 300, 32], [2, 25, 1613, 365, 70, 70], [1, 19, 1328, 615.5, 100, 15], [1, 16, 1147, 558, 40, 130], [1, 14, 5132, 677.5, 40, 125], [1, 14, 3417, 985.5, 40, 225], [1, 2, 1679, 1569, 900, 32], [1, 13, 2282, 1444, 300, 300], [1, 2, 2282, 1278, 300, 32], [1, 2, 3119, 984, 200, 32], [1, 13, 2785, 1554, 300, 200], [1, 2, 2785, 1438, 300, 32], [1, 2, 2592, 457, 300, 32], [1, 13, 1425, 805, 600, 300], [1, 13, 975, 755, 300, 200], [1, 2, 2989, 1114, 898, 32], [1, 2, 2963, 1285, 300, 32], [1, 2, 2533, 1569, 200, 32], [1, 2, 3154, 1709, 300, 32], [1, 2, 2963, 1869, 300, 32], [1, 2, 3154, 2038, 300, 32], [1, 2, 4097, 2344, 300, 32], [1, 2, 4098, 2687, 300, 32], [1, 2, 3628, 2891, 600, 32], [1, 2, 3984, 3028, 300, 32], [1, 14, 7520, 1361, 40, 250], [2, 24, 7188, 1597, 40, 38], [2, 26, 5999, 1566, 100, 100], [1, 20, 7350, 1608.5, 100, 15], [1, 17, 7520, 1551, 40, 130], [3, 29, 7626, 1472, 90, 90], [3, 29, 7746, 1472, 90, 90], [3, 29, 7866, 1472, 90, 90], [3, 29, 7986, 1472, 90, 90], [3, 29, 8106, 1472, 90, 90], [3, 29, 7626, 1571, 90, 90], [3, 29, 7746, 1571, 90, 90], [3, 29, 7866, 1571, 90, 90], [3, 29, 7986, 1571, 90, 90], [3, 29, 8106, 1571, 90, 90], [1, 13, 6790, 1748, 2800, 200], [1, 2, 6790, 1632, 2800, 32], [1, 2, 5130, 1771, 500, 32], [1, 2, 4422, 2044, 200, 32], [1, 2, 5104, 2044, 300, 32], [1, 2, 2678, 2816, 1300, 32], [1, 2, 1922, 2959, 352, 32], [1, 13, 4735, 2054, 300, 200], [1, 2, 4735, 1938, 300, 32], [1, 2, 100, 3419, 300, 32], [1, 13, 100, 3655, 400, 100], [1, 2, 100, 3589, 400, 32], [1, 2, 2226, 3329, 200, 32], [1, 13, 1500, 3195, 600, 100], [1, 2, 1500, 3129, 600, 32], [1, 13, 1925, 3378, 400, 200], [1, 13, 3456, 2314, 600, 200], [1, 2, 3556, 2198, 800, 32], [1, 2, 1113, 3262, 2026, 32], [1, 13, 2622, 742, 700, 200], [1, 2, 2622, 626, 700, 32], [1, 13, 4852, 822, 600, 100], [1, 2, 4852, 756, 600, 32], [1, 2, 3900, 856, 1300, 32], [2, 24, 5053, 573, 40, 38], [2, 26, 6216, 542, 100, 100], [2, 24, 7557, 573, 40, 38], [2, 24, 6700, 573, 40, 38], [1, 11, 5854, 871, 50, 50], [1, 18, 7075, 888.5, 100, 15], [1, 15, 7536, 831, 40, 130], [2, 25, 6226, 861, 70, 70], [2, 25, 7390, 861, 70, 70], [1, 19, 6345, 888.5, 100, 15], [1, 16, 6813, 831, 40, 130], [4, 27, 8578, 900, 200, 200], [1, 2, 8216, 774, 546, 32], [1, 2, 5363, 608, 2100, 32], [4, 27, 8410, 1645, 200, 200], [1, 2, 8378, 2816, 1400, 32], [1, 2, 6150, 2748, 500, 32], [2, 25, 6744, 2909, 70, 70], [1, 13, 6894, 2474, 1400, 100], [1, 2, 6944, 2408, 1500, 32], [1, 19, 6849, 2936.5, 100, 15], [1, 16, 7066, 2879, 40, 130], [3, 29, 6290, 3009, 90, 90], [3, 29, 6124, 3009, 90, 90], [1, 13, 7020, 3026, 1200, 100], [1, 2, 7120, 2960, 1400, 32], [1, 13, 6220, 3136, 400, 100], [1, 2, 6220, 3070, 400, 32], [1, 11, 5841, 2931, 50, 50], [1, 2, 5716, 2972, 300, 32], [3, 29, 6323, 3342, 90, 90], [3, 29, 6343, 3533, 90, 90], [3, 29, 6252, 3710, 90, 90], [4, 27, 7239, 3219, 200, 200], [3, 29, 6920, 3274, 90, 90], [3, 29, 7331, 3378, 90, 90], [3, 29, 6715, 3274, 90, 90], [3, 29, 6509, 3274, 90, 90], [1, 11, 5591, 2931, 50, 50], [2, 25, 5756, 2921, 70, 70], [1, 18, 5666, 2948.5, 100, 15], [1, 15, 5586, 3103, 40, 130], [2, 24, 5255, 3149, 40, 38], [2, 24, 4453, 3149, 40, 38], [1, 2, 3918, 3343, 400, 32], [1, 2, 2976, 3461, 1700, 32], [1, 2, 1792, 3690, 400, 32], [3, 29, 8071, 3059, 90, 90], [2, 25, 8435, 3925, 70, 70], [1, 2, 8632, 3764, 800, 32], [1, 20, 8695, 3740.5, 100, 15], [1, 17, 8533, 3895, 40, 130], [1, 2, 7928, 3805, 200, 32], [1, 2, 7687, 3635, 300, 32], [1, 2, 8090, 3120, 400, 32], [1, 19, 8190, 3096.5, 100, 15], [1, 16, 8270, 3251, 40, 130], [2, 25, 7979, 3069, 70, 70], [1, 11, 7675, 3935, 50, 50], [3, 29, 7178, 3825, 90, 90], [3, 29, 7178, 3914, 90, 90], [3, 29, 7047, 3825, 90, 90], [3, 29, 7047, 3914, 90, 90], [1, 13, 1350, 2616, 1500, 100], [1, 2, 1648, 2320, 1300, 32], [1, 13, 5048, 2386, 1600, 400], [1, 2, 5148, 2170, 1800, 32], [1, 13, 575, 855, 500, 400], [1, 2, 1175, 639, 1700, 32], [1, 13, 7078, 1078, 2500, 300], [1, 2, 7078, 912, 2500, 32], [1, 13, 7136, 3630, 800, 300], [1, 2, 8095, 3332, 1200, 32], [1, 13, 5070, 3400, 1900, 400], [1, 2, 5070, 3184, 1900, 32], [3, 29, 6916, 3825, 90, 90], [3, 29, 6916, 3914, 90, 90], [3, 29, 6060, 3764, 90, 90], [3, 29, 5846, 3764, 90, 90], [2, 24, 5453, 3941, 40, 38], [2, 26, 4580, 3910, 100, 100], [3, 29, 3582, 3625, 90, 90], [3, 29, 3310, 3625, 90, 90], [3, 29, 3037, 3625, 90, 90], [3, 29, 2765, 3625, 90, 90], [3, 29, 2493, 3625, 90, 90], [1, 2, 3701, 3764, 200, 32], [1, 11, 3776, 3723, 50, 50], [2, 25, 3709, 3713, 70, 70], [1, 19, 3414, 3952.5, 100, 15], [1, 16, 3621, 3895, 40, 130], [2, 24, 2821, 3941, 40, 38], [2, 24, 2102, 3941, 40, 38], [1, 1, 8700, 3980, 600, 40], [1, 1, 8100, 3980, 600, 40], [1, 1, 7500, 3980, 600, 40], [1, 1, 6900, 3980, 600, 40], [1, 1, 6300, 3980, 600, 40], [1, 1, 5700, 3980, 600, 40], [1, 1, 5100, 3980, 600, 40], [1, 1, 4500, 3980, 600, 40], [1, 1, 3900, 3980, 600, 40], [1, 1, 3300, 3980, 600, 40], [1, 1, 2700, 3980, 600, 40], [1, 1, 2100, 3980, 600, 40], [3, 29, 375, 3496, 90, 90], [3, 29, 573, 3496, 90, 90], [3, 29, 771, 3496, 90, 90], [3, 29, 969, 3496, 90, 90], [3, 29, 375, 3628, 90, 90], [3, 29, 573, 3628, 90, 90], [3, 29, 771, 3628, 90, 90], [3, 29, 969, 3628, 90, 90], [1, 14, 1480, 3767.5, 40, 125], [1, 20, 1333, 3665.5, 100, 15], [1, 17, 1480, 3895, 40, 130], [1, 11, 1054, 3648, 50, 50], [1, 14, 816, 3767.5, 40, 125], [1, 11, 1408, 3648, 50, 50], [2, 25, 1140, 3638, 70, 70], [2, 25, 474, 3925, 70, 70], [1, 19, 635, 3952.5, 100, 15], [1, 16, 816, 3895, 40, 130], [1, 2, 902, 3689, 1200, 32], [1, 1, 1500, 3980, 600, 40], [1, 1, 900, 3980, 600, 40], [1, 1, 300, 3980, 600, 40], [1, 18, 7750, 3952.5, 100, 15], [1, 15, 7328, 3895, 40, 130], [6, 30, 1366, 2246, 160, 96], [6, 30, 1916, 2246, 600, 96], [6, 30, 6923, 1558, 160, 96], [6, 30, 6726, 1558, 160, 96], [6, 30, 5636, 534, 160, 96], [6, 30, 5411, 534, 160, 96], [6, 30, 7146, 534, 532, 96], [6, 30, 4850, 3110, 160, 96], [6, 30, 5206, 3902, 160, 96], [6, 30, 4998, 3902, 160, 96], [6, 30, 3130, 3902, 160, 96], [6, 30, 2517, 3902, 160, 96], [7, 53, 6256, 1502, 190, 148], [7, 55, 7770, 3222, 190, 148], [7, 67, 7262, 1949, 80, 40], [7, 67, 5596, 1949, 80, 40], [7, 69, 475, 2500, 50, 80], [7, 69, 475, 1944, 50, 80], [7, 67, 614, 334, 80, 40], [7, 67, 2404, 1726, 80, 40], [7, 67, 1314, 1726, 80, 40], [7, 67, 7936, 400, 80, 40], [7, 68, 7797, 2333, 50, 80], [7, 66, 7398, 2635, 80, 40], [7, 68, 8247, 1651, 50, 80], [7, 68, 8635, 715, 50, 80], [7, 68, 2099, 615, 50, 80], [7, 66, 2606, 268, 80, 40], [7, 66, 2288, 2512, 80, 40], [7, 66, 1494, 1436, 80, 40], [7, 66, 872, 3008, 80, 40], [7, 66, 8234, 2489, 80, 40], [7, 66, 6060, 717, 80, 40], [7, 68, 5641, 1015, 50, 80], [7, 66, 4945, 1583, 80, 40], [7, 66, 3440, 1875, 80, 40], [7, 67, 8132, 3569, 80, 40], [7, 66, 8435, 2883, 80, 40], [7, 66, 7071, 3279, 80, 40], [7, 67, 1939, 3526, 80, 40], [7, 67, 2797, 3526, 80, 40], [7, 68, 2587, 1985, 50, 80], [7, 69, 8831, 3240, 50, 80], [7, 67, 3649, 3526, 80, 40], [7, 66, 5834, 3665, 80, 40], [7, 53, 6005, 470, 190, 148], [7, 57, 8701, 3871, 190, 148], [1, 23, 2352.5, 537.5, 67, 145], [1, 23, 7747.5, 519.5, 67, 145], [1, 23, 3942.5, 3887.5, 67, 145], [1, 23, 2995.5, 3372.5, 67, 145], [7, 52, 4281, 3005, 190, 148], [7, 56, 8188.5, 3871, 189, 148], [1, 23, 5505.5, 1543.5, 67, 145], [1, 23, 3795.5, 2109.5, 67, 145], [7, 55, 1043, 3846, 190, 148], [7, 54, 5608.5, 3846, 189, 148], [7, 53, 4367, 3846, 190, 148], [7, 52, 1975, 3845, 190, 148], [8, 64, 3628.5, 2710.5, 179, 89], [8, 59, 2906, 2754.5, 82, 91], [8, 63, 7438.5, 350, 355, 166], [8, 62, 6512, 447.5, 176, 77], [8, 62, 5180, 447.5, 176, 77], [8, 64, 4024.5, 747.5, 179, 89], [8, 64, 3548.5, 747.5, 179, 89], [8, 58, 4386, 669.5, 106, 93], [8, 64, 988.5, 348.5, 179, 89], [8, 62, 1594, 527.5, 176, 77], [8, 60, 2592.5, 558.5, 139, 105], [8, 62, 4161, 415.5, 176, 77], [8, 62, 4161, 335.5, 176, 77], [8, 62, 4339, 415.5, 176, 77], [8, 62, 4339, 335.5, 176, 77], [8, 62, 3238, 416.5, 176, 77], [8, 62, 3238, 336.5, 176, 77], [8, 62, 3416, 416.5, 176, 77], [8, 62, 3416, 336.5, 176, 77], [8, 63, 3786.5, 377, 355, 166], [8, 64, 7762.5, 721.5, 179, 89], [8, 58, 8016, 1273.5, 106, 93], [8, 62, 7043, 1440.5, 176, 77], [8, 62, 6860, 1440.5, 176, 77], [8, 62, 6678, 1440.5, 176, 77], [8, 64, 5686.5, 1430.5, 179, 89], [8, 64, 4654.5, 1712.5, 179, 89], [8, 63, 4242.5, 1875, 355, 166], [8, 59, 1330, 1924.5, 82, 91], [8, 59, 1648, 1924.5, 82, 91], [8, 59, 1952, 1924.5, 82, 91], [8, 58, 2748, 1700.5, 106, 93], [8, 64, 2290.5, 1049.5, 179, 89], [8, 59, 2678, 1053.5, 82, 91], [8, 60, 1992.5, 1500.5, 139, 105], [8, 62, 1594, 1128.5, 176, 77], [8, 62, 1420, 1233.5, 176, 77], [8, 63, 482.5, 1563, 355, 166], [8, 64, 910.5, 1802.5, 179, 89], [8, 62, 1806, 2105.5, 176, 77], [8, 62, 1614, 2105.5, 176, 77], [8, 62, 1426, 2105.5, 176, 77], [8, 60, 3510.5, 2130.5, 139, 105], [8, 58, 5070, 1832.5, 106, 93], [8, 64, 8526.5, 2208.5, 179, 89], [8, 64, 8638.5, 2660.5, 179, 89], [8, 64, 8030.5, 2657.5, 179, 89], [8, 58, 7521, 1894.5, 106, 93], [8, 60, 6356.5, 2340.5, 139, 105], [8, 59, 5963, 2685.5, 82, 91], [8, 63, 6724.5, 2716, 355, 166], [8, 63, 4852.5, 2952, 355, 166], [8, 62, 3543, 3353.5, 176, 77], [8, 62, 3353, 3353.5, 176, 77], [8, 62, 3166, 3353.5, 176, 77], [8, 62, 2839, 3353.5, 176, 77], [8, 62, 2649, 3353.5, 176, 77], [8, 62, 2462, 3353.5, 176, 77], [8, 62, 3363, 3087.5, 176, 77], [8, 62, 3171, 3087.5, 176, 77], [8, 62, 2981, 3087.5, 176, 77], [8, 62, 2791, 3087.5, 176, 77], [8, 62, 2605, 3087.5, 176, 77], [8, 62, 1689, 2822.5, 176, 77], [8, 63, 1224.5, 2928, 355, 166], [8, 60, 336.5, 3193.5, 139, 105], [8, 59, 1071, 3200.5, 82, 91], [8, 64, 1460.5, 3438.5, 179, 89], [8, 64, 6626.5, 3434.5, 179, 89], [8, 58, 8643, 3394.5, 106, 93], [8, 62, 8085, 2953.5, 176, 77], [8, 65, 7070.5, 3898.5, 265, 211], [8, 58, 5681, 3646.5, 106, 93], [8, 58, 4589, 3646.5, 106, 93], [1, 22, 8896, 3842, 116, 150]];
}
Symbol 1714 MovieClip [__Packages.Game.MapData_2] Frame 0
class Game.MapData_2
{
function MapData_2 () {
}
static function getMapData() {
return(levelMaps);
}
static var levelMaps = [[5, 32, 8560, 1826, 300, 14], [5, 32, 8260, 1826, 300, 14], [5, 44, 7910, 1633, 400, 400], [5, 32, 7560, 1439, 300, 14], [5, 32, 6276, 1655, 300, 14], [5, 42, 6026, 1362, 200, 200], [5, 40, 6026, 1562, 200, 200], [5, 33, 6276, 1269, 300, 14], [5, 33, 6630, 769, 300, 14], [5, 33, 6930, 769, 300, 14], [5, 45, 7280, 962, 400, 400], [5, 51, 7680, 962, 400, 400], [5, 45, 8080, 962, 400, 400], [5, 35, 8873, 425, 14, 300], [5, 32, 2100, 2089, 300, 14], [5, 32, 8530, 82, 300, 14], [5, 39, 8780, 675, 200, 200], [5, 51, 8480, 962, 400, 400], [5, 37, 8780, 175, 200, 200], [5, 32, 8230, 82, 300, 14], [5, 32, 2800, 1703, 300, 14], [5, 32, 3764, 251, 300, 14], [5, 32, 3464, 251, 300, 14], [5, 32, 3164, 251, 300, 14], [5, 32, 2478, 637, 300, 14], [5, 43, 2914, 344, 200, 200], [5, 40, 2228, 544, 200, 200], [5, 37, 2042, 344, 200, 200], [5, 38, 2728, 544, 200, 200], [5, 32, 1792, 251, 300, 14], [5, 33, 1200, 2657, 300, 14], [5, 38, 1750, 2950, 200, 200], [5, 33, 1500, 2657, 300, 14], [5, 36, 1750, 2750, 200, 200], [5, 32, 1500, 3043, 300, 14], [5, 33, 2726, 2439, 300, 14], [5, 33, 3026, 2439, 300, 14], [5, 51, 3376, 2246, 400, 400], [5, 45, 4370, 2246, 400, 400], [5, 51, 4770, 2246, 400, 400], [5, 45, 5470, 2246, 400, 400], [5, 33, 3720, 2053, 300, 14], [5, 33, 4020, 2053, 300, 14], [5, 33, 5120, 2053, 300, 14], [5, 33, 5820, 2439, 300, 14], [5, 32, 5650, 2799, 300, 14], [5, 32, 5350, 2799, 300, 14], [5, 32, 5050, 2799, 300, 14], [5, 32, 4750, 2799, 300, 14], [5, 32, 4450, 2799, 300, 14], [5, 33, 6478, 2960, 300, 14], [5, 33, 6176, 3732, 300, 14], [5, 37, 6426, 3439, 200, 200], [5, 39, 6426, 3639, 200, 200], [5, 33, 6778, 2960, 300, 14], [5, 40, 6228, 3253, 200, 200], [5, 42, 6228, 3053, 200, 200], [5, 33, 7078, 2960, 300, 14], [5, 33, 7378, 2960, 300, 14], [5, 33, 7678, 2960, 300, 14], [5, 32, 3750, 2413, 300, 14], [5, 44, 4100, 2606, 400, 400], [5, 50, 2450, 1896, 400, 400], [5, 33, 7978, 2960, 300, 14], [1, 2, 1162, 1989, 300, 32], [1, 13, 1250, 2200, 700, 100], [1, 11, 693, 2335, 50, 50], [3, 29, 6365, 3786, 90, 90], [1, 13, 3236, 1838, 200, 100], [1, 2, 3236, 1772, 200, 32], [1, 11, 2645, 1231, 50, 50], [1, 11, 803, 1567, 50, 50], [1, 11, 6486, 3935, 50, 50], [1, 11, 3425, 1043, 50, 50], [1, 2, 100, 1976, 300, 32], [1, 11, 125, 2335, 50, 50], [1, 2, 1900, 1608, 600, 32], [1, 2, 6961, 1173, 300, 32], [1, 11, 8065, 3703, 50, 50], [2, 25, 7997, 3693, 70, 70], [1, 14, 7043, 3553, 40, 350], [4, 27, 8079, 1709, 200, 200], [1, 13, 7374, 1788, 400, 200], [1, 13, 6700, 1401, 200, 100], [4, 27, 8895, 821, 200, 200], [4, 27, 7479, 1041, 200, 200], [4, 27, 7887, 882, 200, 200], [4, 27, 8279, 1041, 200, 200], [4, 27, 3904, 2163, 200, 200], [4, 27, 5144, 2163, 200, 200], [4, 27, 5300, 2692, 200, 200], [4, 27, 2641, 528, 200, 200], [4, 27, 2325, 528, 200, 200], [4, 27, 1960, 2857, 200, 200], [4, 27, 7283, 3070, 200, 200], [1, 13, 6770, 3225, 200, 200], [4, 27, 6401, 3545, 200, 200], [4, 27, 8747, 269, 200, 200], [1, 13, 8223, 377, 300, 100], [1, 13, 8568, 2262, 200, 200], [4, 27, 6255, 3157, 200, 200], [4, 27, 4567, 2331, 200, 200], [4, 27, 4810, 2908, 200, 200], [4, 27, 4555, 2908, 200, 200], [4, 27, 4300, 2908, 200, 200], [1, 13, 5800, 3100, 400, 200], [1, 13, 7368, 2582, 2200, 500], [1, 6, 4593, 3231, 900, 32], [1, 13, 5250, 3568, 700, 300], [1, 13, 3949, 3658, 700, 300], [1, 14, 5980, 2893, 40, 150], [1, 2, 8902, 3506, 300, 32], [1, 2, 8228, 3817, 200, 32], [3, 29, 3445, 3583, 90, 90], [3, 29, 1517, 3306, 90, 90], [3, 29, 1517, 3431, 90, 90], [3, 29, 8888, 3445, 90, 90], [3, 29, 734, 3633, 90, 90], [3, 29, 6693, 3683, 90, 90], [3, 29, 8616, 3589, 90, 90], [3, 29, 2387, 2547, 90, 90], [3, 29, 2387, 2842, 90, 90], [3, 29, 3362, 3743, 90, 90], [3, 29, 76, 2938, 90, 90], [3, 29, 76, 3107, 90, 90], [1, 2, 50, 2999, 200, 32], [1, 2, 50, 3168, 200, 32], [3, 29, 1155, 1928, 90, 90], [3, 29, 5706, 3565, 90, 90], [3, 29, 5878, 3490, 90, 90], [3, 29, 5453, 3012, 90, 90], [3, 29, 6166, 2409, 90, 90], [3, 29, 6121, 2755, 90, 90], [3, 29, 6884, 1443, 90, 90], [3, 29, 7052, 1443, 90, 90], [1, 2, 5700, 3628, 200, 32], [1, 2, 5750, 3804, 300, 32], [1, 2, 5930, 3551, 200, 32], [1, 14, 5980, 3286, 40, 200], [1, 2, 6965, 1504, 300, 32], [2, 24, 6130, 376, 40, 38], [3, 29, 8400, 3006, 90, 90], [3, 29, 8400, 3144, 90, 90], [2, 24, 8204, 2281, 40, 38], [3, 29, 7818, 3280, 90, 90], [3, 29, 8016, 3280, 90, 90], [3, 29, 8909, 2915, 90, 90], [3, 29, 8909, 2811, 90, 90], [3, 29, 2906, 2385, 90, 90], [3, 29, 3204, 2382, 90, 90], [3, 29, 3377, 2100, 90, 90], [3, 29, 3778, 2001, 90, 90], [3, 29, 4119, 2001, 90, 90], [3, 29, 4354, 2080, 90, 90], [3, 29, 4357, 2357, 90, 90], [3, 29, 4573, 2492, 90, 90], [3, 29, 4842, 2201, 90, 90], [3, 29, 5133, 2001, 90, 90], [3, 29, 5435, 2295, 90, 90], [3, 29, 5432, 2054, 90, 90], [3, 29, 5567, 2471, 90, 90], [3, 29, 5826, 2526, 90, 90], [1, 2, 6168, 2470, 200, 32], [3, 29, 7245, 1018, 90, 90], [3, 29, 8769, 46, 90, 90], [3, 29, 6103, 3245, 90, 90], [3, 29, 2807, 1755, 90, 90], [3, 29, 2534, 1818, 90, 90], [3, 29, 2410, 2092, 90, 90], [3, 29, 6085, 3786, 90, 90], [3, 29, 6573, 3548, 90, 90], [3, 29, 6413, 3314, 90, 90], [3, 29, 6117, 3004, 90, 90], [3, 29, 6355, 2908, 90, 90], [3, 29, 6593, 3014, 90, 90], [3, 29, 6919, 3014, 90, 90], [3, 29, 7239, 2908, 90, 90], [3, 29, 7543, 2908, 90, 90], [3, 29, 7811, 3014, 90, 90], [3, 29, 8609, 2744, 90, 90], [3, 29, 8934, 2576, 90, 90], [3, 29, 8743, 2404, 90, 90], [3, 29, 8909, 2249, 90, 90], [3, 29, 8909, 2145, 90, 90], [3, 29, 8228, 3756, 90, 90], [3, 29, 8648, 1879, 90, 90], [3, 29, 8361, 1879, 90, 90], [3, 29, 8074, 1879, 90, 90], [3, 29, 7856, 1631, 90, 90], [3, 29, 7874, 1441, 90, 90], [3, 29, 7676, 1385, 90, 90], [3, 29, 7460, 1491, 90, 90], [3, 29, 7048, 1713, 90, 90], [3, 29, 6120, 1217, 90, 90], [3, 29, 6272, 1707, 90, 90], [3, 29, 5927, 1601, 90, 90], [3, 29, 5923, 1323, 90, 90], [3, 29, 6360, 1323, 90, 90], [1, 2, 8850, 1974, 400, 32], [1, 2, 7045, 1775, 200, 32], [2, 24, 4042, 1869, 40, 38], [3, 29, 6967, 1274, 90, 90], [3, 29, 6961, 1112, 90, 90], [1, 2, 7374, 1672, 400, 32], [1, 2, 6900, 1335, 600, 32], [3, 29, 6593, 822, 90, 90], [3, 29, 6876, 822, 90, 90], [3, 29, 7142, 830, 90, 90], [3, 29, 7473, 1207, 90, 90], [3, 29, 7730, 1009, 90, 90], [3, 29, 7874, 717, 90, 90], [3, 29, 8123, 899, 90, 90], [3, 29, 8112, 1144, 90, 90], [3, 29, 8487, 1098, 90, 90], [3, 29, 8599, 849, 90, 90], [3, 29, 8770, 687, 90, 90], [3, 29, 8819, 526, 90, 90], [3, 29, 8925, 278, 90, 90], [3, 29, 8529, 138, 90, 90], [3, 29, 8237, 138, 90, 90], [2, 24, 7923, 376, 40, 38], [3, 29, 1340, 223, 90, 90], [3, 29, 3850, 305, 90, 90], [3, 29, 3578, 305, 90, 90], [3, 29, 3063, 199, 90, 90], [3, 29, 2806, 316, 90, 90], [3, 29, 2751, 658, 90, 90], [3, 29, 2476, 690, 90, 90], [3, 29, 2257, 679, 90, 90], [3, 29, 2093, 488, 90, 90], [3, 29, 2131, 290, 90, 90], [3, 29, 1946, 198, 90, 90], [3, 29, 1696, 305, 90, 90], [2, 26, 4000, 1018, 100, 100], [1, 13, 3900, 889, 300, 100], [3, 29, 3100, 1223, 90, 90], [3, 29, 2300, 1381, 90, 90], [3, 29, 3456, 2775, 90, 90], [3, 29, 5716, 2852, 90, 90], [3, 29, 5505, 2852, 90, 90], [3, 29, 5294, 2852, 90, 90], [3, 29, 5083, 2852, 90, 90], [3, 29, 4911, 2747, 90, 90], [3, 29, 4710, 2747, 90, 90], [3, 29, 4509, 2747, 90, 90], [3, 29, 4308, 2747, 90, 90], [3, 29, 4046, 2583, 90, 90], [3, 29, 3844, 2469, 90, 90], [3, 29, 3536, 2546, 90, 90], [3, 29, 3278, 2546, 90, 90], [3, 29, 3020, 2546, 90, 90], [3, 29, 3867, 761, 90, 90], [3, 29, 3744, 761, 90, 90], [3, 29, 3620, 761, 90, 90], [3, 29, 3497, 761, 90, 90], [3, 29, 100, 1863, 90, 90], [3, 29, 100, 1736, 90, 90], [3, 29, 100, 1609, 90, 90], [1, 11, 1041, 1567, 50, 50], [2, 25, 872, 1557, 70, 70], [3, 29, 664, 1441, 90, 90], [3, 29, 664, 1547, 90, 90], [3, 29, 552, 1441, 90, 90], [3, 29, 552, 1547, 90, 90], [3, 29, 440, 1441, 90, 90], [3, 29, 440, 1547, 90, 90], [3, 29, 328, 1441, 90, 90], [1, 19, 966, 1584.5, 100, 15], [1, 16, 1160, 1527, 40, 130], [1, 14, 1160, 1374.5, 40, 175], [2, 26, 1486, 1206, 100, 100], [1, 11, 1958, 1567, 50, 50], [3, 29, 1182, 2714, 90, 90], [3, 29, 1450, 2714, 90, 90], [3, 29, 1696, 2716, 90, 90], [3, 29, 1792, 2852, 90, 90], [3, 29, 1708, 2979, 90, 90], [3, 29, 1520, 3095, 90, 90], [2, 24, 104, 3303, 40, 38], [2, 24, 1200, 3303, 40, 38], [2, 24, 3164, 3457, 40, 38], [2, 24, 2204, 3941, 40, 38], [1, 14, 1701, 3271, 40, 150], [1, 19, 1893, 3468.5, 100, 15], [1, 16, 1701, 3411, 40, 130], [2, 25, 2149, 3207, 70, 70], [1, 2, 2239, 3258, 300, 32], [2, 26, 2339, 3426, 100, 100], [1, 13, 2239, 3324, 300, 100], [1, 2, 1571, 3180, 300, 32], [3, 29, 96, 3515, 90, 90], [3, 29, 96, 3633, 90, 90], [3, 29, 2089, 2142, 90, 90], [3, 29, 1709, 2380, 90, 90], [3, 29, 1449, 2380, 90, 90], [1, 2, 2093, 2277, 300, 32], [1, 2, 1551, 2441, 1500, 32], [1, 2, 2383, 2745, 200, 32], [1, 14, 2248, 2839.5, 40, 425], [1, 11, 2622, 2790, 50, 50], [1, 14, 2777, 2884.5, 40, 75], [2, 25, 2763, 2780, 70, 70], [1, 18, 3064, 3044.5, 100, 15], [1, 15, 2777, 2987, 40, 130], [1, 2, 7882, 3132, 500, 32], [1, 2, 8396, 3206, 300, 32], [1, 2, 8850, 3161, 400, 32], [1, 2, 6770, 3109, 200, 32], [1, 11, 998, 3653, 50, 50], [1, 14, 1230, 3767.5, 40, 125], [3, 29, 6213, 523, 90, 90], [3, 29, 6090, 523, 90, 90], [3, 29, 5966, 523, 90, 90], [3, 29, 5843, 523, 90, 90], [1, 2, 6028, 584, 500, 32], [3, 29, 6213, 687, 90, 90], [3, 29, 6090, 687, 90, 90], [3, 29, 5966, 687, 90, 90], [3, 29, 5843, 687, 90, 90], [1, 2, 6028, 748, 500, 32], [3, 29, 6213, 851, 90, 90], [3, 29, 6090, 851, 90, 90], [3, 29, 5966, 851, 90, 90], [3, 29, 5843, 851, 90, 90], [1, 2, 8223, 311, 300, 32], [2, 26, 6832, 345, 100, 100], [2, 24, 5340, 376, 40, 38], [1, 2, 8950, 2311, 200, 32], [1, 2, 8568, 2146, 200, 32], [2, 24, 7348, 2281, 40, 38], [2, 24, 6509, 2281, 40, 38], [3, 29, 5526, 1023, 90, 90], [3, 29, 5403, 1023, 90, 90], [3, 29, 5279, 1023, 90, 90], [3, 29, 5156, 1023, 90, 90], [3, 29, 4373, 250, 90, 90], [2, 24, 4699, 376, 40, 38], [1, 13, 4373, 377, 200, 100], [1, 2, 4373, 311, 200, 32], [3, 29, 4551, 509, 90, 90], [3, 29, 4428, 509, 90, 90], [3, 29, 4304, 509, 90, 90], [3, 29, 4181, 509, 90, 90], [1, 2, 4366, 570, 500, 32], [1, 14, 5665, 913, 40, 50], [2, 25, 4898, 822, 70, 70], [1, 14, 5018, 913, 40, 50], [1, 14, 5665, 682, 40, 350], [1, 14, 4790, 913, 40, 50], [1, 2, 5035, 873, 1300, 32], [2, 25, 4622, 1034, 70, 70], [1, 11, 4790, 832, 50, 50], [1, 2, 6028, 912, 500, 32], [1, 2, 6273, 411, 3600, 32], [1, 20, 5100, 849.5, 100, 15], [1, 17, 5018, 1003, 40, 130], [1, 19, 4715, 849.5, 100, 15], [1, 16, 4790, 1003, 40, 130], [1, 18, 5586, 849.5, 100, 15], [1, 15, 5665, 1003, 40, 130], [1, 13, 3500, 1150, 200, 100], [1, 2, 5050, 1084, 3300, 32], [1, 13, 3300, 1249, 200, 100], [1, 2, 3300, 1183, 200, 32], [1, 13, 3100, 1399, 200, 200], [1, 13, 2300, 1559, 200, 200], [1, 2, 3100, 1284, 200, 32], [1, 2, 2600, 1443, 800, 32], [1, 2, 2383, 2903, 200, 32], [1, 2, 3659, 2936, 200, 32], [1, 2, 2697, 2831, 200, 32], [1, 13, 3456, 2952, 200, 200], [3, 29, 4966, 3167, 90, 90], [3, 29, 4781, 3167, 90, 90], [3, 29, 4585, 3167, 90, 90], [3, 29, 4389, 3167, 90, 90], [3, 29, 4192, 3167, 90, 90], [1, 2, 5450, 3073, 300, 32], [1, 14, 3310, 652, 40, 50], [1, 14, 1288, 502, 40, 350], [1, 14, 8372, 3742.5, 40, 175], [1, 14, 7815, 3792.5, 40, 75], [1, 11, 3107, 782, 50, 50], [3, 29, 3306, 305, 90, 90], [1, 2, 3690, 411, 800, 32], [1, 13, 3690, 527, 800, 200], [1, 18, 3032, 799.5, 100, 15], [1, 15, 3310, 742, 40, 130], [2, 25, 2471, 772, 70, 70], [1, 2, 1593, 436, 300, 32], [1, 2, 1722, 600, 500, 32], [1, 2, 1340, 286, 400, 32], [1, 14, 1150, 502, 40, 350], [1, 2, 400, 584, 1000, 32], [1, 20, 722, 560.5, 100, 15], [1, 17, 1288, 742, 40, 130], [1, 19, 150, 560.5, 100, 15], [1, 16, 1150, 742, 40, 130], [2, 25, 747, 772, 70, 70], [2, 25, 155, 772, 70, 70], [2, 24, 2553, 1237, 40, 38], [3, 29, 113, 1047, 90, 90], [1, 2, 100, 972, 300, 32], [1, 2, 100, 1108, 300, 32], [1, 2, 2000, 823, 4100, 32], [3, 29, 328, 1547, 90, 90], [1, 14, 1820, 1374.5, 40, 175], [2, 25, 2122, 1557, 70, 70], [1, 18, 2033, 1584.5, 100, 15], [1, 15, 1820, 1527, 40, 130], [3, 29, 1189, 2380, 90, 90], [2, 24, 485, 1237, 40, 38], [3, 29, 1698, 1710, 90, 90], [3, 29, 621, 2074, 90, 90], [3, 29, 1497, 1877, 90, 90], [1, 13, 2000, 1724, 400, 200], [1, 2, 1700, 1780, 200, 32], [1, 13, 1700, 1996, 200, 400], [1, 2, 1500, 1938, 200, 32], [1, 2, 1000, 2135, 1200, 32], [1, 2, 1320, 1272, 2700, 32], [1, 2, 800, 1608, 1200, 32], [1, 14, 920, 1914, 40, 150], [1, 13, 650, 2442, 300, 100], [2, 25, 201, 2325, 70, 70], [1, 2, 399, 2519, 200, 32], [1, 20, 618, 2352.5, 100, 15], [1, 17, 920, 2054, 40, 130], [1, 2, 5921, 2643, 500, 32], [1, 2, 5316, 3231, 400, 32], [1, 2, 5800, 2984, 400, 32], [1, 2, 6110, 2816, 300, 32], [3, 29, 4585, 3771, 90, 90], [3, 29, 4585, 3627, 90, 90], [3, 29, 4585, 3483, 90, 90], [1, 2, 8900, 2987, 300, 32], [1, 2, 8660, 2816, 300, 32], [3, 29, 7849, 3683, 90, 90], [3, 29, 6816, 3683, 90, 90], [1, 2, 7870, 3341, 2400, 32], [1, 2, 8900, 2647, 400, 32], [1, 2, 8660, 2485, 300, 32], [1, 2, 7368, 2316, 2200, 32], [1, 14, 7043, 3792.5, 40, 75], [1, 2, 7340, 3744, 1500, 32], [1, 19, 6971, 3720.5, 100, 15], [1, 16, 7043, 3895, 40, 130], [3, 29, 8489, 3589, 90, 90], [3, 29, 7681, 3683, 90, 90], [3, 29, 7513, 3683, 90, 90], [1, 2, 2528, 2608, 600, 32], [1, 2, 3456, 2836, 200, 32], [3, 29, 5410, 3915, 90, 90], [3, 29, 5213, 3915, 90, 90], [3, 29, 5017, 3915, 90, 90], [3, 29, 4155, 3915, 90, 90], [3, 29, 3959, 3915, 90, 90], [3, 29, 3763, 3915, 90, 90], [2, 24, 5708, 1869, 40, 38], [2, 26, 4697, 1838, 100, 100], [2, 24, 3531, 1869, 40, 38], [1, 2, 6450, 1463, 300, 32], [1, 2, 4927, 1904, 4500, 32], [3, 29, 47, 2599, 90, 90], [3, 29, 245, 2599, 90, 90], [1, 14, 5580, 3835, 40, 250], [1, 2, 5450, 3402, 1100, 32], [1, 2, 3949, 3492, 700, 32], [1, 2, 3367, 3644, 400, 32], [1, 2, 3357, 3804, 300, 32], [1, 2, 650, 3338, 1400, 32], [1, 2, 700, 2831, 1500, 32], [2, 24, 4587, 3941, 40, 38], [1, 2, 150, 2660, 400, 32], [2, 24, 1235, 1237, 40, 38], [1, 2, 8702, 3650, 700, 32], [3, 29, 4966, 3293, 90, 90], [3, 29, 4781, 3293, 90, 90], [3, 29, 4585, 3293, 90, 90], [3, 29, 4389, 3293, 90, 90], [1, 20, 7336, 3720.5, 100, 15], [1, 17, 8372, 3895, 40, 130], [2, 25, 6953, 3925, 70, 70], [1, 2, 3762, 3231, 600, 32], [1, 18, 7116, 3720.5, 100, 15], [1, 15, 7815, 3895, 40, 130], [1, 2, 2187, 3492, 2200, 32], [1, 3, 3402, 2608, 1000, 32], [1, 2, 450, 2376, 700, 32], [1, 2, 3028, 3068, 1600, 32], [1, 20, 923, 3670.5, 100, 15], [1, 17, 1230, 3895, 40, 130], [1, 14, 637, 3767.5, 40, 125], [2, 24, 1718, 3941, 40, 38], [3, 29, 4192, 3293, 90, 90], [2, 25, 230, 3643, 70, 70], [1, 19, 523, 3670.5, 100, 15], [1, 16, 637, 3895, 40, 130], [1, 2, 600, 3694, 1300, 32], [1, 1, 8700, 3980, 600, 40], [1, 1, 8100, 3980, 600, 40], [1, 1, 7500, 3980, 600, 40], [1, 1, 6900, 3980, 600, 40], [1, 1, 6300, 3980, 600, 40], [1, 1, 5700, 3980, 600, 40], [1, 1, 5100, 3980, 600, 40], [1, 1, 4500, 3980, 600, 40], [1, 1, 3900, 3980, 600, 40], [1, 1, 3300, 3980, 600, 40], [1, 1, 2700, 3980, 600, 40], [1, 1, 2100, 3980, 600, 40], [1, 1, 1500, 3980, 600, 40], [1, 1, 900, 3980, 600, 40], [1, 1, 300, 3980, 600, 40], [6, 30, 7779, 337, 160, 96], [6, 30, 5740, 337, 700, 96], [6, 30, 2935, 3902, 160, 96], [6, 30, 7776, 2242, 700, 96], [6, 30, 2816, 3418, 160, 96], [6, 30, 650, 3264, 800, 96], [6, 30, 7415, 337, 160, 96], [6, 30, 6480, 337, 600, 96], [6, 30, 4365, 1830, 160, 96], [6, 30, 7223, 337, 160, 96], [6, 30, 5021, 337, 600, 96], [6, 30, 954, 1198, 160, 96], [6, 30, 758, 1198, 160, 96], [6, 30, 6956, 2242, 700, 96], [6, 30, 5369, 1830, 160, 96], [6, 30, 5179, 1830, 160, 96], [6, 30, 3796, 1830, 160, 96], [6, 30, 2003, 1198, 600, 96], [6, 30, 2532, 3902, 600, 96], [6, 30, 1966, 3902, 160, 96], [7, 55, 7441, 3854, 190, 148], [7, 66, 8121, 42, 80, 40], [7, 69, 8930, 520, 50, 80], [7, 67, 6071, 3685, 80, 40], [7, 67, 6778, 2913, 80, 40], [7, 67, 8078, 2913, 80, 40], [7, 68, 2883, 495, 50, 80], [7, 69, 5995, 1464, 50, 80], [7, 66, 8667, 1777, 80, 40], [7, 66, 7453, 1393, 80, 40], [7, 67, 6520, 720, 80, 40], [7, 67, 6386, 1222, 80, 40], [7, 66, 6378, 1607, 80, 40], [7, 66, 3864, 203, 80, 40], [7, 66, 1696, 203, 80, 40], [7, 66, 1989, 2042, 80, 40], [7, 66, 2907, 1654, 80, 40], [7, 67, 4122, 2100, 80, 40], [7, 67, 5928, 2392, 80, 40], [7, 66, 5700, 2751, 80, 40], [7, 66, 3643, 2365, 80, 40], [7, 67, 2616, 2391, 80, 40], [7, 67, 1090, 2610, 80, 40], [7, 66, 1390, 2996, 80, 40], [7, 57, 8661, 3854, 190, 148], [7, 52, 1474.5, 3853, 189, 148], [7, 55, 841, 3854, 190, 148], [1, 23, 3236.5, 1683.5, 67, 145], [1, 23, 8544.5, 2057.5, 67, 145], [1, 23, 8128.5, 222.5, 67, 145], [7, 53, 3596.5, 954, 189, 148], [7, 53, 2533.5, 3380, 189, 148], [1, 23, 2838.5, 1354.5, 67, 145], [7, 56, 6723.5, 3854, 189, 148], [7, 56, 4280, 954, 190, 148], [1, 23, 1720.5, 734.5, 67, 145], [1, 23, 798.5, 2742.5, 67, 145], [1, 23, 3765.5, 3403.5, 67, 145], [7, 56, 452, 693, 190, 148], [8, 59, 6476, 1022.5, 82, 91], [8, 59, 5944, 1022.5, 82, 91], [8, 64, 3230.5, 966.5, 179, 89], [8, 64, 2956.5, 1106.5, 179, 89], [8, 62, 3102, 460.5, 176, 77], [8, 62, 3102, 593.5, 176, 77], [8, 64, 886.5, 361.5, 179, 89], [8, 58, 3082, 1545.5, 106, 93], [8, 64, 6852.5, 168.5, 179, 89], [8, 64, 5940.5, 134.5, 179, 89], [8, 64, 4464.5, 116.5, 179, 89], [8, 64, 4918.5, 164.5, 179, 89], [8, 64, 5368.5, 191.5, 179, 89], [8, 64, 8576.5, 1639.5, 179, 89], [8, 62, 2090, 974.5, 176, 77], [8, 62, 1872, 1050.5, 176, 77], [8, 62, 1676, 918.5, 176, 77], [8, 62, 1404, 1048.5, 176, 77], [8, 62, 1210, 1004.5, 176, 77], [8, 62, 940, 1036.5, 176, 77], [8, 62, 626, 995.5, 176, 77], [8, 59, 446, 523.5, 82, 91], [8, 63, 5356.5, 663, 355, 166], [8, 60, 6669.5, 1834.5, 139, 105], [8, 62, 5005, 1655.5, 176, 77], [8, 64, 4748.5, 1707.5, 179, 89], [8, 62, 4487, 1655.5, 176, 77], [8, 64, 4200.5, 1707.5, 179, 89], [8, 62, 3923, 1655.5, 176, 77], [8, 58, 1340, 1670.5, 106, 93], [8, 63, 1496.5, 1441, 355, 166], [8, 64, 1289.5, 2566.5, 179, 89], [8, 64, 716.5, 1923.5, 179, 89], [8, 59, 380, 2768.5, 82, 91], [8, 59, 944, 2377.5, 82, 91], [8, 58, 572, 2539.5, 106, 93], [8, 58, 2393, 2965.5, 106, 93], [8, 62, 5708, 2328.5, 176, 77], [8, 62, 6064, 2254.5, 176, 77], [8, 62, 7820, 2044.5, 176, 77], [8, 62, 6942, 2044.5, 176, 77], [8, 63, 7377.5, 2047, 355, 166], [8, 60, 8904.5, 1905.5, 139, 105], [8, 64, 8760.5, 2064.5, 179, 89], [8, 58, 8564, 2548.5, 106, 93], [8, 59, 7540, 3278.5, 82, 91], [8, 59, 7298, 3278.5, 82, 91], [8, 59, 7068, 3278.5, 82, 91], [8, 64, 8568.5, 2960.5, 179, 89], [8, 59, 6026, 2578.5, 82, 91], [8, 60, 5678.5, 3334.5, 139, 105], [8, 62, 5108, 3026.5, 176, 77], [8, 59, 3954, 3168.5, 82, 91], [8, 64, 3058.5, 3257.5, 179, 89], [8, 65, 6234.5, 3894.5, 265, 211], [8, 65, 4128.5, 3894.5, 265, 211], [8, 62, 1904, 3301.5, 176, 77], [8, 64, 408.5, 3489.5, 179, 89], [8, 63, 7592.5, 3507, 355, 166], [8, 59, 4774, 3915.5, 82, 91], [8, 60, 3598.5, 3908.5, 139, 105], [8, 64, 960.5, 3076.5, 179, 89], [8, 64, 506.5, 3035.5, 179, 89], [8, 58, 902, 3401.5, 106, 93], [1, 22, 8896, 3842, 116, 150]];
}
Symbol 1715 MovieClip [__Packages.Game.MapData_3] Frame 0
class Game.MapData_3
{
function MapData_3 () {
}
static function getMapData() {
return(levelMaps);
}
static var levelMaps = [[5, 34, 8831, 520, 14, 300], [5, 33, 8488, 177, 300, 14], [5, 36, 8738, 270, 200, 200], [5, 34, 8831, 820, 14, 300], [5, 38, 8738, 1070, 200, 200], [5, 32, 8488, 1163, 300, 14], [5, 33, 8226, 2517, 300, 14], [5, 32, 8526, 2131, 300, 14], [5, 39, 8776, 2424, 200, 200], [5, 37, 8776, 2224, 200, 200], [5, 33, 8526, 2517, 300, 14], [5, 32, 6982, 525, 300, 14], [5, 32, 6682, 525, 300, 14], [5, 33, 6982, 138, 300, 14], [5, 33, 6682, 138, 300, 14], [5, 40, 6232, 1770, 200, 200], [5, 32, 7082, 1863, 300, 14], [5, 32, 6782, 1863, 300, 14], [5, 32, 6482, 1863, 300, 14], [5, 37, 6046, 1570, 200, 200], [5, 43, 5846, 1570, 200, 200], [5, 38, 5660, 1770, 200, 200], [5, 32, 5410, 1863, 300, 14], [5, 32, 5110, 1863, 300, 14], [5, 32, 4810, 1863, 300, 14], [5, 33, 7802, 1670, 300, 14], [5, 39, 8052, 1577, 200, 200], [5, 37, 8052, 1377, 200, 200], [5, 32, 7802, 1284, 300, 14], [5, 32, 7502, 1284, 300, 14], [5, 32, 7202, 1284, 300, 14], [5, 33, 849, 315, 300, 14], [5, 42, 599, 408, 200, 200], [5, 47, 313, 1008, 400, 400], [5, 35, 506, 658, 14, 300], [5, 33, 2828, 937, 300, 14], [5, 33, 5695, 524, 300, 14], [5, 39, 5945, 431, 200, 200], [5, 42, 6132, 231, 200, 200], [5, 33, 6382, 138, 300, 14], [5, 36, 7232, 231, 200, 200], [5, 38, 7232, 431, 200, 200], [5, 32, 5995, 911, 300, 14], [5, 34, 4261, 1314, 14, 300], [5, 43, 4354, 1064, 200, 200], [5, 38, 4168, 1564, 200, 200], [5, 43, 6432, 618, 200, 200], [5, 38, 6245, 818, 200, 200], [5, 32, 4603, 971, 300, 14], [5, 32, 3917, 1658, 300, 14], [5, 33, 3128, 937, 300, 14], [5, 36, 3378, 1030, 200, 200], [5, 38, 3378, 1230, 200, 200], [5, 32, 3129, 1324, 300, 14], [5, 32, 2829, 1324, 300, 14], [5, 32, 2529, 1324, 300, 14], [5, 32, 2229, 1323, 300, 14], [5, 32, 1928, 1323, 300, 14], [5, 32, 1628, 1323, 300, 14], [5, 32, 1328, 1323, 300, 14], [5, 32, 1028, 1323, 300, 14], [5, 32, 728, 1323, 300, 14], [5, 43, 478, 1415, 200, 200], [5, 41, 478, 1615, 200, 200], [5, 33, 728, 1708, 300, 14], [5, 35, 120, 1658, 14, 300], [5, 35, 120, 1358, 14, 300], [5, 32, 463, 2001, 300, 14], [5, 40, 213, 1908, 200, 200], [5, 32, 3227, 2191, 300, 14], [5, 32, 2927, 2191, 300, 14], [5, 43, 2677, 2284, 200, 200], [5, 40, 3577, 3072, 200, 200], [5, 35, 3484, 2822, 14, 300], [5, 42, 3577, 2572, 200, 200], [5, 32, 3827, 3165, 300, 14], [5, 33, 3827, 2479, 300, 14], [5, 36, 4077, 2572, 200, 200], [5, 34, 4170, 2822, 14, 300], [5, 38, 4077, 3072, 200, 200], [5, 43, 3726, 2730, 200, 200], [5, 41, 3726, 2931, 200, 200], [5, 39, 3927, 2930, 200, 200], [5, 37, 3927, 2730, 200, 200], [5, 32, 372, 2991, 300, 14], [5, 32, 2625, 3736, 300, 14], [5, 41, 2677, 2484, 200, 200], [5, 36, 2876, 2670, 200, 200], [5, 38, 2876, 2870, 200, 200], [5, 43, 2676, 3057, 200, 200], [5, 41, 2676, 3257, 200, 200], [5, 36, 2875, 3443, 200, 200], [5, 38, 2875, 3643, 200, 200], [5, 32, 1572, 2991, 300, 14], [5, 32, 1272, 2991, 300, 14], [5, 34, 1915, 2647, 14, 300], [5, 33, 1272, 2304, 300, 14], [5, 33, 1572, 2304, 300, 14], [5, 36, 1822, 2397, 200, 200], [5, 38, 1822, 2898, 200, 200], [5, 32, 972, 2991, 300, 14], [5, 32, 672, 2991, 300, 14], [3, 29, 8740, 3570, 90, 90], [3, 29, 8740, 3676, 90, 90], [2, 25, 7303, 3925, 70, 70], [2, 24, 7507, 3405, 40, 38], [2, 24, 721, 3347, 40, 38], [1, 2, 1191, 314, 200, 32], [1, 2, 6283, 3308, 200, 32], [1, 2, 6523, 3179, 200, 32], [3, 29, 5215, 3378, 90, 90], [3, 29, 5369, 3378, 90, 90], [3, 29, 8515, 1743, 90, 90], [3, 29, 8279, 1919, 90, 90], [1, 11, 7609, 2098, 50, 50], [1, 14, 7767, 1918, 40, 150], [2, 25, 7418, 2088, 70, 70], [1, 19, 7532, 2115.5, 100, 15], [1, 16, 7767, 2058, 40, 130], [3, 29, 8117, 1665, 90, 90], [3, 29, 7805, 1723, 90, 90], [4, 27, 8268, 1479, 200, 200], [3, 29, 3233, 3378, 90, 90], [1, 2, 3285, 3439, 300, 32], [1, 13, 3235, 2809, 200, 900], [1, 11, 7128, 3935, 50, 50], [3, 29, 8217, 3678, 90, 90], [3, 29, 8079, 3678, 90, 90], [1, 14, 8382, 3530.5, 40, 125], [3, 29, 6148, 3073, 90, 90], [3, 29, 6148, 2951, 90, 90], [1, 11, 7144, 846, 50, 50], [3, 29, 2574, 751, 90, 90], [3, 29, 2374, 923, 90, 90], [3, 29, 2145, 640, 90, 90], [3, 29, 1217, 545, 90, 90], [3, 29, 1372, 545, 90, 90], [3, 29, 1217, 640, 90, 90], [3, 29, 1372, 640, 90, 90], [3, 29, 2252, 3477, 90, 90], [3, 29, 2010, 3477, 90, 90], [3, 29, 1769, 3677, 90, 90], [3, 29, 1244, 3677, 90, 90], [3, 29, 1112, 3677, 90, 90], [3, 29, 8190, 2571, 90, 90], [3, 29, 8467, 2571, 90, 90], [3, 29, 8736, 2561, 90, 90], [4, 27, 8752, 2327, 200, 200], [3, 29, 8925, 2329, 90, 90], [3, 29, 8722, 2083, 90, 90], [2, 24, 7995, 3405, 40, 38], [3, 29, 8876, 3570, 90, 90], [3, 29, 8916, 3223, 90, 90], [3, 29, 8771, 817, 90, 90], [3, 29, 8916, 3088, 90, 90], [3, 29, 8916, 2954, 90, 90], [2, 26, 8211, 3374, 100, 100], [2, 24, 8907, 3405, 40, 38], [1, 14, 7000, 3361.5, 40, 125], [1, 6, 7195, 2485, 1200, 32], [3, 29, 5526, 2859, 90, 90], [3, 29, 5228, 2859, 90, 90], [3, 29, 4930, 2515, 90, 90], [3, 29, 4930, 2625, 90, 90], [3, 29, 4930, 2859, 90, 90], [1, 14, 8803, 2966, 40, 150], [1, 2, 4671, 3058, 200, 32], [1, 14, 5055, 2453.5, 40, 175], [1, 19, 5250, 2663.5, 100, 15], [1, 16, 5055, 2606, 40, 130], [1, 14, 5678, 2737.5, 40, 75], [1, 20, 5551, 2663.5, 100, 15], [1, 17, 5678, 2840, 40, 130], [2, 25, 5752, 2636, 70, 70], [1, 14, 6047, 2453.5, 40, 175], [1, 11, 5931, 2646, 50, 50], [1, 18, 5856, 2663.5, 100, 15], [1, 15, 6047, 2606, 40, 130], [1, 2, 4671, 2782, 200, 32], [1, 2, 6183, 3144, 400, 32], [3, 29, 7729, 2550, 90, 90], [3, 29, 7457, 2550, 90, 90], [3, 29, 7185, 2550, 90, 90], [3, 29, 6913, 2550, 90, 90], [3, 29, 6641, 2550, 90, 90], [1, 2, 5819, 2687, 2000, 32], [1, 2, 8350, 2700, 1400, 32], [1, 13, 6723, 3574, 200, 500], [3, 29, 6521, 3915, 90, 90], [3, 29, 8876, 3676, 90, 90], [1, 2, 8030, 3440, 2100, 32], [2, 24, 7819, 3022, 40, 38], [2, 24, 7163, 3022, 40, 38], [2, 24, 6635, 3022, 40, 38], [3, 29, 6523, 3247, 90, 90], [3, 29, 6283, 3407, 90, 90], [3, 29, 6521, 3572, 90, 90], [3, 29, 6283, 3743, 90, 90], [1, 2, 6623, 3308, 400, 32], [1, 2, 6523, 3468, 200, 32], [1, 2, 6523, 3633, 200, 32], [1, 2, 6523, 3804, 200, 32], [3, 29, 8279, 2201, 90, 90], [3, 29, 8279, 2086, 90, 90], [1, 2, 8324, 2269, 500, 32], [3, 29, 8859, 1821, 90, 90], [3, 29, 8897, 1463, 90, 90], [3, 29, 8897, 1583, 90, 90], [3, 29, 8465, 1401, 90, 90], [1, 2, 6969, 982, 300, 32], [3, 29, 7805, 1230, 90, 90], [3, 29, 7503, 1230, 90, 90], [3, 29, 7200, 1338, 90, 90], [3, 29, 8047, 1379, 90, 90], [3, 29, 5600, 579, 90, 90], [3, 29, 5952, 562, 90, 90], [3, 29, 6131, 245, 90, 90], [3, 29, 6359, 84, 90, 90], [3, 29, 6674, 84, 90, 90], [3, 29, 6989, 84, 90, 90], [3, 29, 7314, 160, 90, 90], [3, 29, 7314, 499, 90, 90], [3, 29, 6983, 578, 90, 90], [3, 29, 6689, 472, 90, 90], [3, 29, 6389, 506, 90, 90], [3, 29, 6241, 811, 90, 90], [3, 29, 4315, 1188, 90, 90], [4, 27, 4222, 936, 200, 200], [3, 29, 4169, 1559, 90, 90], [4, 27, 4374, 1453, 200, 200], [3, 29, 7085, 1917, 90, 90], [3, 29, 6809, 1917, 90, 90], [3, 29, 6533, 1917, 90, 90], [3, 29, 6291, 1799, 90, 90], [3, 29, 6153, 1525, 90, 90], [3, 29, 5947, 1424, 90, 90], [3, 29, 5742, 1525, 90, 90], [3, 29, 5620, 1799, 90, 90], [3, 29, 5393, 1917, 90, 90], [3, 29, 5165, 1917, 90, 90], [3, 29, 4937, 1917, 90, 90], [3, 29, 4709, 1917, 90, 90], [2, 24, 4775, 2308, 40, 38], [2, 26, 6165, 2277, 100, 100], [2, 24, 5479, 2308, 40, 38], [4, 27, 5948, 1593, 200, 200], [1, 2, 5771, 2343, 2400, 32], [1, 2, 4471, 2243, 200, 32], [1, 2, 4671, 2515, 200, 32], [1, 2, 5221, 2920, 1300, 32], [1, 20, 6043, 3952.5, 100, 15], [1, 17, 6403, 3895, 40, 130], [1, 2, 4583, 3280, 200, 32], [1, 14, 4970, 3255.5, 40, 75], [1, 14, 4387, 3230.5, 40, 125], [1, 11, 4825, 3161, 50, 50], [2, 25, 5399, 3151, 70, 70], [1, 11, 5707, 3161, 50, 50], [1, 18, 4900, 3178.5, 100, 15], [1, 15, 4387, 3358, 40, 130], [1, 20, 5253, 3178.5, 100, 15], [1, 17, 4970, 3358, 40, 130], [1, 14, 5577, 3255.5, 40, 75], [1, 2, 5251, 3202, 1100, 32], [1, 19, 5632, 3178.5, 100, 15], [1, 16, 5577, 3358, 40, 130], [1, 2, 6283, 3468, 200, 32], [1, 2, 6283, 3633, 200, 32], [1, 2, 6283, 3804, 200, 32], [1, 2, 8500, 3739, 1100, 32], [1, 2, 8049, 1820, 1300, 32], [1, 2, 8630, 1981, 800, 32], [1, 13, 7071, 2209, 200, 300], [1, 2, 7071, 2043, 200, 32], [1, 2, 8392, 325, 400, 32], [1, 14, 8212, 496.5, 40, 275], [1, 2, 8850, 1659, 400, 32], [1, 2, 8595, 1483, 400, 32], [3, 29, 8611, 1221, 90, 90], [3, 29, 8443, 238, 90, 90], [3, 29, 8771, 478, 90, 90], [1, 2, 8800, 1312, 500, 32], [3, 29, 6763, 1084, 90, 90], [1, 13, 7621, 2205, 900, 100], [1, 2, 7621, 2139, 900, 32], [1, 2, 7442, 1506, 1100, 32], [1, 2, 6709, 1406, 400, 32], [1, 2, 6768, 1145, 300, 32], [3, 29, 4507, 764, 90, 90], [3, 29, 4843, 764, 90, 90], [3, 29, 4675, 764, 90, 90], [3, 29, 5164, 835, 90, 90], [3, 29, 5164, 974, 90, 90], [4, 27, 5870, 386, 200, 200], [4, 27, 7208, 334, 200, 200], [4, 27, 6468, 666, 200, 200], [3, 29, 4340, 458, 90, 90], [3, 29, 2977, 416, 90, 90], [3, 29, 2977, 300, 90, 90], [3, 29, 361, 1051, 90, 90], [3, 29, 562, 531, 90, 90], [1, 2, 2374, 986, 200, 32], [1, 13, 2374, 1102, 200, 200], [3, 29, 828, 409, 90, 90], [4, 27, 566, 994, 200, 200], [4, 27, 124, 960, 200, 200], [3, 29, 3489, 184, 90, 90], [3, 29, 3233, 184, 90, 90], [3, 29, 2977, 184, 90, 90], [3, 29, 2721, 184, 90, 90], [3, 29, 2465, 184, 90, 90], [3, 29, 3685, 467, 90, 90], [3, 29, 3489, 314, 90, 90], [1, 2, 3039, 646, 700, 32], [1, 2, 3275, 814, 1600, 32], [1, 13, 824, 686, 300, 400], [1, 2, 824, 470, 300, 32], [3, 29, 2833, 990, 90, 90], [3, 29, 3119, 990, 90, 90], [1, 2, 2824, 1103, 700, 32], [1, 2, 3689, 528, 200, 32], [3, 29, 5011, 458, 90, 90], [3, 29, 4843, 458, 90, 90], [3, 29, 4675, 458, 90, 90], [3, 29, 4507, 458, 90, 90], [1, 2, 4675, 825, 800, 32], [1, 4, 4669, 524, 800, 32], [1, 2, 3939, 675, 700, 32], [1, 2, 5342, 669, 600, 32], [1, 2, 6364, 1308, 400, 32], [3, 29, 6334, 1246, 90, 90], [3, 29, 6334, 1137, 90, 90], [3, 29, 5994, 963, 90, 90], [3, 29, 4709, 2041, 90, 90], [1, 2, 4709, 2102, 200, 32], [1, 14, 3913, 2122, 40, 150], [1, 11, 4038, 2302, 50, 50], [2, 25, 4207, 2292, 70, 70], [1, 20, 4113, 2319.5, 100, 15], [1, 17, 3913, 2262, 40, 130], [3, 29, 4357, 1984, 90, 90], [3, 29, 4201, 1984, 90, 90], [1, 2, 4279, 2044, 400, 32], [3, 29, 4564, 1062, 90, 90], [1, 14, 8058, 703.5, 40, 75], [2, 25, 7839, 836, 70, 70], [1, 18, 7912, 626.5, 100, 15], [1, 15, 8058, 806, 40, 130], [3, 29, 8387, 826, 90, 90], [3, 29, 8533, 826, 90, 90], [1, 2, 7932, 650, 600, 32], [1, 13, 7869, 953, 1500, 100], [1, 2, 7869, 887, 1500, 32], [2, 24, 2504, 1968, 40, 38], [3, 29, 1783, 1941, 90, 90], [3, 29, 1545, 1773, 90, 90], [3, 29, 1189, 1937, 90, 90], [3, 29, 79, 2252, 90, 90], [3, 29, 79, 2417, 90, 90], [3, 29, 500, 1623, 90, 90], [3, 29, 730, 1762, 90, 90], [1, 2, 1181, 1997, 400, 32], [1, 13, 1181, 2063, 400, 100], [2, 25, 437, 2599, 70, 70], [1, 13, 910, 2594, 200, 200], [1, 14, 329, 2379, 40, 250], [1, 2, 60, 2312, 200, 32], [1, 2, 60, 2479, 200, 32], [1, 19, 693, 2626.5, 100, 15], [1, 16, 329, 2569, 40, 130], [3, 29, 1789, 2257, 90, 90], [4, 27, 1380, 2881, 200, 200], [4, 27, 1986, 2975, 200, 200], [3, 29, 1532, 3044, 90, 90], [3, 29, 1240, 3044, 90, 90], [3, 29, 948, 3044, 90, 90], [3, 29, 656, 3044, 90, 90], [3, 29, 364, 3044, 90, 90], [1, 2, 50, 3210, 200, 32], [1, 2, 2253, 3539, 800, 32], [1, 2, 2371, 358, 544, 32], [1, 13, 1531, 1950, 300, 200], [1, 13, 3831, 1969, 500, 100], [1, 2, 3831, 1904, 500, 32], [1, 13, 3489, 541, 200, 300], [1, 2, 3489, 375, 200, 32], [1, 2, 1531, 1834, 300, 32], [1, 2, 480, 2229, 600, 32], [1, 14, 1678, 517.5, 40, 75], [1, 5, 3017, 121, 1200, 32], [3, 29, 435, 1308, 90, 90], [3, 29, 2401, 1270, 90, 90], [3, 29, 2652, 1270, 90, 90], [3, 29, 719, 1270, 90, 90], [3, 29, 1470, 1270, 90, 90], [3, 29, 1708, 1270, 90, 90], [3, 29, 1900, 1376, 90, 90], [3, 29, 2184, 1376, 90, 90], [3, 29, 986, 1376, 90, 90], [3, 29, 1259, 1376, 90, 90], [1, 11, 1732, 435, 50, 50], [1, 2, 1697, 476, 700, 32], [2, 25, 1532, 425, 70, 70], [1, 18, 1648, 452.5, 100, 15], [1, 15, 1678, 620, 40, 130], [1, 13, 1624, 867, 1300, 300], [1, 2, 1624, 701, 1300, 32], [4, 27, 3346, 1126, 200, 200], [3, 29, 3514, 1060, 90, 90], [3, 29, 3436, 1317, 90, 90], [3, 29, 3212, 1376, 90, 90], [3, 29, 2920, 1376, 90, 90], [4, 27, 2640, 1438, 200, 200], [4, 27, 2164, 1212, 200, 200], [4, 27, 1714, 1438, 200, 200], [4, 27, 1228, 1212, 200, 200], [4, 27, 760, 1438, 200, 200], [4, 27, 254, 1523, 200, 200], [3, 29, 130, 1975, 90, 90], [3, 29, 66, 1741, 90, 90], [3, 29, 66, 1461, 90, 90], [3, 29, 66, 1181, 90, 90], [3, 29, 338, 2053, 90, 90], [3, 29, 560, 2053, 90, 90], [2, 26, 2652, 1936, 100, 100], [2, 24, 3473, 1968, 40, 38], [2, 24, 1930, 1968, 40, 38], [1, 2, 2631, 2003, 1900, 32], [1, 2, 880, 2097, 200, 32], [1, 2, 720, 1856, 400, 32], [1, 13, 880, 2163, 200, 100], [1, 18, 7203, 3952.5, 100, 15], [1, 15, 7000, 3895, 40, 130], [1, 14, 8382, 3792.5, 40, 75], [1, 14, 7000, 3640.5, 40, 379], [1, 20, 7825, 3952.5, 100, 15], [1, 17, 8382, 3658, 40, 130], [1, 19, 8556, 3715.5, 100, 15], [1, 16, 8382, 3895, 40, 130], [2, 25, 7691, 3925, 70, 70], [3, 29, 3247, 2244, 90, 90], [3, 29, 2931, 2244, 90, 90], [3, 29, 2660, 2172, 90, 90], [1, 2, 7623, 3057, 2400, 32], [1, 13, 4471, 2709, 200, 900], [1, 2, 4785, 3439, 2500, 32], [3, 29, 3825, 2972, 90, 90], [3, 29, 3825, 2689, 90, 90], [2, 24, 4261, 3941, 40, 38], [1, 2, 3721, 2343, 1300, 32], [3, 29, 4234, 3045, 90, 90], [3, 29, 4214, 2606, 90, 90], [3, 29, 4222, 2830, 90, 90], [3, 29, 3449, 3054, 90, 90], [3, 29, 3449, 2598, 90, 90], [3, 29, 3432, 2830, 90, 90], [3, 29, 3605, 2440, 90, 90], [3, 29, 3827, 2427, 90, 90], [3, 29, 4048, 2440, 90, 90], [3, 29, 3612, 3203, 90, 90], [3, 29, 3827, 3217, 90, 90], [3, 29, 4057, 3203, 90, 90], [3, 29, 3705, 2757, 90, 90], [3, 29, 3707, 2904, 90, 90], [3, 29, 3950, 2757, 90, 90], [3, 29, 3950, 2902, 90, 90], [1, 13, 5914, 1251, 500, 200], [1, 2, 5914, 1135, 500, 32], [3, 29, 5164, 1113, 90, 90], [3, 29, 5164, 1252, 90, 90], [3, 29, 5564, 1222, 90, 90], [3, 29, 5364, 1310, 90, 90], [3, 29, 5164, 1391, 90, 90], [3, 29, 4964, 1286, 90, 90], [3, 29, 4764, 1183, 90, 90], [1, 13, 5564, 1399, 200, 200], [1, 2, 5564, 1283, 200, 32], [1, 13, 5364, 1487, 200, 200], [1, 2, 5364, 1371, 200, 32], [1, 13, 5164, 1575, 200, 200], [1, 2, 5164, 1459, 200, 32], [1, 13, 4964, 1463, 200, 200], [1, 2, 4964, 1347, 200, 32], [1, 13, 4764, 1359, 200, 200], [1, 2, 4765, 1243, 200, 32], [1, 13, 4564, 1239, 200, 200], [1, 2, 4564, 1123, 200, 32], [3, 29, 3919, 1710, 90, 90], [2, 26, 3233, 3910, 100, 100], [3, 29, 2529, 2388, 90, 90], [3, 29, 2719, 2623, 90, 90], [3, 29, 3025, 2776, 90, 90], [3, 29, 2847, 3007, 90, 90], [3, 29, 2550, 3061, 90, 90], [3, 29, 2675, 3380, 90, 90], [3, 29, 2921, 3334, 90, 90], [3, 29, 3026, 3545, 90, 90], [3, 29, 2622, 3789, 90, 90], [1, 11, 1693, 3697, 50, 50], [1, 18, 1435, 3714.5, 100, 15], [1, 15, 2154, 3895, 40, 130], [2, 24, 5102, 3941, 40, 38], [2, 24, 3525, 3941, 40, 38], [2, 24, 5866, 3941, 40, 38], [1, 13, 3235, 3655, 200, 400], [4, 27, 2855, 3543, 200, 200], [4, 27, 2696, 3150, 200, 200], [4, 27, 2854, 2767, 200, 200], [4, 27, 2695, 2399, 200, 200], [1, 14, 6403, 3405, 40, 850], [1, 13, 50, 3326, 200, 200], [1, 2, 1210, 2478, 800, 32], [1, 14, 2154, 3692.5, 40, 275], [1, 14, 1315, 3792.5, 40, 75], [1, 14, 652, 3767.5, 40, 125], [1, 11, 1360, 3697, 50, 50], [3, 29, 1270, 2370, 90, 90], [3, 29, 1551, 2358, 90, 90], [3, 29, 1709, 2937, 90, 90], [4, 27, 1769, 2445, 200, 200], [4, 27, 1010, 2881, 200, 200], [3, 29, 1965, 2437, 90, 90], [1, 2, 360, 2650, 900, 32], [3, 29, 1972, 2679, 90, 90], [2, 24, 930, 3347, 40, 38], [2, 24, 1743, 3347, 40, 38], [1, 2, 1100, 3382, 1900, 32], [1, 11, 647, 3649, 50, 50], [2, 25, 1578, 3687, 70, 70], [1, 19, 1071, 3952.5, 100, 15], [1, 16, 1315, 3895, 40, 130], [1, 2, 1423, 3738, 800, 32], [2, 25, 384, 3925, 70, 70], [2, 25, 463, 3639, 70, 70], [1, 2, 350, 3690, 800, 32], [1, 20, 569, 3666.5, 100, 15], [1, 17, 652, 3895, 40, 130], [1, 1, 8700, 3980, 600, 40], [1, 1, 8100, 3980, 600, 40], [1, 1, 7500, 3980, 600, 40], [1, 1, 6900, 3980, 600, 40], [1, 1, 6300, 3980, 600, 40], [1, 1, 5700, 3980, 600, 40], [1, 1, 5100, 3980, 600, 40], [1, 1, 4500, 3980, 600, 40], [1, 1, 3900, 3980, 600, 40], [1, 1, 3300, 3980, 600, 40], [1, 1, 2700, 3980, 600, 40], [1, 1, 2100, 3980, 600, 40], [1, 1, 1500, 3980, 600, 40], [1, 1, 900, 3980, 600, 40], [1, 1, 300, 3980, 600, 40], [6, 30, 7238, 3366, 400, 96], [6, 30, 8150, 2983, 600, 96], [6, 30, 7651, 3366, 160, 96], [6, 30, 7833, 3366, 160, 96], [6, 30, 7478, 2983, 600, 96], [6, 30, 8625, 2983, 160, 96], [6, 30, 6919, 2983, 160, 96], [6, 30, 8564, 3366, 600, 96], [6, 30, 5118, 2269, 500, 96], [6, 30, 6803, 2269, 160, 96], [6, 30, 6611, 2269, 160, 96], [6, 30, 5808, 2269, 500, 96], [6, 30, 3257, 1929, 160, 96], [6, 30, 409, 3313, 500, 96], [6, 30, 2215, 1929, 400, 96], [6, 30, 3051, 1929, 160, 96], [6, 30, 4090, 3902, 160, 96], [6, 30, 3894, 3902, 160, 96], [6, 30, 5490, 3902, 500, 96], [6, 30, 4677, 3902, 600, 96], [6, 30, 1334, 3312.5, 750, 93], [7, 56, 8139, 3846, 190, 148], [7, 53, 3021, 3854, 190, 148], [7, 56, 7285.5, 749, 189, 148], [7, 68, 8889, 718, 50, 80], [7, 66, 8383, 1115, 80, 40], [7, 67, 8378, 126, 80, 40], [1, 23, 7518.5, 1731.5, 67, 145], [7, 67, 6662, 190, 80, 40], [7, 68, 4203, 1294, 50, 80], [7, 66, 6519, 1817, 80, 40], [7, 66, 5399, 1817, 80, 40], [7, 67, 8122, 2470, 80, 40], [7, 66, 8419, 2082, 80, 40], [7, 69, 8079, 1487, 50, 80], [7, 68, 7377, 338, 50, 80], [7, 67, 7694, 1622, 80, 40], [7, 66, 7092, 1235, 80, 40], [7, 66, 7183, 1817, 80, 40], [7, 66, 4703, 1817, 80, 40], [7, 67, 5598, 474, 80, 40], [7, 66, 5899, 862, 80, 40], [7, 66, 4677, 923, 80, 40], [7, 69, 177, 1743, 50, 80], [7, 69, 449, 667, 50, 80], [7, 67, 942, 272, 80, 40], [7, 66, 3805, 1610, 80, 40], [7, 67, 2730, 890, 80, 40], [7, 66, 3037, 1275, 80, 40], [7, 66, 561, 1955, 80, 40], [7, 67, 834, 1665, 80, 40], [7, 67, 3830, 3059, 80, 40], [7, 66, 3828, 2600, 80, 40], [7, 67, 3830, 2516, 80, 40], [7, 69, 3527, 2825, 50, 80], [7, 68, 4127, 2822, 50, 80], [7, 66, 3831, 3128, 80, 40], [7, 66, 3335, 2142, 80, 40], [7, 68, 1863, 2650, 50, 80], [7, 67, 1164, 2254, 80, 40], [7, 66, 265, 2942, 80, 40], [7, 68, 2537, 3234, 50, 80], [7, 68, 3007, 3420, 50, 80], [7, 66, 2515, 3689, 80, 40], [1, 23, 5894.5, 3350.5, 67, 145], [7, 57, 8625.5, 3846, 189, 148], [1, 23, 2875.5, 557.5, 67, 145], [1, 23, 3671.5, 1815.5, 67, 145], [1, 23, 907.5, 2389.5, 67, 145], [1, 23, 5765.5, 1046.5, 67, 145], [1, 23, 3581.5, 2254.5, 67, 145], [8, 60, 4670.5, 2714.5, 139, 105], [8, 62, 3178, 1709.5, 176, 77], [8, 62, 3362, 1709.5, 176, 77], [8, 58, 1870, 539.5, 106, 93], [8, 62, 6622, 2825.5, 176, 77], [8, 58, 5072, 2748.5, 106, 93], [8, 58, 5388, 2748.5, 106, 93], [8, 58, 5072, 2983.5, 106, 93], [8, 60, 6372.5, 2618.5, 139, 105], [8, 62, 5874, 2520.5, 176, 77], [8, 62, 5688, 2520.5, 176, 77], [8, 62, 5428, 2521.5, 176, 77], [8, 62, 5244, 2521.5, 176, 77], [8, 63, 7868.5, 407, 355, 166], [8, 60, 7644.5, 1436.5, 139, 105], [8, 59, 6844, 1344.5, 82, 91], [8, 62, 5348, 1104.5, 176, 77], [8, 62, 5348, 1014.5, 176, 77], [8, 62, 5348, 926.5, 176, 77], [8, 64, 4958.5, 1088.5, 179, 89], [8, 64, 4052.5, 535.5, 179, 89], [8, 62, 2720, 727.5, 176, 77], [8, 62, 2904, 727.5, 176, 77], [8, 62, 3088, 727.5, 176, 77], [8, 59, 3280, 750.5, 82, 91], [8, 59, 2326, 296.5, 82, 91], [8, 63, 4356.5, 1821, 355, 166], [8, 58, 7368, 1566.5, 106, 93], [8, 62, 6578, 985.5, 176, 77], [8, 64, 6950.5, 860.5, 179, 89], [8, 64, 6580.5, 356.5, 179, 89], [8, 60, 5330.5, 598.5, 139, 105], [8, 58, 5018, 887.5, 106, 93], [8, 63, 4668.5, 305, 355, 166], [8, 63, 1756.5, 257, 355, 166], [8, 63, 2200.5, 1699, 355, 166], [8, 59, 8000, 2078.5, 82, 91], [8, 60, 7936.5, 2630.5, 139, 105], [8, 64, 6002.5, 2088.5, 179, 89], [8, 64, 5570.5, 2112.5, 179, 89], [8, 64, 5250.5, 2105.5, 179, 89], [8, 58, 4224, 2107.5, 106, 93], [8, 60, 110.5, 2581.5, 139, 105], [8, 58, 702, 2291.5, 106, 93], [8, 62, 1080, 3540.5, 176, 77], [8, 62, 560, 2910.5, 176, 77], [8, 62, 744, 2910.5, 176, 77], [8, 62, 854, 3179.5, 176, 77], [8, 64, 1714.5, 3180.5, 179, 89], [8, 64, 2360.5, 3293.5, 179, 89], [8, 59, 4004, 3376.5, 82, 91], [8, 59, 3708, 3376.5, 82, 91], [8, 58, 8134, 3120.5, 106, 93], [8, 58, 7498, 3120.5, 106, 93], [8, 64, 7188.5, 3172.5, 179, 89], [8, 64, 7784.5, 3198.5, 179, 89], [8, 64, 8534.5, 3183.5, 179, 89], [8, 62, 8552, 3548.5, 176, 77], [8, 62, 8194, 3542.5, 176, 77], [8, 65, 6718.5, 3894.5, 265, 211], [8, 58, 6776, 3120.5, 106, 93], [8, 59, 2414, 3914.5, 82, 91], [8, 65, 1712.5, 3894.5, 265, 211], [8, 62, 1456, 3540.5, 176, 77], [8, 62, 1270, 3540.5, 176, 77], [1, 22, 8896, 3842, 116, 150]];
}
Symbol 1716 MovieClip [__Packages.Game.Spike] Frame 0
class Game.Spike extends Base.Entity
{
var _gameContext, _idx, _type, _class, _xw, _yw, _curPosition, _isActive, _isOnScreen, _isCollidable, _reqUpdate, _gameMode, _curMapArea, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _sprites, _unitXW, _unitYW, _minXW, _minYW, _rad, _maxNumUnitsY, _maxNumUnitsX, _numUnitsMinY, _numUnitsMinX, _numUnitsX, _numUnitsY, _shape, _lineColor, _fillColor, _multiShape, _shapes, _playMode, _xScaleable, _yScaleable;
function Spike (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super();
_gameContext = gameContext;
_idx = idx;
_type = ntype;
_class = Game.GameData.SPIKE;
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = true;
_isOnScreen = false;
_isCollidable = true;
_reqUpdate = false;
_gameMode = _gameContext.getGameData().getGameMode();
_curMapArea = _gameContext.getGameData().getCurrentMapArea();
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_sprites = [];
var _local2;
switch (_type) {
case Game.GameData.GSPIKE :
_unitXW = 100;
_unitYW = 100;
_minXW = 100;
_minYW = 100;
_rad = 50;
_xw = 100;
_yw = 100;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_CIRCLE;
break;
case Game.GameData.ASPIKE :
_unitXW = 180;
_unitYW = 180;
_minXW = 180;
_minYW = 180;
_rad = 90;
_xw = 180;
_yw = 180;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_CIRCLE;
}
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _rad, _xw, _yw, this, _local2, _gameContext.getGameData().getGraphics(), true);
if (_gameMode == Game.GameData.GAME_PLAY) {
createSprites();
} else if (_gameMode == Game.GameData.GAME_EDIT) {
_lineColor = 0;
_fillColor = 5000268 /* 0x4C4C4C */;
}
}
function Update() {
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_shape);
}
function getHitShape() {
return(_shape);
}
function getIsMultiVector() {
return(_multiShape);
}
function getVectorArray() {
return(_shapes);
}
function getNumVectors() {
return(_shapes.length);
}
function setActive(bToggle) {
_isActive = bToggle;
}
function getActive() {
return(_isActive);
}
function setCollidable(bToggle) {
_isCollidable = bToggle;
}
function getCollidable() {
return(_isCollidable);
}
function getOnScreen() {
return(_isOnScreen);
}
function setOnScreen(bToggle) {
if (_isOnScreen == bToggle) {
return(undefined);
}
_isOnScreen = bToggle;
toggleSprites(_isOnScreen);
if (((_gameContext.getGameData().getHero()._hasJustSpawned == false) && (_isOnScreen)) && (!_gameContext.getGameData().getSoundModule().soundIsPlaying("obstacle_blades_loop"))) {
_gameContext.getGameData().getSoundModule().PlaySound("obstacle_blades_loop", 50, 0, 0, 2000);
} else {
_gameContext.getGameData().getSoundModule().StopSound("obstacle_blades_loop");
}
}
function getReqUpdate() {
return(_reqUpdate);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getUnitXW() {
return(_unitXW);
}
function getUnitYW() {
return(_unitYW);
}
function getMinXW() {
return(_minXW);
}
function getMinYW() {
return(_minYW);
}
function getPlayMode() {
return(_playMode);
}
function setPlayMode(bToggle) {
_playMode = bToggle;
}
function getScaleableX() {
return(_xScaleable);
}
function getScaleableY() {
return(_yScaleable);
}
function getLocationEdit() {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
return(undefined);
}
function getSizeEditX() {
return(_isSizeEditX);
}
function setSizeEditX(bToggle) {
_isSizeEditX = bToggle;
return(undefined);
}
function getSizeEditY(Void) {
return(_isSizeEditY);
}
function setSizeEditY(bToggle) {
_isSizeEditY = bToggle;
return(undefined);
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
return(undefined);
}
function getIsSelected(Void) {
return(_editSelected);
}
function toggleSprites(bVisible) {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2]._visible = bVisible;
_local2++;
}
return(undefined);
}
function createSprites() {
switch (_type) {
case Game.GameData.GSPIKE :
var _local2 = _gameContext.getGameData().getBuffer().attachMovie("spike_grndBall", _idx + "spike_grndBall", _gameContext.getGameData().getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx;
_local2._y = getShape().getCurrentPosition()._vy;
_local2.gotoAndStop(1);
_local2.cacheAsBitmap = true;
_sprites.push(_local2);
break;
case Game.GameData.ASPIKE :
_local2 = _gameContext.getGameData().getBuffer().attachMovie("spike_airClaw", _idx + "spike_airClaw", _gameContext.getGameData().getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx;
_local2._y = getShape().getCurrentPosition()._vy;
_sprites.push(_local2);
}
toggleSprites(false);
}
function deleteSprites() {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2].swapDepths(1048000);
_sprites[_local2].removeMovieClip();
_local2++;
}
return(undefined);
}
function RenderEntity(Void) {
if (!_gameMode) {
_shape.Draw();
} else {
if (_editSelected) {
_lineColor = 0;
} else {
_lineColor = 13421772 /* 0xCCCCCC */;
}
if (_maxNumUnitsY == null) {
_shape.DrawScaler("y");
_yScaleable = true;
}
if (_maxNumUnitsX == null) {
_shape.DrawScaler("x");
_xScaleable = true;
}
_shape.Draw();
}
}
function getName(Void) {
return("Spike");
}
function toString(Void) {
return("Spike()");
}
}
Symbol 1717 MovieClip [__Packages.Game.Rail] Frame 0
class Game.Rail extends Base.Entity
{
var _idx, _type, _class, _gameContext, _gameData, _xw, _yw, _curPosition, _isActive, _isOnScreen, _isCollidable, _reqUpdate, _isCloud, _gameMode, _curMapArea, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _sprites, _line, _lineColor, _playMode, _xScaleable, _yScaleable;
function Rail (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super();
_idx = idx;
_type = ntype;
_class = Game.GameData.RAIL;
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = true;
_isOnScreen = true;
_isCollidable = true;
_reqUpdate = false;
_isCloud = true;
_gameMode = _gameContext.getGameData().getGameMode();
_curMapArea = _gameContext.getGameData().getCurrentMapArea();
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_sprites = [];
var _local2;
switch (_type) {
case Game.GameData.RAIL_HOR_lr :
_local2 = Base.LineEntity.LID_HOR_Pos;
break;
case Game.GameData.RAIL_HOR_rl :
_local2 = Base.LineEntity.LID_HOR_Neg;
break;
case Game.GameData.RAIL_VER_up :
_local2 = Base.LineEntity.LID_VER_Neg;
break;
case Game.GameData.RAIL_VER_dn :
_local2 = Base.LineEntity.LID_VER_Pos;
break;
case Game.GameData.RAIL_QTR1_ccl :
_local2 = Base.LineEntity.LID_QTR1_Neg;
break;
case Game.GameData.RAIL_QTR1_cl :
_local2 = Base.LineEntity.LID_QTR1_Pos;
break;
case Game.GameData.RAIL_QTR2_ccl :
_local2 = Base.LineEntity.LID_QTR2_Pos;
break;
case Game.GameData.RAIL_QTR2_cl :
_local2 = Base.LineEntity.LID_QTR2_Neg;
break;
case Game.GameData.RAIL_QTR3_ccl :
_local2 = Base.LineEntity.LID_QTR3_Pos;
break;
case Game.GameData.RAIL_QTR3_cl :
_local2 = Base.LineEntity.LID_QTR3_Neg;
break;
case Game.GameData.RAIL_QTR4_ccl :
_local2 = Base.LineEntity.LID_QTR4_Neg;
break;
case Game.GameData.RAIL_QTR4_cl :
_local2 = Base.LineEntity.LID_QTR4_Pos;
break;
case Game.GameData.RAIL_SNK1_lr :
_local2 = Base.LineEntity.LID_SNK1_Pos;
break;
case Game.GameData.RAIL_SNK1_rl :
_local2 = Base.LineEntity.LID_SNK1_Neg;
break;
case Game.GameData.RAIL_SNK2_lr :
_local2 = Base.LineEntity.LID_SNK2_Pos;
break;
case Game.GameData.RAIL_SNK2_rl :
_local2 = Base.LineEntity.LID_SNK2_Neg;
break;
case Game.GameData.RAIL_SNK3_lr :
_local2 = Base.LineEntity.LID_SNK3_Pos;
break;
case Game.GameData.RAIL_SNK3_rl :
_local2 = Base.LineEntity.LID_SNK3_Neg;
break;
case Game.GameData.RAIL_SNK4_lr :
_local2 = Base.LineEntity.LID_SNK4_Pos;
break;
case Game.GameData.RAIL_SNK4_rl :
_local2 = Base.LineEntity.LID_SNK4_Neg;
}
_line = new Base.LineEntity(_gameContext, _curPosition, _xw, _xw, _yw, this, _local2, _gameData.getGraphics(), true);
if (_gameMode == Game.GameData.GAME_PLAY) {
createSprites();
} else if (_gameMode == Game.GameData.GAME_EDIT) {
_lineColor = 0;
}
}
function Update() {
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_line);
}
function setActive(bTog) {
_isActive = bTog;
}
function getActive() {
return(_isActive);
}
function setCollidable(bTog) {
_isCollidable = bTog;
}
function getCollidable() {
return(_isCollidable);
}
function getOnScreen() {
return(_isOnScreen);
}
function setOnScreen(bTog) {
_isOnScreen = bTog;
toggleSprites(_isOnScreen);
}
function getReqUpdate() {
return(_reqUpdate);
}
function getIsCloud() {
return(_isCloud);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getPlayMode() {
return(_playMode);
}
function setPlayMode(bTog) {
_playMode = bTog;
}
function getScaleableX() {
return(_xScaleable);
}
function getScaleableY() {
return(_yScaleable);
}
function getLocationEdit() {
return(_isLocationEdit);
}
function setLocationEdit(bTog) {
_isLocationEdit = bTog;
}
function getSizeEditX() {
return(_isSizeEditX);
}
function setSizeEditX(bTog) {
_isSizeEditX = bTog;
}
function getSizeEditY() {
return(_isSizeEditY);
}
function setSizeEditY(bTog) {
_isSizeEditY = bTog;
}
function toggleSelected(bTog) {
_editSelected = bTog;
}
function getIsSelected() {
return(_editSelected);
}
function toggleSprites(bVis) {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2]._visible = bVis;
_local2++;
}
return(undefined);
}
function addRailEnd(neighborRail) {
var _local7;
var _local6;
var _local3;
var _local9 = _line.getCollisionPoints()[0].x;
var _local8 = _line.getCollisionPoints()[0].y;
var _local13 = _line.getCollisionPoints()[_line.getCollisionPoints().length - 1].x;
var _local12 = _line.getCollisionPoints()[_line.getCollisionPoints().length - 1].y;
var _local17 = neighborRail._line.getCollisionPoints()[0].x;
var _local16 = neighborRail._line.getCollisionPoints()[0].y;
var _local11 = neighborRail._line.getCollisionPoints()[neighborRail._line.getCollisionPoints().length - 1].x;
var _local10 = neighborRail._line.getCollisionPoints()[neighborRail._line.getCollisionPoints().length - 1].y;
var _local15 = Math.floor(Math.abs(_local9 - _local11));
var _local14 = Math.floor(Math.abs(_local8 - _local10));
if ((_local15 <= 20) && (_local14 <= 20)) {
_local7 = _local13;
_local6 = _local12;
_local3 = 1;
} else {
_local7 = _local9;
_local6 = _local8;
_local3 = -1;
}
var _local2 = "";
if (_line._signx == 0) {
switch (_line._signy) {
case 1 :
if (_local3 == -1) {
_local2 = "rail_end_top_D";
} else {
_local2 = "rail_end_bottom_D";
}
break;
case -1 :
if (_local3 == -1) {
_local2 = "rail_end_top_U";
} else {
_local2 = "rail_end_bottom_U";
}
}
}
if (_line._signy == 0) {
switch (_line._signx) {
case 1 :
if (_local3 == -1) {
_local2 = "rail_end_left_R";
} else {
_local2 = "rail_end_right_R";
}
break;
case -1 :
if (_local3 == -1) {
_local2 = "rail_end_right_L";
} else {
_local2 = "rail_end_left_L";
}
}
}
if ((_line._signx == 1) && (_line._signy == 1)) {
if (_local3 == -1) {
}
}
var _local5 = _gameData.getBuffer().attachMovie(_local2, _idx + _local2, _gameData.getBuffer().getNextHighestDepth());
_local5._x = _local7;
_local5._y = _local6;
_sprites.push(_local5);
}
function createSprites() {
switch (_type) {
case Game.GameData.RAIL_HOR_lr :
var _local2 = _gameData.getBuffer().attachMovie("rail_straight_horRight", _idx + "rail_straight_horRight", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_HOR_rl :
_local2 = _gameData.getBuffer().attachMovie("rail_straight_horLeft", _idx + "rail_straight_horLeft", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_VER_up :
_local2 = _gameData.getBuffer().attachMovie("rail_straight_vertUp", _idx + "rail_straight_vertUp", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_VER_dn :
_local2 = _gameData.getBuffer().attachMovie("rail_straight_vertDown", _idx + "rail_straight_vertDown", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR1_ccl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q1ccl", _idx + "rail_elbow_Q1ccl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR1_cl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q1cl", _idx + "rail_elbow_Q1cl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR2_ccl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q2ccl", _idx + "rail_elbow_Q2ccl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR2_cl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q2cl", _idx + "rail_elbow_Q2cl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR3_ccl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q3ccl", _idx + "rail_elbow_Q3ccl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR3_cl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q3cl", _idx + "rail_elbow_Q3cl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR4_ccl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q4ccl", _idx + "rail_elbow_Q4ccl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_QTR4_cl :
_local2 = _gameData.getBuffer().attachMovie("rail_elbow_Q4cl", _idx + "rail_elbow_Q4cl", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK1_lr :
_local2 = _gameData.getBuffer().attachMovie("rail_snake1_LR", _idx + "rail_snake1_LR", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK1_rl :
_local2 = _gameData.getBuffer().attachMovie("rail_snake1_RL", _idx + "rail_snake1_RL", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK2_lr :
_local2 = _gameData.getBuffer().attachMovie("rail_snake2_LR", _idx + "rail_snake2_LR", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK2_rl :
_local2 = _gameData.getBuffer().attachMovie("rail_snake2_RL", _idx + "rail_snake2_RL", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK3_lr :
_local2 = _gameData.getBuffer().attachMovie("rail_snake3_LR", _idx + "rail_snake3_LR", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK3_rl :
_local2 = _gameData.getBuffer().attachMovie("rail_snake3_RL", _idx + "rail3_snake1_RL", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK4_lr :
_local2 = _gameData.getBuffer().attachMovie("rail_snake4_LR", _idx + "rail_snake4_LR", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
break;
case Game.GameData.RAIL_SNK4_rl :
_local2 = _gameData.getBuffer().attachMovie("rail_snake4_RL", _idx + "rail_snake4_RL", _gameData.getBuffer().getNextHighestDepth());
_local2._x = getShape().getCurrentPosition()._vx - (_xw / 2);
_local2._y = getShape().getCurrentPosition()._vy - (_yw / 2);
_sprites.push(_local2);
}
toggleSprites(false);
}
function deleteSprites() {
var _local2 = 0;
while (_local2 < _sprites.length) {
_sprites[_local2].removeMovieClip();
_local2++;
}
return(undefined);
}
function RenderEntity() {
if (_editSelected) {
_lineColor = 13421772 /* 0xCCCCCC */;
} else {
_lineColor = 0;
}
_line.Draw();
}
function getName() {
switch (_type) {
case Game.GameData.RAIL_HOR_lr :
return("RAIL_HOR_lr");
case Game.GameData.RAIL_HOR_rl :
return("RAIL_HOR_rl");
case Game.GameData.RAIL_VER_up :
return("RAIL_VER_NEG");
case Game.GameData.RAIL_VER_dn :
return("RAIL_VER_POS");
case Game.GameData.RAIL_QTR1_ccl :
return("RAIL_QTR1_ccl");
case Game.GameData.RAIL_QTR1_cl :
return("RAIL_QTR1_cl");
case Game.GameData.RAIL_QTR2_ccl :
return("RAIL_QTR2_ccl");
case Game.GameData.RAIL_QTR2_cl :
return("RAIL_QTR2_cl");
case Game.GameData.RAIL_QTR3_ccl :
return("RAIL_QTR3_ccl");
case Game.GameData.RAIL_QTR3_cl :
return("RAIL_QTR3_cl");
case Game.GameData.RAIL_QTR4_ccl :
return("RAIL_QTR4_ccl");
case Game.GameData.RAIL_QTR4_cl :
return("RAIL_QTR4_cl");
case Game.GameData.RAIL_SNK1_lr :
return("RAIL_SNK1_lr");
case Game.GameData.RAIL_SNK1_rl :
return("RAIL_SNK1_rl");
case Game.GameData.RAIL_SNK2_lr :
return("RAIL_SNK2_lr");
case Game.GameData.RAIL_SNK2_rl :
return("RAIL_SNK2_rl");
case Game.GameData.RAIL_SNK3_lr :
return("RAIL_SNK3_lr");
case Game.GameData.RAIL_SNK3_rl :
return("RAIL_SNK3_rl");
case Game.GameData.RAIL_SNK4_lr :
return("RAIL_SNK4_lr");
case Game.GameData.RAIL_SNK4_rl :
return("RAIL_SNK4_rl");
}
}
function toString(Void) {
return(((("Rail(id: " + _idx) + " type:") + getName()) + ")");
}
}
Symbol 1718 MovieClip [__Packages.Game.Sign] Frame 0
class Game.Sign extends Base.Entity
{
var _gameContext, _idx, _type, _class, _xw, _yw, _curPosition, _isActive, _isOnScreen, _isCollidable, _collectionDone, _reqUpdate, _isCollected, _gameMode, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _sprites, _unitXW, _unitYW, _minXW, _minYW, _rad, _maxNumUnitsY, _maxNumUnitsX, _numUnitsMinY, _numUnitsMinX, _numUnitsX, _numUnitsY, _shape, _lineColor, _fillColor, _multiVector, _vectors, _sprite, _playMode, _xScaleable, _yScaleable;
function Sign (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super();
_gameContext = gameContext;
_idx = idx;
_type = ntype;
_class = Game.GameData.TOKEN;
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = false;
_isOnScreen = false;
_isCollidable = false;
_collectionDone = false;
_reqUpdate = false;
_isCollected = false;
_gameMode = _gameContext.getGameData().getGameMode();
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_sprites = [];
var _local2;
_unitXW = _xw;
_unitYW = _yw;
_minXW = _xw;
_minYW = _yw;
_rad = _xw / 2;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_AABB;
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _rad, _xw, _yw, this, _local2, _gameContext.getGameData().getGraphics(), true);
if (_gameMode == Game.GameData.GAME_PLAY) {
createSprites();
} else if (_gameMode == Game.GameData.GAME_EDIT) {
_lineColor = 0;
_fillColor = 15910144 /* 0xF2C500 */;
}
}
function Update() {
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_shape);
}
function getHitShape() {
return(_shape);
}
function getIsMultiVector() {
return(_multiVector);
}
function getVectorArray() {
return(_vectors);
}
function getNumVectors() {
return(_vectors.length);
}
function setActive(bToggle) {
_isActive = bToggle;
}
function getActive() {
return(_isActive);
}
function setCollidable(bToggle) {
_isCollidable = bToggle;
}
function getCollidable() {
return(_isCollidable);
}
function getOnScreen() {
return(_isOnScreen);
}
function setOnScreen(bToggle) {
_isOnScreen = bToggle;
if (_isOnScreen && (!_isCollected)) {
toggleSprites(true);
if (_type == Game.GameData.SIGN_6) {
var _local2 = _gameContext.getGameData()._tokensCollectedMin.length;
if (_local2 < 200) {
_sprite.getMovieClip().msg.text = _local2 + "/200 Cheese Collected";
} else {
_sprite.getMovieClip().msg.text = "ALL CHEESE COLLECTED!";
}
}
} else if (!_isOnScreen) {
toggleSprites(false);
}
}
function getReqUpdate() {
return(_reqUpdate);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getUnitXW() {
return(_unitXW);
}
function getUnitYW() {
return(_unitYW);
}
function getMinXW() {
return(_minXW);
}
function getMinYW() {
return(_minYW);
}
function getPlayMode(Void) {
return(_playMode);
}
function setPlayMode(bToggle) {
_playMode = bToggle;
}
function getScaleableX(Void) {
return(_xScaleable);
}
function getScaleableY(Void) {
return(_yScaleable);
}
function getLocationEdit(Void) {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
return(undefined);
}
function getSizeEditX(Void) {
return(_isSizeEditX);
}
function setSizeEditX(bToggle) {
_isSizeEditX = bToggle;
return(undefined);
}
function getSizeEditY(Void) {
return(_isSizeEditY);
}
function setSizeEditY(bToggle) {
_isSizeEditY = bToggle;
return(undefined);
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
return(undefined);
}
function getIsSelected() {
return(_editSelected);
}
function toggleSprites(bVisible) {
_sprite.setVisibility(bVisible);
return(undefined);
}
function createSprites() {
switch (_type) {
case Game.GameData.SIGN_1 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "signs", _idx + "signs", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.getMovieClip().gotoAndPlay(88);
break;
case Game.GameData.SIGN_2 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "signs", _idx + "signs", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.getMovieClip().gotoAndPlay(47);
break;
case Game.GameData.SIGN_3 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "signs", _idx + "signs", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.getMovieClip().gotoAndPlay(5);
break;
case Game.GameData.SIGN_4 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "signs", _idx + "signs", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.moveToFrame(4);
break;
case Game.GameData.SIGN_5 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "signs", _idx + "signs", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.moveToFrame(3);
break;
case Game.GameData.SIGN_6 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "signs", _idx + "signs", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.moveToFrame(1);
break;
case Game.GameData.SIGN_7 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "Sign_RailRight", _idx + "Sign_RailRight", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.getMovieClip().play();
break;
case Game.GameData.SIGN_8 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "Sign_RailLeft", _idx + "Sign_RailLeft", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.getMovieClip().play();
break;
case Game.GameData.SIGN_9 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "Sign_RailUp", _idx + "Sign_RailUp", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.getMovieClip().play();
break;
case Game.GameData.SIGN_10 :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "Sign_RailDown", _idx + "Sign_RailDown", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
_sprite.getMovieClip().play();
}
toggleSprites(false);
}
function deleteSprites() {
_sprite.removeSprite();
return(undefined);
}
function RenderEntity(Void) {
if (!_gameMode) {
_shape.Draw();
} else {
if (_editSelected) {
_lineColor = 0;
} else {
var _local2 = _gameContext.getGameData().getPlatformColor(_type);
_lineColor = _local2[0];
}
_shape.Draw();
if (_maxNumUnitsY == null) {
_shape.DrawScaler("y");
_yScaleable = true;
}
if (_maxNumUnitsX == null) {
_shape.DrawScaler("x");
_xScaleable = true;
}
}
}
function getName() {
return("Sign");
}
function toString() {
return("Sign()");
}
}
Symbol 1719 MovieClip [__Packages.Game.Decoration] Frame 0
class Game.Decoration extends Base.Entity
{
var _gameContext, _idx, _type, _class, _xw, _yw, _curPosition, _isActive, _isOnScreen, _isCollidable, _collectionDone, _reqUpdate, _isCollected, _gameMode, xMove, yMove, _editSelected, _isLocationEdit, _isSizeEditX, _isSizeEditY, _sprites, _unitXW, _unitYW, _minXW, _minYW, _rad, _maxNumUnitsY, _maxNumUnitsX, _numUnitsMinY, _numUnitsMinX, _numUnitsX, _numUnitsY, _shape, _lineColor, _fillColor, _multiVector, _vectors, _playMode, _xScaleable, _yScaleable, _sprite;
function Decoration (gameContext, idx, ntype, xPos, yPos, xWidth, yWidth) {
super();
_gameContext = gameContext;
_idx = idx;
_type = ntype;
_class = Game.GameData.TOKEN;
_xw = xWidth;
_yw = yWidth;
_curPosition = new Base.VectorCoord(xPos, yPos);
Init();
}
function Init() {
_isActive = false;
_isOnScreen = false;
_isCollidable = false;
_collectionDone = false;
_reqUpdate = false;
_isCollected = false;
_gameMode = _gameContext.getGameData().getGameMode();
xMove = 0;
yMove = 0;
_editSelected = false;
_isLocationEdit = false;
_isSizeEditX = false;
_isSizeEditY = false;
_sprites = [];
var _local2;
_unitXW = _xw;
_unitYW = _yw;
_minXW = _xw;
_minYW = _yw;
_rad = _xw / 2;
_maxNumUnitsY = 1;
_maxNumUnitsX = 1;
_numUnitsMinY = 1;
_numUnitsMinX = 1;
_numUnitsX = _xw / _unitXW;
_numUnitsY = _yw / _unitYW;
_local2 = Base.ShapeEntity.TID_AABB;
switch (_type) {
case Game.GameData.GUN_FLOR_SM :
_curPosition._vy = _curPosition._vy - 10;
break;
case Game.GameData.GUN_FLOR_LG :
_curPosition._vy = _curPosition._vy - 10;
}
_shape = new Base.ShapeEntity(_gameContext, _curPosition, _rad, _xw, _yw, this, _local2, _gameContext.getGameData().getGraphics(), true);
if (_gameMode == Game.GameData.GAME_PLAY) {
createSprites();
} else if (_gameMode == Game.GameData.GAME_EDIT) {
_lineColor = 0;
_fillColor = 15910144 /* 0xF2C500 */;
}
}
function Update() {
}
function getID() {
return(_idx);
}
function getType() {
return(_type);
}
function getShape() {
return(_shape);
}
function getHitShape() {
return(_shape);
}
function getIsMultiVector() {
return(_multiVector);
}
function getVectorArray() {
return(_vectors);
}
function getNumVectors() {
return(_vectors.length);
}
function setActive(bToggle) {
_isActive = bToggle;
}
function getActive() {
return(_isActive);
}
function setCollidable(bToggle) {
_isCollidable = bToggle;
}
function getCollidable() {
return(_isCollidable);
}
function getOnScreen() {
return(_isOnScreen);
}
function setOnScreen(bToggle) {
_isOnScreen = bToggle;
if (_isOnScreen && (!_isCollected)) {
toggleSprites(true);
} else if (!_isOnScreen) {
toggleSprites(false);
}
}
function getReqUpdate() {
return(_reqUpdate);
}
function getLocation() {
return(_curPosition);
}
function getXWidth() {
return(_xw);
}
function getYWidth() {
return(_yw);
}
function getUnitXW() {
return(_unitXW);
}
function getUnitYW() {
return(_unitYW);
}
function getMinXW() {
return(_minXW);
}
function getMinYW() {
return(_minYW);
}
function getPlayMode(Void) {
return(_playMode);
}
function setPlayMode(bToggle) {
_playMode = bToggle;
}
function getScaleableX(Void) {
return(_xScaleable);
}
function getScaleableY(Void) {
return(_yScaleable);
}
function getLocationEdit(Void) {
return(_isLocationEdit);
}
function setLocationEdit(bToggle) {
_isLocationEdit = bToggle;
return(undefined);
}
function getSizeEditX(Void) {
return(_isSizeEditX);
}
function setSizeEditX(bToggle) {
_isSizeEditX = bToggle;
return(undefined);
}
function getSizeEditY(Void) {
return(_isSizeEditY);
}
function setSizeEditY(bToggle) {
_isSizeEditY = bToggle;
return(undefined);
}
function toggleSelected(bToggle) {
_editSelected = bToggle;
return(undefined);
}
function getIsSelected() {
return(_editSelected);
}
function toggleSprites(bVisible) {
_sprite.setVisibility(bVisible);
return(undefined);
}
function layerFence() {
_sprite.getMovieClip().swapDepths(_gameContext.getGameData().getBuffer().getNextHighestDepth());
}
function createSprites() {
switch (_type) {
case Game.GameData.GUN_CEIL_SM :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "ceilingGun", _idx + "ceilingGun", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
break;
case Game.GameData.GUN_FLOR_SM :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "floorGunSmall", _idx + "floorGunSmall", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
break;
case Game.GameData.GUN_FLOR_LG :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "floorGunLarge", _idx + "floorGunLarge", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
break;
case Game.GameData.WINDOW_SM :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "windowSmall", _idx + "windowSmall", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
break;
case Game.GameData.WINDOW_MD :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "windowMed", _idx + "windowMed", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
break;
case Game.GameData.WINDOW_LG :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "windowLarge", _idx + "windowLarge", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
break;
case Game.GameData.COMP_PARTS :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "computerParts", _idx + "computerParts", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
break;
case Game.GameData.FENCE :
_sprite = new Base.SpriteEntity(_gameContext, 1, _idx, "fence", _idx + "fence", _gameContext.getGameData().getBuffer().getNextHighestDepth(), _shape.getCurrentPosition()._vx, _shape.getCurrentPosition()._vy, 1, -1, -1);
}
toggleSprites(false);
}
function deleteSprites() {
_sprite.removeSprite();
return(undefined);
}
function RenderEntity(Void) {
if (!_gameMode) {
_shape.Draw();
} else {
if (_editSelected) {
_lineColor = 0;
} else {
var _local2 = _gameContext.getGameData().getPlatformColor(_type);
_lineColor = _local2[0];
}
_shape.Draw();
if (_maxNumUnitsY == null) {
_shape.DrawScaler("y");
_yScaleable = true;
}
if (_maxNumUnitsX == null) {
_shape.DrawScaler("x");
_xScaleable = true;
}
}
}
function getName() {
return("Sign");
}
function toString() {
return("Sign()");
}
}
Symbol 1720 MovieClip [__Packages.Base.Profile] Frame 0
class Base.Profile
{
var _gameContext, _profiles;
function Profile (gameContext) {
_gameContext = gameContext;
_profiles = [];
}
function RegisterProfile(name) {
_profiles.push(new Object());
var _local2 = _profiles.length - 1;
_profiles[_local2].name = name;
_profiles[_local2].startTime = 0;
_profiles[_local2].endTime = 0;
}
function StartProfile(name) {
var _local2 = 0;
while (_local2 < _profiles.length) {
if (_profiles[_local2].name == name) {
_profiles[_local2].startTime = getTimer();
_profiles[_local2].endTime = 0;
}
_local2++;
}
}
function EndProfile(name) {
var _local2 = 0;
while (_local2 < _profiles.length) {
if (_profiles[_local2].name == name) {
_profiles[_local2].endTime = getTimer();
}
_local2++;
}
}
function ReportProfile() {
var _local2 = 0;
while (_local2 < _profiles.length) {
var _local3 = _profiles[_local2].endTime - _profiles[_local2].startTime;
_local2++;
}
}
}
Symbol 1721 MovieClip [__Packages.Game.GameManager] Frame 0
class Game.GameManager
{
var _currentGameState, _nextGameState, _followingGameState;
function GameManager (parentMC) {
_currentGameState = null;
setNextState(Game.GameStates.G1_TitleCard);
}
function setNextState(state) {
_nextGameState = new state[undefined]();
}
function setFollowingGameState(state) {
_followingGameState = state;
}
function getFollowingGameState() {
return(_followingGameState);
}
function getCurrentGameState() {
return(_currentGameState);
}
function Update(gameContext) {
if (_nextGameState.isTransitioning()) {
return(undefined);
}
if (_currentGameState != _nextGameState) {
_currentGameState = _nextGameState;
_currentGameState.Entry(gameContext);
} else if (_currentGameState == _nextGameState) {
_currentGameState.Update();
if (_currentGameState != _nextGameState) {
_currentGameState.Exit();
delete _currentGameState;
}
}
}
}
Symbol 1722 MovieClip [__Packages.Base.GameState] Frame 0
class Base.GameState extends Base.State
{
static var _transition, _lastTransitionFrame, _screenFade, _fadeSpeed, _levelToReach, _currentAlphaVal, _isFading;
function GameState () {
super();
}
function CPUDecision(gameContext) {
return(undefined);
}
function NetworkDecision(gameContext) {
return(undefined);
}
function PadInput(gameContext) {
return(undefined);
}
function Entry(gameContext) {
return(undefined);
}
function Update(gameContext) {
return(undefined);
}
function Exit(gameContext) {
return(undefined);
}
function startScreenTransition(gameContext, spriteName, startFrame, endFrame, frameRate, depth) {
_transition = new Base.SpriteEntity(gameContext, 5, 100, spriteName, spriteName, depth, 0, 2, -1, -1);
_transition.startAnimating(startFrame, endFrame, frameRate, false);
}
function getTransitionFrame() {
if (_transition) {
return(_transition.getCurrentFrame());
}
return(_lastTransitionFrame);
}
function isTransitioning() {
if (_transition) {
if (_transition.isAnimating()) {
_transition.animateSprite();
return(true);
}
_lastTransitionFrame = _transition.getCurrentFrame();
_transition.removeSprite();
delete _transition;
}
return(false);
}
function startFadeOut(gameContext, spriteName, clipName, depth, fadeSpeed, level) {
_screenFade = new Base.SpriteEntity(gameContext, 5, 100, spriteName, clipName, depth, 0, 0, 2, -1, -1);
_fadeSpeed = fadeSpeed;
_levelToReach = level;
_currentAlphaVal = 0;
_isFading = true;
_screenFade.getMovieClip()._alpha = _currentAlphaVal;
}
function handleFadeOut() {
if (_isFading) {
_currentAlphaVal = _currentAlphaVal + _fadeSpeed;
if (_currentAlphaVal >= _levelToReach) {
_currentAlphaVal = _levelToReach;
_isFading = false;
}
_screenFade.getMovieClip()._alpha = _currentAlphaVal;
}
}
function continueFadeOut(fadeSpeed, level) {
_isFading = true;
_levelToReach = level;
}
function startFadeIn(fadeSpeed) {
_isFading = true;
_levelToReach = 0;
_fadeSpeed = fadeSpeed;
}
function handleFadeIn() {
_currentAlphaVal = _currentAlphaVal - _fadeSpeed;
if (_currentAlphaVal <= _levelToReach) {
_currentAlphaVal = _levelToReach;
_isFading = false;
_screenFade.removeSprite();
delete _screenFade;
}
_screenFade.getMovieClip()._alpha = _currentAlphaVal;
}
function isFading() {
return(_isFading);
}
function setFadeDepth(depth) {
_screenFade.setZDepth(depth);
}
}
Symbol 1723 MovieClip [__Packages.Game.GameStates.G1_TitleCard] Frame 0
class Game.GameStates.G1_TitleCard extends Base.GameState
{
var _gameContext, _currentTitleFrame, _step, startScreenTransition;
function G1_TitleCard () {
super();
}
function Entry(gameContext) {
_gameContext = gameContext;
if (gameContext.getGameData()._invaded) {
_gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(0));
} else {
_gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(5));
}
_gameContext.getGameData().getSoundModule().PlayMusic("title");
_currentTitleFrame = 1;
_step = new Function();
_step = bringBillyOn;
}
function Update() {
_currentTitleFrame++;
if (_currentTitleFrame == 73) {
_currentTitleFrame = 41;
}
_gameContext.getUIManager().getScreen().moveToFrame(_currentTitleFrame);
_step();
return(undefined);
}
function Exit() {
startScreenTransition(_gameContext, "trans", 11, 1, 30, 100000);
}
function bringBillyOn() {
if (_currentTitleFrame == 72) {
_step = waitForNextScreen;
}
waitForNextScreen();
}
function waitForNextScreen() {
if (_gameContext.getGameData().isRollover(435, 303, 150, 88)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameManager().setNextState(Game.GameStates.G2_Instructions);
}
}
if (_gameContext.getGameData()._invaded) {
if (_gameContext.getGameData().isRollover(0, 320, 156, 75)) {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(2);
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_parent.onGameExit();
}
} else {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(1);
}
}
}
function toString() {
return("G1_TitleCard");
}
}
Symbol 1724 MovieClip [__Packages.Game.GameStates.G2_Instructions] Frame 0
class Game.GameStates.G2_Instructions extends Base.GameState
{
var _gameContext, startScreenTransition;
function G2_Instructions () {
super();
}
function Entry(gameContext) {
_gameContext = gameContext;
startScreenTransition(_gameContext, "trans", 1, 11, 30, 100000);
if (_gameContext.getGameData()._invaded) {
gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(1));
} else {
gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(6));
}
gameContext.getUIManager().getScreen().getMovieClip().gotoAndPlay(1);
}
function Update() {
if (_gameContext.getGameData()._invaded) {
if (_gameContext.getGameData().isRollover(364, 6, 76, 45)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameManager().setNextState(Game.GameStates.G4_LevelLoad);
}
}
} else if (_gameContext.getGameData().isRollover(517, 6, 76, 45)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameManager().setNextState(Game.GameStates.G4_LevelLoad);
}
}
if (_gameContext.getGameData()._invaded) {
if (_gameContext.getGameData().isRollover(443, 2, 156, 75)) {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(2);
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_parent.onGameExit();
}
} else {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(1);
}
}
if (_gameContext.getUIManager().getScreen().getCurrentFrame() == 67) {
if (_gameContext.getGameData().isRollover(177, 272, 150, 88)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameManager().setNextState(Game.GameStates.G4_LevelLoad);
}
}
}
return(undefined);
}
function Exit() {
_gameContext.getGameData()._tracker.sendEventCustom("billymandy_Magnetface_Play");
startScreenTransition(_gameContext, "trans", 11, 1, 30, 100000);
}
function toString() {
return("G2_Instructions");
}
}
Symbol 1725 MovieClip [__Packages.Game.GameStates.G4_LevelLoad] Frame 0
class Game.GameStates.G4_LevelLoad extends Base.GameState
{
var _gameContext, _gameData, _stage, startScreenTransition;
function G4_LevelLoad () {
super();
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
_gameData.setLevelLoaded(false);
_gameData.setGameMode(Game.GameData.GAME_PLAY);
if (_gameData.getCurrentLevel() > 3) {
_stage = 8;
} else if (_gameData.getCurrentLevel() == 1) {
_gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(3));
_gameContext.getUIManager().getScreen().moveToFrame(2);
_stage = 2;
} else {
_gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(3));
_gameContext.getUIManager().getScreen().getMovieClip()._alpha = 0;
switch (_gameContext.getGameData().getCurrentLevel()) {
case 2 :
_gameContext.getGameData().getSoundModule().PlaySound("cn_magnetface_levelcomplete", 100, 0, 0, 0);
_gameContext.getUIManager().getScreen().moveToFrame(18);
break;
case 3 :
_gameContext.getGameData().getSoundModule().PlaySound("cn_magnetface_levelcomplete", 100, 0, 0, 0);
_gameContext.getUIManager().getScreen().moveToFrame(34);
}
_stage = 1;
}
}
function Update() {
switch (_stage) {
case 1 :
_gameContext.getUIManager().getScreen().getMovieClip()._alpha = _gameContext.getUIManager().getScreen().getMovieClip()._alpha + 5;
if (_gameContext.getUIManager().getScreen().getMovieClip()._alpha >= 100) {
_gameContext.getGameData().DeleteLevelMap();
_stage++;
}
break;
case 2 :
_gameContext.getGameData().GenerateLevel();
_stage++;
break;
case 3 :
if (_gameData.getLevelLoaded()) {
_gameContext.getGameData().getHero()._spriteHero.setVisibility(false);
_gameContext.getGameData().getHero().Update();
_gameContext.getGameData().UpdateCamera();
_gameContext.getGameData().updateGameObjects();
switch (_gameContext.getGameData().getCurrentLevel()) {
case 1 :
_gameContext.getUIManager().getScreen().startAnimating(2, 16, 32, false);
break;
case 2 :
_gameContext.getGameData()._tracker.sendEventCustom("billymandy_Magnetface_StartLevel_2");
_gameContext.getUIManager().getScreen().startAnimating(18, 32, 32, false);
break;
case 3 :
_gameContext.getGameData()._tracker.sendEventCustom("billymandy_Magnetface_StartLevel_3");
_gameContext.getUIManager().getScreen().startAnimating(34, 48, 32, false);
}
_stage++;
}
break;
case 4 :
var _local2 = _gameContext.getUIManager().getScreen().animateSprite();
if (_local2 == 1) {
_stage++;
}
break;
case 5 :
_gameContext.getGameManager().setNextState(Game.GameStates.G6_LevelPlay);
_stage = 0;
break;
case 8 :
startScreenTransition(_gameContext, "trans", 11, 1, 30, 100000);
_gameContext.getGameManager().setNextState(Game.GameStates.G7_GameWin);
_stage = 0;
}
return(undefined);
}
function Exit() {
_gameContext.getUIManager().removeScreen();
}
function toString(Void) {
return("G_LevelLoad()");
}
}
Symbol 1726 MovieClip [__Packages.Game.GameStates.G6_LevelPlay] Frame 0
class Game.GameStates.G6_LevelPlay extends Base.GameState
{
var _gameContext, _gameData, hero, _endStage, _count, _counter, _timer, _battleStart, _battleStop, _enemyPresent, _battleMusicPlaying;
function G6_LevelPlay () {
super();
}
function Entry(gameContext) {
_gameContext = gameContext;
_gameData = _gameContext.getGameData();
hero = _gameData.getHero();
_endStage = 1;
_count = 60;
_counter = 0;
_timer = 0;
_battleStart = 1800;
_battleStop = 720;
_enemyPresent = false;
_battleMusicPlaying = false;
_gameContext.getGameData().showHUD();
_gameContext.getGameData().getSoundModule().PlayMusic("puzzle");
_root._quality = "MEDIUM";
}
function Update() {
if ((_gameContext.getPadManager().getCurrentKeyAction() == "LevelSkip") && (_gameContext.getPadManager().getShiftDown())) {
hero._endLevel = true;
}
if ((_gameContext.getPadManager().getCurrentKeyAction() == "ResetHealth") && (_gameContext.getPadManager().getShiftDown())) {
_gameContext.getGameData().resetHealth();
}
if (hero._endLevel) {
_gameData.getSoundModule().StopAllSounds();
_gameData.updateCheeseCollected();
_gameData.setNextLevel();
_gameData.getSoundModule().StopMusic();
_gameContext.getGameManager().setNextState(Game.GameStates.G4_LevelLoad);
return(undefined);
}
hero.Update();
_gameData.updateGameObjects();
_gameData.UpdateCamera();
if (_gameData.updateHUD()) {
_gameContext.getGameManager().setNextState(Game.GameStates.G8_GamePaused);
}
if (hero._hasJustSpawned) {
return(undefined);
}
var _local2 = _gameData._enemies.length;
_enemyPresent = ((_local2 > 0) ? true : false);
if (_enemyPresent) {
if (!_battleMusicPlaying) {
_timer = 0;
_battleMusicPlaying = true;
_battleStop = 240;
_gameData.getSoundModule().PlayMusic("battle");
}
} else if (_battleMusicPlaying) {
_timer++;
if (_timer >= _battleStop) {
_timer = 0;
_battleMusicPlaying = false;
_gameData.getSoundModule().PlayMusic("puzzle");
}
} else {
_timer++;
if (_timer >= _battleStart) {
_timer = 0;
_battleStop = 720;
_battleMusicPlaying = true;
_gameData.getSoundModule().PlayMusic("none");
}
}
return(undefined);
}
function Exit(_gameContext) {
_gameData.removeHUD();
_root._quality = "HIGH";
}
function toString() {
return("G_LevelPlay()");
}
}
Symbol 1727 MovieClip [__Packages.Game.GameStates.G8_GamePaused] Frame 0
class Game.GameStates.G8_GamePaused extends Base.GameState
{
var _gameContext;
function G8_GamePaused () {
super();
}
function Entry(gameContext) {
_gameContext = gameContext;
if (_gameContext.getGameData()._invaded) {
gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(1));
} else {
gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(6));
}
gameContext.getUIManager().getScreen().getMovieClip().gotoAndPlay(1);
}
function Update() {
if (_gameContext.getGameData()._invaded) {
if (_gameContext.getGameData().isRollover(364, 6, 76, 45)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameManager().setNextState(Game.GameStates.G6_LevelPlay);
}
}
} else if (_gameContext.getGameData().isRollover(517, 6, 76, 45)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameManager().setNextState(Game.GameStates.G6_LevelPlay);
}
}
if (_gameContext.getGameData()._invaded) {
if (_gameContext.getGameData().isRollover(443, 2, 156, 75)) {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(2);
if (_gameContext.getPadManager().getMouseJustPressed()) {
_parent.onGameExit();
}
} else {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(1);
}
}
if (_gameContext.getUIManager().getScreen().getCurrentFrame() == 67) {
if (_gameContext.getGameData().isRollover(177, 272, 150, 88)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameManager().setNextState(Game.GameStates.G6_LevelPlay);
}
}
}
return(undefined);
}
function Exit() {
_gameContext.getUIManager().removeScreen();
}
function toString() {
return("G2_Instructions");
}
}
Symbol 1728 MovieClip [__Packages.Game.GameStates.G7_GameWin] Frame 0
class Game.GameStates.G7_GameWin extends Base.GameState
{
var _gameContext, startScreenTransition;
function G7_GameWin () {
super();
}
function Entry(gameContext) {
_gameContext = gameContext;
_parent.onWin(5);
startScreenTransition(_gameContext, "trans", 1, 11, 30, 100000);
if (_gameContext.getGameData()._invaded) {
_gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(4));
} else {
_gameContext.getUIManager().showScreen(gameContext.getGameData().getScreen(7));
}
_gameContext.getGameData().getSoundModule().PlaySound("music_gamecomplete", 100, 0, 0, 0);
_gameContext.getGameData()._tracker.sendEventCustom("billymandy_Magnetface_Win");
var _local3 = 1;
if (((_gameContext.getGameData()._tokensCollectedMaj[1] == 200) && (_gameContext.getGameData()._tokensCollectedMaj[2] == 200)) && (_gameContext.getGameData()._tokensCollectedMaj[3] == 200)) {
_local3 = 2;
_gameContext.getGameData()._tracker.sendEventCustom("billymandy_Magnetface_Win_Allcheese");
}
_gameContext.getUIManager().getScreen().getMovieClip().winMsg.gotoAndStop(_local3);
_gameContext.getUIManager().getScreen().getChild("cheese1").text = _gameContext.getGameData()._tokensCollectedMaj[1] + "/200";
_gameContext.getUIManager().getScreen().getChild("cheese2").text = _gameContext.getGameData()._tokensCollectedMaj[2] + "/200";
_gameContext.getUIManager().getScreen().getChild("cheese3").text = _gameContext.getGameData()._tokensCollectedMaj[3] + "/200";
_gameContext.getUIManager().getScreen().getMovieClip().gotoAndPlay(1);
_gameContext.getGameData().DeleteLevelMap();
}
function Update() {
if (_gameContext.getGameData()._invaded) {
if (_gameContext.getGameData().isRollover(435, 303, 150, 88)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData()._tracker.sendEventCustom("billymandy_Magnetface_Replay");
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameData().reset();
_gameContext.getGameManager().setNextState(Game.GameStates.G4_LevelLoad);
}
}
} else if (_gameContext.getGameData().isRollover(443, 289, 150, 88)) {
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData()._tracker.sendEventCustom("billymandy_Magnetface_Replay");
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_gameContext.getGameData().reset();
_gameContext.getGameManager().setNextState(Game.GameStates.G4_LevelLoad);
}
}
if (_gameContext.getGameData()._invaded) {
if (_gameContext.getGameData().isRollover(286, 312, 156, 75)) {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(2);
if (_gameContext.getPadManager().getMouseJustPressed()) {
_gameContext.getGameData().getSoundModule().PlaySound("btnPress", 100, 0, 0, 0);
_parent.onGameExit();
}
} else {
_gameContext.getUIManager().getScreen().getMovieClip().backtohub.gotoAndStop(1);
}
}
return(undefined);
}
function Exit() {
}
}
Symbol 1729 MovieClip [__Packages.Game.Background] Frame 0
class Game.Background
{
var _gameContext, _num, _scrollSpeed, _backgroundTimer, fg, _currentDepth, fg_bmp;
function Background (gameContext) {
_gameContext = gameContext;
_num = 196;
_scrollSpeed = 0.05;
_backgroundTimer = _scrollSpeed;
fg = [];
_currentDepth = 0;
}
function addBackground(graphicName, numBackgrounds, loop, offsetY) {
fg_bmp = flash.display.BitmapData.loadBitmap(graphicName);
var _local3 = new Object();
_local3.amountToMoveX = 0;
_local3.amountToMoveY = 0;
_local3.bitmapWidth = fg_bmp.width;
_local3.numBackgrounds = numBackgrounds;
_local3.loop = loop;
_local3._screen = [];
fg.push(_local3);
var _local2 = 0;
while (_local2 < numBackgrounds) {
var _local4 = (_local3.bitmapWidth * _local2) - 1;
_currentDepth++;
_local3._screen.push(_gameContext.getParent().createEmptyMovieClip("background" + _currentDepth, _currentDepth));
_local3._screen[_local2].attachBitmap(fg_bmp, 1);
_local3._screen[_local2].rect = new flash.geom.Rectangle(0, 0, Stage.width, Stage.height);
_local3._screen[_local2].bmp = fg_bmp;
if (_local2 == 0) {
_local3._screen[_local2].rect.offset(1, (fg_bmp.height + offsetY) - Stage.height);
} else {
_local3._screen[_local2].rect.offset(-_local4, (fg_bmp.height + offsetY) - Stage.height);
}
_local3._screen[_local2].scrollRect = _local3._screen[_local2].rect;
_local2++;
}
fg[fg.length - 1].amountToMoveX = 0;
fg[fg.length - 1].amountToMoveY = 0;
return(fg.length);
}
function scrollClip(mc, x, y) {
var _local2 = 0;
while (_local2 < mc.numBackgrounds) {
mc._screen[_local2].rect.offset(x, y);
_local2++;
}
if (mc._screen[0].rect.left <= 0) {
_local2 = 0;
while (_local2 < mc.numBackgrounds) {
mc._screen[_local2].rect.x = mc._screen[_local2].rect.x + mc.bitmapWidth;
_local2++;
}
} else if (mc._screen[0].rect.right > (mc.bitmapWidth + Stage.width)) {
_local2 = 0;
while (_local2 < mc.numBackgrounds) {
mc._screen[_local2].rect.x = mc._screen[_local2].rect.x - mc.bitmapWidth;
_local2++;
}
}
_local2 = 0;
while (_local2 < mc.numBackgrounds) {
mc._screen[_local2].scrollRect = mc._screen[_local2].rect;
_local2++;
}
}
function moveBack(gameContext) {
var _local2 = fg.length;
if (_local2 < 1) {
return(undefined);
}
while (_local2--) {
if ((fg[_local2].amountToMoveX == 0) && (fg[_local2].amountToMoveY == 0)) {
continue;
}
scrollClip(fg[_local2], fg[_local2].amountToMoveX, fg[_local2].amountToMoveY);
fg[_local2].amountToMoveX = 0;
fg[_local2].amountToMoveY = 0;
}
return(undefined);
}
function setAmountToMove(screenNum, x, y) {
fg[screenNum].amountToMoveX = x;
fg[screenNum].amountToMoveY = y;
}
function removeAllBackgrounds() {
var _local3 = fg.length;
while (_local3--) {
var _local2 = fg[_local3]._screen.length;
while (_local2--) {
fg[_local3]._screen[_local2].removeMovieClip();
}
}
_currentDepth = 0;
}
}
Symbol 1665 MovieClip [_GameEntry] Frame 1
#initclip 65
Object.registerClass("_GameEntry", Base.GameEntry);
#endinitclip