Section 1
//ClassIntro (ActionsBeforeGame.ClassIntro)
package ActionsBeforeGame {
import flash.events.*;
import flash.display.*;
import StructureGame.*;
public class ClassIntro extends EventDispatcher {
public const FINISH:String = "FINISH";
private var objectDamping:ClassDamping;
private var isSound:Boolean;
private var objectIntroApple:ClassIntroApple;
private var objectSound:ClassSounds;
private var movieIntro:MovieClip;
private var movieIntroJK:MovieClip;
private var mainSprite:Sprite;
private var swfMovies:Object;
private var showIntroApple:Boolean;
private var moviefonPreload:MovieClip;
public function ClassIntro(_arg1:Object, _arg2:Sprite, _arg3:ClassSounds, _arg4:Boolean, _arg5:Boolean){
this.showIntroApple = _arg5;
this.mainSprite = _arg2;
this.objectSound = _arg3;
this.isSound = _arg4;
this.swfMovies = _arg1;
goIntro();
}
private function goSkrytIntroJK(_arg1:Event):void{
if (movieIntroJK.currentFrame == 227){
movieIntroJK.removeEventListener(MouseEvent.CLICK, clickIntro2);
movieIntroJK.removeEventListener(Event.ENTER_FRAME, goSkrytIntroJK);
objectSound.stopSound();
if (showIntroApple){
introApple();
} else {
afterIntroApple(null);
};
};
}
private function destroy(_arg1:Event):void{
objectDamping.removeEventListener(objectDamping.EVENT_COMPLETED, destroy);
objectDamping = null;
while (mainSprite.numChildren) {
mainSprite.removeChildAt(0);
};
objectIntroApple = null;
moviefonPreload = null;
movieIntro = null;
movieIntroJK = null;
mainSprite = null;
swfMovies = null;
objectSound = null;
mainSprite = null;
dispatchEvent(new Event(FINISH));
}
private function goIntro2():void{
mainSprite.removeChild(movieIntro);
var _local1:Class = swfMovies.getAssetClass("introJK");
movieIntroJK = new (_local1);
movieIntroJK.x = 320;
movieIntroJK.y = 240;
mainSprite.addChild(movieIntroJK);
movieIntroJK.gotoAndPlay(60);
if (isSound){
objectSound.playSound(objectSound.soundIntroJK);
};
movieIntroJK.buttonMode = true;
movieIntroJK.addEventListener(Event.ENTER_FRAME, goSkrytIntroJK);
movieIntroJK.addEventListener(MouseEvent.CLICK, clickIntro2);
}
private function introApple():void{
objectIntroApple = new ClassIntroApple(swfMovies, objectSound, isSound);
objectIntroApple.addEventListener(objectIntroApple.FINISH, afterIntroApple);
mainSprite.addChild(objectIntroApple);
}
private function afterIntroApple(_arg1:Event):void{
if (objectIntroApple){
objectIntroApple.removeEventListener(objectIntroApple.FINISH, afterIntroApple);
};
objectDamping = new ClassDamping();
objectDamping.action(mainSprite, objectDamping.ACTION_EXTINCTION, 0.12);
objectDamping.addEventListener(objectDamping.EVENT_COMPLETED, destroy);
}
private function goIntro():void{
var _local1:Class = swfMovies.getAssetClass("fonPreload");
moviefonPreload = new (_local1);
mainSprite.addChild(moviefonPreload);
var _local2:Class = swfMovies.getAssetClass("Intro");
movieIntro = new (_local2);
movieIntro.x = 350;
movieIntro.y = 230;
mainSprite.addChild(movieIntro);
movieIntro.addEventListener(Event.ENTER_FRAME, goSkrytIntro);
movieIntro.addEventListener(MouseEvent.CLICK, clickIntro1);
}
private function clickIntro1(_arg1:Event):void{
ClassLinks.goToLink("buble_intro", null, false);
}
private function clickIntro2(_arg1:Event):void{
ClassLinks.goToLink("JK_intro", null, false);
}
private function goSkrytIntro(_arg1:Event):void{
if (movieIntro.currentFrame == 147){
movieIntro.removeEventListener(MouseEvent.CLICK, clickIntro1);
movieIntro.removeEventListener(Event.ENTER_FRAME, goSkrytIntro);
goIntro2();
};
}
}
}//package ActionsBeforeGame
Section 2
//ClassIntroApple (ActionsBeforeGame.ClassIntroApple)
package ActionsBeforeGame {
import flash.events.*;
import flash.display.*;
public class ClassIntroApple extends Sprite {
public const FINISH:String = "FINISH";
private var isSound:Boolean;
private var pauseWait:Number;// = 150
private var changeAlpha:Number;// = 0
private var objectSound:ClassSounds;
private var butApstore:SimpleButton;
private var startUgasatie:Boolean;
private var butSkip:SimpleButton;
private var changeAlpha2:Number;// = 0
private var butIPHONE:SimpleButton;
private var timeWait:Number;// = 0
private var movieBlack:SimpleButton;
private var p:Number;// = 0
private var movieFon:MovieClip;
public function ClassIntroApple(_arg1:Object, _arg2:ClassSounds, _arg3:Boolean){
this.objectSound = _arg2;
this.isSound = _arg3;
var _local4:Class = _arg1.getAssetClass("but_iphone");
butIPHONE = new (_local4);
_local4 = _arg1.getAssetClass("but_apstore");
butApstore = new (_local4);
_local4 = _arg1.getAssetClass("but_skip");
butSkip = new (_local4);
_local4 = null;
var _local5:Class = _arg1.getAssetClass("but_blackFon");
movieBlack = new (_local5);
_local5 = null;
_local5 = _arg1.getAssetClass("fonPreload");
movieFon = new (_local5);
addChild(movieFon);
butIPHONE.x = 345;
butIPHONE.y = 230;
butIPHONE.width = 321;
butIPHONE.height = 170;
butIPHONE.alpha = 0;
addChild(butIPHONE);
butApstore.x = 345;
butApstore.y = 377;
butApstore.width = 116;
butApstore.height = 41;
butApstore.alpha = 0;
addChild(butApstore);
movieBlack.alpha = 0;
addChild(movieBlack);
addEventListener(Event.ENTER_FRAME, pauseBeforStart);
_arg1 = null;
}
private function ugasanieIPHONE(_arg1:Event):void{
changeAlpha2 = (changeAlpha2 - 0.01);
butIPHONE.alpha = changeAlpha2;
if (changeAlpha2 < 0){
changeAlpha2 = 1;
butApstore.alpha = 1;
removeEventListener(Event.ENTER_FRAME, ugasanieIPHONE);
removeEventListener(Event.ENTER_FRAME, flashApstore);
addEventListener(Event.ENTER_FRAME, ugasanieApstore);
};
}
private function flashApstore(_arg1:Event):void{
timeWait++;
butApstore.alpha = (butApstore.alpha + (0.09 * changeAlpha));
if (butApstore.alpha > 1){
changeAlpha = -1;
butApstore.alpha = 1;
};
if (butApstore.alpha < 0.5){
changeAlpha = 1;
butApstore.alpha = 0.5;
};
if ((((timeWait > pauseWait)) && ((startUgasatie == false)))){
startUgasatie = true;
changeAlpha2 = 1;
addEventListener(Event.ENTER_FRAME, ugasanieIPHONE);
};
}
private function goSkip(_arg1:MouseEvent):void{
removeEventListener(Event.ENTER_FRAME, poyavlApstore);
removeEventListener(Event.ENTER_FRAME, poyavlIPHONE);
removeEventListener(Event.ENTER_FRAME, flashApstore);
addEventListener(Event.ENTER_FRAME, ugasanieIPHONE);
}
public function destroy():void{
removeEventListener(Event.ENTER_FRAME, ugasanieApstore);
removeEventListener(Event.ENTER_FRAME, ugasanieApstore);
removeEventListener(Event.ENTER_FRAME, ugasanieIPHONE);
removeEventListener(Event.ENTER_FRAME, ugasanieIPHONE);
removeEventListener(Event.ENTER_FRAME, poyavlIPHONE);
removeEventListener(Event.ENTER_FRAME, poyavlApstore);
removeEventListener(Event.ENTER_FRAME, flashApstore);
butSkip.removeEventListener(MouseEvent.CLICK, goSkip);
movieBlack.removeEventListener(MouseEvent.CLICK, goApple);
while (numChildren) {
removeChildAt(0);
};
butIPHONE = null;
butApstore = null;
butSkip = null;
movieBlack = null;
objectSound = null;
dispatchEvent(new Event(FINISH));
}
private function goApple(_arg1:MouseEvent):void{
ClassLinks.goToLink("goUpstore", "http://itunes.apple.com/app/physics-gamebox/id368037317?mt=8", false);
}
private function ugasanieApstore(_arg1:Event):void{
changeAlpha2 = (changeAlpha2 - 0.06);
butApstore.alpha = changeAlpha2;
if (changeAlpha2 < 0){
removeEventListener(Event.ENTER_FRAME, ugasanieApstore);
finish();
};
}
private function finish():void{
destroy();
}
private function pauseBeforStart(_arg1:Event):void{
if (p++ > 40){
removeEventListener(Event.ENTER_FRAME, pauseBeforStart);
startIntro();
};
}
private function poyavlApstore(_arg1:Event):void{
changeAlpha = (changeAlpha + 0.1);
butApstore.alpha = changeAlpha;
if (changeAlpha > 1){
changeAlpha = -1;
removeEventListener(Event.ENTER_FRAME, poyavlApstore);
addEventListener(Event.ENTER_FRAME, flashApstore);
};
}
private function startIntro():void{
butSkip.x = 664.5;
butSkip.y = 11.7;
addChild(butSkip);
addEventListener(Event.ENTER_FRAME, poyavlIPHONE);
movieBlack.addEventListener(MouseEvent.CLICK, goApple);
butSkip.addEventListener(MouseEvent.CLICK, goSkip);
}
private function poyavlIPHONE(_arg1:Event):void{
changeAlpha = (changeAlpha + 0.01);
butIPHONE.alpha = changeAlpha;
if (changeAlpha > 1){
if (isSound){
objectSound.playSound(objectSound.soundAchi);
};
changeAlpha = 0;
removeEventListener(Event.ENTER_FRAME, poyavlIPHONE);
addEventListener(Event.ENTER_FRAME, poyavlApstore);
};
}
}
}//package ActionsBeforeGame
Section 3
//ClassLevelOrGame (ActionsBeforeGame.ClassLevelOrGame)
package ActionsBeforeGame {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
public class ClassLevelOrGame extends EventDispatcher {
public const IS_GAME:String = "IS_GAME";
public const IS_PLAYER:String = "IS_PLAYER";
private var strLevel:String;
private function convertStrIn10(_arg1:String):String{
var _local4:String;
var _local5:Number;
var _local6:String;
var _local2 = "c";
var _local3:Number = 1;
while (_local3 < (_arg1.length - 1)) {
_local4 = _arg1.substr(_local3, 2);
_local5 = int(("0x" + _local4));
_local6 = String.fromCharCode(_local5);
_local2 = (_local2 + _local6);
_local3 = (_local3 + 2);
};
_local2 = (_local2 + "o");
return (_local2);
}
public function getStrLevel():XML{
var _local1:XML = new XML(strLevel);
return (_local1);
}
private function gettingCodeComplete(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
var _local3:String = _local2.data;
if (_local3 == "jopa"){
trace("jopa");
} else {
strLevel = convertStrIn10(_local3);
strLevel = strLevel.substring(1, (strLevel.length - 1));
dispatchEvent(new Event(IS_PLAYER));
};
}
private function getLevelCodeByID(_arg1:Sprite, _arg2:String):void{
var _local4:URLRequest;
var _local5:URLVariables;
var _local6:URLLoader;
var _local3:String = _arg1.stage.loaderInfo.parameters.levelid;
if (!_local3){
dispatchEvent(new Event(IS_GAME));
} else {
_local4 = new URLRequest(_arg2);
_local5 = new URLVariables();
_local5.guid = _local3;
_local4.data = _local5;
_local4.method = URLRequestMethod.POST;
_local6 = new URLLoader();
_local6.dataFormat = URLLoaderDataFormat.TEXT;
_local6.addEventListener(Event.COMPLETE, gettingCodeComplete);
_local6.load(_local4);
};
}
public function init(_arg1:Sprite, _arg2:String):void{
Security.loadPolicyFile("http://www.bubblebox.com/crossdomain.xml");
getLevelCodeByID(_arg1, _arg2);
}
}
}//package ActionsBeforeGame
Section 4
//ClassPreloadAssRoly (ActionsBeforeGame.ClassPreloadAssRoly)
package ActionsBeforeGame {
import flash.events.*;
import flash.display.*;
import flash.system.*;
public class ClassPreloadAssRoly extends EventDispatcher {
private var Asset:Class;
private var appDomain:ApplicationDomain;
private static var instance:ClassPreloadAssRoly;
public function ClassPreloadAssRoly():void{
Asset = ClassPreloadAssRoly_Asset;
super();
}
public function init():void{
var _local1:Loader = new Loader();
_local1.contentLoaderInfo.addEventListener(Event.INIT, assetsInitHandler);
_local1.loadBytes(new Asset());
}
public function getAssetClass(_arg1:String):Class{
if (!appDomain.hasDefinition(_arg1)){
trace((("*Error*: There is no definition of class '" + _arg1) + "'"));
return (null);
};
return ((appDomain.getDefinition(_arg1) as Class));
}
private function assetsInitHandler(_arg1:Event):void{
appDomain = _arg1.target.content.loaderInfo.applicationDomain;
dispatchEvent(new Event(Event.INIT));
}
public static function getInstance():ClassPreloadAssRoly{
if (!instance){
instance = new (ClassPreloadAssRoly);
};
return (instance);
}
}
}//package ActionsBeforeGame
Section 5
//ClassPreloadAssRoly_Asset (ActionsBeforeGame.ClassPreloadAssRoly_Asset)
package ActionsBeforeGame {
import mx.core.*;
public class ClassPreloadAssRoly_Asset extends ByteArrayAsset {
}
}//package ActionsBeforeGame
Section 6
//ClassPreloader (ActionsBeforeGame.ClassPreloader)
package ActionsBeforeGame {
import flash.events.*;
import flash.display.*;
import CPMStar.*;
import flash.utils.*;
import mochi.as3.*;
public class ClassPreloader extends MovieClip {
private var objectAssets:Object;
private var ad:DisplayObject;
private var newSprite:Sprite;
private var adBox:MovieClip;
private var prlMovie:MovieClip;
private var ads:Boolean;// = true
private var slSites:Array;
private var percent:Number;
public static var scalePoint:Number = 1;
public function ClassPreloader(){
slSites = ["bubblebox.com", "johnny-k.ru", "narod.ru", "ragdollcannon.net", "Flex"];
newSprite = new Sprite();
adBox = new MovieClip();
super();
addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
}
private function addedToStageHandler(_arg1:Event):void{
stop();
removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
objectAssets = ClassPreloadAssRoly.getInstance();
objectAssets.addEventListener(Event.INIT, preloading);
objectAssets.init();
}
private function update(_arg1:Event):void{
if (framesLoaded >= totalFrames){
removeEventListener(Event.ENTER_FRAME, update);
(prlMovie as Object).but_play.visible = true;
(prlMovie as Object).but_play.addEventListener(MouseEvent.CLICK, init);
};
percent = Math.floor(((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 28));
prlMovie.gotoAndStop(percent);
}
private function search():Boolean{
var _local1:Boolean;
var _local2:int;
while (_local2 < slSites.length) {
if (checkDomain(slSites[_local2])){
_local1 = true;
break;
};
_local2++;
};
var _local3:String = stage.loaderInfo.url.toString();
if ((((((((((((((((((((((_local3.indexOf("kaisergames.de") > -1)) || ((_local3.indexOf("gamezhero.com") > -1)))) || ((_local3.indexOf("agame.com") > -1)))) || ((_local3.indexOf("xiaoyouxi.com") > -1)))) || ((_local3.indexOf("game.com.cn") > -1)))) || ((_local3.indexOf("game.asia") > -1)))) || ((_local3.indexOf("kongregate.com") > -1)))) || ((_local3.indexOf("armorgames.com") > -1)))) || ((_local3.indexOf("andkon.com") > -1)))) || ((_local3.indexOf("kit.com") > -1)))) || ((_local3.indexOf("addictinggames.com") > -1)))){
ads = false;
};
if ((((((((_local3.indexOf("notdoppler.com") > -1)) || ((_local3.indexOf("playhub") > -1)))) || ((_local3.indexOf("freeonlinegames.com") > -1)))) || ((_local3.indexOf("xiaoyouxi.cn") > -1)))){
ads = false;
};
return (true);
}
private function preloading(_arg1:Event):void{
var _local2:Class;
var _local3:String;
objectAssets.removeEventListener(Event.INIT, preloading);
_local2 = ClassPreloadAssRoly.getInstance().getAssetClass("preLoader");
prlMovie = new (_local2);
prlMovie.gotoAndStop(1);
(prlMovie as Object).but_play.visible = false;
stage.addChild(newSprite);
newSprite.addChild(prlMovie);
if (search()){
addEventListener(Event.ENTER_FRAME, update);
if (ads){
_local3 = "2504Q6E9343CE";
ad = new AdLoader(_local3);
adBox.addChild(ad);
adBox.graphics.beginFill(0, 1);
adBox.graphics.drawRect(0, 0, 300, 250);
adBox.x = 200;
adBox.y = 100;
newSprite.addChild(adBox);
};
} else {
prlMovie.gotoAndStop(29);
};
}
private function checkDomain(_arg1:String):Boolean{
var _local2:String = stage.loaderInfo.url;
if (_local2.indexOf(_arg1) > -1){
return (true);
};
return (false);
}
private function init(_arg1:Event):void{
prlMovie.but_play.removeEventListener(MouseEvent.CLICK, init);
if (prlMovie){
newSprite.removeChild(prlMovie);
};
if (((((ads) && (ad))) && ((ad.parent == adBox)))){
adBox.removeChild(ad);
newSprite.removeChild(adBox);
};
parent.removeChild(this);
nextFrame();
var _local2:Class = Class(getDefinitionByName("Ragdoll_3"));
var _local3:Object = new (_local2);
newSprite.stage.addChild((_local3 as DisplayObject));
}
}
}//package ActionsBeforeGame
Section 7
//ClassBaseBadge (Badges.ClassBaseBadge)
package Badges {
import flash.display.*;
public class ClassBaseBadge {
public var arrMission:Array;
public var ownNumber:int;
public var isWasShown:Boolean;// = false
public var movieBadge:MovieClip;
public var isOpen:Boolean;
private var nameBadge:String;
private var nameAchivement:String;
public function ClassBaseBadge(_arg1:int, _arg2:String, _arg3:Array, _arg4:String){
nameAchivement = _arg4;
arrMission = _arg3;
this.ownNumber = _arg1;
var _local5:Class = Ragdoll_3.swfMovies.getAssetClass(_arg2);
movieBadge = new (_local5);
closeBadge();
}
public function getStatusOpen():Boolean{
return (isOpen);
}
public function closeBadge():void{
isOpen = false;
movieBadge.gotoAndStop("close");
}
public function loadDataFromComp(_arg1:Array):void{
arrMission = _arg1[0];
isOpen = _arg1[1];
isWasShown = _arg1[3];
}
public function clearCounterTiedLevel():void{
var _local1:Array;
if (isOpen == false){
for each (_local1 in arrMission) {
if (_local1[3] > 0){
_local1[1] = 0;
_local1[4] = false;
};
};
};
}
public function getNameAchivement():String{
return (nameAchivement);
}
public function getOwnNumber():int{
return (ownNumber);
}
public function destroy():void{
movieBadge = null;
arrMission = null;
}
public function setEvent(_arg1:String, _arg2:int):void{
var _local4:Array;
if (isOpen == true){
return;
};
var _local3:Boolean;
for each (_local4 in arrMission) {
if (_arg1 == _local4[0]){
if (_local4[0] == ClassInformGame.EVENT_TOTALSCORES){
if (_local4[3] >= _arg2){
_local4[4] = true;
};
} else {
if ((((_local4[3] == _arg2)) || ((_local4[3] == -1)))){
var _local7 = _local4;
var _local8 = 1;
var _local9 = (_local7[_local8] + 1);
_local7[_local8] = _local9;
if (_local4[1] == _local4[2]){
_local4[4] = true;
} else {
_local4[4] = false;
};
};
};
};
};
for each (_local4 in arrMission) {
if (_local4[4] == false){
_local3 = false;
};
};
if (_local3 == true){
isOpen = true;
movieBadge.gotoAndStop("open");
};
}
}
}//package Badges
Section 8
//ClassControllBadges (Badges.ClassControllBadges)
package Badges {
import flash.events.*;
import flash.display.*;
public class ClassControllBadges extends EventDispatcher {
public const OPEN_BADGE:String = "OPEN_BADGE";
private var arrObjectBadges:Array;
private var displayBadges:ClassDisplayBadges;
private var parent:Sprite;
public function ClassControllBadges(_arg1:Sprite){
var _local2:Array;
var _local3:ClassBaseBadge;
var _local4:Array;
arrObjectBadges = [];
super();
parent = _arg1;
displayBadges = new ClassDisplayBadges(parent);
for each (_local2 in ClassInformGame.arrBadges) {
arrObjectBadges.push(new ClassBaseBadge(_local2[0], _local2[1], _local2[2], _local2[3]));
};
for each (_local3 in arrObjectBadges) {
_local4 = ClassSetDataGame.loadDataBadge(_local3.ownNumber);
if (_local4 != null){
_local3.loadDataFromComp(_local4);
};
};
clearBadgiesCounterWhereEventInOneLevel();
}
public function clearBadgiesCounterWhereEventInOneLevel():void{
var _local1:ClassBaseBadge;
for each (_local1 in arrObjectBadges) {
_local1.clearCounterTiedLevel();
ClassSetDataGame.saveBadges(_local1.getOwnNumber(), _local1.arrMission, _local1.getStatusOpen(), _local1.getNameAchivement(), _local1.isWasShown);
};
}
public function updateBadges(_arg1:Number, _arg2:String):void{
var _local3:ClassBaseBadge;
for each (_local3 in arrObjectBadges) {
_local3.setEvent(_arg2, _arg1);
if ((((_local3.getStatusOpen() == true)) && ((_local3.isWasShown == false)))){
displayBadges.showBadge(_local3);
_local3.isWasShown = true;
dispatchEvent(new Event(OPEN_BADGE));
};
ClassSetDataGame.saveBadges(_local3.getOwnNumber(), _local3.arrMission, _local3.getStatusOpen(), _local3.getNameAchivement(), _local3.isWasShown);
};
}
public function destroy():void{
var _local1:ClassBaseBadge;
displayBadges.destroy();
displayBadges = null;
for each (_local1 in arrObjectBadges) {
_local1.destroy();
};
arrObjectBadges = null;
}
}
}//package Badges
Section 9
//ClassDisplayBadges (Badges.ClassDisplayBadges)
package Badges {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClassDisplayBadges extends Sprite {
private var badge:ClassBaseBadge;
private var mainParent:Sprite;
private var isShowNow:Boolean;
private var arrBadges:Array;
private var movieFon:MovieClip;
private var bAlpha:Number;// = 0
public function ClassDisplayBadges(_arg1:Sprite){
movieFon = new MovieClip();
arrBadges = [];
super();
mainParent = _arg1;
isShowNow = false;
addEventListener(Event.ENTER_FRAME, update);
}
public function showBadge(_arg1:ClassBaseBadge):void{
badge = _arg1;
arrBadges.push(badge);
}
private function update(_arg1:Event):void{
var _local2:ClassBaseBadge;
var _local3:MovieClip;
var _local4:String;
var _local5:Class;
if (((arrBadges.length) && ((isShowNow == false)))){
isShowNow = true;
_local2 = (arrBadges[0] as ClassBaseBadge);
_local2.isWasShown = true;
_local3 = _local2.movieBadge;
_local4 = _local2.getNameAchivement();
_local5 = Ragdoll_3.swfMovies.getAssetClass("fonForBadge");
movieFon = new (_local5);
movieFon.x = 345;
movieFon.y = 370;
movieFon.alpha = 0;
movieFon.addChild(_local3);
_local3.x = -130;
_local3.y = 0;
(movieFon.textAch as TextField).text = _local4;
mainParent.addChild(movieFon);
movieFon.addEventListener(Event.ENTER_FRAME, appearanceBadge);
};
}
private function disappearance(_arg1:Event):void{
bAlpha = (bAlpha - 0.07);
movieFon.alpha = bAlpha;
if (bAlpha < 0){
movieFon.removeEventListener(Event.ENTER_FRAME, disappearance);
mainParent.removeChild(movieFon);
arrBadges.splice(0, 1);
isShowNow = false;
};
}
public function destroy():void{
movieFon.removeEventListener(Event.ENTER_FRAME, disappearance);
movieFon.removeEventListener(Event.ENTER_FRAME, appearanceBadge);
removeEventListener(Event.ENTER_FRAME, update);
arrBadges = null;
badge = null;
}
private function appearanceBadge(_arg1:Event):void{
bAlpha = (bAlpha + 0.06);
movieFon.alpha = bAlpha;
if (bAlpha > 4){
movieFon.removeEventListener(Event.ENTER_FRAME, appearanceBadge);
movieFon.addEventListener(Event.ENTER_FRAME, disappearance);
};
}
}
}//package Badges
Section 10
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
public class b2CircleDef extends b2ShapeDef {
public var radius:Number;
public var localPosition:b2Vec2;
public function b2CircleDef(){
localPosition = new b2Vec2(0, 0);
super();
type = b2Shape.e_circleShape;
radius = 1;
}
}
}//package Box2D.Collision.Shapes
Section 11
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2CircleShape extends b2Shape {
public var m_localPosition:b2Vec2;
public var m_radius:Number;
public function b2CircleShape(_arg1:b2ShapeDef){
m_localPosition = new b2Vec2();
super(_arg1);
var _local2:b2CircleDef = (_arg1 as b2CircleDef);
m_type = e_circleShape;
m_localPosition.SetV(_local2.localPosition);
m_radius = _local2.radius;
}
override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
var _local10:Number;
var _local6:b2Mat22 = _arg1.R;
var _local7:Number = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y)));
var _local8:Number = (_arg1.position.x + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y)));
var _local9:Number = (_arg4.p1.x - _local7);
_local10 = (_arg4.p1.y - _local8);
var _local11:Number = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius));
if (_local11 < 0){
return (false);
};
var _local12:Number = (_arg4.p2.x - _arg4.p1.x);
var _local13:Number = (_arg4.p2.y - _arg4.p1.y);
var _local14:Number = ((_local9 * _local12) + (_local10 * _local13));
var _local15:Number = ((_local12 * _local12) + (_local13 * _local13));
var _local16:Number = ((_local14 * _local14) - (_local15 * _local11));
if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){
return (false);
};
var _local17:Number = -((_local14 + Math.sqrt(_local16)));
if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local15))))){
_local17 = (_local17 / _local15);
_arg2[0] = _local17;
_arg3.x = (_local9 + (_local17 * _local12));
_arg3.y = (_local10 + (_local17 * _local13));
_arg3.Normalize();
return (true);
};
return (false);
}
public function GetLocalPosition():b2Vec2{
return (m_localPosition);
}
public function GetRadius():Number{
return (m_radius);
}
override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
var _local4:b2Mat22;
_local4 = _arg2.R;
var _local5:Number = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y)));
var _local6:Number = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y)));
_local4 = _arg3.R;
var _local7:Number = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y)));
var _local8:Number = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y)));
_arg1.lowerBound.Set((((_local5 < _local7)) ? _local5 : _local7 - m_radius), (((_local6 < _local8)) ? _local6 : _local8 - m_radius));
_arg1.upperBound.Set((((_local5 > _local7)) ? _local5 : _local7 + m_radius), (((_local6 > _local8)) ? _local6 : _local8 + m_radius));
}
override public function ComputeMass(_arg1:b2MassData):void{
_arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius);
_arg1.center.SetV(m_localPosition);
_arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y))));
}
override public function UpdateSweepRadius(_arg1:b2Vec2):void{
var _local2:Number = (m_localPosition.x - _arg1.x);
var _local3:Number = (m_localPosition.y - _arg1.y);
_local2 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
m_sweepRadius = ((_local2 + m_radius) - b2Settings.b2_toiSlop);
}
override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
var _local3:b2Mat22 = _arg2.R;
var _local4:Number = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y)));
var _local5:Number = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y)));
_arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius));
_arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius));
}
override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
var _local3:b2Mat22 = _arg1.R;
var _local4:Number = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y)));
var _local5:Number = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y)));
_local4 = (_arg2.x - _local4);
_local5 = (_arg2.y - _local5);
return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius)));
}
}
}//package Box2D.Collision.Shapes
Section 12
//b2FilterData (Box2D.Collision.Shapes.b2FilterData)
package Box2D.Collision.Shapes {
public class b2FilterData {
public var maskBits:uint;// = 0xFFFF
public var groupIndex:int;// = 0
public var categoryBits:uint;// = 1
public function Copy():b2FilterData{
var _local1:b2FilterData = new b2FilterData();
_local1.categoryBits = categoryBits;
_local1.maskBits = maskBits;
_local1.groupIndex = groupIndex;
return (_local1);
}
}
}//package Box2D.Collision.Shapes
Section 13
//b2MassData (Box2D.Collision.Shapes.b2MassData)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
public class b2MassData {
public var mass:Number;// = 0
public var center:b2Vec2;
public var I:Number;// = 0
public function b2MassData(){
center = new b2Vec2(0, 0);
super();
}
}
}//package Box2D.Collision.Shapes
Section 14
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PolygonDef extends b2ShapeDef {
public var vertices:Array;
public var vertexCount:int;
private static var s_mat:b2Mat22 = new b2Mat22();
public function b2PolygonDef(){
vertices = new Array(b2Settings.b2_maxPolygonVertices);
super();
type = b2Shape.e_polygonShape;
vertexCount = 0;
var _local1:int;
while (_local1 < b2Settings.b2_maxPolygonVertices) {
vertices[_local1] = new b2Vec2();
_local1++;
};
}
public function SetAsOrientedBox(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{
var _local5:b2Vec2;
var _local6:b2Mat22;
var _local7:int;
vertexCount = 4;
vertices[0].Set(-(_arg1), -(_arg2));
vertices[1].Set(_arg1, -(_arg2));
vertices[2].Set(_arg1, _arg2);
vertices[3].Set(-(_arg1), _arg2);
if (_arg3){
_local5 = _arg3;
_local6 = s_mat;
_local6.Set(_arg4);
_local7 = 0;
while (_local7 < vertexCount) {
_arg3 = vertices[_local7];
_arg1 = (_local5.x + ((_local6.col1.x * _arg3.x) + (_local6.col2.x * _arg3.y)));
_arg3.y = (_local5.y + ((_local6.col1.y * _arg3.x) + (_local6.col2.y * _arg3.y)));
_arg3.x = _arg1;
_local7++;
};
};
}
public function SetAsBox(_arg1:Number, _arg2:Number):void{
vertexCount = 4;
vertices[0].Set(-(_arg1), -(_arg2));
vertices[1].Set(_arg1, -(_arg2));
vertices[2].Set(_arg1, _arg2);
vertices[3].Set(-(_arg1), _arg2);
}
}
}//package Box2D.Collision.Shapes
Section 15
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2PolygonShape extends b2Shape {
public var m_coreVertices:Array;
public var m_vertices:Array;
private var s_supportVec:b2Vec2;
public var m_centroid:b2Vec2;
public var m_normals:Array;
public var m_obb:b2OBB;
public var m_vertexCount:int;
private static var s_computeMat:b2Mat22 = new b2Mat22();
private static var s_sweptAABB1:b2AABB = new b2AABB();
private static var s_sweptAABB2:b2AABB = new b2AABB();
public function b2PolygonShape(_arg1:b2ShapeDef){
var _local3:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
s_supportVec = new b2Vec2();
m_obb = new b2OBB();
m_vertices = new Array(b2Settings.b2_maxPolygonVertices);
m_normals = new Array(b2Settings.b2_maxPolygonVertices);
m_coreVertices = new Array(b2Settings.b2_maxPolygonVertices);
super(_arg1);
m_type = e_polygonShape;
var _local2:b2PolygonDef = (_arg1 as b2PolygonDef);
m_vertexCount = _local2.vertexCount;
var _local4:int = _local3;
var _local5:int = _local3;
_local3 = 0;
while (_local3 < m_vertexCount) {
m_vertices[_local3] = _local2.vertices[_local3].Copy();
_local3++;
};
_local3 = 0;
while (_local3 < m_vertexCount) {
_local4 = _local3;
_local5 = (((_local3 + 1) < m_vertexCount)) ? (_local3 + 1) : 0;
_local6 = (m_vertices[_local5].x - m_vertices[_local4].x);
_local7 = (m_vertices[_local5].y - m_vertices[_local4].y);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
m_normals[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8));
_local3++;
};
m_centroid = ComputeCentroid(_local2.vertices, _local2.vertexCount);
ComputeOBB(m_obb, m_vertices, m_vertexCount);
_local3 = 0;
while (_local3 < m_vertexCount) {
_local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : (m_vertexCount - 1);
_local5 = _local3;
_local9 = m_normals[_local4].x;
_local10 = m_normals[_local4].y;
_local11 = m_normals[_local5].x;
_local12 = m_normals[_local5].y;
_local13 = (m_vertices[_local3].x - m_centroid.x);
_local14 = (m_vertices[_local3].y - m_centroid.y);
_local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop);
_local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop);
_local17 = (1 / ((_local9 * _local12) - (_local10 * _local11)));
m_coreVertices[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) + m_centroid.x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) + m_centroid.y));
_local3++;
};
}
override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
var _local4:b2AABB = s_sweptAABB1;
var _local5:b2AABB = s_sweptAABB2;
ComputeAABB(_local4, _arg2);
ComputeAABB(_local5, _arg3);
_arg1.lowerBound.Set(((_local4.lowerBound.x < _local5.lowerBound.x)) ? _local4.lowerBound.x : _local5.lowerBound.x, ((_local4.lowerBound.y < _local5.lowerBound.y)) ? _local4.lowerBound.y : _local5.lowerBound.y);
_arg1.upperBound.Set(((_local4.upperBound.x > _local5.upperBound.x)) ? _local4.upperBound.x : _local5.upperBound.x, ((_local4.upperBound.y > _local5.upperBound.y)) ? _local4.upperBound.y : _local5.upperBound.y);
}
public function GetVertices():Array{
return (m_vertices);
}
public function GetCoreVertices():Array{
return (m_coreVertices);
}
public function GetCentroid():b2Vec2{
return (m_centroid);
}
public function GetOBB():b2OBB{
return (m_obb);
}
public function GetFirstVertex(_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1, m_coreVertices[0]));
}
public function Centroid(_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1, m_centroid));
}
override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
var _local8:Number;
var _local9:Number;
var _local10:b2Mat22;
var _local11:b2Vec2;
var _local20:Number;
var _local21:Number;
var _local6:Number = 0;
var _local7:Number = _arg5;
_local8 = (_arg4.p1.x - _arg1.position.x);
_local9 = (_arg4.p1.y - _arg1.position.y);
_local10 = _arg1.R;
var _local12:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y));
var _local13:Number = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y));
_local8 = (_arg4.p2.x - _arg1.position.x);
_local9 = (_arg4.p2.y - _arg1.position.y);
_local10 = _arg1.R;
var _local14:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y));
var _local15:Number = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y));
var _local16:Number = (_local14 - _local12);
var _local17:Number = (_local15 - _local13);
var _local18 = -1;
var _local19:int;
while (_local19 < m_vertexCount) {
_local11 = m_vertices[_local19];
_local8 = (_local11.x - _local12);
_local9 = (_local11.y - _local13);
_local11 = m_normals[_local19];
_local20 = ((_local11.x * _local8) + (_local11.y * _local9));
_local21 = ((_local11.x * _local16) + (_local11.y * _local17));
if ((((_local21 < 0)) && ((_local20 < (_local6 * _local21))))){
_local6 = (_local20 / _local21);
_local18 = _local19;
} else {
if ((((_local21 > 0)) && ((_local20 < (_local7 * _local21))))){
_local7 = (_local20 / _local21);
};
};
if (_local7 < _local6){
return (false);
};
_local19++;
};
if (_local18 >= 0){
_arg2[0] = _local6;
_local10 = _arg1.R;
_local11 = m_normals[_local18];
_arg3.x = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_arg3.y = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
return (true);
};
return (false);
}
override public function ComputeMass(_arg1:b2MassData):void{
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:Number = 0;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = (1 / 3);
var _local9:int;
while (_local9 < m_vertexCount) {
_local10 = m_vertices[_local9];
_local11 = (((_local9 + 1) < m_vertexCount)) ? m_vertices[int((_local9 + 1))] : m_vertices[0];
_local12 = (_local10.x - _local6);
_local13 = (_local10.y - _local7);
_local14 = (_local11.x - _local6);
_local15 = (_local11.y - _local7);
_local16 = ((_local12 * _local15) - (_local13 * _local14));
_local17 = (0.5 * _local16);
_local4 = (_local4 + _local17);
_local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x)));
_local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y)));
_local18 = _local6;
_local19 = _local7;
_local20 = _local12;
_local21 = _local13;
_local22 = _local14;
_local23 = _local15;
_local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18));
_local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19));
_local5 = (_local5 + (_local16 * (_local24 + _local25)));
_local9++;
};
_arg1.mass = (m_density * _local4);
_local2 = (_local2 * (1 / _local4));
_local3 = (_local3 * (1 / _local4));
_arg1.center.Set(_local2, _local3);
_arg1.I = (m_density * _local5);
}
public function GetNormals():Array{
return (m_normals);
}
public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:b2Vec2;
var _local5:b2Mat22;
var _local11:Number;
_local5 = _arg1.R;
var _local6:Number = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y));
var _local7:Number = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y));
var _local8:int;
_local4 = m_coreVertices[0];
var _local9:Number = ((_local4.x * _local6) + (_local4.y * _local7));
var _local10 = 1;
while (_local10 < m_vertexCount) {
_local4 = m_coreVertices[_local10];
_local11 = ((_local4.x * _local6) + (_local4.y * _local7));
if (_local11 > _local9){
_local8 = _local10;
_local9 = _local11;
};
_local10++;
};
_local5 = _arg1.R;
_local4 = m_coreVertices[_local8];
s_supportVec.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y)));
s_supportVec.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y)));
return (s_supportVec);
}
public function GetVertexCount():int{
return (m_vertexCount);
}
override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:b2Mat22 = s_computeMat;
_local3 = _arg2.R;
_local4 = m_obb.R.col1;
_local5.col1.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local5.col1.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local4 = m_obb.R.col2;
_local5.col2.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local5.col2.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local5.Abs();
var _local6:b2Mat22 = _local5;
_local4 = m_obb.extents;
var _local7:Number = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y));
var _local8:Number = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y));
_local3 = _arg2.R;
_local4 = m_obb.center;
var _local9:Number = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)));
var _local10:Number = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)));
_arg1.lowerBound.Set((_local9 - _local7), (_local10 - _local8));
_arg1.upperBound.Set((_local9 + _local7), (_local10 + _local8));
}
override public function UpdateSweepRadius(_arg1:b2Vec2):void{
var _local2:b2Vec2;
var _local4:Number;
var _local5:Number;
m_sweepRadius = 0;
var _local3:int;
while (_local3 < m_vertexCount) {
_local2 = m_coreVertices[_local3];
_local4 = (_local2.x - _arg1.x);
_local5 = (_local2.y - _arg1.y);
_local4 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
if (_local4 > m_sweepRadius){
m_sweepRadius = _local4;
};
_local3++;
};
}
override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
var _local3:b2Vec2;
var _local10:Number;
var _local4:b2Mat22 = _arg1.R;
var _local5:Number = (_arg2.x - _arg1.position.x);
var _local6:Number = (_arg2.y - _arg1.position.y);
var _local7:Number = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y));
var _local8:Number = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y));
var _local9:int;
while (_local9 < m_vertexCount) {
_local3 = m_vertices[_local9];
_local5 = (_local7 - _local3.x);
_local6 = (_local8 - _local3.y);
_local3 = m_normals[_local9];
_local10 = ((_local3.x * _local5) + (_local3.y * _local6));
if (_local10 > 0){
return (false);
};
_local9++;
};
return (true);
}
public static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{
var _local3:b2Vec2;
var _local7:Number;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local3 = new b2Vec2();
var _local4:Number = 0;
var _local5:Number = 0;
var _local6:Number = 0;
_local7 = (1 / 3);
var _local8:int;
while (_local8 < _arg2) {
_local9 = _arg1[_local8];
_local10 = (((_local8 + 1) < _arg2)) ? _arg1[int((_local8 + 1))] : _arg1[0];
_local11 = (_local9.x - _local5);
_local12 = (_local9.y - _local6);
_local13 = (_local10.x - _local5);
_local14 = (_local10.y - _local6);
_local15 = ((_local11 * _local14) - (_local12 * _local13));
_local16 = (0.5 * _local15);
_local4 = (_local4 + _local16);
_local3.x = (_local3.x + ((_local16 * _local7) * ((_local5 + _local9.x) + _local10.x)));
_local3.y = (_local3.y + ((_local16 * _local7) * ((_local6 + _local9.y) + _local10.y)));
_local8++;
};
_local3.x = (_local3.x * (1 / _local4));
_local3.y = (_local3.y * (1 / _local4));
return (_local3);
}
public static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{
var _local4:int;
var _local7:b2Vec2;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:b2Mat22;
var _local5:Array = new Array((b2Settings.b2_maxPolygonVertices + 1));
_local4 = 0;
while (_local4 < _arg3) {
_local5[_local4] = _arg2[_local4];
_local4++;
};
_local5[_arg3] = _local5[0];
var _local6:Number = Number.MAX_VALUE;
_local4 = 1;
while (_local4 <= _arg3) {
_local7 = _local5[int((_local4 - 1))];
_local8 = (_local5[_local4].x - _local7.x);
_local9 = (_local5[_local4].y - _local7.y);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local8 = (_local8 / _local10);
_local9 = (_local9 / _local10);
_local11 = -(_local9);
_local12 = _local8;
_local13 = Number.MAX_VALUE;
_local14 = Number.MAX_VALUE;
_local15 = -(Number.MAX_VALUE);
_local16 = -(Number.MAX_VALUE);
_local17 = 0;
while (_local17 < _arg3) {
_local19 = (_local5[_local17].x - _local7.x);
_local20 = (_local5[_local17].y - _local7.y);
_local21 = ((_local8 * _local19) + (_local9 * _local20));
_local22 = ((_local11 * _local19) + (_local12 * _local20));
if (_local21 < _local13){
_local13 = _local21;
};
if (_local22 < _local14){
_local14 = _local22;
};
if (_local21 > _local15){
_local15 = _local21;
};
if (_local22 > _local16){
_local16 = _local22;
};
_local17++;
};
_local18 = ((_local15 - _local13) * (_local16 - _local14));
if (_local18 < (0.95 * _local6)){
_local6 = _local18;
_arg1.R.col1.x = _local8;
_arg1.R.col1.y = _local9;
_arg1.R.col2.x = _local11;
_arg1.R.col2.y = _local12;
_local23 = (0.5 * (_local13 + _local15));
_local24 = (0.5 * (_local14 + _local16));
_local25 = _arg1.R;
_arg1.center.x = (_local7.x + ((_local25.col1.x * _local23) + (_local25.col2.x * _local24)));
_arg1.center.y = (_local7.y + ((_local25.col1.y * _local23) + (_local25.col2.y * _local24)));
_arg1.extents.x = (0.5 * (_local15 - _local13));
_arg1.extents.y = (0.5 * (_local16 - _local14));
};
_local4++;
};
}
}
}//package Box2D.Collision.Shapes
Section 16
//b2Shape (Box2D.Collision.Shapes.b2Shape)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.*;
public class b2Shape {
public var m_next:b2Shape;
public var m_type:int;
public var m_sweepRadius:Number;
public var m_density:Number;
public var m_filter:b2FilterData;
public var m_friction:Number;
public var m_isSensor:Boolean;
public var m_restitution:Number;
public var m_userData;
public var m_proxyId:uint;
public var m_body:b2Body;
public static const e_polygonShape:int = 1;
public static const e_unknownShape:int = -1;
public static const e_circleShape:int = 0;
public static const e_shapeTypeCount:int = 2;
private static var s_resetAABB:b2AABB = new b2AABB();
private static var s_syncAABB:b2AABB = new b2AABB();
private static var s_proxyAABB:b2AABB = new b2AABB();
public function b2Shape(_arg1:b2ShapeDef){
m_userData = _arg1.userData;
m_friction = _arg1.friction;
m_restitution = _arg1.restitution;
m_density = _arg1.density;
m_body = null;
m_sweepRadius = 0;
m_next = null;
m_proxyId = b2Pair.b2_nullProxy;
m_filter = _arg1.filter.Copy();
m_isSensor = _arg1.isSensor;
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public function GetSweepRadius():Number{
return (m_sweepRadius);
}
public function GetNext():b2Shape{
return (m_next);
}
public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
}
public function GetType():int{
return (m_type);
}
public function GetRestitution():Number{
return (m_restitution);
}
public function GetFriction():Number{
return (m_friction);
}
public function GetFilterData():b2FilterData{
return (m_filter.Copy());
}
public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
return (false);
}
public function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
_arg1.DestroyProxy(m_proxyId);
var _local3:b2AABB = s_resetAABB;
ComputeAABB(_local3, _arg2);
var _local4:Boolean = _arg1.InRange(_local3);
if (_local4){
m_proxyId = _arg1.CreateProxy(_local3, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
}
public function SetFilterData(_arg1:b2FilterData):void{
m_filter = _arg1.Copy();
}
public function GetUserData(){
return (m_userData);
}
public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{
if (m_proxyId == b2Pair.b2_nullProxy){
return (false);
};
var _local4:b2AABB = s_syncAABB;
ComputeSweptAABB(_local4, _arg2, _arg3);
if (_arg1.InRange(_local4)){
_arg1.MoveProxy(m_proxyId, _local4);
return (true);
};
return (false);
}
public function ComputeMass(_arg1:b2MassData):void{
}
public function IsSensor():Boolean{
return (m_isSensor);
}
public function DestroyProxy(_arg1:b2BroadPhase):void{
if (m_proxyId != b2Pair.b2_nullProxy){
_arg1.DestroyProxy(m_proxyId);
m_proxyId = b2Pair.b2_nullProxy;
};
}
public function UpdateSweepRadius(_arg1:b2Vec2):void{
}
public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
}
public function GetBody():b2Body{
return (m_body);
}
public function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{
var _local3:b2AABB = s_proxyAABB;
ComputeAABB(_local3, _arg2);
var _local4:Boolean = _arg1.InRange(_local3);
if (_local4){
m_proxyId = _arg1.CreateProxy(_local3, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
}
public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
return (false);
}
public static function Destroy(_arg1:b2Shape, _arg2):void{
}
public static function Create(_arg1:b2ShapeDef, _arg2):b2Shape{
switch (_arg1.type){
case e_circleShape:
return (new b2CircleShape(_arg1));
case e_polygonShape:
return (new b2PolygonShape(_arg1));
default:
return (null);
};
}
}
}//package Box2D.Collision.Shapes
Section 17
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef)
package Box2D.Collision.Shapes {
public class b2ShapeDef {
public var friction:Number;// = 0.2
public var isSensor:Boolean;// = false
public var density:Number;// = 0
public var restitution:Number;// = 0
public var userData;// = null
public var filter:b2FilterData;
public var type:int;
public function b2ShapeDef(){
type = b2Shape.e_unknownShape;
filter = new b2FilterData();
super();
}
}
}//package Box2D.Collision.Shapes
Section 18
//b2AABB (Box2D.Collision.b2AABB)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2AABB {
public var upperBound:b2Vec2;
public var lowerBound:b2Vec2;
public function b2AABB(){
lowerBound = new b2Vec2();
upperBound = new b2Vec2();
super();
}
public function IsValid():Boolean{
var _local1:Number = (upperBound.x - lowerBound.x);
var _local2:Number = (upperBound.y - lowerBound.y);
var _local3:Boolean = (((_local1 >= 0)) && ((_local2 >= 0)));
_local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid()));
return (_local3);
}
}
}//package Box2D.Collision
Section 19
//b2Bound (Box2D.Collision.b2Bound)
package Box2D.Collision {
public class b2Bound {
public var value:uint;
public var proxyId:uint;
public var stabbingCount:uint;
public function Swap(_arg1:b2Bound):void{
var _local2:uint = value;
var _local3:uint = proxyId;
var _local4:uint = stabbingCount;
value = _arg1.value;
proxyId = _arg1.proxyId;
stabbingCount = _arg1.stabbingCount;
_arg1.value = _local2;
_arg1.proxyId = _local3;
_arg1.stabbingCount = _local4;
}
public function IsLower():Boolean{
return (((value & 1) == 0));
}
public function IsUpper():Boolean{
return (((value & 1) == 1));
}
}
}//package Box2D.Collision
Section 20
//b2BoundValues (Box2D.Collision.b2BoundValues)
package Box2D.Collision {
public class b2BoundValues {
public var lowerValues:Array;
public var upperValues:Array;
public function b2BoundValues(){
lowerValues = [0, 0];
upperValues = [0, 0];
super();
}
}
}//package Box2D.Collision
Section 21
//b2BroadPhase (Box2D.Collision.b2BroadPhase)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2BroadPhase {
public var m_bounds:Array;
public var m_quantizationFactor:b2Vec2;
public var m_worldAABB:b2AABB;
public var m_freeProxy:uint;
public var m_proxyCount:int;
public var m_proxyPool:Array;
public var m_queryResultCount:int;
public var m_pairManager:b2PairManager;
public var m_timeStamp:uint;
public var m_queryResults:Array;
public static const b2_nullEdge:uint = 0xFFFF;
public static const b2_invalid:uint = 0xFFFF;
public static var s_validate:Boolean = false;
public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){
var _local3:int;
var _local5:Number;
var _local6:b2Proxy;
var _local7:int;
m_pairManager = new b2PairManager();
m_proxyPool = new Array(b2Settings.b2_maxPairs);
m_bounds = new Array((2 * b2Settings.b2_maxProxies));
m_queryResults = new Array(b2Settings.b2_maxProxies);
m_quantizationFactor = new b2Vec2();
super();
m_pairManager.Initialize(this, _arg2);
m_worldAABB = _arg1;
m_proxyCount = 0;
_local3 = 0;
while (_local3 < b2Settings.b2_maxProxies) {
m_queryResults[_local3] = 0;
_local3++;
};
m_bounds = new Array(2);
_local3 = 0;
while (_local3 < 2) {
m_bounds[_local3] = new Array((2 * b2Settings.b2_maxProxies));
_local7 = 0;
while (_local7 < (2 * b2Settings.b2_maxProxies)) {
m_bounds[_local3][_local7] = new b2Bound();
_local7++;
};
_local3++;
};
var _local4:Number = (_arg1.upperBound.x - _arg1.lowerBound.x);
_local5 = (_arg1.upperBound.y - _arg1.lowerBound.y);
m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4);
m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5);
_local3 = 0;
while (_local3 < (b2Settings.b2_maxProxies - 1)) {
_local6 = new b2Proxy();
m_proxyPool[_local3] = _local6;
_local6.SetNext((_local3 + 1));
_local6.timeStamp = 0;
_local6.overlapCount = b2_invalid;
_local6.userData = null;
_local3++;
};
_local6 = new b2Proxy();
m_proxyPool[int((b2Settings.b2_maxProxies - 1))] = _local6;
_local6.SetNext(b2Pair.b2_nullProxy);
_local6.timeStamp = 0;
_local6.overlapCount = b2_invalid;
_local6.userData = null;
m_freeProxy = 0;
m_timeStamp = 1;
m_queryResultCount = 0;
}
public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{
var _local6:uint;
var _local7:uint;
var _local12:b2Proxy;
var _local4:Array = new Array();
var _local5:Array = new Array();
ComputeBounds(_local4, _local5, _arg1);
var _local8:Array = [_local6];
var _local9:Array = [_local7];
Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0);
Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1);
var _local10:int;
var _local11:int;
while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) {
_local12 = m_proxyPool[m_queryResults[_local11]];
_arg2[_local11] = _local12.userData;
_local11++;
_local10++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
return (_local10);
}
public function Commit():void{
m_pairManager.Commit();
}
public function GetProxy(_arg1:int):b2Proxy{
var _local2:b2Proxy = m_proxyPool[_arg1];
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){
return (null);
};
return (_local2);
}
private function IncrementTimeStamp():void{
var _local1:uint;
if (m_timeStamp == b2Settings.USHRT_MAX){
_local1 = 0;
while (_local1 < b2Settings.b2_maxProxies) {
(m_proxyPool[_local1] as b2Proxy).timeStamp = 0;
_local1++;
};
m_timeStamp = 1;
} else {
m_timeStamp++;
};
}
private function Query(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{
var _local10:b2Bound;
var _local12:int;
var _local13:int;
var _local14:b2Proxy;
var _local8:uint = BinarySearch(_arg5, _arg6, _arg3);
var _local9:uint = BinarySearch(_arg5, _arg6, _arg4);
var _local11:uint = _local8;
while (_local11 < _local9) {
_local10 = _arg5[_local11];
if (_local10.IsLower()){
IncrementOverlapCount(_local10.proxyId);
};
_local11++;
};
if (_local8 > 0){
_local12 = (_local8 - 1);
_local10 = _arg5[_local12];
_local13 = _local10.stabbingCount;
while (_local13) {
_local10 = _arg5[_local12];
if (_local10.IsLower()){
_local14 = m_proxyPool[_local10.proxyId];
if (_local8 <= _local14.upperBounds[_arg7]){
IncrementOverlapCount(_local10.proxyId);
_local13--;
};
};
_local12--;
};
};
_arg1[0] = _local8;
_arg2[0] = _local9;
}
private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{
var _local4:Array;
var _local5:b2Bound;
var _local6:b2Bound;
var _local3:int;
while (_local3 < 2) {
_local4 = m_bounds[_local3];
_local5 = _local4[_arg1.lowerBounds[_local3]];
_local6 = _local4[_arg2.upperBounds[_local3]];
if (_local5.value > _local6.value){
return (false);
};
_local5 = _local4[_arg1.upperBounds[_local3]];
_local6 = _local4[_arg2.lowerBounds[_local3]];
if (_local5.value < _local6.value){
return (false);
};
_local3++;
};
return (true);
}
private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{
var _local4:Number = _arg3.lowerBound.x;
var _local5:Number = _arg3.lowerBound.y;
_local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x);
_local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y);
_local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x);
_local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y);
var _local6:Number = _arg3.upperBound.x;
var _local7:Number = _arg3.upperBound.y;
_local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x);
_local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y);
_local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x);
_local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y);
_arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1));
_arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1);
_arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1));
_arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1);
}
public function CreateProxy(_arg1:b2AABB, _arg2):uint{
var _local3:uint;
var _local4:b2Proxy;
var _local11:Array;
var _local12:uint;
var _local13:uint;
var _local14:Array;
var _local15:Array;
var _local16:Array;
var _local17:int;
var _local18:int;
var _local19:b2Bound;
var _local20:b2Bound;
var _local21:b2Bound;
var _local22:int;
var _local23:b2Proxy;
var _local5:uint = m_freeProxy;
_local4 = m_proxyPool[_local5];
m_freeProxy = _local4.GetNext();
_local4.overlapCount = 0;
_local4.userData = _arg2;
var _local6:uint = (2 * m_proxyCount);
var _local7:Array = new Array();
var _local8:Array = new Array();
ComputeBounds(_local7, _local8, _arg1);
var _local9:int;
while (_local9 < 2) {
_local11 = m_bounds[_local9];
_local14 = [_local12];
_local15 = [_local13];
Query(_local14, _local15, _local7[_local9], _local8[_local9], _local11, _local6, _local9);
_local12 = _local14[0];
_local13 = _local15[0];
_local16 = new Array();
_local18 = (_local6 - _local13);
_local17 = 0;
while (_local17 < _local18) {
_local16[_local17] = new b2Bound();
_local19 = _local16[_local17];
_local20 = _local11[int((_local13 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local18 = _local16.length;
_local22 = (_local13 + 2);
_local17 = 0;
while (_local17 < _local18) {
_local20 = _local16[_local17];
_local19 = _local11[int((_local22 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local16 = new Array();
_local18 = (_local13 - _local12);
_local17 = 0;
while (_local17 < _local18) {
_local16[_local17] = new b2Bound();
_local19 = _local16[_local17];
_local20 = _local11[int((_local12 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local18 = _local16.length;
_local22 = (_local12 + 1);
_local17 = 0;
while (_local17 < _local18) {
_local20 = _local16[_local17];
_local19 = _local11[int((_local22 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local13++;
_local19 = _local11[_local12];
_local20 = _local11[_local13];
_local19.value = _local7[_local9];
_local19.proxyId = _local5;
_local20.value = _local8[_local9];
_local20.proxyId = _local5;
_local21 = _local11[int((_local12 - 1))];
_local19.stabbingCount = ((_local12 == 0)) ? 0 : _local21.stabbingCount;
_local21 = _local11[int((_local13 - 1))];
_local20.stabbingCount = _local21.stabbingCount;
_local3 = _local12;
while (_local3 < _local13) {
_local21 = _local11[_local3];
_local21.stabbingCount++;
_local3++;
};
_local3 = _local12;
while (_local3 < (_local6 + 2)) {
_local19 = _local11[_local3];
_local23 = m_proxyPool[_local19.proxyId];
if (_local19.IsLower()){
_local23.lowerBounds[_local9] = _local3;
} else {
_local23.upperBounds[_local9] = _local3;
};
_local3++;
};
_local9++;
};
m_proxyCount++;
var _local10:int;
while (_local10 < m_queryResultCount) {
m_pairManager.AddBufferedPair(_local5, m_queryResults[_local10]);
_local10++;
};
m_pairManager.Commit();
m_queryResultCount = 0;
IncrementTimeStamp();
return (_local5);
}
public function DestroyProxy(_arg1:uint):void{
var _local2:b2Bound;
var _local3:b2Bound;
var _local8:Array;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:Array;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:uint;
var _local18:int;
var _local19:b2Proxy;
var _local4:b2Proxy = m_proxyPool[_arg1];
var _local5:int = (2 * m_proxyCount);
var _local6:int;
while (_local6 < 2) {
_local8 = m_bounds[_local6];
_local9 = _local4.lowerBounds[_local6];
_local10 = _local4.upperBounds[_local6];
_local2 = _local8[_local9];
_local11 = _local2.value;
_local3 = _local8[_local10];
_local12 = _local3.value;
_local13 = new Array();
_local15 = ((_local10 - _local9) - 1);
_local14 = 0;
while (_local14 < _local15) {
_local13[_local14] = new b2Bound();
_local2 = _local13[_local14];
_local3 = _local8[int(((_local9 + 1) + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = _local13.length;
_local16 = _local9;
_local14 = 0;
while (_local14 < _local15) {
_local3 = _local13[_local14];
_local2 = _local8[int((_local16 + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local13 = new Array();
_local15 = ((_local5 - _local10) - 1);
_local14 = 0;
while (_local14 < _local15) {
_local13[_local14] = new b2Bound();
_local2 = _local13[_local14];
_local3 = _local8[int(((_local10 + 1) + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = _local13.length;
_local16 = (_local10 - 1);
_local14 = 0;
while (_local14 < _local15) {
_local3 = _local13[_local14];
_local2 = _local8[int((_local16 + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = (_local5 - 2);
_local17 = _local9;
while (_local17 < _local15) {
_local2 = _local8[_local17];
_local19 = m_proxyPool[_local2.proxyId];
if (_local2.IsLower()){
_local19.lowerBounds[_local6] = _local17;
} else {
_local19.upperBounds[_local6] = _local17;
};
_local17++;
};
_local15 = (_local10 - 1);
_local18 = _local9;
while (_local18 < _local15) {
_local2 = _local8[_local18];
_local2.stabbingCount--;
_local18++;
};
Query([0], [0], _local11, _local12, _local8, (_local5 - 2), _local6);
_local6++;
};
var _local7:int;
while (_local7 < m_queryResultCount) {
m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local7]);
_local7++;
};
m_pairManager.Commit();
m_queryResultCount = 0;
IncrementTimeStamp();
_local4.userData = null;
_local4.overlapCount = b2_invalid;
_local4.lowerBounds[0] = b2_invalid;
_local4.lowerBounds[1] = b2_invalid;
_local4.upperBounds[0] = b2_invalid;
_local4.upperBounds[1] = b2_invalid;
_local4.SetNext(m_freeProxy);
m_freeProxy = _arg1;
m_proxyCount--;
}
public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{
var _local4:Array;
var _local5:b2Bound;
var _local3:int;
while (_local3 < 2) {
_local4 = m_bounds[_local3];
_local5 = _local4[_arg2.upperBounds[_local3]];
if (_arg1.lowerValues[_local3] > _local5.value){
return (false);
};
_local5 = _local4[_arg2.lowerBounds[_local3]];
if (_arg1.upperValues[_local3] < _local5.value){
return (false);
};
_local3++;
};
return (true);
}
public function Validate():void{
var _local1:b2Pair;
var _local2:b2Proxy;
var _local3:b2Proxy;
var _local4:Boolean;
var _local6:b2Bound;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:b2Bound;
var _local5:int;
while (_local5 < 2) {
_local6 = m_bounds[_local5];
_local7 = (2 * m_proxyCount);
_local8 = 0;
_local9 = 0;
while (_local9 < _local7) {
_local10 = _local6[_local9];
if (_local10.IsLower() == true){
_local8++;
} else {
_local8--;
};
_local9++;
};
_local5++;
};
}
private function IncrementOverlapCount(_arg1:uint):void{
var _local2:b2Proxy = m_proxyPool[_arg1];
if (_local2.timeStamp < m_timeStamp){
_local2.timeStamp = m_timeStamp;
_local2.overlapCount = 1;
} else {
_local2.overlapCount = 2;
m_queryResults[m_queryResultCount] = _arg1;
m_queryResultCount++;
};
}
public function InRange(_arg1:b2AABB):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = _arg1.lowerBound.x;
_local3 = _arg1.lowerBound.y;
_local2 = (_local2 - m_worldAABB.upperBound.x);
_local3 = (_local3 - m_worldAABB.upperBound.y);
_local4 = m_worldAABB.lowerBound.x;
_local5 = m_worldAABB.lowerBound.y;
_local4 = (_local4 - _arg1.upperBound.x);
_local5 = (_local5 - _arg1.upperBound.y);
_local2 = b2Math.b2Max(_local2, _local4);
_local3 = b2Math.b2Max(_local3, _local5);
return ((b2Math.b2Max(_local2, _local3) < 0));
}
public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{
var _local3:Array;
var _local4:int;
var _local5:uint;
var _local6:uint;
var _local7:b2Bound;
var _local8:b2Bound;
var _local9:b2Bound;
var _local10:uint;
var _local11:b2Proxy;
var _local16:Array;
var _local17:uint;
var _local18:uint;
var _local19:uint;
var _local20:uint;
var _local21:int;
var _local22:int;
var _local23:uint;
var _local24:b2Proxy;
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){
return;
};
if (_arg2.IsValid() == false){
return;
};
var _local12:uint = (2 * m_proxyCount);
var _local13:b2Proxy = m_proxyPool[_arg1];
var _local14:b2BoundValues = new b2BoundValues();
ComputeBounds(_local14.lowerValues, _local14.upperValues, _arg2);
var _local15:b2BoundValues = new b2BoundValues();
_local5 = 0;
while (_local5 < 2) {
_local7 = m_bounds[_local5][_local13.lowerBounds[_local5]];
_local15.lowerValues[_local5] = _local7.value;
_local7 = m_bounds[_local5][_local13.upperBounds[_local5]];
_local15.upperValues[_local5] = _local7.value;
_local5++;
};
_local5 = 0;
while (_local5 < 2) {
_local16 = m_bounds[_local5];
_local17 = _local13.lowerBounds[_local5];
_local18 = _local13.upperBounds[_local5];
_local19 = _local14.lowerValues[_local5];
_local20 = _local14.upperValues[_local5];
_local7 = _local16[_local17];
_local21 = (_local19 - _local7.value);
_local7.value = _local19;
_local7 = _local16[_local18];
_local22 = (_local20 - _local7.value);
_local7.value = _local20;
if (_local21 < 0){
_local6 = _local17;
while ((((_local6 > 0)) && ((_local19 < (_local16[int((_local6 - 1))] as b2Bound).value)))) {
_local7 = _local16[_local6];
_local8 = _local16[int((_local6 - 1))];
_local23 = _local8.proxyId;
_local24 = m_proxyPool[_local8.proxyId];
_local8.stabbingCount++;
if (_local8.IsUpper() == true){
if (TestOverlap(_local14, _local24)){
m_pairManager.AddBufferedPair(_arg1, _local23);
};
_local3 = _local24.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount++;
} else {
_local3 = _local24.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount--;
};
_local3 = _local13.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.Swap(_local8);
_local6--;
};
};
if (_local22 > 0){
_local6 = _local18;
while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local20)))) {
_local7 = _local16[_local6];
_local9 = _local16[int((_local6 + 1))];
_local10 = _local9.proxyId;
_local11 = m_proxyPool[_local10];
_local9.stabbingCount++;
if (_local9.IsLower() == true){
if (TestOverlap(_local14, _local11)){
m_pairManager.AddBufferedPair(_arg1, _local10);
};
_local3 = _local11.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount++;
} else {
_local3 = _local11.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount--;
};
_local3 = _local13.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.Swap(_local9);
_local6++;
};
};
if (_local21 > 0){
_local6 = _local17;
while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local19)))) {
_local7 = _local16[_local6];
_local9 = _local16[int((_local6 + 1))];
_local10 = _local9.proxyId;
_local11 = m_proxyPool[_local10];
_local9.stabbingCount--;
if (_local9.IsUpper()){
if (TestOverlap(_local15, _local11)){
m_pairManager.RemoveBufferedPair(_arg1, _local10);
};
_local3 = _local11.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount--;
} else {
_local3 = _local11.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount++;
};
_local3 = _local13.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.Swap(_local9);
_local6++;
};
};
if (_local22 < 0){
_local6 = _local18;
while ((((_local6 > 0)) && ((_local20 < (_local16[int((_local6 - 1))] as b2Bound).value)))) {
_local7 = _local16[_local6];
_local8 = _local16[int((_local6 - 1))];
_local23 = _local8.proxyId;
_local24 = m_proxyPool[_local23];
_local8.stabbingCount--;
if (_local8.IsLower() == true){
if (TestOverlap(_local15, _local24)){
m_pairManager.RemoveBufferedPair(_arg1, _local23);
};
_local3 = _local24.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount--;
} else {
_local3 = _local24.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount++;
};
_local3 = _local13.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.Swap(_local8);
_local6--;
};
};
_local5++;
};
}
public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{
var _local6:int;
var _local7:b2Bound;
var _local4:int;
var _local5:int = (_arg2 - 1);
while (_local4 <= _local5) {
_local6 = ((_local4 + _local5) / 2);
_local7 = _arg1[_local6];
if (_local7.value > _arg3){
_local5 = (_local6 - 1);
} else {
if (_local7.value < _arg3){
_local4 = (_local6 + 1);
} else {
return (uint(_local6));
};
};
};
return (uint(_local4));
}
}
}//package Box2D.Collision
Section 22
//b2BufferedPair (Box2D.Collision.b2BufferedPair)
package Box2D.Collision {
public class b2BufferedPair {
public var proxyId1:uint;
public var proxyId2:uint;
}
}//package Box2D.Collision
Section 23
//b2Collision (Box2D.Collision.b2Collision)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.*;
public class b2Collision {
public static const b2_nullFeature:uint = 0xFF;
private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2();
public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):Number{
var _local11:b2Mat22;
var _local12:b2Vec2;
var _local25:Number;
var _local6:int = _arg1.m_vertexCount;
var _local7:Array = _arg1.m_vertices;
var _local8:Array = _arg1.m_normals;
var _local9:int = _arg4.m_vertexCount;
var _local10:Array = _arg4.m_vertices;
_local11 = _arg2.R;
_local12 = _local8[_arg3];
var _local13:Number = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y));
var _local14:Number = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y));
_local11 = _arg5.R;
var _local15:Number = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14));
var _local16:Number = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14));
var _local17:int;
var _local18:Number = Number.MAX_VALUE;
var _local19:int;
while (_local19 < _local9) {
_local12 = _local10[_local19];
_local25 = ((_local12.x * _local15) + (_local12.y * _local16));
if (_local25 < _local18){
_local18 = _local25;
_local17 = _local19;
};
_local19++;
};
_local12 = _local7[_arg3];
_local11 = _arg2.R;
var _local20:Number = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)));
var _local21:Number = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)));
_local12 = _local10[_local17];
_local11 = _arg5.R;
var _local22:Number = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)));
var _local23:Number = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)));
_local22 = (_local22 - _local20);
_local23 = (_local23 - _local21);
var _local24:Number = ((_local22 * _local13) + (_local23 * _local14));
return (_local24);
}
public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{
var _local3:b2Vec2 = _arg2.lowerBound;
var _local4:b2Vec2 = _arg1.upperBound;
var _local5:Number = (_local3.x - _local4.x);
var _local6:Number = (_local3.y - _local4.y);
_local3 = _arg1.lowerBound;
_local4 = _arg2.upperBound;
var _local7:Number = (_local3.x - _local4.x);
var _local8:Number = (_local3.y - _local4.y);
if ((((_local5 > 0)) || ((_local6 > 0)))){
return (false);
};
if ((((_local7 > 0)) || ((_local8 > 0)))){
return (false);
};
return (true);
}
public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):void{
var _local12:b2Mat22;
var _local13:b2Vec2;
var _local20:ClipVertex;
var _local23:Number;
var _local7:int = _arg2.m_vertexCount;
var _local8:Array = _arg2.m_normals;
var _local9:int = _arg5.m_vertexCount;
var _local10:Array = _arg5.m_vertices;
var _local11:Array = _arg5.m_normals;
_local12 = _arg3.R;
_local13 = _local8[_arg4];
var _local14:Number = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y));
var _local15:Number = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y));
_local12 = _arg6.R;
var _local16:Number = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15));
_local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15));
_local14 = _local16;
var _local17:int;
var _local18:Number = Number.MAX_VALUE;
var _local19:int;
while (_local19 < _local9) {
_local13 = _local11[_local19];
_local23 = ((_local14 * _local13.x) + (_local15 * _local13.y));
if (_local23 < _local18){
_local18 = _local23;
_local17 = _local19;
};
_local19++;
};
var _local21:int = _local17;
var _local22:int = (((_local21 + 1) < _local9)) ? (_local21 + 1) : 0;
_local20 = _arg1[0];
_local13 = _local10[_local21];
_local12 = _arg6.R;
_local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)));
_local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)));
_local20.id.features.referenceEdge = _arg4;
_local20.id.features.incidentEdge = _local21;
_local20.id.features.incidentVertex = 0;
_local20 = _arg1[1];
_local13 = _local10[_local22];
_local12 = _arg6.R;
_local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)));
_local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)));
_local20.id.features.referenceEdge = _arg4;
_local20.id.features.incidentEdge = _local22;
_local20.id.features.incidentVertex = 1;
}
public static function b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{
var _local6:ClipVertex;
var _local13:b2PolygonShape;
var _local14:b2PolygonShape;
var _local17:int;
var _local18:uint;
var _local34:int;
var _local37:b2Vec2;
var _local38:Number;
var _local39:b2ManifoldPoint;
_arg1.pointCount = 0;
var _local7:int;
var _local8:Array = [_local7];
var _local9:Number = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5);
_local7 = _local8[0];
if (_local9 > 0){
return;
};
var _local10:int;
var _local11:Array = [_local10];
var _local12:Number = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3);
_local10 = _local11[0];
if (_local12 > 0){
return;
};
var _local15:b2XForm = new b2XForm();
var _local16:b2XForm = new b2XForm();
var _local19:Number = 0.98;
var _local20:Number = 0.001;
if (_local12 > ((_local19 * _local9) + _local20)){
_local13 = _arg4;
_local14 = _arg2;
_local15.Set(_arg5);
_local16.Set(_arg3);
_local17 = _local10;
_local18 = 1;
} else {
_local13 = _arg2;
_local14 = _arg4;
_local15.Set(_arg3);
_local16.Set(_arg5);
_local17 = _local7;
_local18 = 0;
};
var _local21:Array = [new ClipVertex(), new ClipVertex()];
FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16);
var _local22:int = _local13.m_vertexCount;
var _local23:Array = _local13.m_vertices;
var _local24:b2Vec2 = _local23[_local17];
var _local25:b2Vec2 = _local24.Copy();
if ((_local17 + 1) < _local22){
_local24 = _local23[int((_local17 + 1))];
_local37 = _local24.Copy();
} else {
_local24 = _local23[0];
_local37 = _local24.Copy();
};
var _local26:b2Vec2 = b2Math.SubtractVV(_local37, _local25);
var _local27:b2Vec2 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25));
_local27.Normalize();
var _local28:b2Vec2 = b2Math.b2CrossVF(_local27, 1);
_local25 = b2Math.b2MulX(_local15, _local25);
_local37 = b2Math.b2MulX(_local15, _local37);
var _local29:Number = b2Math.b2Dot(_local28, _local25);
var _local30:Number = -(b2Math.b2Dot(_local27, _local25));
var _local31:Number = b2Math.b2Dot(_local27, _local37);
var _local32:Array = [new ClipVertex(), new ClipVertex()];
var _local33:Array = [new ClipVertex(), new ClipVertex()];
_local34 = ClipSegmentToLine(_local32, _local21, _local27.Negative(), _local30);
if (_local34 < 2){
return;
};
_local34 = ClipSegmentToLine(_local33, _local32, _local27, _local31);
if (_local34 < 2){
return;
};
_arg1.normal = (_local18) ? _local28.Negative() : _local28.Copy();
var _local35:int;
var _local36:int;
while (_local36 < b2Settings.b2_maxManifoldPoints) {
_local6 = _local33[_local36];
_local38 = (b2Math.b2Dot(_local28, _local6.v) - _local29);
if (_local38 <= 0){
_local39 = _arg1.points[_local35];
_local39.separation = _local38;
_local39.localPoint1 = b2Math.b2MulXT(_arg3, _local6.v);
_local39.localPoint2 = b2Math.b2MulXT(_arg5, _local6.v);
_local39.id.key = _local6.id._key;
_local39.id.features.flip = _local18;
_local35++;
};
_local36++;
};
_arg1.pointCount = _local35;
}
public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):Number{
var _local8:b2Vec2;
var _local9:b2Mat22;
var _local22:int;
var _local23:Number;
var _local24:int;
var _local25:Number;
var _local6:int = _arg2.m_vertexCount;
var _local7:Array = _arg2.m_normals;
_local9 = _arg5.R;
_local8 = _arg4.m_centroid;
var _local10:Number = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y)));
var _local11:Number = (_arg5.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y)));
_local9 = _arg3.R;
_local8 = _arg2.m_centroid;
_local10 = (_local10 - (_arg3.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))));
_local11 = (_local11 - (_arg3.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y))));
var _local12:Number = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y));
var _local13:Number = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y));
var _local14:int;
var _local15:Number = -(Number.MAX_VALUE);
var _local16:int;
while (_local16 < _local6) {
_local8 = _local7[_local16];
_local25 = ((_local8.x * _local12) + (_local8.y * _local13));
if (_local25 > _local15){
_local15 = _local25;
_local14 = _local16;
};
_local16++;
};
var _local17:Number = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5);
if (_local17 > 0){
return (_local17);
};
var _local18:int = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1);
var _local19:Number = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5);
if (_local19 > 0){
return (_local19);
};
var _local20:int = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0;
var _local21:Number = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5);
if (_local21 > 0){
return (_local21);
};
if ((((_local19 > _local17)) && ((_local19 > _local21)))){
_local24 = -1;
_local22 = _local18;
_local23 = _local19;
} else {
if (_local21 > _local17){
_local24 = 1;
_local22 = _local20;
_local23 = _local21;
} else {
_arg1[0] = _local14;
return (_local17);
};
};
while (true) {
if (_local24 == -1){
_local14 = (((_local22 - 1) >= 0)) ? (_local22 - 1) : (_local6 - 1);
} else {
_local14 = (((_local22 + 1) < _local6)) ? (_local22 + 1) : 0;
};
_local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5);
if (_local17 > 0){
return (_local17);
};
if (_local17 > _local23){
_local22 = _local14;
_local23 = _local17;
} else {
break;
};
};
_arg1[0] = _local22;
return (_local23);
}
public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{
var _local5:ClipVertex;
var _local6:int;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:Number;
var _local11:Number;
var _local12:b2Vec2;
var _local13:ClipVertex;
_local6 = 0;
_local5 = _arg2[0];
_local7 = _local5.v;
_local5 = _arg2[1];
_local8 = _local5.v;
_local9 = (b2Math.b2Dot(_arg3, _local7) - _arg4);
var _local10:Number = (b2Math.b2Dot(_arg3, _local8) - _arg4);
if (_local9 <= 0){
var _temp1 = _local6;
_local6 = (_local6 + 1);
var _local14 = _temp1;
_arg1[_local14] = _arg2[0];
};
if (_local10 <= 0){
var _temp2 = _local6;
_local6 = (_local6 + 1);
_local14 = _temp2;
_arg1[_local14] = _arg2[1];
};
if ((_local9 * _local10) < 0){
_local11 = (_local9 / (_local9 - _local10));
_local5 = _arg1[_local6];
_local12 = _local5.v;
_local12.x = (_local7.x + (_local11 * (_local8.x - _local7.x)));
_local12.y = (_local7.y + (_local11 * (_local8.y - _local7.y)));
_local5 = _arg1[_local6];
if (_local9 > 0){
_local13 = _arg2[0];
_local5.id = _local13.id;
} else {
_local13 = _arg2[1];
_local5.id = _local13.id;
};
_local6++;
};
return (_local6);
}
public static function b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{
var _local6:b2Mat22;
var _local7:b2Vec2;
var _local18:Number;
var _local24:Number;
var _local25:Number;
_arg1.pointCount = 0;
_local6 = _arg3.R;
_local7 = _arg2.m_localPosition;
var _local8:Number = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)));
var _local9:Number = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)));
_local6 = _arg5.R;
_local7 = _arg4.m_localPosition;
var _local10:Number = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)));
var _local11:Number = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)));
var _local12:Number = (_local10 - _local8);
var _local13:Number = (_local11 - _local9);
var _local14:Number = ((_local12 * _local12) + (_local13 * _local13));
var _local15:Number = _arg2.m_radius;
var _local16:Number = _arg4.m_radius;
var _local17:Number = (_local15 + _local16);
if (_local14 > (_local17 * _local17)){
return;
};
if (_local14 < Number.MIN_VALUE){
_local18 = -(_local17);
_arg1.normal.Set(0, 1);
} else {
_local24 = Math.sqrt(_local14);
_local18 = (_local24 - _local17);
_local25 = (1 / _local24);
_arg1.normal.x = (_local25 * _local12);
_arg1.normal.y = (_local25 * _local13);
};
_arg1.pointCount = 1;
var _local19:b2ManifoldPoint = _arg1.points[0];
_local19.id.key = 0;
_local19.separation = _local18;
_local8 = (_local8 + (_local15 * _arg1.normal.x));
_local9 = (_local9 + (_local15 * _arg1.normal.y));
_local10 = (_local10 - (_local16 * _arg1.normal.x));
_local11 = (_local11 - (_local16 * _arg1.normal.y));
var _local20:Number = (0.5 * (_local8 + _local10));
var _local21:Number = (0.5 * (_local9 + _local11));
var _local22:Number = (_local20 - _arg3.position.x);
var _local23:Number = (_local21 - _arg3.position.y);
_local19.localPoint1.x = ((_local22 * _arg3.R.col1.x) + (_local23 * _arg3.R.col1.y));
_local19.localPoint1.y = ((_local22 * _arg3.R.col2.x) + (_local23 * _arg3.R.col2.y));
_local22 = (_local20 - _arg5.position.x);
_local23 = (_local21 - _arg5.position.y);
_local19.localPoint2.x = ((_local22 * _arg5.R.col1.x) + (_local23 * _arg5.R.col1.y));
_local19.localPoint2.y = ((_local22 * _arg5.R.col2.x) + (_local23 * _arg5.R.col2.y));
}
public static function b2CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{
var _local6:b2ManifoldPoint;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:b2Vec2;
var _local12:b2Mat22;
var _local17:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
_arg1.pointCount = 0;
_local12 = _arg5.R;
_local11 = _arg4.m_localPosition;
var _local13:Number = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y)));
var _local14:Number = (_arg5.position.y + ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y)));
_local7 = (_local13 - _arg3.position.x);
_local8 = (_local14 - _arg3.position.y);
_local12 = _arg3.R;
var _local15:Number = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
var _local16:Number = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
var _local18:int;
var _local19:Number = -(Number.MAX_VALUE);
var _local20:Number = _arg4.m_radius;
var _local21:int = _arg2.m_vertexCount;
var _local22:Array = _arg2.m_vertices;
var _local23:Array = _arg2.m_normals;
var _local24:int;
while (_local24 < _local21) {
_local11 = _local22[_local24];
_local7 = (_local15 - _local11.x);
_local8 = (_local16 - _local11.y);
_local11 = _local23[_local24];
_local34 = ((_local11.x * _local7) + (_local11.y * _local8));
if (_local34 > _local20){
return;
};
if (_local34 > _local19){
_local19 = _local34;
_local18 = _local24;
};
_local24++;
};
if (_local19 < Number.MIN_VALUE){
_arg1.pointCount = 1;
_local11 = _local23[_local18];
_local12 = _arg3.R;
_arg1.normal.x = ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y));
_arg1.normal.y = ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y));
_local6 = _arg1.points[0];
_local6.id.features.incidentEdge = _local18;
_local6.id.features.incidentVertex = b2_nullFeature;
_local6.id.features.referenceEdge = 0;
_local6.id.features.flip = 0;
_local9 = (_local13 - (_local20 * _arg1.normal.x));
_local10 = (_local14 - (_local20 * _arg1.normal.y));
_local7 = (_local9 - _arg3.position.x);
_local8 = (_local10 - _arg3.position.y);
_local12 = _arg3.R;
_local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local7 = (_local9 - _arg5.position.x);
_local8 = (_local10 - _arg5.position.y);
_local12 = _arg5.R;
_local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local6.separation = (_local19 - _local20);
return;
};
var _local25:int = _local18;
var _local26:int = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0;
_local11 = _local22[_local25];
var _local27:b2Vec2 = _local22[_local26];
var _local28:Number = (_local27.x - _local11.x);
var _local29:Number = (_local27.y - _local11.y);
var _local30:Number = Math.sqrt(((_local28 * _local28) + (_local29 * _local29)));
_local28 = (_local28 / _local30);
_local29 = (_local29 / _local30);
_local7 = (_local15 - _local11.x);
_local8 = (_local16 - _local11.y);
var _local31:Number = ((_local7 * _local28) + (_local8 * _local29));
_local6 = _arg1.points[0];
if (_local31 <= 0){
_local32 = _local11.x;
_local33 = _local11.y;
_local6.id.features.incidentEdge = b2_nullFeature;
_local6.id.features.incidentVertex = _local25;
} else {
if (_local31 >= _local30){
_local32 = _local27.x;
_local33 = _local27.y;
_local6.id.features.incidentEdge = b2_nullFeature;
_local6.id.features.incidentVertex = _local26;
} else {
_local32 = ((_local28 * _local31) + _local11.x);
_local33 = ((_local29 * _local31) + _local11.y);
_local6.id.features.incidentEdge = _local18;
_local6.id.features.incidentVertex = 0;
};
};
_local7 = (_local15 - _local32);
_local8 = (_local16 - _local33);
_local17 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
_local7 = (_local7 / _local17);
_local8 = (_local8 / _local17);
if (_local17 > _local20){
return;
};
_arg1.pointCount = 1;
_local12 = _arg3.R;
_arg1.normal.x = ((_local12.col1.x * _local7) + (_local12.col2.x * _local8));
_arg1.normal.y = ((_local12.col1.y * _local7) + (_local12.col2.y * _local8));
_local9 = (_local13 - (_local20 * _arg1.normal.x));
_local10 = (_local14 - (_local20 * _arg1.normal.y));
_local7 = (_local9 - _arg3.position.x);
_local8 = (_local10 - _arg3.position.y);
_local12 = _arg3.R;
_local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local7 = (_local9 - _arg5.position.x);
_local8 = (_local10 - _arg5.position.y);
_local12 = _arg5.R;
_local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local6.separation = (_local17 - _local20);
_local6.id.features.referenceEdge = 0;
_local6.id.features.flip = 0;
}
}
}//package Box2D.Collision
Section 24
//b2ContactID (Box2D.Collision.b2ContactID)
package Box2D.Collision {
public class b2ContactID {
public var _key:uint;
public var features:Features;
public function b2ContactID(){
features = new Features();
super();
features._m_id = this;
}
public function Set(_arg1:b2ContactID):void{
key = _arg1._key;
}
public function Copy():b2ContactID{
var _local1:b2ContactID = new b2ContactID();
_local1.key = key;
return (_local1);
}
public function set key(_arg1:uint):void{
_key = _arg1;
features._referenceEdge = (_key & 0xFF);
features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF);
features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF);
features._flip = (((_key & 4278190080) >> 24) & 0xFF);
}
public function get key():uint{
return (_key);
}
}
}//package Box2D.Collision
Section 25
//b2ContactPoint (Box2D.Collision.b2ContactPoint)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
public class b2ContactPoint {
public var friction:Number;
public var separation:Number;
public var normal:b2Vec2;
public var position:b2Vec2;
public var restitution:Number;
public var shape1:b2Shape;
public var shape2:b2Shape;
public var id:b2ContactID;
public var velocity:b2Vec2;
public function b2ContactPoint(){
position = new b2Vec2();
velocity = new b2Vec2();
normal = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Collision
Section 26
//b2Distance (Box2D.Collision.b2Distance)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.*;
public class b2Distance {
private static var s_p2s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var s_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var s_points:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var gPoint:b2Point = new b2Point();
public static var g_GJK_Iterations:int = 0;
public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{
var _local6:b2Vec2;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local4:Number = (100 * Number.MIN_VALUE);
var _local5:int;
while (_local5 < _arg3) {
_local6 = _arg2[_local5];
_local7 = Math.abs((_arg1.x - _local6.x));
_local8 = Math.abs((_arg1.y - _local6.y));
_local9 = Math.max(Math.abs(_arg1.x), Math.abs(_local6.x));
_local10 = Math.max(Math.abs(_arg1.y), Math.abs(_local6.y));
if ((((_local7 < (_local4 * (_local9 + 1)))) && ((_local8 < (_local4 * (_local10 + 1)))))){
return (true);
};
_local5++;
};
return (false);
}
public static function DistanceGeneric(_arg1:b2Vec2, _arg2:b2Vec2, _arg3, _arg4:b2XForm, _arg5, _arg6:b2XForm):Number{
var _local7:b2Vec2;
var _local15:Number;
var _local16:Number;
var _local17:b2Vec2;
var _local18:b2Vec2;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:int;
var _local8:Array = s_p1s;
var _local9:Array = s_p2s;
var _local10:Array = s_points;
var _local11:int;
_arg1.SetV(_arg3.GetFirstVertex(_arg4));
_arg2.SetV(_arg5.GetFirstVertex(_arg6));
var _local12:Number = 0;
var _local13 = 20;
var _local14:int;
while (_local14 < _local13) {
_local15 = (_arg2.x - _arg1.x);
_local16 = (_arg2.y - _arg1.y);
_local17 = _arg3.Support(_arg4, _local15, _local16);
_local18 = _arg5.Support(_arg6, -(_local15), -(_local16));
_local12 = ((_local15 * _local15) + (_local16 * _local16));
_local19 = (_local18.x - _local17.x);
_local20 = (_local18.y - _local17.y);
_local21 = ((_local15 * _local19) + (_local16 * _local20));
if ((_local12 - ((_local15 * _local19) + (_local16 * _local20))) <= (0.01 * _local12)){
if (_local11 == 0){
_arg1.SetV(_local17);
_arg2.SetV(_local18);
};
g_GJK_Iterations = _local14;
return (Math.sqrt(_local12));
};
switch (_local11){
case 0:
_local7 = _local8[0];
_local7.SetV(_local17);
_local7 = _local9[0];
_local7.SetV(_local18);
_local7 = _local10[0];
_local7.x = _local19;
_local7.y = _local20;
_arg1.SetV(_local8[0]);
_arg2.SetV(_local9[0]);
_local11++;
break;
case 1:
_local7 = _local8[1];
_local7.SetV(_local17);
_local7 = _local9[1];
_local7.SetV(_local18);
_local7 = _local10[1];
_local7.x = _local19;
_local7.y = _local20;
_local11 = ProcessTwo(_arg1, _arg2, _local8, _local9, _local10);
break;
case 2:
_local7 = _local8[2];
_local7.SetV(_local17);
_local7 = _local9[2];
_local7.SetV(_local18);
_local7 = _local10[2];
_local7.x = _local19;
_local7.y = _local20;
_local11 = ProcessThree(_arg1, _arg2, _local8, _local9, _local10);
break;
};
if (_local11 == 3){
g_GJK_Iterations = _local14;
return (0);
};
_local22 = -(Number.MAX_VALUE);
_local23 = 0;
while (_local23 < _local11) {
_local7 = _local10[_local23];
_local22 = b2Math.b2Max(_local22, ((_local7.x * _local7.x) + (_local7.y * _local7.y)));
_local23++;
};
if ((((_local11 == 3)) || ((_local12 <= ((100 * Number.MIN_VALUE) * _local22))))){
g_GJK_Iterations = _local14;
_local15 = (_arg2.x - _arg1.x);
_local16 = (_arg2.y - _arg1.y);
_local12 = ((_local15 * _local15) + (_local16 * _local16));
return (Math.sqrt(_local12));
};
_local14++;
};
g_GJK_Iterations = _local13;
return (Math.sqrt(_local12));
}
public static function DistanceCC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2CircleShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{
var _local7:b2Mat22;
var _local8:b2Vec2;
var _local19:Number;
var _local20:Number;
_local7 = _arg4.R;
_local8 = _arg3.m_localPosition;
var _local9:Number = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
var _local10:Number = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
_local7 = _arg6.R;
_local8 = _arg5.m_localPosition;
var _local11:Number = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
var _local12:Number = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
var _local13:Number = (_local11 - _local9);
var _local14:Number = (_local12 - _local10);
var _local15:Number = ((_local13 * _local13) + (_local14 * _local14));
var _local16:Number = (_arg3.m_radius - b2Settings.b2_toiSlop);
var _local17:Number = (_arg5.m_radius - b2Settings.b2_toiSlop);
var _local18:Number = (_local16 + _local17);
if (_local15 > (_local18 * _local18)){
_local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local19);
_local14 = (_local14 / _local19);
_local20 = (_local19 - _local18);
_arg1.x = (_local9 + (_local16 * _local13));
_arg1.y = (_local10 + (_local16 * _local14));
_arg2.x = (_local11 - (_local17 * _local13));
_arg2.y = (_local12 - (_local17 * _local14));
return (_local20);
};
if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){
_local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local19);
_local14 = (_local14 / _local19);
_arg1.x = (_local9 + (_local16 * _local13));
_arg1.y = (_local10 + (_local16 * _local14));
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
return (0);
};
_arg1.x = _local9;
_arg1.y = _local10;
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
return (0);
}
public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:b2Vec2;
var _local13:b2Vec2;
var _local35:Number;
_local6 = _arg5[0];
_local7 = _arg5[1];
_local8 = _arg5[2];
_local9 = _arg3[0];
_local10 = _arg3[1];
_local11 = _arg3[2];
_local12 = _arg4[0];
_local13 = _arg4[1];
var _local14:b2Vec2 = _arg4[2];
var _local15:Number = _local6.x;
var _local16:Number = _local6.y;
var _local17:Number = _local7.x;
var _local18:Number = _local7.y;
var _local19:Number = _local8.x;
var _local20:Number = _local8.y;
var _local21:Number = (_local17 - _local15);
var _local22:Number = (_local18 - _local16);
var _local23:Number = (_local19 - _local15);
var _local24:Number = (_local20 - _local16);
var _local25:Number = (_local19 - _local17);
var _local26:Number = (_local20 - _local18);
var _local27:Number = -(((_local15 * _local21) + (_local16 * _local22)));
var _local28:Number = ((_local17 * _local21) + (_local18 * _local22));
var _local29:Number = -(((_local15 * _local23) + (_local16 * _local24)));
var _local30:Number = ((_local19 * _local23) + (_local20 * _local24));
var _local31:Number = -(((_local17 * _local25) + (_local18 * _local26)));
var _local32:Number = ((_local19 * _local25) + (_local20 * _local26));
if ((((_local30 <= 0)) && ((_local32 <= 0)))){
_arg1.SetV(_local11);
_arg2.SetV(_local14);
_local9.SetV(_local11);
_local12.SetV(_local14);
_local6.SetV(_local8);
return (1);
};
var _local33:Number = ((_local21 * _local24) - (_local22 * _local23));
var _local34:Number = (_local33 * ((_local15 * _local18) - (_local16 * _local17)));
var _local36:Number = (_local33 * ((_local17 * _local20) - (_local18 * _local19)));
if ((((((((_local36 <= 0)) && ((_local31 >= 0)))) && ((_local32 >= 0)))) && (((_local31 + _local32) > 0)))){
_local35 = (_local31 / (_local31 + _local32));
_arg1.x = (_local10.x + (_local35 * (_local11.x - _local10.x)));
_arg1.y = (_local10.y + (_local35 * (_local11.y - _local10.y)));
_arg2.x = (_local13.x + (_local35 * (_local14.x - _local13.x)));
_arg2.y = (_local13.y + (_local35 * (_local14.y - _local13.y)));
_local9.SetV(_local11);
_local12.SetV(_local14);
_local6.SetV(_local8);
return (2);
};
var _local37:Number = (_local33 * ((_local19 * _local16) - (_local20 * _local15)));
if ((((((((_local37 <= 0)) && ((_local29 >= 0)))) && ((_local30 >= 0)))) && (((_local29 + _local30) > 0)))){
_local35 = (_local29 / (_local29 + _local30));
_arg1.x = (_local9.x + (_local35 * (_local11.x - _local9.x)));
_arg1.y = (_local9.y + (_local35 * (_local11.y - _local9.y)));
_arg2.x = (_local12.x + (_local35 * (_local14.x - _local12.x)));
_arg2.y = (_local12.y + (_local35 * (_local14.y - _local12.y)));
_local10.SetV(_local11);
_local13.SetV(_local14);
_local7.SetV(_local8);
return (2);
};
var _local38:Number = ((_local36 + _local37) + _local34);
_local38 = (1 / _local38);
var _local39:Number = (_local36 * _local38);
var _local40:Number = (_local37 * _local38);
var _local41:Number = ((1 - _local39) - _local40);
_arg1.x = (((_local39 * _local9.x) + (_local40 * _local10.x)) + (_local41 * _local11.x));
_arg1.y = (((_local39 * _local9.y) + (_local40 * _local10.y)) + (_local41 * _local11.y));
_arg2.x = (((_local39 * _local12.x) + (_local40 * _local13.x)) + (_local41 * _local14.x));
_arg2.y = (((_local39 * _local12.y) + (_local40 * _local13.y)) + (_local41 * _local14.y));
return (3);
}
public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{
var _local7:b2Mat22;
var _local8:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local9:b2Point = gPoint;
_local8 = _arg5.m_localPosition;
_local7 = _arg6.R;
_local9.p.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
_local9.p.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
var _local10:Number = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity);
var _local11:Number = (_arg5.m_radius - b2Settings.b2_toiSlop);
if (_local10 > _local11){
_local10 = (_local10 - _local11);
_local12 = (_arg2.x - _arg1.x);
_local13 = (_arg2.y - _arg1.y);
_local14 = Math.sqrt(((_local12 * _local12) + (_local13 * _local13)));
_local12 = (_local12 / _local14);
_local13 = (_local13 / _local14);
_arg2.x = (_arg2.x - (_local11 * _local12));
_arg2.y = (_arg2.y - (_local11 * _local13));
} else {
_local10 = 0;
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
};
return (_local10);
}
public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Shape, _arg4:b2XForm, _arg5:b2Shape, _arg6:b2XForm):Number{
var _local7:int = _arg3.m_type;
var _local8:int = _arg5.m_type;
if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){
return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6));
};
if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){
return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6));
};
if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){
return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4));
};
if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){
return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6));
};
return (0);
}
public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local17:Number;
var _local6:b2Vec2 = _arg5[0];
var _local7:b2Vec2 = _arg5[1];
var _local8:b2Vec2 = _arg3[0];
_local9 = _arg3[1];
_local10 = _arg4[0];
_local11 = _arg4[1];
var _local12:Number = -(_local7.x);
var _local13:Number = -(_local7.y);
var _local14:Number = (_local6.x - _local7.x);
var _local15:Number = (_local6.y - _local7.y);
var _local16:Number = Math.sqrt(((_local14 * _local14) + (_local15 * _local15)));
_local14 = (_local14 / _local16);
_local15 = (_local15 / _local16);
_local17 = ((_local12 * _local14) + (_local13 * _local15));
if ((((_local17 <= 0)) || ((_local16 < Number.MIN_VALUE)))){
_arg1.SetV(_local9);
_arg2.SetV(_local11);
_local8.SetV(_local9);
_local10.SetV(_local11);
_local6.SetV(_local7);
return (1);
};
_local17 = (_local17 / _local16);
_arg1.x = (_local9.x + (_local17 * (_local8.x - _local9.x)));
_arg1.y = (_local9.y + (_local17 * (_local8.y - _local9.y)));
_arg2.x = (_local11.x + (_local17 * (_local10.x - _local11.x)));
_arg2.y = (_local11.y + (_local17 * (_local10.y - _local11.y)));
return (2);
}
}
}//package Box2D.Collision
Section 27
//b2Manifold (Box2D.Collision.b2Manifold)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2Manifold {
public var pointCount:int;// = 0
public var normal:b2Vec2;
public var points:Array;
public function b2Manifold(){
points = new Array(b2Settings.b2_maxManifoldPoints);
var _local1:int;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ManifoldPoint();
_local1++;
};
normal = new b2Vec2();
}
public function Set(_arg1:b2Manifold):void{
pointCount = _arg1.pointCount;
var _local2:int;
while (_local2 < b2Settings.b2_maxManifoldPoints) {
(points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]);
_local2++;
};
normal.SetV(_arg1.normal);
}
public function Reset():void{
var _local1:int;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
(points[_local1] as b2ManifoldPoint).Reset();
_local1++;
};
normal.SetZero();
pointCount = 0;
}
}
}//package Box2D.Collision
Section 28
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2ManifoldPoint {
public var separation:Number;
public var localPoint2:b2Vec2;
public var normalImpulse:Number;
public var tangentImpulse:Number;
public var localPoint1:b2Vec2;
public var id:b2ContactID;
public function b2ManifoldPoint(){
localPoint1 = new b2Vec2();
localPoint2 = new b2Vec2();
id = new b2ContactID();
super();
}
public function Set(_arg1:b2ManifoldPoint):void{
localPoint1.SetV(_arg1.localPoint1);
localPoint2.SetV(_arg1.localPoint2);
separation = _arg1.separation;
normalImpulse = _arg1.normalImpulse;
tangentImpulse = _arg1.tangentImpulse;
id.key = _arg1.id.key;
}
public function Reset():void{
localPoint1.SetZero();
localPoint2.SetZero();
separation = 0;
normalImpulse = 0;
tangentImpulse = 0;
id.key = 0;
}
}
}//package Box2D.Collision
Section 29
//b2OBB (Box2D.Collision.b2OBB)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2OBB {
public var R:b2Mat22;
public var center:b2Vec2;
public var extents:b2Vec2;
public function b2OBB(){
R = new b2Mat22();
center = new b2Vec2();
extents = new b2Vec2();
super();
}
}
}//package Box2D.Collision
Section 30
//b2Pair (Box2D.Collision.b2Pair)
package Box2D.Collision {
public class b2Pair {
public var proxyId1:uint;
public var userData;// = null
public var proxyId2:uint;
public var status:uint;
public var next:uint;
public static var e_pairFinal:uint = 4;
public static var b2_tableMask:int = (b2_tableCapacity - 1);
public static var e_pairRemoved:uint = 2;
public static var b2_nullPair:uint = 0xFFFF;
public static var e_pairBuffered:uint = 1;
public static var b2_nullProxy:uint = 0xFFFF;
public static var b2_tableCapacity:int = 4096;
public function SetBuffered():void{
status = (status | e_pairBuffered);
}
public function IsBuffered():Boolean{
return (((status & e_pairBuffered) == e_pairBuffered));
}
public function IsFinal():Boolean{
return (((status & e_pairFinal) == e_pairFinal));
}
public function ClearRemoved():void{
status = (status & ~(e_pairRemoved));
}
public function SetFinal():void{
status = (status | e_pairFinal);
}
public function IsRemoved():Boolean{
return (((status & e_pairRemoved) == e_pairRemoved));
}
public function ClearBuffered():void{
status = (status & ~(e_pairBuffered));
}
public function SetRemoved():void{
status = (status | e_pairRemoved);
}
}
}//package Box2D.Collision
Section 31
//b2PairCallback (Box2D.Collision.b2PairCallback)
package Box2D.Collision {
public class b2PairCallback {
public function PairRemoved(_arg1, _arg2, _arg3):void{
}
public function PairAdded(_arg1, _arg2){
return (null);
}
}
}//package Box2D.Collision
Section 32
//b2PairManager (Box2D.Collision.b2PairManager)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PairManager {
public var m_pairCount:int;
public var m_pairBuffer:Array;
public var m_hashTable:Array;
public var m_callback:b2PairCallback;
public var m_pairs:Array;
public var m_pairBufferCount:int;
public var m_broadPhase:b2BroadPhase;
public var m_freePair:uint;
public function b2PairManager(){
var _local1:uint;
super();
m_hashTable = new Array(b2Pair.b2_tableCapacity);
_local1 = 0;
while (_local1 < b2Pair.b2_tableCapacity) {
m_hashTable[_local1] = b2Pair.b2_nullPair;
_local1++;
};
m_pairs = new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairs[_local1] = new b2Pair();
_local1++;
};
m_pairBuffer = new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairBuffer[_local1] = new b2BufferedPair();
_local1++;
};
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy;
m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy;
m_pairs[_local1].userData = null;
m_pairs[_local1].status = 0;
m_pairs[_local1].next = (_local1 + 1);
_local1++;
};
m_pairs[int((b2Settings.b2_maxPairs - 1))].next = b2Pair.b2_nullPair;
m_pairCount = 0;
m_pairBufferCount = 0;
}
private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{
var _local4:b2Pair;
var _local5:uint = m_hashTable[_arg3];
_local4 = m_pairs[_local5];
while (((!((_local5 == b2Pair.b2_nullPair))) && ((Equals(_local4, _arg1, _arg2) == false)))) {
_local5 = _local4.next;
_local4 = m_pairs[_local5];
};
if (_local5 == b2Pair.b2_nullPair){
return (null);
};
return (_local4);
}
private function Find(_arg1:uint, _arg2:uint):b2Pair{
var _local4:uint;
if (_arg1 > _arg2){
_local4 = _arg1;
_arg1 = _arg2;
_arg2 = _local4;
};
var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
return (FindHash(_arg1, _arg2, _local3));
}
private function ValidateBuffer():void{
}
public function Commit():void{
var _local1:b2BufferedPair;
var _local2:int;
var _local5:b2Pair;
var _local6:b2Proxy;
var _local7:b2Proxy;
var _local3:int;
var _local4:Array = m_broadPhase.m_proxyPool;
_local2 = 0;
while (_local2 < m_pairBufferCount) {
_local1 = m_pairBuffer[_local2];
_local5 = Find(_local1.proxyId1, _local1.proxyId2);
_local5.ClearBuffered();
_local6 = _local4[_local5.proxyId1];
_local7 = _local4[_local5.proxyId2];
if (_local5.IsRemoved()){
if (_local5.IsFinal() == true){
m_callback.PairRemoved(_local6.userData, _local7.userData, _local5.userData);
};
_local1 = m_pairBuffer[_local3];
_local1.proxyId1 = _local5.proxyId1;
_local1.proxyId2 = _local5.proxyId2;
_local3++;
} else {
if (_local5.IsFinal() == false){
_local5.userData = m_callback.PairAdded(_local6.userData, _local7.userData);
_local5.SetFinal();
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local3) {
_local1 = m_pairBuffer[_local2];
RemovePair(_local1.proxyId1, _local1.proxyId2);
_local2++;
};
m_pairBufferCount = 0;
if (b2BroadPhase.s_validate){
ValidateTable();
};
}
public function RemoveBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair = Find(_arg1, _arg2);
if (_local4 == null){
return;
};
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = m_pairBuffer[m_pairBufferCount];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
m_pairBufferCount++;
};
_local4.SetRemoved();
if (b2BroadPhase.s_validate){
ValidateBuffer();
};
}
private function RemovePair(_arg1:uint, _arg2:uint){
var _local3:b2Pair;
var _local7:uint;
var _local8:uint;
var _local9:*;
if (_arg1 > _arg2){
_local7 = _arg1;
_arg1 = _arg2;
_arg2 = _local7;
};
var _local4:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
var _local5:uint = m_hashTable[_local4];
var _local6:b2Pair;
while (_local5 != b2Pair.b2_nullPair) {
if (Equals(m_pairs[_local5], _arg1, _arg2)){
_local8 = _local5;
_local3 = m_pairs[_local5];
if (_local6){
_local6.next = _local3.next;
} else {
m_hashTable[_local4] = _local3.next;
};
_local3 = m_pairs[_local8];
_local9 = _local3.userData;
_local3.next = m_freePair;
_local3.proxyId1 = b2Pair.b2_nullProxy;
_local3.proxyId2 = b2Pair.b2_nullProxy;
_local3.userData = null;
_local3.status = 0;
m_freePair = _local8;
m_pairCount--;
return (_local9);
} else {
_local6 = m_pairs[_local5];
_local5 = _local6.next;
};
};
return (null);
}
public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{
m_broadPhase = _arg1;
m_callback = _arg2;
}
public function AddBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair = AddPair(_arg1, _arg2);
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = m_pairBuffer[m_pairBufferCount];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
m_pairBufferCount++;
};
_local4.ClearRemoved();
if (b2BroadPhase.s_validate){
ValidateBuffer();
};
}
private function AddPair(_arg1:uint, _arg2:uint):b2Pair{
var _local6:uint;
if (_arg1 > _arg2){
_local6 = _arg1;
_arg1 = _arg2;
_arg2 = _local6;
};
var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
var _local4 = FindHash(_arg1, _arg2, _local3);
if (_local4 != null){
return (_local4);
};
var _local5:uint = m_freePair;
_local4 = m_pairs[_local5];
m_freePair = _local4.next;
_local4.proxyId1 = _arg1;
_local4.proxyId2 = _arg2;
_local4.status = 0;
_local4.userData = null;
_local4.next = m_hashTable[_local3];
m_hashTable[_local3] = _local5;
m_pairCount++;
return (_local4);
}
private function ValidateTable():void{
}
public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{
return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2))));
}
public static function Hash(_arg1:uint, _arg2:uint):uint{
var _local3:uint = (((_arg2 << 16) & 4294901760) | _arg1);
_local3 = (~(_local3) + ((_local3 << 15) & 4294934528));
_local3 = (_local3 ^ ((_local3 >> 12) & 1048575));
_local3 = (_local3 + ((_local3 << 2) & 4294967292));
_local3 = (_local3 ^ ((_local3 >> 4) & 268435455));
_local3 = (_local3 * 2057);
_local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF));
return (_local3);
}
public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{
return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3))));
}
}
}//package Box2D.Collision
Section 33
//b2Point (Box2D.Collision.b2Point)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2Point {
public var p:b2Vec2;
public function b2Point(){
p = new b2Vec2();
super();
}
public function GetFirstVertex(_arg1:b2XForm):b2Vec2{
return (p);
}
public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{
return (p);
}
}
}//package Box2D.Collision
Section 34
//b2Proxy (Box2D.Collision.b2Proxy)
package Box2D.Collision {
public class b2Proxy {
public var overlapCount:uint;
public var userData;// = null
public var lowerBounds:Array;
public var upperBounds:Array;
public var timeStamp:uint;
public function b2Proxy(){
lowerBounds = [uint(0), uint(0)];
upperBounds = [uint(0), uint(0)];
super();
}
public function GetNext():uint{
return (lowerBounds[0]);
}
public function IsValid():Boolean{
return (!((overlapCount == b2BroadPhase.b2_invalid)));
}
public function SetNext(_arg1:uint):void{
lowerBounds[0] = (_arg1 & 0xFFFF);
}
}
}//package Box2D.Collision
Section 35
//b2Segment (Box2D.Collision.b2Segment)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2Segment {
public var p1:b2Vec2;
public var p2:b2Vec2;
public function b2Segment(){
p1 = new b2Vec2();
p2 = new b2Vec2();
super();
}
public function TestSegment(_arg1:Array, _arg2:b2Vec2, _arg3:b2Segment, _arg4:Number):Boolean{
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local5:b2Vec2 = _arg3.p1;
var _local6:Number = (_arg3.p2.x - _local5.x);
var _local7:Number = (_arg3.p2.y - _local5.y);
var _local8:Number = (p2.x - p1.x);
var _local9:Number = (p2.y - p1.y);
var _local10:Number = _local9;
var _local11:Number = -(_local8);
var _local12:Number = (100 * Number.MIN_VALUE);
var _local13:Number = -(((_local6 * _local10) + (_local7 * _local11)));
if (_local13 > _local12){
_local14 = (_local5.x - p1.x);
_local15 = (_local5.y - p1.y);
_local16 = ((_local14 * _local10) + (_local15 * _local11));
if ((((0 <= _local16)) && ((_local16 <= (_arg4 * _local13))))){
_local17 = ((-(_local7) * _local15) + (_local7 * _local14));
if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){
_local16 = (_local16 / _local13);
_local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
_local10 = (_local10 / _local18);
_local11 = (_local11 / _local18);
_arg1[0] = _local16;
_arg2.Set(_local10, _local11);
return (true);
};
};
};
return (false);
}
}
}//package Box2D.Collision
Section 36
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.*;
public class b2TimeOfImpact {
public static var s_xf1:b2XForm = new b2XForm();
public static var s_xf2:b2XForm = new b2XForm();
public static var s_p1:b2Vec2 = new b2Vec2();
public static var s_p2:b2Vec2 = new b2Vec2();
public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):Number{
var _local5:Number;
var _local6:Number;
var _local25:Number;
var _local26:b2XForm;
var _local27:b2XForm;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local7:Number = _arg1.m_sweepRadius;
var _local8:Number = _arg3.m_sweepRadius;
var _local9:Number = _arg2.t0;
var _local10:Number = (_arg2.c.x - _arg2.c0.x);
var _local11:Number = (_arg2.c.y - _arg2.c0.y);
var _local12:Number = (_arg4.c.x - _arg4.c0.x);
var _local13:Number = (_arg4.c.y - _arg4.c0.y);
var _local14:Number = (_arg2.a - _arg2.a0);
var _local15:Number = (_arg4.a - _arg4.a0);
var _local16:Number = 0;
var _local17:b2Vec2 = s_p1;
var _local18:b2Vec2 = s_p2;
var _local19 = 20;
var _local20:int;
var _local21:Number = 0;
var _local22:Number = 0;
var _local23:Number = 0;
var _local24:Number = 0;
while (true) {
_local25 = (((1 - _local16) * _local9) + _local16);
_local26 = s_xf1;
_local27 = s_xf2;
_arg2.GetXForm(_local26, _local25);
_arg4.GetXForm(_local27, _local25);
_local23 = b2Distance.Distance(_local17, _local18, _arg1, _local26, _arg3, _local27);
if (_local20 == 0){
if (_local23 > (2 * b2Settings.b2_toiSlop)){
_local24 = (1.5 * b2Settings.b2_toiSlop);
} else {
_local5 = (0.05 * b2Settings.b2_toiSlop);
_local6 = (_local23 - (0.5 * b2Settings.b2_toiSlop));
_local24 = ((_local5 > _local6)) ? _local5 : _local6;
};
};
if (((((_local23 - _local24) < (0.05 * b2Settings.b2_toiSlop))) || ((_local20 == _local19)))){
break;
};
_local21 = (_local18.x - _local17.x);
_local22 = (_local18.y - _local17.y);
_local28 = Math.sqrt(((_local21 * _local21) + (_local22 * _local22)));
_local21 = (_local21 / _local28);
_local22 = (_local22 / _local28);
_local29 = ((((_local21 * (_local10 - _local12)) + (_local22 * (_local11 - _local13))) + (((_local14 < 0)) ? -(_local14) : _local14 * _local7)) + (((_local15 < 0)) ? -(_local15) : _local15 * _local8));
if (_local29 == 0){
_local16 = 1;
break;
};
_local30 = ((_local23 - _local24) / _local29);
_local31 = (_local16 + _local30);
if ((((_local31 < 0)) || ((1 < _local31)))){
_local16 = 1;
break;
};
if (_local31 < ((1 + (100 * Number.MIN_VALUE)) * _local16)){
break;
};
_local16 = _local31;
_local20++;
};
return (_local16);
}
}
}//package Box2D.Collision
Section 37
//ClipVertex (Box2D.Collision.ClipVertex)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class ClipVertex {
public var id:b2ContactID;
public var v:b2Vec2;
public function ClipVertex(){
v = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Collision
Section 38
//Features (Box2D.Collision.Features)
package Box2D.Collision {
public class Features {
public var _referenceEdge:int;
public var _incidentEdge:int;
public var _flip:int;
public var _incidentVertex:int;
public var _m_id:b2ContactID;
public function get referenceEdge():int{
return (_referenceEdge);
}
public function set incidentVertex(_arg1:int):void{
_incidentVertex = _arg1;
_m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000));
}
public function get flip():int{
return (_flip);
}
public function get incidentEdge():int{
return (_incidentEdge);
}
public function set referenceEdge(_arg1:int):void{
_referenceEdge = _arg1;
_m_id._key = ((_m_id._key & 4294967040) | (_referenceEdge & 0xFF));
}
public function get incidentVertex():int{
return (_incidentVertex);
}
public function set flip(_arg1:int):void{
_flip = _arg1;
_m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080));
}
public function set incidentEdge(_arg1:int):void{
_incidentEdge = _arg1;
_m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00));
}
}
}//package Box2D.Collision
Section 39
//b2Mat22 (Box2D.Common.Math.b2Mat22)
package Box2D.Common.Math {
public class b2Mat22 {
public var col1:b2Vec2;
public var col2:b2Vec2;
public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){
var _local4:Number;
var _local5:Number;
col1 = new b2Vec2();
col2 = new b2Vec2();
super();
if (((!((_arg2 == null))) && (!((_arg3 == null))))){
col1.SetV(_arg2);
col2.SetV(_arg3);
} else {
_local4 = Math.cos(_arg1);
_local5 = Math.sin(_arg1);
col1.x = _local4;
col2.x = -(_local5);
col1.y = _local5;
col2.y = _local4;
};
}
public function SetIdentity():void{
col1.x = 1;
col2.x = 0;
col1.y = 0;
col2.y = 1;
}
public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{
col1.SetV(_arg1);
col2.SetV(_arg2);
}
public function Set(_arg1:Number):void{
var _local2:Number;
_local2 = Math.cos(_arg1);
var _local3:Number = Math.sin(_arg1);
col1.x = _local2;
col2.x = -(_local3);
col1.y = _local3;
col2.y = _local2;
}
public function SetZero():void{
col1.x = 0;
col2.x = 0;
col1.y = 0;
col2.y = 0;
}
public function SetM(_arg1:b2Mat22):void{
col1.SetV(_arg1.col1);
col2.SetV(_arg1.col2);
}
public function AddM(_arg1:b2Mat22):void{
col1.x = (col1.x + _arg1.col1.x);
col1.y = (col1.y + _arg1.col1.y);
col2.x = (col2.x + _arg1.col2.x);
col2.y = (col2.y + _arg1.col2.y);
}
public function Abs():void{
col1.Abs();
col2.Abs();
}
public function Copy():b2Mat22{
return (new b2Mat22(0, col1, col2));
}
public function Invert(_arg1:b2Mat22):b2Mat22{
var _local2:Number;
var _local4:Number;
var _local6:Number;
_local2 = col1.x;
var _local3:Number = col2.x;
_local4 = col1.y;
var _local5:Number = col2.y;
_local6 = ((_local2 * _local5) - (_local3 * _local4));
_local6 = (1 / _local6);
_arg1.col1.x = (_local6 * _local5);
_arg1.col2.x = (-(_local6) * _local3);
_arg1.col1.y = (-(_local6) * _local4);
_arg1.col2.y = (_local6 * _local2);
return (_arg1);
}
public function GetAngle():Number{
return (Math.atan2(col1.y, col1.x));
}
public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:Number = col1.x;
var _local5:Number = col2.x;
var _local6:Number = col1.y;
var _local7:Number = col2.y;
var _local8:Number = ((_local4 * _local7) - (_local5 * _local6));
_local8 = (1 / _local8);
_arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3)));
_arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2)));
return (_arg1);
}
}
}//package Box2D.Common.Math
Section 40
//b2Math (Box2D.Common.Math.b2Math)
package Box2D.Common.Math {
public class b2Math {
public static const b2Mat22_identity:b2Mat22 = new b2Mat22(0, new b2Vec2(1, 0), new b2Vec2(0, 1));
public static const b2XForm_identity:b2XForm = new b2XForm(b2Vec2_zero, b2Mat22_identity);
public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0);
public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x));
return (_local3);
}
public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y));
return (_local3);
}
public static function b2IsValid(_arg1:Number):Boolean{
return (isFinite(_arg1));
}
public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2MulX(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = b2MulMV(_arg1.R, _arg2);
_local3.x = (_local3.x + _arg1.position.x);
_local3.y = (_local3.y + _arg1.position.y);
return (_local3);
}
public static function b2DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{
var _local3:Number = (_arg1.x - _arg2.x);
var _local4:Number = (_arg1.y - _arg2.y);
return (((_local3 * _local3) + (_local4 * _local4)));
}
public static function b2Swap(_arg1:Array, _arg2:Array):void{
var _local3:* = _arg1[0];
_arg1[0] = _arg2[0];
_arg2[0] = _local3;
}
public static function b2AbsM(_arg1:b2Mat22):b2Mat22{
var _local2:b2Mat22 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2));
return (_local2);
}
public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y));
return (_local3);
}
public static function b2MulXT(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
var _local4:Number;
_local3 = SubtractVV(_arg2, _arg1.position);
_local4 = ((_local3.x * _arg1.R.col1.x) + (_local3.y * _arg1.R.col1.y));
_local3.y = ((_local3.x * _arg1.R.col2.x) + (_local3.y * _arg1.R.col2.y));
_local3.x = _local4;
return (_local3);
}
public static function b2Abs(_arg1:Number):Number{
return (((_arg1 > 0)) ? _arg1 : -(_arg1));
}
public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (b2Max(_arg2, b2Min(_arg1, _arg3)));
}
public static function b2AbsV(_arg1:b2Vec2):b2Vec2{
var _local2:b2Vec2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y));
return (_local2);
}
public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y));
return (_local3);
}
public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{
return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x)));
}
public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x));
return (_local3);
}
public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2));
return (_local3);
}
public static function b2Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{
var _local3:Number = (_arg1.x - _arg2.x);
var _local4:Number = (_arg1.y - _arg2.y);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1));
var _local4:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2));
var _local5:b2Mat22 = new b2Mat22(0, _local3, _local4);
return (_local5);
}
public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2IsPowerOfTwo(_arg1:uint):Boolean{
var _local2:Boolean = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0)));
return (_local2);
}
public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{
return (b2MaxV(_arg2, b2MinV(_arg1, _arg3)));
}
public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number = Math.random();
_local3 = (((_arg2 - _arg1) * _local3) + _arg1);
return (_local3);
}
public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2));
return (_local3);
}
public static function b2Min(_arg1:Number, _arg2:Number):Number{
return (((_arg1 < _arg2)) ? _arg1 : _arg2);
}
public static function b2Random():Number{
return (((Math.random() * 2) - 1));
}
public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2));
return (_local3);
}
public static function b2NextPowerOfTwo(_arg1:uint):uint{
_arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647));
_arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823));
_arg1 = (_arg1 | ((_arg1 >> 4) & 268435455));
_arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF));
_arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF));
return ((_arg1 + 1));
}
public static function b2Max(_arg1:Number, _arg2:Number):Number{
return (((_arg1 > _arg2)) ? _arg1 : _arg2);
}
public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y)));
return (_local3);
}
}
}//package Box2D.Common.Math
Section 41
//b2Sweep (Box2D.Common.Math.b2Sweep)
package Box2D.Common.Math {
public class b2Sweep {
public var localCenter:b2Vec2;
public var a:Number;
public var c:b2Vec2;
public var a0:Number;
public var c0:b2Vec2;
public var t0:Number;
public function b2Sweep(){
localCenter = new b2Vec2();
c0 = new b2Vec2();
c = new b2Vec2();
super();
}
public function Advance(_arg1:Number):void{
var _local2:Number;
if ((((t0 < _arg1)) && (((1 - t0) > Number.MIN_VALUE)))){
_local2 = ((_arg1 - t0) / (1 - t0));
c0.x = (((1 - _local2) * c0.x) + (_local2 * c.x));
c0.y = (((1 - _local2) * c0.y) + (_local2 * c.y));
a0 = (((1 - _local2) * a0) + (_local2 * a));
t0 = _arg1;
};
}
public function GetXForm(_arg1:b2XForm, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
if ((1 - t0) > Number.MIN_VALUE){
_local4 = ((_arg2 - t0) / (1 - t0));
_arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x));
_arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y));
_local5 = (((1 - _local4) * a0) + (_local4 * a));
_arg1.R.Set(_local5);
} else {
_arg1.position.SetV(c);
_arg1.R.Set(a);
};
var _local3:b2Mat22 = _arg1.R;
_arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y)));
_arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y)));
}
}
}//package Box2D.Common.Math
Section 42
//b2Vec2 (Box2D.Common.Math.b2Vec2)
package Box2D.Common.Math {
public class b2Vec2 {
public var y:Number;
public var x:Number;
public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{
x = _arg1;
y = _arg2;
}
public function Add(_arg1:b2Vec2):void{
x = (x + _arg1.x);
y = (y + _arg1.y);
}
public function Set(_arg1:Number=0, _arg2:Number=0):void{
x = _arg1;
y = _arg2;
}
public function Multiply(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
}
public function Length():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function LengthSquared():Number{
return (((x * x) + (y * y)));
}
public function MulM(_arg1:b2Mat22):void{
var _local2:Number = x;
x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y));
y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y));
}
public function SetZero():void{
x = 0;
y = 0;
}
public function MinV(_arg1:b2Vec2):void{
x = ((x < _arg1.x)) ? x : _arg1.x;
y = ((y < _arg1.y)) ? y : _arg1.y;
}
public function Normalize():Number{
var _local1:Number = Math.sqrt(((x * x) + (y * y)));
if (_local1 < Number.MIN_VALUE){
return (0);
};
var _local2:Number = (1 / _local1);
x = (x * _local2);
y = (y * _local2);
return (_local1);
}
public function CrossVF(_arg1:Number):void{
var _local2:Number = x;
x = (_arg1 * y);
y = (-(_arg1) * _local2);
}
public function MaxV(_arg1:b2Vec2):void{
x = ((x > _arg1.x)) ? x : _arg1.x;
y = ((y > _arg1.y)) ? y : _arg1.y;
}
public function SetV(_arg1:b2Vec2):void{
x = _arg1.x;
y = _arg1.y;
}
public function Negative():b2Vec2{
return (new b2Vec2(-(x), -(y)));
}
public function CrossFV(_arg1:Number):void{
var _local2:Number = x;
x = (-(_arg1) * y);
y = (_arg1 * _local2);
}
public function Abs():void{
if (x < 0){
x = -(x);
};
if (y < 0){
y = -(y);
};
}
public function Subtract(_arg1:b2Vec2):void{
x = (x - _arg1.x);
y = (y - _arg1.y);
}
public function Copy():b2Vec2{
return (new b2Vec2(x, y));
}
public function MulTM(_arg1:b2Mat22):void{
var _local2:Number = b2Math.b2Dot(this, _arg1.col1);
y = b2Math.b2Dot(this, _arg1.col2);
x = _local2;
}
public function IsValid():Boolean{
return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y))));
}
public static function Make(_arg1:Number, _arg2:Number):b2Vec2{
return (new b2Vec2(_arg1, _arg2));
}
}
}//package Box2D.Common.Math
Section 43
//b2XForm (Box2D.Common.Math.b2XForm)
package Box2D.Common.Math {
public class b2XForm {
public var position:b2Vec2;
public var R:b2Mat22;
public function b2XForm(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{
position = new b2Vec2();
R = new b2Mat22();
super();
if (_arg1){
position.SetV(_arg1);
R.SetM(_arg2);
};
}
public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{
position.SetV(_arg1);
R.SetM(_arg2);
}
public function Set(_arg1:b2XForm):void{
position.SetV(_arg1.position);
R.SetM(_arg1.R);
}
public function SetIdentity():void{
position.SetZero();
R.SetIdentity();
}
}
}//package Box2D.Common.Math
Section 44
//b2Color (Box2D.Common.b2Color)
package Box2D.Common {
import Box2D.Common.Math.*;
public class b2Color {
private var _r:uint;// = 0
private var _g:uint;// = 0
private var _b:uint;// = 0
public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){
_r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
_g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
_b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{
_r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
_g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
_b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function set b(_arg1:Number):void{
_b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function get color():uint{
return (((_r | (_g << 8)) | (_b << 16)));
}
public function set r(_arg1:Number):void{
_r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function set g(_arg1:Number):void{
_g = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
}
}//package Box2D.Common
Section 45
//b2Settings (Box2D.Common.b2Settings)
package Box2D.Common {
import Box2D.Common.Math.*;
public class b2Settings {
public static const b2_angularSleepTolerance:Number = 0.0111111111111111;
public static const b2_linearSleepTolerance:Number = 0.01;
public static const b2_angularSlop:Number = 0.0349065850398866;
public static const b2_linearSlop:Number = 0.005;
public static const b2_pi:Number = 3.14159265358979;
public static const b2_maxProxies:int = 0x0200;
public static const b2_maxAngularVelocitySquared:Number = 62500;
public static const b2_maxPolygonVertices:int = 8;
public static const b2_velocityThreshold:Number = 1;
public static const b2_contactBaumgarte:Number = 0.2;
public static const b2_maxPairs:int = 4096;
public static const b2_maxTOIContactsPerIsland:int = 32;
public static const b2_timeToSleep:Number = 0.5;
public static const b2_maxManifoldPoints:int = 2;
public static const b2_maxAngularVelocity:Number = 250;
public static const b2_maxAngularCorrection:Number = 0.139626340159546;
public static const USHRT_MAX:int = 0xFFFF;
public static const b2_maxLinearVelocity:Number = 200;
public static const b2_maxLinearCorrection:Number = 0.2;
public static const b2_toiSlop:Number = 0.04;
public static const b2_maxLinearVelocitySquared:Number = 40000;
public static function b2Assert(_arg1:Boolean):void{
var _local2:b2Vec2;
if (!_arg1){
_local2.x++;
};
}
}
}//package Box2D.Common
Section 46
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
public class b2CircleContact extends b2Contact {
private var m_manifolds:Array;
public var m_manifold:b2Manifold;
private var m0:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){
m_manifolds = [new b2Manifold()];
m0 = new b2Manifold();
super(_arg1, _arg2);
m_manifold = m_manifolds[0];
m_manifold.pointCount = 0;
var _local3:b2ManifoldPoint = m_manifold.points[0];
_local3.normalImpulse = 0;
_local3.tangentImpulse = 0;
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2ManifoldPoint;
var _local8:b2ManifoldPoint;
var _local5:b2Body = m_shape1.m_body;
var _local6:b2Body = m_shape2.m_body;
m0.Set(m_manifold);
b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf);
var _local7:b2ContactPoint = s_evalCP;
_local7.shape1 = m_shape1;
_local7.shape2 = m_shape2;
_local7.friction = m_friction;
_local7.restitution = m_restitution;
if (m_manifold.pointCount > 0){
m_manifoldCount = 1;
_local8 = m_manifold.points[0];
if (m0.pointCount == 0){
_local8.normalImpulse = 0;
_local8.tangentImpulse = 0;
if (_arg1){
_local7.position = _local5.GetWorldPoint(_local8.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local8.separation;
_local7.id.key = _local8.id._key;
_arg1.Add(_local7);
};
} else {
_local4 = m0.points[0];
_local8.normalImpulse = _local4.normalImpulse;
_local8.tangentImpulse = _local4.tangentImpulse;
if (_arg1){
_local7.position = _local5.GetWorldPoint(_local8.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local8.separation;
_local7.id.key = _local8.id._key;
_arg1.Persist(_local7);
};
};
} else {
m_manifoldCount = 0;
if ((((m0.pointCount > 0)) && (_arg1))){
_local4 = m0.points[0];
_local7.position = _local5.GetWorldPoint(_local4.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m0.normal);
_local7.separation = _local4.separation;
_local7.id.key = _local4.id._key;
_arg1.Remove(_local7);
};
};
}
override public function GetManifolds():Array{
return (m_manifolds);
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2CircleContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 47
//b2Contact (Box2D.Dynamics.Contacts.b2Contact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2Contact {
public var m_shape1:b2Shape;
public var m_shape2:b2Shape;
public var m_prev:b2Contact;
public var m_toi:Number;
public var m_next:b2Contact;
public var m_friction:Number;
public var m_manifoldCount:int;
public var m_node1:b2ContactEdge;
public var m_node2:b2ContactEdge;
public var m_restitution:Number;
public var m_flags:uint;
public static var e_toiFlag:uint = 8;
public static var e_nonSolidFlag:uint = 1;
public static var e_slowFlag:uint = 2;
public static var e_islandFlag:uint = 4;
public static var s_registers:Array;
public static var s_initialized:Boolean = false;
public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){
m_node1 = new b2ContactEdge();
m_node2 = new b2ContactEdge();
super();
m_flags = 0;
if (((!(_arg1)) || (!(_arg2)))){
m_shape1 = null;
m_shape2 = null;
return;
};
if (((_arg1.IsSensor()) || (_arg2.IsSensor()))){
m_flags = (m_flags | e_nonSolidFlag);
};
m_shape1 = _arg1;
m_shape2 = _arg2;
m_manifoldCount = 0;
m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction));
m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution);
m_prev = null;
m_next = null;
m_node1.contact = null;
m_node1.prev = null;
m_node1.next = null;
m_node1.other = null;
m_node2.contact = null;
m_node2.prev = null;
m_node2.next = null;
m_node2.other = null;
}
public function IsSolid():Boolean{
return (((m_flags & e_nonSolidFlag) == 0));
}
public function GetShape1():b2Shape{
return (m_shape1);
}
public function GetShape2():b2Shape{
return (m_shape2);
}
public function GetNext():b2Contact{
return (m_next);
}
public function GetManifoldCount():int{
return (m_manifoldCount);
}
public function GetManifolds():Array{
return (null);
}
public function Update(_arg1:b2ContactListener):void{
var _local2:int = m_manifoldCount;
Evaluate(_arg1);
var _local3:int = m_manifoldCount;
var _local4:b2Body = m_shape1.m_body;
var _local5:b2Body = m_shape2.m_body;
if ((((_local3 == 0)) && ((_local2 > 0)))){
_local4.WakeUp();
_local5.WakeUp();
};
if (((((((_local4.IsStatic()) || (_local4.IsBullet()))) || (_local5.IsStatic()))) || (_local5.IsBullet()))){
m_flags = (m_flags & ~(e_slowFlag));
} else {
m_flags = (m_flags | e_slowFlag);
};
}
public function Evaluate(_arg1:b2ContactListener):void{
}
public static function InitializeRegisters():void{
var _local2:int;
s_registers = new Array(b2Shape.e_shapeTypeCount);
var _local1:int;
while (_local1 < b2Shape.e_shapeTypeCount) {
s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount);
_local2 = 0;
while (_local2 < b2Shape.e_shapeTypeCount) {
s_registers[_local1][_local2] = new b2ContactRegister();
_local2++;
};
_local1++;
};
AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape);
AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_circleShape);
AddType(b2PolygonContact.Create, b2PolygonContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_polygonShape);
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
if (_arg1.m_manifoldCount > 0){
_arg1.m_shape1.m_body.WakeUp();
_arg1.m_shape2.m_body.WakeUp();
};
var _local3:int = _arg1.m_shape1.m_type;
var _local4:int = _arg1.m_shape2.m_type;
var _local5:b2ContactRegister = s_registers[_local3][_local4];
var _local6:Function = _local5.destroyFcn;
_local6(_arg1, _arg2);
}
public static function AddType(_arg1:Function, _arg2:Function, _arg3:int, _arg4:int):void{
s_registers[_arg3][_arg4].createFcn = _arg1;
s_registers[_arg3][_arg4].destroyFcn = _arg2;
s_registers[_arg3][_arg4].primary = true;
if (_arg3 != _arg4){
s_registers[_arg4][_arg3].createFcn = _arg1;
s_registers[_arg4][_arg3].destroyFcn = _arg2;
s_registers[_arg4][_arg3].primary = false;
};
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
var _local8:b2Contact;
var _local9:int;
var _local10:b2Manifold;
if (s_initialized == false){
InitializeRegisters();
s_initialized = true;
};
var _local4:int = _arg1.m_type;
var _local5:int = _arg2.m_type;
var _local6:b2ContactRegister = s_registers[_local4][_local5];
var _local7:Function = _local6.createFcn;
if (_local7 != null){
if (_local6.primary){
return (_local7(_arg1, _arg2, _arg3));
};
_local8 = _local7(_arg2, _arg1, _arg3);
_local9 = 0;
while (_local9 < _local8.m_manifoldCount) {
_local10 = _local8.GetManifolds()[_local9];
_local8.GetManifolds()[_local9].normal = _local10.normal.Negative();
_local9++;
};
return (_local8);
//unresolved jump
};
return (null);
}
}
}//package Box2D.Dynamics.Contacts
Section 48
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2ContactConstraint {
public var points:Array;
public var normal:b2Vec2;
public var restitution:Number;
public var body1:b2Body;
public var manifold:b2Manifold;
public var body2:b2Body;
public var friction:Number;
public var pointCount:int;
public function b2ContactConstraint(){
normal = new b2Vec2();
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
var _local1:int;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ContactConstraintPoint();
_local1++;
};
}
}
}//package Box2D.Dynamics.Contacts
Section 49
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
public class b2ContactConstraintPoint {
public var r2:b2Vec2;
public var separation:Number;
public var positionImpulse:Number;
public var normalImpulse:Number;
public var tangentMass:Number;
public var equalizedMass:Number;
public var tangentImpulse:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var normalMass:Number;
public var velocityBias:Number;
public var r1:b2Vec2;
public function b2ContactConstraintPoint(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
r1 = new b2Vec2();
r2 = new b2Vec2();
super();
}
}
}//package Box2D.Dynamics.Contacts
Section 50
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
public class b2ContactEdge {
public var other:b2Body;
public var prev:b2ContactEdge;
public var contact:b2Contact;
public var next:b2ContactEdge;
}
}//package Box2D.Dynamics.Contacts
Section 51
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister)
package Box2D.Dynamics.Contacts {
public class b2ContactRegister {
public var primary:Boolean;
public var createFcn:Function;
public var destroyFcn:Function;
}
}//package Box2D.Dynamics.Contacts
Section 52
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
public class b2ContactResult {
public var position:b2Vec2;
public var shape1:b2Shape;
public var shape2:b2Shape;
public var normalImpulse:Number;
public var normal:b2Vec2;
public var tangentImpulse:Number;
public var id:b2ContactID;
public function b2ContactResult(){
position = new b2Vec2();
normal = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Dynamics.Contacts
Section 53
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2ContactSolver {
public var m_constraintCount:int;
public var m_constraints:Array;
public var m_allocator;
public var m_step:b2TimeStep;
public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){
var _local5:b2Contact;
var _local6:int;
var _local7:b2Vec2;
var _local8:b2Mat22;
var _local10:b2Body;
var _local11:b2Body;
var _local12:int;
var _local13:Array;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:int;
var _local23:b2Manifold;
var _local24:Number;
var _local25:Number;
var _local26:b2ContactConstraint;
var _local27:uint;
var _local28:b2ManifoldPoint;
var _local29:b2ContactConstraintPoint;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
var _local39:Number;
var _local40:Number;
var _local41:Number;
var _local42:Number;
var _local43:Number;
var _local44:Number;
var _local45:Number;
var _local46:Number;
var _local47:Number;
m_step = new b2TimeStep();
m_constraints = new Array();
super();
m_step.dt = _arg1.dt;
m_step.inv_dt = _arg1.inv_dt;
m_step.maxIterations = _arg1.maxIterations;
m_allocator = _arg4;
m_constraintCount = 0;
_local6 = 0;
while (_local6 < _arg3) {
_local5 = _arg2[_local6];
m_constraintCount = (m_constraintCount + _local5.m_manifoldCount);
_local6++;
};
_local6 = 0;
while (_local6 < m_constraintCount) {
m_constraints[_local6] = new b2ContactConstraint();
_local6++;
};
var _local9:int;
_local6 = 0;
while (_local6 < _arg3) {
_local5 = _arg2[_local6];
_local10 = _local5.m_shape1.m_body;
_local11 = _local5.m_shape2.m_body;
_local12 = _local5.m_manifoldCount;
_local13 = _local5.GetManifolds();
_local14 = _local5.m_friction;
_local15 = _local5.m_restitution;
_local16 = _local10.m_linearVelocity.x;
_local17 = _local10.m_linearVelocity.y;
_local18 = _local11.m_linearVelocity.x;
_local19 = _local11.m_linearVelocity.y;
_local20 = _local10.m_angularVelocity;
_local21 = _local11.m_angularVelocity;
_local22 = 0;
while (_local22 < _local12) {
_local23 = _local13[_local22];
_local24 = _local23.normal.x;
_local25 = _local23.normal.y;
_local26 = m_constraints[_local9];
_local26.body1 = _local10;
_local26.body2 = _local11;
_local26.manifold = _local23;
_local26.normal.x = _local24;
_local26.normal.y = _local25;
_local26.pointCount = _local23.pointCount;
_local26.friction = _local14;
_local26.restitution = _local15;
_local27 = 0;
while (_local27 < _local26.pointCount) {
_local28 = _local23.points[_local27];
_local29 = _local26.points[_local27];
_local29.normalImpulse = _local28.normalImpulse;
_local29.tangentImpulse = _local28.tangentImpulse;
_local29.separation = _local28.separation;
_local29.positionImpulse = 0;
_local29.localAnchor1.SetV(_local28.localPoint1);
_local29.localAnchor2.SetV(_local28.localPoint2);
_local8 = _local10.m_xf.R;
_local32 = (_local28.localPoint1.x - _local10.m_sweep.localCenter.x);
_local33 = (_local28.localPoint1.y - _local10.m_sweep.localCenter.y);
_local30 = ((_local8.col1.x * _local32) + (_local8.col2.x * _local33));
_local33 = ((_local8.col1.y * _local32) + (_local8.col2.y * _local33));
_local32 = _local30;
_local29.r1.Set(_local32, _local33);
_local8 = _local11.m_xf.R;
_local34 = (_local28.localPoint2.x - _local11.m_sweep.localCenter.x);
_local35 = (_local28.localPoint2.y - _local11.m_sweep.localCenter.y);
_local30 = ((_local8.col1.x * _local34) + (_local8.col2.x * _local35));
_local35 = ((_local8.col1.y * _local34) + (_local8.col2.y * _local35));
_local34 = _local30;
_local29.r2.Set(_local34, _local35);
_local36 = ((_local32 * _local32) + (_local33 * _local33));
_local37 = ((_local34 * _local34) + (_local35 * _local35));
_local38 = ((_local32 * _local24) + (_local33 * _local25));
_local39 = ((_local34 * _local24) + (_local35 * _local25));
_local40 = (_local10.m_invMass + _local11.m_invMass);
_local40 = (_local40 + ((_local10.m_invI * (_local36 - (_local38 * _local38))) + (_local11.m_invI * (_local37 - (_local39 * _local39)))));
_local29.normalMass = (1 / _local40);
_local41 = ((_local10.m_mass * _local10.m_invMass) + (_local11.m_mass * _local11.m_invMass));
_local41 = (_local41 + (((_local10.m_mass * _local10.m_invI) * (_local36 - (_local38 * _local38))) + ((_local11.m_mass * _local11.m_invI) * (_local37 - (_local39 * _local39)))));
_local29.equalizedMass = (1 / _local41);
_local42 = _local25;
_local43 = -(_local24);
_local44 = ((_local32 * _local42) + (_local33 * _local43));
_local45 = ((_local34 * _local42) + (_local35 * _local43));
_local46 = (_local10.m_invMass + _local11.m_invMass);
_local46 = (_local46 + ((_local10.m_invI * (_local36 - (_local44 * _local44))) + (_local11.m_invI * (_local37 - (_local45 * _local45)))));
_local29.tangentMass = (1 / _local46);
_local29.velocityBias = 0;
if (_local29.separation > 0){
_local29.velocityBias = (-60 * _local29.separation);
};
_local30 = (((_local18 + (-(_local21) * _local35)) - _local16) - (-(_local20) * _local33));
_local31 = (((_local19 + (_local21 * _local34)) - _local17) - (_local20 * _local32));
_local47 = ((_local26.normal.x * _local30) + (_local26.normal.y * _local31));
if (_local47 < -(b2Settings.b2_velocityThreshold)){
_local29.velocityBias = (_local29.velocityBias + (-(_local26.restitution) * _local47));
};
_local27++;
};
_local9++;
_local22++;
};
_local6++;
};
}
public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2Mat22;
var _local6:b2ContactConstraint;
var _local7:b2Body;
var _local8:b2Body;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:int;
var _local19:int;
var _local20:b2ContactConstraintPoint;
var _local21:Number;
var _local22:Number;
var _local23:b2ContactConstraintPoint;
var _local5:int;
while (_local5 < m_constraintCount) {
_local6 = m_constraints[_local5];
_local7 = _local6.body1;
_local8 = _local6.body2;
_local9 = _local7.m_invMass;
_local10 = _local7.m_invI;
_local11 = _local8.m_invMass;
_local12 = _local8.m_invI;
_local13 = _local6.normal.x;
_local14 = _local6.normal.y;
_local15 = _local14;
_local16 = -(_local13);
if (_arg1.warmStarting){
_local19 = _local6.pointCount;
_local18 = 0;
while (_local18 < _local19) {
_local20 = _local6.points[_local18];
_local6.points[_local18].normalImpulse = (_local20.normalImpulse * _arg1.dtRatio);
_local20.tangentImpulse = (_local20.tangentImpulse * _arg1.dtRatio);
_local21 = ((_local20.normalImpulse * _local13) + (_local20.tangentImpulse * _local15));
_local22 = ((_local20.normalImpulse * _local14) + (_local20.tangentImpulse * _local16));
_local7.m_angularVelocity = (_local7.m_angularVelocity - (_local10 * ((_local20.r1.x * _local22) - (_local20.r1.y * _local21))));
_local7.m_linearVelocity.x = (_local7.m_linearVelocity.x - (_local9 * _local21));
_local7.m_linearVelocity.y = (_local7.m_linearVelocity.y - (_local9 * _local22));
_local8.m_angularVelocity = (_local8.m_angularVelocity + (_local12 * ((_local20.r2.x * _local22) - (_local20.r2.y * _local21))));
_local8.m_linearVelocity.x = (_local8.m_linearVelocity.x + (_local11 * _local21));
_local8.m_linearVelocity.y = (_local8.m_linearVelocity.y + (_local11 * _local22));
_local18++;
};
} else {
_local19 = _local6.pointCount;
_local18 = 0;
while (_local18 < _local19) {
_local23 = _local6.points[_local18];
_local23.normalImpulse = 0;
_local23.tangentImpulse = 0;
_local18++;
};
};
_local5++;
};
}
public function SolvePositionConstraints(_arg1:Number):Boolean{
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local6:b2ContactConstraint;
var _local7:b2Body;
var _local8:b2Body;
var _local9:b2Vec2;
var _local10:Number;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:int;
var _local20:int;
var _local21:b2ContactConstraintPoint;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
var _local2:Number = 0;
var _local5:int;
while (_local5 < m_constraintCount) {
_local6 = m_constraints[_local5];
_local7 = _local6.body1;
_local8 = _local6.body2;
_local9 = _local7.m_sweep.c;
_local10 = _local7.m_sweep.a;
_local11 = _local8.m_sweep.c;
_local12 = _local8.m_sweep.a;
_local13 = (_local7.m_mass * _local7.m_invMass);
_local14 = (_local7.m_mass * _local7.m_invI);
_local15 = (_local8.m_mass * _local8.m_invMass);
_local16 = (_local8.m_mass * _local8.m_invI);
_local17 = _local6.normal.x;
_local18 = _local6.normal.y;
_local19 = _local6.pointCount;
_local20 = 0;
while (_local20 < _local19) {
_local21 = _local6.points[_local20];
_local3 = _local7.m_xf.R;
_local4 = _local7.m_sweep.localCenter;
_local22 = (_local21.localAnchor1.x - _local4.x);
_local23 = (_local21.localAnchor1.y - _local4.y);
_local26 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23));
_local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23));
_local22 = _local26;
_local3 = _local8.m_xf.R;
_local4 = _local8.m_sweep.localCenter;
_local24 = (_local21.localAnchor2.x - _local4.x);
_local25 = (_local21.localAnchor2.y - _local4.y);
_local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25));
_local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25));
_local24 = _local26;
_local27 = (_local9.x + _local22);
_local28 = (_local9.y + _local23);
_local29 = (_local11.x + _local24);
_local30 = (_local11.y + _local25);
_local31 = (_local29 - _local27);
_local32 = (_local30 - _local28);
_local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation);
_local2 = b2Math.b2Min(_local2, _local33);
_local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0));
_local35 = (-(_local21.equalizedMass) * _local34);
_local36 = _local21.positionImpulse;
_local21.positionImpulse = b2Math.b2Max((_local36 + _local35), 0);
_local35 = (_local21.positionImpulse - _local36);
_local37 = (_local35 * _local17);
_local38 = (_local35 * _local18);
_local9.x = (_local9.x - (_local13 * _local37));
_local9.y = (_local9.y - (_local13 * _local38));
_local10 = (_local10 - (_local14 * ((_local22 * _local38) - (_local23 * _local37))));
_local7.m_sweep.a = _local10;
_local7.SynchronizeTransform();
_local11.x = (_local11.x + (_local15 * _local37));
_local11.y = (_local11.y + (_local15 * _local38));
_local12 = (_local12 + (_local16 * ((_local24 * _local38) - (_local25 * _local37))));
_local8.m_sweep.a = _local12;
_local8.SynchronizeTransform();
_local20++;
};
_local5++;
};
return ((_local2 >= (-1.5 * b2Settings.b2_linearSlop)));
}
public function SolveVelocityConstraints():void{
var _local1:int;
var _local2:b2ContactConstraintPoint;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:b2Mat22;
var _local18:b2Vec2;
var _local20:b2ContactConstraint;
var _local21:b2Body;
var _local22:b2Body;
var _local23:Number;
var _local24:Number;
var _local25:b2Vec2;
var _local26:b2Vec2;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:int;
var _local38:Number;
var _local19:int;
while (_local19 < m_constraintCount) {
_local20 = m_constraints[_local19];
_local21 = _local20.body1;
_local22 = _local20.body2;
_local23 = _local21.m_angularVelocity;
_local24 = _local22.m_angularVelocity;
_local25 = _local21.m_linearVelocity;
_local26 = _local22.m_linearVelocity;
_local27 = _local21.m_invMass;
_local28 = _local21.m_invI;
_local29 = _local22.m_invMass;
_local30 = _local22.m_invI;
_local31 = _local20.normal.x;
_local32 = _local20.normal.y;
_local33 = _local32;
_local34 = -(_local31);
_local35 = _local20.friction;
_local37 = _local20.pointCount;
_local1 = 0;
while (_local1 < _local37) {
_local2 = _local20.points[_local1];
_local7 = (((_local26.x + (-(_local24) * _local2.r2.y)) - _local25.x) - (-(_local23) * _local2.r1.y));
_local8 = (((_local26.y + (_local24 * _local2.r2.x)) - _local25.y) - (_local23 * _local2.r1.x));
_local9 = ((_local7 * _local31) + (_local8 * _local32));
_local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias));
_local10 = ((_local7 * _local33) + (_local8 * _local34));
_local12 = (_local2.tangentMass * -(_local10));
_local13 = b2Math.b2Max((_local2.normalImpulse + _local11), 0);
_local11 = (_local13 - _local2.normalImpulse);
_local38 = (_local35 * _local2.normalImpulse);
_local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local38), _local38);
_local12 = (_local14 - _local2.tangentImpulse);
_local15 = ((_local11 * _local31) + (_local12 * _local33));
_local16 = ((_local11 * _local32) + (_local12 * _local34));
_local25.x = (_local25.x - (_local27 * _local15));
_local25.y = (_local25.y - (_local27 * _local16));
_local23 = (_local23 - (_local28 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15))));
_local26.x = (_local26.x + (_local29 * _local15));
_local26.y = (_local26.y + (_local29 * _local16));
_local24 = (_local24 + (_local30 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15))));
_local2.normalImpulse = _local13;
_local2.tangentImpulse = _local14;
_local1++;
};
_local21.m_angularVelocity = _local23;
_local22.m_angularVelocity = _local24;
_local19++;
};
}
public function FinalizeVelocityConstraints():void{
var _local2:b2ContactConstraint;
var _local3:b2Manifold;
var _local4:int;
var _local5:b2ManifoldPoint;
var _local6:b2ContactConstraintPoint;
var _local1:int;
while (_local1 < m_constraintCount) {
_local2 = m_constraints[_local1];
_local3 = _local2.manifold;
_local4 = 0;
while (_local4 < _local2.pointCount) {
_local5 = _local3.points[_local4];
_local6 = _local2.points[_local4];
_local5.normalImpulse = _local6.normalImpulse;
_local5.tangentImpulse = _local6.tangentImpulse;
_local4++;
};
_local1++;
};
}
}
}//package Box2D.Dynamics.Contacts
Section 54
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
public class b2NullContact extends b2Contact {
override public function Evaluate(_arg1:b2ContactListener):void{
}
override public function GetManifolds():Array{
return (null);
}
}
}//package Box2D.Dynamics.Contacts
Section 55
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2PolyAndCircleContact extends b2Contact {
private var m_manifolds:Array;
public var m_manifold:b2Manifold;
private var m0:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){
m_manifolds = [new b2Manifold()];
m0 = new b2Manifold();
super(_arg1, _arg2);
m_manifold = m_manifolds[0];
b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polygonShape));
b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape));
m_manifold.pointCount = 0;
var _local3:b2ManifoldPoint = m_manifold.points[0];
_local3.normalImpulse = 0;
_local3.tangentImpulse = 0;
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:int;
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2ManifoldPoint;
var _local10:b2ManifoldPoint;
var _local11:Boolean;
var _local12:uint;
var _local13:int;
var _local6:b2Body = m_shape1.m_body;
var _local7:b2Body = m_shape2.m_body;
m0.Set(m_manifold);
b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2CircleShape), _local7.m_xf);
var _local8:Array = [false, false];
var _local9:b2ContactPoint = s_evalCP;
_local9.shape1 = m_shape1;
_local9.shape2 = m_shape2;
_local9.friction = m_friction;
_local9.restitution = m_restitution;
if (m_manifold.pointCount > 0){
_local2 = 0;
while (_local2 < m_manifold.pointCount) {
_local10 = m_manifold.points[_local2];
_local10.normalImpulse = 0;
_local10.tangentImpulse = 0;
_local11 = false;
_local12 = _local10.id._key;
_local13 = 0;
while (_local13 < m0.pointCount) {
if (_local8[_local13] == true){
} else {
_local5 = m0.points[_local13];
if (_local5.id._key == _local12){
_local8[_local13] = true;
_local10.normalImpulse = _local5.normalImpulse;
_local10.tangentImpulse = _local5.tangentImpulse;
_local11 = true;
if (_arg1 != null){
_local9.position = _local6.GetWorldPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV(m_manifold.normal);
_local9.separation = _local10.separation;
_local9.id.key = _local12;
_arg1.Persist(_local9);
};
break;
};
};
_local13++;
};
if ((((_local11 == false)) && (!((_arg1 == null))))){
_local9.position = _local6.GetWorldPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV(m_manifold.normal);
_local9.separation = _local10.separation;
_local9.id.key = _local12;
_arg1.Add(_local9);
};
_local2++;
};
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
if (_arg1 == null){
return;
};
_local2 = 0;
while (_local2 < m0.pointCount) {
if (_local8[_local2]){
} else {
_local5 = m0.points[_local2];
_local9.position = _local6.GetWorldPoint(_local5.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local5.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local5.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV(m0.normal);
_local9.separation = _local5.separation;
_local9.id.key = _local5.id._key;
_arg1.Remove(_local9);
};
_local2++;
};
}
override public function GetManifolds():Array{
return (m_manifolds);
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolyAndCircleContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 56
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
public class b2PolygonContact extends b2Contact {
private var m_manifolds:Array;
private var m0:b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolygonContact(_arg1:b2Shape, _arg2:b2Shape):void{
m0 = new b2Manifold();
m_manifolds = [new b2Manifold()];
super(_arg1, _arg2);
m_manifold = m_manifolds[0];
m_manifold.pointCount = 0;
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2ManifoldPoint;
var _local7:b2ContactPoint;
var _local8:int;
var _local10:b2ManifoldPoint;
var _local11:Boolean;
var _local12:uint;
var _local13:int;
var _local5:b2Body = m_shape1.m_body;
var _local6:b2Body = m_shape2.m_body;
m0.Set(m_manifold);
b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local5.m_xf, (m_shape2 as b2PolygonShape), _local6.m_xf);
var _local9:Array = [false, false];
_local7 = s_evalCP;
_local7.shape1 = m_shape1;
_local7.shape2 = m_shape2;
_local7.friction = m_friction;
_local7.restitution = m_restitution;
if (m_manifold.pointCount > 0){
_local8 = 0;
while (_local8 < m_manifold.pointCount) {
_local10 = m_manifold.points[_local8];
_local10.normalImpulse = 0;
_local10.tangentImpulse = 0;
_local11 = false;
_local12 = _local10.id._key;
_local13 = 0;
while (_local13 < m0.pointCount) {
if (_local9[_local13] == true){
} else {
_local4 = m0.points[_local13];
if (_local4.id._key == _local12){
_local9[_local13] = true;
_local10.normalImpulse = _local4.normalImpulse;
_local10.tangentImpulse = _local4.tangentImpulse;
_local11 = true;
if (_arg1 != null){
_local7.position = _local5.GetWorldPoint(_local10.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local10.separation;
_local7.id.key = _local12;
_arg1.Persist(_local7);
};
break;
};
};
_local13++;
};
if ((((_local11 == false)) && (!((_arg1 == null))))){
_local7.position = _local5.GetWorldPoint(_local10.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local10.separation;
_local7.id.key = _local12;
_arg1.Add(_local7);
};
_local8++;
};
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
if (_arg1 == null){
return;
};
_local8 = 0;
while (_local8 < m0.pointCount) {
if (_local9[_local8]){
} else {
_local4 = m0.points[_local8];
_local7.position = _local5.GetWorldPoint(_local4.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m0.normal);
_local7.separation = _local4.separation;
_local7.id.key = _local4.id._key;
_arg1.Remove(_local7);
};
_local8++;
};
}
override public function GetManifolds():Array{
return (m_manifolds);
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolygonContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 57
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2DistanceJoint extends b2Joint {
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_bias:Number;
public var m_gamma:Number;
public var m_u:b2Vec2;
public var m_mass:Number;
public var m_impulse:Number;
public var m_dampingRatio:Number;
public var m_frequencyHz:Number;
public var m_length:Number;
public function b2DistanceJoint(_arg1:b2DistanceJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_u = new b2Vec2();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_length = _arg1.length;
m_frequencyHz = _arg1.frequencyHz;
m_dampingRatio = _arg1.dampingRatio;
m_impulse = 0;
m_gamma = 0;
m_bias = 0;
m_inv_dt = 0;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Mat22;
var _local3:Number;
var _local4:b2Body;
var _local5:b2Body;
var _local6:Number;
var _local8:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
m_inv_dt = _arg1.inv_dt;
_local4 = m_body1;
_local5 = m_body2;
_local2 = _local4.m_xf.R;
_local6 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x);
var _local7:Number = (m_localAnchor1.y - _local4.m_sweep.localCenter.y);
_local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7));
_local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7));
_local6 = _local3;
_local2 = _local5.m_xf.R;
_local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x);
var _local9:Number = (m_localAnchor2.y - _local5.m_sweep.localCenter.y);
_local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9));
_local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9));
_local8 = _local3;
m_u.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6);
m_u.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7);
var _local10:Number = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y)));
if (_local10 > b2Settings.b2_linearSlop){
m_u.Multiply((1 / _local10));
} else {
m_u.SetZero();
};
var _local11:Number = ((_local6 * m_u.y) - (_local7 * m_u.x));
var _local12:Number = ((_local8 * m_u.y) - (_local9 * m_u.x));
var _local13:Number = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12));
m_mass = (1 / _local13);
if (m_frequencyHz > 0){
_local14 = (_local10 - m_length);
_local15 = ((2 * Math.PI) * m_frequencyHz);
_local16 = (((2 * m_mass) * m_dampingRatio) * _local15);
_local17 = ((m_mass * _local15) * _local15);
m_gamma = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17))));
m_bias = (((_local14 * _arg1.dt) * _local17) * m_gamma);
m_mass = (1 / (_local13 + m_gamma));
};
if (_arg1.warmStarting){
m_impulse = (m_impulse * _arg1.dtRatio);
_local18 = (m_impulse * m_u.x);
_local19 = (m_impulse * m_u.y);
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local18));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local19));
_local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local19) - (_local7 * _local18))));
_local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local18));
_local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local19));
_local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local19) - (_local9 * _local18))));
} else {
m_impulse = 0;
};
}
override public function GetReactionTorque():Number{
return (0);
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2 = new b2Vec2();
_local1.SetV(m_u);
_local1.Multiply((m_inv_dt * m_impulse));
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local1:b2Mat22;
if (m_frequencyHz > 0){
return (true);
};
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
_local1 = _local2.m_xf.R;
var _local4:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
var _local5:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
var _local6:Number = ((_local1.col1.x * _local4) + (_local1.col2.x * _local5));
_local5 = ((_local1.col1.y * _local4) + (_local1.col2.y * _local5));
_local4 = _local6;
_local1 = _local3.m_xf.R;
var _local7:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
var _local8:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local6 = ((_local1.col1.x * _local7) + (_local1.col2.x * _local8));
_local8 = ((_local1.col1.y * _local7) + (_local1.col2.y * _local8));
_local7 = _local6;
var _local9:Number = (((_local3.m_sweep.c.x + _local7) - _local2.m_sweep.c.x) - _local4);
var _local10:Number = (((_local3.m_sweep.c.y + _local8) - _local2.m_sweep.c.y) - _local5);
var _local11:Number = Math.sqrt(((_local9 * _local9) + (_local10 * _local10)));
_local9 = (_local9 / _local11);
_local10 = (_local10 / _local11);
var _local12:Number = (_local11 - m_length);
_local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
var _local13:Number = (-(m_mass) * _local12);
m_u.Set(_local9, _local10);
var _local14:Number = (_local13 * m_u.x);
var _local15:Number = (_local13 * m_u.y);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x - (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y - (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a - (_local2.m_invI * ((_local4 * _local15) - (_local5 * _local14))));
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local14));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local15));
_local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local7 * _local15) - (_local8 * _local14))));
_local2.SynchronizeTransform();
_local3.SynchronizeTransform();
return ((b2Math.b2Abs(_local12) < b2Settings.b2_linearSlop));
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Mat22;
var _local3:b2Body = m_body1;
var _local4:b2Body = m_body2;
_local2 = _local3.m_xf.R;
var _local5:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
var _local6:Number = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
var _local7:Number = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6));
_local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6));
_local5 = _local7;
_local2 = _local4.m_xf.R;
var _local8:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
var _local9:Number = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9));
_local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9));
_local8 = _local7;
var _local10:Number = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6));
var _local11:Number = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5));
var _local12:Number = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9));
var _local13:Number = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8));
var _local14:Number = ((m_u.x * (_local12 - _local10)) + (m_u.y * (_local13 - _local11)));
var _local15:Number = (-(m_mass) * ((_local14 + m_bias) + (m_gamma * m_impulse)));
m_impulse = (m_impulse + _local15);
var _local16:Number = (_local15 * m_u.x);
var _local17:Number = (_local15 * m_u.y);
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16))));
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17));
_local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
}
}
}//package Box2D.Dynamics.Joints
Section 58
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2DistanceJointDef extends b2JointDef {
public var localAnchor1:b2Vec2;
public var length:Number;
public var dampingRatio:Number;
public var localAnchor2:b2Vec2;
public var frequencyHz:Number;
public function b2DistanceJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_distanceJoint;
length = 1;
frequencyHz = 0;
dampingRatio = 0;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{
body1 = _arg1;
body2 = _arg2;
localAnchor1.SetV(body1.GetLocalPoint(_arg3));
localAnchor2.SetV(body2.GetLocalPoint(_arg4));
var _local5:Number = (_arg4.x - _arg3.x);
var _local6:Number = (_arg4.y - _arg3.y);
length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
frequencyHz = 0;
dampingRatio = 0;
}
}
}//package Box2D.Dynamics.Joints
Section 59
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2GearJoint extends b2Joint {
public var m_ground2:b2Body;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_ratio:Number;
public var m_revolute2:b2RevoluteJoint;
public var m_force:Number;
public var m_mass:Number;
public var m_prismatic2:b2PrismaticJoint;
public var m_ground1:b2Body;
public var m_revolute1:b2RevoluteJoint;
public var m_prismatic1:b2PrismaticJoint;
public var m_constant:Number;
public var m_J:b2Jacobian;
public function b2GearJoint(_arg1:b2GearJointDef){
var _local4:Number;
var _local5:Number;
m_groundAnchor1 = new b2Vec2();
m_groundAnchor2 = new b2Vec2();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_J = new b2Jacobian();
super(_arg1);
var _local2:int = _arg1.joint1.m_type;
var _local3:int = _arg1.joint2.m_type;
m_revolute1 = null;
m_prismatic1 = null;
m_revolute2 = null;
m_prismatic2 = null;
m_ground1 = _arg1.joint1.m_body1;
m_body1 = _arg1.joint1.m_body2;
if (_local2 == b2Joint.e_revoluteJoint){
m_revolute1 = (_arg1.joint1 as b2RevoluteJoint);
m_groundAnchor1.SetV(m_revolute1.m_localAnchor1);
m_localAnchor1.SetV(m_revolute1.m_localAnchor2);
_local4 = m_revolute1.GetJointAngle();
} else {
m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint);
m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1);
m_localAnchor1.SetV(m_prismatic1.m_localAnchor2);
_local4 = m_prismatic1.GetJointTranslation();
};
m_ground2 = _arg1.joint2.m_body1;
m_body2 = _arg1.joint2.m_body2;
if (_local3 == b2Joint.e_revoluteJoint){
m_revolute2 = (_arg1.joint2 as b2RevoluteJoint);
m_groundAnchor2.SetV(m_revolute2.m_localAnchor1);
m_localAnchor2.SetV(m_revolute2.m_localAnchor2);
_local5 = m_revolute2.GetJointAngle();
} else {
m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint);
m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1);
m_localAnchor2.SetV(m_prismatic2.m_localAnchor2);
_local5 = m_prismatic2.GetJointTranslation();
};
m_ratio = _arg1.ratio;
m_constant = (_local4 + (m_ratio * _local5));
m_force = 0;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:b2Mat22;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local15:Number;
var _local2:b2Body = m_ground1;
var _local3:b2Body = m_ground2;
var _local4:b2Body = m_body1;
var _local5:b2Body = m_body2;
var _local14:Number = 0;
m_J.SetZero();
if (m_revolute1){
m_J.angular1 = -1;
_local14 = (_local14 + _local4.m_invI);
} else {
_local10 = _local2.m_xf.R;
_local11 = m_prismatic1.m_localXAxis1;
_local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
_local10 = _local4.m_xf.R;
_local8 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y);
_local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9));
_local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9));
_local8 = _local13;
_local12 = ((_local8 * _local7) - (_local9 * _local6));
m_J.linear1.Set(-(_local6), -(_local7));
m_J.angular1 = -(_local12);
_local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12)));
};
if (m_revolute2){
m_J.angular2 = -(m_ratio);
_local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI));
} else {
_local10 = _local3.m_xf.R;
_local11 = m_prismatic2.m_localXAxis1;
_local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
_local10 = _local5.m_xf.R;
_local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y);
_local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9));
_local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9));
_local8 = _local13;
_local12 = ((_local8 * _local7) - (_local9 * _local6));
m_J.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7));
m_J.angular2 = (-(m_ratio) * _local12);
_local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12))));
};
m_mass = (1 / _local14);
if (_arg1.warmStarting){
_local15 = (_arg1.dt * m_force);
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * _local15) * m_J.linear1.x));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * m_J.linear1.y));
_local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * m_J.angular1));
_local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * m_J.linear2.x));
_local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * m_J.linear2.y));
_local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * m_J.angular2));
} else {
m_force = 0;
};
}
override public function GetReactionTorque():Number{
var _local1:b2Mat22 = m_body2.m_xf.R;
var _local2:Number = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x);
var _local3:Number = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y);
var _local4:Number = ((_local1.col1.x * _local2) + (_local1.col2.x * _local3));
_local3 = ((_local1.col1.y * _local2) + (_local1.col2.y * _local3));
_local2 = _local4;
_local4 = ((m_force * m_J.angular2) - ((_local2 * (m_force * m_J.linear2.y)) - (_local3 * (m_force * m_J.linear2.x))));
return (_local4);
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2 = new b2Vec2((m_force * m_J.linear2.x), (m_force * m_J.linear2.y));
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local4:Number;
var _local5:Number;
var _local1:Number = 0;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
if (m_revolute1){
_local4 = m_revolute1.GetJointAngle();
} else {
_local4 = m_prismatic1.GetJointTranslation();
};
if (m_revolute2){
_local5 = m_revolute2.GetJointAngle();
} else {
_local5 = m_prismatic2.GetJointTranslation();
};
var _local6:Number = (m_constant - (_local4 + (m_ratio * _local5)));
var _local7:Number = (-(m_mass) * _local6);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + ((_local2.m_invMass * _local7) * m_J.linear1.x));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + ((_local2.m_invMass * _local7) * m_J.linear1.y));
_local2.m_sweep.a = (_local2.m_sweep.a + ((_local2.m_invI * _local7) * m_J.angular1));
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local7) * m_J.linear2.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local7) * m_J.linear2.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local7) * m_J.angular2));
_local2.SynchronizeTransform();
_local3.SynchronizeTransform();
return ((_local1 < b2Settings.b2_linearSlop));
}
public function GetRatio():Number{
return (m_ratio);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
var _local4:Number = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
var _local5:Number = ((-(_arg1.inv_dt) * m_mass) * _local4);
m_force = (m_force + _local5);
var _local6:Number = (_arg1.dt * _local5);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local6) * m_J.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local6) * m_J.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local6) * m_J.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local6) * m_J.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local6) * m_J.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local6) * m_J.angular2));
}
}
}//package Box2D.Dynamics.Joints
Section 60
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef)
package Box2D.Dynamics.Joints {
public class b2GearJointDef extends b2JointDef {
public var joint1:b2Joint;
public var joint2:b2Joint;
public var ratio:Number;
public function b2GearJointDef(){
type = b2Joint.e_gearJoint;
joint1 = null;
joint2 = null;
ratio = 1;
}
}
}//package Box2D.Dynamics.Joints
Section 61
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
public class b2Jacobian {
public var linear1:b2Vec2;
public var linear2:b2Vec2;
public var angular1:Number;
public var angular2:Number;
public function b2Jacobian(){
linear1 = new b2Vec2();
linear2 = new b2Vec2();
super();
}
public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{
linear1.SetV(_arg1);
angular1 = _arg2;
linear2.SetV(_arg3);
angular2 = _arg4;
}
public function SetZero():void{
linear1.SetZero();
angular1 = 0;
linear2.SetZero();
angular2 = 0;
}
public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{
return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4)));
}
}
}//package Box2D.Dynamics.Joints
Section 62
//b2Joint (Box2D.Dynamics.Joints.b2Joint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2Joint {
public var m_islandFlag:Boolean;
public var m_body1:b2Body;
public var m_prev:b2Joint;
public var m_next:b2Joint;
public var m_type:int;
public var m_collideConnected:Boolean;
public var m_node1:b2JointEdge;
public var m_node2:b2JointEdge;
public var m_inv_dt:Number;
public var m_userData;
public var m_body2:b2Body;
public static const e_unknownJoint:int = 0;
public static const e_inactiveLimit:int = 0;
public static const e_atUpperLimit:int = 2;
public static const e_atLowerLimit:int = 1;
public static const e_gearJoint:int = 6;
public static const e_revoluteJoint:int = 1;
public static const e_equalLimits:int = 3;
public static const e_distanceJoint:int = 3;
public static const e_pulleyJoint:int = 4;
public static const e_prismaticJoint:int = 2;
public static const e_mouseJoint:int = 5;
public function b2Joint(_arg1:b2JointDef){
m_node1 = new b2JointEdge();
m_node2 = new b2JointEdge();
super();
m_type = _arg1.type;
m_prev = null;
m_next = null;
m_body1 = _arg1.body1;
m_body2 = _arg1.body2;
m_collideConnected = _arg1.collideConnected;
m_islandFlag = false;
m_userData = _arg1.userData;
}
public function GetBody2():b2Body{
return (m_body2);
}
public function GetAnchor1():b2Vec2{
return (null);
}
public function GetAnchor2():b2Vec2{
return (null);
}
public function GetNext():b2Joint{
return (m_next);
}
public function GetType():int{
return (m_type);
}
public function InitVelocityConstraints(_arg1:b2TimeStep):void{
}
public function GetReactionTorque():Number{
return (0);
}
public function GetUserData(){
return (m_userData);
}
public function GetReactionForce():b2Vec2{
return (null);
}
public function SolvePositionConstraints():Boolean{
return (false);
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public function GetBody1():b2Body{
return (m_body1);
}
public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
}
public function InitPositionConstraints():void{
}
public static function Destroy(_arg1:b2Joint, _arg2):void{
}
public static function Create(_arg1:b2JointDef, _arg2):b2Joint{
var _local3:b2Joint;
switch (_arg1.type){
case e_distanceJoint:
_local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef));
break;
case e_mouseJoint:
_local3 = new b2MouseJoint((_arg1 as b2MouseJointDef));
break;
case e_prismaticJoint:
_local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef));
break;
case e_revoluteJoint:
_local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef));
break;
case e_pulleyJoint:
_local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef));
break;
case e_gearJoint:
_local3 = new b2GearJoint((_arg1 as b2GearJointDef));
break;
default:
break;
};
return (_local3);
}
}
}//package Box2D.Dynamics.Joints
Section 63
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
public class b2JointDef {
public var body2:b2Body;
public var type:int;
public var userData;
public var collideConnected:Boolean;
public var body1:b2Body;
public function b2JointDef(){
type = b2Joint.e_unknownJoint;
userData = null;
body1 = null;
body2 = null;
collideConnected = false;
}
}
}//package Box2D.Dynamics.Joints
Section 64
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
public class b2JointEdge {
public var other:b2Body;
public var next:b2JointEdge;
public var prev:b2JointEdge;
public var joint:b2Joint;
}
}//package Box2D.Dynamics.Joints
Section 65
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2MouseJoint extends b2Joint {
private var K1:b2Mat22;
private var K:b2Mat22;
public var m_beta:Number;
public var m_mass:b2Mat22;
private var K2:b2Mat22;
public var m_target:b2Vec2;
public var m_gamma:Number;
public var m_impulse:b2Vec2;
public var m_C:b2Vec2;
public var m_localAnchor:b2Vec2;
public var m_maxForce:Number;
public function b2MouseJoint(_arg1:b2MouseJointDef){
var _local3:Number;
K = new b2Mat22();
K1 = new b2Mat22();
K2 = new b2Mat22();
m_localAnchor = new b2Vec2();
m_target = new b2Vec2();
m_impulse = new b2Vec2();
m_mass = new b2Mat22();
m_C = new b2Vec2();
super(_arg1);
m_target.SetV(_arg1.target);
var _local2:Number = (m_target.x - m_body2.m_xf.position.x);
_local3 = (m_target.y - m_body2.m_xf.position.y);
var _local4:b2Mat22 = m_body2.m_xf.R;
m_localAnchor.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y));
m_localAnchor.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y));
m_maxForce = _arg1.maxForce;
m_impulse.SetZero();
var _local5:Number = m_body2.m_mass;
var _local6:Number = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz);
var _local7:Number = (((2 * _local5) * _arg1.dampingRatio) * _local6);
var _local8:Number = ((_arg1.timeStep * _local5) * (_local6 * _local6));
m_gamma = (1 / (_local7 + _local8));
m_beta = (_local8 / (_local7 + _local8));
}
public function SetTarget(_arg1:b2Vec2):void{
if (m_body2.IsSleeping()){
m_body2.WakeUp();
};
m_target = _arg1;
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
_local2 = m_body2;
_local3 = _local2.m_xf.R;
_local4 = (m_localAnchor.x - _local2.m_sweep.localCenter.x);
_local5 = (m_localAnchor.y - _local2.m_sweep.localCenter.y);
var _local6:Number = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5));
_local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5));
_local4 = _local6;
_local7 = _local2.m_invMass;
_local8 = _local2.m_invI;
K1.col1.x = _local7;
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = _local7;
K2.col1.x = ((_local8 * _local5) * _local5);
K2.col2.x = ((-(_local8) * _local4) * _local5);
K2.col1.y = ((-(_local8) * _local4) * _local5);
K2.col2.y = ((_local8 * _local4) * _local4);
K.SetM(K1);
K.AddM(K2);
K.col1.x = (K.col1.x + m_gamma);
K.col2.y = (K.col2.y + m_gamma);
K.Invert(m_mass);
m_C.x = ((_local2.m_sweep.c.x + _local4) - m_target.x);
m_C.y = ((_local2.m_sweep.c.y + _local5) - m_target.y);
_local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98);
var _local9:Number = (_arg1.dt * m_impulse.x);
var _local10:Number = (_arg1.dt * m_impulse.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local7 * _local9));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local7 * _local10));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local8 * ((_local4 * _local10) - (_local5 * _local9))));
}
override public function GetAnchor1():b2Vec2{
return (m_target);
}
override public function GetReactionTorque():Number{
return (0);
}
override public function GetReactionForce():b2Vec2{
return (m_impulse);
}
override public function SolvePositionConstraints():Boolean{
return (true);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local2:b2Body = m_body2;
_local3 = _local2.m_xf.R;
var _local6:Number = (m_localAnchor.x - _local2.m_sweep.localCenter.x);
var _local7:Number = (m_localAnchor.y - _local2.m_sweep.localCenter.y);
_local4 = ((_local3.col1.x * _local6) + (_local3.col2.x * _local7));
_local7 = ((_local3.col1.y * _local6) + (_local3.col2.y * _local7));
_local6 = _local4;
var _local8:Number = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7));
var _local9:Number = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6));
_local3 = m_mass;
_local4 = ((_local8 + ((m_beta * _arg1.inv_dt) * m_C.x)) + ((m_gamma * _arg1.dt) * m_impulse.x));
_local5 = ((_local9 + ((m_beta * _arg1.inv_dt) * m_C.y)) + ((m_gamma * _arg1.dt) * m_impulse.y));
var _local10:Number = (-(_arg1.inv_dt) * ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)));
var _local11:Number = (-(_arg1.inv_dt) * ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)));
var _local12:Number = m_impulse.x;
var _local13:Number = m_impulse.y;
m_impulse.x = (m_impulse.x + _local10);
m_impulse.y = (m_impulse.y + _local11);
var _local14:Number = m_impulse.Length();
if (_local14 > m_maxForce){
m_impulse.Multiply((m_maxForce / _local14));
};
_local10 = (m_impulse.x - _local12);
_local11 = (m_impulse.y - _local13);
var _local15:Number = (_arg1.dt * _local10);
var _local16:Number = (_arg1.dt * _local11);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local15));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local16));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15))));
}
}
}//package Box2D.Dynamics.Joints
Section 66
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
public class b2MouseJointDef extends b2JointDef {
public var timeStep:Number;
public var target:b2Vec2;
public var maxForce:Number;
public var dampingRatio:Number;
public var frequencyHz:Number;
public function b2MouseJointDef(){
target = new b2Vec2();
super();
type = b2Joint.e_mouseJoint;
maxForce = 0;
frequencyHz = 5;
dampingRatio = 0.7;
timeStep = (1 / 60);
}
}
}//package Box2D.Dynamics.Joints
Section 67
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2PrismaticJoint extends b2Joint {
public var m_limitForce:Number;
public var m_lowerTranslation:Number;
public var m_localXAxis1:b2Vec2;
public var m_refAngle:Number;
public var m_torque:Number;
public var m_motorForce:Number;
public var m_enableLimit:Boolean;
public var m_angularMass:Number;
public var m_maxMotorForce:Number;
public var m_localYAxis1:b2Vec2;
public var m_force:Number;
public var m_motorMass:Number;
public var m_upperTranslation:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_limitState:int;
public var m_linearMass:Number;
public var m_motorJacobian:b2Jacobian;
public var m_limitPositionImpulse:Number;
public var m_motorSpeed:Number;
public var m_enableMotor:Boolean;
public var m_linearJacobian:b2Jacobian;
public function b2PrismaticJoint(_arg1:b2PrismaticJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_localXAxis1 = new b2Vec2();
m_localYAxis1 = new b2Vec2();
m_linearJacobian = new b2Jacobian();
m_motorJacobian = new b2Jacobian();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_localXAxis1.SetV(_arg1.localAxis1);
m_localYAxis1.x = -(m_localXAxis1.y);
m_localYAxis1.y = m_localXAxis1.x;
m_refAngle = _arg1.referenceAngle;
m_linearJacobian.SetZero();
m_linearMass = 0;
m_force = 0;
m_angularMass = 0;
m_torque = 0;
m_motorJacobian.SetZero();
m_motorMass = 0;
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
m_lowerTranslation = _arg1.lowerTranslation;
m_upperTranslation = _arg1.upperTranslation;
m_maxMotorForce = _arg1.maxMotorForce;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local8:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
var _local4:Number = _local2.m_invMass;
var _local5:Number = _local3.m_invMass;
var _local6:Number = _local2.m_invI;
var _local7:Number = _local3.m_invI;
var _local9:Number = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
var _local10:Number = ((-(_arg1.inv_dt) * m_linearMass) * _local9);
m_force = (m_force + _local10);
var _local11:Number = (_arg1.dt * _local10);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_linearJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_linearJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_linearJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_linearJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_linearJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_linearJacobian.angular2));
var _local12:Number = (_local3.m_angularVelocity - _local2.m_angularVelocity);
var _local13:Number = ((-(_arg1.inv_dt) * m_angularMass) * _local12);
m_torque = (m_torque + _local13);
var _local14:Number = (_arg1.dt * _local13);
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local14));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local14));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local15 = (m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed);
_local16 = ((-(_arg1.inv_dt) * m_motorMass) * _local15);
_local17 = m_motorForce;
m_motorForce = b2Math.b2Clamp((m_motorForce + _local16), -(m_maxMotorForce), m_maxMotorForce);
_local16 = (m_motorForce - _local17);
_local11 = (_arg1.dt * _local16);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local18 = m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local19 = ((-(_arg1.inv_dt) * m_motorMass) * _local18);
if (m_limitState == e_equalLimits){
m_limitForce = (m_limitForce + _local19);
} else {
if (m_limitState == e_atLowerLimit){
_local8 = m_limitForce;
m_limitForce = b2Math.b2Max((m_limitForce + _local19), 0);
_local19 = (m_limitForce - _local8);
} else {
if (m_limitState == e_atUpperLimit){
_local8 = m_limitForce;
m_limitForce = b2Math.b2Min((m_limitForce + _local19), 0);
_local19 = (m_limitForce - _local8);
};
};
};
_local11 = (_arg1.dt * _local19);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2));
};
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
public function GetUpperLimit():Number{
return (m_upperTranslation);
}
public function GetLowerLimit():Number{
return (m_lowerTranslation);
}
public function EnableMotor(_arg1:Boolean):void{
m_enableMotor = _arg1;
}
public function GetJointTranslation():Number{
var _local3:b2Mat22;
var _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
var _local4:b2Vec2 = _local1.GetWorldPoint(m_localAnchor1);
var _local5:b2Vec2 = _local2.GetWorldPoint(m_localAnchor2);
var _local6:Number = (_local5.x - _local4.x);
var _local7:Number = (_local5.y - _local4.y);
var _local8:b2Vec2 = _local1.GetWorldVector(m_localXAxis1);
var _local9:Number = ((_local8.x * _local6) + (_local8.y * _local7));
return (_local9);
}
public function GetMotorSpeed():Number{
return (m_motorSpeed);
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Mat22 = m_body1.m_xf.R;
var _local2:Number = (m_limitForce * ((_local1.col1.x * m_localXAxis1.x) + (_local1.col2.x * m_localXAxis1.y)));
var _local3:Number = (m_limitForce * ((_local1.col1.y * m_localXAxis1.x) + (_local1.col2.y * m_localXAxis1.y)));
var _local4:Number = (m_force * ((_local1.col1.x * m_localYAxis1.x) + (_local1.col2.x * m_localYAxis1.y)));
var _local5:Number = (m_force * ((_local1.col1.y * m_localYAxis1.x) + (_local1.col2.y * m_localYAxis1.y)));
return (new b2Vec2(((m_limitForce * _local2) + (m_force * _local4)), ((m_limitForce * _local3) + (m_force * _local5))));
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local9:b2Mat22;
var _local10:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local3:b2Body = m_body1;
var _local4:b2Body = m_body2;
var _local5:Number = _local3.m_invMass;
var _local6:Number = _local4.m_invMass;
var _local7:Number = _local3.m_invI;
var _local8:Number = _local4.m_invI;
_local9 = _local3.m_xf.R;
var _local11:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
var _local12:Number = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12));
_local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12));
_local11 = _local10;
_local9 = _local4.m_xf.R;
var _local13:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
var _local14:Number = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14));
_local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14));
_local13 = _local10;
var _local15:Number = (_local3.m_sweep.c.x + _local11);
var _local16:Number = (_local3.m_sweep.c.y + _local12);
var _local17:Number = (_local4.m_sweep.c.x + _local13);
var _local18:Number = (_local4.m_sweep.c.y + _local14);
var _local19:Number = (_local17 - _local15);
var _local20:Number = (_local18 - _local16);
_local9 = _local3.m_xf.R;
var _local21:Number = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y));
var _local22:Number = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y));
var _local23:Number = ((_local21 * _local19) + (_local22 * _local20));
_local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
var _local24:Number = (-(m_linearMass) * _local23);
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local24) * m_linearJacobian.linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local24) * m_linearJacobian.linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local24) * m_linearJacobian.angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local24) * m_linearJacobian.linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local24) * m_linearJacobian.linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local24) * m_linearJacobian.angular2));
var _local25:Number = b2Math.b2Abs(_local23);
var _local26:Number = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_refAngle);
_local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
var _local27:Number = (-(m_angularMass) * _local26);
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local27));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local27));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
var _local28:Number = b2Math.b2Abs(_local26);
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local9 = _local3.m_xf.R;
_local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12));
_local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12));
_local11 = _local10;
_local9 = _local4.m_xf.R;
_local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14));
_local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14));
_local13 = _local10;
_local15 = (_local3.m_sweep.c.x + _local11);
_local16 = (_local3.m_sweep.c.y + _local12);
_local17 = (_local4.m_sweep.c.x + _local13);
_local18 = (_local4.m_sweep.c.y + _local14);
_local19 = (_local17 - _local15);
_local20 = (_local18 - _local16);
_local9 = _local3.m_xf.R;
_local29 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y));
_local30 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y));
_local31 = ((_local29 * _local19) + (_local30 * _local20));
_local32 = 0;
if (m_limitState == e_equalLimits){
_local1 = b2Math.b2Clamp(_local31, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local32 = (-(m_motorMass) * _local1);
_local25 = b2Math.b2Max(_local25, b2Math.b2Abs(_local26));
} else {
if (m_limitState == e_atLowerLimit){
_local1 = (_local31 - m_lowerTranslation);
_local25 = b2Math.b2Max(_local25, -(_local1));
_local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local32 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local32), 0);
_local32 = (m_limitPositionImpulse - _local2);
} else {
if (m_limitState == e_atUpperLimit){
_local1 = (_local31 - m_upperTranslation);
_local25 = b2Math.b2Max(_local25, _local1);
_local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection);
_local32 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local32), 0);
_local32 = (m_limitPositionImpulse - _local2);
};
};
};
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local32) * m_motorJacobian.linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) * m_motorJacobian.linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) * m_motorJacobian.angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) * m_motorJacobian.linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) * m_motorJacobian.linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) * m_motorJacobian.angular2));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
};
return ((((_local25 <= b2Settings.b2_linearSlop)) && ((_local28 <= b2Settings.b2_angularSlop))));
}
public function SetMotorSpeed(_arg1:Number):void{
m_motorSpeed = _arg1;
}
public function GetJointSpeed():Number{
var _local3:b2Mat22;
var _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
_local3 = _local1.m_xf.R;
var _local4:Number = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
var _local5:Number = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
var _local6:Number = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5));
_local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5));
_local4 = _local6;
_local3 = _local2.m_xf.R;
var _local7:Number = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
var _local8:Number = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8));
_local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8));
_local7 = _local6;
var _local9:Number = (_local1.m_sweep.c.x + _local4);
var _local10:Number = (_local1.m_sweep.c.y + _local5);
var _local11:Number = (_local2.m_sweep.c.x + _local7);
var _local12:Number = (_local2.m_sweep.c.y + _local8);
var _local13:Number = (_local11 - _local9);
var _local14:Number = (_local12 - _local10);
var _local15:b2Vec2 = _local1.GetWorldVector(m_localXAxis1);
var _local16:b2Vec2 = _local1.m_linearVelocity;
var _local17:b2Vec2 = _local2.m_linearVelocity;
var _local18:Number = _local1.m_angularVelocity;
var _local19:Number = _local2.m_angularVelocity;
var _local20:Number = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4)))));
return (_local20);
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local4:b2Mat22;
var _local5:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
_local4 = _local2.m_xf.R;
var _local6:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
var _local7:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
var _local10:Number = _local2.m_invMass;
var _local11:Number = _local3.m_invMass;
var _local12:Number = _local2.m_invI;
var _local13:Number = _local3.m_invI;
_local4 = _local2.m_xf.R;
var _local14:Number = ((_local4.col1.x * m_localYAxis1.x) + (_local4.col2.x * m_localYAxis1.y));
var _local15:Number = ((_local4.col1.y * m_localYAxis1.x) + (_local4.col2.y * m_localYAxis1.y));
var _local16:Number = ((_local3.m_sweep.c.x + _local8) - _local2.m_sweep.c.x);
var _local17:Number = ((_local3.m_sweep.c.y + _local9) - _local2.m_sweep.c.y);
m_linearJacobian.linear1.x = -(_local14);
m_linearJacobian.linear1.y = -(_local15);
m_linearJacobian.linear2.x = _local14;
m_linearJacobian.linear2.y = _local15;
m_linearJacobian.angular1 = -(((_local16 * _local15) - (_local17 * _local14)));
m_linearJacobian.angular2 = ((_local8 * _local15) - (_local9 * _local14));
m_linearMass = (((_local10 + ((_local12 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local11) + ((_local13 * m_linearJacobian.angular2) * m_linearJacobian.angular2));
m_linearMass = (1 / m_linearMass);
m_angularMass = (_local12 + _local13);
if (m_angularMass > Number.MIN_VALUE){
m_angularMass = (1 / m_angularMass);
};
if (((m_enableLimit) || (m_enableMotor))){
_local4 = _local2.m_xf.R;
_local18 = ((_local4.col1.x * m_localXAxis1.x) + (_local4.col2.x * m_localXAxis1.y));
_local19 = ((_local4.col1.y * m_localXAxis1.x) + (_local4.col2.y * m_localXAxis1.y));
m_motorJacobian.linear1.x = -(_local18);
m_motorJacobian.linear1.y = -(_local19);
m_motorJacobian.linear2.x = _local18;
m_motorJacobian.linear2.y = _local19;
m_motorJacobian.angular1 = -(((_local16 * _local19) - (_local17 * _local18)));
m_motorJacobian.angular2 = ((_local8 * _local19) - (_local9 * _local18));
m_motorMass = (((_local10 + ((_local12 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local11) + ((_local13 * m_motorJacobian.angular2) * m_motorJacobian.angular2));
m_motorMass = (1 / m_motorMass);
if (m_enableLimit){
_local20 = (_local16 - _local6);
_local21 = (_local17 - _local7);
_local22 = ((_local18 * _local20) + (_local19 * _local21));
if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){
m_limitState = e_equalLimits;
} else {
if (_local22 <= m_lowerTranslation){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local22 >= m_upperTranslation){
if (m_limitState != e_atUpperLimit){
m_limitForce = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitForce = 0;
};
};
};
};
};
if (m_enableMotor == false){
m_motorForce = 0;
};
if (m_enableLimit == false){
m_limitForce = 0;
};
if (_arg1.warmStarting){
_local23 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.x)));
_local24 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.y)));
_local25 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.x)));
_local26 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.y)));
_local27 = (_arg1.dt * (((m_force * m_linearJacobian.angular1) - m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular1)));
_local28 = (_arg1.dt * (((m_force * m_linearJacobian.angular2) + m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular2)));
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local10 * _local23));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local10 * _local24));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * _local27));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local25));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local26));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * _local28));
} else {
m_force = 0;
m_torque = 0;
m_limitForce = 0;
m_motorForce = 0;
};
m_limitPositionImpulse = 0;
}
public function GetMotorForce():Number{
return (m_motorForce);
}
public function EnableLimit(_arg1:Boolean):void{
m_enableLimit = _arg1;
}
public function SetMaxMotorForce(_arg1:Number):void{
m_maxMotorForce = _arg1;
}
override public function GetReactionTorque():Number{
return (m_torque);
}
public function IsLimitEnabled():Boolean{
return (m_enableLimit);
}
public function IsMotorEnabled():Boolean{
return (m_enableMotor);
}
public function SetLimits(_arg1:Number, _arg2:Number):void{
m_lowerTranslation = _arg1;
m_upperTranslation = _arg2;
}
}
}//package Box2D.Dynamics.Joints
Section 68
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2PrismaticJointDef extends b2JointDef {
public var motorSpeed:Number;
public var localAxis1:b2Vec2;
public var referenceAngle:Number;
public var upperTranslation:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var enableLimit:Boolean;
public var enableMotor:Boolean;
public var maxMotorForce:Number;
public var lowerTranslation:Number;
public function b2PrismaticJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
localAxis1 = new b2Vec2();
super();
type = b2Joint.e_prismaticJoint;
localAxis1.Set(1, 0);
referenceAngle = 0;
enableLimit = false;
lowerTranslation = 0;
upperTranslation = 0;
enableMotor = false;
maxMotorForce = 0;
motorSpeed = 0;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{
body1 = _arg1;
body2 = _arg2;
localAnchor1 = body1.GetLocalPoint(_arg3);
localAnchor2 = body2.GetLocalPoint(_arg3);
localAxis1 = body1.GetLocalVector(_arg4);
referenceAngle = (body2.GetAngle() - body1.GetAngle());
}
}
}//package Box2D.Dynamics.Joints
Section 69
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2PulleyJoint extends b2Joint {
public var m_limitState1:int;
public var m_limitState2:int;
public var m_ground:b2Body;
public var m_maxLength2:Number;
public var m_maxLength1:Number;
public var m_limitPositionImpulse1:Number;
public var m_limitPositionImpulse2:Number;
public var m_force:Number;
public var m_constant:Number;
public var m_positionImpulse:Number;
public var m_state:int;
public var m_ratio:Number;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_limitMass1:Number;
public var m_limitMass2:Number;
public var m_pulleyMass:Number;
public var m_u1:b2Vec2;
public var m_limitForce1:Number;
public var m_limitForce2:Number;
public var m_u2:b2Vec2;
public static const b2_minPulleyLength:Number = 2;
public function b2PulleyJoint(_arg1:b2PulleyJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_groundAnchor1 = new b2Vec2();
m_groundAnchor2 = new b2Vec2();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_u1 = new b2Vec2();
m_u2 = new b2Vec2();
super(_arg1);
m_ground = m_body1.m_world.m_groundBody;
m_groundAnchor1.x = (_arg1.groundAnchor1.x - m_ground.m_xf.position.x);
m_groundAnchor1.y = (_arg1.groundAnchor1.y - m_ground.m_xf.position.y);
m_groundAnchor2.x = (_arg1.groundAnchor2.x - m_ground.m_xf.position.x);
m_groundAnchor2.y = (_arg1.groundAnchor2.y - m_ground.m_xf.position.y);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_ratio = _arg1.ratio;
m_constant = (_arg1.length1 + (m_ratio * _arg1.length2));
m_maxLength1 = b2Math.b2Min(_arg1.maxLength1, (m_constant - (m_ratio * b2_minPulleyLength)));
m_maxLength2 = b2Math.b2Min(_arg1.maxLength2, ((m_constant - b2_minPulleyLength) / m_ratio));
m_force = 0;
m_limitForce1 = 0;
m_limitForce2 = 0;
}
public function GetGroundAnchor2():b2Vec2{
var _local1:b2Vec2 = m_ground.m_xf.position.Copy();
_local1.Add(m_groundAnchor2);
return (_local1);
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2 = m_u2.Copy();
_local1.Multiply(m_force);
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local3:b2Mat22;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
var _local4:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x);
var _local5:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y);
var _local6:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x);
var _local7:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y);
var _local23:Number = 0;
if (m_state == e_atUpperLimit){
_local3 = _local1.m_xf.R;
_local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9));
_local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9));
_local8 = _local22;
_local3 = _local2.m_xf.R;
_local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11));
_local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11));
_local10 = _local22;
_local12 = (_local1.m_sweep.c.x + _local8);
_local13 = (_local1.m_sweep.c.y + _local9);
_local14 = (_local2.m_sweep.c.x + _local10);
_local15 = (_local2.m_sweep.c.y + _local11);
m_u1.Set((_local12 - _local4), (_local13 - _local5));
m_u2.Set((_local14 - _local6), (_local15 - _local7));
_local16 = m_u1.Length();
_local17 = m_u2.Length();
if (_local16 > b2Settings.b2_linearSlop){
m_u1.Multiply((1 / _local16));
} else {
m_u1.SetZero();
};
if (_local17 > b2Settings.b2_linearSlop){
m_u2.Multiply((1 / _local17));
} else {
m_u2.SetZero();
};
_local18 = ((m_constant - _local16) - (m_ratio * _local17));
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(m_pulleyMass) * _local18);
_local20 = m_positionImpulse;
m_positionImpulse = b2Math.b2Max(0, (m_positionImpulse + _local19));
_local19 = (m_positionImpulse - _local20);
_local12 = (-(_local19) * m_u1.x);
_local13 = (-(_local19) * m_u1.y);
_local14 = ((-(m_ratio) * _local19) * m_u2.x);
_local15 = ((-(m_ratio) * _local19) * m_u2.y);
_local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12));
_local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13));
_local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local1.SynchronizeTransform();
_local2.SynchronizeTransform();
};
if (m_limitState1 == e_atUpperLimit){
_local3 = _local1.m_xf.R;
_local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9));
_local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9));
_local8 = _local22;
_local12 = (_local1.m_sweep.c.x + _local8);
_local13 = (_local1.m_sweep.c.y + _local9);
m_u1.Set((_local12 - _local4), (_local13 - _local5));
_local16 = m_u1.Length();
if (_local16 > b2Settings.b2_linearSlop){
m_u1.x = (m_u1.x * (1 / _local16));
m_u1.y = (m_u1.y * (1 / _local16));
} else {
m_u1.SetZero();
};
_local18 = (m_maxLength1 - _local16);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(m_limitMass1) * _local18);
_local21 = m_limitPositionImpulse1;
m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19));
_local19 = (m_limitPositionImpulse1 - _local21);
_local12 = (-(_local19) * m_u1.x);
_local13 = (-(_local19) * m_u1.y);
_local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12));
_local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13));
_local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local1.SynchronizeTransform();
};
if (m_limitState2 == e_atUpperLimit){
_local3 = _local2.m_xf.R;
_local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11));
_local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11));
_local10 = _local22;
_local14 = (_local2.m_sweep.c.x + _local10);
_local15 = (_local2.m_sweep.c.y + _local11);
m_u2.Set((_local14 - _local6), (_local15 - _local7));
_local17 = m_u2.Length();
if (_local17 > b2Settings.b2_linearSlop){
m_u2.x = (m_u2.x * (1 / _local17));
m_u2.y = (m_u2.y * (1 / _local17));
} else {
m_u2.SetZero();
};
_local18 = (m_maxLength2 - _local17);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(m_limitMass2) * _local18);
_local21 = m_limitPositionImpulse2;
m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19));
_local19 = (m_limitPositionImpulse2 - _local21);
_local14 = (-(_local19) * m_u2.x);
_local15 = (-(_local19) * m_u2.y);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local2.SynchronizeTransform();
};
return ((_local23 < b2Settings.b2_linearSlop));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local4:b2Mat22;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
_local4 = _local2.m_xf.R;
var _local5:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
var _local6:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
var _local7:Number = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6));
_local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6));
_local5 = _local7;
_local4 = _local3.m_xf.R;
var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local7;
var _local10:Number = (_local2.m_sweep.c.x + _local5);
var _local11:Number = (_local2.m_sweep.c.y + _local6);
var _local12:Number = (_local3.m_sweep.c.x + _local8);
var _local13:Number = (_local3.m_sweep.c.y + _local9);
var _local14:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x);
var _local15:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y);
var _local16:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x);
var _local17:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y);
m_u1.Set((_local10 - _local14), (_local11 - _local15));
m_u2.Set((_local12 - _local16), (_local13 - _local17));
var _local18:Number = m_u1.Length();
var _local19:Number = m_u2.Length();
if (_local18 > b2Settings.b2_linearSlop){
m_u1.Multiply((1 / _local18));
} else {
m_u1.SetZero();
};
if (_local19 > b2Settings.b2_linearSlop){
m_u2.Multiply((1 / _local19));
} else {
m_u2.SetZero();
};
var _local20:Number = ((m_constant - _local18) - (m_ratio * _local19));
if (_local20 > 0){
m_state = e_inactiveLimit;
m_force = 0;
} else {
m_state = e_atUpperLimit;
m_positionImpulse = 0;
};
if (_local18 < m_maxLength1){
m_limitState1 = e_inactiveLimit;
m_limitForce1 = 0;
} else {
m_limitState1 = e_atUpperLimit;
m_limitPositionImpulse1 = 0;
};
if (_local19 < m_maxLength2){
m_limitState2 = e_inactiveLimit;
m_limitForce2 = 0;
} else {
m_limitState2 = e_atUpperLimit;
m_limitPositionImpulse2 = 0;
};
var _local21:Number = ((_local5 * m_u1.y) - (_local6 * m_u1.x));
var _local22:Number = ((_local8 * m_u2.y) - (_local9 * m_u2.x));
m_limitMass1 = (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21));
m_limitMass2 = (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22));
m_pulleyMass = (m_limitMass1 + ((m_ratio * m_ratio) * m_limitMass2));
m_limitMass1 = (1 / m_limitMass1);
m_limitMass2 = (1 / m_limitMass2);
m_pulleyMass = (1 / m_pulleyMass);
if (_arg1.warmStarting){
_local23 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.x);
_local24 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.y);
_local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.x);
_local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local23));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local24));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local24) - (_local6 * _local23))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local25));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local26));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local26) - (_local9 * _local25))));
} else {
m_force = 0;
m_limitForce1 = 0;
m_limitForce2 = 0;
};
}
override public function GetReactionTorque():Number{
return (0);
}
public function GetRatio():Number{
return (m_ratio);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local4:b2Mat22;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
_local4 = _local2.m_xf.R;
var _local5:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
var _local6:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
var _local7:Number = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6));
_local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6));
_local5 = _local7;
_local4 = _local3.m_xf.R;
var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local7;
if (m_state == e_atUpperLimit){
_local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9));
_local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8));
_local18 = (-(((m_u1.x * _local10) + (m_u1.y * _local11))) - (m_ratio * ((m_u2.x * _local12) + (m_u2.y * _local13))));
_local19 = ((-(_arg1.inv_dt) * m_pulleyMass) * _local18);
_local20 = m_force;
m_force = b2Math.b2Max(0, (m_force + _local19));
_local19 = (m_force - _local20);
_local14 = ((-(_arg1.dt) * _local19) * m_u1.x);
_local15 = ((-(_arg1.dt) * _local19) * m_u1.y);
_local16 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.x);
_local17 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
};
if (m_limitState1 == e_atUpperLimit){
_local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local18 = -(((m_u1.x * _local10) + (m_u1.y * _local11)));
_local19 = ((-(_arg1.inv_dt) * m_limitMass1) * _local18);
_local20 = m_limitForce1;
m_limitForce1 = b2Math.b2Max(0, (m_limitForce1 + _local19));
_local19 = (m_limitForce1 - _local20);
_local14 = ((-(_arg1.dt) * _local19) * m_u1.x);
_local15 = ((-(_arg1.dt) * _local19) * m_u1.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14))));
};
if (m_limitState2 == e_atUpperLimit){
_local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9));
_local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8));
_local18 = -(((m_u2.x * _local12) + (m_u2.y * _local13)));
_local19 = ((-(_arg1.inv_dt) * m_limitMass2) * _local18);
_local20 = m_limitForce2;
m_limitForce2 = b2Math.b2Max(0, (m_limitForce2 + _local19));
_local19 = (m_limitForce2 - _local20);
_local16 = ((-(_arg1.dt) * _local19) * m_u2.x);
_local17 = ((-(_arg1.dt) * _local19) * m_u2.y);
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
};
}
public function GetLength1():Number{
var _local1:b2Vec2 = m_body1.GetWorldPoint(m_localAnchor1);
var _local2:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x);
var _local3:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y);
var _local4:Number = (_local1.x - _local2);
var _local5:Number = (_local1.y - _local3);
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
public function GetLength2():Number{
var _local1:b2Vec2 = m_body2.GetWorldPoint(m_localAnchor2);
var _local2:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x);
var _local3:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y);
var _local4:Number = (_local1.x - _local2);
var _local5:Number = (_local1.y - _local3);
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
public function GetGroundAnchor1():b2Vec2{
var _local1:b2Vec2 = m_ground.m_xf.position.Copy();
_local1.Add(m_groundAnchor1);
return (_local1);
}
}
}//package Box2D.Dynamics.Joints
Section 70
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2PulleyJointDef extends b2JointDef {
public var maxLength1:Number;
public var maxLength2:Number;
public var length1:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var groundAnchor1:b2Vec2;
public var groundAnchor2:b2Vec2;
public var ratio:Number;
public var length2:Number;
public function b2PulleyJointDef(){
groundAnchor1 = new b2Vec2();
groundAnchor2 = new b2Vec2();
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_pulleyJoint;
groundAnchor1.Set(-1, 1);
groundAnchor2.Set(1, 1);
localAnchor1.Set(-1, 0);
localAnchor2.Set(1, 0);
length1 = 0;
maxLength1 = 0;
length2 = 0;
maxLength2 = 0;
ratio = 1;
collideConnected = true;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{
body1 = _arg1;
body2 = _arg2;
groundAnchor1.SetV(_arg3);
groundAnchor2.SetV(_arg4);
localAnchor1 = body1.GetLocalPoint(_arg5);
localAnchor2 = body2.GetLocalPoint(_arg6);
var _local8:Number = (_arg5.x - _arg3.x);
var _local9:Number = (_arg5.y - _arg3.y);
length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
var _local10:Number = (_arg6.x - _arg4.x);
var _local11:Number = (_arg6.y - _arg4.y);
length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
ratio = _arg7;
var _local12:Number = (length1 + (ratio * length2));
maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength));
maxLength2 = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio);
}
}
}//package Box2D.Dynamics.Joints
Section 71
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2RevoluteJoint extends b2Joint {
public var m_limitForce:Number;
public var m_pivotMass:b2Mat22;
public var m_motorForce:Number;
public var m_enableLimit:Boolean;
public var m_limitState:int;
public var m_motorMass:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
private var K1:b2Mat22;
private var K2:b2Mat22;
private var K3:b2Mat22;
private var K:b2Mat22;
public var m_pivotForce:b2Vec2;
public var m_enableMotor:Boolean;
public var m_referenceAngle:Number;
public var m_limitPositionImpulse:Number;
public var m_motorSpeed:Number;
public var m_upperAngle:Number;
public var m_lowerAngle:Number;
public var m_maxMotorTorque:Number;
public static var tImpulse:b2Vec2 = new b2Vec2();
public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){
K = new b2Mat22();
K1 = new b2Mat22();
K2 = new b2Mat22();
K3 = new b2Mat22();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_pivotForce = new b2Vec2();
m_pivotMass = new b2Mat22();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_referenceAngle = _arg1.referenceAngle;
m_pivotForce.Set(0, 0);
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
m_lowerAngle = _arg1.lowerAngle;
m_upperAngle = _arg1.upperAngle;
m_maxMotorTorque = _arg1.maxMotorTorque;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local4:b2Mat22;
var _local5:Number;
var _local10:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
_local4 = _local2.m_xf.R;
var _local6:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
var _local7:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
var _local11:Number = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local7));
var _local12:Number = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local6));
var _local13:Number = (-(_arg1.inv_dt) * ((m_pivotMass.col1.x * _local11) + (m_pivotMass.col2.x * _local12)));
var _local14:Number = (-(_arg1.inv_dt) * ((m_pivotMass.col1.y * _local11) + (m_pivotMass.col2.y * _local12)));
m_pivotForce.x = (m_pivotForce.x + _local13);
m_pivotForce.y = (m_pivotForce.y + _local14);
var _local15:Number = (_arg1.dt * _local13);
var _local16:Number = (_arg1.dt * _local14);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local15));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local16));
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local16) - (_local9 * _local15))));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local17 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed);
_local18 = ((-(_arg1.inv_dt) * m_motorMass) * _local17);
_local19 = m_motorForce;
m_motorForce = b2Math.b2Clamp((m_motorForce + _local18), -(m_maxMotorTorque), m_maxMotorTorque);
_local18 = (m_motorForce - _local19);
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local18));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local18));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local20 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local21 = ((-(_arg1.inv_dt) * m_motorMass) * _local20);
if (m_limitState == e_equalLimits){
m_limitForce = (m_limitForce + _local21);
} else {
if (m_limitState == e_atLowerLimit){
_local10 = m_limitForce;
m_limitForce = b2Math.b2Max((m_limitForce + _local21), 0);
_local21 = (m_limitForce - _local10);
} else {
if (m_limitState == e_atUpperLimit){
_local10 = m_limitForce;
m_limitForce = b2Math.b2Min((m_limitForce + _local21), 0);
_local21 = (m_limitForce - _local10);
};
};
};
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local21));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local21));
};
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
public function GetUpperLimit():Number{
return (m_upperAngle);
}
public function GetLowerLimit():Number{
return (m_lowerAngle);
}
public function EnableMotor(_arg1:Boolean):void{
m_enableMotor = _arg1;
}
public function GetMotorSpeed():Number{
return (m_motorSpeed);
}
override public function GetReactionForce():b2Vec2{
return (m_pivotForce);
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local6:b2Mat22;
var _local25:Number;
var _local26:Number;
var _local3:b2Body = m_body1;
var _local4:b2Body = m_body2;
var _local5:Number = 0;
_local6 = _local3.m_xf.R;
var _local7:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
var _local8:Number = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
var _local9:Number = ((_local6.col1.x * _local7) + (_local6.col2.x * _local8));
_local8 = ((_local6.col1.y * _local7) + (_local6.col2.y * _local8));
_local7 = _local9;
_local6 = _local4.m_xf.R;
var _local10:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
var _local11:Number = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local9 = ((_local6.col1.x * _local10) + (_local6.col2.x * _local11));
_local11 = ((_local6.col1.y * _local10) + (_local6.col2.y * _local11));
_local10 = _local9;
var _local12:Number = (_local3.m_sweep.c.x + _local7);
var _local13:Number = (_local3.m_sweep.c.y + _local8);
var _local14:Number = (_local4.m_sweep.c.x + _local10);
var _local15:Number = (_local4.m_sweep.c.y + _local11);
var _local16:Number = (_local14 - _local12);
var _local17:Number = (_local15 - _local13);
_local5 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17)));
var _local18:Number = _local3.m_invMass;
var _local19:Number = _local4.m_invMass;
var _local20:Number = _local3.m_invI;
var _local21:Number = _local4.m_invI;
K1.col1.x = (_local18 + _local19);
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = (_local18 + _local19);
K2.col1.x = ((_local20 * _local8) * _local8);
K2.col2.x = ((-(_local20) * _local7) * _local8);
K2.col1.y = ((-(_local20) * _local7) * _local8);
K2.col2.y = ((_local20 * _local7) * _local7);
K3.col1.x = ((_local21 * _local11) * _local11);
K3.col2.x = ((-(_local21) * _local10) * _local11);
K3.col1.y = ((-(_local21) * _local10) * _local11);
K3.col2.y = ((_local21 * _local10) * _local10);
K.SetM(K1);
K.AddM(K2);
K.AddM(K3);
K.Solve(tImpulse, -(_local16), -(_local17));
var _local22:Number = tImpulse.x;
var _local23:Number = tImpulse.y;
_local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local22));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local23));
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local7 * _local23) - (_local8 * _local22))));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local22));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local23));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local10 * _local23) - (_local11 * _local22))));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
var _local24:Number = 0;
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local25 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_referenceAngle);
_local26 = 0;
if (m_limitState == e_equalLimits){
_local2 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local26 = (-(m_motorMass) * _local2);
_local24 = b2Math.b2Abs(_local2);
} else {
if (m_limitState == e_atLowerLimit){
_local2 = (_local25 - m_lowerAngle);
_local24 = b2Math.b2Max(0, -(_local2));
_local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0);
_local26 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local26), 0);
_local26 = (m_limitPositionImpulse - _local1);
} else {
if (m_limitState == e_atUpperLimit){
_local2 = (_local25 - m_upperAngle);
_local24 = b2Math.b2Max(0, _local2);
_local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection);
_local26 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local26), 0);
_local26 = (m_limitPositionImpulse - _local1);
};
};
};
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local26));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local26));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
};
return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local24 <= b2Settings.b2_angularSlop))));
}
public function SetMotorSpeed(_arg1:Number):void{
m_motorSpeed = _arg1;
}
public function GetJointSpeed():Number{
return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity));
}
public function SetMaxMotorTorque(_arg1:Number):void{
m_maxMotorTorque = _arg1;
}
public function GetJointAngle():Number{
return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - m_referenceAngle));
}
public function GetMotorTorque():Number{
return (m_motorForce);
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local7:Number;
var _local14:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
var _local6:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
var _local10:Number = _local2.m_invMass;
var _local11:Number = _local3.m_invMass;
var _local12:Number = _local2.m_invI;
var _local13:Number = _local3.m_invI;
K1.col1.x = (_local10 + _local11);
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = (_local10 + _local11);
K2.col1.x = ((_local12 * _local7) * _local7);
K2.col2.x = ((-(_local12) * _local6) * _local7);
K2.col1.y = ((-(_local12) * _local6) * _local7);
K2.col2.y = ((_local12 * _local6) * _local6);
K3.col1.x = ((_local13 * _local9) * _local9);
K3.col2.x = ((-(_local13) * _local8) * _local9);
K3.col1.y = ((-(_local13) * _local8) * _local9);
K3.col2.y = ((_local13 * _local8) * _local8);
K.SetM(K1);
K.AddM(K2);
K.AddM(K3);
K.Invert(m_pivotMass);
m_motorMass = (1 / (_local12 + _local13));
if (m_enableMotor == false){
m_motorForce = 0;
};
if (m_enableLimit){
_local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - m_referenceAngle);
if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){
m_limitState = e_equalLimits;
} else {
if (_local14 <= m_lowerAngle){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local14 >= m_upperAngle){
if (m_limitState != e_atUpperLimit){
m_limitForce = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitForce = 0;
};
};
};
} else {
m_limitForce = 0;
};
if (_arg1.warmStarting){
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - ((_arg1.dt * _local10) * m_pivotForce.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * m_pivotForce.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * m_pivotForce.y) - (_local7 * m_pivotForce.x)) + m_motorForce) + m_limitForce)));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * m_pivotForce.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * m_pivotForce.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * m_pivotForce.y) - (_local9 * m_pivotForce.x)) + m_motorForce) + m_limitForce)));
} else {
m_pivotForce.SetZero();
m_motorForce = 0;
m_limitForce = 0;
};
m_limitPositionImpulse = 0;
}
public function EnableLimit(_arg1:Boolean):void{
m_enableLimit = _arg1;
}
override public function GetReactionTorque():Number{
return (m_limitForce);
}
public function IsLimitEnabled():Boolean{
return (m_enableLimit);
}
public function IsMotorEnabled():Boolean{
return (m_enableMotor);
}
public function SetLimits(_arg1:Number, _arg2:Number):void{
m_lowerAngle = _arg1;
m_upperAngle = _arg2;
}
}
}//package Box2D.Dynamics.Joints
Section 72
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2RevoluteJointDef extends b2JointDef {
public var upperAngle:Number;
public var enableMotor:Boolean;
public var referenceAngle:Number;
public var motorSpeed:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var enableLimit:Boolean;
public var lowerAngle:Number;
public var maxMotorTorque:Number;
public function b2RevoluteJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_revoluteJoint;
localAnchor1.Set(0, 0);
localAnchor2.Set(0, 0);
referenceAngle = 0;
lowerAngle = 0;
upperAngle = 0;
maxMotorTorque = 0;
motorSpeed = 0;
enableLimit = false;
enableMotor = false;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{
body1 = _arg1;
body2 = _arg2;
localAnchor1 = body1.GetLocalPoint(_arg3);
localAnchor2 = body2.GetLocalPoint(_arg3);
referenceAngle = (body2.GetAngle() - body1.GetAngle());
}
}
}//package Box2D.Dynamics.Joints
Section 73
//b2Body (Box2D.Dynamics.b2Body)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Contacts.*;
public class b2Body {
public var m_xf:b2XForm;
public var ball:Boolean;// = false
public var m_contactList:b2ContactEdge;
public var m_angularVelocity:Number;
public var m_shapeCount:int;
public var m_invI:Number;
public var typnum;// = ""
public var m_torque:Number;
public var m_flags:uint;
public var m_linearVelocity:b2Vec2;
public var p_typ:String;
public var m_world:b2World;
public var bw;// = "down"
public var tou:Boolean;// = false
public var sukaYa;// = false
public var m_next:b2Body;
public var m_mass:Number;
public var typ;// = "typ"
public var m_shapeList:b2Shape;
public var m_force:b2Vec2;
public var m_sweep:b2Sweep;
public var m_userData;
public var m_invMass:Number;
public var spec;// = false
public var m_prev:b2Body;
public var m_linearDamping:Number;
public var m_type:int;
public var m_angularDamping:Number;
public var mish:Boolean;// = false
public var m_sleepTime:Number;
public var m_jointList:b2JointEdge;
public var m_I:Number;
public static var e_fixedRotationFlag:uint = 64;
public static var e_frozenFlag:uint = 2;
public static var e_maxTypes:uint = 3;
public static var e_sleepFlag:uint = 8;
private static var s_massData:b2MassData = new b2MassData();
public static var e_bulletFlag:uint = 32;
public static var e_staticType:uint = 1;
public static var e_islandFlag:uint = 4;
public static var e_allowSleepFlag:uint = 16;
private static var s_xf1:b2XForm = new b2XForm();
public static var e_dynamicType:uint = 2;
public function b2Body(_arg1:b2BodyDef, _arg2:b2World){
m_xf = new b2XForm();
m_sweep = new b2Sweep();
m_linearVelocity = new b2Vec2();
m_force = new b2Vec2();
super();
m_flags = 0;
if (_arg1.isBullet){
m_flags = (m_flags | e_bulletFlag);
};
if (_arg1.fixedRotation){
m_flags = (m_flags | e_fixedRotationFlag);
};
if (_arg1.allowSleep){
m_flags = (m_flags | e_allowSleepFlag);
};
if (_arg1.isSleeping){
m_flags = (m_flags | e_sleepFlag);
};
m_world = _arg2;
m_xf.position.SetV(_arg1.position);
m_xf.R.Set(_arg1.angle);
m_sweep.localCenter.SetV(_arg1.massData.center);
m_sweep.t0 = 1;
m_sweep.a0 = (m_sweep.a = _arg1.angle);
var _local3:b2Mat22 = m_xf.R;
var _local4:b2Vec2 = m_sweep.localCenter;
m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
m_jointList = null;
m_contactList = null;
m_prev = null;
m_next = null;
m_linearDamping = _arg1.linearDamping;
m_angularDamping = _arg1.angularDamping;
m_force.Set(0, 0);
m_torque = 0;
m_linearVelocity.SetZero();
m_angularVelocity = 0;
m_sleepTime = 0;
m_invMass = 0;
m_I = 0;
m_invI = 0;
m_mass = _arg1.massData.mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
m_I = _arg1.massData.I;
};
if (m_I > 0){
m_invI = (1 / m_I);
};
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
m_userData = _arg1.userData;
m_shapeList = null;
m_shapeCount = 0;
}
public function SetLinearVelocity(_arg1:b2Vec2):void{
m_linearVelocity.SetV(_arg1);
}
public function IsSleeping():Boolean{
return (((m_flags & e_sleepFlag) == e_sleepFlag));
}
public function SynchronizeTransform():void{
m_xf.R.Set(m_sweep.a);
var _local1:b2Mat22 = m_xf.R;
var _local2:b2Vec2 = m_sweep.localCenter;
m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y)));
m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y)));
}
public function PutToSleep():void{
m_flags = (m_flags | e_sleepFlag);
m_sleepTime = 0;
m_linearVelocity.SetZero();
m_angularVelocity = 0;
m_force.SetZero();
m_torque = 0;
}
public function SetMassFromShapes():void{
var _local1:b2Shape;
if (m_world.m_lock == true){
return;
};
m_mass = 0;
m_invMass = 0;
m_I = 0;
m_invI = 0;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:b2MassData = s_massData;
_local1 = m_shapeList;
while (_local1) {
_local1.ComputeMass(_local4);
m_mass = (m_mass + _local4.mass);
_local2 = (_local2 + (_local4.mass * _local4.center.x));
_local3 = (_local3 + (_local4.mass * _local4.center.y));
m_I = (m_I + _local4.I);
_local1 = _local1.m_next;
};
if (m_mass > 0){
m_invMass = (1 / m_mass);
_local2 = (_local2 * m_invMass);
_local3 = (_local3 * m_invMass);
};
if ((((m_I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){
m_I = (m_I - (m_mass * ((_local2 * _local2) + (_local3 * _local3))));
m_invI = (1 / m_I);
} else {
m_I = 0;
m_invI = 0;
};
m_sweep.localCenter.Set(_local2, _local3);
var _local5:b2Mat22 = m_xf.R;
var _local6:b2Vec2 = m_sweep.localCenter;
m_sweep.c.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y));
m_sweep.c.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
_local1 = m_shapeList;
while (_local1) {
_local1.UpdateSweepRadius(m_sweep.localCenter);
_local1 = _local1.m_next;
};
var _local7:int = m_type;
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
if (_local7 != m_type){
_local1 = m_shapeList;
while (_local1) {
_local1.RefilterProxy(m_world.m_broadPhase, m_xf);
_local1 = _local1.m_next;
};
};
}
public function SetXForm(_arg1:b2Vec2, _arg2:Number):Boolean{
var _local3:b2Shape;
var _local7:Boolean;
if (m_world.m_lock == true){
return (true);
};
if (IsFrozen()){
return (false);
};
m_xf.R.Set(_arg2);
m_xf.position.SetV(_arg1);
var _local4:b2Mat22 = m_xf.R;
var _local5:b2Vec2 = m_sweep.localCenter;
m_sweep.c.x = ((_local4.col1.x * _local5.x) + (_local4.col2.x * _local5.y));
m_sweep.c.y = ((_local4.col1.y * _local5.x) + (_local4.col2.y * _local5.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
m_sweep.a0 = (m_sweep.a = _arg2);
var _local6:Boolean;
_local3 = m_shapeList;
while (_local3) {
_local7 = _local3.Synchronize(m_world.m_broadPhase, m_xf, m_xf);
if (_local7 == false){
_local6 = true;
break;
};
_local3 = _local3.m_next;
};
if (_local6 == true){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
_local3 = m_shapeList;
while (_local3) {
_local3.DestroyProxy(m_world.m_broadPhase);
_local3 = _local3.m_next;
};
return (false);
};
m_world.m_broadPhase.Commit();
return (true);
}
public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{
if (IsSleeping()){
WakeUp();
};
m_force.x = (m_force.x + _arg1.x);
m_force.y = (m_force.y + _arg1.y);
m_torque = (m_torque + (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x)));
}
public function SynchronizeShapes():Boolean{
var _local4:b2Shape;
var _local1:b2XForm = s_xf1;
_local1.R.Set(m_sweep.a0);
var _local2:b2Mat22 = _local1.R;
var _local3:b2Vec2 = m_sweep.localCenter;
_local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y)));
_local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y)));
var _local5:Boolean;
_local4 = m_shapeList;
while (_local4) {
_local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf);
if (_local5 == false){
break;
};
_local4 = _local4.m_next;
};
if (_local5 == false){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
_local4 = m_shapeList;
while (_local4) {
_local4.DestroyProxy(m_world.m_broadPhase);
_local4 = _local4.m_next;
};
return (false);
};
return (true);
}
public function GetAngle():Number{
return (m_sweep.a);
}
public function GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{
var _local2:b2Mat22 = m_xf.R;
var _local3:b2Vec2 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y)));
_local3.x = (_local3.x + m_xf.position.x);
_local3.y = (_local3.y + m_xf.position.y);
return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_local3.x - m_sweep.c.x)))));
}
public function GetNext():b2Body{
return (m_next);
}
public function GetMass():Number{
return (m_mass);
}
public function SetAngularVelocity(_arg1:Number):void{
m_angularVelocity = _arg1;
}
public function GetShapeList():b2Shape{
return (m_shapeList);
}
public function SetMass(_arg1:b2MassData):void{
var _local2:b2Shape;
if (m_world.m_lock == true){
return;
};
m_invMass = 0;
m_I = 0;
m_invI = 0;
m_mass = _arg1.mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
m_I = _arg1.I;
};
if (m_I > 0){
m_invI = (1 / m_I);
};
m_sweep.localCenter.SetV(_arg1.center);
var _local3:b2Mat22 = m_xf.R;
var _local4:b2Vec2 = m_sweep.localCenter;
m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
_local2 = m_shapeList;
while (_local2) {
_local2.UpdateSweepRadius(m_sweep.localCenter);
_local2 = _local2.m_next;
};
var _local5:int = m_type;
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
if (_local5 != m_type){
_local2 = m_shapeList;
while (_local2) {
_local2.RefilterProxy(m_world.m_broadPhase, m_xf);
_local2 = _local2.m_next;
};
};
}
public function IsStatic():Boolean{
return ((m_type == e_staticType));
}
public function GetWorldVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulMV(m_xf.R, _arg1));
}
public function Advance(_arg1:Number):void{
m_sweep.Advance(_arg1);
m_sweep.c.SetV(m_sweep.c0);
m_sweep.a = m_sweep.a0;
SynchronizeTransform();
}
public function GetUserData(){
return (m_userData);
}
public function GetWorldCenter():b2Vec2{
return (m_sweep.c);
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public function WakeUp():void{
m_flags = (m_flags & ~(e_sleepFlag));
m_sleepTime = 0;
}
public function GetLinearVelocityFromWorldPoint(_arg1:b2Vec2):b2Vec2{
return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_arg1.x - m_sweep.c.x)))));
}
public function GetLocalCenter():b2Vec2{
return (m_sweep.localCenter);
}
public function GetPosition():b2Vec2{
return (m_xf.position);
}
public function GetLocalVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulTMV(m_xf.R, _arg1));
}
public function IsFrozen():Boolean{
return (((m_flags & e_frozenFlag) == e_frozenFlag));
}
public function IsDynamic():Boolean{
return ((m_type == e_dynamicType));
}
public function GetInertia():Number{
return (m_I);
}
public function GetJointList():b2JointEdge{
return (m_jointList);
}
public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulXT(m_xf, _arg1));
}
public function GetXForm():b2XForm{
return (m_xf);
}
public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{
if (IsSleeping()){
WakeUp();
};
m_linearVelocity.x = (m_linearVelocity.x + (m_invMass * _arg1.x));
m_linearVelocity.y = (m_linearVelocity.y + (m_invMass * _arg1.y));
m_angularVelocity = (m_angularVelocity + (m_invI * (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x))));
}
public function GetAngularVelocity():Number{
return (m_angularVelocity);
}
public function IsConnected(_arg1:b2Body):Boolean{
var _local2:b2JointEdge = m_jointList;
while (_local2) {
if (_local2.other == _arg1){
return ((_local2.joint.m_collideConnected == false));
};
_local2 = _local2.next;
};
return (false);
}
public function CreateShape(_arg1:b2ShapeDef):b2Shape{
if (m_world.m_lock == true){
return (null);
};
var _local2:b2Shape = b2Shape.Create(_arg1, m_world.m_blockAllocator);
_local2.m_next = m_shapeList;
m_shapeList = _local2;
m_shapeCount++;
_local2.m_body = this;
_local2.CreateProxy(m_world.m_broadPhase, m_xf);
_local2.UpdateSweepRadius(m_sweep.localCenter);
return (_local2);
}
public function DestroyShape(_arg1:b2Shape):void{
if (m_world.m_lock == true){
return;
};
_arg1.DestroyProxy(m_world.m_broadPhase);
var _local2:b2Shape = m_shapeList;
var _local3:b2Shape;
var _local4:Boolean;
while (_local2 != null) {
if (_local2 == _arg1){
if (_local3){
_local3.m_next = _arg1.m_next;
} else {
m_shapeList = _arg1.m_next;
};
_local4 = true;
break;
};
_local3 = _local2;
_local2 = _local2.m_next;
};
_arg1.m_body = null;
_arg1.m_next = null;
m_shapeCount--;
b2Shape.Destroy(_arg1, m_world.m_blockAllocator);
}
public function SetBullet(_arg1:Boolean):void{
if (_arg1){
m_flags = (m_flags | e_bulletFlag);
} else {
m_flags = (m_flags & ~(e_bulletFlag));
};
}
public function IsBullet():Boolean{
return (((m_flags & e_bulletFlag) == e_bulletFlag));
}
public function AllowSleeping(_arg1:Boolean):void{
if (_arg1){
m_flags = (m_flags | e_allowSleepFlag);
} else {
m_flags = (m_flags & ~(e_allowSleepFlag));
WakeUp();
};
}
public function ApplyTorque(_arg1:Number):void{
if (IsSleeping()){
WakeUp();
};
m_torque = (m_torque + _arg1);
}
public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{
var _local2:b2Mat22 = m_xf.R;
var _local3:b2Vec2 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y)));
_local3.x = (_local3.x + m_xf.position.x);
_local3.y = (_local3.y + m_xf.position.y);
return (_local3);
}
public function GetWorld():b2World{
return (m_world);
}
public function GetLinearVelocity():b2Vec2{
return (m_linearVelocity);
}
}
}//package Box2D.Dynamics
Section 74
//b2BodyDef (Box2D.Dynamics.b2BodyDef)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
public class b2BodyDef {
public var angularDamping:Number;
public var angle:Number;
public var isSleeping:Boolean;
public var position:b2Vec2;
public var isBullet:Boolean;
public var allowSleep:Boolean;
public var userData;
public var fixedRotation:Boolean;
public var linearDamping:Number;
public var massData:b2MassData;
public function b2BodyDef(){
massData = new b2MassData();
position = new b2Vec2();
super();
massData.center.SetZero();
massData.mass = 0;
massData.I = 0;
userData = null;
position.Set(0, 0);
angle = 0;
linearDamping = 0;
angularDamping = 0;
allowSleep = true;
isSleeping = false;
fixedRotation = false;
isBullet = false;
}
}
}//package Box2D.Dynamics
Section 75
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener)
package Box2D.Dynamics {
public class b2BoundaryListener {
public function Violation(_arg1:b2Body):void{
}
}
}//package Box2D.Dynamics
Section 76
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
public class b2ContactFilter {
public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter);
;
public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{
var _local3:b2FilterData = _arg1.GetFilterData();
var _local4:b2FilterData = _arg2.GetFilterData();
if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){
return ((_local3.groupIndex > 0));
};
var _local5:Boolean = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0))));
return (_local5);
}
}
}//package Box2D.Dynamics
Section 77
//b2ContactListener (Box2D.Dynamics.b2ContactListener)
package Box2D.Dynamics {
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
public class b2ContactListener {
public function Add(_arg1:b2ContactPoint):void{
}
public function Remove(_arg1:b2ContactPoint):void{
}
public function Persist(_arg1:b2ContactPoint):void{
}
public function Result(_arg1:b2ContactResult):void{
}
}
}//package Box2D.Dynamics
Section 78
//b2ContactManager (Box2D.Dynamics.b2ContactManager)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
public class b2ContactManager extends b2PairCallback {
public var m_world:b2World;
public var m_destroyImmediate:Boolean;
public var m_nullContact:b2NullContact;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2ContactManager(){
m_nullContact = new b2NullContact();
super();
m_world = null;
m_destroyImmediate = false;
}
override public function PairRemoved(_arg1, _arg2, _arg3):void{
if (_arg3 == null){
return;
};
var _local4:b2Contact = (_arg3 as b2Contact);
if (_local4 == m_nullContact){
return;
};
Destroy(_local4);
}
public function Destroy(_arg1:b2Contact):void{
var _local7:b2Body;
var _local8:b2Body;
var _local9:Array;
var _local10:b2ContactPoint;
var _local11:int;
var _local12:b2Manifold;
var _local13:int;
var _local14:b2ManifoldPoint;
var _local15:b2Vec2;
var _local16:b2Vec2;
var _local2:b2Shape = _arg1.m_shape1;
var _local3:b2Shape = _arg1.m_shape2;
var _local4:int = _arg1.m_manifoldCount;
if ((((_local4 > 0)) && (m_world.m_contactListener))){
_local7 = _local2.m_body;
_local8 = _local3.m_body;
_local9 = _arg1.GetManifolds();
_local10 = s_evalCP;
_local10.shape1 = _arg1.m_shape1;
_local10.shape2 = _arg1.m_shape1;
_local10.friction = _arg1.m_friction;
_local10.restitution = _arg1.m_restitution;
_local11 = 0;
while (_local11 < _local4) {
_local12 = _local9[_local11];
_local10.normal.SetV(_local12.normal);
_local13 = 0;
while (_local13 < _local12.pointCount) {
_local14 = _local12.points[_local13];
_local10.position = _local7.GetWorldPoint(_local14.localPoint1);
_local15 = _local7.GetLinearVelocityFromLocalPoint(_local14.localPoint1);
_local16 = _local8.GetLinearVelocityFromLocalPoint(_local14.localPoint2);
_local10.velocity.Set((_local16.x - _local15.x), (_local16.y - _local15.y));
_local10.separation = _local14.separation;
_local10.id.key = _local14.id._key;
m_world.m_contactListener.Remove(_local10);
_local13++;
};
_local11++;
};
};
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_world.m_contactList){
m_world.m_contactList = _arg1.m_next;
};
var _local5:b2Body = _local2.m_body;
var _local6:b2Body = _local3.m_body;
if (_arg1.m_node1.prev){
_arg1.m_node1.prev.next = _arg1.m_node1.next;
};
if (_arg1.m_node1.next){
_arg1.m_node1.next.prev = _arg1.m_node1.prev;
};
if (_arg1.m_node1 == _local5.m_contactList){
_local5.m_contactList = _arg1.m_node1.next;
};
if (_arg1.m_node2.prev){
_arg1.m_node2.prev.next = _arg1.m_node2.next;
};
if (_arg1.m_node2.next){
_arg1.m_node2.next.prev = _arg1.m_node2.prev;
};
if (_arg1.m_node2 == _local6.m_contactList){
_local6.m_contactList = _arg1.m_node2.next;
};
b2Contact.Destroy(_arg1, m_world.m_blockAllocator);
m_world.m_contactCount--;
}
override public function PairAdded(_arg1, _arg2){
var _local3:b2Shape = (_arg1 as b2Shape);
var _local4:b2Shape = (_arg2 as b2Shape);
var _local5:b2Body = _local3.m_body;
var _local6:b2Body = _local4.m_body;
if (((_local5.IsStatic()) && (_local6.IsStatic()))){
return (m_nullContact);
};
if (_local3.m_body == _local4.m_body){
return (m_nullContact);
};
if (_local6.IsConnected(_local5)){
return (m_nullContact);
};
if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){
return (m_nullContact);
};
var _local7:b2Contact = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator);
if (_local7 == null){
return (m_nullContact);
};
_local3 = _local7.m_shape1;
_local4 = _local7.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
_local7.m_prev = null;
_local7.m_next = m_world.m_contactList;
if (m_world.m_contactList != null){
m_world.m_contactList.m_prev = _local7;
};
m_world.m_contactList = _local7;
_local7.m_node1.contact = _local7;
_local7.m_node1.other = _local6;
_local7.m_node1.prev = null;
_local7.m_node1.next = _local5.m_contactList;
if (_local5.m_contactList != null){
_local5.m_contactList.prev = _local7.m_node1;
};
_local5.m_contactList = _local7.m_node1;
_local7.m_node2.contact = _local7;
_local7.m_node2.other = _local5;
_local7.m_node2.prev = null;
_local7.m_node2.next = _local6.m_contactList;
if (_local6.m_contactList != null){
_local6.m_contactList.prev = _local7.m_node2;
};
_local6.m_contactList = _local7.m_node2;
m_world.m_contactCount++;
return (_local7);
}
public function Collide():void{
var _local2:b2Body;
var _local3:b2Body;
var _local1:b2Contact = m_world.m_contactList;
while (_local1) {
_local2 = _local1.m_shape1.m_body;
_local3 = _local1.m_shape2.m_body;
if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){
} else {
_local1.Update(m_world.m_contactListener);
};
_local1 = _local1.m_next;
};
}
}
}//package Box2D.Dynamics
Section 79
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw)
package Box2D.Dynamics {
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2DebugDraw {
public var m_xformScale:Number;// = 1
public var m_fillAlpha:Number;// = 1
public var m_alpha:Number;// = 1
public var m_drawFlags:uint;
public var m_lineThickness:Number;// = 1
public var m_drawScale:Number;// = 1
public var m_sprite:Sprite;
public static var e_coreShapeBit:uint = 4;
public static var e_shapeBit:uint = 1;
public static var e_centerOfMassBit:uint = 64;
public static var e_aabbBit:uint = 8;
public static var e_obbBit:uint = 16;
public static var e_pairBit:uint = 32;
public static var e_jointBit:uint = 2;
public function b2DebugDraw(){
m_drawFlags = 0;
}
public function ClearFlags(_arg1:uint):void{
m_drawFlags = (m_drawFlags & ~(_arg1));
}
public function SetFlags(_arg1:uint):void{
m_drawFlags = _arg1;
}
public function AppendFlags(_arg1:uint):void{
m_drawFlags = (m_drawFlags | _arg1);
}
public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale));
m_sprite.graphics.lineTo((_arg2.x * m_drawScale), (_arg2.y * m_drawScale));
}
public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
m_sprite.graphics.beginFill(_arg3.color, m_fillAlpha);
var _local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
m_sprite.graphics.endFill();
}
public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale));
}
public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
var _local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
}
public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg4.color, m_alpha);
m_sprite.graphics.moveTo(0, 0);
m_sprite.graphics.beginFill(_arg4.color, m_fillAlpha);
m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale));
m_sprite.graphics.endFill();
m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale));
m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * m_drawScale), ((_arg1.y + (_arg3.y * _arg2)) * m_drawScale));
}
public function GetFlags():uint{
return (m_drawFlags);
}
public function DrawXForm(_arg1:b2XForm):void{
m_sprite.graphics.lineStyle(m_lineThickness, 0xFF0000, m_alpha);
m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale));
m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col1.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col1.y)) * m_drawScale));
m_sprite.graphics.lineStyle(m_lineThickness, 0xFF00, m_alpha);
m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale));
m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col2.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col2.y)) * m_drawScale));
}
}
}//package Box2D.Dynamics
Section 80
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener)
package Box2D.Dynamics {
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.Shapes.*;
public class b2DestructionListener {
public function SayGoodbyeShape(_arg1:b2Shape):void{
}
public function SayGoodbyeJoint(_arg1:b2Joint):void{
}
}
}//package Box2D.Dynamics
Section 81
//b2Island (Box2D.Dynamics.b2Island)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2Island {
public var m_listener:b2ContactListener;
public var m_positionIterationCount:int;
public var m_bodyCapacity:int;
public var m_bodies:Array;
public var m_joints:Array;
public var m_jointCapacity:int;
public var m_contactCount:int;
public var m_contacts:Array;
public var m_contactCapacity:int;
public var m_jointCount:int;
public var m_allocator;
public var m_bodyCount:int;
private static var s_reportCR:b2ContactResult = new b2ContactResult();
public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener){
var _local6:int;
super();
m_bodyCapacity = _arg1;
m_contactCapacity = _arg2;
m_jointCapacity = _arg3;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_allocator = _arg4;
m_listener = _arg5;
m_bodies = new Array(_arg1);
_local6 = 0;
while (_local6 < _arg1) {
m_bodies[_local6] = null;
_local6++;
};
m_contacts = new Array(_arg2);
_local6 = 0;
while (_local6 < _arg2) {
m_contacts[_local6] = null;
_local6++;
};
m_joints = new Array(_arg3);
_local6 = 0;
while (_local6 < _arg3) {
m_joints[_local6] = null;
_local6++;
};
m_positionIterationCount = 0;
}
public function AddBody(_arg1:b2Body):void{
var _local2 = m_bodyCount++;
m_bodies[_local2] = _arg1;
}
public function AddJoint(_arg1:b2Joint):void{
var _local2 = m_jointCount++;
m_joints[_local2] = _arg1;
}
public function Report(_arg1:Array):void{
var _local2:b2Mat22;
var _local3:b2Vec2;
var _local5:b2Contact;
var _local6:b2ContactConstraint;
var _local7:b2ContactResult;
var _local8:b2Body;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:b2Manifold;
var _local13:int;
var _local14:b2ManifoldPoint;
var _local15:b2ContactConstraintPoint;
if (m_listener == null){
return;
};
var _local4:int;
while (_local4 < m_contactCount) {
_local5 = m_contacts[_local4];
_local6 = _arg1[_local4];
_local7 = s_reportCR;
_local7.shape1 = _local5.m_shape1;
_local7.shape2 = _local5.m_shape2;
_local8 = _local7.shape1.m_body;
_local9 = _local5.m_manifoldCount;
_local10 = _local5.GetManifolds();
_local11 = 0;
while (_local11 < _local9) {
_local12 = _local10[_local11];
_local7.normal.SetV(_local12.normal);
_local13 = 0;
while (_local13 < _local12.pointCount) {
_local14 = _local12.points[_local13];
_local15 = _local6.points[_local13];
_local7.position = _local8.GetWorldPoint(_local14.localPoint1);
_local7.normalImpulse = _local15.normalImpulse;
_local7.tangentImpulse = _local15.tangentImpulse;
_local7.id.key = _local14.id.key;
m_listener.Result(_local7);
_local13++;
};
_local11++;
};
_local4++;
};
}
public function AddContact(_arg1:b2Contact):void{
var _local2 = m_contactCount++;
m_contacts[_local2] = _arg1;
}
public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{
var _local5:int;
var _local6:b2Body;
var _local7:b2Joint;
var _local9:*;
var _local10:int;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.IsStatic()){
} else {
if (_local6.bw == "up"){
_local9 = -1;
} else {
_local9 = 1;
};
_local6.m_linearVelocity.x = (_local6.m_linearVelocity.x + (_arg1.dt * ((_local9 * _arg2.x) + (_local6.m_invMass * _local6.m_force.x))));
_local6.m_linearVelocity.y = (_local6.m_linearVelocity.y + (_arg1.dt * ((_local9 * _arg2.y) + (_local6.m_invMass * _local6.m_force.y))));
_local6.m_angularVelocity = (_local6.m_angularVelocity + ((_arg1.dt * _local6.m_invI) * _local6.m_torque));
_local6.m_force.SetZero();
_local6.m_torque = 0;
_local6.m_linearVelocity.Multiply(b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1));
_local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1));
if (_local6.m_linearVelocity.LengthSquared() > b2Settings.b2_maxLinearVelocitySquared){
_local6.m_linearVelocity.Normalize();
_local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * b2Settings.b2_maxLinearVelocity);
_local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * b2Settings.b2_maxLinearVelocity);
};
if ((_local6.m_angularVelocity * _local6.m_angularVelocity) > b2Settings.b2_maxAngularVelocitySquared){
if (_local6.m_angularVelocity < 0){
_local6.m_angularVelocity = -(b2Settings.b2_maxAngularVelocity);
} else {
_local6.m_angularVelocity = b2Settings.b2_maxAngularVelocity;
};
};
};
_local5++;
};
var _local8:b2ContactSolver = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator);
_local8.InitVelocityConstraints(_arg1);
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = m_joints[_local5];
_local7.InitVelocityConstraints(_arg1);
_local5++;
};
_local5 = 0;
while (_local5 < _arg1.maxIterations) {
_local8.SolveVelocityConstraints();
_local10 = 0;
while (_local10 < m_jointCount) {
_local7 = m_joints[_local10];
_local7.SolveVelocityConstraints(_arg1);
_local10++;
};
_local5++;
};
_local8.FinalizeVelocityConstraints();
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.IsStatic()){
} else {
_local6.m_sweep.c0.SetV(_local6.m_sweep.c);
_local6.m_sweep.a0 = _local6.m_sweep.a;
_local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x));
_local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y));
_local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity));
_local6.SynchronizeTransform();
};
_local5++;
};
if (_arg3){
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = m_joints[_local5];
_local7.InitPositionConstraints();
_local5++;
};
m_positionIterationCount = 0;
while (m_positionIterationCount < _arg1.maxIterations) {
_local11 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte);
_local12 = true;
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = m_joints[_local5];
_local13 = _local7.SolvePositionConstraints();
_local12 = ((_local12) && (_local13));
_local5++;
};
if (((_local11) && (_local12))){
break;
};
m_positionIterationCount++;
};
};
Report(_local8.m_constraints);
if (_arg4){
_local14 = Number.MAX_VALUE;
_local15 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance);
_local16 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance);
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.m_invMass == 0){
} else {
if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){
_local6.m_sleepTime = 0;
_local14 = 0;
};
if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local16)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local15)))){
_local6.m_sleepTime = 0;
_local14 = 0;
} else {
_local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt);
_local14 = b2Math.b2Min(_local14, _local6.m_sleepTime);
};
};
_local5++;
};
if (_local14 >= b2Settings.b2_timeToSleep){
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
m_bodies[_local5].m_flags = (_local6.m_flags | b2Body.e_sleepFlag);
_local6.m_linearVelocity.SetZero();
_local6.m_angularVelocity = 0;
_local5++;
};
};
};
}
public function Clear():void{
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
}
public function SolveTOI(_arg1:b2TimeStep):void{
var _local2:int;
var _local5:b2Body;
var _local6:Boolean;
var _local3:b2ContactSolver = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator);
_local2 = 0;
while (_local2 < _arg1.maxIterations) {
_local3.SolveVelocityConstraints();
_local2++;
};
_local2 = 0;
while (_local2 < m_bodyCount) {
_local5 = m_bodies[_local2];
if (_local5.IsStatic()){
} else {
_local5.m_sweep.c0.SetV(_local5.m_sweep.c);
_local5.m_sweep.a0 = _local5.m_sweep.a;
_local5.m_sweep.c.x = (_local5.m_sweep.c.x + (_arg1.dt * _local5.m_linearVelocity.x));
_local5.m_sweep.c.y = (_local5.m_sweep.c.y + (_arg1.dt * _local5.m_linearVelocity.y));
_local5.m_sweep.a = (_local5.m_sweep.a + (_arg1.dt * _local5.m_angularVelocity));
_local5.SynchronizeTransform();
};
_local2++;
};
var _local4:Number = 0.75;
_local2 = 0;
while (_local2 < _arg1.maxIterations) {
_local6 = _local3.SolvePositionConstraints(_local4);
if (_local6){
break;
};
_local2++;
};
Report(_local3.m_constraints);
}
}
}//package Box2D.Dynamics
Section 82
//b2TimeStep (Box2D.Dynamics.b2TimeStep)
package Box2D.Dynamics {
public class b2TimeStep {
public var warmStarting:Boolean;
public var positionCorrection:Boolean;
public var dt:Number;
public var maxIterations:int;
public var dtRatio:Number;
public var inv_dt:Number;
}
}//package Box2D.Dynamics
Section 83
//b2World (Box2D.Dynamics.b2World)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2World {
public var m_inv_dt0:Number;
public var m_boundaryListener:b2BoundaryListener;
public var m_contactList:b2Contact;
public var m_blockAllocator;
public var m_contactListener:b2ContactListener;
public var m_allowSleep:Boolean;
public var m_broadPhase:b2BroadPhase;
public var m_destructionListener:b2DestructionListener;
public var m_jointCount:int;
public var m_bodyCount:int;
public var m_lock:Boolean;
public var m_positionIterationCount:int;
public var m_groundBody:b2Body;
public var m_contactCount:int;
public var m_debugDraw:b2DebugDraw;
public var m_contactFilter:b2ContactFilter;
public var m_bodyList:b2Body;
public var m_stackAllocator;
public var m_jointList:b2Joint;
public var m_gravity:b2Vec2;
public var m_contactManager:b2ContactManager;
private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8);
public static var m_continuousPhysics:Boolean;
public static var m_warmStarting:Boolean;
private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6);
public static var m_positionCorrection:Boolean;
private static var s_xf:b2XForm = new b2XForm();
public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){
m_contactManager = new b2ContactManager();
super();
m_destructionListener = null;
m_boundaryListener = null;
m_contactFilter = b2ContactFilter.b2_defaultFilter;
m_contactListener = null;
m_debugDraw = null;
m_bodyList = null;
m_contactList = null;
m_jointList = null;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_positionCorrection = true;
m_warmStarting = true;
m_continuousPhysics = true;
m_allowSleep = _arg3;
m_gravity = _arg2;
m_lock = false;
m_inv_dt0 = 0;
m_contactManager.m_world = this;
m_broadPhase = new b2BroadPhase(_arg1, m_contactManager);
var _local4:b2BodyDef = new b2BodyDef();
m_groundBody = CreateBody(_local4);
}
public function DrawJoint(_arg1:b2Joint):void{
var _local11:b2PulleyJoint;
var _local12:b2Vec2;
var _local13:b2Vec2;
var _local2:b2Body = _arg1.m_body1;
var _local3:b2Body = _arg1.m_body2;
var _local4:b2XForm = _local2.m_xf;
var _local5:b2XForm = _local3.m_xf;
var _local6:b2Vec2 = _local4.position;
var _local7:b2Vec2 = _local5.position;
var _local8:b2Vec2 = _arg1.GetAnchor1();
var _local9:b2Vec2 = _arg1.GetAnchor2();
var _local10:b2Color = s_jointColor;
switch (_arg1.m_type){
case b2Joint.e_distanceJoint:
m_debugDraw.DrawSegment(_local8, _local9, _local10);
break;
case b2Joint.e_pulleyJoint:
_local11 = (_arg1 as b2PulleyJoint);
_local12 = _local11.GetGroundAnchor1();
_local13 = _local11.GetGroundAnchor2();
m_debugDraw.DrawSegment(_local12, _local8, _local10);
m_debugDraw.DrawSegment(_local13, _local9, _local10);
m_debugDraw.DrawSegment(_local12, _local13, _local10);
break;
case b2Joint.e_mouseJoint:
m_debugDraw.DrawSegment(_local8, _local9, _local10);
break;
default:
if (_local2 != m_groundBody){
m_debugDraw.DrawSegment(_local6, _local8, _local10);
};
m_debugDraw.DrawSegment(_local8, _local9, _local10);
if (_local3 != m_groundBody){
m_debugDraw.DrawSegment(_local7, _local9, _local10);
};
};
}
public function Refilter(_arg1:b2Shape):void{
_arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf);
}
public function SetDebugDraw(_arg1:b2DebugDraw):void{
m_debugDraw = _arg1;
}
public function SetContinuousPhysics(_arg1:Boolean):void{
m_continuousPhysics = _arg1;
}
public function GetProxyCount():int{
return (m_broadPhase.m_proxyCount);
}
public function DrawDebugData():void{
var _local2:int;
var _local3:b2Body;
var _local4:b2Shape;
var _local5:b2Joint;
var _local6:b2BroadPhase;
var _local11:b2XForm;
var _local15:Boolean;
var _local16:uint;
var _local17:b2Pair;
var _local18:b2Proxy;
var _local19:b2Proxy;
var _local20:b2Vec2;
var _local21:b2Vec2;
var _local22:b2Proxy;
var _local23:b2PolygonShape;
var _local24:b2OBB;
var _local25:b2Vec2;
var _local26:b2Mat22;
var _local27:b2Vec2;
var _local28:Number;
if (m_debugDraw == null){
return;
};
m_debugDraw.m_sprite.graphics.clear();
var _local1:uint = m_debugDraw.GetFlags();
var _local7:b2Vec2 = new b2Vec2();
var _local8:b2Vec2 = new b2Vec2();
var _local9:b2Vec2 = new b2Vec2();
var _local10:b2Color = new b2Color(0, 0, 0);
var _local12:b2AABB = new b2AABB();
var _local13:b2AABB = new b2AABB();
var _local14:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()];
if ((_local1 & b2DebugDraw.e_shapeBit)){
_local15 = ((_local1 & b2DebugDraw.e_coreShapeBit) == b2DebugDraw.e_coreShapeBit);
_local3 = m_bodyList;
while (_local3) {
_local11 = _local3.m_xf;
_local4 = _local3.GetShapeList();
while (_local4) {
if (_local3.IsStatic()){
DrawShape(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15);
} else {
if (_local3.IsSleeping()){
DrawShape(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15);
} else {
DrawShape(_local4, _local11, new b2Color(0.9, 0.9, 0.9), _local15);
};
};
_local4 = _local4.m_next;
};
_local3 = _local3.m_next;
};
};
if ((_local1 & b2DebugDraw.e_jointBit)){
_local5 = m_jointList;
while (_local5) {
DrawJoint(_local5);
_local5 = _local5.m_next;
};
};
if ((_local1 & b2DebugDraw.e_pairBit)){
_local6 = m_broadPhase;
_local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y));
_local10.Set(0.9, 0.9, 0.3);
_local2 = 0;
while (_local2 < b2Pair.b2_tableCapacity) {
_local16 = _local6.m_pairManager.m_hashTable[_local2];
while (_local16 != b2Pair.b2_nullPair) {
_local17 = _local6.m_pairManager.m_pairs[_local16];
_local18 = _local6.m_proxyPool[_local17.proxyId1];
_local19 = _local6.m_proxyPool[_local17.proxyId2];
_local12.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.lowerBounds[0]].value));
_local12.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.lowerBounds[1]].value));
_local12.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.upperBounds[0]].value));
_local12.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.upperBounds[1]].value));
_local13.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.lowerBounds[0]].value));
_local13.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.lowerBounds[1]].value));
_local13.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.upperBounds[0]].value));
_local13.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.upperBounds[1]].value));
_local8.x = (0.5 * (_local12.lowerBound.x + _local12.upperBound.x));
_local8.y = (0.5 * (_local12.lowerBound.y + _local12.upperBound.y));
_local9.x = (0.5 * (_local13.lowerBound.x + _local13.upperBound.x));
_local9.y = (0.5 * (_local13.lowerBound.y + _local13.upperBound.y));
m_debugDraw.DrawSegment(_local8, _local9, _local10);
_local16 = _local17.next;
};
_local2++;
};
};
if ((_local1 & b2DebugDraw.e_aabbBit)){
_local6 = m_broadPhase;
_local20 = _local6.m_worldAABB.lowerBound;
_local21 = _local6.m_worldAABB.upperBound;
_local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y));
_local10.Set(0.9, 0.3, 0.9);
_local2 = 0;
while (_local2 < b2Settings.b2_maxProxies) {
_local22 = _local6.m_proxyPool[_local2];
if (_local22.IsValid() == false){
} else {
_local12.lowerBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.lowerBounds[0]].value));
_local12.lowerBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.lowerBounds[1]].value));
_local12.upperBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.upperBounds[0]].value));
_local12.upperBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.upperBounds[1]].value));
_local14[0].Set(_local12.lowerBound.x, _local12.lowerBound.y);
_local14[1].Set(_local12.upperBound.x, _local12.lowerBound.y);
_local14[2].Set(_local12.upperBound.x, _local12.upperBound.y);
_local14[3].Set(_local12.lowerBound.x, _local12.upperBound.y);
m_debugDraw.DrawPolygon(_local14, 4, _local10);
};
_local2++;
};
_local14[0].Set(_local20.x, _local20.y);
_local14[1].Set(_local21.x, _local20.y);
_local14[2].Set(_local21.x, _local21.y);
_local14[3].Set(_local20.x, _local21.y);
m_debugDraw.DrawPolygon(_local14, 4, new b2Color(0.3, 0.9, 0.9));
};
if ((_local1 & b2DebugDraw.e_obbBit)){
_local10.Set(0.5, 0.3, 0.5);
_local3 = m_bodyList;
while (_local3) {
_local11 = _local3.m_xf;
_local4 = _local3.GetShapeList();
while (_local4) {
if (_local4.m_type != b2Shape.e_polygonShape){
} else {
_local23 = (_local4 as b2PolygonShape);
_local24 = _local23.GetOBB();
_local25 = _local24.extents;
_local14[0].Set(-(_local25.x), -(_local25.y));
_local14[1].Set(_local25.x, -(_local25.y));
_local14[2].Set(_local25.x, _local25.y);
_local14[3].Set(-(_local25.x), _local25.y);
_local2 = 0;
while (_local2 < 4) {
_local26 = _local24.R;
_local27 = _local14[_local2];
_local28 = (_local24.center.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y)));
_local14[_local2].y = (_local24.center.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y)));
_local14[_local2].x = _local28;
_local26 = _local11.R;
_local28 = (_local11.position.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y)));
_local14[_local2].y = (_local11.position.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y)));
_local14[_local2].x = _local28;
_local2++;
};
m_debugDraw.DrawPolygon(_local14, 4, _local10);
};
_local4 = _local4.m_next;
};
_local3 = _local3.m_next;
};
};
if ((_local1 & b2DebugDraw.e_centerOfMassBit)){
_local3 = m_bodyList;
while (_local3) {
_local11 = s_xf;
_local11.R = _local3.m_xf.R;
_local11.position = _local3.GetWorldCenter();
m_debugDraw.DrawXForm(_local11);
_local3 = _local3.m_next;
};
};
}
public function DestroyBody(_arg1:b2Body):void{
var _local4:b2JointEdge;
var _local5:b2Shape;
if (m_lock == true){
return;
};
var _local2:b2JointEdge = _arg1.m_jointList;
while (_local2) {
_local4 = _local2;
_local2 = _local2.next;
if (m_destructionListener){
m_destructionListener.SayGoodbyeJoint(_local4.joint);
};
DestroyJoint(_local4.joint);
};
var _local3:b2Shape = _arg1.m_shapeList;
while (_local3) {
_local5 = _local3;
_local3 = _local3.m_next;
if (m_destructionListener){
m_destructionListener.SayGoodbyeShape(_local5);
};
_local5.DestroyProxy(m_broadPhase);
b2Shape.Destroy(_local5, m_blockAllocator);
};
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_bodyList){
m_bodyList = _arg1.m_next;
};
m_bodyCount--;
}
public function SetContactFilter(_arg1:b2ContactFilter):void{
m_contactFilter = _arg1;
}
public function GetGroundBody():b2Body{
return (m_groundBody);
}
public function DrawShape(_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{
var _local6:b2CircleShape;
var _local7:b2Vec2;
var _local8:Number;
var _local9:b2Vec2;
var _local10:int;
var _local11:b2PolygonShape;
var _local12:int;
var _local13:Array;
var _local14:Array;
var _local15:Array;
var _local5:b2Color = s_coreColor;
switch (_arg1.m_type){
case b2Shape.e_circleShape:
_local6 = (_arg1 as b2CircleShape);
_local7 = b2Math.b2MulX(_arg2, _local6.m_localPosition);
_local8 = _local6.m_radius;
_local9 = _arg2.R.col1;
m_debugDraw.DrawSolidCircle(_local7, _local8, _local9, _arg3);
if (_arg4){
m_debugDraw.DrawCircle(_local7, (_local8 - b2Settings.b2_toiSlop), _local5);
};
break;
case b2Shape.e_polygonShape:
_local11 = (_arg1 as b2PolygonShape);
_local12 = _local11.GetVertexCount();
_local13 = _local11.GetVertices();
_local14 = new Array(b2Settings.b2_maxPolygonVertices);
_local10 = 0;
while (_local10 < _local12) {
_local14[_local10] = b2Math.b2MulX(_arg2, _local13[_local10]);
_local10++;
};
m_debugDraw.DrawSolidPolygon(_local14, _local12, _arg3);
if (_arg4){
_local15 = _local11.GetCoreVertices();
_local10 = 0;
while (_local10 < _local12) {
_local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]);
_local10++;
};
m_debugDraw.DrawPolygon(_local14, _local12, _local5);
};
break;
};
}
public function GetContactCount():int{
return (m_contactCount);
}
public function Solve(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local9:int;
var _local10:int;
var _local11:b2Body;
var _local12:b2ContactEdge;
var _local13:b2JointEdge;
var _local14:Boolean;
m_positionIterationCount = 0;
var _local3:b2Island = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator, m_contactListener);
_local2 = m_bodyList;
while (_local2) {
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
_local2 = _local2.m_next;
};
var _local4:b2Contact = m_contactList;
while (_local4) {
_local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag));
_local4 = _local4.m_next;
};
var _local5:b2Joint = m_jointList;
while (_local5) {
_local5.m_islandFlag = false;
_local5 = _local5.m_next;
};
var _local6:int = m_bodyCount;
var _local7:Array = new Array(_local6);
var _local8:b2Body = m_bodyList;
while (_local8) {
if ((_local8.m_flags & ((b2Body.e_islandFlag | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){
} else {
if (_local8.IsStatic()){
} else {
_local3.Clear();
_local9 = 0;
var _temp1 = _local9;
_local9 = (_local9 + 1);
var _local15 = _temp1;
_local7[_local15] = _local8;
_local8.m_flags = (_local8.m_flags | b2Body.e_islandFlag);
while (_local9 > 0) {
--_local9;
_local2 = _local7[_local9];
_local3.AddBody(_local2);
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag));
if (_local2.IsStatic()){
} else {
_local12 = _local2.m_contactList;
while (_local12) {
if ((_local12.contact.m_flags & (b2Contact.e_islandFlag | b2Contact.e_nonSolidFlag))){
} else {
if (_local12.contact.m_manifoldCount == 0){
} else {
_local3.AddContact(_local12.contact);
_local12.contact.m_flags = (_local12.contact.m_flags | b2Contact.e_islandFlag);
_local11 = _local12.other;
if ((_local11.m_flags & b2Body.e_islandFlag)){
} else {
var _temp2 = _local9;
_local9 = (_local9 + 1);
var _local16 = _temp2;
_local7[_local16] = _local11;
_local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag);
};
};
};
_local12 = _local12.next;
};
_local13 = _local2.m_jointList;
while (_local13) {
if (_local13.joint.m_islandFlag == true){
} else {
_local3.AddJoint(_local13.joint);
_local13.joint.m_islandFlag = true;
_local11 = _local13.other;
if ((_local11.m_flags & b2Body.e_islandFlag)){
} else {
var _temp3 = _local9;
_local9 = (_local9 + 1);
_local16 = _temp3;
_local7[_local16] = _local11;
_local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag);
};
};
_local13 = _local13.next;
};
};
};
_local3.Solve(_arg1, m_gravity, m_positionCorrection, m_allowSleep);
if (_local3.m_positionIterationCount > m_positionIterationCount){
m_positionIterationCount = _local3.m_positionIterationCount;
};
_local10 = 0;
while (_local10 < _local3.m_bodyCount) {
_local2 = _local3.m_bodies[_local10];
if (_local2.IsStatic()){
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
};
_local10++;
};
};
};
_local8 = _local8.m_next;
};
_local2 = m_bodyList;
while (_local2) {
if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){
} else {
if (_local2.IsStatic()){
} else {
_local14 = _local2.SynchronizeShapes();
if ((((_local14 == false)) && (!((m_boundaryListener == null))))){
m_boundaryListener.Violation(_local2);
};
};
};
_local2 = _local2.m_next;
};
m_broadPhase.Commit();
}
public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{
var _local4:Array = new Array(_arg3);
var _local5:int = m_broadPhase.QueryAABB(_arg1, _local4, _arg3);
var _local6:int;
while (_local6 < _local5) {
_arg2[_local6] = _local4[_local6];
_local6++;
};
return (_local5);
}
public function SetGravity(_arg1:b2Vec2):void{
m_gravity = _arg1;
}
public function SolveTOI(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Shape;
var _local4:b2Shape;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2ContactEdge;
var _local11:b2Contact;
var _local12:b2Contact;
var _local13:Number;
var _local14:b2Body;
var _local15:int;
var _local16:b2TimeStep;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:b2Body;
var _local21:Boolean;
var _local8:b2Island = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, 0, m_stackAllocator, m_contactListener);
var _local9:int = m_bodyCount;
var _local10:Array = new Array(_local9);
_local2 = m_bodyList;
while (_local2) {
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
_local2.m_sweep.t0 = 0;
_local2 = _local2.m_next;
};
_local11 = m_contactList;
while (_local11) {
_local11.m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag)));
_local11 = _local11.m_next;
};
while (true) {
_local12 = null;
_local13 = 1;
_local11 = m_contactList;
for (;_local11;(_local11 = _local11.m_next)) {
if ((_local11.m_flags & (b2Contact.e_slowFlag | b2Contact.e_nonSolidFlag))){
} else {
_local18 = 1;
if ((_local11.m_flags & b2Contact.e_toiFlag)){
_local18 = _local11.m_toi;
} else {
_local3 = _local11.m_shape1;
_local4 = _local11.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
if (((((_local5.IsStatic()) || (_local5.IsSleeping()))) && (((_local6.IsStatic()) || (_local6.IsSleeping()))))){
continue;
};
_local19 = _local5.m_sweep.t0;
if (_local5.m_sweep.t0 < _local6.m_sweep.t0){
_local19 = _local6.m_sweep.t0;
_local5.m_sweep.Advance(_local19);
} else {
if (_local6.m_sweep.t0 < _local5.m_sweep.t0){
_local19 = _local5.m_sweep.t0;
_local6.m_sweep.Advance(_local19);
};
};
_local18 = b2TimeOfImpact.TimeOfImpact(_local11.m_shape1, _local5.m_sweep, _local11.m_shape2, _local6.m_sweep);
if ((((_local18 > 0)) && ((_local18 < 1)))){
_local18 = (((1 - _local18) * _local19) + _local18);
if (_local18 > 1){
_local18 = 1;
};
};
_local11.m_toi = _local18;
_local11.m_flags = (_local11.m_flags | b2Contact.e_toiFlag);
};
if ((((Number.MIN_VALUE < _local18)) && ((_local18 < _local13)))){
_local12 = _local11;
_local13 = _local18;
};
};
};
if ((((_local12 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local13)))){
break;
};
_local3 = _local12.m_shape1;
_local4 = _local12.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
_local5.Advance(_local13);
_local6.Advance(_local13);
_local12.Update(m_contactListener);
_local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag));
if (_local12.m_manifoldCount == 0){
} else {
_local14 = _local5;
if (_local14.IsStatic()){
_local14 = _local6;
};
_local8.Clear();
_local15 = 0;
var _temp1 = _local15;
_local15 = (_local15 + 1);
var _local22 = _temp1;
_local10[_local22] = _local14;
_local14.m_flags = (_local14.m_flags | b2Body.e_islandFlag);
while (_local15 > 0) {
--_local15;
_local2 = _local10[_local15];
_local8.AddBody(_local2);
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag));
if (_local2.IsStatic()){
} else {
_local7 = _local2.m_contactList;
while (_local7) {
if (_local8.m_contactCount == _local8.m_contactCapacity){
} else {
if ((_local7.contact.m_flags & ((b2Contact.e_islandFlag | b2Contact.e_slowFlag) | b2Contact.e_nonSolidFlag))){
} else {
if (_local7.contact.m_manifoldCount == 0){
} else {
_local8.AddContact(_local7.contact);
_local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag);
_local20 = _local7.other;
if ((_local20.m_flags & b2Body.e_islandFlag)){
} else {
if (_local20.IsStatic() == false){
_local20.Advance(_local13);
_local20.WakeUp();
};
var _temp2 = _local15;
_local15 = (_local15 + 1);
var _local23 = _temp2;
_local10[_local23] = _local20;
_local20.m_flags = (_local20.m_flags | b2Body.e_islandFlag);
};
};
};
};
_local7 = _local7.next;
};
};
};
_local16 = new b2TimeStep();
_local16.dt = ((1 - _local13) * _arg1.dt);
_local16.inv_dt = (1 / _local16.dt);
_local16.maxIterations = _arg1.maxIterations;
_local8.SolveTOI(_local16);
_local17 = 0;
while (_local17 < _local8.m_bodyCount) {
_local2 = _local8.m_bodies[_local17];
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){
} else {
if (_local2.IsStatic()){
} else {
_local21 = _local2.SynchronizeShapes();
if ((((_local21 == false)) && (!((m_boundaryListener == null))))){
m_boundaryListener.Violation(_local2);
};
_local7 = _local2.m_contactList;
while (_local7) {
_local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag));
_local7 = _local7.next;
};
};
};
_local17++;
};
_local17 = 0;
while (_local17 < _local8.m_contactCount) {
_local11 = _local8.m_contacts[_local17];
_local8.m_contacts[_local17].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag)));
_local17++;
};
m_broadPhase.Commit();
};
};
}
public function GetJointList():b2Joint{
return (m_jointList);
}
public function GetBodyList():b2Body{
return (m_bodyList);
}
public function GetPairCount():int{
return (m_broadPhase.m_pairManager.m_pairCount);
}
public function Validate():void{
m_broadPhase.Validate();
}
public function SetWarmStarting(_arg1:Boolean):void{
m_warmStarting = _arg1;
}
public function SetPositionCorrection(_arg1:Boolean):void{
m_positionCorrection = _arg1;
}
public function CreateJoint(_arg1:b2JointDef):b2Joint{
var _local3:b2Body;
var _local4:b2Shape;
var _local2:b2Joint = b2Joint.Create(_arg1, m_blockAllocator);
_local2.m_prev = null;
_local2.m_next = m_jointList;
if (m_jointList){
m_jointList.m_prev = _local2;
};
m_jointList = _local2;
m_jointCount++;
_local2.m_node1.joint = _local2;
_local2.m_node1.other = _local2.m_body2;
_local2.m_node1.prev = null;
_local2.m_node1.next = _local2.m_body1.m_jointList;
if (_local2.m_body1.m_jointList){
_local2.m_body1.m_jointList.prev = _local2.m_node1;
};
_local2.m_body1.m_jointList = _local2.m_node1;
_local2.m_node2.joint = _local2;
_local2.m_node2.other = _local2.m_body1;
_local2.m_node2.prev = null;
_local2.m_node2.next = _local2.m_body2.m_jointList;
if (_local2.m_body2.m_jointList){
_local2.m_body2.m_jointList.prev = _local2.m_node2;
};
_local2.m_body2.m_jointList = _local2.m_node2;
if (_arg1.collideConnected == false){
_local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2;
_local4 = _local3.m_shapeList;
while (_local4) {
_local4.RefilterProxy(m_broadPhase, _local3.m_xf);
_local4 = _local4.m_next;
};
};
return (_local2);
}
public function DestroyJoint(_arg1:b2Joint):void{
var _local5:b2Body;
var _local6:b2Shape;
var _local2:Boolean = _arg1.m_collideConnected;
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_jointList){
m_jointList = _arg1.m_next;
};
var _local3:b2Body = _arg1.m_body1;
var _local4:b2Body = _arg1.m_body2;
_local3.WakeUp();
_local4.WakeUp();
if (_arg1.m_node1.prev){
_arg1.m_node1.prev.next = _arg1.m_node1.next;
};
if (_arg1.m_node1.next){
_arg1.m_node1.next.prev = _arg1.m_node1.prev;
};
if (_arg1.m_node1 == _local3.m_jointList){
_local3.m_jointList = _arg1.m_node1.next;
};
_arg1.m_node1.prev = null;
_arg1.m_node1.next = null;
if (_arg1.m_node2.prev){
_arg1.m_node2.prev.next = _arg1.m_node2.next;
};
if (_arg1.m_node2.next){
_arg1.m_node2.next.prev = _arg1.m_node2.prev;
};
if (_arg1.m_node2 == _local4.m_jointList){
_local4.m_jointList = _arg1.m_node2.next;
};
_arg1.m_node2.prev = null;
_arg1.m_node2.next = null;
b2Joint.Destroy(_arg1, m_blockAllocator);
m_jointCount--;
if (_local2 == false){
_local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4;
_local6 = _local5.m_shapeList;
while (_local6) {
_local6.RefilterProxy(m_broadPhase, _local5.m_xf);
_local6 = _local6.m_next;
};
};
}
public function SetContactListener(_arg1:b2ContactListener):void{
m_contactListener = _arg1;
}
public function CreateBody(_arg1:b2BodyDef):b2Body{
if (m_lock == true){
return (null);
};
var _local2:b2Body = new b2Body(_arg1, this);
_local2.m_prev = null;
_local2.m_next = m_bodyList;
if (m_bodyList){
m_bodyList.m_prev = _local2;
};
m_bodyList = _local2;
m_bodyCount++;
return (_local2);
}
public function SetBoundaryListener(_arg1:b2BoundaryListener):void{
m_boundaryListener = _arg1;
}
public function SetDestructionListener(_arg1:b2DestructionListener):void{
m_destructionListener = _arg1;
}
public function Step(_arg1:Number, _arg2:int):void{
m_lock = true;
var _local3:b2TimeStep = new b2TimeStep();
_local3.dt = _arg1;
_local3.maxIterations = _arg2;
if (_arg1 > 0){
_local3.inv_dt = (1 / _arg1);
} else {
_local3.inv_dt = 0;
};
_local3.dtRatio = (m_inv_dt0 * _arg1);
_local3.positionCorrection = m_positionCorrection;
_local3.warmStarting = m_warmStarting;
m_contactManager.Collide();
if (_local3.dt > 0){
Solve(_local3);
};
if (((m_continuousPhysics) && ((_local3.dt > 0)))){
SolveTOI(_local3);
};
DrawDebugData();
m_inv_dt0 = _local3.inv_dt;
m_lock = false;
}
public function GetBodyCount():int{
return (m_bodyCount);
}
public function GetJointCount():int{
return (m_jointCount);
}
}
}//package Box2D.Dynamics
Section 84
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
public class AdLoader extends Sprite {
private var cpmstarLoader:Loader;
private var contentspotid:String;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
private function addedHandler(_arg1:Event):void{
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
var _local2 = "http://server.cpmstar.com/adviewas3.swf";
var _local3:DisplayObjectContainer = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
}
}//package CPMStar
Section 85
//ClassChareLevel (EditorLevels.ClassChareLevel)
package EditorLevels {
import flash.events.*;
import flash.display.*;
import Badges.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
public class ClassChareLevel extends Sprite {
public const CLOSE:String = "CLOSE";
public const LINK_READY:String = "LINK_READY";
private var buttonCopy:SimpleButton;
private var movie:MovieClip;
private var strLink:String;
private var buttonOK:SimpleButton;
private var windowCaption:TextField;
private var buttonCANCEL:SimpleButton;
private var objectControlBadges:ClassControllBadges;
private var windowText:TextField;
public function ClassChareLevel(_arg1:String, _arg2:String){
var _local3:Class = Ragdoll_3.swfMovies.getAssetClass("shareLevel");
movie = new (_local3);
buttonOK = (movie as Object).but_ok;
buttonCopy = (movie as Object).but_copy;
buttonCANCEL = (movie as Object).but_cancel;
buttonCANCEL.addEventListener(MouseEvent.CLICK, closeShare);
buttonOK.visible = false;
buttonCopy.visible = false;
windowText = (movie as Object).message;
windowCaption = (movie as Object).caption;
windowText.text = "Wait a moment, please...";
(movie.tck as TextField).text = "";
addChild(movie);
addEventListener(LINK_READY, showLinkNow);
getWebLink(_arg1, _arg2);
}
private function copyLinck(_arg1:MouseEvent):void{
windowText.setSelection(0, 10000);
windowText.alwaysShowSelection = true;
System.setClipboard(windowText.text);
}
private function linkHandler(_arg1:TextEvent):void{
movie.removeEventListener(TextEvent.LINK, linkHandler);
navigateToURL(new URLRequest(_arg1.text), "_blank");
}
private function convertStrIn16(_arg1:String):String{
var _local4:String;
var _local2 = "c";
var _local3:Number = 1;
while (_local3 < (_arg1.length - 1)) {
_local4 = _arg1.charCodeAt(_local3).toString(16);
if (_local4.length == 2){
_local2 = (_local2 + _arg1.charCodeAt(_local3).toString(16));
};
_local3++;
};
_local2 = (_local2 + "o");
return (_local2);
}
public function closeShare(_arg1:Event):void{
copyLinck(null);
if (objectControlBadges){
objectControlBadges.destroy();
};
objectControlBadges = null;
buttonOK.removeEventListener(MouseEvent.CLICK, closeShare);
buttonCANCEL.removeEventListener(MouseEvent.CLICK, closeShare);
buttonCopy.removeEventListener(MouseEvent.CLICK, copyLinck);
movie.removeEventListener(TextEvent.LINK, linkHandler);
movie.removeChild(buttonOK);
movie.removeChild(windowText);
removeChild(movie);
movie = null;
dispatchEvent(new Event(CLOSE));
}
private function gettingLinkComplete(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
strLink = _local2.data;
dispatchEvent(new Event(LINK_READY));
}
private function getWebLink(_arg1:String, _arg2:String):void{
var _local3:URLRequest = new URLRequest(_arg2);
var _local4:URLVariables = new URLVariables();
_arg1 = (("c" + _arg1) + "o");
_arg1 = convertStrIn16(_arg1);
_local4.level = _arg1;
_local3.data = _local4;
_local3.method = URLRequestMethod.POST;
var _local5:URLLoader = new URLLoader();
_local5.dataFormat = URLLoaderDataFormat.TEXT;
_local5.addEventListener(Event.COMPLETE, gettingLinkComplete);
_local5.load(_local3);
}
private function showLinkNow(_arg1:Event):void{
buttonCANCEL.visible = false;
buttonOK.addEventListener(MouseEvent.CLICK, closeShare);
var _local2:TextFormat = new TextFormat();
if (strLink != "error"){
buttonOK.x = 473;
buttonCopy.visible = true;
buttonOK.visible = true;
buttonCopy.addEventListener(MouseEvent.CLICK, copyLinck);
_local2.underline = true;
_local2.size = 11;
_local2.color = 0xFF;
windowText.selectable = true;
windowText.background = true;
windowText.backgroundColor = 0xFFFFFF;
windowText.border = true;
windowText.borderColor = 0;
windowCaption.text = "YOUR LEVEL LINK";
windowText.htmlText = (((("<a href=\"event:" + strLink) + "\">") + strLink) + "</a>");
movie.addEventListener(TextEvent.LINK, linkHandler);
(movie.tck as TextField).text = "Click the link to play this level:";
objectControlBadges = new ClassControllBadges((movie as Sprite));
objectControlBadges.updateBadges(-1, ClassInformGame.EVENT_CREATE_LEVEL);
ClassLinks.goToLink("CreateAndShare", strLink);
} else {
buttonOK.visible = true;
windowText.text = "WRONG CODE LEVEL";
};
windowText.setTextFormat(_local2);
}
}
}//package EditorLevels
Section 86
//ClassCopySeveralMovie (EditorLevels.ClassCopySeveralMovie)
package EditorLevels {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class ClassCopySeveralMovie extends Sprite {
public const MOUSE_UP:String = "";
private var contForAllSeveral:MovieClip;
private var contTela:MovieClip;
private var startYForContCopy:Number;
private var startXForContCopy:Number;
private var movieForSelect:MovieClip;
public function ClassCopySeveralMovie(_arg1:MovieClip, _arg2:String){
startXForContCopy = mouseX;
startYForContCopy = mouseY;
super();
this.contTela = _arg1;
var _local3:Class = Ragdoll_3.swfMovies.getAssetClass(_arg2);
movieForSelect = new (_local3);
startXForContCopy = mouseX;
startYForContCopy = mouseY;
movieForSelect.x = startXForContCopy;
movieForSelect.y = startYForContCopy;
addEventListener(Event.ADDED_TO_STAGE, setListeners);
}
private function MouseUp(_arg1:MouseEvent):void{
var _local3:MovieClip;
var _local4:Number;
var _local5:int;
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, resizeContForCopy);
var _local2:int;
while (_local2 < contTela.numChildren) {
_local3 = (contTela.getChildAt(_local2) as MovieClip);
_local4 = movieForSelect.x;
while (_local4 < (movieForSelect.x + movieForSelect.width)) {
_local5 = movieForSelect.y;
while (_local5 < (movieForSelect.y + movieForSelect.height)) {
if ((((((_local3.toString().indexOf("fire") > -1)) && (_local3.sensor.hitTestPoint(_local4, _local5, false)))) || (((_local3.hitTestPoint(_local4, _local5, true)) && ((_local3.toString().indexOf("fire") == -1)))))){
_local3.isSelected = true;
break;
};
_local5 = (_local5 + 5);
};
if (_local3.isSelected){
break;
};
_local4 = (_local4 + 5);
};
_local2++;
};
moveMovieInTheSeveralCont(contTela, movieForSelect);
}
public function moveMovieInSeveralCont(_arg1:MovieClip):MovieClip{
var _local6:MovieClip;
var _local2:Point = new Point(movieForSelect.x, movieForSelect.y);
var _local3:Point = movieForSelect.parent.localToGlobal(_local2);
var _local4:Point = _arg1.globalToLocal(_local3);
movieForSelect.x = _local4.x;
movieForSelect.y = _local4.y;
_arg1.addChild(movieForSelect);
contForAllSeveral = new MovieClip();
contForAllSeveral.ownName = "contForAllSeveral";
var _local5:int;
while (_local5 < _arg1.numChildren) {
_local6 = (_arg1.getChildAt(_local5) as MovieClip);
if (_local6.isSelected){
contForAllSeveral.addChild(_local6);
_local6.isSelected = false;
_local5--;
};
_local5++;
};
contForAllSeveral.addChild(movieForSelect);
_arg1.addChild(contForAllSeveral);
return (contForAllSeveral);
}
private function resizeContForCopy(_arg1:MouseEvent):void{
var _local2:Number = startXForContCopy;
var _local3:Number = startYForContCopy;
if ((((mouseX < startXForContCopy)) && ((mouseY > startYForContCopy)))){
_local2 = mouseX;
_local3 = startYForContCopy;
};
if ((((mouseX < startXForContCopy)) && ((mouseY < startYForContCopy)))){
_local2 = mouseX;
_local3 = mouseY;
};
if ((((mouseX > startXForContCopy)) && ((mouseY < startYForContCopy)))){
_local2 = startXForContCopy;
_local3 = mouseY;
};
movieForSelect.x = _local2;
movieForSelect.y = _local3;
movieForSelect.width = Math.abs((startXForContCopy - mouseX));
movieForSelect.height = Math.abs((startYForContCopy - mouseY));
}
private function moveMovieInTheSeveralCont(_arg1:MovieClip, _arg2:MovieClip):void{
var _local4:MovieClip;
contForAllSeveral = new MovieClip();
contForAllSeveral.ownName = "contForAllSeveral";
var _local3:int;
while (_local3 < _arg1.numChildren) {
_local4 = (_arg1.getChildAt(_local3) as MovieClip);
if (_local4.isSelected){
contForAllSeveral.addChild(_local4);
_local4.isSelected = false;
_local3--;
};
_local3++;
};
_arg2.ownName = "contForCopyTels";
contForAllSeveral.addChild(_arg2);
_arg1.addChild(contForAllSeveral);
dispatchEvent(new Event(MOUSE_UP));
}
public function destroy():void{
while (numChildren) {
removeChildAt(0);
};
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, resizeContForCopy);
movieForSelect = null;
if (contForAllSeveral.parent){
contForAllSeveral.parent.removeChild(contForAllSeveral);
};
contForAllSeveral = null;
contTela = null;
this.parent.removeChild(this);
}
public function setNewMovieForSelect(_arg1:MovieClip):void{
this.movieForSelect = _arg1;
}
public function getContWithSeleralMovie():MovieClip{
return (contForAllSeveral);
}
private function setListeners(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, setListeners);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, resizeContForCopy);
stage.addEventListener(MouseEvent.MOUSE_MOVE, resizeContForCopy);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUp);
addChild(movieForSelect);
resizeContForCopy(null);
}
public function setContWithSeleralMovie(_arg1:MovieClip, _arg2:Boolean=false):void{
var _local5:MovieClip;
var _local6:Point;
var _local7:Point;
var _local8:Point;
var _local3:MovieClip = (_arg1.parent as MovieClip);
var _local4:int = (_arg1.numChildren - 1);
while (_local4 >= 0) {
_local5 = (_arg1.getChildAt(_local4) as MovieClip);
if (((_local5) && (!((_local5.ownName == "contForCopyTels"))))){
_local6 = new Point(_local5.x, _local5.y);
_local7 = _local5.parent.localToGlobal(_local6);
_local8 = _local3.globalToLocal(_local7);
_local5.x = _local8.x;
_local5.y = _local8.y;
if (_arg2 == true){
_local5.isSelected = true;
};
_local3.addChild(_local5);
};
_local4--;
};
_local3.removeChild(_arg1);
}
}
}//package EditorLevels
Section 87
//ClassCreate (EditorLevels.ClassCreate)
package EditorLevels {
import flash.events.*;
import flash.display.*;
import StructureGame.*;
import flash.geom.*;
import MenuGame.*;
public class ClassCreate extends Sprite {
public const TEST:String = "TEST";
public const MUSIC_OFF:String = "MUSIC_OFF";
public const SOUND_ON:String = "SOUND_ON";
public const MENU:String = "MENU";
public const MUSIC_ON:String = "MUSIC_ON";
private const NEWWINDOWS:String = "NEWWINDOWS";
public const SELECTOR:String = "SELECTOR";
private const CREATE:String = "CREATE";
public const SOUND_OFF:String = "SOUND_OFF";
private var damping:ClassDamping;
private var level:ClassLevel;
private var message:ClassMessage;
private var konstructor:ClassKonstructor;
private var menuKonstruktor:ClassMenuKonstruktor;
private var nameGame:String;
private var currentEvent:String;
private var doLevel:ClassDoLevel;
private var shareObgects:ClassShareObgects;
private var isSoundPlay:Boolean;
private var isMusicPlay:Boolean;
private var buttonSound:ClassButtonSound;
public static var isPush:Boolean;
public static var arrUndo:Array = [];
private static var wasChangeOnLevel:Boolean = false;
private static var rezhim:String;
public function ClassCreate(){
damping = ClassDamping.getInstance();
super();
}
public function destroy(_arg1:Boolean=true):void{
message = null;
shareObgects.destroy();
buttonSound.removeEventListener(buttonSound.EVENT_PRESS, eventFromSoundMusic);
buttonSound = null;
konstructor.removeEventListener(konstructor.TELO_PEREDANO, putMovieFromKonstrOnLevel);
konstructor.removeEventListener(konstructor.CHANGE_GABARITS, setGabaritsTeloOnLevel);
konstructor.removeEventListener(konstructor.CHANGE_FON, setChangeFon);
konstructor.destroy();
removeChild(konstructor);
level.removeEventListener(level.TELO_VYBRANO, pressOnTelo);
level.removeEventListener(level.PRESS_ON_LEVEL, pressOnLevel);
level.removeEventListener(level.LEVEL_CHANGE, levelChange);
level.removeEventListener(level.TEST, goTest);
level.removeEventListener(level.LOOK_KOORD_MOVIE_TELO, getOutKonstruktor);
level.destroy();
removeChild(level);
doLevel.destroy();
menuKonstruktor.removeEventListener(menuKonstruktor.TEST, goTest);
menuKonstruktor.removeEventListener(menuKonstruktor.CLEAR, goClear);
menuKonstruktor.removeEventListener(menuKonstruktor.SAVE, goSAVE);
menuKonstruktor.removeEventListener(menuKonstruktor.SEND, goSEND);
menuKonstruktor.addEventListener(menuKonstruktor.SHARE, goShare);
menuKonstruktor.removeEventListener(menuKonstruktor.LOAD, goLOAD);
menuKonstruktor.removeEventListener(menuKonstruktor.MENU, goMenu);
menuKonstruktor.removeEventListener(menuKonstruktor.SELECTOR, goSelector);
menuKonstruktor.removeEventListener(menuKonstruktor.UNDO, goUndo);
menuKonstruktor.removeEventListener(menuKonstruktor.TUTORIAL, goTutoroal);
menuKonstruktor.destroy();
removeChild(menuKonstruktor);
shareObgects = null;
doLevel = null;
level = null;
konstructor = null;
menuKonstruktor = null;
while (numChildren) {
removeChildAt(0);
};
}
private function musicOff(_arg1:Event):void{
isMusicPlay = false;
extinction(MUSIC_OFF);
}
private function soundOff(_arg1:Event):void{
isSoundPlay = false;
extinction(SOUND_OFF);
}
private function goMenuNo(_arg1:Event):void{
level.isStopAll = false;
rezhim = CREATE;
message.removeEventListener(message.PRESS_OK, goMenuOk);
message.removeEventListener(message.PRESS_CANCEL, goMenuNo);
message.destroy();
}
private function closeNEWWINDOW(_arg1:Event):void{
level.isStopAll = false;
shareObgects.removeEventListener(shareObgects.NAME_LEVEL_READY, writeNameLevelInMenuAndMovie);
shareObgects.removeEventListener(shareObgects.CLOSE, closeNEWWINDOW);
shareObgects.removeEventListener(shareObgects.LOAD_OK, loadNewLevel);
removeChild(shareObgects);
stage.focus = level.stage;
rezhim = CREATE;
}
private function goSelectorNo(_arg1:Event):void{
level.isStopAll = false;
rezhim = CREATE;
message.removeEventListener(message.PRESS_OK, goSelectorOk);
message.removeEventListener(message.PRESS_CANCEL, goSelectorNo);
message.destroy();
}
private function putMovieFromKonstrOnLevel(_arg1:Event):void{
level.addTelo(konstructor.selectedTelo);
}
private function writeNameLevelInMenuAndMovie(_arg1:Event):void{
var _local2:String = shareObgects.getNameLevel();
var _local3:String = shareObgects.getNickName();
menuKonstruktor.setLevelName(("level: " + _local2));
menuKonstruktor.setNickName(("created by " + _local3));
var _local4:MovieClip = level.getMovieLevel();
_local4.nameLevel = _local2;
_local4.nickLevel = _local3;
wasChangeOnLevel = false;
}
private function pressOnLevel(_arg1:Event):void{
level.noFlash();
konstructor.hideGabarits();
}
private function goMenuOk(_arg1:Event):void{
if (wasChangeOnLevel){
goMenuNo(_arg1);
};
level.unloadMovieFromSeleralMovie();
extinction(MENU);
}
private function goTest(_arg1:Event):void{
if (rezhim == this.CREATE){
rezhim = this.TEST;
level.unloadMovieFromSeleralMovie();
extinction(TEST);
};
}
private function extinction(_arg1:String):void{
this.currentEvent = _arg1;
if ((((((_arg1.indexOf("MUSIC") > -1)) || ((_arg1.indexOf("SOUND") > -1)))) || ((_arg1.indexOf("TEST") > -1)))){
extinctionCompleted(null);
return;
};
damping.action(this, damping.ACTION_EXTINCTION);
damping.addEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
}
private function goSelectorOk(_arg1:Event):void{
if (wasChangeOnLevel){
goSelectorNo(_arg1);
};
level.unloadMovieFromSeleralMovie();
extinction(SELECTOR);
}
private function extinctionCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
dispatchEvent(new Event(currentEvent));
}
private function setGabaritsTeloOnLevel(_arg1:Event):void{
level.setGabarits(konstructor.getGabarits());
}
private function appearanceCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
buttonSound.addEventListener(buttonSound.EVENT_PRESS, eventFromSoundMusic);
menuKonstruktor.addEventListener(menuKonstruktor.TEST, goTest);
menuKonstruktor.addEventListener(menuKonstruktor.CLEAR, goClear);
menuKonstruktor.addEventListener(menuKonstruktor.SAVE, goSAVE);
menuKonstruktor.addEventListener(menuKonstruktor.SEND, goSEND);
menuKonstruktor.addEventListener(menuKonstruktor.SHARE, goShare);
menuKonstruktor.addEventListener(menuKonstruktor.LOAD, goLOAD);
menuKonstruktor.addEventListener(menuKonstruktor.MENU, goMenu);
menuKonstruktor.addEventListener(menuKonstruktor.SELECTOR, goSelector);
menuKonstruktor.addEventListener(menuKonstruktor.UNDO, goUndo);
menuKonstruktor.addEventListener(menuKonstruktor.TUTORIAL, goTutoroal);
level.addEventListener(level.TELO_VYBRANO, pressOnTelo);
level.addEventListener(level.PRESS_ON_LEVEL, pressOnLevel);
level.addEventListener(level.LEVEL_CHANGE, levelChange);
level.addEventListener(level.TEST, goTest);
level.addEventListener(level.LOOK_KOORD_MOVIE_TELO, getOutKonstruktor);
konstructor.addEventListener(konstructor.TELO_PEREDANO, putMovieFromKonstrOnLevel);
konstructor.addEventListener(konstructor.CHANGE_GABARITS, setGabaritsTeloOnLevel);
konstructor.addEventListener(konstructor.CHANGE_FON, setChangeFon);
}
public function getStrLevel():XML{
var _local1:MovieClip = level.getMovieLevel();
var _local2:XML = doLevel.makeStrLevelFromMovie(_local1);
return (_local2);
}
private function setChangeFon(_arg1:Event):void{
level.changeFon(konstructor.getNameFon());
}
private function goClear(_arg1:Event):void{
if (this.CREATE){
level.unloadMovieFromSeleralMovie();
level.clearAll();
konstructor.hideGabarits();
};
}
private function goLOAD(_arg1:Event):void{
rezhim = NEWWINDOWS;
level.isStopAll = true;
level.unloadMovieFromSeleralMovie();
addChild(shareObgects);
shareObgects.loadLevel();
shareObgects.addEventListener(shareObgects.CLOSE, closeNEWWINDOW);
shareObgects.addEventListener(shareObgects.LOAD_OK, loadNewLevel);
}
private function getOutKonstruktor(_arg1:Event):void{
konstructor.hideKonstructor(level.getKoordCurentTelo());
}
private function levelChange(_arg1:Event):void{
var _local2:XML = doLevel.makeStrLevelFromMovie(level.getMovieLevel());
if (_local2 != arrUndo[(arrUndo.length - 1)]){
wasChangeOnLevel = true;
isPush = true;
arrUndo.push(_local2);
if (arrUndo.length > 100){
arrUndo.splice(0, 1);
};
};
}
private function soundOn(_arg1:Event):void{
isSoundPlay = true;
extinction(SOUND_ON);
}
private function pressOnTelo(_arg1:Event):void{
level.noFlash();
var _local2:MovieClip = level.getSelectedTelo();
if (!level.isSelectSeveralTels){
konstructor.showGabarits(_local2);
};
if (_local2.toString().indexOf("revolute_motor") > -1){
konstructor.rotationToSpeed();
} else {
konstructor.speedToRotation();
};
}
private function goShare(_arg1:Event):void{
var urlGame:String;
var objectChareLevel:ClassChareLevel;
var closeChareLevel:Function;
var e = _arg1;
closeChareLevel = function (_arg1:Event):void{
objectChareLevel.removeEventListener(objectChareLevel.CLOSE, closeChareLevel);
removeChild(objectChareLevel);
objectChareLevel = null;
level.isStopAll = false;
rezhim = CREATE;
stage.focus = level.stage;
};
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
urlGame = "http://www.bubblebox.com/scripts/coverorange/_rc3LinkLevel_.php";
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
urlGame = "http://www.bubblebox.com/scripts/coverorange/_rpc3LinkLevel_.php";
};
objectChareLevel = new ClassChareLevel(getStrLevel().toString(), urlGame);
addChild(objectChareLevel);
rezhim = NEWWINDOWS;
level.isStopAll = true;
level.unloadMovieFromSeleralMovie();
objectChareLevel.addEventListener(objectChareLevel.CLOSE, closeChareLevel);
}
private function eventFromSoundMusic(_arg1:Event):void{
switch (buttonSound.EVENT_PressButton){
case buttonSound.SOUND_OFF:
soundOff(_arg1);
break;
case buttonSound.SOUND_ON:
soundOn(_arg1);
break;
case buttonSound.MUSIC_ON:
musicOn(_arg1);
break;
case buttonSound.MUSIC_OFF:
musicOff(_arg1);
break;
};
}
private function loadNewLevel(_arg1:Event):void{
closeNEWWINDOW(_arg1);
var _local2:XML = shareObgects.getTekXmlLevel();
this.destroy(false);
wasChangeOnLevel = false;
startCreate(_local2, nameGame, false);
}
private function goMenu(_arg1:Event):void{
if (wasChangeOnLevel == true){
message.show(this, "The level will be cleared! Be sure you saved it.", message.msOkCancel);
message.addEventListener(message.PRESS_OK, goMenuOk);
message.addEventListener(message.PRESS_CANCEL, goMenuNo);
rezhim = this.NEWWINDOWS;
level.isStopAll = true;
} else {
goMenuOk(_arg1);
};
}
private function musicOn(_arg1:Event):void{
isMusicPlay = true;
extinction(MUSIC_ON);
}
private function goTutoroal(_arg1:Event):void{
ClassLinks.goToLink("tutorial");
}
private function goSelector(_arg1:Event):void{
if (wasChangeOnLevel == true){
message.show(this, "The level will be cleared! Be sure you saved it.", message.msOkCancel);
message.addEventListener(message.PRESS_OK, goSelectorOk);
message.addEventListener(message.PRESS_CANCEL, goSelectorNo);
rezhim = this.NEWWINDOWS;
level.isStopAll = true;
} else {
goSelectorOk(_arg1);
};
}
private function goSEND(_arg1:Event):void{
}
private function goUndo(_arg1:Event):void{
var _local2:XML;
if (arrUndo.length > 0){
level.unloadMovieFromSeleralMovie();
if (isPush){
arrUndo.pop();
isPush = false;
};
if (arrUndo.length == 1){
_local2 = arrUndo[0];
};
if (arrUndo.length > 1){
_local2 = arrUndo.pop();
};
this.destroy(false);
startCreate(_local2, nameGame, false, isMusicPlay, isSoundPlay);
};
}
private function goSAVE(_arg1:Event):void{
rezhim = NEWWINDOWS;
level.isStopAll = true;
level.unloadMovieFromSeleralMovie();
var _local2:MovieClip = level.getMovieLevel();
var _local3:XML = doLevel.makeStrLevelFromMovie(_local2);
addChild(shareObgects);
shareObgects.saveLevel(_local3, doLevel.getNumLevel(_local3), doLevel.getNameLevel(_local3), doLevel.getNickLevel(_local3));
shareObgects.addEventListener(shareObgects.CLOSE, closeNEWWINDOW);
shareObgects.addEventListener(shareObgects.NAME_LEVEL_READY, writeNameLevelInMenuAndMovie);
}
public function startCreate(_arg1:XML, _arg2:String, _arg3:Boolean=true, _arg4:Boolean=true, _arg5:Boolean=true):void{
if (rezhim != TEST){
wasChangeOnLevel = false;
};
isMusicPlay = _arg4;
isSoundPlay = _arg5;
rezhim = CREATE;
message = new ClassMessage();
shareObgects = new ClassShareObgects();
doLevel = new ClassDoLevel();
var _local6:MovieClip = doLevel.makeMovieLevelFromStr(_arg1);
level = new ClassLevel(_local6, _arg2);
addChild(level);
menuKonstruktor = new ClassMenuKonstruktor();
menuKonstruktor.setLevelName(("level: " + _local6.nameLevel));
menuKonstruktor.setNickName(("created by " + _local6.nickLevel));
addChild(menuKonstruktor);
buttonSound = new ClassButtonSound(new Point(133.6, 431.4), new Point(167.6, 431.4), false, 0.55);
buttonSound.setPosition(isMusicPlay, isSoundPlay);
addChild(buttonSound);
konstructor = new ClassKonstructor(_arg2);
konstructor.setFon(_local6.fon);
addChild(konstructor);
if (_arg3){
damping.action(this, damping.ACTION_APPEARANCE, 0.07);
damping.addEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
} else {
appearanceCompleted(null);
};
}
}
}//package EditorLevels
Section 88
//ClassDoLevel (EditorLevels.ClassDoLevel)
package EditorLevels {
import flash.display.*;
import Tela.*;
import flash.xml.*;
public class ClassDoLevel {
private var isGoodHeroHere:Boolean;// = false
private var contFon:MovieClip;
private var movieLevel:MovieClip;
private var contTela:MovieClip;
private var xmlLevel:XML;
public function parseLevel(_arg1:MovieClip):Array{
var _local9:MovieClip;
var _local10:String;
var _local11:ClassBaseBody;
var _local13:Boolean;
contOnLevel(_arg1);
var _local2:Array = [];
var _local3:Array = [];
var _local4:Array = [];
var _local5:Array = [];
var _local6:Array = [];
var _local7:Array = [_local2, _local3, _local4, _local5, _local6];
var _local8:int = contTela.numChildren;
var _local12:int;
while (_local12 < _local8) {
_local9 = (contTela.getChildAt(_local12) as MovieClip);
_local9.cacheAsBitmap = true;
_local10 = _local9.toString();
_local13 = (_local9.toString().substr((_local10.length - 3), 2) == "_d");
if (_local10.indexOf("t_c") > -1){
_local11 = new ClassTeloCircle(_local9, _local13);
};
if (_local10.indexOf("t_b") > -1){
_local11 = new ClassTeloBox(_local9, _local13);
};
if (_local10.indexOf("t_3") > -1){
_local11 = new ClassTeloTringle(_local9, _local13);
};
if (_local10.indexOf("revolute") > -1){
_local11 = new ClassRevolute(_local9);
};
if (_local10.indexOf("joint") > -1){
_local11 = new ClassJoint(_local9);
};
if (_local10.indexOf("t_o") > -1){
_local11 = new ClassBomb(_local9);
};
if (_local10.indexOf("target") > -1){
_local11 = new ClassTarget(_local9);
};
if (_local10.indexOf("t_mp") > -1){
_local11 = new ClassMovingPlatformGorizont(_local9);
};
if (_local10.indexOf("t_rol") > -1){
_local5.push(new ClassRolyPoly(_local9));
_local11 = null;
};
if (_local10.indexOf("pushka") > -1){
_local4.push(new ClassPushka(_local9));
_local11 = null;
};
if (_local10.indexOf("t_fire") > -1){
_local6.push(_local9.sensor);
_local9.gotoAndPlay(Math.round((Math.random() * 10)));
_local11 = null;
};
if (((_local11) && (_local11.nameMoive))){
if (_local11.isStatic){
_local3.push(_local11);
} else {
_local2.push(_local11);
};
};
_local12++;
};
return (_local7);
}
public function destroy():void{
movieLevel = null;
contTela = null;
contFon = null;
xmlLevel = null;
}
public function getNumLevel(_arg1:XML):Number{
var _local3:XML;
var _local2:Number = 0;
for each (_local3 in _arg1.children()) {
if (_local3.name() == "jopa"){
_local2 = _local3.attribute("numberLevel");
break;
};
};
return (_local2);
}
public function makeStrLevelFromMovie(_arg1:MovieClip):XML{
var _local5:Number;
var _local6:MovieClip;
var _local11:String;
var _local12:*;
var _local13:*;
var _local14:XMLNode;
var _local2 = "";
var _local3:XML = <xml/>
;
var _local4:Boolean;
contOnLevel(_arg1);
var _local7:String = contFon.getChildAt(0).toString().substr(12, 1);
var _local8:XMLNode = new XMLNode(1, "jopa");
_local8.attributes.numberLevel = _arg1.numberLevel;
_local8.attributes.nameLevel = _arg1.nameLevel;
_local8.attributes.nickLevel = _arg1.nickLevel;
_local8.attributes.fon = _arg1.fon;
var _local9:XMLNode = new XMLNode(1, "bodies");
var _local10:int;
while (_local10 < contTela.numChildren) {
_local6 = (contTela.getChildAt(_local10) as MovieClip);
if (_local6.toString().indexOf("goodHero") > -1){
isGoodHeroHere = true;
};
_local6.gotoAndStop(1);
_local5 = _local6.rotation;
_local6.rotation = 0;
_local11 = _local6.toString().replace("object ", "");
_local11 = _local11.substring(1, (_local11.length - 1));
_local12 = _local6.width;
_local13 = _local6.height;
_local14 = new XMLNode(1, "body");
_local14.attributes.name = _local11;
_local14.attributes.width = Math.round(_local12);
_local14.attributes.height = Math.round(_local13);
_local14.attributes.x = Math.round(_local6.x);
_local14.attributes.y = Math.round(_local6.y);
_local14.attributes.rotation = _local5;
_local9.appendChild(_local14);
_local6.rotation = _local5;
_local10++;
};
_local8.appendChild(_local9);
_local3.appendChild(_local8);
return (_local3);
}
function create_movies(){
movieLevel = new MovieClip();
contTela = new MovieClip();
contFon = new MovieClip();
}
public function getStrLevel():XML{
return (xmlLevel);
}
public function getNameLevel(_arg1:XML):String{
var _local2:String;
var _local3:XML;
for each (_local3 in _arg1.children()) {
if (_local3.name() == "jopa"){
_local2 = _local3.attribute("nameLevel");
break;
};
};
return (_local2);
}
public function makeMovieLevelFromStr(_arg1:XML, _arg2:Number=0):MovieClip{
var _local3:XMLNode;
var _local4:XML;
var _local5:XMLNode;
var _local6:XMLNode;
var _local7:String;
var _local8:Class;
var _local9:MovieClip;
var _local10:XML;
var _local11:XML;
var _local12:Class;
var _local13:MovieClip;
xmlLevel = _arg1;
sreateShablonLevel();
if (xmlLevel == null){
xmlLevel = <xml/>
;
_local3 = new XMLNode(1, "jopa");
_local3.attributes.numberLevel = _arg2;
_local3.attributes.nameLevel = "new level";
if (_arg2 > 0){
_local3.attributes.nameLevel = ("LEVEL " + _arg2.toString());
};
_local3.attributes.nickLevel = "Player";
if (_arg2 > 0){
_local3.attributes.nickLevel = "Johnny-K";
};
_local3.attributes.fon = "1";
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
_local5 = new XMLNode(1, "bodies");
_local6 = new XMLNode(1, "body");
_local6.attributes.name = "t_b2_s";
_local6.attributes.x = "3";
_local6.attributes.rotation = "90";
_local6.attributes.width = "426";
_local6.attributes.height = "10";
_local6.attributes.y = "206";
_local5.appendChild(_local6);
_local6 = new XMLNode(1, "body");
_local6.attributes.name = "t_b2_s";
_local6.attributes.x = "343";
_local6.attributes.rotation = "0";
_local6.attributes.width = "690";
_local6.attributes.height = "10";
_local6.attributes.y = "4";
_local5.appendChild(_local6);
_local6 = new XMLNode(1, "body");
_local6.attributes.name = "t_b2_s";
_local6.attributes.x = "687";
_local6.attributes.rotation = "90";
_local6.attributes.width = "426";
_local6.attributes.height = "10";
_local6.attributes.y = "208";
_local5.appendChild(_local6);
_local6 = new XMLNode(1, "body");
_local6.attributes.name = "t_b2_s";
_local6.attributes.x = "345";
_local6.attributes.rotation = "0";
_local6.attributes.width = "690";
_local6.attributes.height = "10";
_local6.attributes.y = "416";
_local5.appendChild(_local6);
_local6 = new XMLNode(1, "body");
_local6.attributes.name = "t_pushka";
_local6.attributes.x = "20";
_local6.attributes.rotation = "0";
_local6.attributes.width = "56";
_local6.attributes.height = "40";
_local6.attributes.y = "396";
_local5.appendChild(_local6);
_local3.appendChild(_local5);
};
xmlLevel.appendChild(_local3);
};
for each (_local4 in xmlLevel.children()) {
if (_local4.name() == "jopa"){
_local7 = ("fon_" + _local4.attribute("fon"));
_local8 = Ragdoll_3.swfMovies.getAssetClass(_local7);
_local9 = new (_local8);
_local9.cacheAsBitmap = true;
contFon.addChild(_local9);
movieLevel.nameLevel = _local4.attribute("nameLevel");
movieLevel.numberLevel = _local4.attribute("numberLevel");
movieLevel.nickLevel = _local4.attribute("nickLevel");
movieLevel.fon = _local4.attribute("fon");
for each (_local10 in _local4.children()) {
if (_local10.name() == "bodies"){
for each (_local11 in _local10.children()) {
if (_local11.name() == "body"){
_local12 = Ragdoll_3.swfMovies.getAssetClass(_local11.attribute("name"));
if (_local12){
_local13 = new (_local12);
_local13.x = _local11.attribute("x");
_local13.y = _local11.attribute("y");
_local13.width = _local11.attribute("width");
_local13.height = _local11.attribute("height");
_local13.rotation = _local11.attribute("rotation");
if (_local13.toString().indexOf("fire") == -1){
_local13.gotoAndStop(1);
};
_local13.cacheAsBitmap = true;
contTela.addChild(_local13);
};
};
};
};
};
};
};
return (movieLevel);
}
public function getNickLevel(_arg1:XML):String{
var _local2:String;
var _local3:XML;
for each (_local3 in _arg1.children()) {
if (_local3.name() == "jopa"){
_local2 = _local3.attribute("nickLevel");
break;
};
};
return (_local2);
}
public function contOnLevel(_arg1:MovieClip){
var _local3:MovieClip;
var _local2:int;
while (_local2 < _arg1.numChildren) {
_local3 = (_arg1.getChildAt(_local2) as MovieClip);
if (((_local3) && (_local3.hasOwnProperty("ownName")))){
if (_local3.ownName == "contTela"){
contTela = _local3;
};
if (_local3.ownName == "contFon"){
contFon = _local3;
};
};
_local2++;
};
}
public function sreateShablonLevel():MovieClip{
create_movies();
movieLevel.addChild(contFon);
movieLevel.addChild(contTela);
contFon.ownName = "contFon";
contTela.ownName = "contTela";
return (movieLevel);
}
public function setNickNameInStr(_arg1:XML, _arg2:String):XML{
_arg1.jopa.@nickLevel = _arg2;
return (_arg1);
}
public function setLevelNameInStr(_arg1:XML, _arg2:String):XML{
_arg1.jopa.@nameLevel = _arg2;
return (_arg1);
}
}
}//package EditorLevels
Section 89
//ClassKonstructor (EditorLevels.ClassKonstructor)
package EditorLevels {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class ClassKonstructor extends Sprite {
public const TELO_PEREDANO:String = "teloPeredano";
public const CHANGE_FON:String = "changeFon";
public const CHANGE_GABARITS:String = "changeGabarits";
private var selectedTeloStartX:Number;
private var selectedTeloStartY:Number;
private var movieCaption:MovieClip;
private var selectedTeloScX:Number;
private var selectedTeloScY:Number;
private var isTeloSelect:Boolean;// = false
private var isTeloOverKonstruktor:Boolean;// = false
public var selectedFon:String;
private var buttonHideWindow:MovieClip;
private var numGabSelected:int;
private var movieKonstructor:MovieClip;
private var lastKoordKonstr:Point;
private var isKonstruktorHide:Boolean;// = false
private var isCanListenMouseOverCaption:Boolean;// = true
private var textFieldRotation:TextField;
public var selectedTelo:MovieClip;
private var kontTela:MovieClip;
private var kontForMoveTela:MovieClip;
private var p:int;// = 0
private var buttonCenteWindow:MovieClip;
public function ClassKonstructor(_arg1:String){
kontTela = new MovieClip();
kontForMoveTela = new MovieClip();
lastKoordKonstr = new Point(0, 0);
super();
var _local2:Class = Ragdoll_3.swfMovies.getAssetClass("konstructor");
movieKonstructor = new (_local2);
addChild(movieKonstructor);
textFieldRotation = (movieKonstructor.rotSpeed as TextField);
movieCaption = (movieKonstructor as Object).caption;
movieCaption.addEventListener(MouseEvent.MOUSE_OVER, showKonstructor);
movieCaption.addEventListener(MouseEvent.CLICK, showOrHideKonstruktor);
buttonHideWindow = (movieCaption as Object).but_hideWindow;
buttonHideWindow.gotoAndStop(1);
buttonHideWindow.addEventListener(MouseEvent.CLICK, but_hideWindowClick);
allTelsInKont();
movieKonstructor.addChild(kontTela);
addChild(kontForMoveTela);
hideGabarits();
addEventListener(Event.ADDED_TO_STAGE, setListeners);
}
public function setFon(_arg1:String):void{
(movieKonstructor as Object)[("fon_" + _arg1)].selected = true;
}
public function getNameFon():String{
return (selectedFon);
}
function getGabarits():Array{
var _local1:Array = [movieKonstructor.widthShape.value, movieKonstructor.heightShape.value, movieKonstructor.rotationShape.value, numGabSelected];
return (_local1);
}
private function but_hideWindowClick(_arg1:MouseEvent):void{
if (buttonHideWindow.currentFrame == 1){
lastKoordKonstr = new Point(0, 0);
hideKonstructor();
};
}
private function fonsChange(_arg1:MouseEvent):void{
var _local2:String;
if (_arg1.target.toString().indexOf("RadioButton") > -1){
_local2 = _arg1.target.name;
if (_local2 != selectedFon){
selectedFon = _local2;
dispatchEvent(new Event(CHANGE_FON));
};
};
}
private function mouseMove(_arg1:MouseEvent):void{
bigSmall();
teloOverKonstruktorOrNot();
}
public function rotationToSpeed():void{
textFieldRotation.text = "rotational speed";
}
function selectedTeloMouseUp(_arg1:MouseEvent){
stage.removeEventListener(MouseEvent.MOUSE_UP, selectedTeloMouseUp);
selectedTelo.stopDrag();
kontForMoveTela.removeChild(selectedTelo);
if (!isTeloOverKonstruktor){
dispatchEvent(new Event(TELO_PEREDANO));
};
showKonstructor(_arg1);
selectedTelo = null;
isTeloSelect = false;
}
public function speedToRotation():void{
textFieldRotation.text = "rotation";
}
private function mouseOutFromCaption(_arg1:Event):void{
p++;
if (p > 20){
removeEventListener(Event.ENTER_FRAME, mouseOutFromCaption);
isCanListenMouseOverCaption = true;
p = 0;
};
}
private function changeWidthEvent(_arg1:Event):void{
numGabSelected = 0;
dispatchEvent(new Event(CHANGE_GABARITS));
}
private function showKonstructor(_arg1:MouseEvent):void{
if ((((movieKonstructor.y == -300)) && (isCanListenMouseOverCaption))){
movieCaption.alpha = 1;
buttonHideWindow.gotoAndStop(1);
movieKonstructor.addChild(movieCaption);
movieKonstructor.y = lastKoordKonstr.y;
movieKonstructor.x = lastKoordKonstr.x;
isKonstruktorHide = false;
};
}
function konstrSelect(_arg1:MouseEvent){
var selectedKonstrMouseUp:Function;
var e = _arg1;
selectedKonstrMouseUp = function (_arg1:MouseEvent){
stage.removeEventListener(MouseEvent.MOUSE_UP, selectedKonstrMouseUp);
movieKonstructor.stopDrag();
if (movieKonstructor.y != -300){
lastKoordKonstr.x = movieKonstructor.x;
lastKoordKonstr.y = movieKonstructor.y;
};
};
if ((((e.target.toString().indexOf("captionWindow") > -1)) && (!(isKonstruktorHide)))){
movieKonstructor.startDrag();
stage.removeEventListener(MouseEvent.MOUSE_UP, selectedKonstrMouseUp);
stage.addEventListener(MouseEvent.MOUSE_UP, selectedKonstrMouseUp);
};
}
private function allTelsInKont():void{
var _local2:MovieClip;
var _local1:int;
while (_local1 < movieKonstructor.numChildren) {
_local2 = (movieKonstructor.getChildAt(_local1) as MovieClip);
if (((_local2) && ((((((_local2.toString().indexOf("t_") > -1)) || ((_local2.toString().indexOf("target") > -1)))) || ((_local2.toString().indexOf("pic_") > -1)))))){
_local2.big = false;
_local2.isTelo = true;
if (_local2.toString().indexOf("motor") == -1){
_local2.gotoAndStop(1);
};
kontTela.addChild(_local2);
_local1--;
};
_local1++;
};
}
private function changeRotEvent(_arg1:Event):void{
numGabSelected = 2;
dispatchEvent(new Event(CHANGE_GABARITS));
}
private function teloSelect():Boolean{
var _local2:MovieClip;
var _local3:String;
var _local4:Class;
var _local1:int;
while (_local1 < kontTela.numChildren) {
_local2 = (kontTela.getChildAt(_local1) as MovieClip);
if (_local2.hitTestPoint(mouseX, mouseY, true)){
isTeloSelect = true;
isTeloOverKonstruktor = true;
selectedTelo = _local2;
selectedTeloScX = selectedTelo.scaleX;
selectedTeloScY = selectedTelo.scaleY;
selectedTeloStartX = (selectedTelo.x + movieKonstructor.x);
selectedTeloStartY = (selectedTelo.y + movieKonstructor.y);
_local3 = selectedTelo.toString().substr(8, 100);
_local3 = _local3.substr(0, (_local3.length - 1));
_local4 = Ragdoll_3.swfMovies.getAssetClass(_local3);
selectedTelo = new (_local4);
selectedTelo.x = (selectedTeloStartX + 2);
selectedTelo.y = (selectedTeloStartY + 2);
selectedTelo.scaleX = selectedTeloScX;
selectedTelo.scaleY = selectedTeloScY;
kontForMoveTela.addChild(selectedTelo);
selectedTelo.startDrag();
stage.removeEventListener(MouseEvent.MOUSE_UP, selectedTeloMouseUp);
stage.addEventListener(MouseEvent.MOUSE_UP, selectedTeloMouseUp);
return (true);
};
_local1++;
};
return (false);
}
function showGabarits(_arg1:MovieClip){
movieKonstructor.widthShape.enabled = true;
movieKonstructor.heightShape.enabled = true;
movieKonstructor.rotationShape.enabled = true;
var _local2:Number = _arg1.rotation;
_arg1.rotation = 0;
movieKonstructor.widthShape.value = _arg1.width;
movieKonstructor.heightShape.value = _arg1.height;
_arg1.rotation = _local2;
movieKonstructor.rotationShape.value = _arg1.rotation;
}
private function changeHeightEvent(_arg1:Event):void{
numGabSelected = 1;
dispatchEvent(new Event(CHANGE_GABARITS));
}
function teloOverKonstruktorOrNot():void{
if (isTeloSelect){
if (movieKonstructor.hitTestPoint(mouseX, mouseY)){
selectedTelo.scaleX = selectedTeloScX;
selectedTelo.scaleY = selectedTeloScY;
isTeloOverKonstruktor = true;
} else {
if (selectedTelo.toString().indexOf("pic_") > -1){
selectedTelo.scaleX = 0.6;
selectedTelo.scaleY = 0.6;
} else {
selectedTelo.scaleX = 1;
selectedTelo.scaleY = 1;
};
isTeloOverKonstruktor = false;
movieKonstructor.y = -300;
};
};
}
public function hideKonstructor(_arg1:Point=null):void{
if ((((((_arg1 == null)) && (!((movieKonstructor.y == -300))))) || (((!((_arg1 == null))) && (movieKonstructor.hitTestPoint(_arg1.x, _arg1.y)))))){
isCanListenMouseOverCaption = false;
addChild(movieCaption);
movieCaption.alpha = 0.3;
buttonHideWindow.gotoAndStop(2);
movieKonstructor.y = -300;
if (_arg1 != null){
lastKoordKonstr = new Point(0, 0);
};
addEventListener(Event.ENTER_FRAME, mouseOutFromCaption);
isKonstruktorHide = true;
};
}
private function mouseDown(_arg1:MouseEvent):void{
teloSelect();
konstrSelect(_arg1);
fonsChange(_arg1);
}
function hideGabarits(){
movieKonstructor.widthShape.enabled = false;
movieKonstructor.heightShape.enabled = false;
movieKonstructor.rotationShape.enabled = false;
movieKonstructor.widthShape.value = 0;
movieKonstructor.heightShape.value = 0;
movieKonstructor.rotationShape.value = 0;
}
private function showOrHideKonstruktor(_arg1:MouseEvent):void{
if (!isKonstruktorHide){
};
}
private function but_centeWindowClick(_arg1:MouseEvent):void{
lastKoordKonstr = new Point(0, 0);
isCanListenMouseOverCaption = true;
showKonstructor(_arg1);
}
public function destroy():void{
var _local1:*;
removeEventListener(Event.ENTER_FRAME, mouseOutFromCaption);
movieCaption.removeEventListener(MouseEvent.MOUSE_OVER, showKonstructor);
movieCaption.removeEventListener(MouseEvent.CLICK, showOrHideKonstruktor);
buttonHideWindow.removeEventListener(MouseEvent.CLICK, but_hideWindowClick);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
movieKonstructor.widthShape.removeEventListener("change", changeWidthEvent);
movieKonstructor.heightShape.removeEventListener("change", changeHeightEvent);
movieKonstructor.rotationShape.removeEventListener("change", changeRotEvent);
while (movieKonstructor.numChildren) {
_local1 = movieKonstructor.getChildAt(0);
movieKonstructor.removeChild(_local1);
_local1 = null;
};
movieKonstructor = null;
kontForMoveTela = null;
while (numChildren) {
removeChildAt(0);
};
}
private function setListeners(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, setListeners);
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
movieKonstructor.widthShape.addEventListener("change", changeWidthEvent);
movieKonstructor.heightShape.addEventListener("change", changeHeightEvent);
movieKonstructor.rotationShape.addEventListener("change", changeRotEvent);
}
private function bigSmall():void{
var _local2:MovieClip;
var _local1:int;
while (_local1 < kontTela.numChildren) {
_local2 = (kontTela.getChildAt(_local1) as MovieClip);
if (((_local2.hitTestPoint(mouseX, mouseY, true)) && ((_local2.big == false)))){
_local2.width = (_local2.width * 1.1);
_local2.scaleY = (_local2.scaleY * 1.1);
_local2.big = true;
return;
};
if (((!(_local2.hitTestPoint(mouseX, mouseY, true))) && ((_local2.big == true)))){
_local2.width = (_local2.width / 1.1);
_local2.scaleY = (_local2.scaleY / 1.1);
_local2.big = false;
return;
};
_local1++;
};
}
}
}//package EditorLevels
Section 90
//ClassLevel (EditorLevels.ClassLevel)
package EditorLevels {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class ClassLevel extends Sprite {
public const TELO_VYBRANO:String = "TELO_VYBRANO";
public const TEST:String = "TEST";
public const PRESS_ON_LEVEL:String = "PRESS_ON_LEVEL";
public const LOOK_KOORD_MOVIE_TELO:String = "LOOK_KOORD_MOVIE_TELO";
public const LEVEL_CHANGE:String = "LEVEL_CHANGE";
public const TELO_NEOPREDELENO:String = "TELO_NEOPREDELENO";
private var contWithSeveralTela:MovieClip;
private var alphaCourse:int;// = -1
private var isTeloSelect:Boolean;
var pauseFirstKeyPress:Number;// = 0
private var contForCopyTela:MovieClip;
private var mouseMessage:TextField;
private var severalMovie:ClassCopySeveralMovie;
public var isSelectSeveralTels:Boolean;
public var isStopAll:Boolean;
private var isPressOnSeveralCont:Boolean;
private var contFon:MovieClip;
private var movieLevel:MovieClip;
private var isGetOutKonstrWas:Boolean;// = false
private var isPressArrow:Boolean;
private var strLevel:XML;
private var isflashTelo:Boolean;
private var isShowMessCopy:Boolean;
private var isTeloMove:Boolean;// = false
private var contTela:MovieClip;
private var input_key:ClassKeys;
private var curentTelo:MovieClip;
public function ClassLevel(_arg1:MovieClip=null, _arg2:String=""){
var _local4:MovieClip;
contTela = new MovieClip();
contFon = new MovieClip();
contWithSeveralTela = new MovieClip();
mouseMessage = new TextField();
super();
movieLevel = _arg1;
var _local3:int;
while (_local3 < movieLevel.numChildren) {
_local4 = (movieLevel.getChildAt(_local3) as MovieClip);
if (((_local4) && (_local4.hasOwnProperty("ownName")))){
if (_local4.ownName == "contTela"){
contTela = _local4;
};
if (_local4.ownName == "contFon"){
contFon = _local4;
};
};
_local3++;
};
addChild(movieLevel);
allMovieStop1();
addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
addEventListener(Event.ENTER_FRAME, update);
addEventListener(Event.ADDED_TO_STAGE, setListenKeys);
}
private function copySelectedMovie(_arg1:MovieClip):MovieClip{
var _local3:int;
var _local4:MovieClip;
var _local5:MovieClip;
var _local2:MovieClip = new MovieClip();
if (isPressOnSeveralCont){
_local2.ownName = "contForAllSeveral";
_local3 = (_arg1.numChildren - 1);
while (_local3 >= 0) {
_local4 = (_arg1.getChildAt(_local3) as MovieClip);
if (_local4){
_local5 = getCopyTelo(_local4);
if (_local4.ownName == "contForCopyTels"){
_local5.ownName = "contForCopyTels";
severalMovie.setNewMovieForSelect(_local5);
};
_local2.addChild(_local5);
};
_local3--;
};
severalMovie.setContWithSeleralMovie(curentTelo, false);
isSelectSeveralTels = true;
return (_local2);
};
_local2 = getCopyTelo(_arg1);
return (_local2);
}
private function teloSelectMouseDown():void{
var _local2:MovieClip;
stage.focus = movieLevel.stage;
var _local1:int = (contTela.numChildren - 1);
while (_local1 >= 0) {
_local2 = (contTela.getChildAt(_local1) as MovieClip);
if ((((((_local2.toString().indexOf("fire") > -1)) && (_local2.sensor.hitTestPoint(mouseX, mouseY, false)))) || (((_local2.hitTestPoint(mouseX, mouseY, true)) && ((_local2.toString().indexOf("fire") == -1)))))){
if (_local2.ownName == "contForAllSeveral"){
isPressOnSeveralCont = true;
} else {
unloadMovieFromSeleralMovie();
};
isTeloSelect = true;
isTeloMove = true;
if (_local2 != curentTelo){
allTelsAlpha_1();
};
curentTelo = _local2;
if (input_key.is_ctrl()){
curentTelo = copySelectedMovie(curentTelo);
};
curentTelo.startDrag();
contTela.addChild(curentTelo);
stage.removeEventListener(MouseEvent.MOUSE_UP, selectedTeloMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, selectedTeloMove);
stage.addEventListener(MouseEvent.MOUSE_MOVE, selectedTeloMove);
stage.addEventListener(MouseEvent.MOUSE_UP, selectedTeloMouseUp);
heroAndJointOnUp(contTela);
dispatchEvent(new Event(TELO_VYBRANO));
if (curentTelo.toString().indexOf("pushka") > -1){
dispatchEvent(new Event(PRESS_ON_LEVEL));
};
isflashTelo = true;
return;
};
_local1--;
};
unloadMovieFromSeleralMovie();
heroAndJointOnUp(contTela);
dispatchEvent(new Event(PRESS_ON_LEVEL));
makeContForSelectTels();
isTeloSelect = false;
isflashTelo = false;
}
private function heroAndJointOnUp(_arg1:MovieClip):void{
var _local13:MovieClip;
var _local15:Array;
var _local16:MovieClip;
var _local2:Array = [];
var _local3:Array = [];
var _local4:Array = [];
var _local5:Array = [];
var _local6:Array = [];
var _local7:Array = [];
var _local8:Array = [];
var _local9:Array = [];
var _local10:Array = [];
var _local11:Array = [];
var _local12:Array = [_local6, _local7, _local11, _local8, _local4, _local10, _local2, _local3, _local9, _local5];
var _local14:int;
while (_local14 < _arg1.numChildren) {
_local13 = (_arg1.getChildAt(_local14) as MovieClip);
if (_local13.toString().indexOf("t_rol") > -1){
_local4.push(_local13);
} else {
if (_local13.toString().indexOf("t_joint") > -1){
_local2.push(_local13);
} else {
if (_local13.toString().indexOf("t_revolute") > -1){
_local3.push(_local13);
} else {
if (_local13.toString().indexOf("pushka") > -1){
_local9.push(_local13);
} else {
if (_local13.toString().indexOf("t_o_d") > -1){
_local10.push(_local13);
} else {
if (_local13.toString().indexOf("t_fire") > -1){
_local5.push(_local13);
} else {
if (_local13.toString().indexOf("_cz_") > -1){
_local8.push(_local13);
} else {
if (_local13.toString().indexOf("pic_") > -1){
_local6.push(_local13);
} else {
if (_local13.toString().indexOf("_s") > -1){
_local7.push(_local13);
} else {
_local11.push(_local13);
};
};
};
};
};
};
};
};
};
_local14++;
};
for each (_local15 in _local12) {
for each (_local16 in _local15) {
_arg1.addChild(_local16);
};
};
}
private function changeAlpha(_arg1:MovieClip):void{
if (isflashTelo == true){
_arg1.alpha = (_arg1.alpha + (0.03 * alphaCourse));
if (_arg1.alpha > 1){
alphaCourse = -1;
_arg1.alpha = 1;
};
if (_arg1.alpha < 0.3){
alphaCourse = 1;
_arg1.alpha = 0.3;
};
};
}
public function setGabarits(_arg1:Array):void{
curentTelo.rotation = 0;
var _local2:String = curentTelo.toString();
if ((((((((((((((((_local2.indexOf("t_rol") > -1)) || ((_local2.indexOf("revolute") > -1)))) || ((_local2.indexOf("joint") > -1)))) || ((_local2.indexOf("_c") > -1)))) || ((_local2.indexOf("pic_") > -1)))) || ((_local2.indexOf("target") > -1)))) || ((_local2.indexOf("t_o_d") > -1)))) || ((_local2.indexOf("pushka") > -1)))){
if (_arg1[3] == 0){
curentTelo.width = _arg1[0];
curentTelo.scaleY = curentTelo.scaleX;
};
if (_arg1[3] == 1){
curentTelo.height = _arg1[1];
curentTelo.scaleX = curentTelo.scaleY;
};
} else {
curentTelo.width = _arg1[0];
curentTelo.height = _arg1[1];
};
if (_local2.indexOf("t_mp") == -1){
curentTelo.rotation = _arg1[2];
};
dispatchEvent(new Event(TELO_VYBRANO));
doChangeLevel("setGabarits");
}
public function clearAll():void{
while (contTela.numChildren) {
contTela.removeChild(contTela.getChildAt(0));
};
isflashTelo = false;
isTeloSelect = false;
isSelectSeveralTels = false;
isPressOnSeveralCont = false;
isShowMessCopy = false;
isGetOutKonstrWas = false;
doChangeLevel("clearAll");
}
private function makeContForSelectTels():void{
var punContWithSeveralMovie:Function;
punContWithSeveralMovie = function (_arg1:Event):void{
severalMovie.removeEventListener(severalMovie.MOUSE_UP, punContWithSeveralMovie);
curentTelo = severalMovie.getContWithSeleralMovie();
if (curentTelo.numChildren > 1){
isflashTelo = true;
isSelectSeveralTels = true;
} else {
severalMovie.destroy();
severalMovie = null;
curentTelo.removeChildAt(0);
curentTelo = null;
isSelectSeveralTels = false;
};
};
severalMovie = new ClassCopySeveralMovie(contTela, "contForCopyTels_1");
addChild(severalMovie);
severalMovie.addEventListener(severalMovie.MOUSE_UP, punContWithSeveralMovie);
}
private function doChangeLevel(_arg1:String):void{
dispatchEvent(new Event(LEVEL_CHANGE));
}
public function getMovieLevel():MovieClip{
return (movieLevel);
}
private function deleteCurentTelo():void{
if (curentTelo){
stage.removeEventListener(MouseEvent.MOUSE_UP, selectedTeloMouseUp);
if (isSelectSeveralTels){
severalMovie.destroy();
severalMovie = null;
isSelectSeveralTels = false;
};
if (curentTelo.parent){
curentTelo.parent.removeChild(curentTelo);
};
curentTelo = null;
doChangeLevel("deleteCurentTelo");
isTeloSelect = false;
isflashTelo = false;
dispatchEvent(new Event(PRESS_ON_LEVEL));
};
}
public function getKoordCurentTelo():Point{
return (new Point(curentTelo.x, curentTelo.y));
}
public function noFlash():void{
isflashTelo = false;
allTelsAlpha_1();
}
private function moveCurentTelo(_arg1:Number, _arg2:Number):void{
pauseFirstKeyPress++;
isPressArrow = true;
if (((curentTelo) && ((((pauseFirstKeyPress == 1)) || ((pauseFirstKeyPress > 10)))))){
curentTelo.x = (curentTelo.x + _arg1);
curentTelo.y = (curentTelo.y + _arg2);
};
if (((curentTelo) && ((pauseFirstKeyPress == 1)))){
doChangeLevel("moveCurentTelo");
};
}
private function selectedTeloMouseUp(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, selectedTeloMove);
stage.removeEventListener(MouseEvent.MOUSE_UP, selectedTeloMouseUp);
curentTelo.stopDrag();
unloadMovieFromSeleralMovie(false);
isPressOnSeveralCont = false;
isTeloMove = false;
}
private function allMovieStop1():void{
var _local2:MovieClip;
var _local1:int;
while (_local1 < contTela.numChildren) {
_local2 = (contTela.getChildAt(_local1) as MovieClip);
_local2.gotoAndStop(1);
_local1++;
};
}
public function unloadMovieFromSeleralMovie(_arg1:Boolean=true):void{
if (isSelectSeveralTels){
if (_arg1 == true){
severalMovie.setContWithSeleralMovie(curentTelo, false);
severalMovie.destroy();
severalMovie = null;
isSelectSeveralTels = false;
heroAndJointOnUp(contTela);
doChangeLevel("unloadMovieFromSeleralMovie_1");
} else {
severalMovie.setContWithSeleralMovie(curentTelo, true);
heroAndJointOnUp(contTela);
doChangeLevel("unloadMovieFromSeleralMovie_2");
curentTelo = severalMovie.moveMovieInSeveralCont(contTela);
};
} else {
doChangeLevel("unloadMovieFromSeleralMovie_3");
};
}
private function hideMouseMess():void{
removeChild(mouseMessage);
isShowMessCopy = false;
stage.focus = stage;
}
private function getCopyTelo(_arg1:MovieClip):MovieClip{
var _local2:Number = _arg1.x;
var _local3:Number = _arg1.y;
var _local4:Number = _arg1.rotation;
_arg1.rotation = 0;
var _local5:Number = Math.round(_arg1.width);
var _local6:Number = Math.round(_arg1.height);
_arg1.rotation = _local4;
var _local7:String = _arg1.toString().substr(8, 100);
_local7 = _local7.substr(0, (_local7.length - 1));
var _local8:Class = Ragdoll_3.swfMovies.getAssetClass(_local7);
var _local9:MovieClip = new (_local8);
_local9.gotoAndStop(1);
_local9.x = _local2;
_local9.y = _local3;
_local9.width = _local5;
_local9.height = _local6;
_local9.rotation = _local4;
return (_local9);
}
private function setMessMousePosition():void{
mouseMessage.y = (mouseY - 15);
mouseMessage.x = mouseX;
}
private function update(_arg1:Event):void{
if (isStopAll){
return;
};
changeAlpha(curentTelo);
if (input_key.is_ctrl() == true){
if (isShowMessCopy == false){
showMouseMess("+");
} else {
setMessMousePosition();
};
};
if ((((input_key.is_ctrl() == false)) && ((isShowMessCopy == true)))){
hideMouseMess();
};
isPressArrow = false;
if (input_key.is_left()){
moveCurentTelo(-1, 0);
};
if (input_key.is_right()){
moveCurentTelo(1, 0);
};
if (input_key.is_down()){
moveCurentTelo(0, 1);
};
if (input_key.is_up()){
moveCurentTelo(0, -1);
};
if (isPressArrow == false){
pauseFirstKeyPress = 0;
};
if (input_key.is_DEL()){
deleteCurentTelo();
};
if (input_key.is_space()){
isStopAll = true;
dispatchEvent(new Event(TEST));
};
}
private function showMouseMess(_arg1:String, _arg2:Boolean=false):void{
mouseMessage.selectable = false;
if (_arg2){
mouseMessage.backgroundColor = 0xFFFFFF;
};
mouseMessage.background = _arg2;
mouseMessage.multiline = true;
mouseMessage.border = _arg2;
mouseMessage.autoSize = TextFieldAutoSize.CENTER;
mouseMessage.text = ((" " + _arg1) + " ");
setMessMousePosition();
addChild(mouseMessage);
isShowMessCopy = true;
}
private function allTelsAlpha_1():void{
var _local2:MovieClip;
var _local1:int;
while (_local1 < contTela.numChildren) {
_local2 = (contTela.getChildAt(_local1) as MovieClip);
_local2.alpha = 1;
_local1++;
};
}
private function setListenKeys(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, setListenKeys);
input_key = new ClassKeys(Ragdoll_3.mainStage);
stage.focus = stage;
}
private function selectedTeloMove(_arg1:MouseEvent):void{
if (curentTelo){
dispatchEvent(new Event(LOOK_KOORD_MOVIE_TELO));
};
}
public function getSelectedTelo():MovieClip{
return (curentTelo);
}
private function mouseDown(_arg1:MouseEvent):void{
teloSelectMouseDown();
}
public function addTelo(_arg1:MovieClip):void{
unloadMovieFromSeleralMovie();
curentTelo = _arg1;
contTela.addChild(curentTelo);
curentTelo.gotoAndStop(1);
heroAndJointOnUp(contTela);
doChangeLevel("addTelo");
if (curentTelo.toString().indexOf("revolute_motor") > -1){
curentTelo.rotation = 5;
};
dispatchEvent(new Event(TELO_VYBRANO));
if (curentTelo.toString().indexOf("pushka") > -1){
dispatchEvent(new Event(PRESS_ON_LEVEL));
};
isflashTelo = true;
isTeloSelect = true;
}
private function makeFon(_arg1:String="fon_1"):MovieClip{
var _local2:Class = Ragdoll_3.swfMovies.getAssetClass(_arg1);
var _local3:MovieClip = new (_local2);
return (_local3);
}
public function destroy():void{
removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
removeEventListener(Event.ENTER_FRAME, update);
removeEventListener(Event.ADDED_TO_STAGE, setListenKeys);
input_key.destroy();
input_key = null;
while (movieLevel.numChildren) {
movieLevel.removeChildAt(0);
};
removeChild(movieLevel);
movieLevel = null;
if (severalMovie){
severalMovie.destroy();
};
severalMovie = null;
curentTelo = null;
contTela = null;
contFon = null;
contForCopyTela = null;
contWithSeveralTela = null;
while (numChildren) {
removeChildAt(0);
};
}
public function changeFon(_arg1:String):void{
contFon.removeChildAt(0);
var _local2:Class = Ragdoll_3.swfMovies.getAssetClass(_arg1);
var _local3:MovieClip = new (_local2);
_local3.cacheAsBitmap = true;
contFon.addChild(_local3);
movieLevel.fon = _arg1.toString().substr(4, 1);
}
}
}//package EditorLevels
Section 91
//ClassMenu (MenuGame.ClassMenu)
package MenuGame {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClassMenu extends Sprite {
public const SOLUTION:String = "solution";
public const SEND:String = "send";
public const CREATE:String = "CREATE";
public const TEST:String = "test";
public const PLAY_RC3:String = "PLAY_RC3";
public const EVENT_PRESS:String = "EVENT_PRESS";
public const ACHI:String = "ACHI";
public const CLEAR:String = "clear";
public const RESET:String = "reset";
public const SHARE:String = "share";
public const MENU:String = "menu";
public const UNDO:String = "undo";
public const TUTORIAL:String = "TUTORIAL";
public const SELECTOR:String = "selector";
public const NEXT:String = "next";
public const LOAD:String = "load";
public const EDITOR:String = "editor";
public const SAVE:String = "save";
public var scoresTextField:TextField;
var movieMenu:MovieClip;
public var nameLevel:TextField;
public var nickLevel:TextField;
public var EVENT_PressButton:String;
public function ClassMenu(_arg1:String){
var _local2:Class = Ragdoll_3.swfMovies.getAssetClass(_arg1);
movieMenu = new (_local2);
nameLevel = (movieMenu as Object).nameLevel;
nickLevel = (movieMenu as Object).nickLevel;
scoresTextField = (movieMenu as Object).scores;
addChild(movieMenu);
setListeners();
}
function goSolution(_arg1:MouseEvent):void{
EVENT_PressButton = SOLUTION;
eventPressButton();
}
public function setLevelScores(_arg1:String):void{
while (_arg1.length < 4) {
_arg1 = ("0" + _arg1);
};
scoresTextField.text = ("SCORES " + _arg1);
}
function setListeners():void{
}
function goSave(_arg1:MouseEvent):void{
EVENT_PressButton = SAVE;
eventPressButton();
}
function goLoad(_arg1:MouseEvent):void{
EVENT_PressButton = LOAD;
eventPressButton();
}
public function destroy():void{
while (movieMenu.numChildren) {
movieMenu.removeChildAt(0);
};
removeChild(movieMenu);
movieMenu = null;
}
function goEditor(_arg1:MouseEvent):void{
EVENT_PressButton = EDITOR;
eventPressButton();
}
public function isMouseOver():Boolean{
return (movieMenu.hitTestPoint(mouseX, mouseY, true));
}
function goCreate(_arg1:MouseEvent):void{
EVENT_PressButton = CREATE;
eventPressButton();
}
function goApp(_arg1:MouseEvent):void{
ClassLinks.goToLink("goUpstore", "http://itunes.apple.com/app/physics-gamebox/id368037317?mt=8");
}
function goTest(_arg1:MouseEvent):void{
EVENT_PressButton = TEST;
eventPressButton();
}
public function setNickName(_arg1:String):void{
nickLevel.text = _arg1;
}
function goSend(_arg1:MouseEvent):void{
EVENT_PressButton = SEND;
eventPressButton();
}
function goAchi(_arg1:MouseEvent):void{
EVENT_PressButton = ACHI;
eventPressButton();
}
function goPlayRC3(_arg1:MouseEvent):void{
EVENT_PressButton = PLAY_RC3;
eventPressButton();
}
function goReset(_arg1:MouseEvent):void{
EVENT_PressButton = RESET;
eventPressButton();
}
function goTutorial(_arg1:MouseEvent):void{
EVENT_PressButton = TUTORIAL;
eventPressButton();
}
function goClear(_arg1:MouseEvent):void{
EVENT_PressButton = CLEAR;
eventPressButton();
}
function goShare(_arg1:MouseEvent):void{
EVENT_PressButton = SHARE;
eventPressButton();
}
private function eventPressButton():void{
dispatchEvent(new Event(EVENT_PRESS));
dispatchEvent(new Event(EVENT_PressButton));
}
function goMenu(_arg1:MouseEvent):void{
EVENT_PressButton = MENU;
eventPressButton();
}
function goUndo(_arg1:MouseEvent):void{
EVENT_PressButton = UNDO;
eventPressButton();
}
public function setLevelName(_arg1:String):void{
nameLevel.text = _arg1;
}
function goSelector(_arg1:MouseEvent):void{
EVENT_PressButton = SELECTOR;
eventPressButton();
}
function goNext(_arg1:MouseEvent):void{
EVENT_PressButton = NEXT;
eventPressButton();
}
public function showHideAllbuttons(_arg1:Boolean):void{
var _local3:SimpleButton;
var _local2:int;
while (_local2 < movieMenu.numChildren) {
_local3 = (movieMenu.getChildAt(_local2) as SimpleButton);
if (_local3){
_local3.visible = _arg1;
};
_local2++;
};
}
}
}//package MenuGame
Section 92
//ClassMenuGame (MenuGame.ClassMenuGame)
package MenuGame {
import flash.events.*;
import flash.text.*;
public class ClassMenuGame extends ClassMenu {
private var totalTextField:TextField;
public function ClassMenuGame(){
super("game_menu");
totalTextField = (movieMenu as Object).total;
}
override function setListeners():void{
(movieMenu as Object).button_editor.addEventListener(MouseEvent.CLICK, goEditor);
(movieMenu as Object).button_reset.addEventListener(MouseEvent.CLICK, goReset);
(movieMenu as Object).button_menu.addEventListener(MouseEvent.CLICK, goMenu);
(movieMenu as Object).button_selector.addEventListener(MouseEvent.CLICK, goSelector);
(movieMenu as Object).button_solution.addEventListener(MouseEvent.CLICK, goSolution);
(movieMenu as Object).button_achi.addEventListener(MouseEvent.CLICK, goAchi);
(movieMenu as Object).button_as.addEventListener(MouseEvent.CLICK, goApp);
}
public function setTotalScores(_arg1:String):void{
while (_arg1.length < 4) {
_arg1 = ("0" + _arg1);
};
totalTextField.text = ("TOTAL " + _arg1);
}
override public function destroy():void{
(movieMenu as Object).button_achi.removeEventListener(MouseEvent.CLICK, goAchi);
(movieMenu as Object).button_editor.removeEventListener(MouseEvent.CLICK, goEditor);
(movieMenu as Object).button_reset.removeEventListener(MouseEvent.CLICK, goReset);
(movieMenu as Object).button_menu.removeEventListener(MouseEvent.CLICK, goMenu);
(movieMenu as Object).button_selector.removeEventListener(MouseEvent.CLICK, goSelector);
(movieMenu as Object).button_solution.removeEventListener(MouseEvent.CLICK, goSolution);
(movieMenu as Object).button_as.removeEventListener(MouseEvent.CLICK, goApp);
super.destroy();
}
}
}//package MenuGame
Section 93
//ClassMenuKonstruktor (MenuGame.ClassMenuKonstruktor)
package MenuGame {
import flash.events.*;
public class ClassMenuKonstruktor extends ClassMenu {
public function ClassMenuKonstruktor(){
super("konstruktor_menu");
}
override public function destroy():void{
(movieMenu as Object).button_test.removeEventListener(MouseEvent.CLICK, goTest);
(movieMenu as Object).button_menu.removeEventListener(MouseEvent.CLICK, goMenu);
(movieMenu as Object).button_selector.removeEventListener(MouseEvent.CLICK, goSelector);
(movieMenu as Object).button_save.removeEventListener(MouseEvent.CLICK, goSave);
(movieMenu as Object).button_save.removeEventListener(MouseEvent.CLICK, goSend);
(movieMenu as Object).button_share.removeEventListener(MouseEvent.CLICK, goShare);
(movieMenu as Object).button_load.removeEventListener(MouseEvent.CLICK, goLoad);
(movieMenu as Object).button_clear.removeEventListener(MouseEvent.CLICK, goClear);
(movieMenu as Object).button_undo.removeEventListener(MouseEvent.CLICK, goUndo);
(movieMenu as Object).button_tutorial.removeEventListener(MouseEvent.CLICK, goTutorial);
super.destroy();
}
override function setListeners():void{
(movieMenu as Object).button_test.addEventListener(MouseEvent.CLICK, goTest);
(movieMenu as Object).button_menu.addEventListener(MouseEvent.CLICK, goMenu);
(movieMenu as Object).button_selector.addEventListener(MouseEvent.CLICK, goSelector);
(movieMenu as Object).button_save.addEventListener(MouseEvent.CLICK, goSave);
(movieMenu as Object).button_save.addEventListener(MouseEvent.CLICK, goSend);
(movieMenu as Object).button_share.addEventListener(MouseEvent.CLICK, goShare);
(movieMenu as Object).button_load.addEventListener(MouseEvent.CLICK, goLoad);
(movieMenu as Object).button_clear.addEventListener(MouseEvent.CLICK, goClear);
(movieMenu as Object).button_undo.addEventListener(MouseEvent.CLICK, goUndo);
(movieMenu as Object).button_tutorial.addEventListener(MouseEvent.CLICK, goTutorial);
}
}
}//package MenuGame
Section 94
//ClassMenuTest (MenuGame.ClassMenuTest)
package MenuGame {
import flash.events.*;
public class ClassMenuTest extends ClassMenu {
public function ClassMenuTest(){
super("test_menu");
}
override public function destroy():void{
(movieMenu as Object).button_editor.removeEventListener(MouseEvent.CLICK, goEditor);
(movieMenu as Object).button_reset.removeEventListener(MouseEvent.CLICK, goReset);
(movieMenu as Object).button_menu.removeEventListener(MouseEvent.CLICK, goMenu);
(movieMenu as Object).button_selector.removeEventListener(MouseEvent.CLICK, goSelector);
(movieMenu as Object).button_create.removeEventListener(MouseEvent.CLICK, goCreate);
(movieMenu as Object).button_playRC.removeEventListener(MouseEvent.CLICK, goPlayRC3);
(movieMenu as Object).button_tutorial.removeEventListener(MouseEvent.CLICK, goTutorial);
(movieMenu as Object).button_as.removeEventListener(MouseEvent.CLICK, goApp);
super.destroy();
}
public function modePlayer():void{
(movieMenu as Object).button_editor.visible = false;
(movieMenu as Object).button_create.visible = true;
(movieMenu as Object).button_menu.visible = false;
(movieMenu as Object).button_selector.visible = false;
(movieMenu as Object).button_as.visible = true;
scoresTextField.x = 11;
scoresTextField.y = 430;
(movieMenu as Object).button_tutorial.x = 603.3;
(movieMenu as Object).button_tutorial.y = 404.4;
}
override function setListeners():void{
(movieMenu as Object).button_editor.addEventListener(MouseEvent.CLICK, goEditor);
(movieMenu as Object).button_reset.addEventListener(MouseEvent.CLICK, goReset);
(movieMenu as Object).button_menu.addEventListener(MouseEvent.CLICK, goMenu);
(movieMenu as Object).button_selector.addEventListener(MouseEvent.CLICK, goSelector);
(movieMenu as Object).button_create.addEventListener(MouseEvent.CLICK, goCreate);
(movieMenu as Object).button_playRC.addEventListener(MouseEvent.CLICK, goPlayRC3);
(movieMenu as Object).button_tutorial.addEventListener(MouseEvent.CLICK, goTutorial);
(movieMenu as Object).button_as.addEventListener(MouseEvent.CLICK, goApp);
}
public function modeTest():void{
(movieMenu as Object).button_editor.visible = true;
(movieMenu as Object).button_create.visible = false;
(movieMenu as Object).button_playRC.visible = false;
(movieMenu as Object).button_as.visible = false;
}
}
}//package MenuGame
Section 95
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 96
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 97
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 98
//ClassContactListener (PlayLevels.ClassContactListener)
package PlayLevels {
import Box2D.Dynamics.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
import Tela.*;
public class ClassContactListener extends b2ContactListener {
public static var isTargetTerminate:Boolean = false;
override public function Add(_arg1:b2ContactPoint):void{
}
override public function Persist(_arg1:b2ContactPoint):void{
}
override public function Result(_arg1:b2ContactResult):void{
if ((((((_arg1.shape1.GetBody().GetUserData().userData is ClassRagdoll)) && (((_arg1.shape1.GetBody().GetUserData().userData as ClassRagdoll).isBreak == false)))) || ((((_arg1.shape2.GetBody().GetUserData().userData is ClassRagdoll)) && (((_arg1.shape2.GetBody().GetUserData().userData as ClassRagdoll).isBreak == false)))))){
if ((((_arg1.shape1.GetBody().GetUserData() is ClassTarget)) || ((_arg1.shape2.GetBody().GetUserData() is ClassTarget)))){
isTargetTerminate = true;
};
};
}
override public function Remove(_arg1:b2ContactPoint):void{
}
}
}//package PlayLevels
Section 99
//ClassControlGame (PlayLevels.ClassControlGame)
package PlayLevels {
import flash.events.*;
import flash.display.*;
import StructureGame.*;
import flash.geom.*;
import Badges.*;
import Tela.*;
import EditorLevels.*;
import MenuGame.*;
public class ClassControlGame extends Sprite {
public const CREATE:String = "CREATE";
public const MUSIC_OFF:String = "MUSIC_OFF";
public const SOUND_ON:String = "SOUND_ON";
public const RESET:String = "RESET";
public const MUSIC_ON:String = "MUSIC_ON";
public const MENU:String = "MENU";
public const EDITOR:String = "EDITOR";
public const EVENT_CONTROLGAME:String = "EVENT_CONTROLGAME";
public const SOLUTION:String = "SOLUTION";
public const PLAY_RC3:String = "PLAY_RC3";
public const ACHI:String = "ACHI";
public const GAMEOVER:String = "GAMEOVER";
public const SELECTOR:String = "SELECTOR";
public const SOUND_OFF:String = "SOUND_OFF";
private var damping:ClassDamping;
private var badgiesControl:ClassControllBadges;
public var eVENT_NAME:String;// = ""
private var newRecord:ClassNewRecord;
private var cursorOverLogo:Boolean;
private var nameGame:String;
private var objectMoveCursorMouse:ClassMoveCursorMouse;
private var tempText:String;
private var objectHelpTextLevel:ClassHelpTextLevel;
private var movieLevel:MovieClip;
private var inputKey:ClassKeys;
private var isReset:Boolean;
private var isNextLevel:Boolean;
private var buttonLogoSponsor:SimpleButton;
private var objectSounds:ClassSounds;
private var i:int;// = 0
private var objectKongregate:ClassKongregate;
private var menuObject:Object;
private var rezhim:String;
private var some_event:String;
private var isTestMouseOverMenu:Boolean;
private var numLevel:Number;
private var worldGame:ClassWorld;
private var arrTela:Array;
private var xmlLevel:XML;
private var isDumpingFinish:Boolean;
private var playLevel:ClassPlayLevel;
private var doLevel:ClassDoLevel;
private var movieTesting:MovieClip;
private var objectMessage:ClassMessage;
private var isLevelComplete:Boolean;
private var isSoundPlay:Boolean;
private var levelMessage:ClassLevelMessage;
private var isMusicPlay:Boolean;
private var informGame:ClassInformGame;
private var buttonSound:ClassButtonSound;
public function ClassControlGame(_arg1:String){
damping = ClassDamping.getInstance();
super();
this.nameGame = _arg1;
}
public function destroy():void{
badgiesControl.removeEventListener(badgiesControl.OPEN_BADGE, playSoundOpenBadge);
objectMoveCursorMouse.removeEventListener(objectMoveCursorMouse.CURSOR_HERE, cursorBack);
buttonLogoSponsor.removeEventListener(MouseEvent.CLICK, gotoSiteBubble);
buttonLogoSponsor.removeEventListener(MouseEvent.MOUSE_OVER, showHandCursorMouse);
buttonLogoSponsor.removeEventListener(MouseEvent.MOUSE_OUT, showGameCursorMouse);
if (levelMessage){
levelMessage.removeEventListener(levelMessage.PRESS, goReset);
levelMessage.removeEventListener(levelMessage.PRESS, playNextLevel);
levelMessage.removeEventListener(levelMessage.MOUSE_OVER, makeHandKursor);
levelMessage.removeEventListener(levelMessage.MOUSE_OUT, makeStandartKursor);
levelMessage.removeEventListener(levelMessage.PRESS, goEditor);
levelMessage.destroy();
levelMessage = null;
};
badgiesControl.clearBadgiesCounterWhereEventInOneLevel();
badgiesControl.destroy();
badgiesControl = null;
buttonSound.removeEventListener(buttonSound.EVENT_PRESS, eventFromSoundMusic);
removeChild(buttonSound);
buttonSound = null;
menuObject.removeEventListener(menuObject.EVENT_PRESS, eventFromGameMenu);
menuObject.destroy();
removeChild((menuObject as Sprite));
menuObject = null;
if (levelMessage){
levelMessage.destroy();
};
levelMessage = null;
if (newRecord){
newRecord.destroy();
};
newRecord = null;
doLevel.destroy();
doLevel = null;
inputKey.destroy();
inputKey = null;
playLevel.removeEventListener(playLevel.EVENT_LEVEL, eventFromPlayLevels);
playLevel.destroy();
playLevel = null;
removeChild(movieLevel);
movieLevel = null;
while (numChildren) {
removeChildAt(0);
};
worldGame.destroy();
worldGame = null;
movieTesting = null;
objectMoveCursorMouse.hideMovieCursor();
objectMoveCursorMouse.destroy();
objectMoveCursorMouse = null;
removeEventListener(Event.ENTER_FRAME, pauseAfterCompletedLastLevel);
removeEventListener(Event.ENTER_FRAME, update);
objectMessage = null;
objectHelpTextLevel.destroy();
objectHelpTextLevel = null;
arrTela = null;
}
private function makeStandartKursor(_arg1:Event):void{
objectMoveCursorMouse.showMovieCursor();
}
private function goCreate(_arg1:Event):void{
extinction(CREATE);
}
private function addListenersToMessage():void{
levelMessage.addEventListener(levelMessage.MOUSE_OVER, makeHandKursor);
levelMessage.addEventListener(levelMessage.MOUSE_OUT, makeStandartKursor);
}
private function musicOff(_arg1:Event):void{
isMusicPlay = false;
extinction(MUSIC_OFF);
}
private function messageNo(_arg1:Event):void{
cursorOverLogo = false;
objectMessage.removeEventListener(objectMessage.PRESS_OK, messageOk);
objectMessage.removeEventListener(objectMessage.PRESS_CANCEL, messageNo);
objectMessage.destroy();
}
private function makeHandKursor(_arg1:Event):void{
objectMoveCursorMouse.hideMovieCursor();
}
private function showHandCursorMouse(_arg1:MouseEvent):void{
cursorOverLogo = true;
}
public function getStrLevel():XML{
xmlLevel = doLevel.getStrLevel();
return (xmlLevel);
}
private function showMessage():void{
if (rezhim == "test"){
cursorOverLogo = true;
if (objectMessage){
objectMessage.show(this, "The level will be cleared! Be sure you saved it.", objectMessage.msOkCancel);
objectMessage.addEventListener(objectMessage.PRESS_OK, messageOk);
objectMessage.addEventListener(objectMessage.PRESS_CANCEL, messageNo);
};
} else {
extinction(tempText);
};
}
private function showLevelLose(_arg1:Event):void{
if (levelMessage){
levelMessage.destroy();
};
levelMessage = new ClassLevelMessage(this, "LEVEL LOST, CLICK HERE TO REPEAT");
levelMessage.addEventListener(levelMessage.PRESS, goReset);
addListenersToMessage();
objectSounds.playSound(objectSounds.soundLevelLose);
if (rezhim == "play"){
badgiesControl.updateBadges(numLevel, ClassInformGame.EVENT_LEVEL_LOSE);
};
}
private function reset(_arg1:Event):void{
var _local2:XML;
if (numLevel < 1){
_local2 = xmlLevel;
} else {
_local2 = null;
};
destroy();
createLevel(numLevel, objectSounds, objectKongregate, _local2, isMusicPlay, isSoundPlay);
}
private function messageOk(_arg1:Event):void{
messageNo(_arg1);
extinction(tempText);
}
private function soundOn(_arg1:Event):void{
isSoundPlay = true;
extinction(SOUND_ON);
}
private function appearanceCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
isDumpingFinish = true;
buttonSound.addEventListener(buttonSound.EVENT_PRESS, eventFromSoundMusic);
menuObject.addEventListener(menuObject.EVENT_PRESS, eventFromGameMenu);
objectMoveCursorMouse.addEventListener(objectMoveCursorMouse.CURSOR_HERE, cursorBack);
playLevel.addEventListener(playLevel.EVENT_LEVEL, eventFromPlayLevels);
inputKey = new ClassKeys(Ragdoll_3.mainStage);
stage.focus = Ragdoll_3.mainStage;
objectMoveCursorMouse.showMovieCursor();
if (menuObject.isMouseOver()){
objectMoveCursorMouse.hideMovieCursor();
};
objectHelpTextLevel = new ClassHelpTextLevel(movieLevel, numLevel, nameGame);
}
private function cursorBack(_arg1:Event):void{
isTestMouseOverMenu = false;
}
private function goTutorial(_arg1:Event):void{
ClassLinks.goToLink("tutorial");
}
private function goMenu(_arg1:Event):void{
tempText = MENU;
showMessage();
}
private function eventFromPlayLevels(_arg1:Event):void{
var _local2:Number;
var _local3:Array;
var _local4:int;
switch (playLevel.EVENT_game){
case playLevel.LEVEL_SHOT:
objectSounds.playSound(objectSounds.soundShot_1);
badgiesControl.updateBadges(numLevel, ClassInformGame.EVENT_MAKESHOT);
break;
case playLevel.LEVEL_CHANGESCORE:
writeLevelScore(_arg1);
badgiesControl.updateBadges(numLevel, ClassInformGame.EVENT_CHANGESCORES);
break;
case playLevel.LEVEL_BLAST:
objectSounds.playSound(objectSounds.soundBlast);
_local2 = playLevel.countBreakRagdoll;
while (_local2 > 0) {
badgiesControl.updateBadges(numLevel, ClassInformGame.EVENT_KILLED_RAGDOLL);
_local2--;
};
playLevel.countBreakRagdoll = 0;
break;
case playLevel.LEVEL_COMPLETE:
badgiesControl.updateBadges(numLevel, ClassInformGame.EVENT_LEVEL_COMPLETED);
objectSounds.playSound(objectSounds.soundLevelCompleted);
if ((((((((numLevel == 12)) || ((numLevel == 13)))) || ((numLevel == 14)))) && ((ClassInformGame.nameGame == ClassInformGame.ROLYPOLY)))){
_local3 = arrTela[0];
_local4 = 0;
while (_local4 < _local3.length) {
if ((_local3[_local4] is ClassMovingPlatformGorizont)){
(_local3[_local4] as ClassMovingPlatformGorizont).isStop = true;
};
_local4++;
};
};
showNextInMenu(_arg1);
break;
case playLevel.LEVEL_LOSE:
showLevelLose(_arg1);
break;
case playLevel.EVENT_KILLED_ALL_GOOD_ROLY:
badgiesControl.updateBadges(numLevel, ClassInformGame.EVENT_KILLED_ALL_GOOD_ROLY);
break;
};
}
private function goEditor(_arg1:Event):void{
extinction(EDITOR);
}
private function gotoSiteBubble(_arg1:MouseEvent):void{
ClassLinks.goToLink("bubbleFromLevel");
}
private function playNextLevel(_arg1:Event):void{
if ((((numLevel > 0)) && ((isNextLevel == false)))){
ClassSetDataGame.setLastLevel(numLevel);
numLevel++;
isNextLevel = true;
goReset(_arg1);
};
}
private function goSolution(_arg1:Event):void{
extinction(SOLUTION);
}
private function playSoundOpenBadge(_arg1:Event):void{
objectSounds.playSound(objectSounds.soundAchi);
}
private function extinctionCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
if (eVENT_NAME == this.RESET){
reset(_arg1);
return;
};
dispatchEvent(new Event(EVENT_CONTROLGAME));
}
private function goReset(_arg1:Event):void{
if (isReset == false){
isReset = true;
extinction(RESET);
};
}
private function pauseAfterCompletedLastLevel(_arg1:Event):void{
i++;
if (i > 200){
removeEventListener(Event.ENTER_FRAME, pauseAfterCompletedLastLevel);
extinction(some_event);
};
}
public function destroyAll():void{
destroy();
objectSounds = null;
objectKongregate = null;
}
private function goAchi(_arg1:Event):void{
extinction(ACHI);
}
private function extinction(_arg1:String):void{
this.eVENT_NAME = _arg1;
if ((((((((_arg1.indexOf("SELECTED_PLAYERS") > -1)) || ((_arg1.indexOf("MUSIC") > -1)))) || ((_arg1.indexOf("SOUND") > -1)))) || ((_arg1.indexOf("SOLUTION") > -1)))){
extinctionCompleted(null);
return;
};
if ((((rezhim == "test")) && ((_arg1.indexOf(EDITOR) > -1)))){
extinctionCompleted(null);
return;
};
isTestMouseOverMenu = false;
removeEventListener(Event.ENTER_FRAME, update);
objectMoveCursorMouse.hideAll();
damping.action(this, damping.ACTION_EXTINCTION);
damping.addEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
}
private function writeLevelScore(_arg1:Event):void{
var _local2:Number = playLevel.getLevelScores();
(menuObject as ClassMenu).setLevelScores(_local2.toString());
}
private function update(_arg1:Event):void{
playLevel.update();
if (isDumpingFinish){
if (((inputKey.is_space()) || (inputKey.is_R()))){
goReset(_arg1);
};
if (((((inputKey.is_alt()) && (inputKey.is_shift()))) && (inputKey.is_N()))){
ClassSetDataGame.setLevelScoresAndTotal(numLevel, 100);
playNextLevel(_arg1);
};
if (((menuObject.isMouseOver()) || (cursorOverLogo))){
if (isTestMouseOverMenu == false){
objectMoveCursorMouse.hideMovieCursor();
isTestMouseOverMenu = true;
};
} else {
if (isTestMouseOverMenu){
objectMoveCursorMouse.showMovieCursor();
isTestMouseOverMenu = false;
};
};
};
}
private function showNextInMenu(_arg1:Event):void{
var _local2:String;
var _local3:Boolean;
if (rezhim == "play"){
_local2 = "LEVEL WIN! CLICK HERE TO NEXT LEVEL";
_local3 = true;
if (ClassSetDataGame.isRecordOnLevel(numLevel, playLevel.getLevelScores())){
newRecord = new ClassNewRecord(movieLevel, 100);
};
ClassSetDataGame.setLevelScoresAndTotal(numLevel, playLevel.getLevelScores());
menuObject.setTotalScores(ClassSetDataGame.totalScore);
if (objectKongregate.kongregate){
objectKongregate.kongregate.stats.submit("LevelsCompleted", numLevel);
objectKongregate.kongregate.stats.submit("Scores", ClassSetDataGame.totalScore);
};
if (ClassSetDataGame.testAllLevelCompleted() == true){
if (ClassSetDataGame.isGameFinish == false){
_local2 = "GAME WIN!";
menuObject.showHideAllbuttons(false);
ClassSetDataGame.setGameFinish();
_local3 = false;
some_event = GAMEOVER;
badgiesControl.updateBadges(-1, ClassInformGame.EVENT_GAMEOVER);
addEventListener(Event.ENTER_FRAME, pauseAfterCompletedLastLevel);
} else {
if (numLevel == ClassSetDataGame.kolVoLevels){
_local2 = "LEVEL WIN!";
menuObject.showHideAllbuttons(false);
_local3 = false;
some_event = SELECTOR;
addEventListener(Event.ENTER_FRAME, pauseAfterCompletedLastLevel);
};
};
badgiesControl.updateBadges(ClassSetDataGame.totalScore, ClassInformGame.EVENT_TOTALSCORES);
} else {
if (numLevel == ClassSetDataGame.kolVoLevels){
_local3 = false;
_local2 = "LEVEL WIN!";
menuObject.showHideAllbuttons(false);
some_event = SELECTOR;
addEventListener(Event.ENTER_FRAME, pauseAfterCompletedLastLevel);
};
};
} else {
_local2 = "LEVEL WIN!";
levelMessage = new ClassLevelMessage(this, _local2);
levelMessage.addEventListener(levelMessage.PRESS, goEditor);
addListenersToMessage();
return;
};
levelMessage = new ClassLevelMessage(this, _local2);
if (((!((_local2 == "GAME WIN!"))) && (!((_local2 == "LEVEL WIN!"))))){
levelMessage.addEventListener(levelMessage.PRESS, playNextLevel);
addListenersToMessage();
};
isLevelComplete = true;
}
private function showGameCursorMouse(_arg1:MouseEvent):void{
cursorOverLogo = false;
}
private function eventFromSoundMusic(_arg1:Event):void{
switch (buttonSound.EVENT_PressButton){
case buttonSound.SOUND_OFF:
soundOff(_arg1);
break;
case buttonSound.SOUND_ON:
soundOn(_arg1);
break;
case buttonSound.MUSIC_ON:
musicOn(_arg1);
break;
case buttonSound.MUSIC_OFF:
musicOff(_arg1);
break;
};
}
private function musicOn(_arg1:Event):void{
isMusicPlay = true;
extinction(MUSIC_ON);
}
private function soundOff(_arg1:Event):void{
isSoundPlay = false;
extinction(SOUND_OFF);
}
public function createLevel(_arg1:Number, _arg2:ClassSounds, _arg3:ClassKongregate, _arg4:XML=null, _arg5:Boolean=true, _arg6:Boolean=true):void{
var _local10:Class;
objectKongregate = _arg3;
cursorOverLogo = false;
isDumpingFinish = false;
this.objectSounds = _arg2;
isTestMouseOverMenu = true;
isLevelComplete = false;
isMusicPlay = _arg5;
isSoundPlay = _arg6;
isReset = false;
isNextLevel = false;
numLevel = _arg1;
if (numLevel > 0){
xmlLevel = ClassShareObgects.getStrProtectedLevelFromCode(nameGame, numLevel);
} else {
xmlLevel = _arg4;
};
worldGame = new ClassWorld();
doLevel = new ClassDoLevel();
movieLevel = doLevel.makeMovieLevelFromStr(xmlLevel, numLevel);
arrTela = doLevel.parseLevel(movieLevel);
playLevel = new ClassPlayLevel(movieLevel, arrTela);
addChild(movieLevel);
objectMoveCursorMouse = new ClassMoveCursorMouse(Ragdoll_3.mainStage, "mouseCursor");
objectMoveCursorMouse.hideAll();
badgiesControl = new ClassControllBadges(movieLevel);
badgiesControl.addEventListener(badgiesControl.OPEN_BADGE, playSoundOpenBadge);
if (numLevel > 0){
menuObject = new ClassMenuGame();
rezhim = "play";
(menuObject as ClassMenuGame).setTotalScores(ClassSetDataGame.totalScore.toString());
menuObject.setLevelName(movieLevel.nameLevel);
menuObject.setNickName(movieLevel.nickLevel);
} else {
menuObject = new ClassMenuTest();
rezhim = "test";
if (numLevel == -1){
rezhim = "palyer";
(menuObject as ClassMenuTest).modePlayer();
} else {
(menuObject as ClassMenuTest).modeTest();
_local10 = Ragdoll_3.swfMovies.getAssetClass("movie_testing");
movieTesting = new (_local10);
movieTesting.x = -4;
movieLevel.addChild(movieTesting);
};
menuObject.setLevelName(("Level: " + movieLevel.nameLevel));
menuObject.setNickName(("Created by " + movieLevel.nickLevel));
};
objectMessage = new ClassMessage();
addChild((menuObject as Sprite));
var _local7:Class = Ragdoll_3.swfMovies.getAssetClass("logoOnLevel");
buttonLogoSponsor = new (_local7);
if (nameGame == ClassInformGame.RAGDOLL){
buttonLogoSponsor.x = 275;
buttonLogoSponsor.y = 432;
if (rezhim == "test"){
buttonLogoSponsor.x = 528;
buttonLogoSponsor.y = 433;
};
if (rezhim == "palyer"){
buttonLogoSponsor.y = 470;
};
};
if (nameGame == ClassInformGame.ROLYPOLY){
buttonLogoSponsor.x = 390;
buttonLogoSponsor.y = 418;
if (rezhim == "test"){
buttonLogoSponsor.x = 612;
buttonLogoSponsor.y = 438;
};
if (rezhim == "palyer"){
buttonLogoSponsor.y = 1000;
};
};
addChild(buttonLogoSponsor);
buttonLogoSponsor.addEventListener(MouseEvent.CLICK, gotoSiteBubble);
buttonLogoSponsor.addEventListener(MouseEvent.MOUSE_OVER, showHandCursorMouse);
buttonLogoSponsor.addEventListener(MouseEvent.MOUSE_OUT, showGameCursorMouse);
var _local8:Number = 130;
var _local9:Number = 160;
if ((((nameGame == ClassInformGame.ROLYPOLY)) && ((rezhim == "play")))){
_local8 = 135;
_local9 = 165;
};
buttonSound = new ClassButtonSound(new Point(_local8, 431.4), new Point(_local9, 431.4), false, 0.55);
buttonSound.setPosition(isMusicPlay, isSoundPlay);
addChild(buttonSound);
addEventListener(Event.ENTER_FRAME, update);
damping.action(this, damping.ACTION_APPEARANCE, 0.07);
damping.addEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
}
private function goSelector(_arg1:Event):void{
tempText = SELECTOR;
showMessage();
}
private function eventFromGameMenu(_arg1:Event):void{
switch (menuObject.EVENT_PressButton){
case menuObject.MENU:
goMenu(_arg1);
break;
case menuObject.RESET:
goReset(_arg1);
break;
case menuObject.SELECTOR:
goSelector(_arg1);
break;
case menuObject.SOLUTION:
goSolution(_arg1);
break;
case menuObject.NEXT:
playNextLevel(_arg1);
break;
case menuObject.EDITOR:
goEditor(_arg1);
break;
case menuObject.CREATE:
goCreate(_arg1);
break;
case menuObject.PLAY_RC3:
goMenu(_arg1);
break;
case menuObject.TUTORIAL:
goTutorial(_arg1);
break;
case menuObject.ACHI:
goAchi(_arg1);
break;
};
}
}
}//package PlayLevels
Section 100
//ClassControllRolyPoly (PlayLevels.ClassControllRolyPoly)
package PlayLevels {
import Tela.*;
public class ClassControllRolyPoly {
private var isAtFirstWasAngry:Boolean;
private var isAngryRollyOnLevel:Boolean;
public var isNoNiceRollyOnLevel:Boolean;
private var arrRoly:Array;
private var arrFire:Array;
private var godRolyDier:Boolean;
private var isNiceRollyOnLevel:Boolean;
public function ClassControllRolyPoly(_arg1:Array, _arg2:Array){
var _local4:ClassRolyPoly;
super();
isNoNiceRollyOnLevel = false;
this.arrRoly = _arg1;
this.arrFire = _arg2;
var _local3:int;
while (_local3 < _arg1.length) {
_local4 = (_arg1[_local3] as ClassRolyPoly);
if (_local4.typeRolyPoly == _local4.ANGRY){
isAtFirstWasAngry = true;
};
_local3++;
};
}
public function destroy():void{
arrRoly = null;
}
public function update():void{
var _local1:ClassRolyPoly;
isAngryRollyOnLevel = false;
isNiceRollyOnLevel = false;
var _local2:int;
while (_local2 < arrRoly.length) {
_local1 = (arrRoly[_local2] as ClassRolyPoly);
if ((((_local1.isCrash == true)) && (_local1.body))){
_local1.destroyBody();
_local1.movie.rotation = 0;
};
if (_local1.isLive == false){
if (_local1.typeRolyPoly == _local1.NICE){
godRolyDier = true;
};
_local1.destroy();
_local1 = null;
arrRoly.splice(_local2, 1);
_local2--;
} else {
if (_local1.typeRolyPoly == _local1.ANGRY){
isAngryRollyOnLevel = true;
};
if (_local1.typeRolyPoly == _local1.NICE){
isNiceRollyOnLevel = true;
};
_local1.update();
_local1.animation();
_local1.testContactList();
_local1.povorachivaem();
if (_local1.testContactMovie(arrFire)){
_local1.die();
};
};
_local2++;
};
if (isNiceRollyOnLevel == false){
isNoNiceRollyOnLevel = true;
};
}
public function isBadRolyOnLevel():Boolean{
if (isAtFirstWasAngry == true){
return (isAngryRollyOnLevel);
};
return (true);
}
public function getGodRolyDier():Boolean{
return (godRolyDier);
}
}
}//package PlayLevels
Section 101
//ClassCoreOnLevel (PlayLevels.ClassCoreOnLevel)
package PlayLevels {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import Tela.*;
public class ClassCoreOnLevel extends EventDispatcher {
public const EVENT_BLASTBOMB:String = "EVENT_BLASTBOMB";
private var cannonControll:ClassPushControll;
private var shotCount:Number;
private var arrCore:Array;
private var waitBeforEnatherShot:Number;
private var gameClassCore:Class;
private var arrForCore:Array;
private var classCore_1:Class;
private var pauseBeforeShot:Number;// = 0
private var classCore_2:Class;
private var movieLevel:MovieClip;
private var classCore:Class;
private var indexChildForCore:Number;
public function ClassCoreOnLevel(_arg1:MovieClip, _arg2:ClassPushControll, _arg3:Number=1){
arrCore = new Array();
super();
this.indexChildForCore = _arg3;
this.cannonControll = _arg2;
movieLevel = _arg1;
arrForCore = [];
shotCount = 0;
classCore_1 = ClassInformGame.classCore_1;
classCore_2 = ClassInformGame.classCore_2;
gameClassCore = ClassInformGame.gameClassCore;
waitBeforEnatherShot = ClassInformGame.pauseBeforShot;
movieLevel.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
cannonControll.addEventListener(cannonControll.TAKE_CORE, putCoreOnLevel);
}
private function putCoreOnLevel(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Number;
var _local4:Number;
var _local5:*;
arrCore = cannonControll.getArrCore();
for each (_local2 in arrCore) {
_local3 = _local2.mX;
_local4 = _local2.mY;
_local5 = new gameClassCore(_local2, true);
movieLevel.addChild(_local5);
movieLevel.setChildIndex(_local5, indexChildForCore);
if (_local2.isAimOutDown == true){
_local5.setImpuls((_local2.x + 100), _local2.y);
} else {
if (_local2.isAimOutUP == true){
_local5.setImpuls((_local2.x + 30), _local2.y);
} else {
_local5.setImpuls(_local2.mX, _local2.mY);
};
};
arrForCore.push(_local5);
};
arrCore = [];
}
public function update():void{
var _local1:*;
pauseBeforeShot++;
cannonControll.movieDulo(new Point(movieLevel.stage.mouseX, movieLevel.stage.mouseY));
var _local2:int;
while (_local2 < arrForCore.length) {
_local1 = arrForCore[_local2];
if (_local1.isLive == false){
if ((_local1 is ClassBomb)){
dispatchEvent(new Event(EVENT_BLASTBOMB));
};
_local1.destroy();
_local1 = null;
arrForCore.splice(_local2, 1);
_local2--;
} else {
_local1.update();
};
_local2++;
};
if (arrForCore.length > ClassInformGame.countCoreOnLevel){
(arrForCore[0] as ClassRagdoll).isLive = false;
};
}
private function mousePress(_arg1:MouseEvent):void{
if (pauseBeforeShot > waitBeforEnatherShot){
pauseBeforeShot = 0;
cannonControll.shot();
classCore = ((Math.random())>0.5) ? classCore_1 : classCore_2;
cannonControll.core(classCore);
shotCount++;
};
}
public function destroy():void{
var _local1:*;
movieLevel.removeEventListener(MouseEvent.MOUSE_DOWN, mousePress);
cannonControll.removeEventListener(cannonControll.TAKE_CORE, putCoreOnLevel);
cannonControll.destroy();
cannonControll = null;
for each (_local1 in arrForCore) {
_local1.destroy();
_local1 = null;
};
arrForCore = null;
movieLevel = null;
gameClassCore = null;
classCore = null;
}
public function getShotCount():Number{
return (shotCount);
}
}
}//package PlayLevels
Section 102
//ClassHelpTextLevel (PlayLevels.ClassHelpTextLevel)
package PlayLevels {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClassHelpTextLevel {
private var i:int;
private var alphaText:Number;// = 0.65
private var textFieldHelp:TextField;
private var timePause:int;// = 40
private var numAlpha:Number;// = 0
private var movieText:MovieClip;
private var mainSprite:MovieClip;
public function ClassHelpTextLevel(_arg1:MovieClip, _arg2:Number, _arg3:String){
mainSprite = _arg1;
var _local4 = "";
var _local5:Number = 1000;
var _local6:Number = 1000;
if (_arg3 == ClassInformGame.RAGDOLL){
switch (_arg2){
case 1:
_local4 = "Shoot the ragdoll guy from the cannon. Hit the target to go to the next level";
_local5 = 380;
_local6 = 150;
break;
case 2:
_local4 = "Increase the force of your shot by moving the mouse further away from the cannon";
_local5 = 280;
_local6 = 140;
break;
case 3:
_local4 = "Try to limit amount of ragdoll you fire";
_local5 = 230;
_local6 = 110;
break;
case 5:
_local4 = "Increase the force of your shot by moving the mouse further away from the cannon";
_local5 = 250;
_local6 = 165;
break;
case 4:
_local4 = "If you get stuck just press 'RESET' or 'R' or 'Space'";
_local5 = 480;
_local6 = 380;
break;
};
};
if (_arg3 == ClassInformGame.ROLYPOLY){
switch (_arg2){
case 1:
_local4 = "Shoot the bomb from the cannon. Only shoot the evil Roly Polys, all friendly ones must survive!";
_local5 = 380;
_local6 = 210;
break;
case 2:
_local4 = "Increase the force of your shot by moving the mouse further away from the cannon";
_local5 = 280;
_local6 = 230;
break;
case 3:
_local4 = "Try to limit amount of bomb you fire";
_local5 = 230;
_local6 = 110;
break;
case 5:
_local4 = "Increase the force of your shot by moving the mouse further away from the cannon";
_local5 = 250;
_local6 = 40;
break;
case 4:
_local4 = "If you get stuck just press 'RESET' or 'R' or 'Space'";
_local5 = 480;
_local6 = 380;
break;
};
};
var _local7:Class = Ragdoll_3.swfMovies.getAssetClass("help_text");
movieText = new (_local7);
textFieldHelp = (movieText as Object).helpText;
textFieldHelp.text = _local4;
movieText.x = _local5;
movieText.y = _local6;
movieText.alpha = 0;
mainSprite.addChild(movieText);
mainSprite.addEventListener(Event.ENTER_FRAME, waitPause);
}
private function waitPause(_arg1:Event):void{
i++;
if (i == timePause){
mainSprite.removeEventListener(Event.ENTER_FRAME, waitPause);
mainSprite.addEventListener(Event.ENTER_FRAME, showText);
};
}
public function destroy():void{
mainSprite.removeEventListener(Event.ENTER_FRAME, waitPause);
mainSprite.removeEventListener(Event.ENTER_FRAME, showText);
mainSprite.removeChild(movieText);
textFieldHelp = null;
movieText = null;
mainSprite = null;
}
private function showText(_arg1:Event):void{
numAlpha = (numAlpha + 0.01);
movieText.alpha = numAlpha;
if (numAlpha > alphaText){
mainSprite.removeEventListener(Event.ENTER_FRAME, showText);
};
}
}
}//package PlayLevels
Section 103
//ClassLevelMessage (PlayLevels.ClassLevelMessage)
package PlayLevels {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClassLevelMessage extends EventDispatcher {
public const PRESS:String = "PRESS";
public const MOUSE_OUT:String = "MOUSE_OUT";
public const MOUSE_OVER:String = "MOUSE_OVER";
private var parent:Sprite;
private var movieMessage:MovieClip;
private var alphaCourse:Number;// = -1
private var textFieldMessage:TextField;
public function ClassLevelMessage(_arg1:Sprite, _arg2:String){
parent = _arg1;
var _local3:Class = Ragdoll_3.swfMovies.getAssetClass("levelMessage");
movieMessage = new (_local3);
textFieldMessage = (movieMessage as Object).message;
textFieldMessage.text = _arg2;
movieMessage.y = 20;
movieMessage.x = (690 / 2);
parent.addChild(movieMessage);
movieMessage.addEventListener(Event.ENTER_FRAME, flash);
movieMessage.addEventListener(MouseEvent.CLICK, eventClick);
movieMessage.addEventListener(MouseEvent.MOUSE_OVER, eventMouseOver);
movieMessage.addEventListener(MouseEvent.MOUSE_OUT, eventMouseOut);
}
public function destroy():void{
movieMessage.removeEventListener(Event.ENTER_FRAME, flash);
movieMessage.removeEventListener(MouseEvent.CLICK, eventClick);
movieMessage.removeEventListener(MouseEvent.MOUSE_OVER, eventMouseOver);
movieMessage.removeEventListener(MouseEvent.MOUSE_OUT, eventMouseOut);
parent.removeChild(movieMessage);
parent = null;
movieMessage = null;
textFieldMessage = null;
}
public function eventMouseOut(_arg1:MouseEvent):void{
dispatchEvent(new Event(MOUSE_OUT));
}
private function flash(_arg1:Event):void{
movieMessage.alpha = (movieMessage.alpha + (0.09 * alphaCourse));
if (movieMessage.alpha > 1){
alphaCourse = -1;
movieMessage.alpha = 1;
};
if (movieMessage.alpha < 0.3){
alphaCourse = 1;
movieMessage.alpha = 0.3;
};
}
private function eventClick(_arg1:MouseEvent):void{
dispatchEvent(new Event(PRESS));
}
public function eventMouseOver(_arg1:MouseEvent):void{
dispatchEvent(new Event(MOUSE_OVER));
}
}
}//package PlayLevels
Section 104
//ClassNewRecord (PlayLevels.ClassNewRecord)
package PlayLevels {
import flash.events.*;
import flash.display.*;
public class ClassNewRecord {
private var timeOnSprite:Number;
private var movieRecord:MovieClip;
private var changeAlpha:Number;// = 1
public function ClassNewRecord(_arg1:Sprite, _arg2:Number){
this.timeOnSprite = _arg2;
var _local3:Class = Ragdoll_3.swfMovies.getAssetClass("levelRecord");
movieRecord = new (_local3);
movieRecord.y = -150;
movieRecord.x = 345;
_arg1.addChild(movieRecord);
movieRecord.addEventListener(Event.ENTER_FRAME, timeWait);
}
public function destroy():void{
movieRecord.removeEventListener(Event.ENTER_FRAME, timeWait);
movieRecord.removeEventListener(Event.ENTER_FRAME, timeChangeAlphaTo_0);
movieRecord.parent.removeChild(movieRecord);
movieRecord = null;
}
private function timeWait(_arg1:Event):void{
timeOnSprite--;
if (timeOnSprite < 0){
movieRecord.removeEventListener(Event.ENTER_FRAME, timeWait);
movieRecord.addEventListener(Event.ENTER_FRAME, timeChangeAlphaTo_0);
};
}
private function timeChangeAlphaTo_0(_arg1:Event):void{
changeAlpha = (changeAlpha - 0.05);
movieRecord.alpha = changeAlpha;
if (changeAlpha < 0){
movieRecord.removeEventListener(Event.ENTER_FRAME, timeChangeAlphaTo_0);
};
}
}
}//package PlayLevels
Section 105
//ClassPlayLevel (PlayLevels.ClassPlayLevel)
package PlayLevels {
import flash.events.*;
import flash.display.*;
import Tela.*;
public class ClassPlayLevel extends EventDispatcher {
public const LEVEL_LOSE:String = "LEVEL_LOSE";
public const LEVEL_COMPLETE:String = "LEVEL_COMPLETE";
public const LEVEL_BLAST:String = "LEVEL_BLAST";
public const EVENT_LEVEL:String = "EVENT_LEVEL";
public const LEVEL_CHANGESCORE:String = "LEVEL_CHANGESCORE";
public const EVENT_KILLED_ALL_GOOD_ROLY:String = "EVENT_KILLED_ALL_GOOD_ROLY";
public const LEVEL_SHOT:String = "LEVEL_SHOT";
private var arrStaticTela:Array;
private var isTargetHereInFirstTime:Boolean;
public var countBreakRagdoll:Number;// = 0
public var EVENT_game:String;// = ""
private var isTagretHere:Boolean;
private var levelCompleted:Boolean;
private var movieLevel:MovieClip;
private var levelLose:Boolean;
private var nameDestroyTelo:String;
private var controllRolyPoly:ClassControllRolyPoly;
private var coreOnLevel:ClassCoreOnLevel;
private var allGoodRolyKilled:Boolean;
private var levelScores:Number;
private var shotsCount:Number;
private var isPushOnLevel;// = false
private var waitLevelComplete:Number;// = 0
private var isStopTestingLevelCompleted:Boolean;
private var nameLivingTelo:String;
private var arrDinamicTela:Array;
private var isStopTestingLevelLose:Boolean;
public function ClassPlayLevel(_arg1:MovieClip, _arg2:Array){
this.movieLevel = _arg1;
allGoodRolyKilled = false;
levelCompleted = false;
arrDinamicTela = _arg2[0];
arrStaticTela = _arg2[1];
levelScores = 0;
shotsCount = 0;
waitLevelComplete = 0;
if (_arg2[2].length){
isPushOnLevel = true;
};
coreOnLevel = new ClassCoreOnLevel(_arg1, new ClassPushControll(_arg2[2]));
coreOnLevel.addEventListener(coreOnLevel.EVENT_BLASTBOMB, eventBlast);
controllRolyPoly = new ClassControllRolyPoly(_arg2[3], _arg2[4]);
testIsTagetOnLevel();
}
public function destroy():void{
var _local1:ClassBaseBody;
for each (_local1 in arrDinamicTela) {
_local1.destroy();
_local1 = null;
};
arrDinamicTela = null;
for each (_local1 in arrStaticTela) {
_local1.destroy();
_local1 = null;
};
arrDinamicTela = null;
movieLevel = null;
coreOnLevel.removeEventListener(coreOnLevel.EVENT_BLASTBOMB, eventBlast);
coreOnLevel.destroy();
coreOnLevel = null;
controllRolyPoly.destroy();
controllRolyPoly = null;
}
public function getLevelScores():Number{
return (levelScores);
}
private function testIsTagetOnLevel():void{
var _local2:ClassBaseBody;
var _local1:int;
while (_local1 < arrDinamicTela.length) {
_local2 = (arrDinamicTela[_local1] as ClassBaseBody);
if ((_local2 is ClassTarget)){
isTargetHereInFirstTime = true;
};
_local1++;
};
}
private function play():void{
if ((((isTargetHereInFirstTime == true)) && ((isTagretHere == false)))){
levelLose = true;
};
if (!levelLose){
levelLose = controllRolyPoly.getGodRolyDier();
};
if (!levelCompleted){
levelCompleted = !(controllRolyPoly.isBadRolyOnLevel());
};
if (isStopTestingLevelLose == false){
if (levelLose){
isStopTestingLevelLose = true;
isStopTestingLevelCompleted = true;
levelCompleted = false;
EVENT_game = LEVEL_LOSE;
dispatchEvent(new Event(EVENT_LEVEL));
};
};
if (isStopTestingLevelCompleted == false){
if (levelCompleted){
waitLevelComplete++;
if ((((waitLevelComplete > 60)) || ((ClassInformGame.nameGame == ClassInformGame.RAGDOLL)))){
waitLevelComplete = 0;
isStopTestingLevelCompleted = true;
isStopTestingLevelLose = true;
EVENT_game = LEVEL_COMPLETE;
dispatchEvent(new Event(EVENT_LEVEL));
};
};
};
}
public function update():void{
var _local1:ClassBaseBody;
ClassWorld.world.Step(ClassWorld.m_timeStep, ClassWorld.m_iterations);
nameDestroyTelo = "";
nameLivingTelo = "";
isTagretHere = false;
var _local2:int;
while (_local2 < arrDinamicTela.length) {
_local1 = (arrDinamicTela[_local2] as ClassBaseBody);
if (_local1.isLive == false){
if ((_local1 is ClassBomb)){
countBreakRagdoll = (_local1 as ClassBomb).countOfBreakRagdoll;
eventBlast(null);
};
nameDestroyTelo = _local1.nameMoive;
_local1.destroy();
_local1 = null;
arrDinamicTela.splice(_local2, 1);
_local2--;
} else {
nameLivingTelo = _local1.nameMoive;
_local1.update();
if (_local1.nameMoive.indexOf("target") > -1){
isTagretHere = true;
if (!levelCompleted){
levelCompleted = (_local1 as ClassTarget).testContact();
};
};
};
_local2++;
};
coreOnLevel.update();
controllRolyPoly.update();
if ((((controllRolyPoly.isNoNiceRollyOnLevel == true)) && ((allGoodRolyKilled == false)))){
EVENT_game = EVENT_KILLED_ALL_GOOD_ROLY;
dispatchEvent(new Event(EVENT_LEVEL));
allGoodRolyKilled = true;
};
if (shotsCount < coreOnLevel.getShotCount()){
if (isPushOnLevel){
if (((!(levelLose)) && (!(levelCompleted)))){
levelScores++;
EVENT_game = LEVEL_CHANGESCORE;
dispatchEvent(new Event(EVENT_LEVEL));
};
shotsCount++;
EVENT_game = LEVEL_SHOT;
dispatchEvent(new Event(EVENT_LEVEL));
};
};
play();
}
private function eventBlast(_arg1:Event):void{
EVENT_game = LEVEL_BLAST;
dispatchEvent(new Event(EVENT_LEVEL));
}
}
}//package PlayLevels
Section 106
//ClassSelectPlayerLevel (PlayLevels.ClassSelectPlayerLevel)
package PlayLevels {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class ClassSelectPlayerLevel extends Sprite {
public const EVENT_SELECTED:String = "EVENT_SELECTED";
private var mainSprite:Stage;
private var movieSteper:MovieClip;
private var numStep:Object;
private var countStep:Object;
public var valueNum_step:Number;
private var arrKey:Array;
public function ClassSelectPlayerLevel(){
arrKey = [];
super();
}
private function hideSteper():void{
movieSteper.visible = false;
}
private function keyPress(_arg1:KeyboardEvent):void{
trace("!");
arrKey.push(_arg1.keyCode);
if (arrKey.toString() == "74,48,80,65"){
if (!movieSteper.visible){
showSteper();
} else {
hideSteper();
};
arrKey = [];
};
if (((((!((arrKey.toString() == "74"))) && (!((arrKey.toString() == "74,48"))))) && (!((arrKey.toString() == "74,48,80"))))){
arrKey = [];
};
}
public function staperAdd(_arg1:String, _arg2:Point, _arg3:Stage):void{
mainSprite = _arg3;
var _local4:Class = Ragdoll_3.swfMovies.getAssetClass(_arg1);
movieSteper = new (_local4);
movieSteper.x = _arg2.x;
movieSteper.y = _arg2.y;
movieSteper.gotoAndStop(1);
mainSprite.addChild(movieSteper);
countStep = (movieSteper as Object).levelCount;
numStep = (movieSteper as Object).num_step;
numStep.addEventListener("change", changeNum_step);
hideSteper();
mainSprite.addEventListener(KeyboardEvent.KEY_DOWN, keyPress);
}
private function changeNum_step(_arg1:Event):void{
valueNum_step = numStep.value;
dispatchEvent(new Event(EVENT_SELECTED));
}
private function showSteper():void{
movieSteper.visible = true;
}
public function setTekLevel(_arg1:Number):void{
numStep.value = _arg1;
showSteper();
}
public function getNumStep():Number{
return (valueNum_step);
}
public function setCountLevels(_arg1:String):void{
countStep.text = _arg1;
}
public function destroy():void{
mainSprite.removeEventListener(KeyboardEvent.KEY_DOWN, keyPress);
numStep.removeEventListener("change", changeNum_step);
mainSprite.removeChild(movieSteper);
movieSteper = null;
}
}
}//package PlayLevels
Section 107
//ClassBaseStructureGameElement (StructureGame.ClassBaseStructureGameElement)
package StructureGame {
import flash.events.*;
import flash.display.*;
public class ClassBaseStructureGameElement extends Sprite {
private var currentEvent:String;
private var damping:ClassDamping;
public var movie:MovieClip;
public var isShowDamping:Boolean;// = true
public function ClassBaseStructureGameElement(_arg1:String, _arg2:Boolean=true){
damping = ClassDamping.getInstance();
super();
var _local3:Class = Ragdoll_3.swfMovies.getAssetClass(_arg1);
movie = new (_local3);
if (_arg2){
damping.action(movie, damping.ACTION_APPEARANCE);
damping.addEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
};
addChild(movie);
}
private function appearanceCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
}
function extinction(_arg1:String):void{
this.currentEvent = _arg1;
if (!isShowDamping){
isShowDamping = true;
extinctionCompleted(null);
return;
};
damping.action(movie, damping.ACTION_EXTINCTION);
damping.addEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
}
public function destroy():void{
damping.removeEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
damping.removeEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
damping = null;
while (movie.numChildren) {
movie.removeChildAt(0);
};
removeChild(movie);
movie = null;
currentEvent = null;
}
private function extinctionCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
dispatchEvent(new Event(currentEvent));
}
}
}//package StructureGame
Section 108
//ClassButtonSound (StructureGame.ClassButtonSound)
package StructureGame {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class ClassButtonSound extends Sprite {
public const MUSIC_OFF:String = "MUSIC_OFF";
public const MUSIC_ON:String = "MUSIC_ON";
public const SOUND_ON:String = "SOUND_ON";
public const SOUND_OFF:String = "SOUND_OFF";
private var but_sound:MovieClip;
public var EVENT_PRESS:String;// = "EVENT_PRESS"
private var but_music:MovieClip;
public var EVENT_PressButton:String;// = ""
private var currentMovie:MovieClip;
public function ClassButtonSound(_arg1:Point, _arg2:Point, _arg3:Boolean=true, _arg4:Number=0.7){
var _local5:Class = Ragdoll_3.swfMovies.getAssetClass("btnSound");
but_sound = new (_local5);
_local5 = Ragdoll_3.swfMovies.getAssetClass("btnMusic");
but_music = new (_local5);
but_sound.x = _arg1.x;
but_sound.y = _arg1.y;
but_sound.gotoAndStop("on");
but_sound.scaleX = _arg4;
but_sound.scaleY = _arg4;
but_music.x = _arg2.x;
but_music.y = _arg2.y;
but_music.gotoAndStop("on");
but_music.scaleX = _arg4;
but_music.scaleY = _arg4;
if (!_arg3){
but_sound.fon_sound.alpha = 0;
but_music.fon_mus.alpha = 0;
};
addChild(but_sound);
addChild(but_music);
but_sound.addEventListener(MouseEvent.MOUSE_OVER, soundMarkOver);
but_sound.addEventListener(MouseEvent.MOUSE_OUT, soundMarkOut);
but_sound.addEventListener(MouseEvent.CLICK, soundClick);
but_music.addEventListener(MouseEvent.MOUSE_OVER, musicMarkOver);
but_music.addEventListener(MouseEvent.MOUSE_OUT, musicMarkOut);
but_music.addEventListener(MouseEvent.CLICK, musicClick);
}
private function soundClick(_arg1:Event):void{
currentMovie = but_sound;
click();
}
private function markOver():void{
if (currentMovie.currentLabel == "on"){
currentMovie.gotoAndStop("mouseOn_1");
return;
};
if (currentMovie.currentLabel == "off"){
currentMovie.gotoAndStop("mouseOn_2");
return;
};
}
private function musicMarkOver(_arg1:Event):void{
currentMovie = but_music;
markOver();
}
private function markOut():void{
if (currentMovie.currentLabel == "mouseOn_1"){
currentMovie.gotoAndStop("on");
return;
};
if (currentMovie.currentLabel == "mouseOn_2"){
currentMovie.gotoAndStop("off");
return;
};
}
private function click():void{
if (currentMovie.currentLabel == "mouseOn_1"){
currentMovie.gotoAndStop("mouseOn_2");
if (currentMovie.toString().indexOf("Sound") > -1){
EVENT_PressButton = SOUND_OFF;
} else {
EVENT_PressButton = MUSIC_OFF;
};
dispatchEvent(new Event(EVENT_PRESS));
return;
};
if (currentMovie.currentLabel == "mouseOn_2"){
currentMovie.gotoAndStop("mouseOn_1");
if (currentMovie.toString().indexOf("Sound") > -1){
EVENT_PressButton = SOUND_ON;
} else {
EVENT_PressButton = MUSIC_ON;
};
dispatchEvent(new Event(EVENT_PRESS));
return;
};
}
private function musicMarkOut(_arg1:Event):void{
currentMovie = but_music;
markOut();
}
private function musicClick(_arg1:Event):void{
currentMovie = but_music;
click();
}
public function setPosition(_arg1:Boolean, _arg2:Boolean):void{
if (!_arg1){
but_music.gotoAndStop("off");
};
if (!_arg2){
but_sound.gotoAndStop("off");
};
}
private function soundMarkOver(_arg1:Event):void{
currentMovie = but_sound;
markOver();
}
private function soundMarkOut(_arg1:Event):void{
currentMovie = but_sound;
markOut();
}
public function destroy():void{
but_sound.removeEventListener(MouseEvent.MOUSE_OVER, soundMarkOver);
but_sound.removeEventListener(MouseEvent.MOUSE_OUT, soundMarkOut);
but_sound.removeEventListener(MouseEvent.CLICK, soundClick);
but_music.removeEventListener(MouseEvent.MOUSE_OVER, musicMarkOver);
but_music.removeEventListener(MouseEvent.MOUSE_OUT, musicMarkOut);
but_music.removeEventListener(MouseEvent.CLICK, musicClick);
but_sound = null;
but_music = null;
}
}
}//package StructureGame
Section 109
//ClassControllStructureGame (StructureGame.ClassControllStructureGame)
package StructureGame {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import PlayLevels.*;
import EditorLevels.*;
public class ClassControllStructureGame {
private var objectSelectPlayerLevel:ClassSelectPlayerLevel;
private var createLevels:ClassCreate;
private var gameFinish:ClassGameOver;
private var isCreatedFromPlayer:Boolean;// = false
private var xmlLevel:XML;
private var selectorLevels:ClassSelector;
private var numStepLevel:Number;
private var isAchiFromMenu:Boolean;
private var mainMenu:ClassMainMenu;
public var fp:FPS;
private var badgesShow:ClassShowBadges;
private var mainSprite:Sprite;
private var controlGame:ClassControlGame;
private var objectKongregate:ClassKongregate;
public static var objectSounds:ClassSounds;
public function ClassControllStructureGame(_arg1:Sprite, _arg2:ClassSounds, _arg3:ClassKongregate){
mainSprite = _arg1;
objectSounds = _arg2;
objectKongregate = _arg3;
}
private function musicOff(_arg1:Event):void{
objectSounds.isPermitPlayMusic = false;
objectSounds.stopMusic();
ClassSetDataGame.setMusicPlay(false);
}
private function goTestFromCreateLevels(_arg1:Event):void{
xmlLevel = createLevels.getStrLevel();
destroyCreateLevels();
playLevel(0, xmlLevel);
}
private function destroyControlGame():void{
objectSelectPlayerLevel.destroy();
objectSelectPlayerLevel = null;
controlGame.removeEventListener(controlGame.EVENT_CONTROLGAME, eventFromControlGame);
controlGame.destroyAll();
mainSprite.removeChild(controlGame);
controlGame = null;
}
private function showCodeLevels(_arg1:Event):void{
var movieCode:MovieClip;
var closeCodeText:Function;
var e = _arg1;
closeCodeText = function (_arg1:MouseEvent):void{
movieCode.but_ok.removeEventListener(MouseEvent.CLICK, closeCodeText);
movieCode.removeChild(movieCode.but_ok);
mainSprite.removeChild(movieCode);
movieCode = null;
};
var movieClass:Class = Ragdoll_3.swfMovies.getAssetClass("codeLevels");
movieCode = new (movieClass);
mainSprite.addChild(movieCode);
movieCode.textCode.text = ClassSetDataGame.getCodeGameLevels();
movieCode.but_ok.addEventListener(MouseEvent.CLICK, closeCodeText);
}
private function goPlayerLevel(_arg1:Event):void{
var objectControlPlayersLevels:ClassControlPlayersLevels;
var getCodebyID:String;
var strReady:Function;
var e = _arg1;
strReady = function (_arg1:Event):void{
var _local2:XML = objectControlPlayersLevels.getStrLevelFromNumber();
destroyControlGame();
playLevel(0, _local2);
};
numStepLevel = objectSelectPlayerLevel.getNumStep();
objectControlPlayersLevels = new ClassControlPlayersLevels();
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
getCodebyID = "http://www.bubblebox.com/scripts/coverorange/_rc3GetCodebyID_.php";
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
getCodebyID = "http://www.bubblebox.com/scripts/coverorange/_rpc3GetCodebyID_.php";
};
objectControlPlayersLevels.setNumLevelStep(numStepLevel, getCodebyID);
objectControlPlayersLevels.addEventListener(objectControlPlayersLevels.EVENT_STR_READY, strReady);
}
private function pressClearScoresInSelector(_arg1:Event):void{
ClassSetDataGame.clearDataGame();
ClassInformGame.setFirstBadges();
ClassSetDataGame.SaveAllAchivenetsInFirstTimeGame(ClassInformGame.arrBadges);
destroySelectorLevels();
selectorGame();
}
private function goLevelFromSelectorLevels(_arg1:Event):void{
var _local2:Number = selectorLevels.getSelectLevel();
ClassSetDataGame.setLastLevel(_local2);
destroySelectorLevels();
playLevel(_local2);
}
private function creditsGame(_arg1:Event):void{
var credits:ClassCredits;
var closeCredits:Function;
var e = _arg1;
closeCredits = function (_arg1:Event):void{
credits.removeEventListener(credits.MENU, closeCredits);
credits.destroy();
mainSprite.removeChild(credits);
credits = null;
createMainMenu(_arg1);
};
destroyMainMenu();
credits = new ClassCredits();
mainSprite.addChild(credits);
credits.addEventListener(credits.MENU, closeCredits);
}
public function playLevel(_arg1:Number, _arg2:XML=null):void{
objectSounds.playMusic(objectSounds.MUSIC_GAME);
controlGame = new ClassControlGame(ClassInformGame.nameGame);
controlGame.createLevel(_arg1, objectSounds, objectKongregate, _arg2, ClassSetDataGame.isMusic, ClassSetDataGame.isSound);
mainSprite.addChild(controlGame);
objectSelectPlayerLevel = new ClassSelectPlayerLevel();
objectSelectPlayerLevel.addEventListener(objectSelectPlayerLevel.EVENT_SELECTED, goPlayerLevel);
objectSelectPlayerLevel.staperAdd("numStep", new Point(605, 397), Ragdoll_3.mainStage);
if (numStepLevel){
objectSelectPlayerLevel.setTekLevel(numStepLevel);
};
controlGame.addEventListener(controlGame.EVENT_CONTROLGAME, eventFromControlGame);
}
private function destroyCreateLevels():void{
createLevels.removeEventListener(createLevels.MENU, goMenuFromCreateLevels);
createLevels.removeEventListener(createLevels.TEST, goTestFromCreateLevels);
createLevels.removeEventListener(createLevels.SELECTOR, goSelectorFromCreateLevels);
createLevels.removeEventListener(createLevels.MUSIC_ON, musicOn);
createLevels.removeEventListener(createLevels.MUSIC_OFF, musicOff);
createLevels.removeEventListener(createLevels.SOUND_ON, soundOn);
createLevels.removeEventListener(createLevels.SOUND_OFF, soundOff);
createLevels.destroy();
mainSprite.removeChild(createLevels);
createLevels = null;
}
private function pressCreateGameInMenu(_arg1:Event):void{
destroyMainMenu();
goEditor(null);
}
private function goMenuFromGameOver(_arg1:Event):void{
gameFinish.removeEventListener(gameFinish.MENU, goMenuFromGameOver);
mainSprite.removeChild(gameFinish);
gameFinish.destroy();
gameFinish = null;
createMainMenu(_arg1);
}
private function goMenuFromSelectorLevels(_arg1:Event):void{
destroySelectorLevels();
createMainMenu(_arg1);
}
private function badgesGame():void{
var _local1:Array = [];
var _local2:int;
while (_local2 < ClassSetDataGame.kolVoBadges) {
_local1.push(ClassSetDataGame.loadDataBadge((_local2 + 1)));
_local2++;
};
badgesShow = new ClassShowBadges(_local1);
mainSprite.addChild(badgesShow);
badgesShow.addEventListener(badgesShow.MENU, goMenuFromBadgesShow);
}
private function playGame(_arg1:Event):void{
destroyMainMenu();
selectorGame();
}
private function destroySelectorLevels():void{
selectorLevels.removeEventListener(selectorLevels.MENU, goMenuFromCreateLevels);
selectorLevels.removeEventListener(selectorLevels.LEVEL, goLevelFromSelectorLevels);
selectorLevels.removeEventListener(selectorLevels.CLEAR, pressClearScoresInSelector);
selectorLevels.destroy();
mainSprite.removeChild(selectorLevels);
selectorLevels = null;
}
private function soundOn(_arg1:Event):void{
objectSounds.isPermitPlaySound = true;
ClassSetDataGame.setSoundPlay(true);
}
public function createMainMenu(_arg1:Event):void{
mainMenu = new ClassMainMenu(ClassSetDataGame.isMusic, ClassSetDataGame.isSound);
mainSprite.addChild(mainMenu);
mainMenu.addEventListener(mainMenu.pressPlay, playGame);
mainMenu.addEventListener(mainMenu.pressCreate, pressCreateGameInMenu);
mainMenu.addEventListener(mainMenu.pressCredits, creditsGame);
mainMenu.addEventListener(mainMenu.pressBadges, pressBadgesInMenu);
mainMenu.addEventListener(mainMenu.showCodeLevels, showCodeLevels);
mainMenu.addEventListener(mainMenu.MUSIC_ON, musicOn);
mainMenu.addEventListener(mainMenu.MUSIC_OFF, musicOff);
mainMenu.addEventListener(mainMenu.SOUND_ON, soundOn);
mainMenu.addEventListener(mainMenu.SOUND_OFF, soundOff);
objectSounds.playMusic(objectSounds.MUSIC_MENU);
}
private function pressBadgesInMenu(_arg1:Event):void{
destroyMainMenu();
isAchiFromMenu = true;
badgesGame();
}
private function destroyMainMenu():void{
mainMenu.removeEventListener(mainMenu.pressPlay, playGame);
mainMenu.removeEventListener(mainMenu.pressCreate, pressCreateGameInMenu);
mainMenu.removeEventListener(mainMenu.pressCredits, creditsGame);
mainMenu.removeEventListener(mainMenu.pressBadges, pressBadgesInMenu);
mainMenu.removeEventListener(mainMenu.MUSIC_ON, musicOn);
mainMenu.removeEventListener(mainMenu.MUSIC_OFF, musicOff);
mainMenu.removeEventListener(mainMenu.SOUND_ON, soundOn);
mainMenu.removeEventListener(mainMenu.SOUND_OFF, soundOff);
mainMenu.destroy();
mainSprite.removeChild(mainMenu);
mainMenu = null;
}
private function soundOff(_arg1:Event):void{
objectSounds.isPermitPlaySound = false;
objectSounds.stopSound();
ClassSetDataGame.setSoundPlay(false);
}
private function pressEditorInControlGame(_arg1:Event):void{
var _local2:XML = controlGame.getStrLevel();
if (isCreatedFromPlayer){
isCreatedFromPlayer = false;
_local2 = null;
};
destroyControlGame();
goEditor(_local2);
}
private function goMenuFromCreateLevels(_arg1:Event):void{
destroyCreateLevels();
createMainMenu(_arg1);
}
private function goMenuFromBadgesShow(_arg1:Event):void{
destroyBadgesShow();
if (isAchiFromMenu){
createMainMenu(_arg1);
} else {
playLevel(ClassSetDataGame.tekLevel);
};
}
private function destroyBadgesShow():void{
badgesShow.removeEventListener(badgesShow.MENU, goMenuFromBadgesShow);
badgesShow.destroy();
mainSprite.removeChild(badgesShow);
badgesShow = null;
}
private function pressMenuInControlGame(_arg1:Event):void{
destroyControlGame();
createMainMenu(_arg1);
}
private function eventFromControlGame(_arg1:Event):void{
switch (controlGame.eVENT_NAME){
case controlGame.GAMEOVER:
goGameOver(_arg1);
break;
case controlGame.EDITOR:
pressEditorInControlGame(_arg1);
break;
case controlGame.SOLUTION:
ClassLinks.goToLink("walk");
break;
case controlGame.SELECTOR:
pressSelectorInControlGame(_arg1);
break;
case controlGame.MENU:
pressMenuInControlGame(_arg1);
break;
case controlGame.CREATE:
isCreatedFromPlayer = true;
pressEditorInControlGame(_arg1);
break;
case controlGame.MUSIC_ON:
musicOn(_arg1);
break;
case controlGame.MUSIC_OFF:
musicOff(_arg1);
break;
case controlGame.SOUND_ON:
soundOn(_arg1);
break;
case controlGame.SOUND_OFF:
soundOff(_arg1);
break;
case controlGame.ACHI:
goAhiFromGame(_arg1);
break;
};
}
private function goGameOver(_arg1:Event):void{
destroyControlGame();
gameFinish = new ClassGameOver();
gameFinish.addEventListener(gameFinish.MENU, goMenuFromGameOver);
mainSprite.addChild(gameFinish);
objectSounds.stopMusic();
objectSounds.playSound(objectSounds.soundGameWin);
}
private function selectorGame():void{
selectorLevels = new ClassSelector(ClassSetDataGame.massivScores, ClassSetDataGame.massivOpenLevels);
mainSprite.addChild(selectorLevels);
selectorLevels.addEventListener(selectorLevels.MENU, goMenuFromSelectorLevels);
selectorLevels.addEventListener(selectorLevels.LEVEL, goLevelFromSelectorLevels);
selectorLevels.addEventListener(selectorLevels.CLEAR, pressClearScoresInSelector);
}
private function musicOn(_arg1:Event):void{
objectSounds.isPermitPlayMusic = true;
if (controlGame){
objectSounds.playMusic(objectSounds.MUSIC_GAME);
} else {
objectSounds.playMusic(objectSounds.MUSIC_MENU);
};
ClassSetDataGame.setMusicPlay(true);
}
private function goSelectorFromCreateLevels(_arg1:Event):void{
destroyCreateLevels();
selectorGame();
}
private function goEditor(_arg1:XML):void{
createLevels = new ClassCreate();
createLevels.startCreate(_arg1, ClassInformGame.nameGame, true, ClassSetDataGame.isMusic, ClassSetDataGame.isSound);
createLevels.addEventListener(createLevels.MENU, goMenuFromCreateLevels);
createLevels.addEventListener(createLevels.TEST, goTestFromCreateLevels);
createLevels.addEventListener(createLevels.SELECTOR, goSelectorFromCreateLevels);
createLevels.addEventListener(createLevels.MUSIC_ON, musicOn);
createLevels.addEventListener(createLevels.MUSIC_OFF, musicOff);
createLevels.addEventListener(createLevels.SOUND_ON, soundOn);
createLevels.addEventListener(createLevels.SOUND_OFF, soundOff);
mainSprite.addChild(createLevels);
}
private function goAhiFromGame(_arg1:Event):void{
destroyControlGame();
isAchiFromMenu = false;
badgesGame();
}
private function pressSelectorInControlGame(_arg1:Event):void{
destroyControlGame();
selectorGame();
}
}
}//package StructureGame
Section 110
//ClassCredits (StructureGame.ClassCredits)
package StructureGame {
import flash.events.*;
import flash.net.*;
public class ClassCredits extends ClassBaseStructureGameElement {
public const MENU:String = "MENU";
public function ClassCredits(){
super("credits");
movie.myAnton.addEventListener(MouseEvent.CLICK, go_Anton);
movie.myMax.addEventListener(MouseEvent.CLICK, go_Max);
movie.myMusic.addEventListener(MouseEvent.CLICK, go_music);
movie.myTest.addEventListener(MouseEvent.CLICK, go_testing);
movie.mybox.addEventListener(MouseEvent.CLICK, go_box);
movie.myjohny_k.addEventListener(MouseEvent.CLICK, go_johny_k);
movie.button_menu.addEventListener(MouseEvent.CLICK, closeCredits);
movie.bubble_credits.addEventListener(MouseEvent.CLICK, go_bubble_credits);
}
private function go_bubble_credits(_arg1:Event):void{
ClassLinks.goToLink("bubbleFromCredits");
}
override public function destroy():void{
movie.myAnton.removeEventListener(MouseEvent.CLICK, go_Anton);
movie.myMax.removeEventListener(MouseEvent.CLICK, go_Max);
movie.myMusic.removeEventListener(MouseEvent.CLICK, go_music);
movie.myTest.removeEventListener(MouseEvent.CLICK, go_testing);
movie.mybox.removeEventListener(MouseEvent.CLICK, go_box);
movie.myjohny_k.removeEventListener(MouseEvent.CLICK, go_johny_k);
movie.button_menu.removeEventListener(MouseEvent.CLICK, closeCredits);
movie.bubble_credits.removeEventListener(MouseEvent.CLICK, go_bubble_credits);
while (movie.numChildren) {
movie.removeChildAt(0);
};
removeChild(movie);
movie = null;
}
private function closeCredits(_arg1:Event):void{
extinction(MENU);
}
private function go_box(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.box2d.org");
navigateToURL(_local2, "_blank");
}
private function go_testing(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("mailto:taolad@yandex.ru");
navigateToURL(_local2, "_blank");
}
private function go_johny_k(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("mailto:johnny@johnny-k.ru");
navigateToURL(_local2, "_blank");
}
private function go_Max(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("mailto:maxim-777-m@ya.ru");
navigateToURL(_local2, "_blank");
}
private function go_music(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("mailto:johnny@johnny-k.ru");
navigateToURL(_local2, "_blank");
}
private function go_Anton(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("mailto:arosw@mail.ru");
navigateToURL(_local2, "_blank");
}
}
}//package StructureGame
Section 111
//ClassDamping (StructureGame.ClassDamping)
package StructureGame {
import flash.events.*;
import flash.display.*;
public class ClassDamping extends EventDispatcher {
public const ACTION_EXTINCTION:String = "ACTION_EXTINCTION";
public const EVENT_COMPLETED:String = "EVENT_COMPLETED";
public const ACTION_APPEARANCE:String = "ACTION_APPEARANCE";
private static var movie:Sprite;
private static var instance;
private static var changeAlpha:Number;
private static var movieDumping:MovieClip;
private function init(_arg1:Sprite):void{
var _local2:Class = Ragdoll_3.swfMovies.getAssetClass("dumping");
movieDumping = new (_local2);
movieDumping.height = _arg1.height;
movieDumping.width = _arg1.width;
}
public function action(_arg1:Sprite, _arg2:String, _arg3:Number=0.12):void{
movie = _arg1;
init(movie);
if (_arg2 == ACTION_EXTINCTION){
movieDumping.alpha = 0;
changeAlpha = (1 * _arg3);
};
if (_arg2 == ACTION_APPEARANCE){
movieDumping.alpha = 1;
changeAlpha = (-1 * _arg3);
};
movie.addChild(movieDumping);
movieDumping.addEventListener(Event.ENTER_FRAME, doIt);
}
private function doIt(_arg1:Event):void{
movieDumping.alpha = (movieDumping.alpha + changeAlpha);
if ((((movieDumping.alpha > 1.25)) || ((movieDumping.alpha < 0)))){
movie.removeChild(movieDumping);
movieDumping.removeEventListener(Event.ENTER_FRAME, doIt);
dispatchEvent(new Event(EVENT_COMPLETED));
};
}
public static function getInstance():ClassDamping{
if (!instance){
instance = new (ClassDamping);
};
return ((instance as ClassDamping));
}
}
}//package StructureGame
Section 112
//ClassGameOver (StructureGame.ClassGameOver)
package StructureGame {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class ClassGameOver extends Sprite {
public const MENU:String = "MENU";
private var menu_but:SimpleButton;
private var damping:ClassDamping;
private var total:TextField;
private var bubble_but:SimpleButton;
private var movie:MovieClip;
private var objectIphone:ClassIphone;
private var currentEvent:String;
public function ClassGameOver(){
damping = ClassDamping.getInstance();
super();
var _local1:Class = Ragdoll_3.swfMovies.getAssetClass("gameOver");
movie = new (_local1);
total = (movie as Object).total;
menu_but = (movie as Object).menu_but;
bubble_but = (movie as Object).bubble_gameover;
total.text = ClassSetDataGame.totalScore.toString();
(movie as Object).namePlayer.gotoAndStop(1);
(movie as Object).namePlayer.setScore(ClassSetDataGame.totalScore, ClassInformGame.idGame);
damping.action(movie, damping.ACTION_APPEARANCE);
damping.addEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
addChild(movie);
var _local2:Number = 121;
var _local3:Number = 403;
var _local4:Number = 242;
var _local5:Number = 125;
objectIphone = new ClassIphone(movie, new Point(_local2, _local3), new Point(_local4, _local5));
}
private function mouse_click_name(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
if ((movie.namePlayer as MovieClip).currentFrame == 2){
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
_local2 = 10.5;
_local3 = 31.6;
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
_local2 = 11;
_local3 = 39;
};
movie.vive_Score.x = ((movie as Object).namePlayer.x + _local2);
movie.vive_Score.y = ((movie as Object).namePlayer.y + _local3);
(movie as Object).vive_Score.addEventListener(MouseEvent.CLICK, vive_click_name);
};
}
private function vive_click_name(_arg1:MouseEvent):void{
ClassLinks.goToLink("highscore");
}
private function appearanceCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
menu_but.addEventListener(MouseEvent.CLICK, pressMenu);
bubble_but.addEventListener(MouseEvent.CLICK, pressBubble);
movie.namePlayer.addEventListener(MouseEvent.CLICK, mouse_click_name);
}
private function extinctionCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
dispatchEvent(new Event(currentEvent));
}
private function pressBubble(_arg1:MouseEvent):void{
ClassLinks.goToLink("bubbleFromGameover");
}
private function extinction(_arg1:String):void{
this.currentEvent = _arg1;
damping.action(movie, damping.ACTION_EXTINCTION);
damping.addEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
}
private function pressMenu(_arg1:MouseEvent):void{
extinction(MENU);
}
public function destroy():void{
objectIphone.destroy();
objectIphone = null;
movie.vive_Score.removeEventListener(MouseEvent.CLICK, vive_click_name);
movie.namePlayer.removeEventListener(MouseEvent.CLICK, mouse_click_name);
menu_but.removeEventListener(MouseEvent.CLICK, pressMenu);
menu_but = null;
while (movie.numChildren) {
movie.removeChildAt(0);
};
removeChild(movie);
movie = null;
total = null;
}
}
}//package StructureGame
Section 113
//ClassMainMenu (StructureGame.ClassMainMenu)
package StructureGame {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class ClassMainMenu extends ClassBaseStructureGameElement {
public const MUSIC_OFF:String = "MUSIC_OFF";
public const pressPlay:String = "pressPlay";
public const pressCreate:String = "pressCreate";
public const showCodeLevels:String = "showCodeLevels";
public const pressMoregame:String = "pressMoregame";
public const pressHighscore:String = "pressHighscore";
public const pressAddweb:String = "pressAddweb";
public const SOUND_ON:String = "SOUND_ON";
public const pressCredits:String = "pressCredits";
public const MUSIC_ON:String = "MUSIC_ON";
public const pressBadges:String = "pressBadges";
public const SOUND_OFF:String = "SOUND_OFF";
private var damping:ClassDamping;
private var myQuation:ClassQuations;
private var button_showGameLevels:MovieClip;
private var but_addweb:SimpleButton;
private var but_RC_LP:SimpleButton;
private var but_bubble:SimpleButton;
private var currentEvent:String;
private var movieMenu:MovieClip;
private var but_play:SimpleButton;
private var but_badges:SimpleButton;
private var but_bubbleNameGame:SimpleButton;
private var but_RC_R:SimpleButton;
private var objectIphone:ClassIphone;
private var but_more:SimpleButton;
private var but_RC1:SimpleButton;
private var but_credits:SimpleButton;
private var but_RC2:SimpleButton;
private var but_RP_1:SimpleButton;
private var but_RP_2:SimpleButton;
private var but_highscore:SimpleButton;
private var but_create:SimpleButton;
private var buttonSound:ClassButtonSound;
public function ClassMainMenu(_arg1:Boolean=true, _arg2:Boolean=true){
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
damping = ClassDamping.getInstance();
super("main_menu");
but_play = (movie as Object).but_play;
but_create = (movie as Object).but_create;
but_credits = (movie as Object).but_credits;
but_more = (movie as Object).but_more;
but_addweb = (movie as Object).but_addweb;
but_highscore = (movie as Object).but_highscore;
but_badges = (movie as Object).but_badges;
button_showGameLevels = (movie as Object).button_showGameLevels;
but_RC1 = (movie as Object).but_RC1;
but_RC2 = (movie as Object).but_RC2;
but_RC_R = (movie as Object).but_RC_R;
but_RC_LP = (movie as Object).but_RC_LP;
but_RP_1 = (movie as Object).but_RP_1;
but_RP_2 = (movie as Object).but_RP_2;
but_bubble = (movie as Object).bubble_menu;
but_bubbleNameGame = (movie as Object).bubble_menuGame;
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
buttonSound = new ClassButtonSound(new Point(180, 140), new Point(441, 134));
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
buttonSound = new ClassButtonSound(new Point(165.6, 271.6), new Point(165.6, 311.6));
};
buttonSound.addEventListener(buttonSound.EVENT_PRESS, pressInButSound);
buttonSound.setPosition(_arg1, _arg2);
movie.addChild(buttonSound);
setListenersForButtons();
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
_local3 = 603;
_local4 = 387;
_local5 = 181;
_local6 = 96;
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
_local3 = 118;
_local4 = 404;
_local5 = 242;
_local6 = 125;
};
if (ClassInformGame.isShowLink_iPhone == false){
_local3 = 1000;
_local4 = 1000;
if (but_RP_2){
but_RP_2.y = 393;
};
};
objectIphone = new ClassIphone(movie, new Point(_local3, _local4), new Point(_local5, _local6));
}
private function gotoRC2(_arg1:Event):void{
ClassLinks.goToLink("RC2");
}
override public function destroy():void{
buttonSound.removeEventListener(buttonSound.EVENT_PRESS, pressInButSound);
movie.removeChild(buttonSound);
but_play.removeEventListener(MouseEvent.CLICK, playGame);
but_create.removeEventListener(MouseEvent.CLICK, createGame);
but_credits.removeEventListener(MouseEvent.CLICK, creditsGame);
but_more.removeEventListener(MouseEvent.CLICK, moreGame);
but_addweb.removeEventListener(MouseEvent.CLICK, addWeb);
but_highscore.removeEventListener(MouseEvent.CLICK, highscoreGame);
but_badges.removeEventListener(MouseEvent.CLICK, badgesGame);
button_showGameLevels.removeEventListener(MouseEvent.CLICK, showGameLevels);
but_bubbleNameGame.removeEventListener(MouseEvent.CLICK, gotoBubbleGame);
if (but_RC1){
but_RC1.removeEventListener(MouseEvent.CLICK, gotoRC1);
};
if (but_RC2){
but_RC2.removeEventListener(MouseEvent.CLICK, gotoRC2);
};
if (but_RC_R){
but_RC_R.removeEventListener(MouseEvent.CLICK, gotoRC_R);
};
if (but_RC_LP){
but_RC_LP.removeEventListener(MouseEvent.CLICK, gotoRC_LP);
};
if (but_RP_1){
but_RP_1.removeEventListener(MouseEvent.CLICK, gotoRP_1);
};
if (but_RP_2){
but_RP_2.removeEventListener(MouseEvent.CLICK, gotoRP_2);
};
but_bubbleNameGame = null;
buttonSound = null;
but_play = null;
but_create = null;
but_credits = null;
but_more = null;
but_addweb = null;
but_highscore = null;
but_badges = null;
objectIphone.destroy();
objectIphone = null;
currentEvent = null;
super.destroy();
}
private function gotoRP_1(_arg1:Event):void{
ClassLinks.goToLink("RP_1");
}
private function createGame(_arg1:MouseEvent):void{
extinction(pressCreate);
}
private function showGameLevels(_arg1:MouseEvent):void{
isShowDamping = false;
extinction(showCodeLevels);
}
private function badgesGame(_arg1:MouseEvent):void{
extinction(pressBadges);
}
private function gotoRC_R(_arg1:Event):void{
ClassLinks.goToLink("RC_R");
}
private function creditsGame(_arg1:MouseEvent):void{
extinction(pressCredits);
}
private function musicOff(_arg1:Event):void{
isShowDamping = false;
extinction(MUSIC_OFF);
}
private function playGame(_arg1:MouseEvent):void{
extinction(pressPlay);
}
private function soundOn(_arg1:Event):void{
isShowDamping = false;
extinction(SOUND_ON);
}
private function gotoBubble(_arg1:Event):void{
ClassLinks.goToLink("bubbleFromMenu");
}
private function setListenersForButtons():void{
but_play.addEventListener(MouseEvent.CLICK, playGame);
but_create.addEventListener(MouseEvent.CLICK, createGame);
but_credits.addEventListener(MouseEvent.CLICK, creditsGame);
but_more.addEventListener(MouseEvent.CLICK, moreGame);
but_addweb.addEventListener(MouseEvent.CLICK, addWeb);
but_highscore.addEventListener(MouseEvent.CLICK, highscoreGame);
but_badges.addEventListener(MouseEvent.CLICK, badgesGame);
button_showGameLevels.addEventListener(MouseEvent.CLICK, showGameLevels);
if (but_RC1){
but_RC1.addEventListener(MouseEvent.CLICK, gotoRC1);
};
if (but_RC2){
but_RC2.addEventListener(MouseEvent.CLICK, gotoRC2);
};
if (but_RC_R){
but_RC_R.addEventListener(MouseEvent.CLICK, gotoRC_R);
};
if (but_RC_LP){
but_RC_LP.addEventListener(MouseEvent.CLICK, gotoRC_LP);
};
if (but_RP_1){
but_RP_1.addEventListener(MouseEvent.CLICK, gotoRP_1);
};
if (but_RP_2){
but_RP_2.addEventListener(MouseEvent.CLICK, gotoRP_2);
};
but_bubble.addEventListener(MouseEvent.CLICK, gotoBubble);
but_bubbleNameGame.addEventListener(MouseEvent.CLICK, gotoBubbleGame);
}
private function gotoRC_LP(_arg1:Event):void{
ClassLinks.goToLink("RC_LP");
}
private function gotoRP_2(_arg1:Event):void{
ClassLinks.goToLink("RP_2");
}
private function gotoRC1(_arg1:Event):void{
ClassLinks.goToLink("RC1");
}
private function soundOff(_arg1:Event):void{
isShowDamping = false;
extinction(SOUND_OFF);
}
private function gotoBubbleGame(_arg1:Event):void{
ClassLinks.goToLink("ToThisGameFromMenu");
}
private function moreGame(_arg1:MouseEvent):void{
ClassLinks.goToLink("more");
}
private function addWeb(_arg1:MouseEvent):void{
ClassLinks.goToLink("addtosite");
}
private function pressInButSound(_arg1:Event):void{
switch (buttonSound.EVENT_PressButton){
case buttonSound.MUSIC_ON:
musicOn(_arg1);
break;
case buttonSound.MUSIC_OFF:
musicOff(_arg1);
break;
case buttonSound.SOUND_ON:
soundOn(_arg1);
break;
case buttonSound.SOUND_OFF:
soundOff(_arg1);
break;
};
}
private function highscoreGame(_arg1:MouseEvent):void{
ClassLinks.goToLink("highscore");
}
private function musicOn(_arg1:Event):void{
isShowDamping = false;
extinction(MUSIC_ON);
}
}
}//package StructureGame
Section 114
//ClassQuations (StructureGame.ClassQuations)
package StructureGame {
import flash.events.*;
import flash.display.*;
public class ClassQuations extends Sprite {
public const ClickOK:String = "ClickOK";
public const ClickNO:String = "ClickNO";
private var movieQuat:MovieClip;
private var but_ok:SimpleButton;
private var but_no:SimpleButton;
public function ClassQuations(){
var _local1:Class = Ragdoll_3.swfMovies.getAssetClass("QuationYesNo");
movieQuat = new (_local1);
but_ok = (movieQuat as Object).but_ok;
but_no = (movieQuat as Object).but_no;
but_ok.addEventListener(MouseEvent.CLICK, butOkClick);
but_no.addEventListener(MouseEvent.CLICK, butNoClick);
addChild(movieQuat);
}
public function destroy():void{
but_ok.removeEventListener(MouseEvent.CLICK, butOkClick);
but_no.removeEventListener(MouseEvent.CLICK, butNoClick);
but_ok = null;
but_no = null;
removeChild(movieQuat);
movieQuat = null;
}
private function butNoClick(_arg1:MouseEvent):void{
dispatchEvent(new Event(ClickNO));
}
private function butOkClick(_arg1:MouseEvent):void{
dispatchEvent(new Event(ClickOK));
}
}
}//package StructureGame
Section 115
//ClassSelector (StructureGame.ClassSelector)
package StructureGame {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClassSelector extends Sprite {
public const CLEAR:String = "CLEAR";
public const MENU:String = "menu";
public const LEVEL:String = "level";
private var telek:MovieClip;
private var damping:ClassDamping;
private var myQuation:ClassQuations;
private var numTekSelectLevel:Number;// = 1
private var alphaCourse:Number;// = -1
private var currentEvent:String;
private var massivScores:Array;
private var movieSelector:MovieClip;
private var selectedLevel:MovieClip;
private var total:TextField;
private var arrForeMovieLevel:Array;
private var massivOpenLevels:Array;
private var ramka:MovieClip;
public function ClassSelector(_arg1:Array, _arg2:Array){
damping = ClassDamping.getInstance();
massivScores = [];
massivOpenLevels = [];
arrForeMovieLevel = new Array();
super();
this.massivScores = _arg1;
this.massivOpenLevels = _arg2;
var _local3:Class = Ragdoll_3.swfMovies.getAssetClass("selector");
movieSelector = new (_local3);
total = ((movieSelector as Object).total as TextField);
var _local4:String = ClassSetDataGame.totalScore.toString();
total.text = ("TOTAL SCORE: " + _local4);
(movieSelector as Object).namePlayer.gotoAndStop(1);
if (ClassSetDataGame.isGameFinish){
(movieSelector as Object).namePlayer.setScore(ClassSetDataGame.totalScore, ClassInformGame.idGame);
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
(movieSelector as Object).namePlayer.x = 380.5;
(movieSelector as Object).namePlayer.y = 404.1;
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
(movieSelector as Object).namePlayer.x = 3;
(movieSelector as Object).namePlayer.y = 387.4;
};
} else {
(movieSelector as Object).namePlayer.x = 1500;
(movieSelector as Object).namePlayer.y = 1500;
};
setListeners();
damping.action(movieSelector, damping.ACTION_APPEARANCE);
damping.addEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
addChild(movieSelector);
}
private function setListeners():void{
var _local3:MovieClip;
(movieSelector as Object).butMenu.addEventListener(MouseEvent.CLICK, goMenu);
(movieSelector as Object).but_clearScores.addEventListener(MouseEvent.CLICK, clearScores);
(movieSelector as Object).but_as.addEventListener(MouseEvent.CLICK, goApStores);
if (!ClassSetDataGame.isGameStarted){
(movieSelector as Object).but_clearScores.visible = false;
};
var _local1:Number = 0;
var _local2:int;
while (_local2 < movieSelector.numChildren) {
_local3 = (movieSelector.getChildAt(_local2) as MovieClip);
if (((_local3) && ((_local3.name.substring(0, 2) == "l_")))){
_local3.scores.text = "";
_local3.scores.visible = false;
numTekSelectLevel = Number(_local3.name.substring(2, 4));
_local3.num_level.text = numTekSelectLevel.toString();
_local3.galgal.alpha = 0;
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
_local3.sqve.alpha = 0;
};
if (ClassSetDataGame.tekLevel != numTekSelectLevel){
_local3.ramka.visible = false;
} else {
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
telek = _local3;
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
telek = _local3.sqve;
};
};
if (massivOpenLevels[numTekSelectLevel] == true){
_local3.gotoAndStop("open");
_local3.addEventListener(MouseEvent.MOUSE_OVER, mouse_on_levels);
_local3.addEventListener(MouseEvent.MOUSE_OUT, mouse_out_levels);
_local3.addEventListener(MouseEvent.CLICK, mouse_click_levels);
arrForeMovieLevel.push(_local3);
if (massivScores[numTekSelectLevel] >= 0){
_local3.galgal.alpha = 1;
};
} else {
_local3.gotoAndStop("close");
};
};
_local2++;
};
_local3 = null;
movieSelector.namePlayer.addEventListener(MouseEvent.CLICK, mouse_click_name);
addEventListener(Event.ENTER_FRAME, update);
movieSelector.but_bubble.addEventListener(MouseEvent.CLICK, mouse_click_bubble);
}
private function noClear(_arg1:Event):void{
myQuation.removeEventListener(myQuation.ClickOK, clear);
myQuation.removeEventListener(myQuation.ClickNO, noClear);
removeChild(myQuation);
myQuation.destroy();
}
private function extinctionCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
dispatchEvent(new Event(currentEvent));
}
private function vive_click_name(_arg1:MouseEvent):void{
ClassLinks.goToLink("highscore");
}
private function extinction(_arg1:String):void{
this.currentEvent = _arg1;
damping.action(movieSelector, damping.ACTION_EXTINCTION);
damping.addEventListener(damping.EVENT_COMPLETED, extinctionCompleted);
}
public function getSelectLevel():Number{
return (numTekSelectLevel);
}
private function mouse_on_levels(_arg1:MouseEvent):void{
var _local4:Number;
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
_local2.gotoAndStop("select");
var _local3:Number = Number(_local2.num_level.text);
if (ClassSetDataGame.massivScores[_local3] != undefined){
_local4 = ClassSetDataGame.massivScores[_local3];
(_local2.scores as TextField).visible = true;
_local2.scores.text = _local4.toString();
};
}
private function mouse_click_name(_arg1:MouseEvent):void{
if ((movieSelector.namePlayer as MovieClip).currentFrame == 2){
movieSelector.vive_Score.x = ((movieSelector as Object).namePlayer.x + 10.5);
movieSelector.vive_Score.y = ((movieSelector as Object).namePlayer.y + 31.6);
movieSelector.vive_Score.addEventListener(MouseEvent.CLICK, vive_click_name);
};
}
private function go_Play_1(_arg1:MouseEvent):void{
}
private function go_Play_2(_arg1:MouseEvent):void{
}
private function appearanceCompleted(_arg1:Event):void{
damping.removeEventListener(damping.EVENT_COMPLETED, appearanceCompleted);
}
private function update(_arg1:Event):void{
telek.alpha = (telek.alpha + (0.05 * alphaCourse));
if (telek.alpha >= 0.6){
alphaCourse = -1;
telek.alpha = 0.6;
};
if (telek.alpha <= 0.3){
alphaCourse = 1;
telek.alpha = 0.3;
};
}
private function clear(_arg1:Event):void{
noClear(_arg1);
extinction(CLEAR);
}
private function clearScores(_arg1:MouseEvent):void{
if (ClassSetDataGame.isGameStarted == true){
myQuation = new ClassQuations();
addChild(myQuation);
myQuation.addEventListener(myQuation.ClickOK, clear);
myQuation.addEventListener(myQuation.ClickNO, noClear);
};
}
private function goApStores(_arg1:Event):void{
ClassLinks.goToLink("goUpstore", "http://itunes.apple.com/app/physics-gamebox/id368037317?mt=8");
}
private function mouse_click_levels(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
numTekSelectLevel = Number(_local2.name.substring(2, 4));
ClassSetDataGame.tekLevel = numTekSelectLevel;
extinction(LEVEL);
}
private function mouse_out_levels(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
_local2.gotoAndStop("open");
(_local2.scores as TextField).visible = false;
_local2.scores.text = "";
}
private function goMenu(_arg1:MouseEvent):void{
extinction(MENU);
}
public function destroy():void{
var _local1:MovieClip;
movieSelector.but_bubble.removeEventListener(MouseEvent.CLICK, mouse_click_name);
(movieSelector as Object).butMenu.removeEventListener(MouseEvent.CLICK, goMenu);
(movieSelector as Object).but_clearScores.removeEventListener(MouseEvent.CLICK, clearScores);
(movieSelector as Object).but_as.removeEventListener(MouseEvent.CLICK, goApStores);
movieSelector.namePlayer.removeEventListener(MouseEvent.CLICK, mouse_click_name);
movieSelector.vive_Score.removeEventListener(MouseEvent.CLICK, vive_click_name);
removeEventListener(Event.ENTER_FRAME, update);
for each (_local1 in arrForeMovieLevel) {
_local1.removeEventListener(MouseEvent.MOUSE_OVER, mouse_on_levels);
_local1.removeEventListener(MouseEvent.MOUSE_OUT, mouse_out_levels);
_local1.removeEventListener(MouseEvent.CLICK, mouse_click_levels);
_local1.parent.removeChild(_local1);
_local1 = null;
};
arrForeMovieLevel = null;
while (movieSelector.numChildren) {
movieSelector.removeChildAt(0);
};
removeChild(movieSelector);
movieSelector = null;
total = null;
massivOpenLevels = null;
massivScores = null;
damping = null;
}
private function mouse_click_bubble(_arg1:MouseEvent):void{
ClassLinks.goToLink("bubbleFromSelector");
}
}
}//package StructureGame
Section 116
//ClassShowBadges (StructureGame.ClassShowBadges)
package StructureGame {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClassShowBadges extends ClassBaseStructureGameElement {
public const MENU:String = "MENU";
private var butMenu:SimpleButton;
public function ClassShowBadges(_arg1:Array){
var _local7:String;
var _local8:Class;
var _local9:MovieClip;
var _local10:Array;
var _local11:Boolean;
var _local12:String;
var _local13:MovieClip;
var _local14:TextFormat;
super("bagdes_show");
var _local2:Class = Ragdoll_3.swfMovies.getAssetClass("fon_badge");
var _local3:Number = 40;
var _local4:Number = 5;
var _local5:int;
var _local6:int;
while (_local6 < _arg1.length) {
_local7 = "";
if (_local6 < 9){
_local7 = "0";
};
_local8 = Ragdoll_3.swfMovies.getAssetClass((("badge_" + _local7) + (_local6 + 1)));
_local9 = new (_local8);
_local10 = _arg1[_local6];
_local11 = _local10[1];
_local12 = _local10[2];
_local13 = new (_local2);
_local9.x = ((_local9.width / 2) + 2);
_local9.y = ((_local9.height / 2) + 1);
_local13.addChild(_local9);
_local13.textAch.text = _local12;
if (!_local11){
_local13.gotoAndStop(1);
_local13.addChild(_local13.close);
_local9.alpha = 0.4;
(_local13.textAch as TextField).alpha = 0.5;
} else {
(_local13.close as MovieClip).visible = false;
_local13.gotoAndStop(2);
_local14 = new TextFormat();
_local14.size = 13;
_local14.color = 0x5500;
(_local13.textAch as TextField).setTextFormat(_local14);
};
_local13.x = _local4;
_local13.y = _local3;
movie.addChild(_local13);
movie.setChildIndex(_local13, 1);
_local4 = (_local4 + (_local13.width + 5));
_local5++;
if (_local5 == 3){
_local5 = 0;
_local3 = (_local3 + 59);
_local4 = 5;
};
_local6++;
};
setListeners();
}
private function mouse_click_bubble(_arg1:MouseEvent):void{
ClassLinks.goToLink("bubbleFromAchievements");
}
private function goMenu(_arg1:MouseEvent):void{
extinction(MENU);
}
override public function destroy():void{
movie.but_bubble.removeEventListener(MouseEvent.CLICK, mouse_click_bubble);
super.destroy();
butMenu.removeEventListener(MouseEvent.CLICK, goMenu);
butMenu = null;
}
private function setListeners():void{
butMenu = (movie as Object).butMenu;
butMenu.addEventListener(MouseEvent.CLICK, goMenu);
movie.but_bubble.addEventListener(MouseEvent.CLICK, mouse_click_bubble);
}
}
}//package StructureGame
Section 117
//ClassBaseBody (Tela.ClassBaseBody)
package Tela {
import flash.display.*;
import Box2D.Dynamics.*;
public class ClassBaseBody extends Sprite {
public var body:b2Body;
var bodyDef:b2BodyDef;
var pogreshnostVGabaritah:Number;
public var nameMoive:String;
public var movie:MovieClip;
var angle:Number;
public var userData:Object;
public var isStatic:Boolean;// = true
public var isLive:Boolean;// = true
public function ClassBaseBody(){
pogreshnostVGabaritah = ClassInformGame.pogreshnostVGabaritah;
}
public function destroy():void{
if (body){
body.m_world.DestroyBody(body);
body.m_userData = null;
body = null;
};
if (movie){
movie.parent.removeChild(movie);
movie.m_userData = null;
};
movie = null;
nameMoive = null;
bodyDef = null;
userData = null;
}
public function update():void{
if (body){
correctSpeedBody(body);
movie.x = (body.GetPosition().x * ClassWorld.m_physScale);
movie.y = (body.GetPosition().y * ClassWorld.m_physScale);
movie.rotation = (body.GetAngle() * (180 / Math.PI));
if ((((((((movie.x > 1000)) || ((movie.x < -500)))) || ((movie.y > 1000)))) || ((movie.y < -500)))){
isLive = false;
};
};
}
public function destroyBody():void{
body.m_world.DestroyBody(body);
body.m_userData = null;
body = null;
}
function create(_arg1:MovieClip):void{
if ((userData is ClassRagdoll)){
pogreshnostVGabaritah = 0;
};
movie = _arg1;
movie.m_userData = this;
nameMoive = movie.toString();
angle = movie.rotation;
movie.rotation = 0;
bodyDef = new b2BodyDef();
bodyDef.angle = (angle * (Math.PI / 180));
bodyDef.position.Set((movie.x / ClassWorld.m_physScale), (movie.y / ClassWorld.m_physScale));
body = ClassWorld.world.CreateBody(bodyDef);
body.SetBullet(true);
body.m_userData = this;
}
private function correctSpeedBody(_arg1:b2Body):void{
if (nameMoive.indexOf("Jump") > -1){
if (_arg1.m_linearVelocity.x > 10){
_arg1.m_linearVelocity.x = 9;
};
if (_arg1.m_linearVelocity.x < -10){
_arg1.m_linearVelocity.x = -9;
};
if ((((_arg1.m_linearVelocity.x > 0)) && ((_arg1.m_linearVelocity.x < 1)))){
_arg1.m_linearVelocity.x = 1.1;
};
if ((((_arg1.m_linearVelocity.y < 0)) && ((_arg1.m_linearVelocity.y > -1)))){
_arg1.m_linearVelocity.y = -0.1;
};
};
}
}
}//package Tela
Section 118
//ClassBomb (Tela.ClassBomb)
package Tela {
import flash.events.*;
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Contacts.*;
public class ClassBomb extends ClassBaseBody {
public var isBombStartBlast:Boolean;// = false
private var twopi:Number;// = 6.28318530717959
private var isFireBomb:Boolean;// = false
private var pauseContact:int;// = 0
private var isHide:Boolean;// = false
private var firstContactIsMade:Boolean;// = false
private var point_x:int;
private var waitForBlast:Boolean;// = false
private var forseBomb:int;// = 5
private var isFisic:Boolean;// = false
private var point_y:int;
private var movieT:MovieClip;
private var kolvoKontact:int;// = 0
private var startKolvoKontact:int;// = 0
private var waitTimeTestContact:int;
private var isCore:Boolean;
var isRagdolWas:Boolean;// = false
public var countOfBreakRagdoll:Number;// = 0
private var precision:int;// = 100
public function ClassBomb(_arg1:MovieClip, _arg2:Boolean=false){
var _local3:b2CircleDef;
super();
super.create(_arg1);
this.isCore = _arg2;
_arg1.gotoAndStop(1);
_local3 = new b2CircleDef();
var _local4:Number = ClassInformGame.bombRadius;
_local3.radius = (((_local4 * _arg1.scaleX) / ClassWorld.m_physScale) / 2);
_local3.density = 1;
_local3.restitution = 0.2;
_local3.friction = 0.5;
isStatic = false;
body.CreateShape(_local3);
_arg1.rotation = angle;
body.SetMassFromShapes();
if (_arg2){
addChild(_arg1);
waitTimeTestContact = 1;
} else {
waitTimeTestContact = 20;
};
addEventListener(Event.ENTER_FRAME, testFirstContactList);
_arg1.gotoAndStop(1);
}
override public function destroy():void{
movie.removeEventListener(Event.ENTER_FRAME, testContactList);
movie.removeEventListener(Event.ENTER_FRAME, waitBlast);
removeEventListener(Event.ENTER_FRAME, testFirstContactList);
super.destroy();
}
private function waitBlast(_arg1:Event):void{
if (movie.currentLabel == "blast"){
movie.removeEventListener(Event.ENTER_FRAME, waitBlast);
movie.removeEventListener(Event.ENTER_FRAME, waitBlast);
blast();
};
}
private function testFirstContactList(_arg1:Event):void{
var _local2:b2ContactEdge;
pauseContact++;
if (pauseContact > waitTimeTestContact){
removeEventListener(Event.ENTER_FRAME, testFirstContactList);
movie.addEventListener(Event.ENTER_FRAME, testContactList);
_local2 = body.m_contactList;
while (_local2) {
startKolvoKontact++;
_local2 = _local2.next;
};
firstContactIsMade = true;
};
}
public function timeBlast():void{
waitForBlast = true;
movie.gotoAndPlay("pauseBlast");
movie.addEventListener(Event.ENTER_FRAME, waitBlast);
}
public function setImpuls(_arg1:Number, _arg2:Number):void{
var _local3:b2Vec2 = new b2Vec2((-((movie.x - _arg1)) / 50), (-((movie.y - _arg2)) / 50));
body.ApplyImpulse(_local3, body.GetWorldCenter());
}
public function blast():void{
var _local1:b2Body;
var _local9:b2Body;
var _local10:b2Vec2;
if (isBombStartBlast){
return;
};
isBombStartBlast = true;
var _local2:b2CircleDef = new b2CircleDef();
var _local3:b2BodyDef = new b2BodyDef();
_local3.position.Set(body.GetPosition().x, body.GetPosition().y);
_local2.radius = (1.5 * movie.scaleX);
_local1 = body.m_world.CreateBody(_local3);
_local1.CreateShape(_local2);
_local1.SetBullet(true);
_local2.isSensor = true;
var _local4:b2ContactEdge = _local1.m_contactList;
while (_local4) {
_local9 = _local4.other;
if (((_local9.m_jointList) && ((_local9.m_jointList.joint.m_userData == "jointCanBreak")))){
if ((_local9.m_userData.userData is ClassRagdoll)){
forseBomb = 1;
if (Math.round((Math.random() * 3)) > 0){
if (_local9.m_userData.userData.isBreak == false){
countOfBreakRagdoll++;
};
_local9.m_userData.userData.isBreak = true;
ClassWorld.world.DestroyJoint(_local9.m_jointList.joint);
};
} else {
ClassWorld.world.DestroyJoint(_local9.m_jointList.joint);
};
};
if ((_local9.m_userData is ClassRolyPoly)){
(_local9.m_userData as ClassRolyPoly).die();
};
_local10 = new b2Vec2((((_local9.GetWorldCenter().x - _local1.GetWorldCenter().x) * forseBomb) * movie.scaleX), (((_local9.GetWorldCenter().y - _local1.GetWorldCenter().y) * forseBomb) * movie.scaleX));
if (((!((_local9.m_userData is ClassBomb))) && (!((_local9.m_userData is ClassRolyPoly))))){
_local9.ApplyImpulse(_local10, _local9.GetWorldCenter());
};
if ((((((_local9.m_userData is ClassBomb)) && (!((_local9.m_userData as ClassBomb).isBombStartBlast)))) && (((_local9.m_userData as ClassBomb).waitForBlast == false)))){
(_local9.m_userData as ClassBomb).isFireBomb = true;
(_local9.m_userData as ClassBomb).timeBlast();
};
_local4 = _local4.next;
};
_local1.m_world.DestroyBody(_local1);
_local1 = null;
var _local5:* = movie.parent;
var _local6:Number = movie.x;
var _local7:Number = movie.y;
var _local8:MovieClip = new ClassInformGame.classMovieBlastBomb();
_local8.x = _local6;
_local8.y = _local7;
_local8.scaleX = (movie.scaleX * 0.75);
_local8.scaleY = (movie.scaleY * 0.75);
if (isCore){
_local5.parent.addChild(_local5);
};
_local5.addChild(_local8);
isLive = false;
}
public function testContactList(_arg1:Event):void{
if (((!(firstContactIsMade)) || (isFireBomb))){
return;
};
kolvoKontact = 0;
var _local2:b2ContactEdge = body.m_contactList;
while (_local2) {
kolvoKontact++;
_local2 = _local2.next;
};
if (kolvoKontact > startKolvoKontact){
isFireBomb = true;
movie.gotoAndPlay("start");
movie.addEventListener(Event.ENTER_FRAME, waitBlast);
} else {
startKolvoKontact = kolvoKontact;
};
}
}
}//package Tela
Section 119
//ClassJoint (Tela.ClassJoint)
package Tela {
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.Shapes.*;
public class ClassJoint extends ClassBaseBody {
public function ClassJoint(_arg1:MovieClip){
var _local6:MovieClip;
var _local7:b2Body;
var _local8:int;
var _local9:b2Body;
var _local10:b2Joint;
super();
super.create(_arg1);
this.movie = _arg1;
var _local2:b2PolygonDef = new b2PolygonDef();
_local2.SetAsBox(((_arg1.width / ClassWorld.m_physScale) / 2), ((_arg1.height / ClassWorld.m_physScale) / 2));
_arg1.rotation = angle;
body.CreateShape(_local2);
isStatic = false;
isLive = false;
var _local3:Array = [];
var _local4:b2RevoluteJointDef = new b2RevoluteJointDef();
var _local5:int;
while (_local5 < _arg1.parent.numChildren) {
_local6 = (_arg1.parent.getChildAt(_local5) as MovieClip);
if (((((_local6) && (!((_local6 == _arg1))))) && (_local6.hasOwnProperty("m_userData")))){
if (_local6.hitTestObject(_arg1)){
_local7 = (_local6 as Object).m_userData.body;
_local8 = 0;
while (_local8 < _local3.length) {
_local9 = _local3[_local8];
if (_arg1.toString().indexOf("_fixed") > -1){
_local4.enableLimit = true;
_local4.collideConnected = false;
};
_local4.Initialize(_local7, _local9, new b2Vec2((_arg1.x / ClassWorld.m_physScale), (_arg1.y / ClassWorld.m_physScale)));
_local10 = ClassWorld.world.CreateJoint(_local4);
_local10.m_userData = "jointCanBreak";
_local8++;
};
_local3.push(_local7);
};
};
_local5++;
};
}
override public function destroy():void{
super.destroy();
}
}
}//package Tela
Section 120
//ClassMovingPlatformGorizont (Tela.ClassMovingPlatformGorizont)
package Tela {
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Contacts.*;
public class ClassMovingPlatformGorizont extends ClassBaseBody {
public const VERTICAL:String = "vertical";
public const GORIZONT:String = "gorizont";
public var type:String;
private var lp:Number;// = 1
public var isStop:Boolean;// = false
private var yMov:Number;// = 1
private var xMov:Number;// = 1
public function ClassMovingPlatformGorizont(_arg1:MovieClip){
super.create(_arg1);
var _local2:b2PolygonDef = new b2PolygonDef();
_local2.SetAsBox(((_arg1.width / ClassWorld.m_physScale) / 2), ((_arg1.height / ClassWorld.m_physScale) / 2));
isStatic = false;
body.CreateShape(_local2);
_arg1.rotation = angle;
}
override public function update():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:b2Body;
var _local6:MovieClip;
var _local7:b2ContactEdge;
var _local8:int;
super.update();
if (isStop){
return;
};
if (movie.toString().indexOf("_mpg") > -1){
movie.x = (movie.x + (xMov * lp));
body.m_type = 2;
body.SetXForm(new b2Vec2((movie.x / ClassWorld.m_physScale), (movie.y / ClassWorld.m_physScale)), 0);
_local7 = body.m_contactList;
while (_local7) {
_local5 = _local7.other;
_local6 = (_local5.m_userData.movie as MovieClip);
_local1 = ((movie.x - (movie.width / 2)) - 2);
_local2 = ((movie.x + (movie.width / 2)) + 2);
if (_local5.IsStatic()){
_local8 = ((movie.y - (movie.height / 2)) + 1);
while (_local8 < ((movie.y + (movie.height / 2)) - 1)) {
if (((_local6.hitTestPoint(_local1, _local8, true)) || (_local6.hitTestPoint(_local2, _local8, true)))){
lp = -(lp);
break;
};
_local8 = (_local8 + 1);
};
};
_local3 = (movie.y - (movie.height / 2));
_local8 = ((movie.x - (movie.width / 2)) + 5);
while (_local8 < ((movie.x + (movie.width / 2)) - 5)) {
if (_local6.hitTestPoint(_local8, (_local3 - 1), true)){
_local5.m_linearVelocity = new b2Vec2(((xMov * lp) * 1.05), _local5.m_linearVelocity.y);
_local5.m_angularVelocity = 0;
_local6.rotation = 0;
break;
};
_local8 = (_local8 + 1);
};
_local5.WakeUp();
_local7 = _local7.next;
};
} else {
movie.y = (movie.y + (yMov * lp));
body.m_type = 2;
body.SetXForm(new b2Vec2((movie.x / ClassWorld.m_physScale), (movie.y / ClassWorld.m_physScale)), 0);
_local7 = body.m_contactList;
while (_local7) {
_local5 = _local7.other;
_local6 = _local5.m_userData.movie;
_local3 = ((movie.y - (movie.height / 2)) - 2);
_local4 = ((movie.y + (movie.height / 2)) + 2);
_local8 = ((movie.x - (movie.width / 2)) + 3);
while (_local8 < ((movie.x + (movie.width / 2)) - 3)) {
if (((_local6.hitTestPoint(_local8, _local4, true)) || (_local6.hitTestPoint(_local8, _local3, true)))){
if (_local5.IsStatic()){
lp = -(lp);
break;
} else {
_local5.m_angularVelocity = 0;
};
};
_local8 = (_local8 + 1);
};
_local5.WakeUp();
_local7 = _local7.next;
};
};
body.m_type = 1;
}
override public function destroy():void{
super.destroy();
}
}
}//package Tela
Section 121
//ClassPushControll (Tela.ClassPushControll)
package Tela {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class ClassPushControll extends Sprite {
public const TAKE_CORE:String = "TAKE_CORE";
private var arrPush:Array;
private var i:int;// = 0
private var movieCore:MovieClip;
private var arrCoreForLevel:Array;
public function ClassPushControll(_arg1:Array){
arrCoreForLevel = new Array();
super();
this.arrPush = _arg1;
}
public function destroy():void{
arrCoreForLevel = null;
arrPush = null;
movieCore = null;
}
public function movieDulo(_arg1:Point):void{
var _local2:ClassPushka;
for each (_local2 in arrPush) {
_local2.duloRotation(_arg1.x, _arg1.y);
};
}
public function getArrCore():Array{
return (arrCoreForLevel);
}
public function shot():void{
var _local1:ClassPushka;
for each (_local1 in arrPush) {
_local1.showShot();
};
}
public function core(_arg1:Class):void{
var wait:Function;
var classCore = _arg1;
wait = function (_arg1:Event):void{
var _local2:ClassPushka;
i++;
if (i > 3){
removeEventListener(Event.ENTER_FRAME, wait);
arrCoreForLevel = [];
for each (_local2 in arrPush) {
movieCore = _local2.setKoordForCore(classCore);
arrCoreForLevel.push(movieCore);
};
dispatchEvent(new Event(TAKE_CORE));
i = 0;
};
};
addEventListener(Event.ENTER_FRAME, wait);
}
}
}//package Tela
Section 122
//ClassPushka (Tela.ClassPushka)
package Tela {
import flash.display.*;
import flash.geom.*;
public class ClassPushka extends Sprite {
private var movieDulo:MovieClip;
private var moviePushka:MovieClip;
private var mX:Number;
private var mY:Number;
private var isAimOutUP:Boolean;// = false
private var p:Number;// = 5
private var angle:Number;
private var isAimOutDown:Boolean;// = false
private var movieBaza:MovieClip;
private var isAimOut:Boolean;// = false
public function ClassPushka(_arg1:MovieClip){
this.moviePushka = _arg1;
movieDulo = (_arg1 as Object).duloPush;
movieBaza = (_arg1 as Object).bazaPush;
}
public function destroy():void{
movieDulo = null;
moviePushka = null;
moviePushka = null;
}
public function duloRotation(_arg1:Number, _arg2:Number):void{
var _local3:Number = (_arg1 - moviePushka.x);
var _local4:Number = -((_arg2 - moviePushka.y));
angle = (Math.atan((_local4 / _local3)) / (Math.PI / 180));
if (_local3 < 0){
angle = (angle + 180);
};
if ((((_local3 >= 0)) && ((_local4 < 0)))){
angle = (angle + 360);
};
if ((((((angle < 100)) || ((angle > 360)))) && (!(ClassMoveCursorMouse.isCursorMouseLeave)))){
if (isAimOut){
if ((movieDulo.rotation + angle) > 10){
movieDulo.rotation = (movieDulo.rotation - 8);
} else {
if ((movieDulo.rotation + angle) < -10){
movieDulo.rotation = (movieDulo.rotation + 8);
} else {
isAimOut = false;
movieDulo.rotation = -(angle);
};
};
} else {
movieDulo.rotation = -(angle);
};
isAimOutUP = false;
isAimOutDown = false;
p = 5;
mX = _arg1;
mY = _arg2;
} else {
if (movieDulo.rotation < 10){
mX = _arg1;
mY = _arg2;
movieDulo.rotation = (movieDulo.rotation + p);
p = (p - 0.2);
if (p < 0.4){
p = 0.4;
};
isAimOut = true;
if (angle < 120){
isAimOutUP = true;
} else {
isAimOutDown = true;
};
};
};
}
public function setKoordForCore(_arg1:Class):MovieClip{
var _local2:MovieClip = new (_arg1);
_local2.cacheAsBitmap = false;
var _local3:Number = (movieDulo.rotation - 1);
var _local4:Number = (movieDulo.x + (60 * Math.cos(((_local3 * Math.PI) / 180))));
var _local5:Number = (movieDulo.y + (60 * Math.sin(((_local3 * Math.PI) / 180))));
var _local6:Point = moviePushka.localToGlobal(new Point(_local4, _local5));
_local2.x = _local6.x;
_local2.y = _local6.y;
_local2.mX = mX;
_local2.mY = mY;
_local2.isAimOutUP = isAimOutUP;
_local2.isAimOutDown = isAimOutDown;
return (_local2);
}
public function showShot():void{
var _local1:String;
movieDulo.gotoAndPlay("fire");
if ((((angle > 50)) && ((angle < 300)))){
_local1 = "deformat";
} else {
_local1 = "otkat";
};
movieBaza.gotoAndPlay(_local1);
}
}
}//package Tela
Section 123
//ClassRagdoll (Tela.ClassRagdoll)
package Tela {
import flash.display.*;
import flash.geom.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
public class ClassRagdoll extends Sprite {
public var objectHandR:ClassBaseBody;
public var objectHead:ClassBaseBody;
public var isStartBreak:Boolean;
public var objectArmL:ClassBaseBody;
public var objectBodyq:ClassBaseBody;
private var movieRagdoll:MovieClip;
public var objectArmR:ClassBaseBody;
private var arrJoints:Array;
public var ScaleXY:Number;// = 1
public var isBreak:Boolean;// = false
public var isLive:Boolean;// = true
public var objectHandL:ClassBaseBody;
public var arrParts:Array;
public function ClassRagdoll(_arg1:MovieClip, _arg2:Boolean=false){
var _local4:MovieClip;
var _local5:Point;
var _local6:Point;
arrJoints = [];
arrParts = [];
super();
this.movieRagdoll = _arg1;
this.movieRagdoll.width = (this.movieRagdoll.width * ScaleXY);
this.movieRagdoll.height = (this.movieRagdoll.height * ScaleXY);
var _local3:int;
while (_local3 < _arg1.numChildren) {
_local4 = (_arg1.getChildAt(_local3) as MovieClip);
_local5 = new Point(_local4.x, _local4.y);
_local6 = _local4.parent.localToGlobal(_local5);
_local4.x = _local6.x;
_local4.y = _local6.y;
if (_arg2){
addChild(_local4);
};
_local3--;
_local3++;
};
parseRagdoll();
}
public function setImpuls(_arg1:Number, _arg2:Number):void{
var _local4:ClassBaseBody;
var _local5:b2Vec2;
var _local3:Number = 300;
for each (_local4 in arrParts) {
_local5 = new b2Vec2((-((_local4.movie.x - _arg1)) / _local3), (-((_local4.movie.y - _arg2)) / _local3));
_local4.body.ApplyImpulse(_local5, _local4.body.GetWorldCenter());
};
}
public function update():void{
var _local1:ClassBaseBody;
if (isLive == false){
return;
};
if (arrParts.length == 0){
isLive = false;
return;
};
var _local2:int;
while (_local2 < arrParts.length) {
_local1 = (arrParts[_local2] as ClassBaseBody);
if (_local1.isLive == false){
_local1.destroy();
_local1 = null;
arrParts.splice(_local2, 1);
_local2--;
} else {
_local1.update();
};
_local2++;
};
}
public function breakJoins(_arg1:Boolean=false):void{
}
public function textDistanceBetweenBodies():void{
}
private function parseRagdoll():void{
var _local2:MovieClip;
var _local3:b2Vec2;
var _local4:MovieClip;
var _local5:String;
var _local1:int;
while (_local1 < numChildren) {
_local4 = (getChildAt(_local1) as MovieClip);
_local5 = _local4.toString();
if (_local5.indexOf("head") > -1){
objectHead = new ClassTeloCircle(_local4, true, this);
};
if (_local5.indexOf("armL") > -1){
objectArmL = new ClassTeloBox(_local4, true, this);
};
if (_local5.indexOf("armR") > -1){
objectArmR = new ClassTeloBox(_local4, true, this);
};
if (_local5.indexOf("handL") > -1){
objectHandL = new ClassTeloBox(_local4, true, this);
};
if (_local5.indexOf("handR") > -1){
objectHandR = new ClassTeloBox(_local4, true, this);
};
if (_local5.indexOf("body") > -1){
objectBodyq = new ClassTeloBox(_local4, true, this);
};
_local1++;
};
_local2 = objectHead.movie;
_local3 = new b2Vec2((objectHead.movie.x / ClassWorld.m_physScale), ((objectHead.movie.y + (objectHead.movie.height / 2)) / ClassWorld.m_physScale));
setJoints(objectHead, objectBodyq, -20, 20, _local3);
_local2 = objectHandR.movie;
_local3 = new b2Vec2(((_local2.x - (_local2.width / 2)) / ClassWorld.m_physScale), (_local2.y / ClassWorld.m_physScale));
setJoints(objectHandR, objectBodyq, -70, 70, _local3);
_local2 = objectHandL.movie;
_local3 = new b2Vec2(((_local2.x + (_local2.width / 2)) / ClassWorld.m_physScale), (_local2.y / ClassWorld.m_physScale));
setJoints(objectBodyq, objectHandL, -70, 70, _local3);
_local2 = objectArmL.movie;
_local3 = new b2Vec2((_local2.x / ClassWorld.m_physScale), (((_local2.y - (_local2.height / 2)) - 1) / ClassWorld.m_physScale));
setJoints(objectArmL, objectBodyq, -30, 60, _local3);
_local2 = objectArmR.movie;
setJoints(objectArmR, objectBodyq, -60, 30, _local3);
arrParts = [objectHead, objectBodyq, objectHandR, objectHandL, objectArmL, objectArmR];
}
private function setJoints(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number, _arg5:b2Vec2):void{
var _local6:b2RevoluteJointDef = new b2RevoluteJointDef();
_local6.collideConnected = true;
_local6.enableLimit = true;
var _local7:MovieClip = _arg1.movie;
_local6.lowerAngle = (_arg3 / (180 / Math.PI));
_local6.upperAngle = (_arg4 / (180 / Math.PI));
_local6.Initialize(_arg2.body, _arg1.body, _arg5);
var _local8:b2Joint = ClassWorld.world.CreateJoint(_local6);
_local8.m_userData = "jointCanBreak";
arrJoints.push(_local8);
}
public function destroy():void{
while (arrParts.length > 0) {
(arrParts[0] as ClassBaseBody).destroy();
arrParts[0] = null;
arrParts.splice(0, 1);
};
arrJoints = [];
arrJoints = null;
movieRagdoll = null;
arrParts = null;
}
}
}//package Tela
Section 124
//ClassRevolute (Tela.ClassRevolute)
package Tela {
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.Shapes.*;
public class ClassRevolute extends ClassBaseBody {
public function ClassRevolute(_arg1:MovieClip){
var _local3:int;
var _local4:int;
var _local5:MovieClip;
var _local10:b2Body;
var _local11:b2Joint;
var _local12:int;
var _local13:b2Body;
super();
super.create(_arg1);
var _local2:b2CircleDef = new b2CircleDef();
_local2.radius = ((_arg1.width / ClassWorld.m_physScale) / 2);
_arg1.rotation = angle;
body.CreateShape(_local2);
_arg1.gotoAndPlay(1);
_arg1.alpha = 0.5;
var _local6:Array = [];
var _local7:b2RevoluteJointDef = new b2RevoluteJointDef();
var _local8:b2RevoluteJointDef = new b2RevoluteJointDef();
var _local9:int;
while (_local9 < _arg1.parent.numChildren) {
_local5 = (_arg1.parent.getChildAt(_local9) as MovieClip);
if (((((_local5) && (!((_local5 == _arg1))))) && (_local5.hasOwnProperty("m_userData")))){
if (_local5.hitTestPoint(_arg1.x, _arg1.y)){
_local10 = (_local5 as Object).m_userData.body;
if (_local10.IsStatic()){
_local10.SetMassFromShapes();
};
_local7.Initialize(body, _local10, new b2Vec2(body.GetPosition().x, body.GetPosition().y));
_local10.m_userData.movie.jointHere = 1;
if (_arg1.toString().indexOf("_motor") > -1){
_local7.enableMotor = true;
} else {
_local7.enableMotor = false;
};
_local7.motorSpeed = _arg1.rotation;
_local7.maxMotorTorque = 500;
_local11 = ClassWorld.world.CreateJoint(_local7);
_local11.m_userData = this;
_local12 = 0;
_local12 = 0;
while (_local12 < _local6.length) {
_local13 = _local6[_local12];
_local8.enableLimit = true;
_local8.collideConnected = false;
_local8.Initialize(_local10, _local13, new b2Vec2(_local10.GetPosition().x, _local10.GetPosition().y));
_local13.m_userData.movie.jointHere = 1;
_local10.m_userData.movie.jointHere = 1;
_local11 = ClassWorld.world.CreateJoint(_local8);
_local11.m_userData = this;
_local12++;
};
_local6.push(_local10);
};
};
_local9++;
};
}
}
}//package Tela
Section 125
//ClassRolyPoly (Tela.ClassRolyPoly)
package Tela {
import flash.events.*;
import flash.display.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Contacts.*;
public class ClassRolyPoly extends ClassBaseBody {
public const ANGRY:String = "angry";
public const NICE:String = "nice";
private var onPlank:Boolean;
private var pauseContact:Number;// = 0
private var firstContactIsMade:Boolean;
public var typeRolyPoly:String;
private var isIspug:Boolean;
private var radius:Number;// = 28
public var isCrash:Boolean;// = false
private var isCanAnimation:Boolean;
private var kolvoKontact:Number;// = 0
private var startKolvoKontact:Number;// = 0
private var ugol:int;// = 0
public var stopMoving:Boolean;
private var t:int;// = 0
public function ClassRolyPoly(_arg1:MovieClip){
super.create(_arg1);
if (nameMoive.indexOf("rolG1") > -1){
radius = 28;
};
var _local2:b2CircleDef = new b2CircleDef();
_local2.radius = (((radius * _arg1.scaleX) / ClassWorld.m_physScale) / 2);
_local2.density = 0.8;
_local2.restitution = 0.2;
_local2.friction = 0.2;
isStatic = false;
body.CreateShape(_local2);
_arg1.rotation = angle;
body.SetMassFromShapes();
if (nameMoive.indexOf("t_rolB") > -1){
typeRolyPoly = ANGRY;
} else {
typeRolyPoly = NICE;
};
_arg1.cacheAsBitmap = true;
_arg1.gotoAndPlay(1);
_arg1.addEventListener(Event.ENTER_FRAME, testFirstContactList);
}
private function testFirstContactList(_arg1:Event):void{
var _local2:b2ContactEdge;
pauseContact++;
if (pauseContact > 15){
movie.removeEventListener(Event.ENTER_FRAME, testFirstContactList);
_local2 = body.m_contactList;
while (_local2) {
startKolvoKontact++;
_local2 = _local2.next;
};
firstContactIsMade = true;
isCanAnimation = true;
};
}
public function animation():void{
var _local1:int;
var _local2:int;
var _local3:int;
if ((((isCanAnimation == true)) && ((movie.currentLabel == "stat")))){
_local1 = Math.round((Math.random() * 200));
_local2 = Math.round((Math.random() * 500));
_local3 = Math.round((Math.random() * 200));
if (_local1 == 30){
movie.gotoAndPlay("wink");
};
if (_local3 == 30){
movie.gotoAndPlay("talk");
soundTalk();
};
if (_local2 == 20){
movie.gotoAndPlay("jump");
};
if (_local2 == 30){
movie.gotoAndPlay("ДЕЙСТВИЕ");
};
if (_local2 == 40){
movie.gotoAndPlay("eyeRun");
};
};
}
public function die():void{
if (!isCrash){
isCrash = true;
isCanAnimation = false;
movie.gotoAndPlay("boom");
doAngel();
};
}
private function tim(_arg1:Event):void{
if (movie.currentLabel == "died"){
movie.stop();
doAngel();
};
}
private function soundTalk():void{
var _local1:Number;
_local1 = Math.random();
if (typeRolyPoly == ANGRY){
if (_local1 < 0.3){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.evilRolyYek1);
};
if ((((_local1 > 0.3)) && ((_local1 < 0.6)))){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.evilRolyYek2);
};
if (_local1 > 0.6){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.evilRolyYek3);
};
};
if (typeRolyPoly == NICE){
if (_local1 < 0.3){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.goodRolyYek1);
};
if ((((_local1 > 0.3)) && ((_local1 < 0.6)))){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.goodRolyYek2);
};
if (_local1 > 0.6){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.goodRolyYek3);
};
};
}
private function ispug():void{
if (!isIspug){
movie.gotoAndPlay("boom");
isIspug = true;
};
}
public function testContactMovie(_arg1:Array):Boolean{
var _local2:MovieClip;
for each (_local2 in _arg1) {
if (movie.hitTestObject(_local2)){
t++;
if (t > 20){
return (true);
};
};
};
return (false);
}
public function testContactList():void{
if (((((!((movie.currentLabel == "stat"))) || (!(firstContactIsMade)))) || (isCrash))){
return;
};
kolvoKontact = 0;
var _local1:b2ContactEdge = body.m_contactList;
while (_local1) {
kolvoKontact++;
_local1 = _local1.next;
};
if (kolvoKontact > startKolvoKontact){
oyi();
};
startKolvoKontact = kolvoKontact;
}
private function soundDie():void{
var _local1:Number;
_local1 = Math.random();
if (typeRolyPoly == ANGRY){
if (_local1 > 0.5){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.evilRolyDeath1);
};
if (_local1 < 0.5){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.evilRolyDeath2);
};
};
if (typeRolyPoly == NICE){
if (_local1 < 0.5){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.goodRolyDeath1);
};
if (_local1 > 0.5){
Ragdoll_3.objectSounds.playSound(Ragdoll_3.objectSounds.goodRolyDeath2);
};
};
}
private function doAngel():void{
var _local1 = "RPangel";
if (this.typeRolyPoly == this.ANGRY){
_local1 = "RPsceleton";
};
var _local2:Class = Ragdoll_3.swfMovies.getAssetClass(_local1);
var _local3:MovieClip = new (_local2);
_local3.x = movie.x;
_local3.y = movie.y;
movie.parent.addChild(_local3);
isLive = false;
soundDie();
}
public function povorachivaem():void{
var _local1:b2ContactEdge;
ugol = movie.rotation;
if (ugol != 0){
_local1 = body.m_contactList;
while (_local1) {
if ((_local1.other.m_userData is ClassMovingPlatformGorizont)){
onPlank = true;
break;
} else {
onPlank = false;
};
_local1 = _local1.next;
};
if (((!(isCrash)) && (((body.IsSleeping()) || (onPlank))))){
ugol = (ugol - ((ugol / Math.abs(ugol)) * 4));
movie.rotation = ugol;
body.SetXForm(body.GetPosition(), (ugol / (180 / Math.PI)));
if ((4 - Math.abs(ugol)) > 0){
body.SetXForm(body.GetPosition(), 0);
movie.rotation = 0;
isCanAnimation = true;
};
};
};
}
override public function destroy():void{
movie.removeEventListener(Event.ENTER_FRAME, testFirstContactList);
super.destroy();
}
private function oyi():void{
if (movie.currentLabel == "stat"){
movie.gotoAndPlay("talk");
};
}
}
}//package Tela
Section 126
//ClassTarget (Tela.ClassTarget)
package Tela {
import flash.display.*;
import Box2D.Collision.Shapes.*;
import PlayLevels.*;
public class ClassTarget extends ClassBaseBody {
private var twopi:Number;// = 6.28318530717959
private var point_x:Number;
private var point_y:Number;
private var precision:Number;// = 50
public function ClassTarget(_arg1:MovieClip){
super.create(_arg1);
if (nameMoive.indexOf("Box") > -1){
createBox();
};
if (nameMoive.indexOf("Circle") > -1){
createCircle();
};
}
private function createCircle():void{
var _local1:b2CircleDef = new b2CircleDef();
_local1.radius = ((movie.width / ClassWorld.m_physScale) / 2);
_local1.density = 0.8;
_local1.restitution = 0.2;
_local1.friction = 0.2;
if (nameMoive.indexOf("Jump") > -1){
_local1.density = 1;
_local1.restitution = 1.1;
_local1.friction = 0.01;
};
isStatic = false;
body.CreateShape(_local1);
movie.rotation = angle;
body.SetMassFromShapes();
nameMoive = "targetCircle";
}
public function testContact():Boolean{
if (ClassContactListener.isTargetTerminate){
ClassContactListener.isTargetTerminate = false;
return (true);
};
return (false);
}
private function createBox():void{
var _local1:b2PolygonDef = new b2PolygonDef();
_local1.SetAsBox(((movie.width / ClassWorld.m_physScale) / 2), ((movie.height / ClassWorld.m_physScale) / 2));
_local1.density = 1;
_local1.restitution = 0.1;
_local1.friction = 0.1;
if (nameMoive.indexOf("Jump") > -1){
_local1.restitution = 0.95;
};
isStatic = false;
body.CreateShape(_local1);
movie.rotation = angle;
body.SetMassFromShapes();
nameMoive = "targetBox";
}
override public function destroy():void{
super.destroy();
}
}
}//package Tela
Section 127
//ClassTeloBox (Tela.ClassTeloBox)
package Tela {
import flash.display.*;
import Box2D.Collision.Shapes.*;
public class ClassTeloBox extends ClassBaseBody {
public function ClassTeloBox(_arg1:MovieClip, _arg2:Boolean=true, _arg3:Object=null){
this.userData = _arg3;
super.create(_arg1);
var _local4:b2PolygonDef = new b2PolygonDef();
_local4.SetAsBox((((_arg1.width + pogreshnostVGabaritah) / ClassWorld.m_physScale) / 2), (((_arg1.height + pogreshnostVGabaritah) / ClassWorld.m_physScale) / 2));
if (_arg2){
_local4.density = 1;
_local4.restitution = 0.1;
_local4.friction = 0.2;
isStatic = false;
if (nameMoive.indexOf("Jump") > -1){
_local4.density = 0.5;
_local4.restitution = 1.1;
_local4.friction = 0.3;
};
if (nameMoive.indexOf("Tree") > -1){
};
if ((((nameMoive.indexOf("_bh_") > -1)) || ((nameMoive.indexOf("_b_") > -1)))){
_local4.density = 0.2;
};
};
body.CreateShape(_local4);
_arg1.rotation = angle;
body.SetMassFromShapes();
}
override public function destroy():void{
super.destroy();
}
}
}//package Tela
Section 128
//ClassTeloCircle (Tela.ClassTeloCircle)
package Tela {
import flash.display.*;
import Box2D.Collision.Shapes.*;
public class ClassTeloCircle extends ClassBaseBody {
public function ClassTeloCircle(_arg1:MovieClip, _arg2:Boolean=true, _arg3:Object=null){
super.create(_arg1);
this.userData = _arg3;
var _local4:b2CircleDef = new b2CircleDef();
_local4.radius = (((_arg1.width + pogreshnostVGabaritah) / ClassWorld.m_physScale) / 2);
if (_arg2){
_local4.restitution = 0.1;
_local4.friction = 0.1;
if (nameMoive.indexOf("_cz_") > -1){
_local4.density = 3;
} else {
if (nameMoive.indexOf("_cLight_") > -1){
_local4.density = 0.05;
} else {
if (nameMoive.indexOf("Jump") > -1){
_local4.density = 1;
_local4.restitution = 1.1;
_local4.friction = 0.01;
} else {
if (nameMoive.indexOf("Water") > -1){
_local4.density = 1;
_local4.restitution = 0.5;
_local4.friction = 0;
} else {
_local4.density = 1;
};
};
};
};
isStatic = false;
};
body.CreateShape(_local4);
_arg1.rotation = angle;
body.SetMassFromShapes();
}
override public function destroy():void{
super.destroy();
}
}
}//package Tela
Section 129
//ClassTeloTringle (Tela.ClassTeloTringle)
package Tela {
import flash.display.*;
import Box2D.Collision.Shapes.*;
public class ClassTeloTringle extends ClassBaseBody {
public function ClassTeloTringle(_arg1:MovieClip, _arg2:Boolean=true){
super.create(_arg1);
var _local3:b2PolygonDef = new b2PolygonDef();
_local3.vertexCount = 3;
_local3.vertices[0].Set(0, -(((_arg1.height / 2) / ClassWorld.m_physScale)));
_local3.vertices[1].Set(((_arg1.width / 2) / ClassWorld.m_physScale), ((_arg1.height / 2) / ClassWorld.m_physScale));
_local3.vertices[2].Set(-(((_arg1.width / 2) / ClassWorld.m_physScale)), ((_arg1.height / 2) / ClassWorld.m_physScale));
if (_arg2){
_local3.density = 0.8;
_local3.friction = 0.2;
_local3.restitution = 0.2;
isStatic = false;
};
body.CreateShape(_local3);
_arg1.rotation = angle;
body.SetMassFromShapes();
}
override public function destroy():void{
super.destroy();
}
}
}//package Tela
Section 130
//ClassWorld (Tela.ClassWorld)
package Tela {
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Collision.*;
import PlayLevels.*;
public class ClassWorld extends Sprite {
public static const m_iterations:int = 10;
public static const m_timeStep:Number = 0.0333333333333333;
public static const m_physScale:Number = 30;
public static var world:b2World;
public function ClassWorld(){
var _local1:b2AABB = new b2AABB();
_local1.lowerBound.Set(-500, -500);
_local1.upperBound.Set(500, 500);
var _local2:b2Vec2 = new b2Vec2(0, 10);
var _local3:Boolean;
world = new b2World(_local1, _local2, _local3);
ClassContactListener.isTargetTerminate = false;
world.SetContactListener(new ClassContactListener());
}
public function destroy():void{
var _local2:*;
var _local1:b2Body = world.m_bodyList;
while (_local1) {
_local2 = _local1.m_userData;
if (_local2){
_local2.destroy();
};
_local1 = _local1.m_next;
};
}
}
}//package Tela
Section 131
//ApplicationAssetsRoly (ApplicationAssetsRoly)
package {
import flash.events.*;
import flash.display.*;
import flash.system.*;
public class ApplicationAssetsRoly extends EventDispatcher {
private var Asset:Class;
private var appDomain:ApplicationDomain;
public function ApplicationAssetsRoly():void{
Asset = ApplicationAssetsRoly_Asset;
super();
}
public function init():void{
var _local1:Loader = new Loader();
_local1.contentLoaderInfo.addEventListener(Event.INIT, assetsInitHandler);
_local1.loadBytes(new Asset());
}
public function getAssetClass(_arg1:String):Class{
if (!appDomain.hasDefinition(_arg1)){
trace((("*Error*: There is no definition of class '" + _arg1) + "'"));
return (null);
};
return ((appDomain.getDefinition(_arg1) as Class));
}
private function assetsInitHandler(_arg1:Event):void{
appDomain = _arg1.target.content.loaderInfo.applicationDomain;
dispatchEvent(new Event(Event.INIT));
}
}
}//package
Section 132
//ApplicationAssetsRoly_Asset (ApplicationAssetsRoly_Asset)
package {
import mx.core.*;
public class ApplicationAssetsRoly_Asset extends ByteArrayAsset {
}
}//package
Section 133
//ClassAllLevels (ClassAllLevels)
package {
public class ClassAllLevels {
private var nameGame:String;
public function ClassAllLevels(_arg1:String){
this.nameGame = _arg1;
}
public function getStrLevel(_arg1:Number):XML{
if (nameGame == ClassInformGame.RAGDOLL){
return ((levelsRAGDOLL() as Array)[(_arg1 - 1)]);
};
if (nameGame == ClassInformGame.ROLYPOLY){
return ((ClassAllLevelsRoly.levelsRoly() as Array)[(_arg1 - 1)]);
};
return (null);
}
private function levelsRAGDOLL():Array{
var _local1:XML;
var _local2:Array = [];
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="3" numberLevel="1" nameLevel="LEVEL 1">
<bodies>
<body name="pic_trava2" x="108" rotation="0" width="148" height="15" y="407"/>
<body name="pic_les" x="308" rotation="0" width="252" height="158" y="343"/>
<body name="pic_trava2" x="508" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="656" rotation="0" width="148" height="15" y="408"/>
<body name="pic_grib1" x="25" rotation="0" width="40" height="57" y="239"/>
<body name="pic_solnce" x="87" rotation="0" width="116" height="103" y="61"/>
<body name="pic_oblako3" x="440" rotation="0" width="109" height="18" y="40"/>
<body name="pic_oblako3" x="237" rotation="0" width="181" height="30" y="85"/>
<body name="pic_bereza" x="632" rotation="0" width="58" height="124" y="349"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_bk2_d" x="494" rotation="-45" width="294" height="17" y="-133"/>
<body name="t_bk2_d" x="465" rotation="0" width="133" height="17" y="-163"/>
<body name="t_bk2_d" x="433" rotation="45" width="294" height="17" y="-135"/>
<body name="targetBox" x="465" rotation="0" width="56" height="26" y="-309"/>
<body name="t_joint_fixed" x="510" rotation="0" width="15" height="15" y="-156"/>
<body name="t_joint_fixed" x="476" rotation="0" width="15" height="15" y="-99"/>
<body name="t_joint_fixed" x="462" rotation="0" width="15" height="15" y="-91"/>
<body name="t_joint_fixed" x="460" rotation="0" width="15" height="15" y="-109"/>
<body name="t_joint_fixed" x="531" rotation="0" width="15" height="15" y="-167"/>
<body name="t_joint_fixed" x="427" rotation="0" width="15" height="15" y="-154"/>
<body name="t_joint_fixed" x="404" rotation="0" width="15" height="15" y="-170"/>
<body name="t_joint_fixed" x="415" rotation="0" width="15" height="15" y="-164"/>
<body name="t_joint_fixed" x="522" rotation="0" width="15" height="15" y="-158"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="2" nickLevel="Johnny-K" nameLevel="LEVEL 2" fon="3">
<bodies>
<body name="pic_trava" x="520" rotation="0" width="329" height="61" y="386"/>
<body name="pic_trava2" x="29" rotation="0" width="148" height="15" y="406"/>
<body name="pic_solnce" x="619" rotation="0" width="107" height="95" y="53"/>
<body name="pic_oblako3" x="480" rotation="0" width="212" height="35" y="76"/>
<body name="pic_oblako3" x="243" rotation="0" width="145" height="24" y="31"/>
<body name="pic_grib1" x="28" rotation="0" width="40" height="57" y="184"/>
<body name="pic_les" x="228" rotation="0" width="252" height="158" y="341"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="415"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="183"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="186"/>
<body name="t_bs_s" x="447" rotation="0" width="200" height="12" y="253"/>
<body name="t_bs_s" x="448" rotation="0" width="200" height="12" y="198"/>
<body name="targetCircle" x="537" rotation="0" width="45" height="45" y="226"/>
<body name="t_c_d" x="351" rotation="0" width="46" height="45" y="226"/>
<body name="t_pushka" x="25" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="3" nickLevel="Johnny-K" nameLevel="LEVEL 3" fon="1">
<bodies>
<body name="pic_dom2" x="325" rotation="0" width="139" height="121" y="354"/>
<body name="pic_trava" x="543" rotation="0" width="292" height="54" y="390"/>
<body name="pic_trava2" x="324" rotation="0" width="148" height="15" y="409"/>
<body name="pic_trava2" x="179" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="35" rotation="0" width="148" height="15" y="408"/>
<body name="pic_grib1" x="25" rotation="0" width="40" height="57" y="228"/>
<body name="pic_solnce" x="617" rotation="0" width="90" height="80" y="64"/>
<body name="pic_oblako3" x="337" rotation="0" width="175" height="29" y="63"/>
<body name="pic_oblako3" x="133" rotation="0" width="105" height="17" y="50"/>
<body name="pic_oblako3" x="512" rotation="0" width="92" height="15" y="27"/>
<body name="pic_dub" x="163" rotation="0" width="172" height="194" y="321"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_mpg_d" x="70" rotation="0" width="121" height="11" y="292"/>
<body name="t_mpg_d" x="368" rotation="0" width="121" height="11" y="138"/>
<body name="targetBox" x="374" rotation="0" width="56" height="26" y="120"/>
<body name="t_mpg_d" x="535" rotation="0" width="121" height="11" y="242"/>
<body name="t_mpg_d" x="208" rotation="0" width="121" height="11" y="194"/>
<body name="t_bh_d" x="213" rotation="0" width="69" height="24" y="179"/>
<body name="t_mpg_d" x="530" rotation="0" width="121" height="11" y="82"/>
<body name="t_b_d" x="532" rotation="0" width="57" height="26" y="68"/>
<body name="t_bk_d" x="69" rotation="0" width="54" height="31" y="276"/>
<body name="t_bh_d" x="534" rotation="0" width="69" height="24" y="228"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="4" nickLevel="Johnny-K" nameLevel="LEVEL 4" fon="2">
<bodies>
<body name="pic_planeta" x="589" rotation="0" width="115" height="115" y="142"/>
<body name="pic_saturn" x="90" rotation="0" width="126" height="81" y="76"/>
<body name="pic_star" x="123" rotation="0" width="14" height="14" y="225"/>
<body name="pic_star" x="213" rotation="0" width="14" height="14" y="114"/>
<body name="pic_star" x="258" rotation="0" width="14" height="14" y="299"/>
<body name="pic_star" x="464" rotation="0" width="14" height="14" y="80"/>
<body name="pic_star" x="616" rotation="0" width="14" height="14" y="287"/>
<body name="pic_star" x="465" rotation="0" width="14" height="14" y="291"/>
<body name="pic_star" x="44" rotation="0" width="14" height="14" y="339"/>
<body name="pic_star" x="643" rotation="0" width="14" height="14" y="391"/>
<body name="pic_star" x="292" rotation="0" width="14" height="14" y="409"/>
<body name="pic_star" x="657" rotation="0" width="14" height="14" y="40"/>
<body name="pic_star" x="255" rotation="0" width="14" height="14" y="23"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="50" rotation="0" width="100" height="10" y="415"/>
<body name="t_bh_d" x="331" rotation="90" width="109" height="24" y="299"/>
<body name="t_bh_d" x="368" rotation="90" width="109" height="24" y="300"/>
<body name="t_cLight_d" x="348" rotation="0" width="73" height="72" y="97"/>
<body name="t_bk_d" x="363" rotation="90" width="33" height="21" y="218"/>
<body name="t_bk_d" x="332" rotation="90" width="33" height="21" y="217"/>
<body name="t_bh_d" x="418" rotation="0" width="90" height="24" y="144"/>
<body name="t_bh_d" x="278" rotation="0" width="90" height="24" y="147"/>
<body name="t_b_d" x="348" rotation="90" width="121" height="51" y="190"/>
<body name="targetCircle" x="465" rotation="0" width="36" height="36" y="214"/>
<body name="t_cz_d" x="457" rotation="0" width="15" height="18" y="160"/>
<body name="t_cz_d" x="460" rotation="0" width="15" height="18" y="176"/>
<body name="t_cz_d" x="462" rotation="0" width="15" height="18" y="191"/>
<body name="t_joint" x="455" rotation="0" width="17" height="17" y="149"/>
<body name="t_joint" x="458" rotation="0" width="10" height="10" y="167"/>
<body name="t_joint" x="459" rotation="0" width="10" height="10" y="185"/>
<body name="t_joint" x="463" rotation="0" width="10" height="10" y="199"/>
<body name="t_joint_fixed" x="368" rotation="0" width="15" height="15" y="225"/>
<body name="t_joint_fixed" x="329" rotation="0" width="15" height="15" y="224"/>
<body name="t_joint_fixed" x="350" rotation="0" width="15" height="15" y="131"/>
<body name="t_joint" x="370" rotation="0" width="17" height="17" y="245"/>
<body name="t_joint" x="335" rotation="0" width="17" height="17" y="246"/>
<body name="t_joint" x="374" rotation="0" width="17" height="17" y="145"/>
<body name="t_joint" x="324" rotation="0" width="17" height="17" y="145"/>
<body name="t_revolute_motor" x="348" rotation="1" width="20" height="20" y="179"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="5" nickLevel="Johnny-K" fon="2" nameLevel="Level 5">
<bodies>
<body name="pic_oblako3" x="162" rotation="0" width="175" height="29" y="104"/>
<body name="pic_oblako3" x="616" rotation="0" width="157" height="26" y="67"/>
<body name="pic_planeta" x="42" rotation="0" width="64" height="64" y="59"/>
<body name="pic_kiparis" x="644" rotation="0" width="38" height="21" y="299"/>
<body name="pic_oblako3" x="331" rotation="0" width="103" height="17" y="69"/>
<body name="pic_grib2" x="671" rotation="0" width="32" height="50" y="219"/>
<body name="pic_les" x="233" rotation="0" width="380" height="238" y="308"/>
<body name="pic_trava2" x="486" rotation="0" width="148" height="15" y="408"/>
<body name="t_bs_s" x="444" rotation="0" width="283" height="12" y="125"/>
<body name="t_bb_s" x="655" rotation="0" width="75" height="35" y="358"/>
<body name="t_bb_s" x="671" rotation="0" width="75" height="35" y="324"/>
<body name="t_bb_s" x="689" rotation="0" width="75" height="35" y="292"/>
<body name="t_bb_s" x="707" rotation="0" width="75" height="35" y="258"/>
<body name="t_bb_s" x="721" rotation="0" width="75" height="35" y="225"/>
<body name="t_bs_s" x="523" rotation="90" width="242" height="12" y="198"/>
<body name="t_bb_s" x="625" rotation="0" width="140" height="49" y="397"/>
<body name="t_b2_s" x="214" rotation="0" width="690" height="10" y="416"/>
<body name="t_ck_d" x="602" rotation="0" width="37" height="36" y="357"/>
<body name="targetBox" x="574" rotation="0" width="56" height="26" y="244"/>
<body name="t_cz_d" x="573" rotation="0" width="15" height="18" y="224"/>
<body name="t_cz_d" x="573" rotation="0" width="15" height="18" y="210"/>
<body name="t_cz_d" x="573" rotation="0" width="15" height="18" y="196"/>
<body name="t_cz_d" x="573" rotation="0" width="15" height="18" y="181"/>
<body name="t_cz_d" x="572" rotation="0" width="15" height="18" y="165"/>
<body name="t_cz_d" x="572" rotation="0" width="15" height="18" y="150"/>
<body name="t_cz_d" x="572" rotation="0" width="15" height="18" y="137"/>
<body name="t_o_d" x="573" rotation="0" width="14" height="16" y="114"/>
<body name="t_o_d" x="316" rotation="0" width="14" height="16" y="114"/>
<body name="t_o_d" x="396" rotation="0" width="14" height="16" y="114"/>
<body name="t_o_d" x="477" rotation="0" width="14" height="16" y="114"/>
<body name="t_joint" x="572" rotation="0" width="17" height="17" y="129"/>
<body name="t_joint" x="570" rotation="0" width="17" height="17" y="146"/>
<body name="t_joint" x="572" rotation="0" width="17" height="17" y="159"/>
<body name="t_joint" x="573" rotation="0" width="17" height="17" y="176"/>
<body name="t_joint" x="572" rotation="0" width="17" height="17" y="193"/>
<body name="t_joint" x="572" rotation="0" width="17" height="17" y="204"/>
<body name="t_joint" x="574" rotation="0" width="17" height="17" y="220"/>
<body name="t_joint" x="574" rotation="0" width="17" height="17" y="232"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="3" numberLevel="6" nameLevel="LEVEL 6" nickLevel="Johnny-K">
<bodies>
<body name="pic_les" x="166" rotation="0" width="252" height="158" y="340"/>
<body name="pic_oblako3" x="466" rotation="0" width="187" height="31" y="37"/>
<body name="pic_oblako3" x="118" rotation="0" width="105" height="17" y="78"/>
<body name="t_b2_s" x="200" rotation="0" width="400" height="10" y="414"/>
<body name="t_b2_s" x="686" rotation="90" width="430" height="10" y="205"/>
<body name="t_b2_s" x="4" rotation="90" width="430" height="10" y="212"/>
<body name="t_bb_s" x="346" rotation="0" width="110" height="48" y="385"/>
<body name="t_bb_s" x="336" rotation="0" width="110" height="48" y="336"/>
<body name="t_bb_s" x="325" rotation="0" width="110" height="48" y="287"/>
<body name="t_bb_s" x="313" rotation="0" width="110" height="48" y="238"/>
<body name="t_bb_s" x="302" rotation="0" width="110" height="48" y="188"/>
<body name="t_bb_s" x="288" rotation="0" width="110" height="48" y="138"/>
<body name="t_bb_s" x="276" rotation="0" width="110" height="48" y="88"/>
<body name="t_bb_s" x="264" rotation="0" width="110" height="48" y="39"/>
<body name="t_bb_s" x="583" rotation="90" width="61" height="32" y="224"/>
<body name="targetBox" x="634" rotation="0" width="56" height="26" y="171"/>
<body name="t_bk2_d" x="544" rotation="0" width="234" height="12" y="190"/>
<body name="t_pushka" x="24" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 7" nickLevel="Johnny-K" numberLevel="7" fon="3">
<bodies>
<body name="pic_palmy" x="119" rotation="0" width="236" height="143" y="339"/>
<body name="pic_trava2" x="83" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="230" rotation="0" width="148" height="15" y="408"/>
<body name="pic_oblako3" x="120" rotation="0" width="178" height="29" y="79"/>
<body name="pic_oblako3" x="424" rotation="0" width="123" height="20" y="37"/>
<body name="pic_grib1" x="328" rotation="0" width="40" height="57" y="351"/>
<body name="pic_pautina2" x="658" rotation="0" width="49" height="52" y="33"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="186"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="182"/>
<body name="t_b2_s" x="352" rotation="0" width="690" height="10" y="4"/>
<body name="t_bb_s" x="535" rotation="0" width="110" height="48" y="372"/>
<body name="t_bb_s" x="530" rotation="0" width="110" height="48" y="109"/>
<body name="t_b2_s" x="110" rotation="0" width="400" height="10" y="416"/>
<body name="t_bb_s" x="269" rotation="0" width="80" height="37" y="102"/>
<body name="t_bb_s" x="269" rotation="0" width="80" height="37" y="175"/>
<body name="t_bb_s" x="270" rotation="0" width="80" height="37" y="247"/>
<body name="t_bb_s" x="268" rotation="0" width="80" height="37" y="27"/>
<body name="t_b2_s" x="17" rotation="0" width="50" height="10" y="245"/>
<body name="t_bb_s" x="269" rotation="0" width="80" height="37" y="283"/>
<body name="t_bb_s" x="271" rotation="0" width="80" height="37" y="319"/>
<body name="t_bb_s" x="271" rotation="0" width="80" height="37" y="356"/>
<body name="t_bb_s" x="271" rotation="0" width="80" height="37" y="392"/>
<body name="t_bb_s" x="532" rotation="0" width="110" height="48" y="227"/>
<body name="t_btarg_d" x="535" rotation="0" width="56" height="27" y="336"/>
<body name="t_btarg2_d" x="528" rotation="0" width="56" height="27" y="73"/>
<body name="t_b_d" x="282" rotation="0" width="57" height="39" y="213"/>
<body name="t_b_d" x="281" rotation="0" width="57" height="39" y="140"/>
<body name="t_b_d" x="281" rotation="0" width="57" height="39" y="66"/>
<body name="targetBox" x="533" rotation="0" width="56" height="26" y="191"/>
<body name="t_pushka" x="22" rotation="0" width="56" height="40" y="226"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="8" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 8">
<bodies>
<body name="pic_trava2" x="196" rotation="0" width="96" height="10" y="93"/>
<body name="pic_trava2" x="314" rotation="0" width="148" height="15" y="93"/>
<body name="pic_trava2" x="462" rotation="0" width="148" height="15" y="93"/>
<body name="pic_kaktus" x="212" rotation="0" width="45" height="92" y="61"/>
<body name="pic_kaktus" x="625" rotation="0" width="31" height="63" y="67"/>
<body name="pic_kaktus2" x="569" rotation="0" width="24" height="58" y="74"/>
<body name="pic_kiparis" x="398" rotation="0" width="102" height="57" y="69"/>
<body name="pic_derevja" x="113" rotation="0" width="225" height="222" y="304"/>
<body name="pic_trava2" x="160" rotation="0" width="306" height="31" y="402"/>
<body name="pic_oblako3" x="499" rotation="0" width="60" height="10" y="26"/>
<body name="pic_solnce" x="31" rotation="0" width="62" height="55" y="32"/>
<body name="pic_oblako3" x="294" rotation="0" width="105" height="17" y="25"/>
<body name="pic_trava2" x="608" rotation="0" width="148" height="15" y="93"/>
<body name="pic_trava2" x="457" rotation="0" width="306" height="31" y="402"/>
<body name="t_b2_s" x="5" rotation="90" width="460" height="10" y="185"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="186"/>
<body name="t_b2_s" x="350" rotation="0" width="690" height="10" y="4"/>
<body name="t_bb_s" x="203" rotation="0" width="110" height="48" y="119"/>
<body name="t_bb_s" x="310" rotation="0" width="110" height="48" y="120"/>
<body name="t_bb_s" x="417" rotation="0" width="110" height="48" y="120"/>
<body name="t_bb_s" x="524" rotation="0" width="110" height="48" y="119"/>
<body name="t_bb_s" x="630" rotation="0" width="110" height="48" y="120"/>
<body name="t_b2_s" x="280" rotation="0" width="690" height="10" y="415"/>
<body name="t_bk2_d" x="578" rotation="90" width="198" height="15" y="277"/>
<body name="t_bk2_d" x="578" rotation="0" width="198" height="15" y="278"/>
<body name="t_bk2_d" x="420" rotation="0" width="198" height="15" y="295"/>
<body name="t_bk2_d" x="420" rotation="90" width="198" height="15" y="294"/>
<body name="t_bk2_d" x="257" rotation="0" width="198" height="15" y="311"/>
<body name="t_bk2_d" x="257" rotation="90" width="198" height="15" y="310"/>
<body name="t_bk_d" x="598" rotation="0" width="33" height="21" y="403"/>
<body name="targetCircle" x="611" rotation="0" width="49" height="49" y="369"/>
<body name="t_revolute" x="578" rotation="0" width="11" height="11" y="278"/>
<body name="t_revolute" x="420" rotation="0" width="11" height="11" y="295"/>
<body name="t_revolute" x="257" rotation="0" width="11" height="11" y="311"/>
<body name="t_pushka" x="27" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" numberLevel="9" nameLevel="LEVEL 9" fon="3">
<bodies>
<body name="pic_trava2" x="377" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="526" rotation="0" width="152" height="15" y="408"/>
<body name="pic_kiparis" x="521" rotation="0" width="102" height="57" y="384"/>
<body name="pic_grib1" x="25" rotation="0" width="40" height="57" y="277"/>
<body name="pic_grib2" x="671" rotation="0" width="32" height="50" y="337"/>
<body name="pic_solnce" x="121" rotation="0" width="109" height="96" y="60"/>
<body name="pic_oblako3" x="227" rotation="0" width="205" height="34" y="93"/>
<body name="pic_oblako3" x="425" rotation="0" width="151" height="25" y="37"/>
<body name="pic_trava2" x="595" rotation="0" width="148" height="15" y="92"/>
<body name="pic_trava2" x="460" rotation="0" width="148" height="15" y="92"/>
<body name="pic_kust" x="505" rotation="0" width="59" height="67" y="66"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_bs_s" x="392" rotation="90" width="283" height="12" y="235"/>
<body name="t_bs_s" x="528" rotation="0" width="283" height="12" y="99"/>
<body name="t_b2_s" x="453" rotation="0" width="303" height="10" y="416"/>
<body name="t_b2_s" x="25" rotation="0" width="50" height="10" y="415"/>
<body name="t_btarg_d" x="575" rotation="0" width="56" height="27" y="221"/>
<body name="t_b_d" x="382" rotation="0" width="57" height="39" y="393"/>
<body name="targetBox" x="441" rotation="0" width="56" height="26" y="222"/>
<body name="t_cz_d" x="574" rotation="0" width="16" height="20" y="184"/>
<body name="t_cz_d" x="574" rotation="0" width="16" height="20" y="168"/>
<body name="t_cz_d" x="574" rotation="0" width="16" height="20" y="153"/>
<body name="t_cz_d" x="573" rotation="0" width="16" height="20" y="138"/>
<body name="t_cz_d" x="574" rotation="0" width="16" height="20" y="124"/>
<body name="t_cz_d" x="574" rotation="0" width="16" height="20" y="110"/>
<body name="t_cz_d" x="440" rotation="0" width="16" height="20" y="186"/>
<body name="t_cz_d" x="440" rotation="0" width="16" height="20" y="170"/>
<body name="t_cz_d" x="440" rotation="0" width="16" height="20" y="155"/>
<body name="t_cz_d" x="439" rotation="0" width="16" height="20" y="140"/>
<body name="t_cz_d" x="440" rotation="0" width="16" height="20" y="126"/>
<body name="t_cz_d" x="440" rotation="0" width="16" height="20" y="112"/>
<body name="t_cz_d" x="440" rotation="0" width="16" height="20" y="201"/>
<body name="t_cz_d" x="574" rotation="0" width="16" height="20" y="201"/>
<body name="t_o_d" x="570" rotation="0" width="14" height="16" y="90"/>
<body name="t_o_d" x="441" rotation="0" width="14" height="16" y="89"/>
<body name="t_joint" x="575" rotation="0" width="10" height="10" y="208"/>
<body name="t_joint" x="575" rotation="0" width="10" height="10" y="194"/>
<body name="t_joint" x="574" rotation="0" width="10" height="10" y="104"/>
<body name="t_joint" x="573" rotation="0" width="10" height="10" y="117"/>
<body name="t_joint" x="573" rotation="0" width="10" height="10" y="131"/>
<body name="t_joint" x="573" rotation="0" width="10" height="10" y="147"/>
<body name="t_joint" x="573" rotation="0" width="10" height="10" y="161"/>
<body name="t_joint" x="575" rotation="0" width="10" height="10" y="176"/>
<body name="t_joint" x="439" rotation="0" width="10" height="10" y="103"/>
<body name="t_joint" x="439" rotation="0" width="10" height="10" y="119"/>
<body name="t_joint" x="439" rotation="0" width="10" height="10" y="133"/>
<body name="t_joint" x="439" rotation="0" width="10" height="10" y="149"/>
<body name="t_joint" x="439" rotation="0" width="10" height="10" y="163"/>
<body name="t_joint" x="441" rotation="0" width="10" height="10" y="178"/>
<body name="t_joint" x="441" rotation="0" width="10" height="10" y="194"/>
<body name="t_joint" x="441" rotation="0" width="10" height="10" y="211"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="3" numberLevel="10" nameLevel="LEVEL 10" nickLevel="Johnny-K">
<bodies>
<body name="pic_les" x="416" rotation="0" width="252" height="158" y="343"/>
<body name="pic_trava2" x="599" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava" x="179" rotation="0" width="329" height="61" y="386"/>
<body name="pic_saturn" x="248" rotation="0" width="155" height="100" y="150"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_bs_s" x="662" rotation="90" width="219" height="12" y="79"/>
<body name="t_b2_s" x="330" rotation="0" width="690" height="10" y="415"/>
<body name="t_bs_s" x="501" rotation="90" width="219" height="12" y="77"/>
<body name="t_bh_d" x="588" rotation="0" width="69" height="24" y="399"/>
<body name="t_bh_d" x="587" rotation="0" width="69" height="24" y="376"/>
<body name="t_bh_d" x="568" rotation="90" width="69" height="24" y="330"/>
<body name="t_bh_d" x="587" rotation="0" width="69" height="24" y="289"/>
<body name="t_bh_d" x="553" rotation="0" width="69" height="24" y="266"/>
<body name="t_bh_d" x="622" rotation="0" width="69" height="24" y="265"/>
<body name="t_bh_d" x="607" rotation="90" width="69" height="24" y="331"/>
<body name="t_bh_d" x="566" rotation="90" width="69" height="24" y="221"/>
<body name="t_bh_d" x="608" rotation="90" width="69" height="24" y="222"/>
<body name="t_bh_d" x="584" rotation="0" width="69" height="24" y="133"/>
<body name="t_bh_d" x="585" rotation="0" width="69" height="24" y="111"/>
<body name="t_bh_d" x="585" rotation="0" width="69" height="24" y="89"/>
<body name="targetBox" x="587" rotation="0" width="56" height="26" y="66"/>
<body name="t_bh_d" x="549" rotation="0" width="69" height="24" y="155"/>
<body name="t_bh_d" x="617" rotation="0" width="69" height="24" y="154"/>
<body name="t_bh_d" x="587" rotation="0" width="69" height="24" y="178"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="11" nickLevel="Johnny-K" fon="2" nameLevel="LEVEL 11">
<bodies>
<body name="pic_trava2" x="652" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="74" rotation="0" width="148" height="15" y="409"/>
<body name="pic_kaktus" x="168" rotation="0" width="45" height="92" y="332"/>
<body name="pic_kaktus2" x="498" rotation="0" width="25" height="60" y="297"/>
<body name="pic_grib1" x="595" rotation="0" width="40" height="57" y="378"/>
<body name="pic_solnce" x="581" rotation="0" width="110" height="97" y="65"/>
<body name="pic_oblako3" x="449" rotation="0" width="157" height="26" y="67"/>
<body name="pic_oblako3" x="238" rotation="0" width="115" height="19" y="43"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_bb_s" x="305" rotation="0" width="110" height="48" y="389"/>
<body name="t_bb_s" x="365" rotation="0" width="110" height="48" y="343"/>
<body name="t_bb_s" x="195" rotation="0" width="110" height="48" y="389"/>
<body name="t_bb_s" x="523" rotation="0" width="110" height="48" y="390"/>
<body name="t_bb_s" x="414" rotation="0" width="110" height="48" y="389"/>
<body name="t_bb_s" x="256" rotation="0" width="110" height="48" y="343"/>
<body name="t_bb_s" x="475" rotation="0" width="110" height="48" y="343"/>
<body name="t_bb_s" x="304" rotation="0" width="110" height="48" y="296"/>
<body name="t_bb_s" x="415" rotation="0" width="110" height="48" y="297"/>
<body name="t_bb_s" x="363" rotation="0" width="110" height="48" y="249"/>
<body name="targetCircle_small" x="352" rotation="0" width="22" height="22" y="185"/>
<body name="t_cbs_d" x="304" rotation="0" width="22" height="22" y="187"/>
<body name="t_cbs_d" x="308" rotation="0" width="22" height="22" y="168"/>
<body name="t_cbs_d" x="319" rotation="0" width="22" height="22" y="149"/>
<body name="t_cbs_d" x="335" rotation="0" width="22" height="22" y="137"/>
<body name="t_cbs_d" x="355" rotation="0" width="22" height="22" y="136"/>
<body name="t_cbs_d" x="375" rotation="0" width="22" height="22" y="138"/>
<body name="t_cbs_d" x="394" rotation="0" width="22" height="22" y="146"/>
<body name="t_cbs_d" x="405" rotation="0" width="22" height="22" y="162"/>
<body name="t_cbs_d" x="410" rotation="0" width="22" height="22" y="182"/>
<body name="t_cbs_d" x="399" rotation="0" width="22" height="22" y="199"/>
<body name="t_cbs_d" x="316" rotation="0" width="22" height="22" y="202"/>
<body name="t_cbs_d" x="329" rotation="0" width="22" height="22" y="218"/>
<body name="t_cbs_d" x="347" rotation="0" width="22" height="22" y="217"/>
<body name="t_cbs_d" x="366" rotation="0" width="22" height="22" y="217"/>
<body name="t_cbs_d" x="386" rotation="0" width="22" height="22" y="216"/>
<body name="t_o_d" x="326" rotation="0" width="16" height="19" y="168"/>
<body name="t_o_d" x="382" rotation="0" width="16" height="19" y="162"/>
<body name="t_o_d" x="365" rotation="0" width="16" height="19" y="155"/>
<body name="t_o_d" x="344" rotation="0" width="16" height="19" y="155"/>
<body name="t_joint_fixed" x="364" rotation="0" width="15" height="15" y="140"/>
<body name="t_joint_fixed" x="318" rotation="0" width="15" height="15" y="214"/>
<body name="t_joint_fixed" x="307" rotation="0" width="15" height="15" y="195"/>
<body name="t_joint_fixed" x="314" rotation="0" width="15" height="15" y="160"/>
<body name="t_joint_fixed" x="328" rotation="0" width="15" height="15" y="143"/>
<body name="t_joint_fixed" x="344" rotation="0" width="15" height="15" y="138"/>
<body name="t_joint_fixed" x="409" rotation="0" width="15" height="15" y="173"/>
<body name="t_joint_fixed" x="404" rotation="0" width="15" height="15" y="192"/>
<body name="t_joint_fixed" x="402" rotation="0" width="15" height="15" y="155"/>
<body name="t_joint_fixed" x="385" rotation="0" width="15" height="15" y="145"/>
<body name="t_joint_fixed" x="306" rotation="0" width="15" height="15" y="179"/>
<body name="t_joint_fixed" x="392" rotation="0" width="15" height="15" y="205"/>
<body name="t_joint_fixed" x="338" rotation="0" width="15" height="15" y="211"/>
<body name="t_joint_fixed" x="376" rotation="0" width="15" height="15" y="206"/>
<body name="t_joint_fixed" x="358" rotation="0" width="15" height="15" y="210"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="3" numberLevel="12" nameLevel="LEVEL 12" nickLevel="Johnny-K">
<bodies>
<body name="pic_palmy" x="220" rotation="0" width="218" height="133" y="345"/>
<body name="pic_solnce" x="108" rotation="0" width="87" height="77" y="91"/>
<body name="pic_oblako3" x="567" rotation="0" width="105" height="17" y="94"/>
<body name="pic_oblako3" x="259" rotation="0" width="105" height="17" y="41"/>
<body name="pic_trava2" x="314" rotation="0" width="148" height="15" y="409"/>
<body name="pic_trava2" x="166" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="22" rotation="0" width="148" height="15" y="407"/>
<body name="pic_derevja" x="574" rotation="0" width="170" height="168" y="330"/>
<body name="pic_trava2" x="468" rotation="0" width="148" height="15" y="407"/>
<body name="pic_trava2" x="617" rotation="0" width="148" height="15" y="406"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_bb_s" x="404" rotation="0" width="110" height="48" y="92"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="415"/>
<body name="t_bk2_d" x="410" rotation="90" width="298" height="17" y="262"/>
<body name="t_cbm_d" x="355" rotation="0" width="61" height="60" y="39"/>
<body name="targetBox" x="454" rotation="0" width="56" height="26" y="56"/>
<body name="t_revolute" x="410" rotation="0" width="14" height="14" y="401"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="13" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 13">
<bodies>
<body name="pic_les" x="162" rotation="0" width="252" height="158" y="341"/>
<body name="pic_trava2" x="591" rotation="-12" width="148" height="15" y="395"/>
<body name="pic_trava2" x="445" rotation="0" width="148" height="15" y="409"/>
<body name="pic_trava2" x="333" rotation="0" width="148" height="15" y="406"/>
<body name="pic_planeta" x="656" rotation="0" width="97" height="97" y="16"/>
<body name="pic_oblako3" x="63" rotation="0" width="105" height="17" y="66"/>
<body name="pic_oblako3" x="339" rotation="0" width="139" height="23" y="88"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_bb_s" x="48" rotation="5" width="88" height="37" y="18"/>
<body name="t_bb_s" x="132" rotation="5" width="88" height="37" y="27"/>
<body name="t_bb_s" x="216" rotation="5" width="88" height="37" y="36"/>
<body name="t_bb_s" x="300" rotation="5" width="88" height="37" y="44"/>
<body name="t_bb_s" x="384" rotation="5" width="88" height="37" y="53"/>
<body name="t_bb_s" x="468" rotation="5" width="88" height="37" y="62"/>
<body name="t_b2_s" x="174" rotation="0" width="690" height="10" y="415"/>
<body name="t_b2_s" x="571" rotation="-10" width="200" height="10" y="406"/>
<body name="t_b2_s" x="687" rotation="90" width="300" height="10" y="148"/>
<body name="t_bb_s" x="467" rotation="11" width="88" height="37" y="306"/>
<body name="t_bb_s" x="384" rotation="9" width="88" height="37" y="290"/>
<body name="t_bs_s" x="258" rotation="90" width="217" height="12" y="167"/>
<body name="t_bb_s" x="301" rotation="14" width="88" height="37" y="269"/>
<body name="t_bb_s" x="557" rotation="-3" width="88" height="37" y="174"/>
<body name="t_bb_s" x="389" rotation="-3" width="88" height="37" y="182"/>
<body name="t_bb_s" x="473" rotation="-3" width="88" height="37" y="178"/>
<body name="t_bb_s" x="552" rotation="5" width="88" height="37" y="71"/>
<body name="t_bb_s" x="642" rotation="-3" width="88" height="37" y="171"/>
<body name="targetCircle" x="58" rotation="0" width="60" height="60" y="-31"/>
<body name="t_ck_d" x="549" rotation="0" width="102" height="100" y="352"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="14" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 14">
<bodies>
<body name="pic_derevja" x="290" rotation="0" width="222" height="219" y="304"/>
<body name="pic_oblako3" x="304" rotation="0" width="177" height="29" y="88"/>
<body name="pic_oblako3" x="140" rotation="0" width="105" height="17" y="57"/>
<body name="pic_oblako3" x="494" rotation="0" width="85" height="14" y="28"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_b2_s" x="686" rotation="90" width="426" height="10" y="218"/>
<body name="t_bb_s" x="466" rotation="0" width="110" height="48" y="389"/>
<body name="t_bb_s" x="572" rotation="0" width="110" height="48" y="391"/>
<body name="t_bb_s" x="678" rotation="0" width="110" height="48" y="392"/>
<body name="t_bb_s" x="713" rotation="0" width="110" height="48" y="62"/>
<body name="t_bb_s" x="714" rotation="0" width="110" height="48" y="107"/>
<body name="t_bb_s" x="714" rotation="0" width="110" height="48" y="153"/>
<body name="t_bb_s" x="714" rotation="0" width="110" height="48" y="196"/>
<body name="t_bb_s" x="639" rotation="90" width="110" height="48" y="269"/>
<body name="t_bb_s" x="630" rotation="0" width="110" height="48" y="346"/>
<body name="t_bb_s" x="522" rotation="0" width="110" height="48" y="345"/>
<body name="t_bb_s" x="510" rotation="90" width="110" height="48" y="269"/>
<body name="t_bb_s" x="713" rotation="0" width="110" height="48" y="17"/>
<body name="t_ck_d" x="604" rotation="0" width="116" height="114" y="149"/>
<body name="targetBox" x="577" rotation="0" width="56" height="26" y="310"/>
<body name="t_bk2_d" x="515" rotation="0" width="291" height="13" y="210"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="15" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 15">
<bodies>
<body name="pic_trava" x="516" rotation="0" width="329" height="61" y="385"/>
<body name="pic_trava2" x="212" rotation="0" width="148" height="15" y="407"/>
<body name="pic_trava2" x="66" rotation="0" width="148" height="15" y="408"/>
<body name="pic_dub" x="161" rotation="0" width="172" height="194" y="321"/>
<body name="pic_solnce" x="77" rotation="0" width="142" height="126" y="82"/>
<body name="pic_oblako3" x="598" rotation="0" width="85" height="14" y="38"/>
<body name="pic_oblako3" x="342" rotation="0" width="139" height="23" y="27"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_bs_s" x="289" rotation="90" width="283" height="12" y="197"/>
<body name="t_bs_s" x="526" rotation="-15" width="283" height="12" y="148"/>
<body name="t_bs_s" x="289" rotation="90" width="283" height="12" y="477"/>
<body name="t_bs_s" x="426" rotation="15" width="283" height="12" y="227"/>
<body name="t_bs_s" x="513" rotation="-15" width="283" height="12" y="315"/>
<body name="t_bs_s" x="426" rotation="7" width="283" height="12" y="74"/>
<body name="targetBox" x="345" rotation="0" width="56" height="26" y="399"/>
<body name="t_o_d" x="659" rotation="0" width="14" height="16" y="102"/>
<body name="t_joint_fixed" x="659" rotation="0" width="15" height="15" y="111"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="16" nickLevel="Johnny-K" fon="2" nameLevel="LEVEL 16">
<bodies>
<body name="pic_solnce" x="89" rotation="0" width="104" height="92" y="79"/>
<body name="pic_les" x="557" rotation="0" width="252" height="158" y="343"/>
<body name="pic_trava2" x="446" rotation="0" width="148" height="15" y="409"/>
<body name="pic_trava2" x="585" rotation="0" width="148" height="15" y="411"/>
<body name="pic_oblako3" x="220" rotation="0" width="105" height="17" y="53"/>
<body name="pic_oblako3" x="325" rotation="0" width="130" height="22" y="88"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="550" rotation="0" width="20" height="10" y="199"/>
<body name="t_b2_s" x="466" rotation="0" width="20" height="10" y="200"/>
<body name="t_bs_s" x="390" rotation="50" width="283" height="12" y="54"/>
<body name="targetCircle_small" x="502" rotation="0" width="22" height="22" y="82"/>
<body name="t_bs_s" x="618" rotation="-50" width="283" height="12" y="54"/>
<body name="t_bs_s" x="467" rotation="-50" width="283" height="12" y="306"/>
<body name="t_b2_s" x="530" rotation="0" width="320" height="10" y="416"/>
<body name="t_b2_s" x="22" rotation="0" width="30" height="10" y="416"/>
<body name="t_bk2_d" x="506" rotation="0" width="141" height="12" y="171"/>
<body name="t_cbs_d" x="522" rotation="0" width="22" height="22" y="144"/>
<body name="t_cbs_d" x="488" rotation="0" width="22" height="22" y="145"/>
<body name="t_cbs_d" x="447" rotation="0" width="22" height="22" y="92"/>
<body name="t_cbs_d" x="510" rotation="0" width="22" height="22" y="58"/>
<body name="t_cbs_d" x="614" rotation="0" width="22" height="22" y="22"/>
<body name="t_cbs_d" x="590" rotation="0" width="22" height="22" y="27"/>
<body name="t_cbs_d" x="545" rotation="0" width="22" height="22" y="32"/>
<body name="t_cbs_d" x="511" rotation="0" width="22" height="22" y="35"/>
<body name="t_cbs_d" x="472" rotation="0" width="22" height="22" y="35"/>
<body name="t_cbs_d" x="430" rotation="0" width="22" height="22" y="45"/>
<body name="t_cbs_d" x="559" rotation="0" width="22" height="22" y="86"/>
<body name="t_cbs_d" x="574" rotation="0" width="22" height="22" y="51"/>
<body name="t_cbs_d" x="535" rotation="0" width="22" height="22" y="67"/>
<body name="t_cbs_d" x="483" rotation="0" width="22" height="22" y="62"/>
<body name="t_cbs_d" x="456" rotation="0" width="22" height="22" y="70"/>
<body name="t_cbs_d" x="472" rotation="0" width="22" height="22" y="94"/>
<body name="t_cbs_d" x="492" rotation="0" width="22" height="22" y="116"/>
<body name="t_cbs_d" x="463" rotation="0" width="22" height="22" y="186"/>
<body name="t_cbs_d" x="547" rotation="0" width="22" height="22" y="185"/>
<body name="t_cbs_d" x="505" rotation="0" width="22" height="22" y="138"/>
<body name="t_cbs_d" x="517" rotation="0" width="22" height="22" y="100"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="3" numberLevel="17" nameLevel="LEVEL 17" nickLevel="Johnny-K">
<bodies>
<body name="pic_elka" x="486" rotation="0" width="95" height="150" y="337"/>
<body name="pic_trava2" x="8" rotation="0" width="148" height="15" y="406"/>
<body name="pic_les" x="208" rotation="0" width="252" height="158" y="341"/>
<body name="pic_dom2" x="613" rotation="0" width="120" height="104" y="360"/>
<body name="pic_trava2" x="580" rotation="0" width="202" height="21" y="409"/>
<body name="pic_trava2" x="406" rotation="0" width="148" height="15" y="406"/>
<body name="pic_oblako3" x="396" rotation="0" width="138" height="23" y="25"/>
<body name="pic_oblako3" x="597" rotation="0" width="121" height="20" y="98"/>
<body name="pic_oblako3" x="138" rotation="0" width="105" height="17" y="76"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="415"/>
<body name="t_b2_s" x="5" rotation="90" width="460" height="10" y="187"/>
<body name="t_b2_s" x="349" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="164" rotation="0" width="219" height="10" y="216"/>
<body name="t_b2_s" x="121" rotation="0" width="300" height="10" y="153"/>
<body name="t_b2_s" x="525" rotation="0" width="219" height="10" y="215"/>
<body name="t_b2_s" x="562" rotation="0" width="300" height="10" y="152"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="186"/>
<body name="t_b2_s" x="675" rotation="0" width="50" height="10" y="215"/>
<body name="t_b2_s" x="16" rotation="0" width="50" height="10" y="216"/>
<body name="t_bk_d" x="337" rotation="0" width="27" height="28" y="29"/>
<body name="t_ck_d" x="344" rotation="0" width="37" height="36" y="207"/>
<body name="t_ck_d" x="437" rotation="0" width="52" height="51" y="186"/>
<body name="targetCircle" x="255" rotation="0" width="52" height="52" y="186"/>
<body name="t_cz_d" x="340" rotation="0" width="15" height="18" y="93"/>
<body name="t_cz_d" x="340" rotation="0" width="15" height="18" y="108"/>
<body name="t_cz_d" x="341" rotation="0" width="15" height="18" y="124"/>
<body name="t_cz_d" x="339" rotation="0" width="15" height="18" y="49"/>
<body name="t_cz_d" x="339" rotation="0" width="15" height="18" y="64"/>
<body name="t_cz_d" x="340" rotation="0" width="15" height="18" y="80"/>
<body name="t_cz_d" x="342" rotation="0" width="15" height="18" y="182"/>
<body name="t_cz_d" x="341" rotation="0" width="15" height="18" y="138"/>
<body name="t_cz_d" x="341" rotation="0" width="15" height="18" y="153"/>
<body name="t_cz_d" x="342" rotation="0" width="15" height="18" y="169"/>
<body name="t_joint" x="342" rotation="0" width="12" height="12" y="117"/>
<body name="t_joint" x="341" rotation="0" width="12" height="12" y="102"/>
<body name="t_joint" x="340" rotation="0" width="12" height="12" y="88"/>
<body name="t_joint" x="341" rotation="0" width="12" height="12" y="73"/>
<body name="t_joint" x="340" rotation="0" width="12" height="12" y="58"/>
<body name="t_joint" x="339" rotation="0" width="12" height="12" y="44"/>
<body name="t_joint" x="343" rotation="0" width="12" height="12" y="191"/>
<body name="t_joint" x="342" rotation="0" width="12" height="12" y="177"/>
<body name="t_joint" x="343" rotation="0" width="12" height="12" y="162"/>
<body name="t_joint" x="342" rotation="0" width="12" height="12" y="147"/>
<body name="t_joint" x="341" rotation="0" width="12" height="12" y="133"/>
<body name="t_revolute" x="337" rotation="0" width="14" height="14" y="28"/>
<body name="t_pushka" x="24" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="3" numberLevel="18" nameLevel="LEVEL 18" nickLevel="Johnny-K">
<bodies>
<body name="pic_elka" x="236" rotation="0" width="95" height="150" y="339"/>
<body name="pic_oblako3" x="272" rotation="0" width="105" height="17" y="49"/>
<body name="pic_oblako3" x="568" rotation="0" width="187" height="31" y="55"/>
<body name="pic_trava2" x="618" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="472" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="326" rotation="0" width="148" height="15" y="404"/>
<body name="pic_trava2" x="185" rotation="0" width="148" height="15" y="404"/>
<body name="pic_bereza" x="665" rotation="0" width="56" height="119" y="353"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="189"/>
<body name="t_b2_s" x="346" rotation="0" width="690" height="10" y="414"/>
<body name="t_bb_s" x="140" rotation="90" width="110" height="48" y="356"/>
<body name="t_bb_s" x="143" rotation="90" width="110" height="48" y="138"/>
<body name="t_bb_s" x="142" rotation="90" width="110" height="48" y="247"/>
<body name="t_c_d" x="224" rotation="0" width="35" height="34" y="93"/>
<body name="t_c_d" x="255" rotation="0" width="35" height="34" y="101"/>
<body name="t_c_d" x="287" rotation="0" width="35" height="34" y="111"/>
<body name="t_c_d" x="319" rotation="0" width="35" height="34" y="120"/>
<body name="t_c_d" x="351" rotation="0" width="35" height="34" y="127"/>
<body name="t_c_d" x="383" rotation="0" width="35" height="34" y="136"/>
<body name="t_c_d" x="414" rotation="0" width="35" height="34" y="146"/>
<body name="t_c_d" x="447" rotation="0" width="35" height="34" y="155"/>
<body name="t_c_d" x="478" rotation="0" width="35" height="34" y="164"/>
<body name="t_c_d" x="509" rotation="0" width="35" height="34" y="176"/>
<body name="t_c_d" x="539" rotation="0" width="35" height="34" y="187"/>
<body name="t_c_d" x="607" rotation="0" width="35" height="34" y="305"/>
<body name="t_c_d" x="575" rotation="0" width="35" height="34" y="314"/>
<body name="t_c_d" x="542" rotation="0" width="35" height="34" y="323"/>
<body name="t_c_d" x="510" rotation="0" width="35" height="34" y="330"/>
<body name="t_c_d" x="477" rotation="0" width="35" height="34" y="339"/>
<body name="t_c_d" x="445" rotation="0" width="35" height="34" y="348"/>
<body name="t_c_d" x="413" rotation="0" width="35" height="34" y="355"/>
<body name="t_c_d" x="380" rotation="0" width="35" height="34" y="361"/>
<body name="t_c_d" x="348" rotation="0" width="35" height="34" y="368"/>
<body name="t_c_d" x="315" rotation="0" width="35" height="34" y="371"/>
<body name="t_c_d" x="192" rotation="0" width="35" height="34" y="83"/>
<body name="t_c_d" x="129" rotation="0" width="35" height="34" y="59"/>
<body name="t_c_d" x="162" rotation="0" width="35" height="34" y="68"/>
<body name="t_c_d" x="596" rotation="0" width="35" height="34" y="216"/>
<body name="t_c_d" x="566" rotation="0" width="35" height="34" y="206"/>
<body name="t_c_d" x="639" rotation="0" width="35" height="34" y="293"/>
<body name="t_c_d" x="669" rotation="0" width="35" height="34" y="281"/>
<body name="targetBox" x="262" rotation="0" width="56" height="26" y="397"/>
<body name="t_o_d" x="240" rotation="0" width="16" height="19" y="378"/>
<body name="t_o_d" x="261" rotation="0" width="16" height="19" y="378"/>
<body name="t_o_d" x="281" rotation="0" width="16" height="19" y="378"/>
<body name="t_revolute_motor" x="224" rotation="5" width="11" height="11" y="93"/>
<body name="t_revolute_motor" x="255" rotation="5" width="11" height="11" y="101"/>
<body name="t_revolute_motor" x="287" rotation="5" width="11" height="11" y="111"/>
<body name="t_revolute_motor" x="319" rotation="5" width="11" height="11" y="120"/>
<body name="t_revolute_motor" x="351" rotation="5" width="11" height="11" y="127"/>
<body name="t_revolute_motor" x="383" rotation="5" width="11" height="11" y="136"/>
<body name="t_revolute_motor" x="414" rotation="5" width="11" height="11" y="146"/>
<body name="t_revolute_motor" x="447" rotation="5" width="11" height="11" y="155"/>
<body name="t_revolute_motor" x="478" rotation="5" width="11" height="11" y="164"/>
<body name="t_revolute_motor" x="509" rotation="5" width="11" height="11" y="176"/>
<body name="t_revolute_motor" x="539" rotation="5" width="11" height="11" y="187"/>
<body name="t_revolute_motor" x="607" rotation="-4" width="11" height="11" y="305"/>
<body name="t_revolute_motor" x="575" rotation="-4" width="11" height="11" y="314"/>
<body name="t_revolute_motor" x="542" rotation="-4" width="11" height="11" y="323"/>
<body name="t_revolute_motor" x="510" rotation="-4" width="11" height="11" y="330"/>
<body name="t_revolute_motor" x="477" rotation="-4" width="11" height="11" y="339"/>
<body name="t_revolute_motor" x="445" rotation="-4" width="11" height="11" y="348"/>
<body name="t_revolute_motor" x="413" rotation="-4" width="11" height="11" y="355"/>
<body name="t_revolute_motor" x="380" rotation="-4" width="11" height="11" y="361"/>
<body name="t_revolute_motor" x="348" rotation="-4" width="11" height="11" y="368"/>
<body name="t_revolute_motor" x="315" rotation="-4" width="11" height="11" y="371"/>
<body name="t_revolute_motor" x="192" rotation="5" width="11" height="11" y="83"/>
<body name="t_revolute_motor" x="129" rotation="5" width="11" height="11" y="59"/>
<body name="t_revolute_motor" x="162" rotation="5" width="11" height="11" y="68"/>
<body name="t_revolute_motor" x="596" rotation="5" width="11" height="11" y="216"/>
<body name="t_revolute_motor" x="566" rotation="5" width="11" height="11" y="206"/>
<body name="t_revolute_motor" x="639" rotation="-4" width="11" height="11" y="293"/>
<body name="t_revolute_motor" x="669" rotation="-4" width="11" height="11" y="281"/>
<body name="t_pushka" x="27" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="1" numberLevel="19" nameLevel="LEVEL 19" nickLevel="Johnny-K">
<bodies>
<body name="pic_saturn" x="109" rotation="10" width="171" height="110" y="57"/>
<body name="pic_planeta" x="555" rotation="0" width="147" height="148" y="92"/>
<body name="pic_derevo2" x="150" rotation="0" width="140" height="140" y="347"/>
<body name="pic_trava2" x="138" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="284" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava" x="517" rotation="0" width="329" height="61" y="382"/>
<body name="pic_trava2" x="-9" rotation="0" width="148" height="15" y="405"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="189"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="414"/>
<body name="t_b2_s" x="5" rotation="90" width="460" height="10" y="182"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="4"/>
<body name="t_bs_s" x="499" rotation="0" width="368" height="12" y="326"/>
<body name="t_bs_s" x="558" rotation="0" width="250" height="12" y="163"/>
<body name="t_bs_s" x="429" rotation="90" width="92" height="12" y="204"/>
<body name="t_bk2_d" x="375" rotation="0" width="240" height="12" y="272"/>
<body name="t_c_d" x="470" rotation="0" width="48" height="46" y="300"/>
<body name="t_c_d" x="364" rotation="0" width="48" height="46" y="299"/>
<body name="t_c_d" x="564" rotation="0" width="48" height="46" y="300"/>
<body name="targetBox" x="636" rotation="0" width="56" height="26" y="246"/>
<body name="t_joint_fixed" x="672" rotation="0" width="23" height="23" y="246"/>
<body name="t_pushka" x="27" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="20" nickLevel="Johnny-K" fon="3" nameLevel="Level 20">
<bodies>
<body name="pic_trava2" x="358" rotation="0" width="148" height="15" y="426"/>
<body name="pic_trava2" x="210" rotation="0" width="148" height="15" y="425"/>
<body name="pic_oblako3" x="171" rotation="0" width="131" height="22" y="61"/>
<body name="pic_oblako3" x="87" rotation="0" width="99" height="16" y="150"/>
<body name="pic_oblako3" x="533" rotation="0" width="89" height="15" y="98"/>
<body name="pic_trava2" x="399" rotation="0" width="520" height="53" y="404"/>
<body name="t_bb_s" x="405" rotation="0" width="52" height="17" y="252"/>
<body name="t_bb_s" x="114" rotation="0" width="52" height="17" y="411"/>
<body name="t_bb_s" x="139" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="160" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="183" rotation="0" width="52" height="17" y="363"/>
<body name="t_bb_s" x="208" rotation="0" width="52" height="17" y="347"/>
<body name="t_bb_s" x="230" rotation="0" width="52" height="17" y="332"/>
<body name="t_bb_s" x="255" rotation="0" width="52" height="17" y="316"/>
<body name="t_bb_s" x="279" rotation="0" width="52" height="17" y="300"/>
<body name="t_bb_s" x="304" rotation="0" width="52" height="17" y="284"/>
<body name="t_bb_s" x="328" rotation="0" width="52" height="17" y="268"/>
<body name="t_bb_s" x="355" rotation="0" width="52" height="17" y="252"/>
<body name="t_bb_s" x="378" rotation="0" width="52" height="17" y="237"/>
<body name="t_bb_s" x="404" rotation="0" width="52" height="17" y="41"/>
<body name="t_bb_s" x="354" rotation="0" width="52" height="17" y="40"/>
<body name="t_bb_s" x="431" rotation="0" width="52" height="17" y="25"/>
<body name="t_bb_s" x="331" rotation="0" width="52" height="17" y="24"/>
<body name="t_bb_s" x="158" rotation="0" width="52" height="17" y="8"/>
<body name="t_bb_s" x="608" rotation="0" width="52" height="17" y="9"/>
<body name="t_bb_s" x="558" rotation="0" width="52" height="17" y="9"/>
<body name="t_bb_s" x="508" rotation="0" width="52" height="17" y="9"/>
<body name="t_bb_s" x="458" rotation="0" width="52" height="17" y="9"/>
<body name="t_bb_s" x="408" rotation="0" width="52" height="17" y="9"/>
<body name="t_bb_s" x="358" rotation="0" width="52" height="17" y="9"/>
<body name="t_bb_s" x="308" rotation="0" width="52" height="17" y="8"/>
<body name="t_bb_s" x="208" rotation="0" width="52" height="17" y="8"/>
<body name="t_bb_s" x="379" rotation="0" width="52" height="17" y="57"/>
<body name="t_bb_s" x="258" rotation="0" width="52" height="17" y="8"/>
<body name="t_bb_s" x="381" rotation="0" width="52" height="17" y="24"/>
<body name="t_bb_s" x="377" rotation="0" width="52" height="17" y="268"/>
<body name="t_bb_s" x="426" rotation="0" width="52" height="17" y="268"/>
<body name="t_bb_s" x="403" rotation="0" width="52" height="17" y="284"/>
<body name="t_bb_s" x="354" rotation="0" width="52" height="17" y="284"/>
<body name="t_bb_s" x="453" rotation="0" width="52" height="17" y="284"/>
<body name="t_bb_s" x="427" rotation="0" width="52" height="17" y="300"/>
<body name="t_bb_s" x="377" rotation="0" width="52" height="17" y="300"/>
<body name="t_bb_s" x="477" rotation="0" width="52" height="17" y="300"/>
<body name="t_bb_s" x="504" rotation="0" width="52" height="17" y="316"/>
<body name="t_bb_s" x="455" rotation="0" width="52" height="17" y="316"/>
<body name="t_bb_s" x="305" rotation="0" width="52" height="17" y="316"/>
<body name="t_bb_s" x="355" rotation="0" width="52" height="17" y="316"/>
<body name="t_bb_s" x="405" rotation="0" width="52" height="17" y="316"/>
<body name="t_bb_s" x="479" rotation="0" width="52" height="17" y="332"/>
<body name="t_bb_s" x="379" rotation="0" width="52" height="17" y="332"/>
<body name="t_bb_s" x="329" rotation="0" width="52" height="17" y="332"/>
<body name="t_bb_s" x="279" rotation="0" width="52" height="17" y="332"/>
<body name="t_bb_s" x="429" rotation="0" width="52" height="17" y="332"/>
<body name="t_bb_s" x="556" rotation="0" width="52" height="17" y="348"/>
<body name="t_bb_s" x="408" rotation="0" width="52" height="17" y="347"/>
<body name="t_bb_s" x="258" rotation="0" width="52" height="17" y="347"/>
<body name="t_bb_s" x="308" rotation="0" width="52" height="17" y="347"/>
<body name="t_bb_s" x="358" rotation="0" width="52" height="17" y="347"/>
<body name="t_bb_s" x="458" rotation="0" width="52" height="17" y="347"/>
<body name="t_bb_s" x="507" rotation="0" width="52" height="17" y="348"/>
<body name="t_bb_s" x="580" rotation="0" width="52" height="17" y="363"/>
<body name="t_c_s" x="609" rotation="0" width="14" height="14" y="365"/>
<body name="t_c_s" x="586" rotation="0" width="14" height="14" y="349"/>
<body name="t_bb_s" x="528" rotation="0" width="52" height="17" y="332"/>
<body name="t_bb_s" x="531" rotation="0" width="52" height="17" y="363"/>
<body name="t_bb_s" x="482" rotation="0" width="52" height="17" y="363"/>
<body name="t_bb_s" x="433" rotation="0" width="52" height="17" y="363"/>
<body name="t_bb_s" x="333" rotation="0" width="52" height="17" y="363"/>
<body name="t_bb_s" x="283" rotation="0" width="52" height="17" y="363"/>
<body name="t_bb_s" x="233" rotation="0" width="52" height="17" y="363"/>
<body name="t_bb_s" x="383" rotation="0" width="52" height="17" y="363"/>
<body name="t_c_s" x="633" rotation="0" width="14" height="14" y="381"/>
<body name="t_bb_s" x="603" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="554" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="358" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="208" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="258" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="308" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="408" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="457" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="506" rotation="0" width="52" height="17" y="379"/>
<body name="t_bb_s" x="583" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="534" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="338" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="188" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="238" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="288" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="388" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="437" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="486" rotation="0" width="52" height="17" y="395"/>
<body name="t_bb_s" x="328" rotation="0" width="52" height="17" y="300"/>
<body name="t_bb_s" x="31" rotation="0" width="52" height="17" y="411"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="193"/>
<body name="t_bb_s" x="634" rotation="0" width="52" height="17" y="396"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="191"/>
<body name="t_mpv_d" x="379" rotation="0" width="10" height="93" y="156"/>
<body name="t_mpv_d" x="474" rotation="0" width="10" height="93" y="68"/>
<body name="targetCircle" x="607" rotation="0" width="31" height="31" y="193"/>
<body name="t_mpv_d" x="597" rotation="0" width="10" height="93" y="69"/>
<body name="t_cz_d" x="597" rotation="0" width="19" height="24" y="125"/>
<body name="t_cz_d" x="599" rotation="0" width="19" height="24" y="147"/>
<body name="t_cz_d" x="599" rotation="0" width="19" height="24" y="167"/>
<body name="t_o_d" x="423" rotation="0" width="14" height="16" y="238"/>
<body name="t_o_d" x="497" rotation="0" width="14" height="16" y="288"/>
<body name="t_o_d" x="118" rotation="0" width="14" height="16" y="381"/>
<body name="t_o_d" x="210" rotation="0" width="14" height="16" y="319"/>
<body name="t_o_d" x="311" rotation="0" width="14" height="16" y="256"/>
<body name="t_joint" x="602" rotation="0" width="11" height="11" y="177"/>
<body name="t_joint" x="599" rotation="0" width="11" height="11" y="136"/>
<body name="t_joint" x="600" rotation="0" width="11" height="11" y="156"/>
<body name="t_joint" x="597" rotation="0" width="11" height="11" y="115"/>
<body name="t_pushka" x="26" rotation="0" width="56" height="40" y="388"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="21" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 21">
<bodies>
<body name="pic_derevja" x="139" rotation="0" width="170" height="168" y="330"/>
<body name="pic_palma1" x="637" rotation="0" width="112" height="150" y="339"/>
<body name="pic_kaktus" x="493" rotation="0" width="36" height="73" y="386"/>
<body name="pic_kaktus2" x="400" rotation="0" width="42" height="101" y="378"/>
<body name="pic_solnce" x="336" rotation="0" width="105" height="93" y="60"/>
<body name="pic_oblako3" x="487" rotation="0" width="150" height="25" y="43"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_bs_s" x="577" rotation="90" width="223" height="12" y="358"/>
<body name="t_bs_s" x="459" rotation="0" width="223" height="12" y="252"/>
<body name="t_bs_s" x="343" rotation="90" width="223" height="12" y="246"/>
<body name="t_bs_s" x="448" rotation="0" width="223" height="12" y="131"/>
<body name="targetBox" x="387" rotation="0" width="56" height="26" y="235"/>
<body name="targetBox" x="452" rotation="0" width="56" height="26" y="234"/>
<body name="targetBox" x="519" rotation="0" width="56" height="26" y="234"/>
<body name="t_mpg_d" x="470" rotation="0" width="136" height="11" y="201"/>
<body name="t_cbs_d" x="465" rotation="0" width="22" height="22" y="181"/>
<body name="t_o_d" x="656" rotation="0" width="14" height="16" y="406"/>
<body name="t_o_d" x="608" rotation="0" width="14" height="16" y="406"/>
<body name="t_revolute_motor" x="465" rotation="-5" width="10" height="10" y="181"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="22" nickLevel="Johnny-K" fon="2" nameLevel="Level 22">
<bodies>
<body name="pic_kaktus" x="604" rotation="0" width="75" height="153" y="352"/>
<body name="pic_kaktus2" x="662" rotation="0" width="19" height="46" y="393"/>
<body name="pic_kaktus" x="470" rotation="0" width="45" height="92" y="367"/>
<body name="pic_planeta" x="93" rotation="0" width="134" height="134" y="127"/>
<body name="pic_oblako3" x="261" rotation="0" width="135" height="22" y="100"/>
<body name="pic_oblako3" x="430" rotation="0" width="105" height="17" y="50"/>
<body name="pic_trava2" x="461" rotation="0" width="192" height="19" y="396"/>
<body name="pic_trava2" x="630" rotation="0" width="147" height="15" y="405"/>
<body name="t_bb_s" x="497" rotation="0" width="110" height="48" y="-32"/>
<body name="t_bb_s" x="53" rotation="0" width="110" height="48" y="398"/>
<body name="t_bb_s" x="562" rotation="0" width="80" height="33" y="83"/>
<body name="t_b2_s" x="491" rotation="0" width="400" height="10" y="414"/>
<body name="t_b2_s" x="686" rotation="90" width="200" height="10" y="313"/>
<body name="t_b2_s" x="424" rotation="0" width="265" height="10" y="405"/>
<body name="t_bs_s" x="529" rotation="90" width="115" height="12" y="126"/>
<body name="t_bb_s" x="329" rotation="0" width="76" height="46" y="322"/>
<body name="t_ck_d" x="406" rotation="0" width="74" height="73" y="371"/>
<body name="t_c_d" x="508" rotation="0" width="41" height="40" y="70"/>
<body name="targetCircle" x="348" rotation="0" width="47" height="44" y="225"/>
<body name="t_c_d" x="305" rotation="0" width="51" height="49" y="188"/>
<body name="t_c_d" x="351" rotation="0" width="51" height="49" y="172"/>
<body name="t_c_d" x="390" rotation="0" width="51" height="49" y="198"/>
<body name="t_c_d" x="397" rotation="0" width="51" height="49" y="243"/>
<body name="t_c_d" x="321" rotation="0" width="51" height="49" y="274"/>
<body name="t_c_d" x="298" rotation="0" width="51" height="49" y="234"/>
<body name="t_c_d" x="366" rotation="0" width="51" height="49" y="277"/>
<body name="t_cz_d" x="610" rotation="0" width="15" height="18" y="81"/>
<body name="t_cz_d" x="609" rotation="0" width="15" height="18" y="95"/>
<body name="t_cz_d" x="529" rotation="90" width="15" height="18" y="61"/>
<body name="t_cz_d" x="545" rotation="90" width="15" height="18" y="61"/>
<body name="t_cz_d" x="561" rotation="90" width="15" height="18" y="61"/>
<body name="t_cz_d" x="578" rotation="90" width="15" height="18" y="61"/>
<body name="t_cz_d" x="594" rotation="90" width="15" height="18" y="61"/>
<body name="t_cz_d" x="607" rotation="0" width="15" height="18" y="67"/>
<body name="t_o_d" x="589" rotation="0" width="21" height="25" y="144"/>
<body name="t_o_d" x="609" rotation="0" width="21" height="25" y="119"/>
<body name="t_o_d" x="629" rotation="0" width="21" height="25" y="141"/>
<body name="t_o_d" x="609" rotation="0" width="21" height="25" y="142"/>
<body name="t_o_d" x="610" rotation="0" width="21" height="25" y="165"/>
<body name="t_joint" x="610" rotation="0" width="10" height="10" y="75"/>
<body name="t_joint" x="610" rotation="0" width="10" height="10" y="88"/>
<body name="t_joint" x="609" rotation="0" width="10" height="10" y="106"/>
<body name="t_joint" x="588" rotation="0" width="10" height="10" y="61"/>
<body name="t_joint" x="604" rotation="0" width="10" height="10" y="61"/>
<body name="t_joint" x="520" rotation="0" width="10" height="10" y="60"/>
<body name="t_joint" x="538" rotation="0" width="10" height="10" y="59"/>
<body name="t_joint" x="554" rotation="0" width="10" height="10" y="60"/>
<body name="t_joint" x="570" rotation="0" width="10" height="10" y="60"/>
<body name="t_joint_fixed" x="621" rotation="0" width="15" height="15" y="146"/>
<body name="t_joint_fixed" x="599" rotation="0" width="15" height="15" y="146"/>
<body name="t_joint_fixed" x="609" rotation="0" width="15" height="15" y="130"/>
<body name="t_joint_fixed" x="294" rotation="0" width="15" height="15" y="263"/>
<body name="t_joint_fixed" x="396" rotation="0" width="15" height="15" y="272"/>
<body name="t_joint_fixed" x="379" rotation="0" width="15" height="15" y="172"/>
<body name="t_joint_fixed" x="284" rotation="0" width="15" height="15" y="208"/>
<body name="t_joint_fixed" x="324" rotation="0" width="15" height="15" y="166"/>
<body name="t_joint_fixed" x="407" rotation="0" width="15" height="15" y="218"/>
<body name="t_joint_fixed" x="342" rotation="0" width="15" height="15" y="286"/>
<body name="t_pushka" x="33" rotation="0" width="56" height="40" y="359"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="23" nickLevel="Johnny-K" fon="2" nameLevel="LEVEL 23">
<bodies>
<body name="pic_kaktus" x="140" rotation="0" width="45" height="92" y="376"/>
<body name="pic_grib2" x="221" rotation="0" width="32" height="50" y="375"/>
<body name="pic_kaktus2" x="82" rotation="0" width="26" height="63" y="389"/>
<body name="pic_kaktus2" x="626" rotation="0" width="49" height="118" y="367"/>
<body name="pic_trava2" x="610" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="462" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="318" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="173" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="5" rotation="0" width="190" height="19" y="404"/>
<body name="pic_oblako3" x="108" rotation="0" width="105" height="17" y="121"/>
<body name="pic_oblako3" x="360" rotation="0" width="167" height="28" y="58"/>
<body name="pic_oblako3" x="615" rotation="0" width="132" height="22" y="113"/>
<body name="t_b2_s" x="346" rotation="0" width="690" height="10" y="414"/>
<body name="t_b2_s" x="6" rotation="90" width="460" height="10" y="187"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="187"/>
<body name="t_bb_s" x="379" rotation="0" width="63" height="31" y="175"/>
<body name="t_bb_s" x="544" rotation="0" width="63" height="31" y="83"/>
<body name="t_bb_s" x="568" rotation="0" width="63" height="31" y="205"/>
<body name="t_bb_s" x="166" rotation="0" width="63" height="31" y="88"/>
<body name="t_bb_s" x="508" rotation="0" width="20" height="31" y="393"/>
<body name="t_bs_s" x="388" rotation="12" width="321" height="12" y="274"/>
<body name="t_bb_s" x="507" rotation="0" width="20" height="31" y="349"/>
<body name="t_bb_s" x="202" rotation="0" width="63" height="31" y="239"/>
<body name="t_bb_s" x="250" rotation="90" width="80" height="31" y="371"/>
<body name="t_bk2_d" x="474" rotation="0" width="417" height="11" y="372"/>
<body name="targetBox" x="301" rotation="0" width="56" height="26" y="354"/>
<body name="t_bk2_d" x="346" rotation="90" width="49" height="25" y="344"/>
<body name="t_bk2_d" x="314" rotation="0" width="89" height="25" y="332"/>
<body name="t_ck_d" x="566" rotation="0" width="51" height="50" y="164"/>
<body name="t_ck_d" x="142" rotation="0" width="60" height="59" y="46"/>
<body name="t_ck_d" x="525" rotation="0" width="49" height="48" y="44"/>
<body name="t_ck_d" x="360" rotation="0" width="49" height="48" y="136"/>
<body name="t_ck_d" x="184" rotation="0" width="60" height="59" y="195"/>
<body name="t_joint_fixed" x="348" rotation="0" width="15" height="15" y="365"/>
<body name="t_joint_fixed" x="336" rotation="0" width="15" height="15" y="342"/>
<body name="t_revolute" x="508" rotation="1" width="10" height="10" y="372"/>
<body name="t_pushka" x="25" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="1" numberLevel="24" nameLevel="LEVEL 24" nickLevel="Johnny-K">
<bodies>
<body name="pic_oblako3" x="153" rotation="0" width="105" height="17" y="52"/>
<body name="pic_oblako3" x="557" rotation="0" width="174" height="29" y="48"/>
<body name="pic_oblako3" x="364" rotation="0" width="169" height="28" y="91"/>
<body name="pic_trava2" x="83" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="525" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="377" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="230" rotation="0" width="148" height="15" y="405"/>
<body name="pic_trava2" x="671" rotation="0" width="148" height="15" y="405"/>
<body name="pic_dub" x="227" rotation="0" width="192" height="217" y="311"/>
<body name="t_b2_s" x="344" rotation="0" width="690" height="10" y="414"/>
<body name="t_b2_s" x="6" rotation="90" width="460" height="10" y="188"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="187"/>
<body name="t_bs_s" x="762" rotation="0" width="283" height="12" y="362"/>
<body name="t_bs_s" x="448" rotation="0" width="283" height="12" y="364"/>
<body name="t_b2_s" x="347" rotation="0" width="690" height="10" y="5"/>
<body name="t_ck_d" x="600" rotation="0" width="168" height="165" y="276"/>
<body name="t_b_d" x="337" rotation="0" width="55" height="41" y="390"/>
<body name="targetBox" x="396" rotation="0" width="56" height="26" y="395"/>
<body name="t_pushka" x="28" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="25" nameLevel="LEVEL 25" fon="2" nickLevel="Johnny-K">
<bodies>
<body name="pic_oblako3" x="154" rotation="0" width="175" height="29" y="65"/>
<body name="pic_oblako3" x="440" rotation="0" width="127" height="21" y="36"/>
<body name="pic_snegovik" x="438" rotation="0" width="52" height="72" y="316"/>
<body name="pic_domsneg" x="583" rotation="0" width="197" height="153" y="335"/>
<body name="pic_elka" x="83" rotation="0" width="95" height="150" y="338"/>
<body name="pic_elka" x="195" rotation="0" width="78" height="123" y="351"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="415"/>
<body name="t_bb_s" x="589" rotation="-3" width="75" height="32" y="224"/>
<body name="t_bb_s" x="517" rotation="-3" width="75" height="32" y="235"/>
<body name="t_bb_s" x="431" rotation="0" width="75" height="32" y="366"/>
<body name="t_bb_s" x="378" rotation="0" width="75" height="32" y="395"/>
<body name="t_bb_s" x="450" rotation="0" width="75" height="32" y="396"/>
<body name="t_bb_s" x="445" rotation="-3" width="75" height="32" y="241"/>
<body name="t_bb_s" x="661" rotation="0" width="75" height="32" y="198"/>
<body name="t_b2_s" x="301" rotation="90" width="50" height="12" y="178"/>
<body name="t_bb_s" x="264" rotation="0" width="75" height="32" y="257"/>
<body name="t_bb_s" x="263" rotation="0" width="75" height="32" y="169"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="215"/>
<body name="t_b2_s" x="3" rotation="90" width="460" height="10" y="214"/>
<body name="t_b2_s" x="390" rotation="0" width="10" height="10" y="376"/>
<body name="t_cbm_d" x="647" rotation="0" width="61" height="60" y="154"/>
<body name="t_bh_d" x="238" rotation="90" width="61" height="26" y="213"/>
<body name="targetCircle" x="280" rotation="0" width="47" height="47" y="218"/>
<body name="t_bk2_d" x="388" rotation="103" width="182" height="12" y="293"/>
<body name="t_pushka" x="23" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="26" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 26">
<bodies>
<body name="pic_derevo" x="399" rotation="0" width="108" height="148" y="351"/>
<body name="pic_bereza" x="152" rotation="0" width="56" height="119" y="350"/>
<body name="pic_trava2" x="181" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="41" rotation="0" width="148" height="15" y="408"/>
<body name="pic_trava2" x="396" rotation="0" width="148" height="15" y="407"/>
<body name="pic_grib2" x="240" rotation="0" width="32" height="50" y="328"/>
<body name="pic_trava2" x="562" rotation="0" width="70" height="7" y="261"/>
<body name="pic_solnce" x="599" rotation="0" width="114" height="101" y="64"/>
<body name="pic_oblako3" x="199" rotation="0" width="105" height="17" y="48"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_bb_s" x="509" rotation="0" width="61" height="31" y="248"/>
<body name="t_bb_s" x="509" rotation="0" width="61" height="31" y="278"/>
<body name="t_bb_s" x="510" rotation="0" width="61" height="31" y="308"/>
<body name="t_bb_s" x="510" rotation="0" width="61" height="31" y="338"/>
<body name="t_bb_s" x="510" rotation="0" width="61" height="31" y="367"/>
<body name="t_bb_s" x="510" rotation="0" width="61" height="31" y="397"/>
<body name="t_bb_s" x="281" rotation="0" width="61" height="31" y="277"/>
<body name="t_bb_s" x="282" rotation="0" width="61" height="31" y="307"/>
<body name="t_bb_s" x="282" rotation="0" width="61" height="31" y="337"/>
<body name="t_bb_s" x="282" rotation="0" width="61" height="31" y="366"/>
<body name="t_bb_s" x="282" rotation="0" width="61" height="31" y="396"/>
<body name="t_b2_s" x="253" rotation="0" width="690" height="10" y="416"/>
<body name="t_bb_s" x="567" rotation="0" width="61" height="31" y="278"/>
<body name="t_b2_s" x="32" rotation="0" width="50" height="10" y="302"/>
<body name="t_b2_s" x="32" rotation="0" width="50" height="10" y="166"/>
<body name="t_bb_s" x="391" rotation="0" width="61" height="31" y="59"/>
<body name="t_bb_s" x="390" rotation="0" width="61" height="31" y="29"/>
<body name="targetCircle" x="501" rotation="0" width="60" height="60" y="203"/>
<body name="t_bk2_d" x="391" rotation="90" width="187" height="15" y="173"/>
<body name="t_bk2_d" x="391" rotation="0" width="187" height="15" y="173"/>
<body name="t_b_d" x="310" rotation="0" width="57" height="39" y="243"/>
<body name="t_b_d" x="323" rotation="0" width="57" height="39" y="206"/>
<body name="t_revolute_motor" x="391" rotation="-1" width="14" height="14" y="173"/>
<body name="t_pushka" x="556" rotation="0" width="56" height="40" y="397"/>
<body name="t_pushka" x="36" rotation="0" width="56" height="40" y="283"/>
<body name="t_pushka" x="36" rotation="0" width="56" height="40" y="147"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="5" numberLevel="27" nameLevel="LEVEL 27" nickLevel="Johnny-K">
<bodies>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_bb_s" x="206" rotation="90" width="86" height="35" y="371"/>
<body name="t_bb_s" x="594" rotation="90" width="86" height="35" y="374"/>
<body name="t_cbm_d" x="429" rotation="0" width="61" height="60" y="384"/>
<body name="targetCircle" x="403" rotation="0" width="60" height="60" y="334"/>
<body name="t_cbm_d" x="313" rotation="0" width="61" height="60" y="382"/>
<body name="t_cbm_d" x="377" rotation="0" width="61" height="60" y="388"/>
<body name="t_cbm_d" x="342" rotation="0" width="61" height="60" y="335"/>
<body name="t_cbm_d" x="484" rotation="0" width="61" height="60" y="283"/>
<body name="t_cbm_d" x="515" rotation="0" width="61" height="60" y="335"/>
<body name="t_cbm_d" x="281" rotation="0" width="61" height="60" y="332"/>
<body name="t_cbm_d" x="458" rotation="0" width="61" height="60" y="331"/>
<body name="t_cbm_d" x="314" rotation="0" width="61" height="60" y="287"/>
<body name="t_cbm_d" x="370" rotation="0" width="61" height="60" y="285"/>
<body name="t_cbm_d" x="427" rotation="0" width="61" height="60" y="285"/>
<body name="t_cbm_d" x="339" rotation="0" width="61" height="60" y="237"/>
<body name="t_cbm_d" x="396" rotation="0" width="61" height="60" y="237"/>
<body name="t_cbm_d" x="453" rotation="0" width="61" height="60" y="233"/>
<body name="t_cbm_d" x="368" rotation="0" width="61" height="60" y="187"/>
<body name="t_cbm_d" x="425" rotation="0" width="61" height="60" y="183"/>
<body name="t_cbm_d" x="397" rotation="0" width="61" height="60" y="134"/>
<body name="t_cbm_d" x="250" rotation="0" width="61" height="60" y="383"/>
<body name="t_cbm_d" x="485" rotation="0" width="61" height="60" y="385"/>
<body name="t_cbm_d" x="544" rotation="0" width="61" height="60" y="386"/>
<body name="t_o_d" x="313" rotation="0" width="26" height="30" y="383"/>
<body name="t_o_d" x="249" rotation="0" width="26" height="30" y="386"/>
<body name="t_o_d" x="378" rotation="0" width="26" height="30" y="391"/>
<body name="t_o_d" x="486" rotation="0" width="26" height="30" y="388"/>
<body name="t_o_d" x="431" rotation="0" width="26" height="30" y="389"/>
<body name="t_o_d" x="554" rotation="0" width="26" height="30" y="366"/>
<body name="t_joint_fixed" x="314" rotation="0" width="15" height="15" y="383"/>
<body name="t_joint_fixed" x="248" rotation="0" width="15" height="15" y="387"/>
<body name="t_joint_fixed" x="377" rotation="0" width="15" height="15" y="391"/>
<body name="t_joint_fixed" x="430" rotation="0" width="15" height="15" y="389"/>
<body name="t_joint_fixed" x="485" rotation="0" width="15" height="15" y="387"/>
<body name="t_joint_fixed" x="553" rotation="0" width="15" height="15" y="365"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="28" nickLevel="Johnny-K" fon="2" nameLevel="LEVEL 28">
<bodies>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_bb_s" x="602" rotation="90" width="110" height="48" y="359"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="36"/>
<body name="t_b2_s" x="528" rotation="0" width="200" height="10" y="415"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="116"/>
<body name="t_b2_s" x="50" rotation="0" width="100" height="10" y="416"/>
<body name="t_b_d" x="457" rotation="0" width="57" height="39" y="358"/>
<body name="t_b_d" x="457" rotation="0" width="57" height="39" y="322"/>
<body name="t_b_d" x="457" rotation="0" width="57" height="39" y="394"/>
<body name="t_b_d" x="457" rotation="0" width="57" height="39" y="286"/>
<body name="t_b_d" x="457" rotation="0" width="57" height="39" y="214"/>
<body name="t_b_d" x="457" rotation="0" width="57" height="39" y="250"/>
<body name="t_b_d" x="457" rotation="0" width="57" height="39" y="178"/>
<body name="t_b_d" x="456" rotation="0" width="57" height="39" y="142"/>
<body name="t_b_d" x="455" rotation="0" width="57" height="39" y="106"/>
<body name="t_b_d" x="455" rotation="0" width="57" height="39" y="70"/>
<body name="t_b_d" x="455" rotation="0" width="57" height="39" y="34"/>
<body name="targetCircle" x="623" rotation="0" width="60" height="60" y="277"/>
<body name="t_pushka" x="22" rotation="0" width="56" height="40" y="397"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="29" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 29">
<bodies>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="5"/>
<body name="t_b2_s" x="3" rotation="90" width="460" height="10" y="195"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="187"/>
<body name="t_b2_s" x="291" rotation="0" width="20" height="10" y="415"/>
<body name="t_b2_s" x="337" rotation="0" width="20" height="10" y="415"/>
<body name="t_b2_s" x="383" rotation="0" width="20" height="10" y="415"/>
<body name="t_b2_s" x="429" rotation="0" width="20" height="10" y="414"/>
<body name="t_b2_s" x="475" rotation="0" width="20" height="10" y="414"/>
<body name="t_b2_s" x="660" rotation="0" width="20" height="10" y="414"/>
<body name="t_b2_s" x="614" rotation="0" width="20" height="10" y="414"/>
<body name="t_b2_s" x="568" rotation="0" width="20" height="10" y="415"/>
<body name="t_b2_s" x="522" rotation="0" width="20" height="10" y="415"/>
<body name="t_bs_s" x="288" rotation="90" width="283" height="12" y="444"/>
<body name="t_bs_s" x="288" rotation="90" width="50" height="12" y="253"/>
<body name="t_bs_s" x="288" rotation="90" width="50" height="12" y="178"/>
<body name="t_bs_s" x="288" rotation="90" width="64" height="12" y="93"/>
<body name="t_b2_s" x="22" rotation="0" width="33" height="10" y="414"/>
<body name="t_cJump_d" x="408" rotation="0" width="34" height="34" y="47"/>
<body name="t_cJump_d" x="455" rotation="0" width="34" height="34" y="47"/>
<body name="t_cJump_d" x="363" rotation="0" width="34" height="34" y="48"/>
<body name="t_cJump_d" x="548" rotation="0" width="34" height="34" y="48"/>
<body name="t_cJump_d" x="501" rotation="0" width="34" height="34" y="48"/>
<body name="t_cJump_d" x="640" rotation="0" width="34" height="34" y="47"/>
<body name="t_cJump_d" x="593" rotation="0" width="34" height="34" y="47"/>
<body name="t_cJump_d" x="381" rotation="0" width="34" height="34" y="122"/>
<body name="t_cJump_d" x="474" rotation="0" width="34" height="34" y="123"/>
<body name="t_cJump_d" x="427" rotation="0" width="34" height="34" y="123"/>
<body name="t_cJump_d" x="519" rotation="0" width="34" height="34" y="122"/>
<body name="t_cJump_d" x="566" rotation="0" width="34" height="34" y="122"/>
<body name="t_cJump_d" x="655" rotation="0" width="34" height="34" y="124"/>
<body name="t_cJump_d" x="609" rotation="0" width="34" height="34" y="123"/>
<body name="targetCircle_Jump" x="626" rotation="1" width="48" height="48" y="205"/>
<body name="t_revolute" x="626" rotation="0" width="10" height="10" y="189"/>
<body name="t_pushka" x="22" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="30" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 30">
<bodies>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="35" rotation="0" width="200" height="10" y="415"/>
<body name="t_b2_s" x="555" rotation="0" width="500" height="10" y="414"/>
<body name="t_bb_s" x="177" rotation="0" width="85" height="39" y="400"/>
<body name="t_bb_s" x="175" rotation="0" width="85" height="39" y="361"/>
<body name="t_bs_s" x="174" rotation="90" width="178" height="12" y="254"/>
<body name="t_b2_s" x="311" rotation="0" width="10" height="10" y="406"/>
<body name="t_bb_s" x="415" rotation="90" width="50" height="17" y="119"/>
<body name="t_bs_s" x="529" rotation="160" width="163" height="13" y="247"/>
<body name="t_bs_s" x="196" rotation="-121" width="84" height="12" y="203"/>
<body name="t_bk2_d" x="307" rotation="0" width="203" height="13" y="102"/>
<body name="targetBox" x="420" rotation="0" width="45" height="21" y="86"/>
<body name="t_cz_d" x="306" rotation="0" width="15" height="18" y="89"/>
<body name="t_cz_d" x="306" rotation="0" width="15" height="18" y="74"/>
<body name="t_cz_d" x="306" rotation="0" width="15" height="18" y="59"/>
<body name="t_cz_d" x="306" rotation="0" width="15" height="18" y="45"/>
<body name="t_cz_d" x="307" rotation="0" width="15" height="18" y="31"/>
<body name="t_cz_d" x="307" rotation="0" width="15" height="18" y="16"/>
<body name="t_joint" x="305" rotation="0" width="10" height="10" y="80"/>
<body name="t_joint" x="306" rotation="0" width="10" height="10" y="67"/>
<body name="t_joint" x="307" rotation="0" width="10" height="10" y="52"/>
<body name="t_joint" x="307" rotation="0" width="10" height="10" y="38"/>
<body name="t_joint" x="307" rotation="0" width="10" height="10" y="97"/>
<body name="t_joint" x="307" rotation="0" width="10" height="10" y="10"/>
<body name="t_joint" x="307" rotation="0" width="10" height="10" y="24"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="31" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 31">
<bodies>
<body name="pic_dub" x="127" rotation="0" width="184" height="208" y="313"/>
<body name="pic_trava2" x="364" rotation="0" width="148" height="15" y="407"/>
<body name="pic_trava2" x="217" rotation="0" width="148" height="15" y="406"/>
<body name="pic_trava2" x="59" rotation="0" width="148" height="15" y="406"/>
<body name="pic_solnce" x="88" rotation="0" width="115" height="102" y="71"/>
<body name="pic_oblako3" x="373" rotation="0" width="145" height="24" y="50"/>
<body name="pic_oblako3" x="555" rotation="0" width="109" height="18" y="31"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="93" rotation="0" width="690" height="10" y="415"/>
<body name="t_bb_s" x="252" rotation="90" width="72" height="37" y="375"/>
<body name="t_bb_s" x="253" rotation="90" width="72" height="37" y="305"/>
<body name="t_bb_s" x="252" rotation="90" width="72" height="37" y="162"/>
<body name="t_bb_s" x="251" rotation="90" width="72" height="37" y="45"/>
<body name="targetCircle_small" x="559" rotation="0" width="22" height="22" y="123"/>
<body name="targetCircle_small" x="441" rotation="0" width="22" height="22" y="119"/>
<body name="targetCircle_small" x="317" rotation="0" width="22" height="22" y="119"/>
<body name="t_bs_s" x="589" rotation="1" width="77" height="11" y="140"/>
<body name="t_bs_s" x="462" rotation="1" width="77" height="11" y="137"/>
<body name="t_bs_s" x="338" rotation="1" width="77" height="11" y="135"/>
<body name="t_mpv_d" x="280" rotation="0" width="12" height="150" y="227"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="32" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 32">
<bodies>
<body name="pic_grib1" x="648" rotation="0" width="40" height="57" y="345"/>
<body name="pic_grib2" x="401" rotation="0" width="32" height="50" y="248"/>
<body name="pic_dub" x="193" rotation="0" width="172" height="194" y="322"/>
<body name="pic_pautina2" x="656" rotation="0" width="49" height="52" y="35"/>
<body name="pic_solnce" x="393" rotation="0" width="82" height="73" y="53"/>
<body name="pic_oblako3" x="144" rotation="0" width="105" height="17" y="42"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_bs_s" x="351" rotation="90" width="283" height="12" y="345"/>
<body name="t_b2_s" x="2" rotation="0" width="690" height="10" y="415"/>
<body name="t_bs_s" x="418" rotation="90" width="283" height="12" y="346"/>
<body name="t_b2_s" x="498" rotation="0" width="300" height="10" y="436"/>
<body name="t_bs_s" x="485" rotation="90" width="283" height="12" y="345"/>
<body name="t_bs_s" x="554" rotation="90" width="283" height="12" y="344"/>
<body name="t_bs_s" x="626" rotation="90" width="283" height="12" y="344"/>
<body name="t_bk2_d" x="257" rotation="0" width="207" height="17" y="138"/>
<body name="t_btarg_d" x="386" rotation="0" width="56" height="27" y="408"/>
<body name="t_btarg2_d" x="451" rotation="0" width="56" height="27" y="409"/>
<body name="targetBox" x="522" rotation="0" width="56" height="26" y="409"/>
<body name="t_btarg2_d" x="588" rotation="0" width="56" height="27" y="409"/>
<body name="t_revolute_motor" x="256" rotation="1" width="15" height="15" y="138"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="33" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 33">
<bodies>
<body name="pic_planeta" x="96" rotation="0" width="129" height="129" y="95"/>
<body name="pic_les" x="116" rotation="0" width="252" height="158" y="340"/>
<body name="pic_trava2" x="612" rotation="0" width="148" height="15" y="407"/>
<body name="pic_derevo" x="621" rotation="0" width="108" height="148" y="350"/>
<body name="t_b2_s" x="3" rotation="90" width="426" height="10" y="206"/>
<body name="t_b2_s" x="687" rotation="90" width="426" height="10" y="208"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="416"/>
<body name="t_bs_s" x="532" rotation="90" width="283" height="12" y="271"/>
<body name="t_bs_s" x="247" rotation="90" width="379" height="12" y="226"/>
<body name="targetCircle" x="363" rotation="0" width="60" height="60" y="381"/>
<body name="t_cLight_d" x="291" rotation="0" width="63" height="62" y="375"/>
<body name="t_cLight_d" x="296" rotation="0" width="63" height="62" y="308"/>
<body name="t_cLight_d" x="303" rotation="0" width="63" height="62" y="233"/>
<body name="t_cLight_d" x="379" rotation="0" width="63" height="62" y="236"/>
<body name="t_cLight_d" x="405" rotation="0" width="63" height="62" y="307"/>
<body name="t_cLight_d" x="496" rotation="0" width="63" height="62" y="377"/>
<body name="t_cLight_d" x="422" rotation="0" width="63" height="62" y="371"/>
<body name="t_cLight_d" x="354" rotation="0" width="63" height="62" y="306"/>
<body name="t_cLight_d" x="481" rotation="0" width="63" height="62" y="303"/>
<body name="t_pushka" x="20" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="2" numberLevel="34" nameLevel="Level 34" nickLevel="Johnny-K">
<bodies>
<body name="pic_grib1" x="65" rotation="0" width="40" height="57" y="374"/>
<body name="pic_oblako" x="239" rotation="0" width="219" height="65" y="63"/>
<body name="pic_oblako" x="567" rotation="0" width="142" height="42" y="93"/>
<body name="pic_trava" x="505" rotation="-1" width="329" height="61" y="370"/>
<body name="pic_trava2" x="249" rotation="0" width="186" height="19" y="392"/>
<body name="pic_palma1" x="259" rotation="0" width="156" height="209" y="290"/>
<body name="t_bb_s" x="679" rotation="90" width="58" height="23" y="257"/>
<body name="t_bb_s" x="679" rotation="90" width="58" height="23" y="201"/>
<body name="t_bb_s" x="552" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="497" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="607" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="387" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="332" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="442" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="276" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="678" rotation="90" width="58" height="23" y="369"/>
<body name="t_bb_s" x="678" rotation="90" width="58" height="23" y="313"/>
<body name="t_bb_s" x="220" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="164" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="662" rotation="0" width="58" height="23" y="408"/>
<body name="t_bb_s" x="24" rotation="90" width="110" height="48" y="394"/>
<body name="t_bb_s" x="146" rotation="90" width="58" height="23" y="369"/>
<body name="t_c_d" x="371" rotation="0" width="62" height="60" y="132"/>
<body name="t_bk2_d" x="498" rotation="0" width="168" height="46" y="127"/>
<body name="t_bh_d" x="589" rotation="90" width="101" height="16" y="156"/>
<body name="t_bh_d" x="485" rotation="90" width="71" height="10" y="182"/>
<body name="t_bh_d" x="543" rotation="0" width="107" height="13" y="213"/>
<body name="t_ck_d" x="371" rotation="0" width="97" height="95" y="131"/>
<body name="targetCircle" x="540" rotation="0" width="49" height="49" y="170"/>
<body name="t_o_d" x="453" rotation="0" width="17" height="20" y="99"/>
<body name="t_o_d" x="482" rotation="0" width="17" height="20" y="100"/>
<body name="t_o_d" x="511" rotation="0" width="17" height="20" y="99"/>
<body name="t_o_d" x="542" rotation="0" width="17" height="20" y="99"/>
<body name="t_joint_fixed" x="415" rotation="0" width="15" height="15" y="127"/>
<body name="t_joint_fixed" x="591" rotation="0" width="15" height="15" y="203"/>
<body name="t_joint_fixed" x="491" rotation="0" width="15" height="15" y="209"/>
<body name="t_joint_fixed" x="483" rotation="0" width="15" height="15" y="149"/>
<body name="t_joint_fixed" x="582" rotation="0" width="15" height="15" y="133"/>
<body name="t_joint_fixed" x="453" rotation="0" width="15" height="15" y="106"/>
<body name="t_joint_fixed" x="481" rotation="0" width="15" height="15" y="108"/>
<body name="t_joint_fixed" x="512" rotation="0" width="15" height="15" y="107"/>
<body name="t_joint_fixed" x="543" rotation="0" width="15" height="15" y="105"/>
<body name="t_revolute_motor" x="371" rotation="1" width="20" height="20" y="132"/>
<body name="t_pushka" x="24" rotation="0" width="56" height="40" y="325"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="2" numberLevel="35" nameLevel="LEVEL 35" nickLevel="Johnny-K">
<bodies>
<body name="pic_elka" x="118" rotation="0" width="95" height="150" y="337"/>
<body name="pic_trava2" x="434" rotation="-10" width="165" height="17" y="360"/>
<body name="pic_trava2" x="180" rotation="-10" width="165" height="17" y="402"/>
<body name="pic_trava2" x="63" rotation="0" width="165" height="17" y="406"/>
<body name="pic_trava2" x="598" rotation="0" width="170" height="17" y="348"/>
<body name="pic_kiparis" x="441" rotation="0" width="61" height="34" y="345"/>
<body name="pic_grib1" x="199" rotation="0" width="45" height="65" y="215"/>
<body name="pic_oblako3" x="247" rotation="0" width="205" height="34" y="54"/>
<body name="pic_oblako3" x="540" rotation="0" width="152" height="25" y="99"/>
<body name="t_b2_s" x="345" rotation="0" width="690" height="10" y="414"/>
<body name="t_b2_s" x="231" rotation="4" width="328" height="10" y="132"/>
<body name="t_b2_s" x="64" rotation="0" width="16" height="10" y="120"/>
<body name="t_b2_s" x="424" rotation="-10" width="142" height="10" y="369"/>
<body name="t_b2_s" x="590" rotation="0" width="200" height="10" y="357"/>
<body name="t_b2_s" x="218" rotation="-10" width="92" height="10" y="405"/>
<body name="t_b2_s" x="312" rotation="-10" width="105" height="10" y="396"/>
<body name="t_b2_s" x="4" rotation="90" width="400" height="10" y="215"/>
<body name="t_b2_s" x="687" rotation="90" width="400" height="10" y="217"/>
<body name="t_c_s" x="575" rotation="0" width="45" height="45" y="337"/>
<body name="t_b2_s" x="177" rotation="90" width="244" height="10" y="248"/>
<body name="t_ck_d" x="67" rotation="0" width="95" height="93" y="69"/>
<body name="targetBox" x="616" rotation="-166" width="69" height="32" y="281"/>
<body name="t_bk2_d" x="577" rotation="12" width="208" height="16" y="308"/>
<body name="t_bk_d" x="670" rotation="-76" width="14" height="25" y="315"/>
<body name="t_joint" x="580" rotation="0" width="17" height="17" y="319"/>
<body name="t_joint_fixed" x="667" rotation="0" width="15" height="15" y="324"/>
<body name="t_pushka" x="26" rotation="0" width="56" height="40" y="397"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="36" nameLevel="LEVEL 36" nickLevel="Johnny-K" fon="1">
<bodies>
<body name="pic_trava2" x="132" rotation="0" width="277" height="28" y="405"/>
<body name="pic_trava2" x="595" rotation="0" width="277" height="28" y="401"/>
<body name="pic_dom2" x="627" rotation="0" width="131" height="114" y="355"/>
<body name="pic_derevo2" x="121" rotation="0" width="140" height="140" y="342"/>
<body name="pic_grib1" x="474" rotation="0" width="36" height="52" y="376"/>
<body name="pic_derevo" x="527" rotation="0" width="136" height="187" y="326"/>
<body name="pic_oblako3" x="559" rotation="0" width="112" height="19" y="68"/>
<body name="pic_oblako3" x="292" rotation="0" width="82" height="14" y="4"/>
<body name="pic_oblako3" x="125" rotation="0" width="178" height="29" y="40"/>
<body name="t_b2_s" x="346" rotation="0" width="690" height="10" y="413"/>
<body name="t_b2_s" x="6" rotation="90" width="690" height="10" y="66"/>
<body name="t_bb_s" x="443" rotation="90" width="80" height="31" y="376"/>
<body name="t_bb_s" x="285" rotation="90" width="80" height="31" y="378"/>
<body name="t_bb_s" x="314" rotation="90" width="80" height="31" y="378"/>
<body name="t_bb_s" x="413" rotation="90" width="80" height="31" y="376"/>
<body name="t_bb_s" x="349" rotation="0" width="120" height="38" y="48"/>
<body name="t_bb_s" x="427" rotation="90" width="65" height="31" y="293"/>
<body name="t_bb_s" x="428" rotation="90" width="87" height="31" y="220"/>
<body name="t_bb_s" x="286" rotation="90" width="80" height="31" y="286"/>
<body name="t_bb_s" x="287" rotation="90" width="80" height="31" y="209"/>
<body name="t_b2_s" x="686" rotation="90" width="690" height="10" y="-47"/>
<body name="t_bk2_d" x="397" rotation="0" width="214" height="13" y="333"/>
<body name="targetBox" x="367" rotation="0" width="56" height="26" y="393"/>
<body name="t_ck_d" x="402" rotation="0" width="92" height="90" y="-14"/>
<body name="t_bk2_d" x="366" rotation="0" width="250" height="13" y="161"/>
<body name="t_o_d" x="440" rotation="0" width="18" height="21" y="172"/>
<body name="t_pushka" x="26" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="37" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 37">
<bodies>
<body name="pic_grib2" x="425" rotation="0" width="32" height="50" y="112"/>
<body name="pic_oblako3" x="181" rotation="0" width="105" height="17" y="133"/>
<body name="pic_oblako3" x="360" rotation="0" width="133" height="22" y="56"/>
<body name="pic_trava2" x="320" rotation="0" width="148" height="15" y="407"/>
<body name="pic_trava2" x="464" rotation="0" width="148" height="15" y="406"/>
<body name="pic_trava2" x="603" rotation="0" width="148" height="15" y="407"/>
<body name="pic_les" x="134" rotation="0" width="252" height="158" y="340"/>
<body name="pic_bereza" x="508" rotation="0" width="56" height="119" y="355"/>
<body name="pic_pautina2" x="653" rotation="0" width="62" height="66" y="42"/>
<body name="t_b2_s" x="348" rotation="0" width="690" height="10" y="5"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="184"/>
<body name="t_b2_s" x="6" rotation="90" width="460" height="10" y="194"/>
<body name="t_b2_s" x="348" rotation="0" width="690" height="10" y="415"/>
<body name="t_bb_s" x="489" rotation="0" width="110" height="55" y="175"/>
<body name="t_bb_s" x="62" rotation="0" width="110" height="55" y="123"/>
<body name="t_bb_s" x="61" rotation="0" width="110" height="55" y="71"/>
<body name="t_bb_s" x="61" rotation="0" width="110" height="55" y="20"/>
<body name="t_bb_s" x="61" rotation="0" width="110" height="55" y="175"/>
<body name="t_bb_s" x="490" rotation="0" width="110" height="55" y="123"/>
<body name="t_bb_s" x="489" rotation="0" width="110" height="55" y="71"/>
<body name="t_bb_s" x="490" rotation="0" width="110" height="55" y="19"/>
<body name="t_c_d" x="607" rotation="0" width="48" height="46" y="391"/>
<body name="t_c_d" x="591" rotation="0" width="48" height="46" y="355"/>
<body name="t_c_d" x="575" rotation="0" width="48" height="46" y="318"/>
<body name="t_c_d" x="557" rotation="0" width="48" height="46" y="282"/>
<body name="t_c_d" x="538" rotation="0" width="48" height="46" y="250"/>
<body name="t_mpg_d" x="323" rotation="0" width="183" height="11" y="190"/>
<body name="t_c_d" x="515" rotation="0" width="48" height="46" y="218"/>
<body name="t_bh_d" x="605" rotation="123" width="69" height="24" y="163"/>
<body name="targetCircle" x="574" rotation="36" width="52" height="52" y="211"/>
<body name="t_cz_d" x="256" rotation="0" width="15" height="18" y="202"/>
<body name="t_cz_d" x="256" rotation="0" width="15" height="18" y="218"/>
<body name="t_cz_d" x="256" rotation="0" width="15" height="18" y="234"/>
<body name="t_cz_d" x="256" rotation="0" width="15" height="18" y="249"/>
<body name="t_cz_d" x="392" rotation="0" width="15" height="18" y="203"/>
<body name="t_cz_d" x="392" rotation="0" width="15" height="18" y="219"/>
<body name="t_cz_d" x="392" rotation="0" width="15" height="18" y="235"/>
<body name="t_cz_d" x="392" rotation="0" width="15" height="18" y="250"/>
<body name="t_o_d" x="255" rotation="0" width="21" height="25" y="272"/>
<body name="t_o_d" x="391" rotation="0" width="21" height="25" y="273"/>
<body name="t_joint" x="627" rotation="0" width="17" height="17" y="408"/>
<body name="t_joint" x="609" rotation="0" width="17" height="17" y="409"/>
<body name="t_joint" x="589" rotation="0" width="17" height="17" y="409"/>
<body name="t_joint" x="598" rotation="0" width="17" height="17" y="374"/>
<body name="t_joint" x="565" rotation="0" width="17" height="17" y="304"/>
<body name="t_joint" x="258" rotation="0" width="10" height="10" y="258"/>
<body name="t_joint" x="257" rotation="0" width="10" height="10" y="242"/>
<body name="t_joint" x="255" rotation="0" width="10" height="10" y="225"/>
<body name="t_joint" x="256" rotation="0" width="10" height="10" y="208"/>
<body name="t_joint" x="256" rotation="0" width="10" height="10" y="195"/>
<body name="t_joint" x="394" rotation="0" width="10" height="10" y="259"/>
<body name="t_joint" x="393" rotation="0" width="10" height="10" y="243"/>
<body name="t_joint" x="391" rotation="0" width="10" height="10" y="226"/>
<body name="t_joint" x="392" rotation="0" width="10" height="10" y="209"/>
<body name="t_joint" x="392" rotation="0" width="10" height="10" y="196"/>
<body name="t_joint" x="526" rotation="0" width="17" height="17" y="235"/>
<body name="t_joint" x="546" rotation="0" width="17" height="17" y="265"/>
<body name="t_joint" x="582" rotation="0" width="17" height="17" y="339"/>
<body name="t_joint" x="513" rotation="0" width="17" height="17" y="200"/>
<body name="t_joint_fixed" x="586" rotation="0" width="15" height="15" y="195"/>
<body name="t_revolute" x="618" rotation="0" width="14" height="14" y="143"/>
<body name="t_pushka" x="33" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="38" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 38">
<bodies>
<body name="pic_trava" x="236" rotation="0" width="453" height="83" y="377"/>
<body name="pic_oblako3" x="95" rotation="0" width="105" height="17" y="85"/>
<body name="pic_oblako3" x="298" rotation="0" width="141" height="23" y="43"/>
<body name="pic_grib1" x="601" rotation="0" width="40" height="57" y="381"/>
<body name="t_b2_s" x="5" rotation="90" width="460" height="10" y="185"/>
<body name="t_b2_s" x="250" rotation="0" width="500" height="10" y="416"/>
<body name="t_bb_s" x="391" rotation="90" width="74" height="33" y="375"/>
<body name="t_bb_s" x="482" rotation="90" width="74" height="33" y="376"/>
<body name="t_bb_s" x="481" rotation="90" width="74" height="33" y="220"/>
<body name="t_bb_s" x="430" rotation="0" width="74" height="33" y="140"/>
<body name="t_bb_s" x="481" rotation="90" width="62" height="33" y="156"/>
<body name="t_bb_s" x="428" rotation="0" width="74" height="33" y="51"/>
<body name="t_bb_s" x="480" rotation="90" width="55" height="33" y="41"/>
<body name="t_bb_s" x="565" rotation="90" width="62" height="33" y="95"/>
<body name="t_bb_s" x="565" rotation="90" width="62" height="33" y="154"/>
<body name="t_bb_s" x="566" rotation="90" width="74" height="33" y="289"/>
<body name="t_bb_s" x="566" rotation="90" width="74" height="33" y="219"/>
<body name="t_bb_s" x="566" rotation="90" width="74" height="33" y="383"/>
<body name="t_bb_s" x="565" rotation="90" width="55" height="33" y="39"/>
<body name="t_bb_s" x="481" rotation="90" width="74" height="33" y="290"/>
<body name="t_c_d" x="407" rotation="0" width="59" height="57" y="96"/>
<body name="t_bk2_d" x="389" rotation="0" width="229" height="13" y="330"/>
<body name="targetBox" x="463" rotation="0" width="53" height="25" y="112"/>
<body name="t_pushka" x="25" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="1" numberLevel="39" nameLevel="LEVEL 39" nickLevel="Johnny-K">
<bodies>
<body name="pic_trava2" x="630" rotation="0" width="148" height="15" y="405"/>
<body name="pic_palma1" x="574" rotation="0" width="125" height="168" y="326"/>
<body name="pic_oblako3" x="138" rotation="0" width="149" height="25" y="78"/>
<body name="pic_oblako3" x="381" rotation="0" width="121" height="20" y="122"/>
<body name="pic_oblako3" x="501" rotation="0" width="105" height="17" y="64"/>
<body name="pic_grib1" x="269" rotation="0" width="40" height="57" y="324"/>
<body name="t_b2_s" x="5" rotation="90" width="460" height="10" y="183"/>
<body name="t_b2_s" x="26" rotation="0" width="50" height="10" y="415"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="188"/>
<body name="t_b2_s" x="621" rotation="0" width="127" height="10" y="414"/>
<body name="t_b2_s" x="246" rotation="90" width="200" height="10" y="395"/>
<body name="t_b2_s" x="347" rotation="0" width="690" height="10" y="1"/>
<body name="t_bk2_d" x="492" rotation="0" width="249" height="11" y="262"/>
<body name="t_bk2_d" x="490" rotation="90" width="249" height="11" y="258"/>
<body name="targetBox" x="610" rotation="0" width="56" height="26" y="397"/>
<body name="t_bk2_d" x="247" rotation="90" width="275" height="11" y="145"/>
<body name="t_bk2_d" x="249" rotation="0" width="275" height="11" y="149"/>
<body name="t_revolute_motor" x="490" rotation="1" width="10" height="10" y="262"/>
<body name="t_revolute_motor" x="247" rotation="1" width="10" height="10" y="149"/>
<body name="t_pushka" x="26" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="40" nameLevel="LEVEL 40" fon="3" nickLevel="Johnny-K">
<bodies>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="5"/>
<body name="t_b2_s" x="542" rotation="0" width="400" height="10" y="414"/>
<body name="t_b2_s" x="4" rotation="90" width="690" height="10" y="267"/>
<body name="t_b2_s" x="685" rotation="90" width="690" height="10" y="348"/>
<body name="t_b2_s" x="347" rotation="90" width="690" height="10" y="452"/>
<body name="t_b2_s" x="-104" rotation="0" width="400" height="10" y="415"/>
<body name="t_bb_s" x="17" rotation="0" width="110" height="48" y="109"/>
<body name="t_b2_s" x="580" rotation="0" width="77" height="10" y="77"/>
<body name="t_bb_s" x="123" rotation="0" width="110" height="48" y="153"/>
<body name="t_bb_s" x="231" rotation="0" width="110" height="48" y="58"/>
<body name="t_bb_s" x="229" rotation="0" width="110" height="48" y="197"/>
<body name="t_bb_s" x="228" rotation="0" width="110" height="48" y="242"/>
<body name="t_bb_s" x="123" rotation="0" width="110" height="48" y="196"/>
<body name="t_bb_s" x="19" rotation="0" width="110" height="48" y="151"/>
<body name="t_b2_s" x="480" rotation="0" width="276" height="10" y="162"/>
<body name="t_b2_s" x="613" rotation="90" width="81" height="10" y="119"/>
<body name="t_mpg_d" x="389" rotation="0" width="183" height="11" y="96"/>
<body name="targetBox" x="555" rotation="0" width="56" height="26" y="60"/>
<body name="t_bh_d" x="615" rotation="13" width="76" height="13" y="61"/>
<body name="t_bk2_d" x="638" rotation="101" width="291" height="12" y="161"/>
<body name="t_joint_fixed" x="650" rotation="0" width="15" height="15" y="71"/>
<body name="t_revolute" x="632" rotation="0" width="10" height="10" y="198"/>
<body name="t_pushka" x="23" rotation="0" width="56" height="40" y="394"/>
<body name="t_pushka" x="365" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="41" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 41">
<bodies>
<body name="pic_grib1" x="642" rotation="0" width="40" height="57" y="228"/>
<body name="pic_trava2" x="661" rotation="0" width="59" height="6" y="245"/>
<body name="pic_trava2" x="600" rotation="0" width="59" height="6" y="218"/>
<body name="pic_elka" x="595" rotation="0" width="95" height="150" y="148"/>
<body name="pic_kiparis" x="131" rotation="0" width="83" height="46" y="361"/>
<body name="pic_grib2" x="296" rotation="0" width="32" height="50" y="288"/>
<body name="pic_trava2" x="296" rotation="0" width="59" height="6" y="303"/>
<body name="pic_trava2" x="131" rotation="0" width="59" height="6" y="382"/>
<body name="pic_trava2" x="187" rotation="0" width="59" height="6" y="356"/>
<body name="pic_trava2" x="241" rotation="0" width="59" height="6" y="330"/>
<body name="pic_trava2" x="347" rotation="0" width="59" height="6" y="275"/>
<body name="pic_solnce" x="62" rotation="0" width="93" height="82" y="61"/>
<body name="pic_oblako3" x="465" rotation="0" width="163" height="27" y="28"/>
<body name="pic_oblako3" x="237" rotation="0" width="199" height="33" y="77"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="185"/>
<body name="t_bb_s" x="397" rotation="0" width="56" height="28" y="264"/>
<body name="t_bb_s" x="398" rotation="0" width="56" height="28" y="290"/>
<body name="t_bb_s" x="399" rotation="0" width="56" height="28" y="371"/>
<body name="t_bb_s" x="399" rotation="0" width="56" height="28" y="344"/>
<body name="t_bb_s" x="399" rotation="0" width="56" height="28" y="317"/>
<body name="t_bb_s" x="344" rotation="0" width="56" height="28" y="290"/>
<body name="t_bb_s" x="344" rotation="0" width="56" height="28" y="398"/>
<body name="t_bb_s" x="345" rotation="0" width="56" height="28" y="317"/>
<body name="t_bb_s" x="345" rotation="0" width="56" height="28" y="344"/>
<body name="t_bb_s" x="345" rotation="0" width="56" height="28" y="371"/>
<body name="t_bb_s" x="291" rotation="0" width="56" height="28" y="371"/>
<body name="t_bb_s" x="291" rotation="0" width="56" height="28" y="344"/>
<body name="t_bb_s" x="290" rotation="0" width="56" height="28" y="398"/>
<body name="t_bb_s" x="237" rotation="0" width="56" height="28" y="345"/>
<body name="t_bb_s" x="236" rotation="0" width="56" height="28" y="399"/>
<body name="t_bb_s" x="237" rotation="0" width="56" height="28" y="372"/>
<body name="t_bb_s" x="182" rotation="0" width="56" height="28" y="398"/>
<body name="t_bb_s" x="183" rotation="0" width="56" height="28" y="371"/>
<body name="t_bb_s" x="129" rotation="0" width="56" height="28" y="397"/>
<body name="t_b2_s" x="674" rotation="0" width="200" height="10" y="414"/>
<body name="t_bb_s" x="399" rotation="0" width="56" height="28" y="398"/>
<body name="t_bb_s" x="599" rotation="0" width="56" height="28" y="234"/>
<body name="t_bb_s" x="600" rotation="0" width="56" height="28" y="261"/>
<body name="t_bb_s" x="602" rotation="0" width="56" height="28" y="396"/>
<body name="t_bb_s" x="602" rotation="0" width="56" height="28" y="369"/>
<body name="t_bb_s" x="602" rotation="0" width="56" height="28" y="342"/>
<body name="t_bb_s" x="601" rotation="0" width="56" height="28" y="315"/>
<body name="t_bb_s" x="601" rotation="0" width="56" height="28" y="287"/>
<body name="t_bb_s" x="654" rotation="0" width="56" height="28" y="261"/>
<body name="t_bb_s" x="656" rotation="0" width="56" height="28" y="396"/>
<body name="t_bb_s" x="656" rotation="0" width="56" height="28" y="369"/>
<body name="t_bb_s" x="656" rotation="0" width="56" height="28" y="342"/>
<body name="t_bb_s" x="655" rotation="0" width="56" height="28" y="315"/>
<body name="t_bb_s" x="655" rotation="0" width="56" height="28" y="287"/>
<body name="t_bb_s" x="291" rotation="0" width="56" height="28" y="318"/>
<body name="t_bb_s" x="396" rotation="0" width="56" height="28" y="238"/>
<body name="t_b2_s" x="263" rotation="0" width="330" height="10" y="415"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="163"/>
<body name="t_b2_s" x="36" rotation="0" width="52" height="10" y="415"/>
<body name="targetBox" x="485" rotation="0" width="56" height="26" y="370"/>
<body name="t_bk2_d" x="393" rotation="0" width="302" height="12" y="218"/>
<body name="t_cz_d" x="554" rotation="90" width="17" height="21" y="371"/>
<body name="t_cz_d" x="448" rotation="90" width="17" height="21" y="371"/>
<body name="t_cz_d" x="519" rotation="90" width="17" height="21" y="371"/>
<body name="t_o_d" x="433" rotation="0" width="18" height="21" y="372"/>
<body name="t_o_d" x="570" rotation="0" width="18" height="21" y="370"/>
<body name="t_o_d" x="536" rotation="0" width="18" height="21" y="371"/>
<body name="t_joint" x="578" rotation="0" width="11" height="11" y="368"/>
<body name="t_joint" x="564" rotation="0" width="11" height="11" y="370"/>
<body name="t_joint" x="545" rotation="0" width="11" height="11" y="371"/>
<body name="t_joint" x="526" rotation="0" width="11" height="11" y="374"/>
<body name="t_joint" x="458" rotation="0" width="11" height="11" y="372"/>
<body name="t_joint" x="439" rotation="0" width="11" height="11" y="372"/>
<body name="t_joint" x="425" rotation="0" width="11" height="11" y="370"/>
<body name="t_joint" x="510" rotation="0" width="11" height="11" y="371"/>
<body name="t_pushka" x="26" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="42" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 42">
<bodies>
<body name="pic_planeta" x="99" rotation="0" width="90" height="90" y="60"/>
<body name="pic_oblako3" x="259" rotation="0" width="105" height="17" y="46"/>
<body name="pic_oblako3" x="503" rotation="0" width="212" height="35" y="53"/>
<body name="pic_les" x="126" rotation="0" width="252" height="158" y="340"/>
<body name="pic_trava2" x="576" rotation="0" width="188" height="19" y="406"/>
<body name="t_b2_s" x="5" rotation="90" width="460" height="10" y="193"/>
<body name="t_b2_s" x="350" rotation="0" width="690" height="10" y="415"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="189"/>
<body name="t_b2_s" x="351" rotation="0" width="690" height="10" y="3"/>
<body name="t_b2_s" x="298" rotation="0" width="100" height="10" y="408"/>
<body name="t_bs_s" x="316" rotation="0" width="97" height="12" y="257"/>
<body name="t_bs_s" x="526" rotation="0" width="309" height="12" y="211"/>
<body name="t_bs_s" x="315" rotation="0" width="97" height="12" y="266"/>
<body name="t_b2_s" x="469" rotation="0" width="10" height="10" y="250"/>
<body name="t_bs_s" x="307" rotation="0" width="115" height="12" y="210"/>
<body name="t_bs_s" x="315" rotation="0" width="97" height="12" y="276"/>
<body name="t_b2_s" x="7" rotation="0" width="10" height="17" y="206"/>
<body name="t_b2_s" x="435" rotation="0" width="87" height="10" y="407"/>
<body name="t_c_s" x="487" rotation="0" width="57" height="57" y="390"/>
<body name="t_c_s" x="680" rotation="0" width="57" height="57" y="394"/>
<body name="t_bs_s" x="426" rotation="0" width="97" height="12" y="278"/>
<body name="t_bs_s" x="426" rotation="0" width="97" height="12" y="268"/>
<body name="t_bs_s" x="426" rotation="0" width="97" height="12" y="258"/>
<body name="t_bk2_d" x="362" rotation="80" width="162" height="11" y="175"/>
<body name="t_cbm_d" x="271" rotation="0" width="37" height="36" y="235"/>
<body name="targetBox" x="471" rotation="0" width="42" height="20" y="235"/>
<body name="t_pushka" x="34" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="4" numberLevel="43" nameLevel="Level 43" nickLevel="Johnny-K">
<bodies>
<body name="t_b2_s" x="394" rotation="0" width="300" height="10" y="413"/>
<body name="t_bs_s" x="347" rotation="0" width="207" height="12" y="86"/>
<body name="t_b2_s" x="249" rotation="0" width="10" height="10" y="404"/>
<body name="t_bs_s" x="248" rotation="90" width="283" height="12" y="229"/>
<body name="t_b2_s" x="248" rotation="0" width="10" height="10" y="366"/>
<body name="t_c_d" x="350" rotation="0" width="43" height="42" y="387"/>
<body name="t_c_d" x="272" rotation="0" width="43" height="42" y="388"/>
<body name="t_b_d" x="311" rotation="0" width="100" height="39" y="376"/>
<body name="targetBox" x="334" rotation="0" width="56" height="26" y="346"/>
<body name="t_joint" x="350" rotation="0" width="17" height="17" y="386"/>
<body name="t_joint" x="272" rotation="0" width="17" height="17" y="387"/>
<body name="t_pushka" x="40" rotation="0" width="56" height="40" y="403"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="44" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 44">
<bodies>
<body name="pic_pautina2" x="656" rotation="0" width="49" height="52" y="35"/>
<body name="t_b2_s" x="347" rotation="0" width="693" height="10" y="414"/>
<body name="t_b2_s" x="4" rotation="90" width="421" height="11" y="203"/>
<body name="t_b2_s" x="685" rotation="90" width="421" height="11" y="201"/>
<body name="t_bb_s" x="252" rotation="0" width="37" height="17" y="120"/>
<body name="t_bb_s" x="303" rotation="0" width="37" height="17" y="152"/>
<body name="t_bb_s" x="328" rotation="0" width="37" height="17" y="169"/>
<body name="t_bb_s" x="346" rotation="0" width="37" height="17" y="186"/>
<body name="t_bb_s" x="367" rotation="0" width="37" height="17" y="202"/>
<body name="t_bb_s" x="385" rotation="0" width="37" height="17" y="218"/>
<body name="t_bb_s" x="403" rotation="0" width="37" height="17" y="234"/>
<body name="t_bb_s" x="429" rotation="0" width="37" height="17" y="250"/>
<body name="t_bb_s" x="451" rotation="0" width="37" height="17" y="265"/>
<body name="t_bb_s" x="468" rotation="0" width="37" height="17" y="282"/>
<body name="t_bb_s" x="490" rotation="0" width="37" height="17" y="299"/>
<body name="t_bb_s" x="505" rotation="0" width="37" height="17" y="315"/>
<body name="t_bb_s" x="524" rotation="0" width="37" height="17" y="330"/>
<body name="t_bb_s" x="540" rotation="0" width="37" height="17" y="347"/>
<body name="t_bb_s" x="238" rotation="0" width="37" height="17" y="103"/>
<body name="t_bb_s" x="224" rotation="0" width="37" height="17" y="87"/>
<body name="t_bb_s" x="209" rotation="0" width="37" height="17" y="70"/>
<body name="t_bb_s" x="192" rotation="0" width="37" height="17" y="54"/>
<body name="t_b2_s" x="340" rotation="0" width="693" height="10" y="4"/>
<body name="t_bb_s" x="398" rotation="0" width="37" height="17" y="135"/>
<body name="t_bb_s" x="522" rotation="0" width="37" height="17" y="364"/>
<body name="t_bb_s" x="523" rotation="0" width="37" height="17" y="380"/>
<body name="t_bb_s" x="518" rotation="0" width="37" height="17" y="397"/>
<body name="t_bb_s" x="555" rotation="0" width="37" height="17" y="397"/>
<body name="t_bb_s" x="590" rotation="0" width="37" height="17" y="397"/>
<body name="t_bb_s" x="280" rotation="0" width="37" height="17" y="135"/>
<body name="t_bb_s" x="315" rotation="0" width="37" height="17" y="137"/>
<body name="targetBox" x="572" rotation="0" width="56" height="26" y="376"/>
<body name="t_o_d" x="374" rotation="0" width="14" height="16" y="188"/>
<body name="t_o_d" x="222" rotation="0" width="14" height="16" y="57"/>
<body name="t_o_d" x="480" rotation="0" width="14" height="16" y="268"/>
<body name="t_o_d" x="571" rotation="0" width="14" height="16" y="358"/>
<body name="t_o_d" x="325" rotation="0" width="14" height="16" y="122"/>
<body name="t_pushka" x="35" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="5" numberLevel="45" nameLevel="LEVEL 45" nickLevel="Johnny-K">
<bodies>
<body name="pic_les" x="201" rotation="0" width="252" height="158" y="339"/>
<body name="pic_trava2" x="6" rotation="0" width="148" height="15" y="404"/>
<body name="pic_kust" x="615" rotation="0" width="59" height="67" y="385"/>
<body name="pic_trava2" x="624" rotation="0" width="148" height="15" y="405"/>
<body name="pic_oblako3" x="110" rotation="0" width="129" height="21" y="63"/>
<body name="pic_oblako3" x="477" rotation="0" width="129" height="21" y="107"/>
<body name="pic_oblako3" x="615" rotation="0" width="115" height="19" y="40"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="187"/>
<body name="t_b2_s" x="5" rotation="90" width="460" height="10" y="186"/>
<body name="t_bb_s" x="664" rotation="90" width="80" height="36" y="372"/>
<body name="t_bb_s" x="567" rotation="90" width="80" height="36" y="373"/>
<body name="t_b2_s" x="615" rotation="0" width="132" height="10" y="414"/>
<body name="t_b2_s" x="204" rotation="0" width="420" height="10" y="414"/>
<body name="t_bb_s" x="370" rotation="0" width="89" height="41" y="390"/>
<body name="t_bb_s" x="370" rotation="0" width="89" height="41" y="351"/>
<body name="t_bb_s" x="369" rotation="0" width="89" height="41" y="312"/>
<body name="t_bb_s" x="370" rotation="0" width="89" height="41" y="272"/>
<body name="t_bb_s" x="368" rotation="0" width="89" height="41" y="217"/>
<body name="t_bb_s" x="282" rotation="0" width="89" height="41" y="177"/>
<body name="t_bb_s" x="282" rotation="0" width="89" height="41" y="67"/>
<body name="t_bs_s" x="379" rotation="0" width="283" height="11" y="44"/>
<body name="targetCircle" x="392" rotation="0" width="52" height="52" y="172"/>
<body name="t_bk2_d" x="330" rotation="0" width="178" height="15" y="244"/>
<body name="t_ck_d" x="253" rotation="0" width="71" height="70" y="123"/>
<body name="t_pushka" x="24" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="46" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 46">
<bodies>
<body name="pic_trava2" x="13" rotation="0" width="148" height="15" y="404"/>
<body name="pic_les" x="220" rotation="0" width="274" height="172" y="333"/>
<body name="pic_saturn" x="564" rotation="0" width="144" height="93" y="99"/>
<body name="pic_grib1" x="509" rotation="0" width="51" height="73" y="393"/>
<body name="t_b2_s" x="7" rotation="90" width="490" height="10" y="172"/>
<body name="t_b2_s" x="687" rotation="90" width="490" height="10" y="170"/>
<body name="t_b2_s" x="244" rotation="0" width="484" height="10" y="414"/>
<body name="t_bb_s" x="294" rotation="0" width="68" height="32" y="123"/>
<body name="t_bb_s" x="454" rotation="0" width="68" height="32" y="395"/>
<body name="t_bb_s" x="454" rotation="0" width="68" height="32" y="335"/>
<body name="t_bb_s" x="388" rotation="0" width="68" height="32" y="334"/>
<body name="t_bb_s" x="390" rotation="0" width="68" height="32" y="395"/>
<body name="t_bb_s" x="43" rotation="0" width="68" height="32" y="61"/>
<body name="t_b_d" x="390" rotation="0" width="65" height="31" y="366"/>
<body name="t_b_d" x="453" rotation="0" width="65" height="31" y="365"/>
<body name="targetCircle" x="275" rotation="0" width="34" height="34" y="77"/>
<body name="t_cbs_d" x="241" rotation="0" width="22" height="22" y="86"/>
<body name="t_cz_d" x="411" rotation="-44" width="15" height="18" y="233"/>
<body name="t_cz_d" x="423" rotation="-44" width="15" height="18" y="244"/>
<body name="t_cz_d" x="434" rotation="-44" width="15" height="18" y="255"/>
<body name="t_cz_d" x="444" rotation="-44" width="15" height="18" y="267"/>
<body name="t_cz_d" x="453" rotation="-30" width="15" height="18" y="278"/>
<body name="t_cz_d" x="463" rotation="-30" width="15" height="18" y="290"/>
<body name="t_cz_d" x="471" rotation="-30" width="15" height="18" y="301"/>
<body name="t_cz_d" x="479" rotation="-30" width="15" height="18" y="311"/>
<body name="t_cz_d" x="333" rotation="-44" width="15" height="18" y="143"/>
<body name="t_cz_d" x="345" rotation="-44" width="15" height="18" y="154"/>
<body name="t_cz_d" x="356" rotation="-44" width="15" height="18" y="165"/>
<body name="t_cz_d" x="366" rotation="-44" width="15" height="18" y="177"/>
<body name="t_cz_d" x="375" rotation="-30" width="15" height="18" y="188"/>
<body name="t_cz_d" x="385" rotation="-30" width="15" height="18" y="200"/>
<body name="t_cz_d" x="393" rotation="-30" width="15" height="18" y="211"/>
<body name="t_cz_d" x="401" rotation="-30" width="15" height="18" y="221"/>
<body name="t_cz_d" x="252" rotation="90" width="15" height="18" y="105"/>
<body name="t_cz_d" x="226" rotation="90" width="15" height="18" y="101"/>
<body name="t_cz_d" x="213" rotation="90" width="15" height="18" y="98"/>
<body name="t_cz_d" x="200" rotation="90" width="15" height="18" y="95"/>
<body name="t_cz_d" x="186" rotation="90" width="15" height="18" y="92"/>
<body name="t_cz_d" x="173" rotation="90" width="15" height="18" y="90"/>
<body name="t_cz_d" x="239" rotation="90" width="15" height="18" y="103"/>
<body name="t_cz_d" x="160" rotation="90" width="15" height="18" y="89"/>
<body name="t_cz_d" x="147" rotation="90" width="15" height="18" y="86"/>
<body name="t_cz_d" x="134" rotation="90" width="15" height="18" y="83"/>
<body name="t_cz_d" x="121" rotation="90" width="15" height="18" y="81"/>
<body name="t_cz_d" x="108" rotation="90" width="15" height="18" y="78"/>
<body name="t_cz_d" x="95" rotation="90" width="15" height="18" y="76"/>
<body name="t_cz_d" x="82" rotation="90" width="15" height="18" y="72"/>
<body name="t_joint" x="406" rotation="0" width="11" height="11" y="227"/>
<body name="t_joint" x="428" rotation="0" width="11" height="11" y="251"/>
<body name="t_joint" x="436" rotation="0" width="11" height="11" y="262"/>
<body name="t_joint" x="358" rotation="0" width="11" height="11" y="172"/>
<body name="t_joint" x="389" rotation="0" width="11" height="11" y="204"/>
<body name="t_joint" x="324" rotation="0" width="11" height="11" y="138"/>
<body name="t_joint" x="249" rotation="0" width="11" height="11" y="104"/>
<body name="t_joint" x="337" rotation="0" width="11" height="11" y="149"/>
<body name="t_joint" x="349" rotation="0" width="11" height="11" y="158"/>
<body name="t_joint" x="369" rotation="0" width="11" height="11" y="184"/>
<body name="t_joint" x="379" rotation="0" width="11" height="11" y="194"/>
<body name="t_joint" x="398" rotation="0" width="11" height="11" y="216"/>
<body name="t_joint" x="450" rotation="0" width="11" height="11" y="270"/>
<body name="t_joint" x="458" rotation="0" width="11" height="11" y="284"/>
<body name="t_joint" x="467" rotation="0" width="11" height="11" y="297"/>
<body name="t_joint" x="416" rotation="0" width="11" height="11" y="239"/>
<body name="t_joint" x="474" rotation="0" width="11" height="11" y="310"/>
<body name="t_joint" x="484" rotation="0" width="11" height="11" y="319"/>
<body name="t_joint" x="261" rotation="0" width="11" height="11" y="107"/>
<body name="t_joint" x="76" rotation="0" width="11" height="11" y="71"/>
<body name="t_joint" x="90" rotation="0" width="11" height="11" y="75"/>
<body name="t_joint" x="102" rotation="0" width="11" height="11" y="77"/>
<body name="t_joint" x="116" rotation="0" width="11" height="11" y="81"/>
<body name="t_joint" x="129" rotation="0" width="11" height="11" y="82"/>
<body name="t_joint" x="141" rotation="0" width="11" height="11" y="85"/>
<body name="t_joint" x="153" rotation="0" width="11" height="11" y="88"/>
<body name="t_joint" x="167" rotation="0" width="11" height="11" y="90"/>
<body name="t_joint" x="180" rotation="0" width="11" height="11" y="91"/>
<body name="t_joint" x="194" rotation="0" width="11" height="11" y="93"/>
<body name="t_joint" x="208" rotation="0" width="11" height="11" y="97"/>
<body name="t_joint" x="222" rotation="0" width="11" height="11" y="100"/>
<body name="t_joint" x="234" rotation="0" width="11" height="11" y="103"/>
<body name="t_pushka" x="26" rotation="0" width="56" height="40" y="394"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="47" nickLevel="Johnny-K" fon="2" nameLevel="LEVEL 47">
<bodies>
<body name="pic_solnce" x="77" rotation="0" width="89" height="79" y="80"/>
<body name="pic_oblako3" x="245" rotation="0" width="163" height="27" y="40"/>
<body name="pic_oblako3" x="438" rotation="0" width="105" height="17" y="59"/>
<body name="pic_snegovik" x="163" rotation="0" width="46" height="64" y="381"/>
<body name="pic_elka" x="251" rotation="0" width="140" height="220" y="308"/>
<body name="pic_domsneg" x="404" rotation="0" width="145" height="113" y="354"/>
<body name="t_b2_s" x="687" rotation="90" width="460" height="10" y="187"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="187"/>
<body name="t_b2_s" x="197" rotation="0" width="690" height="10" y="415"/>
<body name="t_bb_s" x="513" rotation="0" width="60" height="25" y="350"/>
<body name="t_bb_s" x="512" rotation="0" width="60" height="25" y="374"/>
<body name="t_bb_s" x="512" rotation="0" width="60" height="25" y="398"/>
<body name="t_bb_s" x="624" rotation="0" width="60" height="25" y="351"/>
<body name="t_bb_s" x="624" rotation="0" width="60" height="25" y="375"/>
<body name="t_bb_s" x="625" rotation="0" width="60" height="25" y="399"/>
<body name="t_bb_s" x="608" rotation="0" width="60" height="25" y="199"/>
<body name="t_b2_s" x="645" rotation="0" width="100" height="10" y="414"/>
<body name="t_bb_s" x="605" rotation="0" width="60" height="25" y="12"/>
<body name="t_bb_s" x="519" rotation="0" width="60" height="25" y="12"/>
<body name="t_bb_s" x="524" rotation="0" width="60" height="25" y="199"/>
<body name="t_b2_s" x="633" rotation="0" width="10" height="10" y="184"/>
<body name="t_b_d" x="501" rotation="0" width="49" height="29" y="249"/>
<body name="t_b_d" x="519" rotation="0" width="49" height="29" y="275"/>
<body name="t_b_d" x="494" rotation="0" width="49" height="29" y="300"/>
<body name="t_b_d" x="514" rotation="0" width="49" height="29" y="325"/>
<body name="targetBox" x="568" rotation="0" width="56" height="26" y="352"/>
<body name="t_b_d" x="567" rotation="0" width="49" height="29" y="172"/>
<body name="t_b_d" x="518" rotation="0" width="49" height="29" y="223"/>
<body name="t_mpv_d" x="499" rotation="0" width="10" height="100" y="133"/>
<body name="t_b_d" x="613" rotation="0" width="49" height="29" y="224"/>
<body name="t_b_d" x="631" rotation="0" width="49" height="29" y="250"/>
<body name="t_b_d" x="615" rotation="0" width="49" height="29" y="276"/>
<body name="t_b_d" x="631" rotation="0" width="49" height="29" y="301"/>
<body name="t_b_d" x="618" rotation="0" width="49" height="29" y="326"/>
<body name="t_pushka" x="23" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 48" numberLevel="48" nickLevel="Johnny-K" fon="2">
<bodies>
<body name="pic_planeta" x="599" rotation="0" width="128" height="128" y="90"/>
<body name="pic_saturn" x="97" rotation="0" width="160" height="103" y="117"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="189"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="191"/>
<body name="t_b2_s" x="349" rotation="0" width="690" height="10" y="416"/>
<body name="t_c_s" x="180" rotation="0" width="108" height="108" y="359"/>
<body name="t_c_s" x="288" rotation="0" width="108" height="108" y="360"/>
<body name="t_c_s" x="397" rotation="0" width="108" height="108" y="360"/>
<body name="t_c_s" x="504" rotation="0" width="108" height="108" y="362"/>
<body name="t_c_s" x="236" rotation="0" width="108" height="108" y="267"/>
<body name="t_c_s" x="343" rotation="0" width="108" height="108" y="267"/>
<body name="t_c_s" x="452" rotation="0" width="108" height="108" y="270"/>
<body name="t_c_s" x="291" rotation="0" width="108" height="108" y="175"/>
<body name="t_c_s" x="399" rotation="0" width="108" height="108" y="175"/>
<body name="t_c_s" x="348" rotation="0" width="108" height="108" y="83"/>
<body name="t_b2_s" x="338" rotation="0" width="690" height="10" y="3"/>
<body name="t_b2_s" x="15" rotation="0" width="50" height="10" y="70"/>
<body name="t_b2_s" x="13" rotation="0" width="50" height="10" y="371"/>
<body name="targetBox" x="581" rotation="0" width="56" height="26" y="399"/>
<body name="t_btarg2_d" x="105" rotation="0" width="56" height="27" y="398"/>
<body name="t_o_d" x="451" rotation="0" width="17" height="20" y="209"/>
<body name="t_o_d" x="402" rotation="0" width="17" height="20" y="113"/>
<body name="t_o_d" x="507" rotation="0" width="17" height="20" y="300"/>
<body name="t_o_d" x="179" rotation="0" width="17" height="20" y="297"/>
<body name="t_o_d" x="235" rotation="0" width="17" height="20" y="205"/>
<body name="t_o_d" x="292" rotation="0" width="17" height="20" y="113"/>
<body name="t_o_d" x="348" rotation="0" width="17" height="20" y="21"/>
<body name="t_joint_fixed" x="350" rotation="0" width="15" height="15" y="29"/>
<body name="t_joint_fixed" x="403" rotation="0" width="15" height="15" y="122"/>
<body name="t_joint_fixed" x="452" rotation="0" width="15" height="15" y="218"/>
<body name="t_joint_fixed" x="508" rotation="0" width="15" height="15" y="311"/>
<body name="t_joint_fixed" x="293" rotation="0" width="15" height="15" y="121"/>
<body name="t_joint_fixed" x="234" rotation="0" width="15" height="15" y="213"/>
<body name="t_joint_fixed" x="176" rotation="0" width="15" height="15" y="305"/>
<body name="t_pushka" x="25" rotation="0" width="56" height="40" y="50"/>
<body name="t_pushka" x="24" rotation="0" width="56" height="40" y="352"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="49" nickLevel="Johnny-K" fon="3" nameLevel="LEVEL 49">
<bodies>
<body name="pic_saturn" x="159" rotation="0" width="242" height="156" y="88"/>
<body name="t_b2_s" x="343" rotation="0" width="690" height="10" y="415"/>
<body name="t_b2_s" x="4" rotation="90" width="460" height="10" y="194"/>
<body name="t_b2_s" x="686" rotation="90" width="460" height="10" y="191"/>
<body name="t_b2_s" x="679" rotation="90" width="20" height="10" y="294"/>
<body name="t_b2_s" x="672" rotation="70" width="20" height="10" y="255"/>
<body name="t_b2_s" x="677" rotation="80" width="20" height="10" y="274"/>
<body name="t_b2_s" x="678" rotation="100" width="20" height="10" y="313"/>
<body name="t_b2_s" x="674" rotation="110" width="20" height="10" y="332"/>
<body name="t_b2_s" x="461" rotation="90" width="20" height="10" y="263"/>
<body name="t_b2_s" x="642" rotation="140" width="20" height="10" y="379"/>
<body name="t_b2_s" x="656" rotation="130" width="20" height="10" y="365"/>
<body name="t_b2_s" x="667" rotation="120" width="20" height="10" y="349"/>
<body name="t_b2_s" x="640" rotation="40" width="20" height="10" y="210"/>
<body name="t_b2_s" x="664" rotation="60" width="20" height="10" y="238"/>
<body name="t_b2_s" x="653" rotation="50" width="20" height="10" y="223"/>
<body name="t_b2_s" x="499" rotation="-140" width="20" height="10" y="378"/>
<body name="t_b2_s" x="514" rotation="-150" width="20" height="10" y="389"/>
<body name="t_b2_s" x="532" rotation="-160" width="20" height="10" y="398"/>
<body name="t_b2_s" x="551" rotation="-170" width="20" height="10" y="403"/>
<body name="t_b2_s" x="570" rotation="-180" width="20" height="10" y="405"/>
<body name="t_b2_s" x="589" rotation="170" width="20" height="10" y="404"/>
<body name="t_b2_s" x="609" rotation="160" width="20" height="10" y="399"/>
<body name="t_b2_s" x="626" rotation="150" width="20" height="10" y="390"/>
<body name="t_b2_s" x="625" rotation="30" width="20" height="10" y="199"/>
<body name="t_b2_s" x="532" rotation="-20" width="20" height="10" y="190"/>
<body name="t_b2_s" x="514" rotation="-30" width="20" height="10" y="198"/>
<body name="t_b2_s" x="498" rotation="-40" width="20" height="10" y="210"/>
<body name="t_b2_s" x="484" rotation="-50" width="20" height="10" y="224"/>
<body name="t_b2_s" x="473" rotation="-60" width="20" height="10" y="240"/>
<body name="t_b2_s" x="465" rotation="-70" width="20" height="10" y="258"/>
<body name="t_b2_s" x="457" rotation="70" width="20" height="10" y="257"/>
<body name="t_b2_s" x="250" rotation="-70" width="20" height="10" y="259"/>
<body name="t_b2_s" x="245" rotation="-80" width="20" height="10" y="278"/>
<body name="t_b2_s" x="243" rotation="-90" width="20" height="10" y="295"/>
<body name="t_b2_s" x="438" rotation="50" width="20" height="10" y="224"/>
<body name="t_b2_s" x="449" rotation="60" width="20" height="10" y="239"/>
<body name="t_b2_s" x="425" rotation="40" width="20" height="10" y="211"/>
<body name="t_b2_s" x="245" rotation="-100" width="20" height="10" y="314"/>
<body name="t_b2_s" x="336" rotation="-170" width="20" height="10" y="404"/>
<body name="t_b2_s" x="355" rotation="-180" width="20" height="10" y="406"/>
<body name="t_b2_s" x="374" rotation="170" width="20" height="10" y="405"/>
<body name="t_b2_s" x="441" rotation="130" width="20" height="10" y="366"/>
<body name="t_b2_s" x="427" rotation="140" width="20" height="10" y="380"/>
<body name="t_b2_s" x="394" rotation="160" width="20" height="10" y="400"/>
<body name="t_b2_s" x="258" rotation="-60" width="20" height="10" y="241"/>
<body name="t_b2_s" x="269" rotation="-50" width="20" height="10" y="225"/>
<body name="t_b2_s" x="283" rotation="-40" width="20" height="10" y="211"/>
<body name="t_b2_s" x="299" rotation="-30" width="20" height="10" y="199"/>
<body name="t_b2_s" x="317" rotation="-20" width="20" height="10" y="191"/>
<body name="t_b2_s" x="392" rotation="20" width="20" height="10" y="192"/>
<body name="t_b2_s" x="410" rotation="30" width="20" height="10" y="200"/>
<body name="t_b2_s" x="630" rotation="-14" width="76" height="10" y="59"/>
<body name="t_b2_s" x="609" rotation="20" width="20" height="10" y="191"/>
<body name="t_b2_s" x="541" rotation="90" width="104" height="10" y="45"/>
<body name="t_b2_s" x="598" rotation="90" width="40" height="10" y="89"/>
<body name="t_b2_s" x="538" rotation="90" width="54" height="10" y="162"/>
<body name="t_b2_s" x="602" rotation="90" width="48" height="10" y="166"/>
<body name="t_b2_s" x="509" rotation="26" width="58" height="10" y="127"/>
<body name="targetCircle_small" x="557" rotation="0" width="22" height="22" y="37"/>
<body name="t_b2_s" x="411" rotation="150" width="20" height="10" y="391"/>
<body name="t_b2_s" x="613" rotation="170" width="20" height="10" y="145"/>
<body name="t_b2_s" x="624" rotation="110" width="20" height="10" y="134"/>
<body name="t_b2_s" x="609" rotation="22" width="20" height="10" y="107"/>
<body name="t_b2_s" x="621" rotation="60" width="20" height="10" y="118"/>
<body name="t_b2_s" x="604" rotation="0" width="134" height="10" y="4"/>
<body name="t_b2_s" x="667" rotation="90" width="47" height="10" y="31"/>
<body name="t_b2_s" x="485" rotation="-130" width="20" height="10" y="365"/>
<body name="t_b2_s" x="454" rotation="-180" width="20" height="10" y="360"/>
<body name="t_c_s" x="447" rotation="0" width="10" height="10" y="359"/>
<body name="t_b2_s" x="467" rotation="-180" width="20" height="10" y="360"/>
<body name="t_c_s" x="479" rotation="0" width="10" height="10" y="359"/>
<body name="t_b2_s" x="462" rotation="90" width="20" height="10" y="282"/>
<body name="t_c_s" x="462" rotation="0" width="10" height="10" y="308"/>
<body name="t_b2_s" x="462" rotation="90" width="20" height="10" y="300"/>
<body name="t_b2_s" x="284" rotation="-140" width="20" height="10" y="380"/>
<body name="t_b2_s" x="270" rotation="-130" width="20" height="10" y="366"/>
<body name="t_b2_s" x="258" rotation="-120" width="20" height="10" y="350"/>
<body name="t_b2_s" x="250" rotation="-110" width="20" height="10" y="333"/>
<body name="t_b2_s" x="317" rotation="-160" width="20" height="10" y="400"/>
<body name="t_b2_s" x="299" rotation="-150" width="20" height="10" y="391"/>
<body name="t_cbs_d" x="558" rotation="0" width="22" height="22" y="19"/>
<body name="t_cbs_d" x="581" rotation="0" width="22" height="22" y="20"/>
<body name="t_cbs_d" x="591" rotation="0" width="22" height="22" y="53"/>
<body name="t_cbs_d" x="611" rotation="0" width="22" height="22" y="47"/>
<body name="t_cbs_d" x="598" rotation="0" width="22" height="22" y="32"/>
<body name="t_cbs_d" x="615" rotation="0" width="22" height="22" y="21"/>
<body name="t_cbs_d" x="631" rotation="0" width="22" height="22" y="44"/>
<body name="t_cbs_d" x="651" rotation="0" width="22" height="22" y="38"/>
<body name="t_cbs_d" x="636" rotation="0" width="22" height="22" y="20"/>
<body name="t_b_d" x="571" rotation="11" width="74" height="19" y="113"/>
<body name="t_cbs_d" x="559" rotation="0" width="22" height="22" y="91"/>
<body name="t_cbs_d" x="581" rotation="0" width="22" height="22" y="96"/>
<body name="t_cbs_d" x="583" rotation="0" width="22" height="22" y="75"/>
<body name="t_cbs_d" x="564" rotation="0" width="22" height="22" y="73"/>
<body name="t_cbs_d" x="556" rotation="0" width="22" height="22" y="54"/>
<body name="t_cbs_d" x="574" rotation="0" width="22" height="22" y="54"/>
<body name="t_cbs_d" x="575" rotation="0" width="22" height="22" y="36"/>
<body name="t_bk2_d" x="570" rotation="90" width="209" height="15" y="294"/>
<body name="t_bk2_d" x="570" rotation="0" width="209" height="15" y="294"/>
<body name="t_bk2_d" x="353" rotation="0" width="209" height="15" y="297"/>
<body name="t_bk2_d" x="354" rotation="90" width="209" height="15" y="297"/>
<body name="t_o_d" x="602" rotation="0" width="20" height="23" y="133"/>
<body name="t_o_d" x="539" rotation="0" width="20" height="23" y="126"/>
<body name="t_revolute" x="542" rotation="0" width="13" height="13" y="108"/>
<body name="t_revolute_motor" x="570" rotation="1" width="13" height="13" y="295"/>
<body name="t_revolute_motor" x="354" rotation="1" width="13" height="13" y="298"/>
<body name="t_pushka" x="28" rotation="0" width="56" height="40" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="50" nameLevel="LEVEL 50" nickLevel="Johnny-K" fon="5">
<bodies>
<body name="pic_derevja" x="138" rotation="0" width="170" height="168" y="333"/>
<body name="pic_trava2" x="368" rotation="0" width="252" height="26" y="390"/>
<body name="pic_trava2" x="367" rotation="0" width="182" height="18" y="367"/>
<body name="pic_trava2" x="366" rotation="0" width="302" height="31" y="406"/>
<body name="pic_trava2" x="369" rotation="0" width="153" height="16" y="356"/>
<body name="pic_trava2" x="372" rotation="0" width="117" height="12" y="347"/>
<body name="pic_trava2" x="368" rotation="0" width="209" height="21" y="377"/>
<body name="pic_trava2" x="371" rotation="0" width="67" height="7" y="330"/>
<body name="pic_trava2" x="374" rotation="0" width="84" height="9" y="338"/>
<body name="pic_trava2" x="274" rotation="-30" width="210" height="21" y="361"/>
<body name="pic_trava2" x="461" rotation="30" width="210" height="21" y="358"/>
<body name="pic_kust" x="301" rotation="0" width="31" height="35" y="388"/>
<body name="pic_kiparis" x="373" rotation="0" width="64" height="36" y="358"/>
<body name="pic_grib2" x="423" rotation="0" width="19" height="30" y="388"/>
<body name="pic_trava2" x="101" rotation="0" width="191" height="19" y="407"/>
<body name="pic_trava2" x="565" rotation="0" width="99" height="10" y="407"/>
<body name="pic_pautina2" x="657" rotation="0" width="49" height="52" y="33"/>
<body name="pic_oblako3" x="468" rotation="0" width="124" height="21" y="40"/>
<body name="pic_oblako3" x="130" rotation="0" width="116" height="19" y="98"/>
<body name="pic_oblako3" x="567" rotation="0" width="105" height="17" y="94"/>
<body name="pic_planeta" x="203" rotation="0" width="41" height="41" y="51"/>
<body name="pic_trava2" x="594" rotation="0" width="164" height="17" y="61"/>
<body name="t_b2_s" x="283" rotation="-30" width="202" height="10" y="365"/>
<body name="t_b2_s" x="268" rotation="0" width="690" height="10" y="415"/>
<body name="t_b2_s" x="4" rotation="90" width="490" height="10" y="167"/>
<body name="t_b2_s" x="346" rotation="0" width="690" height="10" y="4"/>
<body name="t_b2_s" x="852" rotation="0" width="690" height="10" y="70"/>
<body name="t_b2_s" x="686" rotation="90" width="490" height="10" y="199"/>
<body name="t_b2_s" x="973" rotation="0" width="690" height="10" y="280"/>
<body name="t_b2_s" x="346" rotation="90" width="31" height="10" y="241"/>
<body name="t_b2_s" x="363" rotation="0" width="33" height="10" y="252"/>
<body name="t_b2_s" x="490" rotation="30" width="275" height="10" y="384"/>
<body name="t_b2_s" x="341" rotation="30" width="71" height="10" y="298"/>
<body name="t_bh_d" x="367" rotation="90" width="69" height="24" y="208"/>
<body name="t_bh_d" x="367" rotation="90" width="69" height="24" y="143"/>
<body name="t_bh_d" x="402" rotation="90" width="69" height="18" y="77"/>
<body name="t_bh_d" x="330" rotation="90" width="69" height="18" y="77"/>
<body name="t_bh_d" x="366" rotation="0" width="59" height="18" y="102"/>
<body name="t_cbs_d" x="264" rotation="0" width="28" height="28" y="177"/>
<body name="t_bk2_d" x="264" rotation="90" width="172" height="15" y="272"/>
<body name="targetBox" x="367" rotation="0" width="52" height="24" y="81"/>
<body name="t_b_d" x="372" rotation="0" width="90" height="13" y="37"/>
<body name="t_cbs_d" x="485" rotation="0" width="28" height="28" y="174"/>
<body name="t_bk2_d" x="485" rotation="90" width="181" height="15" y="274"/>
<body name="t_joint_fixed" x="359" rotation="0" width="15" height="15" y="175"/>
<body name="t_joint_fixed" x="372" rotation="0" width="15" height="15" y="175"/>
<body name="t_joint_fixed" x="373" rotation="0" width="15" height="15" y="113"/>
<body name="t_joint_fixed" x="360" rotation="0" width="15" height="15" y="115"/>
<body name="t_joint_fixed" x="390" rotation="0" width="15" height="15" y="106"/>
<body name="t_joint_fixed" x="400" rotation="0" width="15" height="15" y="103"/>
<body name="t_joint_fixed" x="337" rotation="0" width="15" height="15" y="104"/>
<body name="t_joint_fixed" x="367" rotation="0" width="15" height="15" y="111"/>
<body name="t_joint_fixed" x="364" rotation="0" width="15" height="15" y="109"/>
<body name="t_joint_fixed" x="339" rotation="0" width="15" height="15" y="102"/>
<body name="t_joint_fixed" x="395" rotation="0" width="15" height="15" y="102"/>
<body name="t_joint_fixed" x="366" rotation="0" width="15" height="15" y="176"/>
<body name="t_joint_fixed" x="337" rotation="0" width="15" height="15" y="111"/>
<body name="t_joint" x="328" rotation="0" width="17" height="17" y="44"/>
<body name="t_joint_fixed" x="264" rotation="0" width="15" height="15" y="189"/>
<body name="t_joint_fixed" x="264" rotation="0" width="15" height="15" y="188"/>
<body name="t_joint_fixed" x="264" rotation="0" width="15" height="15" y="187"/>
<body name="t_joint_fixed" x="485" rotation="0" width="15" height="15" y="189"/>
<body name="t_joint_fixed" x="485" rotation="0" width="15" height="15" y="190"/>
<body name="t_joint_fixed" x="485" rotation="0" width="15" height="15" y="191"/>
<body name="t_revolute" x="367" rotation="0" width="14" height="14" y="235"/>
<body name="t_revolute" x="264" rotation="0" width="11" height="11" y="309"/>
<body name="t_revolute" x="485" rotation="0" width="11" height="11" y="308"/>
<body name="t_pushka" x="26" rotation="0" width="56" height="40" y="395"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
return (_local2);
}
}
}//package
Section 134
//ClassAllLevelsRoly (ClassAllLevelsRoly)
package {
public class ClassAllLevelsRoly {
public static function levelsRoly():Array{
var _local1:XML;
var _local5:XML;
var _local6:XML;
var _local7:int;
var _local2:Array = [];
_local1 = <xml>
<jopa numberLevel="5" nameLevel="LEVEL 5" nickLevel="Johnny-K" fon="5">
<bodies>
<body name="t_b2_s" x="233" rotation="0" width="36" height="19" y="130"/>
<body name="t_b2_s" x="268" rotation="0" width="36" height="19" y="147"/>
<body name="t_b2_s" x="304" rotation="0" width="36" height="19" y="164"/>
<body name="t_b2_s" x="341" rotation="0" width="36" height="19" y="181"/>
<body name="t_b2_s" x="377" rotation="0" width="36" height="19" y="198"/>
<body name="t_b2_s" x="412" rotation="0" width="36" height="19" y="215"/>
<body name="t_b2_s" x="447" rotation="0" width="36" height="19" y="232"/>
<body name="t_b2_s" x="484" rotation="0" width="36" height="19" y="249"/>
<body name="t_b2_s" x="520" rotation="0" width="36" height="19" y="265"/>
<body name="t_b2_s" x="556" rotation="0" width="36" height="19" y="281"/>
<body name="t_b2_s" x="393" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="343" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="242" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="293" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="595" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="544" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="444" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="494" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="628" rotation="90" width="51" height="19" y="93"/>
<body name="t_b2_s" x="628" rotation="90" width="51" height="19" y="144"/>
<body name="t_b2_s" x="628" rotation="90" width="51" height="19" y="194"/>
<body name="t_b2_s" x="628" rotation="90" width="51" height="19" y="244"/>
<body name="t_b2_s" x="628" rotation="90" width="51" height="19" y="296"/>
<body name="t_b2_s" x="193" rotation="0" width="51" height="19" y="77"/>
<body name="t_b2_s" x="566" rotation="90" width="51" height="19" y="298"/>
<body name="t_b2_s" x="223" rotation="90" width="51" height="19" y="147"/>
<body name="t_bk_d" x="594" rotation="90" width="81" height="17" y="297"/>
<body name="t_rolG2_d" x="380" rotation="0" width="39" height="38" y="174"/>
<body name="t_rolB5_d" x="420" rotation="0" width="36" height="47" y="193"/>
<body name="t_o_d" x="268" rotation="0" width="25" height="21" y="130"/>
<body name="t_o_d" x="304" rotation="0" width="25" height="21" y="147"/>
<body name="t_o_d" x="341" rotation="0" width="25" height="21" y="164"/>
<body name="t_o_d" x="447" rotation="0" width="25" height="21" y="215"/>
<body name="t_o_d" x="242" rotation="0" width="25" height="21" y="113"/>
<body name="t_o_d" x="567" rotation="0" width="25" height="21" y="264"/>
<body name="t_o_d" x="529" rotation="0" width="25" height="21" y="248"/>
<body name="t_o_d" x="489" rotation="0" width="25" height="21" y="232"/>
<body name="t_revolute" x="594" rotation="0" width="14" height="14" y="297"/>
<body name="t_pushka" x="47" rotation="0" width="86" height="51" y="388"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="7" nameLevel="LEVEL 7">
<bodies>
<body name="t_b2_s" x="36" rotation="0" width="72" height="19" y="411"/>
<body name="t_b2_s" x="414" rotation="0" width="51" height="19" y="278"/>
<body name="t_b2_s" x="414" rotation="0" width="51" height="19" y="295"/>
<body name="t_b2_s" x="414" rotation="0" width="51" height="19" y="261"/>
<body name="t_b2_s" x="262" rotation="0" width="51" height="19" y="74"/>
<body name="t_b2_s" x="313" rotation="0" width="51" height="19" y="56"/>
<body name="t_b2_s" x="364" rotation="0" width="51" height="19" y="56"/>
<body name="t_b2_s" x="262" rotation="0" width="51" height="19" y="56"/>
<body name="t_b2_s" x="414" rotation="0" width="51" height="19" y="245"/>
<body name="t_b2_s" x="414" rotation="0" width="51" height="19" y="228"/>
<body name="t_b2_s" x="414" rotation="0" width="51" height="19" y="218"/>
<body name="t_b2_s" x="413" rotation="0" width="51" height="19" y="170"/>
<body name="t_b2_s" x="413" rotation="0" width="51" height="19" y="152"/>
<body name="t_b2_s" x="413" rotation="0" width="51" height="19" y="187"/>
<body name="t_b2_s" x="413" rotation="0" width="51" height="19" y="136"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="260"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="242"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="224"/>
<body name="t_b2_s" x="558" rotation="0" width="20" height="19" y="206"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="134"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="152"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="170"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="188"/>
<body name="t_b2_s" x="262" rotation="0" width="51" height="19" y="133"/>
<body name="t_b2_s" x="364" rotation="0" width="51" height="19" y="135"/>
<body name="t_b2_s" x="313" rotation="0" width="51" height="19" y="134"/>
<body name="t_b2_s" x="313" rotation="0" width="51" height="19" y="152"/>
<body name="t_b2_s" x="262" rotation="0" width="51" height="19" y="151"/>
<body name="t_b2_s" x="364" rotation="0" width="51" height="19" y="153"/>
<body name="t_b2_s" x="415" rotation="0" width="51" height="19" y="56"/>
<body name="t_b2_s" x="415" rotation="0" width="51" height="19" y="74"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="118"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="100"/>
<body name="t_b2_s" x="542" rotation="0" width="51" height="19" y="55"/>
<body name="t_b2_s" x="542" rotation="0" width="51" height="19" y="73"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="83"/>
<body name="t_b2_s" x="494" rotation="0" width="51" height="19" y="55"/>
<body name="t_b2_s" x="494" rotation="0" width="51" height="19" y="73"/>
<body name="t_3_s" x="338" rotation="180" width="10" height="17" y="81"/>
<body name="t_b2_s" x="364" rotation="0" width="51" height="19" y="74"/>
<body name="t_b2_s" x="313" rotation="0" width="51" height="19" y="74"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="295"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="278"/>
<body name="t_b2_s" x="529" rotation="0" width="51" height="19" y="342"/>
<body name="t_b2_s" x="479" rotation="0" width="51" height="19" y="342"/>
<body name="t_b2_s" x="429" rotation="0" width="51" height="19" y="342"/>
<body name="t_b2_s" x="480" rotation="0" width="51" height="19" y="377"/>
<body name="t_b2_s" x="480" rotation="0" width="51" height="19" y="360"/>
<body name="t_b2_s" x="480" rotation="0" width="51" height="19" y="411"/>
<body name="t_b2_s" x="480" rotation="0" width="51" height="19" y="394"/>
<body name="t_b2_s" x="480" rotation="0" width="51" height="19" y="429"/>
<body name="t_b2_s" x="507" rotation="0" width="51" height="32" y="317"/>
<body name="t_b2_s" x="507" rotation="0" width="51" height="32" y="287"/>
<body name="t_ck_d" x="243" rotation="0" width="38" height="38" y="105"/>
<body name="t_cw_d" x="241" rotation="0" width="38" height="38" y="29"/>
<body name="t_ck_d" x="360" rotation="0" width="38" height="38" y="107"/>
<body name="t_bk2_d" x="370" rotation="0" width="169" height="10" y="204"/>
<body name="t_bk2_d" x="288" rotation="69" width="52" height="10" y="204"/>
<body name="t_rolG1_d" x="436" rotation="0" width="48" height="43" y="114"/>
<body name="t_rolB2_d" x="320" rotation="0" width="36" height="45" y="113"/>
<body name="t_rolB4_d" x="282" rotation="0" width="40" height="38" y="110"/>
<body name="t_rolG3_d" x="399" rotation="0" width="43" height="38" y="113"/>
<body name="t_rolG2_d" x="503" rotation="0" width="39" height="38" y="258"/>
<body name="t_o_d" x="440" rotation="0" width="25" height="21" y="38"/>
<body name="t_o_d" x="417" rotation="0" width="25" height="21" y="324"/>
<body name="t_joint_fixed" x="292" rotation="0" width="15" height="15" y="207"/>
<body name="t_pushka" x="46" rotation="0" width="86" height="51" y="372"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="1" nameLevel="LEVEL 1">
<bodies>
<body name="t_b2_s" height="19" x="273" width="51" y="319" rotation="0"/>
<body name="t_b2_s" height="19" x="342" width="51" y="337" rotation="0"/>
<body name="t_b2_s" height="19" x="370" width="51" y="321" rotation="0"/>
<body name="t_b2_s" height="19" x="256" width="51" y="302" rotation="0"/>
<body name="t_b2_s" height="19" x="391" width="51" y="303" rotation="0"/>
<body name="t_b2_s" height="19" x="291" width="51" y="337" rotation="0"/>
<body name="t_b2_s" height="19" x="270" width="51" y="123" rotation="0"/>
<body name="t_b2_s" height="19" x="288" width="51" y="141" rotation="0"/>
<body name="t_b2_s" height="19" x="339" width="51" y="141" rotation="0"/>
<body name="t_b2_s" height="19" x="367" width="51" y="125" rotation="0"/>
<body name="t_b2_s" height="19" x="253" width="51" y="106" rotation="0"/>
<body name="t_b2_s" height="19" x="388" width="51" y="107" rotation="0"/>
<body name="t_b2_s" height="19" x="509" width="51" y="282" rotation="0"/>
<body name="t_b2_s" height="19" x="527" width="51" y="300" rotation="0"/>
<body name="t_b2_s" height="19" x="578" width="51" y="300" rotation="0"/>
<body name="t_b2_s" height="19" x="606" width="51" y="284" rotation="0"/>
<body name="t_b2_s" height="19" x="492" width="51" y="265" rotation="0"/>
<body name="t_b2_s" height="19" x="627" width="51" y="266" rotation="0"/>
<body name="t_b2_s" height="19" x="492" width="51" y="66" rotation="0"/>
<body name="t_b2_s" height="19" x="606" width="51" y="85" rotation="0"/>
<body name="t_b2_s" height="19" x="578" width="51" y="101" rotation="0"/>
<body name="t_b2_s" height="19" x="527" width="51" y="101" rotation="0"/>
<body name="t_b2_s" height="19" x="509" width="51" y="83" rotation="0"/>
<body name="t_b2_s" height="19" x="644" width="51" y="449" rotation="90"/>
<body name="t_b2_s" height="19" x="627" width="51" y="67" rotation="0"/>
<body name="t_b2_s" height="19" x="644" width="51" y="182" rotation="90"/>
<body name="t_b2_s" height="19" x="644" width="51" y="232" rotation="90"/>
<body name="t_rolB3_d" height="40" x="323" width="39" y="311" rotation="0"/>
<body name="t_rolB3_d" height="40" x="559" width="39" y="274" rotation="0"/>
<body name="t_rolG2_d" height="38" x="321" width="39" y="118" rotation="0"/>
<body name="t_rolG4_d" height="51" x="558" width="44" y="77" rotation="0"/>
<body name="t_pushka" height="51" x="47" width="86" y="389" rotation="0"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="6" numberLevel="2" nameLevel="LEVEL 2">
<bodies>
<body name="t_b2_s" height="19" x="273" width="51" y="319" rotation="0"/>
<body name="t_b2_s" height="19" x="342" width="51" y="337" rotation="0"/>
<body name="t_b2_s" height="19" x="370" width="51" y="321" rotation="0"/>
<body name="t_b2_s" height="19" x="256" width="51" y="302" rotation="0"/>
<body name="t_b2_s" height="19" x="391" width="51" y="303" rotation="0"/>
<body name="t_b2_s" height="19" x="291" width="51" y="337" rotation="0"/>
<body name="t_b2_s" height="19" x="494" width="51" y="87" rotation="0"/>
<body name="t_b2_s" height="19" x="512" width="51" y="105" rotation="0"/>
<body name="t_b2_s" height="19" x="563" width="51" y="105" rotation="0"/>
<body name="t_b2_s" height="19" x="591" width="51" y="89" rotation="0"/>
<body name="t_b2_s" height="19" x="477" width="51" y="70" rotation="0"/>
<body name="t_b2_s" height="19" x="612" width="51" y="71" rotation="0"/>
<body name="t_b2_s" height="19" x="270" width="51" y="123" rotation="0"/>
<body name="t_b2_s" height="19" x="288" width="51" y="141" rotation="0"/>
<body name="t_b2_s" height="19" x="339" width="51" y="141" rotation="0"/>
<body name="t_b2_s" height="19" x="367" width="51" y="125" rotation="0"/>
<body name="t_b2_s" height="19" x="253" width="51" y="106" rotation="0"/>
<body name="t_b2_s" height="19" x="388" width="51" y="107" rotation="0"/>
<body name="t_b2_s" height="19" x="509" width="51" y="282" rotation="0"/>
<body name="t_b2_s" height="19" x="527" width="51" y="300" rotation="0"/>
<body name="t_b2_s" height="19" x="578" width="51" y="300" rotation="0"/>
<body name="t_b2_s" height="19" x="606" width="51" y="284" rotation="0"/>
<body name="t_b2_s" height="19" x="492" width="51" y="265" rotation="0"/>
<body name="t_b2_s" height="19" x="627" width="51" y="266" rotation="0"/>
<body name="t_b2_s" height="19" x="628" width="51" y="37" rotation="90"/>
<body name="t_b2_s" height="19" x="628" width="51" y="-13" rotation="90"/>
<body name="t_rolB3_d" height="40" x="323" width="39" y="311" rotation="0"/>
<body name="t_rolG2_d" height="38" x="321" width="39" y="118" rotation="0"/>
<body name="t_rolB3_d" height="40" x="537" width="39" y="81" rotation="0"/>
<body name="t_rolG4_d" height="51" x="561" width="44" y="276" rotation="0"/>
<body name="t_pushka" height="51" x="47" width="86" y="389" rotation="0"/>
<body name="t_fire1_s" height="150" x="536" width="180" y="161" rotation="180"/>
<body name="t_fire1_s" height="150" x="313" width="180" y="196" rotation="180"/>
<body name="t_fire1_s" height="150" x="319" width="180" y="394" rotation="180"/>
<body name="t_fire1_s" height="150" x="554" width="180" y="356" rotation="180"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="6" numberLevel="3" nameLevel="LEVEL 3">
<bodies>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="321"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="272"/>
<body name="t_bs_s" x="370" rotation="0" width="50" height="50" y="224"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="223"/>
<body name="t_barm_s" x="513" rotation="0" width="237" height="25" y="331"/>
<body name="t_bb_s" x="407" rotation="0" width="50" height="50" y="369"/>
<body name="t_bb_s" x="357" rotation="0" width="50" height="50" y="369"/>
<body name="t_bb_s" x="507" rotation="0" width="50" height="50" y="369"/>
<body name="t_bb_s" x="457" rotation="0" width="50" height="50" y="369"/>
<body name="t_bb_s" x="557" rotation="0" width="50" height="50" y="369"/>
<body name="t_bb_s" x="657" rotation="0" width="50" height="50" y="369"/>
<body name="t_bb_s" x="607" rotation="0" width="50" height="50" y="369"/>
<body name="t_bb_s" x="407" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="357" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="507" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="457" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="557" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="657" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="607" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="323" rotation="0" width="72" height="50" y="397"/>
<body name="t_bb_s" x="177" rotation="0" width="50" height="50" y="397"/>
<body name="t_bb_s" x="277" rotation="0" width="50" height="50" y="415"/>
<body name="t_bb_s" x="35" rotation="0" width="50" height="50" y="396"/>
<body name="t_bb_s" x="227" rotation="0" width="50" height="50" y="431"/>
<body name="t_bs_s" x="370" rotation="0" width="50" height="50" y="319"/>
<body name="t_bs_s" x="370" rotation="0" width="50" height="50" y="269"/>
<body name="t_clock_s" x="516" rotation="0" width="55" height="55" y="71"/>
<body name="t_3_s" x="517" rotation="0" width="128" height="80" y="71"/>
<body name="t_bs_s" x="604" rotation="0" width="50" height="50" y="127"/>
<body name="t_bs_s" x="404" rotation="0" width="50" height="50" y="127"/>
<body name="t_bs_s" x="454" rotation="0" width="50" height="50" y="127"/>
<body name="t_bs_s" x="504" rotation="0" width="50" height="50" y="127"/>
<body name="t_bs_s" x="554" rotation="0" width="50" height="50" y="127"/>
<body name="t_b2_s" x="472" rotation="0" width="50" height="17" y="191"/>
<body name="t_b2_s" x="397" rotation="0" width="50" height="17" y="191"/>
<body name="t_b2_s" x="549" rotation="0" width="50" height="17" y="193"/>
<body name="t_b2_s" x="625" rotation="0" width="50" height="17" y="192"/>
<body name="t_cz_d" x="511" rotation="0" width="16" height="19" y="214"/>
<body name="t_cz_d" x="511" rotation="0" width="16" height="19" y="196"/>
<body name="t_cz_d" x="511" rotation="0" width="16" height="19" y="178"/>
<body name="t_cz_d" x="587" rotation="0" width="16" height="19" y="214"/>
<body name="t_cz_d" x="587" rotation="0" width="16" height="19" y="196"/>
<body name="t_cz_d" x="587" rotation="0" width="16" height="19" y="178"/>
<body name="t_cz_d" x="435" rotation="0" width="16" height="19" y="213"/>
<body name="t_cz_d" x="435" rotation="0" width="16" height="19" y="195"/>
<body name="t_cz_d" x="435" rotation="0" width="16" height="19" y="177"/>
<body name="t_rolB3_d" x="347" rotation="0" width="39" height="40" y="185"/>
<body name="t_rolG2_d" x="435" rotation="0" width="39" height="38" y="89"/>
<body name="t_rolB2_d" x="511" rotation="0" width="36" height="45" y="234"/>
<body name="t_rolB5_d" x="587" rotation="0" width="36" height="47" y="234"/>
<body name="t_rolB1_d" x="435" rotation="0" width="37" height="38" y="235"/>
<body name="t_o_d" x="227" rotation="0" width="25" height="21" y="397"/>
<body name="t_o_d" x="587" rotation="0" width="25" height="21" y="161"/>
<body name="t_o_d" x="511" rotation="0" width="25" height="21" y="161"/>
<body name="t_o_d" x="434" rotation="0" width="25" height="21" y="160"/>
<body name="t_joint" x="512" rotation="0" width="12" height="12" y="221"/>
<body name="t_joint" x="511" rotation="0" width="12" height="12" y="206"/>
<body name="t_joint" x="511" rotation="0" width="12" height="12" y="189"/>
<body name="t_joint" x="511" rotation="0" width="12" height="12" y="171"/>
<body name="t_joint" x="511" rotation="0" width="12" height="12" y="153"/>
<body name="t_joint" x="587" rotation="0" width="12" height="12" y="206"/>
<body name="t_joint" x="587" rotation="0" width="12" height="12" y="189"/>
<body name="t_joint" x="587" rotation="0" width="12" height="12" y="171"/>
<body name="t_joint" x="588" rotation="0" width="12" height="12" y="222"/>
<body name="t_joint" x="587" rotation="0" width="12" height="12" y="153"/>
<body name="t_joint" x="435" rotation="0" width="12" height="12" y="205"/>
<body name="t_joint" x="435" rotation="0" width="12" height="12" y="188"/>
<body name="t_joint" x="435" rotation="0" width="12" height="12" y="170"/>
<body name="t_joint" x="436" rotation="0" width="12" height="12" y="223"/>
<body name="t_joint" x="434" rotation="0" width="12" height="12" y="152"/>
<body name="t_pushka" x="43" rotation="0" width="86" height="51" y="343"/>
<body name="t_fire1_s" x="464" rotation="0" width="233" height="150" y="275"/>
<body name="t_fire1_s" x="565" rotation="0" width="233" height="150" y="275"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="5" numberLevel="4" nameLevel="LEVEL 4">
<bodies>
<body name="t_barm_s" height="24" x="460" width="236" y="262" rotation="4"/>
<body name="t_barm_s" height="24" x="459" width="236" y="323" rotation="4"/>
<body name="t_barm_s" height="24" x="691" width="236" y="332" rotation="0"/>
<body name="t_barm_s" height="24" x="29" width="236" y="316" rotation="0"/>
<body name="t_bte_d" height="51" x="368" width="36" y="287" rotation="90"/>
<body name="t_rolB4_d" height="38" x="126" width="40" y="291" rotation="0"/>
<body name="t_rolB2_d" height="45" x="32" width="36" y="293" rotation="0"/>
<body name="t_rolB5_d" height="47" x="80" width="36" y="292" rotation="0"/>
<body name="t_o_d" height="105" x="634" width="128" y="276" rotation="0"/>
<body name="t_joint_fixed" height="15" x="631" width="15" y="317" rotation="0"/>
<body name="t_pushka" height="51" x="129" width="86" y="388" rotation="0"/>
<body name="t_fire1_s" height="150" x="46" width="180" y="379" rotation="90"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="4" numberLevel="6" nameLevel="LEVEL 6">
<bodies>
<body name="t_bs_s" x="344" rotation="0" width="50" height="50" y="202"/>
<body name="t_bs_s" x="547" rotation="0" width="50" height="50" y="200"/>
<body name="t_bs_s" x="294" rotation="0" width="50" height="50" y="252"/>
<body name="t_bs_s" x="344" rotation="0" width="50" height="50" y="252"/>
<body name="t_bs_s" x="244" rotation="0" width="50" height="50" y="252"/>
<body name="t_bb_s" x="294" rotation="0" width="50" height="50" y="401"/>
<body name="t_bb_s" x="344" rotation="0" width="50" height="50" y="401"/>
<body name="t_bb_s" x="394" rotation="0" width="50" height="50" y="401"/>
<body name="t_bb_s" x="444" rotation="0" width="50" height="50" y="401"/>
<body name="t_bb_s" x="494" rotation="0" width="50" height="50" y="401"/>
<body name="t_bb_s" x="544" rotation="0" width="50" height="50" y="401"/>
<body name="t_bs_s" x="648" rotation="0" width="50" height="50" y="349"/>
<body name="t_bs_s" x="652" rotation="0" width="56" height="52" y="399"/>
<body name="t_bb_s" x="594" rotation="0" width="62" height="50" y="401"/>
<body name="t_bs_s" x="243" rotation="0" width="50" height="71" y="343"/>
<body name="t_bb_s" x="244" rotation="0" width="50" height="50" y="401"/>
<body name="t_bb_s" x="36" rotation="0" width="75" height="50" y="402"/>
<body name="t_b2_s" x="621" rotation="0" width="100" height="19" y="265"/>
<body name="t_bs_s" x="547" rotation="0" width="50" height="50" y="249"/>
<body name="t_bs_s" x="547" rotation="0" width="50" height="50" y="299"/>
<body name="t_bs_s" x="597" rotation="0" width="50" height="50" y="299"/>
<body name="t_bs_s" x="647" rotation="0" width="50" height="50" y="299"/>
<body name="t_b2_s" x="244" rotation="0" width="51" height="19" y="169"/>
<body name="t_bs_s" x="244" rotation="0" width="50" height="50" y="202"/>
<body name="t_b2_s" x="344" rotation="0" width="51" height="19" y="119"/>
<body name="t_bs_s" x="344" rotation="0" width="50" height="50" y="152"/>
<body name="t_b2_s" x="547" rotation="0" width="51" height="19" y="117"/>
<body name="t_bs_s" x="547" rotation="0" width="50" height="50" y="150"/>
<body name="t_bb_s" x="194" rotation="0" width="50" height="50" y="401"/>
<body name="t_3_s" x="345" rotation="0" width="52" height="45" y="93"/>
<body name="t_3_s" x="548" rotation="0" width="52" height="45" y="91"/>
<body name="t_3_s" x="245" rotation="0" width="52" height="45" y="144"/>
<body name="t_cz_d" x="514" rotation="90" width="17" height="21" y="245"/>
<body name="t_cz_d" x="496" rotation="90" width="17" height="21" y="245"/>
<body name="t_cz_d" x="476" rotation="90" width="17" height="21" y="246"/>
<body name="t_cz_d" x="457" rotation="90" width="17" height="21" y="246"/>
<body name="t_cz_d" x="438" rotation="90" width="17" height="21" y="245"/>
<body name="t_cz_d" x="418" rotation="90" width="17" height="21" y="244"/>
<body name="t_cz_d" x="398" rotation="90" width="17" height="21" y="244"/>
<body name="t_cz_d" x="379" rotation="90" width="17" height="21" y="244"/>
<body name="t_cz_d" x="514" rotation="90" width="17" height="21" y="150"/>
<body name="t_cz_d" x="496" rotation="90" width="17" height="21" y="150"/>
<body name="t_cz_d" x="476" rotation="90" width="17" height="21" y="151"/>
<body name="t_cz_d" x="457" rotation="90" width="17" height="21" y="151"/>
<body name="t_cz_d" x="418" rotation="90" width="17" height="21" y="149"/>
<body name="t_cz_d" x="398" rotation="90" width="17" height="21" y="149"/>
<body name="t_cz_d" x="379" rotation="90" width="17" height="21" y="149"/>
<body name="t_rolG4_d" x="336" rotation="0" width="44" height="51" y="292"/>
<body name="t_rolG1_d" x="291" rotation="0" width="48" height="43" y="291"/>
<body name="t_rolB2_d" x="492" rotation="0" width="36" height="45" y="363"/>
<body name="t_rolG2_d" x="249" rotation="0" width="39" height="38" y="292"/>
<body name="t_rolB1_d" x="307" rotation="0" width="37" height="38" y="361"/>
<body name="t_rolB5_d" x="436" rotation="0" width="36" height="47" y="363"/>
<body name="t_rolB4_d" x="369" rotation="0" width="40" height="38" y="363"/>
<body name="t_rolB1_d" x="569" rotation="0" width="37" height="38" y="363"/>
<body name="t_rolG3_d" x="294" rotation="0" width="43" height="38" y="212"/>
<body name="t_rolB5_d" x="442" rotation="0" width="36" height="47" y="212"/>
<body name="t_o_d" x="278" rotation="0" width="25" height="21" y="369"/>
<body name="t_o_d" x="337" rotation="0" width="25" height="21" y="369"/>
<body name="t_o_d" x="405" rotation="0" width="25" height="21" y="368"/>
<body name="t_o_d" x="464" rotation="0" width="25" height="21" y="367"/>
<body name="t_o_d" x="615" rotation="0" width="25" height="21" y="367"/>
<body name="t_o_d" x="597" rotation="0" width="25" height="21" y="367"/>
<body name="t_o_d" x="520" rotation="0" width="25" height="21" y="367"/>
<body name="t_o_d" x="540" rotation="0" width="25" height="21" y="367"/>
<body name="t_o_d" x="438" rotation="0" width="29" height="24" y="151"/>
<body name="t_joint" x="292" rotation="0" width="17" height="17" y="277"/>
<body name="t_joint" x="339" rotation="0" width="17" height="17" y="281"/>
<body name="t_joint" x="247" rotation="0" width="17" height="17" y="278"/>
<body name="t_joint" x="504" rotation="0" width="10" height="10" y="246"/>
<body name="t_joint" x="486" rotation="0" width="10" height="10" y="247"/>
<body name="t_joint" x="466" rotation="0" width="10" height="10" y="247"/>
<body name="t_joint" x="449" rotation="0" width="10" height="10" y="247"/>
<body name="t_joint" x="428" rotation="0" width="10" height="10" y="244"/>
<body name="t_joint" x="410" rotation="0" width="10" height="10" y="244"/>
<body name="t_joint" x="389" rotation="0" width="10" height="10" y="244"/>
<body name="t_joint" x="370" rotation="0" width="10" height="10" y="244"/>
<body name="t_joint" x="525" rotation="0" width="10" height="10" y="248"/>
<body name="t_joint" x="523" rotation="0" width="10" height="10" y="149"/>
<body name="t_joint" x="504" rotation="0" width="10" height="10" y="151"/>
<body name="t_joint" x="486" rotation="0" width="10" height="10" y="152"/>
<body name="t_joint" x="466" rotation="0" width="10" height="10" y="152"/>
<body name="t_joint" x="449" rotation="0" width="10" height="10" y="152"/>
<body name="t_joint" x="428" rotation="0" width="10" height="10" y="149"/>
<body name="t_joint" x="410" rotation="0" width="10" height="10" y="149"/>
<body name="t_joint" x="389" rotation="0" width="10" height="10" y="149"/>
<body name="t_joint" x="370" rotation="0" width="10" height="10" y="149"/>
<body name="t_joint_fixed" x="244" rotation="0" width="15" height="15" y="161"/>
<body name="t_pushka" x="47" rotation="0" width="86" height="51" y="347"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="3" numberLevel="9" nameLevel="LEVEL 9">
<bodies>
<body name="t_barm_s" x="422" rotation="0" width="236" height="24" y="258"/>
<body name="t_bs_s" x="422" rotation="0" width="50" height="50" y="295"/>
<body name="t_bs_s" x="422" rotation="0" width="50" height="50" y="345"/>
<body name="t_bs_s" x="422" rotation="0" width="50" height="50" y="394"/>
<body name="t_bb_s" x="148" rotation="0" width="50" height="50" y="394"/>
<body name="t_barm_s" x="280" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="46" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="538" rotation="0" width="174" height="35" y="93"/>
<body name="t_barm_s" x="300" rotation="0" width="174" height="35" y="93"/>
<body name="t_bk_d" x="313" rotation="90" width="127" height="16" y="179"/>
<body name="t_bk_d" x="529" rotation="90" width="127" height="16" y="179"/>
<body name="t_bte_d" x="397" rotation="0" width="46" height="60" y="46"/>
<body name="t_rolG3_d" x="344" rotation="0" width="43" height="38" y="232"/>
<body name="t_rolB3_d" x="500" rotation="0" width="39" height="40" y="229"/>
<body name="t_rolB2_d" x="464" rotation="0" width="36" height="45" y="231"/>
<body name="t_o_d" x="363" rotation="0" width="25" height="21" y="67"/>
<body name="t_revolute" x="313" rotation="0" width="17" height="17" y="127"/>
<body name="t_revolute" x="529" rotation="0" width="17" height="17" y="127"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="367"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="5" numberLevel="11" nameLevel="LEVEL 11">
<bodies>
<body name="t_barm_s" x="335" rotation="0" width="236" height="24" y="385"/>
<body name="t_barm_s" x="567" rotation="0" width="236" height="24" y="385"/>
<body name="t_barm_s" x="335" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="567" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="335" rotation="0" width="236" height="24" y="339"/>
<body name="t_barm_s" x="567" rotation="0" width="236" height="24" y="339"/>
<body name="t_barm_s" x="335" rotation="0" width="236" height="24" y="362"/>
<body name="t_barm_s" x="567" rotation="0" width="236" height="24" y="362"/>
<body name="t_b2_s" x="644" rotation="0" width="51" height="19" y="112"/>
<body name="t_b2_s" x="609" rotation="0" width="51" height="19" y="130"/>
<body name="t_b2_s" x="543" rotation="0" width="51" height="19" y="114"/>
<body name="t_b2_s" x="442" rotation="0" width="51" height="19" y="115"/>
<body name="t_b2_s" x="508" rotation="0" width="51" height="19" y="131"/>
<body name="t_b2_s" x="341" rotation="0" width="51" height="19" y="117"/>
<body name="t_b2_s" x="407" rotation="0" width="51" height="19" y="133"/>
<body name="t_barm_s" x="217" rotation="90" width="236" height="24" y="318"/>
<body name="t_b2_s" x="538" rotation="90" width="200" height="10" y="206"/>
<body name="t_3_s" x="539" rotation="0" width="57" height="50" y="309"/>
<body name="t_b2_s" x="424" rotation="90" width="200" height="10" y="206"/>
<body name="t_3_s" x="423" rotation="0" width="57" height="50" y="309"/>
<body name="t_b2_s" x="426" rotation="90" width="51" height="19" y="81"/>
<body name="t_b2_s" x="527" rotation="90" width="51" height="19" y="80"/>
<body name="t_b2_s" x="627" rotation="90" width="51" height="19" y="78"/>
<body name="t_ck_d" x="577" rotation="0" width="55" height="55" y="209"/>
<body name="t_ck_d" x="476" rotation="0" width="55" height="55" y="210"/>
<body name="t_ck_d" x="375" rotation="0" width="55" height="55" y="212"/>
<body name="t_cz_d" x="576" rotation="0" width="17" height="21" y="134"/>
<body name="t_cz_d" x="576" rotation="0" width="17" height="21" y="114"/>
<body name="t_cz_d" x="574" rotation="0" width="17" height="21" y="154"/>
<body name="t_cz_d" x="576" rotation="0" width="17" height="21" y="174"/>
<body name="t_cz_d" x="475" rotation="0" width="17" height="21" y="175"/>
<body name="t_cz_d" x="473" rotation="0" width="17" height="21" y="155"/>
<body name="t_cz_d" x="475" rotation="0" width="17" height="21" y="115"/>
<body name="t_cz_d" x="475" rotation="0" width="17" height="21" y="135"/>
<body name="t_cz_d" x="374" rotation="0" width="17" height="21" y="177"/>
<body name="t_cz_d" x="372" rotation="0" width="17" height="21" y="157"/>
<body name="t_cz_d" x="374" rotation="0" width="17" height="21" y="117"/>
<body name="t_cz_d" x="374" rotation="0" width="17" height="21" y="137"/>
<body name="t_rolG2_d" x="360" rotation="0" width="39" height="38" y="313"/>
<body name="t_rolG1_d" x="586" rotation="0" width="48" height="43" y="317"/>
<body name="t_rolB5_d" x="487" rotation="0" width="36" height="47" y="315"/>
<body name="t_o_d" x="460" rotation="0" width="25" height="21" y="320"/>
<body name="t_o_d" x="394" rotation="0" width="25" height="21" y="115"/>
<body name="t_o_d" x="601" rotation="0" width="25" height="21" y="111"/>
<body name="t_o_d" x="500" rotation="0" width="25" height="21" y="114"/>
<body name="t_joint" x="568" rotation="0" width="10" height="10" y="107"/>
<body name="t_joint" x="576" rotation="0" width="10" height="10" y="125"/>
<body name="t_joint" x="576" rotation="0" width="10" height="10" y="185"/>
<body name="t_joint" x="577" rotation="0" width="10" height="10" y="164"/>
<body name="t_joint" x="573" rotation="0" width="10" height="10" y="144"/>
<body name="t_joint" x="472" rotation="0" width="10" height="10" y="145"/>
<body name="t_joint" x="476" rotation="0" width="10" height="10" y="165"/>
<body name="t_joint" x="475" rotation="0" width="10" height="10" y="186"/>
<body name="t_joint" x="475" rotation="0" width="10" height="10" y="126"/>
<body name="t_joint" x="467" rotation="0" width="10" height="10" y="108"/>
<body name="t_joint" x="371" rotation="0" width="10" height="10" y="147"/>
<body name="t_joint" x="375" rotation="0" width="10" height="10" y="167"/>
<body name="t_joint" x="374" rotation="0" width="10" height="10" y="188"/>
<body name="t_joint" x="374" rotation="0" width="10" height="10" y="128"/>
<body name="t_joint" x="366" rotation="0" width="10" height="10" y="110"/>
<body name="t_pushka" x="46" rotation="0" width="86" height="51" y="390"/>
<body name="t_fire1_s" x="277" rotation="0" width="180" height="150" y="278"/>
<body name="t_fire1_s" x="675" rotation="0" width="180" height="150" y="278"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="5" numberLevel="19" nameLevel="LEVEL 19">
<bodies>
<body name="t_barm_s" x="672" rotation="90" width="236" height="24" y="125"/>
<body name="t_barm_s" x="672" rotation="90" width="236" height="24" y="358"/>
<body name="t_barm_s" x="20" rotation="90" width="236" height="24" y="119"/>
<body name="t_barm_s" x="20" rotation="90" width="236" height="24" y="351"/>
<body name="t_mpg_d" x="274" rotation="0" width="61" height="16" y="250"/>
<body name="t_mpg_d" x="140" rotation="0" width="61" height="16" y="125"/>
<body name="t_mpg_d" x="611" rotation="0" width="61" height="16" y="65"/>
<body name="t_mpg_d" x="605" rotation="0" width="61" height="16" y="309"/>
<body name="t_mpg_d" x="463" rotation="0" width="61" height="16" y="179"/>
<body name="t_rolB2_d" x="285" rotation="0" width="36" height="45" y="230"/>
<body name="t_rolG4_d" x="619" rotation="0" width="44" height="51" y="44"/>
<body name="t_rolG5_d" x="612" rotation="0" width="40" height="45" y="286"/>
<body name="t_rolB3_d" x="468" rotation="0" width="39" height="40" y="157"/>
<body name="t_rolG2_d" x="138" rotation="0" width="39" height="38" y="103"/>
<body name="t_pushka" x="65" rotation="0" width="86" height="51" y="392"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="6" numberLevel="20" nameLevel="LEVEL 20">
<bodies>
<body name="t_bb_s" x="38" rotation="0" width="60" height="50" y="422"/>
<body name="t_bs_s" x="325" rotation="0" width="50" height="50" y="432"/>
<body name="t_bs_s" x="325" rotation="0" width="50" height="50" y="384"/>
<body name="t_bs_s" x="325" rotation="0" width="50" height="50" y="337"/>
<body name="t_bs_s" x="325" rotation="0" width="50" height="50" y="287"/>
<body name="t_bs_s" x="616" rotation="0" width="50" height="50" y="429"/>
<body name="t_bs_s" x="616" rotation="0" width="50" height="50" y="381"/>
<body name="t_bs_s" x="616" rotation="0" width="50" height="50" y="334"/>
<body name="t_bs_s" x="616" rotation="0" width="50" height="50" y="284"/>
<body name="t_barm_s" x="534" rotation="-45" width="60" height="15" y="46"/>
<body name="t_barm_s" x="412" rotation="45" width="60" height="15" y="44"/>
<body name="t_barm_s" x="513" rotation="50" width="125" height="15" y="138"/>
<body name="t_barm_s" x="432" rotation="-50" width="125" height="15" y="137"/>
<body name="t_b2_s" x="473" rotation="0" width="18" height="19" y="95"/>
<body name="t_bte_d" x="442" rotation="41" width="29" height="42" y="91"/>
<body name="t_bte_d" x="504" rotation="-41" width="29" height="42" y="91"/>
<body name="t_cz_d" x="360" rotation="90" width="17" height="21" y="265"/>
<body name="t_cz_d" x="376" rotation="90" width="17" height="21" y="264"/>
<body name="t_cz_d" x="393" rotation="90" width="17" height="21" y="264"/>
<body name="t_cz_d" x="411" rotation="90" width="17" height="21" y="264"/>
<body name="t_cz_d" x="429" rotation="90" width="17" height="21" y="264"/>
<body name="t_cz_d" x="447" rotation="90" width="17" height="21" y="264"/>
<body name="t_cz_d" x="494" rotation="90" width="17" height="21" y="263"/>
<body name="t_cz_d" x="510" rotation="90" width="17" height="21" y="262"/>
<body name="t_cz_d" x="527" rotation="90" width="17" height="21" y="262"/>
<body name="t_cz_d" x="545" rotation="90" width="17" height="21" y="262"/>
<body name="t_cz_d" x="584" rotation="90" width="17" height="21" y="262"/>
<body name="t_cz_d" x="564" rotation="90" width="17" height="21" y="262"/>
<body name="t_rolG1_d" x="470" rotation="0" width="48" height="43" y="264"/>
<body name="t_rolB2_d" x="632" rotation="0" width="36" height="45" y="247"/>
<body name="t_rolB3_d" x="310" rotation="0" width="39" height="40" y="248"/>
<body name="t_joint" x="353" rotation="0" width="17" height="17" y="267"/>
<body name="t_joint" x="371" rotation="0" width="17" height="17" y="268"/>
<body name="t_joint" x="386" rotation="0" width="17" height="17" y="267"/>
<body name="t_joint" x="406" rotation="0" width="17" height="17" y="265"/>
<body name="t_joint" x="424" rotation="0" width="17" height="17" y="265"/>
<body name="t_joint" x="441" rotation="0" width="17" height="17" y="265"/>
<body name="t_joint" x="459" rotation="0" width="17" height="17" y="265"/>
<body name="t_joint" x="485" rotation="0" width="17" height="17" y="264"/>
<body name="t_joint" x="505" rotation="0" width="17" height="17" y="263"/>
<body name="t_joint" x="521" rotation="0" width="17" height="17" y="263"/>
<body name="t_joint" x="540" rotation="0" width="17" height="17" y="263"/>
<body name="t_joint" x="554" rotation="0" width="17" height="17" y="263"/>
<body name="t_joint" x="574" rotation="0" width="17" height="17" y="263"/>
<body name="t_joint" x="585" rotation="0" width="17" height="17" y="267"/>
<body name="t_joint_fixed" x="454" rotation="0" width="15" height="15" y="93"/>
<body name="t_joint_fixed" x="492" rotation="0" width="15" height="15" y="95"/>
<body name="t_pushka" x="46" rotation="0" width="86" height="51" y="368"/>
<body name="t_fire1_s" x="410" rotation="0" width="270" height="232" y="381"/>
<body name="t_fire1_s" x="534" rotation="0" width="259" height="229" y="381"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="6" numberLevel="21" nameLevel="LEVEL 21">
<bodies>
<body name="t_bs_s" x="360" rotation="0" width="50" height="50" y="309"/>
<body name="t_bs_s" x="360" rotation="0" width="50" height="50" y="358"/>
<body name="t_bb_s" x="360" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="659" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="609" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="559" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="410" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="460" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="510" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="310" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="260" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="210" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="61" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="111" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="161" rotation="0" width="50" height="50" y="407"/>
<body name="t_bb_s" x="12" rotation="0" width="50" height="50" y="407"/>
<body name="t_barm_s" x="360" rotation="0" width="280" height="25" y="273"/>
<body name="t_b2_s" x="38" rotation="0" width="67" height="19" y="374"/>
<body name="t_bk2_d" x="248" rotation="0" width="52" height="21" y="230"/>
<body name="t_bte_d" x="474" rotation="0" width="36" height="51" y="193"/>
<body name="t_bk_d" x="473" rotation="0" width="52" height="21" y="229"/>
<body name="t_bk2_d" x="474" rotation="0" width="52" height="21" y="250"/>
<body name="t_bk2_d" x="248" rotation="0" width="52" height="21" y="251"/>
<body name="t_bte_d" x="247" rotation="0" width="36" height="51" y="194"/>
<body name="t_rolG3_d" x="474" rotation="0" width="43" height="38" y="153"/>
<body name="t_rolB4_d" x="409" rotation="0" width="40" height="38" y="248"/>
<body name="t_rolB3_d" x="382" rotation="0" width="39" height="40" y="247"/>
<body name="t_rolB2_d" x="335" rotation="0" width="36" height="45" y="248"/>
<body name="t_rolB1_d" x="308" rotation="0" width="37" height="38" y="248"/>
<body name="t_rolG2_d" x="247" rotation="0" width="39" height="38" y="156"/>
<body name="t_joint_fixed" x="388" rotation="0" width="15" height="15" y="262"/>
<body name="t_joint_fixed" x="415" rotation="0" width="15" height="15" y="260"/>
<body name="t_joint_fixed" x="306" rotation="0" width="15" height="15" y="261"/>
<body name="t_joint_fixed" x="327" rotation="0" width="15" height="15" y="262"/>
<body name="t_pushka" x="46" rotation="0" width="86" height="51" y="337"/>
<body name="t_fire1_s" x="435" rotation="0" width="235" height="150" y="335"/>
<body name="t_fire1_s" x="544" rotation="0" width="235" height="150" y="336"/>
<body name="t_fire1_s" x="636" rotation="0" width="235" height="150" y="337"/>
<body name="t_fire1_s" x="290" rotation="0" width="235" height="150" y="337"/>
<body name="t_fire1_s" x="191" rotation="0" width="235" height="150" y="336"/>
<body name="t_fire1_s" x="191" rotation="0" width="235" height="150" y="336"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="6" numberLevel="25" nameLevel="LEVEL 25">
<bodies>
<body name="t_barm_s" x="348" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="581" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="115" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="20" rotation="90" width="236" height="24" y="317"/>
<body name="t_bs_s" x="221" rotation="0" width="50" height="50" y="276"/>
<body name="t_barm_s" x="91" rotation="0" width="236" height="24" y="336"/>
<body name="t_bs_s" x="305" rotation="0" width="50" height="50" y="273"/>
<body name="t_bs_s" x="305" rotation="0" width="50" height="50" y="323"/>
<body name="t_bs_s" x="355" rotation="0" width="50" height="50" y="323"/>
<body name="t_bs_s" x="355" rotation="0" width="50" height="50" y="273"/>
<body name="t_bs_s" x="305" rotation="0" width="50" height="50" y="224"/>
<body name="t_bs_s" x="355" rotation="0" width="50" height="50" y="224"/>
<body name="t_bs_s" x="353" rotation="0" width="50" height="50" y="118"/>
<body name="t_bs_s" x="303" rotation="0" width="50" height="50" y="118"/>
<body name="t_bs_s" x="603" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="553" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="303" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="353" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="403" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="651" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="405" rotation="0" width="50" height="50" y="224"/>
<body name="t_bs_s" x="455" rotation="0" width="50" height="50" y="224"/>
<body name="t_bs_s" x="403" rotation="0" width="50" height="50" y="118"/>
<body name="t_bs_s" x="438" rotation="45" width="48" height="70" y="307"/>
<body name="t_bs_s" x="405" rotation="0" width="50" height="50" y="323"/>
<body name="t_bs_s" x="405" rotation="0" width="50" height="50" y="273"/>
<body name="t_bs_s" x="455" rotation="0" width="50" height="50" y="274"/>
<body name="t_bs_s" x="486" rotation="45" width="48" height="70" y="101"/>
<body name="t_bs_s" x="452" rotation="0" width="50" height="50" y="118"/>
<body name="t_bs_s" x="453" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="503" rotation="0" width="50" height="50" y="68"/>
<body name="t_bs_s" x="221" rotation="0" width="50" height="50" y="324"/>
<body name="t_barm_s" x="672" rotation="90" width="236" height="24" y="35"/>
<body name="t_barm_s" x="672" rotation="90" width="236" height="24" y="270"/>
<body name="t_barm_s" x="732" rotation="0" width="236" height="24" y="363"/>
<body name="t_barm_s" x="732" rotation="0" width="236" height="24" y="386"/>
<body name="t_cw_d" x="292" rotation="0" width="55" height="55" y="171"/>
<body name="t_rolB1_d" x="427" rotation="0" width="37" height="38" y="382"/>
<body name="t_rolB2_d" x="461" rotation="0" width="36" height="45" y="383"/>
<body name="t_rolG4_d" x="176" rotation="0" width="44" height="51" y="310"/>
<body name="t_o_d" x="645" rotation="0" width="25" height="21" y="343"/>
<body name="t_o_d" x="207" rotation="0" width="25" height="21" y="388"/>
<body name="t_o_d" x="235" rotation="0" width="25" height="21" y="387"/>
<body name="t_pushka" x="70" rotation="0" width="86" height="51" y="295"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="27" nameLevel="LEVEL 27">
<bodies>
<body name="t_barm_s" x="650" rotation="90" width="236" height="24" y="0"/>
<body name="t_barm_s" x="354" rotation="0" width="236" height="24" y="95"/>
<body name="t_barm_s" x="381" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="146" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="-89" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="615" rotation="0" width="236" height="24" y="408"/>
<body name="t_bs_s" x="224" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="471" rotation="0" width="50" height="50" y="242"/>
<body name="t_bs_s" x="471" rotation="0" width="50" height="50" y="292"/>
<body name="t_bs_s" x="471" rotation="0" width="50" height="50" y="340"/>
<body name="t_barm_s" x="673" rotation="90" width="236" height="24" y="209"/>
<body name="t_barm_s" x="673" rotation="90" width="236" height="24" y="442"/>
<body name="t_barm_s" x="29" rotation="0" width="236" height="24" y="361"/>
<body name="t_barm_s" x="144" rotation="90" width="236" height="24" y="456"/>
<body name="t_bs_s" x="423" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="374" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="324" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="274" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="272" rotation="0" width="50" height="50" y="290"/>
<body name="t_bs_s" x="322" rotation="0" width="50" height="50" y="290"/>
<body name="t_bs_s" x="372" rotation="0" width="50" height="50" y="290"/>
<body name="t_bs_s" x="421" rotation="0" width="50" height="50" y="290"/>
<body name="t_bs_s" x="324" rotation="0" width="50" height="50" y="242"/>
<body name="t_bs_s" x="374" rotation="0" width="50" height="50" y="242"/>
<body name="t_bs_s" x="423" rotation="0" width="50" height="50" y="242"/>
<body name="t_barm_s" x="721" rotation="0" width="236" height="20" y="94"/>
<body name="t_b2_s" x="591" rotation="45" width="51" height="19" y="79"/>
<body name="t_cz_d" x="471" rotation="0" width="17" height="21" y="116"/>
<body name="t_cz_d" x="493" rotation="-22" width="17" height="21" y="202"/>
<body name="t_cz_d" x="485" rotation="-12" width="17" height="21" y="185"/>
<body name="t_cz_d" x="478" rotation="-8" width="17" height="21" y="167"/>
<body name="t_cz_d" x="473" rotation="-4" width="17" height="21" y="149"/>
<body name="t_cz_d" x="472" rotation="0" width="17" height="21" y="131"/>
<body name="t_cz_d" x="604" rotation="-172" width="17" height="21" y="164"/>
<body name="t_cz_d" x="601" rotation="-161" width="17" height="21" y="182"/>
<body name="t_cz_d" x="596" rotation="-158" width="17" height="21" y="199"/>
<body name="t_cz_d" x="588" rotation="-149" width="17" height="21" y="214"/>
<body name="t_cz_d" x="577" rotation="-133" width="17" height="21" y="229"/>
<body name="t_cz_d" x="564" rotation="-111" width="17" height="21" y="239"/>
<body name="t_cz_d" x="547" rotation="-91" width="17" height="21" y="244"/>
<body name="t_cz_d" x="530" rotation="-67" width="17" height="21" y="241"/>
<body name="t_cz_d" x="516" rotation="-47" width="17" height="21" y="230"/>
<body name="t_cz_d" x="503" rotation="-38" width="17" height="21" y="217"/>
<body name="t_cz_d" x="612" rotation="-176" width="17" height="21" y="147"/>
<body name="t_cz_d" x="617" rotation="-176" width="17" height="21" y="130"/>
<body name="t_cz_d" x="618" rotation="0" width="17" height="21" y="112"/>
<body name="t_cz_d" x="617" rotation="0" width="17" height="21" y="92"/>
<body name="t_rolG5_d" x="562" rotation="0" width="40" height="45" y="163"/>
<body name="t_rolG5_d" x="512" rotation="0" width="40" height="45" y="157"/>
<body name="t_rolG5_d" x="533" rotation="0" width="40" height="45" y="173"/>
<body name="t_rolG2_d" x="565" rotation="0" width="39" height="38" y="151"/>
<body name="t_rolG5_d" x="551" rotation="0" width="40" height="45" y="186"/>
<body name="t_rolG5_d" x="538" rotation="0" width="40" height="45" y="140"/>
<body name="t_rolB3_d" x="509" rotation="0" width="39" height="40" y="384"/>
<body name="t_o_d" x="626" rotation="0" width="25" height="21" y="77"/>
<body name="t_joint" x="471" rotation="0" width="10" height="10" y="123"/>
<body name="t_joint" x="605" rotation="0" width="10" height="10" y="154"/>
<body name="t_joint" x="602" rotation="0" width="10" height="10" y="172"/>
<body name="t_joint" x="597" rotation="0" width="10" height="10" y="189"/>
<body name="t_joint" x="592" rotation="0" width="10" height="10" y="205"/>
<body name="t_joint" x="582" rotation="0" width="10" height="10" y="223"/>
<body name="t_joint" x="569" rotation="0" width="10" height="10" y="236"/>
<body name="t_joint" x="555" rotation="0" width="10" height="10" y="243"/>
<body name="t_joint" x="538" rotation="0" width="10" height="10" y="243"/>
<body name="t_joint" x="523" rotation="0" width="10" height="10" y="237"/>
<body name="t_joint" x="510" rotation="0" width="10" height="10" y="224"/>
<body name="t_joint" x="498" rotation="0" width="10" height="10" y="210"/>
<body name="t_joint" x="488" rotation="0" width="10" height="10" y="195"/>
<body name="t_joint" x="482" rotation="0" width="10" height="10" y="177"/>
<body name="t_joint" x="475" rotation="0" width="10" height="10" y="159"/>
<body name="t_joint" x="473" rotation="0" width="10" height="10" y="139"/>
<body name="t_joint" x="613" rotation="0" width="10" height="10" y="138"/>
<body name="t_joint" x="618" rotation="0" width="10" height="10" y="119"/>
<body name="t_joint" x="470" rotation="0" width="10" height="10" y="104"/>
<body name="t_joint_fixed" x="610" rotation="0" width="10" height="10" y="92"/>
<body name="t_joint" x="618" rotation="0" width="10" height="10" y="108"/>
<body name="t_pushka" x="52" rotation="0" width="86" height="51" y="320"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="5" numberLevel="30" nameLevel="LEVEL 30">
<bodies>
<body name="t_bb_s" x="459" rotation="0" width="50" height="50" y="396"/>
<body name="t_bb_s" x="509" rotation="0" width="50" height="50" y="396"/>
<body name="t_bb_s" x="507" rotation="0" width="50" height="50" y="349"/>
<body name="t_bb_s" x="475" rotation="44" width="51" height="69" y="366"/>
<body name="t_bs_s" x="666" rotation="0" width="50" height="50" y="224"/>
<body name="t_bs_s" x="666" rotation="0" width="50" height="50" y="186"/>
<body name="t_bs_s" x="666" rotation="0" width="50" height="50" y="136"/>
<body name="t_bs_s" x="507" rotation="0" width="50" height="50" y="136"/>
<body name="t_barm_s" x="597" rotation="0" width="236" height="24" y="99"/>
<body name="t_bb_s" x="609" rotation="0" width="50" height="50" y="396"/>
<body name="t_bb_s" x="659" rotation="0" width="50" height="50" y="396"/>
<body name="t_bb_s" x="659" rotation="0" width="50" height="50" y="347"/>
<body name="t_bs_s" x="609" rotation="0" width="50" height="50" y="297"/>
<body name="t_bs_s" x="659" rotation="0" width="50" height="50" y="297"/>
<body name="t_barm_s" x="601" rotation="0" width="236" height="24" y="260"/>
<body name="t_bb_s" x="559" rotation="0" width="50" height="50" y="396"/>
<body name="t_barm_s" x="317" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="84" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="596" rotation="0" width="236" height="24" y="76"/>
<body name="t_barm_s" x="596" rotation="0" width="236" height="24" y="53"/>
<body name="t_bk_d" x="362" rotation="0" width="200" height="18" y="207"/>
<body name="t_bk_d" x="362" rotation="90" width="200" height="18" y="208"/>
<body name="t_cz_d" x="620" rotation="0" width="17" height="21" y="137"/>
<body name="t_cz_d" x="620" rotation="0" width="17" height="21" y="119"/>
<body name="t_cz_d" x="551" rotation="0" width="17" height="21" y="119"/>
<body name="t_rolB5_d" x="601" rotation="0" width="36" height="47" y="233"/>
<body name="t_rolB1_d" x="560" rotation="0" width="37" height="38" y="235"/>
<body name="t_rolB3_d" x="607" rotation="0" width="39" height="40" y="356"/>
<body name="t_rolB2_d" x="555" rotation="0" width="36" height="45" y="358"/>
<body name="t_rolB3_d" x="621" rotation="0" width="39" height="40" y="157"/>
<body name="t_rolB4_d" x="551" rotation="0" width="40" height="38" y="142"/>
<body name="t_o_d" x="552" rotation="0" width="25" height="21" y="165"/>
<body name="t_joint" x="619" rotation="0" width="17" height="17" y="170"/>
<body name="t_joint" x="621" rotation="0" width="17" height="17" y="147"/>
<body name="t_joint" x="620" rotation="0" width="17" height="17" y="130"/>
<body name="t_joint" x="620" rotation="0" width="17" height="17" y="108"/>
<body name="t_joint" x="552" rotation="0" width="17" height="17" y="155"/>
<body name="t_joint" x="552" rotation="0" width="17" height="17" y="129"/>
<body name="t_joint" x="552" rotation="0" width="17" height="17" y="108"/>
<body name="t_revolute" x="362" rotation="0" width="17" height="17" y="208"/>
<body name="t_pushka" x="47" rotation="0" width="86" height="51" y="368"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="32" nameLevel="LEVEL 32">
<bodies>
<body name="t_barm_s" x="125" rotation="0" width="236" height="24" y="409"/>
<body name="t_barm_s" x="361" rotation="0" width="236" height="24" y="409"/>
<body name="t_barm_s" x="595" rotation="0" width="236" height="24" y="409"/>
<body name="t_barm_s" x="386" rotation="0" width="158" height="18" y="290"/>
<body name="t_bs_s" x="575" rotation="0" width="50" height="50" y="372"/>
<body name="t_bs_s" x="625" rotation="0" width="50" height="50" y="371"/>
<body name="t_bs_s" x="675" rotation="0" width="50" height="50" y="370"/>
<body name="t_bs_s" x="575" rotation="0" width="50" height="50" y="323"/>
<body name="t_barm_s" x="695" rotation="90" width="236" height="24" y="230"/>
<body name="t_bs_s" x="625" rotation="0" width="50" height="50" y="354"/>
<body name="t_bs_s" x="675" rotation="0" width="50" height="50" y="354"/>
<body name="t_bs_s" x="442" rotation="0" width="50" height="50" y="373"/>
<body name="t_bs_s" x="629" rotation="0" width="20" height="20" y="302"/>
<body name="t_bs_s" x="471" rotation="0" width="20" height="20" y="309"/>
<body name="t_bs_s" x="442" rotation="0" width="50" height="50" y="323"/>
<body name="t_bs_s" x="161" rotation="0" width="40" height="30" y="381"/>
<body name="t_barm_s" x="127" rotation="0" width="236" height="24" y="0"/>
<body name="t_barm_s" x="576" rotation="0" width="236" height="24" y="-4"/>
<body name="t_barm_s" x="598" rotation="0" width="236" height="24" y="0"/>
<body name="t_barm_s" x="-1" rotation="90" width="236" height="24" y="279"/>
<body name="t_barm_s" x="-1" rotation="90" width="236" height="24" y="45"/>
<body name="t_barm_s" x="695" rotation="90" width="236" height="24" y="-5"/>
<body name="t_barm_s" x="362" rotation="0" width="236" height="24" y="0"/>
<body name="t_bs_s" x="161" rotation="0" width="40" height="30" y="351"/>
<body name="t_b2_s" x="596" rotation="90" width="72" height="19" y="102"/>
<body name="t_bs_s" x="630" rotation="0" width="50" height="50" y="113"/>
<body name="t_bs_s" x="679" rotation="0" width="50" height="50" y="113"/>
<body name="t_b2_s" x="695" rotation="90" width="72" height="19" y="84"/>
<body name="t_bk2_d" x="598" rotation="0" width="100" height="11" y="280"/>
<body name="t_cz_d" x="390" rotation="0" width="17" height="21" y="40"/>
<body name="t_cz_d" x="390" rotation="0" width="17" height="21" y="22"/>
<body name="t_cz_d" x="390" rotation="0" width="17" height="21" y="73"/>
<body name="t_cz_d" x="391" rotation="0" width="17" height="21" y="109"/>
<body name="t_cz_d" x="391" rotation="0" width="17" height="21" y="91"/>
<body name="t_rolG1_d" x="487" rotation="0" width="48" height="43" y="384"/>
<body name="t_rolB1_d" x="464" rotation="0" width="37" height="38" y="269"/>
<body name="t_rolG2_d" x="487" rotation="0" width="39" height="38" y="352"/>
<body name="t_rolG4_d" x="391" rotation="0" width="44" height="51" y="133"/>
<body name="t_rolB5_d" x="632" rotation="0" width="36" height="47" y="72"/>
<body name="t_rolG5_d" x="523" rotation="0" width="40" height="45" y="384"/>
<body name="t_o_d" x="390" rotation="0" width="25" height="21" y="57"/>
<body name="t_o_d" x="660" rotation="-3" width="61" height="50" y="308"/>
<body name="t_o_d" x="192" rotation="0" width="25" height="21" y="388"/>
<body name="t_joint" x="390" rotation="0" width="10" height="10" y="118"/>
<body name="t_joint" x="390" rotation="0" width="10" height="10" y="100"/>
<body name="t_joint" x="390" rotation="0" width="10" height="10" y="83"/>
<body name="t_joint" x="390" rotation="0" width="10" height="10" y="66"/>
<body name="t_joint" x="391" rotation="0" width="10" height="10" y="50"/>
<body name="t_joint" x="390" rotation="0" width="10" height="10" y="12"/>
<body name="t_joint" x="391" rotation="0" width="10" height="10" y="30"/>
<body name="t_revolute" x="561" rotation="0" width="10" height="10" y="280"/>
<body name="t_pushka" x="48" rotation="0" width="86" height="51" y="368"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="5" numberLevel="42" nameLevel="LEVEL 42">
<bodies>
<body name="t_b2_s" x="41" rotation="0" width="65" height="19" y="396"/>
<body name="t_b2_s" x="41" rotation="0" width="65" height="19" y="414"/>
<body name="t_b2_s" x="225" rotation="0" width="51" height="19" y="95"/>
<body name="t_b2_s" x="317" rotation="0" width="51" height="19" y="95"/>
<body name="t_b2_s" x="271" rotation="0" width="51" height="19" y="95"/>
<body name="t_b2_s" x="453" rotation="0" width="51" height="19" y="94"/>
<body name="t_b2_s" x="545" rotation="0" width="51" height="19" y="94"/>
<body name="t_b2_s" x="499" rotation="0" width="51" height="19" y="94"/>
<body name="t_b2_s" x="317" rotation="0" width="51" height="19" y="344"/>
<body name="t_b2_s" x="363" rotation="0" width="51" height="19" y="344"/>
<body name="t_b2_s" x="454" rotation="0" width="51" height="19" y="344"/>
<body name="t_b2_s" x="408" rotation="0" width="51" height="19" y="344"/>
<body name="t_b2_s" x="499" rotation="0" width="51" height="19" y="231"/>
<body name="t_b2_s" x="454" rotation="0" width="51" height="19" y="231"/>
<body name="t_b2_s" x="272" rotation="0" width="51" height="19" y="231"/>
<body name="t_b2_s" x="317" rotation="0" width="51" height="19" y="231"/>
<body name="t_bte_d" x="318" rotation="0" width="36" height="51" y="197"/>
<body name="t_rolB4_d" x="271" rotation="0" width="40" height="38" y="70"/>
<body name="t_rolB4_d" x="499" rotation="0" width="40" height="38" y="69"/>
<body name="t_rolB1_d" x="455" rotation="0" width="37" height="38" y="321"/>
<body name="t_rolG2_d" x="322" rotation="0" width="39" height="38" y="319"/>
<body name="t_rolB1_d" x="318" rotation="0" width="37" height="38" y="158"/>
<body name="t_rolG3_d" x="278" rotation="0" width="43" height="38" y="209"/>
<body name="t_rolB2_d" x="481" rotation="0" width="36" height="45" y="208"/>
<body name="t_pushka" x="48" rotation="0" width="86" height="51" y="359"/>
<body name="t_fire1_s" x="121" rotation="0" width="180" height="150" y="381"/>
<body name="t_fire1_s" x="189" rotation="0" width="180" height="150" y="381"/>
<body name="t_fire1_s" x="258" rotation="0" width="180" height="150" y="377"/>
<body name="t_fire1_s" x="324" rotation="0" width="180" height="150" y="380"/>
<body name="t_fire1_s" x="388" rotation="0" width="180" height="150" y="376"/>
<body name="t_fire1_s" x="447" rotation="0" width="180" height="150" y="380"/>
<body name="t_fire1_s" x="504" rotation="0" width="180" height="150" y="379"/>
<body name="t_fire1_s" x="569" rotation="0" width="180" height="150" y="379"/>
<body name="t_fire1_s" x="640" rotation="0" width="180" height="150" y="379"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="43" nameLevel="LEVEL 43">
<bodies>
<body name="t_barm_s" x="647" rotation="0" width="236" height="24" y="428"/>
<body name="t_barm_s" x="177" rotation="0" width="236" height="24" y="428"/>
<body name="t_barm_s" x="412" rotation="0" width="236" height="24" y="428"/>
<body name="t_bs_s" x="258" rotation="0" width="50" height="50" y="392"/>
<body name="t_bs_s" x="258" rotation="0" width="50" height="50" y="343"/>
<body name="t_barm_s" x="689" rotation="90" width="236" height="15" y="328"/>
<body name="t_barm_s" x="689" rotation="90" width="236" height="15" y="92"/>
<body name="t_bs_s" x="308" rotation="0" width="50" height="50" y="343"/>
<body name="t_bs_s" x="360" rotation="0" width="50" height="50" y="104"/>
<body name="t_bs_s" x="357" rotation="0" width="50" height="50" y="343"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="204"/>
<body name="t_bs_s" x="409" rotation="0" width="50" height="50" y="104"/>
<body name="t_bs_s" x="458" rotation="0" width="50" height="50" y="104"/>
<body name="t_barm_s" x="22" rotation="0" width="184" height="22" y="350"/>
<body name="t_bs_s" x="33" rotation="0" width="50" height="50" y="386"/>
<body name="t_bs_s" x="34" rotation="0" width="50" height="50" y="437"/>
<body name="t_bs_s" x="311" rotation="0" width="50" height="50" y="56"/>
<body name="t_bs_s" x="311" rotation="0" width="50" height="50" y="104"/>
<body name="t_bs_s" x="311" rotation="0" width="50" height="50" y="7"/>
<body name="t_barm_s" x="169" rotation="0" width="236" height="24" y="16"/>
<body name="t_barm_s" x="-63" rotation="0" width="236" height="24" y="16"/>
<body name="t_bs_s" x="357" rotation="0" width="50" height="50" y="392"/>
<body name="t_bte_d" x="168" rotation="0" width="36" height="51" y="390"/>
<body name="t_mpg_d" x="473" rotation="0" width="61" height="16" y="322"/>
<body name="t_rolB2_d" x="120" rotation="0" width="36" height="45" y="402"/>
<body name="t_rolB5_d" x="370" rotation="0" width="36" height="47" y="63"/>
<body name="t_rolG1_d" x="657" rotation="0" width="48" height="43" y="165"/>
<body name="t_rolB1_d" x="464" rotation="0" width="37" height="38" y="400"/>
<body name="t_rolB5_d" x="508" rotation="0" width="36" height="47" y="404"/>
<body name="t_rolB4_d" x="552" rotation="0" width="40" height="38" y="402"/>
<body name="t_rolG3_d" x="308" rotation="0" width="43" height="38" y="400"/>
<body name="t_rolG2_d" x="471" rotation="0" width="39" height="38" y="299"/>
<body name="t_pushka" x="44" rotation="0" width="86" height="51" y="309"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="6" numberLevel="45" nameLevel="LEVEL 45">
<bodies>
<body name="t_bb_s" x="364" rotation="0" width="50" height="50" y="399"/>
<body name="t_bb_s" x="514" rotation="0" width="50" height="50" y="399"/>
<body name="t_bb_s" x="464" rotation="0" width="50" height="50" y="399"/>
<body name="t_bb_s" x="414" rotation="0" width="50" height="50" y="399"/>
<body name="t_bb_s" x="663" rotation="0" width="50" height="50" y="399"/>
<body name="t_bs_s" x="689" rotation="0" width="50" height="50" y="349"/>
<body name="t_bs_s" x="689" rotation="0" width="50" height="50" y="299"/>
<body name="t_bs_s" x="689" rotation="0" width="50" height="50" y="249"/>
<body name="t_bs_s" x="689" rotation="0" width="50" height="50" y="199"/>
<body name="t_bb_s" x="314" rotation="0" width="50" height="50" y="423"/>
<body name="t_bs_s" x="365" rotation="0" width="50" height="50" y="209"/>
<body name="t_bs_s" x="481" rotation="0" width="50" height="50" y="208"/>
<body name="t_bs_s" x="364" rotation="0" width="50" height="50" y="106"/>
<body name="t_bb_s" x="563" rotation="0" width="50" height="50" y="400"/>
<body name="t_bs_s" x="481" rotation="0" width="50" height="50" y="106"/>
<body name="t_bs_s" x="481" rotation="0" width="50" height="50" y="258"/>
<body name="t_barm_s" x="58" rotation="0" width="236" height="24" y="428"/>
<body name="t_3_s" x="497" rotation="0" width="57" height="50" y="314"/>
<body name="t_bs_s" x="481" rotation="0" width="50" height="50" y="308"/>
<body name="t_bs_s" x="365" rotation="0" width="50" height="50" y="259"/>
<body name="t_bs_s" x="365" rotation="0" width="50" height="50" y="309"/>
<body name="t_bb_s" x="214" rotation="0" width="50" height="50" y="414"/>
<body name="t_bb_s" x="164" rotation="0" width="50" height="50" y="422"/>
<body name="t_bb_s" x="264" rotation="0" width="50" height="50" y="414"/>
<body name="t_bs_s" x="315" rotation="0" width="50" height="50" y="309"/>
<body name="t_bs_s" x="265" rotation="0" width="50" height="50" y="309"/>
<body name="t_bb_s" x="613" rotation="0" width="50" height="50" y="400"/>
<body name="t_bs_s" x="689" rotation="0" width="50" height="50" y="49"/>
<body name="t_bs_s" x="689" rotation="0" width="50" height="50" y="99"/>
<body name="t_bs_s" x="689" rotation="0" width="50" height="50" y="149"/>
<body name="t_bs_s" x="716" rotation="0" width="50" height="50" y="-50"/>
<body name="t_bs_s" x="716" rotation="0" width="50" height="50" y="0"/>
<body name="t_bs_s" x="716" rotation="0" width="50" height="50" y="-100"/>
<body name="t_bk_d" x="600" rotation="-45" width="52" height="18" y="96"/>
<body name="t_bk_d" x="600" rotation="-45" width="52" height="18" y="96"/>
<body name="t_bk_d" x="606" rotation="45" width="152" height="17" y="147"/>
<body name="t_cw_d" x="478" rotation="0" width="55" height="55" y="54"/>
<body name="t_bk_d" x="632" rotation="45" width="52" height="18" y="89"/>
<body name="t_ck_d" x="367" rotation="0" width="55" height="55" y="53"/>
<body name="t_bk2_d" x="643" rotation="-42" width="52" height="10" y="50"/>
<body name="t_rolG1_d" x="383" rotation="0" width="48" height="43" y="362"/>
<body name="t_rolG2_d" x="457" rotation="0" width="39" height="38" y="170"/>
<body name="t_rolB4_d" x="539" rotation="0" width="40" height="38" y="362"/>
<body name="t_rolB5_d" x="652" rotation="0" width="36" height="47" y="362"/>
<body name="t_rolB3_d" x="582" rotation="0" width="39" height="40" y="360"/>
<body name="t_rolB1_d" x="577" rotation="0" width="37" height="38" y="86"/>
<body name="t_rolB2_d" x="320" rotation="0" width="36" height="45" y="268"/>
<body name="t_o_d" x="498" rotation="0" width="25" height="21" y="365"/>
<body name="t_o_d" x="621" rotation="0" width="25" height="21" y="365"/>
<body name="t_o_d" x="430" rotation="0" width="25" height="21" y="365"/>
<body name="t_o_d" x="464" rotation="0" width="25" height="21" y="365"/>
<body name="t_joint_fixed" x="584" rotation="0" width="15" height="15" y="113"/>
<body name="t_joint_fixed" x="610" rotation="0" width="15" height="15" y="83"/>
<body name="t_joint" x="588" rotation="0" width="10" height="10" y="117"/>
<body name="t_joint" x="620" rotation="0" width="10" height="10" y="89"/>
<body name="t_joint" x="623" rotation="0" width="10" height="10" y="70"/>
<body name="t_revolute" x="653" rotation="0" width="18" height="18" y="194"/>
<body name="t_revolute" x="659" rotation="0" width="10" height="10" y="36"/>
<body name="t_pushka" x="42" rotation="0" width="86" height="51" y="387"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="2" numberLevel="47" nameLevel="LEVEL 47">
<bodies>
<body name="t_barm_s" x="224" rotation="0" width="236" height="24" y="22"/>
<body name="t_barm_s" x="457" rotation="0" width="236" height="24" y="22"/>
<body name="t_bb_s" x="50" rotation="0" width="82" height="50" y="397"/>
<body name="t_bb_s" x="50" rotation="0" width="82" height="50" y="347"/>
<body name="t_barm_s" x="460" rotation="0" width="236" height="38" y="91"/>
<body name="t_barm_s" x="414" rotation="0" width="236" height="38" y="91"/>
<body name="t_barm_s" x="414" rotation="0" width="236" height="38" y="166"/>
<body name="t_barm_s" x="460" rotation="0" width="236" height="38" y="166"/>
<body name="t_barm_s" x="413" rotation="0" width="236" height="38" y="241"/>
<body name="t_barm_s" x="459" rotation="0" width="236" height="38" y="241"/>
<body name="t_bte_d" x="328" rotation="90" width="36" height="51" y="202"/>
<body name="t_bte_d" x="417" rotation="90" width="36" height="51" y="202"/>
<body name="t_bte_d" x="326" rotation="90" width="36" height="51" y="127"/>
<body name="t_bte_d" x="415" rotation="90" width="36" height="51" y="127"/>
<body name="t_bte_d" x="325" rotation="90" width="36" height="51" y="53"/>
<body name="t_bte_d" x="414" rotation="90" width="36" height="51" y="53"/>
<body name="t_cz_d" x="544" rotation="90" width="17" height="21" y="211"/>
<body name="t_cz_d" x="525" rotation="90" width="17" height="21" y="211"/>
<body name="t_cz_d" x="505" rotation="90" width="17" height="21" y="211"/>
<body name="t_cz_d" x="486" rotation="90" width="17" height="21" y="208"/>
<body name="t_cz_d" x="452" rotation="90" width="17" height="21" y="203"/>
<body name="t_cz_d" x="469" rotation="90" width="17" height="21" y="205"/>
<body name="t_cz_d" x="542" rotation="90" width="17" height="21" y="136"/>
<body name="t_cz_d" x="523" rotation="90" width="17" height="21" y="136"/>
<body name="t_cz_d" x="503" rotation="90" width="17" height="21" y="136"/>
<body name="t_cz_d" x="484" rotation="90" width="17" height="21" y="133"/>
<body name="t_cz_d" x="450" rotation="90" width="17" height="21" y="128"/>
<body name="t_cz_d" x="467" rotation="90" width="17" height="21" y="130"/>
<body name="t_cz_d" x="541" rotation="90" width="17" height="21" y="62"/>
<body name="t_cz_d" x="522" rotation="90" width="17" height="21" y="62"/>
<body name="t_cz_d" x="502" rotation="90" width="17" height="21" y="62"/>
<body name="t_cz_d" x="483" rotation="90" width="17" height="21" y="59"/>
<body name="t_cz_d" x="449" rotation="90" width="17" height="21" y="54"/>
<body name="t_cz_d" x="466" rotation="90" width="17" height="21" y="56"/>
<body name="t_rolG2_d" x="372" rotation="0" width="39" height="38" y="206"/>
<body name="t_rolG4_d" x="369" rotation="0" width="44" height="51" y="133"/>
<body name="t_rolG3_d" x="370" rotation="0" width="43" height="38" y="58"/>
<body name="t_rolB4_d" x="568" rotation="-90" width="40" height="38" y="206"/>
<body name="t_rolB1_d" x="566" rotation="-90" width="37" height="38" y="131"/>
<body name="t_rolB2_d" x="565" rotation="-90" width="36" height="45" y="56"/>
<body name="t_o_d" x="575" rotation="0" width="25" height="21" y="95"/>
<body name="t_joint" x="554" rotation="0" width="10" height="10" y="211"/>
<body name="t_joint" x="533" rotation="0" width="10" height="10" y="212"/>
<body name="t_joint" x="516" rotation="0" width="10" height="10" y="210"/>
<body name="t_joint" x="497" rotation="0" width="10" height="10" y="209"/>
<body name="t_joint" x="477" rotation="0" width="10" height="10" y="206"/>
<body name="t_joint" x="459" rotation="0" width="10" height="10" y="207"/>
<body name="t_joint" x="444" rotation="0" width="10" height="10" y="203"/>
<body name="t_joint" x="552" rotation="0" width="10" height="10" y="136"/>
<body name="t_joint" x="531" rotation="0" width="10" height="10" y="137"/>
<body name="t_joint" x="514" rotation="0" width="10" height="10" y="135"/>
<body name="t_joint" x="495" rotation="0" width="10" height="10" y="134"/>
<body name="t_joint" x="475" rotation="0" width="10" height="10" y="131"/>
<body name="t_joint" x="457" rotation="0" width="10" height="10" y="132"/>
<body name="t_joint" x="442" rotation="0" width="10" height="10" y="128"/>
<body name="t_joint" x="551" rotation="0" width="10" height="10" y="62"/>
<body name="t_joint" x="530" rotation="0" width="10" height="10" y="63"/>
<body name="t_joint" x="513" rotation="0" width="10" height="10" y="61"/>
<body name="t_joint" x="494" rotation="0" width="10" height="10" y="60"/>
<body name="t_joint" x="474" rotation="0" width="10" height="10" y="57"/>
<body name="t_joint" x="456" rotation="0" width="10" height="10" y="58"/>
<body name="t_joint" x="441" rotation="0" width="10" height="10" y="54"/>
<body name="t_joint_fixed" x="571" rotation="0" width="15" height="15" y="97"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="293"/>
<body name="t_fire1_s" x="640" rotation="0" width="180" height="150" y="336"/>
<body name="t_fire1_s" x="534" rotation="0" width="180" height="150" y="372"/>
<body name="t_fire1_s" x="458" rotation="0" width="180" height="150" y="375"/>
<body name="t_fire1_s" x="494" rotation="0" width="180" height="150" y="352"/>
<body name="t_fire1_s" x="585" rotation="0" width="180" height="150" y="349"/>
<body name="t_fire1_s" x="560" rotation="0" width="180" height="150" y="332"/>
<body name="t_fire1_s" x="706" rotation="0" width="180" height="150" y="333"/>
<body name="t_fire1_s" x="710" rotation="0" width="180" height="150" y="381"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" nameLevel="LEVEL 48" fon="6" numberLevel="48">
<bodies>
<body name="t_bb_s" width="50" rotation="0" height="50" x="730" y="339"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="674" y="399"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="675" y="323"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="675" y="372"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="675" y="273"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="675" y="224"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="178" y="399"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="428" y="399"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="328" y="399"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="278" y="399"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="228" y="399"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="378" y="399"/>
<body name="t_barm_s" width="236" rotation="0" height="24" x="46" y="410"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="529" y="351"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="429" y="349"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="379" y="349"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="479" y="349"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="229" y="349"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="179" y="349"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="279" y="349"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="329" y="349"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="528" y="400"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="478" y="399"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="626" y="401"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="576" y="400"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="205" y="298"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="223" y="247"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="385" y="298"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="313" y="298"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="331" y="247"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="367" y="247"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="259" y="247"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="241" y="196"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="277" y="196"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="313" y="196"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="349" y="196"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="259" y="145"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="331" y="145"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="317" y="95"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="281" y="95"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="299" y="44"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="277" y="298"/>
<body name="t_rolB2_d" width="36" rotation="0" height="45" x="296" y="153"/>
<body name="t_rolB3_d" width="39" rotation="0" height="40" x="241" y="308"/>
<body name="t_rolB4_d" width="40" rotation="0" height="38" x="299" y="255"/>
<body name="t_rolB3_d" width="39" rotation="0" height="40" x="352" y="310"/>
<body name="t_rolG1_d" width="48" rotation="0" height="43" x="539" y="311"/>
<body name="t_pushka" width="86" rotation="0" height="51" x="45" y="367"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="8" nickLevel="Johnny-K" fon="4" nameLevel="LEVEL 8">
<bodies>
<body name="t_bs_s" x="445" rotation="0" width="50" height="50" y="394"/>
<body name="t_bb_s" x="34" rotation="0" width="85" height="50" y="421"/>
<body name="t_bb_s" x="119" rotation="0" width="85" height="50" y="421"/>
<body name="t_bs_s" x="346" rotation="0" width="50" height="50" y="399"/>
<body name="t_bs_s" x="395" rotation="0" width="50" height="50" y="393"/>
<body name="t_bs_s" x="493" rotation="0" width="50" height="50" y="394"/>
<body name="t_barm_s" x="262" rotation="0" width="116" height="19" y="321"/>
<body name="t_barm_s" x="261" rotation="0" width="116" height="19" y="245"/>
<body name="t_bs_s" x="389" rotation="0" width="50" height="50" y="343"/>
<body name="t_barm_s" x="278" rotation="-16" width="236" height="21" y="394"/>
<body name="t_bs_s" x="641" rotation="0" width="85" height="50" y="403"/>
<body name="t_bs_s" x="592" rotation="0" width="50" height="50" y="399"/>
<body name="t_bs_s" x="543" rotation="0" width="50" height="50" y="396"/>
<body name="t_bs_s" x="656" rotation="0" width="50" height="50" y="305"/>
<body name="t_bs_s" x="543" rotation="0" width="50" height="50" y="346"/>
<body name="t_bs_s" x="656" rotation="0" width="50" height="50" y="355"/>
<body name="t_bs_s" x="588" rotation="0" width="50" height="50" y="350"/>
<body name="t_bs_s" x="623" rotation="0" width="50" height="60" y="349"/>
<body name="t_barm_s" x="634" rotation="-10" width="236" height="21" y="310"/>
<body name="t_barm_s" x="703" rotation="43" width="116" height="19" y="248"/>
<body name="t_bs_s" x="656" rotation="0" width="50" height="50" y="206"/>
<body name="t_bs_s" x="656" rotation="0" width="50" height="50" y="256"/>
<body name="t_barm_s" x="680" rotation="90" width="236" height="24" y="22"/>
<body name="t_bs_s" x="656" rotation="0" width="50" height="50" y="158"/>
<body name="t_ck_d" x="226" rotation="0" width="57" height="57" y="283"/>
<body name="t_bte_d" x="570" rotation="-9" width="61" height="86" y="265"/>
<body name="t_rolG3_d" x="246" rotation="0" width="43" height="38" y="219"/>
<body name="t_rolB2_d" x="303" rotation="0" width="36" height="45" y="297"/>
<body name="t_rolG2_d" x="377" rotation="0" width="39" height="38" y="303"/>
<body name="t_rolG1_d" x="650" rotation="0" width="48" height="43" y="118"/>
<body name="t_pushka" x="48" rotation="0" width="86" height="51" y="366"/>
<body name="t_fire1_s" x="470" rotation="0" width="210" height="108" y="340"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa fon="2" nickLevel="Johnny-K" numberLevel="33" nameLevel="LEVEL 33">
<bodies>
<body name="t_barm_s" width="236" rotation="0" height="24" x="567" y="309"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="674" y="346"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="574" y="346"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="624" y="346"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="474" y="346"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="524" y="346"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="674" y="396"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="624" y="396"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="474" y="396"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="524" y="396"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="424" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="374" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="274" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="324" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="224" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="124" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="174" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="24" y="397"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="74" y="397"/>
<body name="t_b2_s" width="71" rotation="0" height="19" x="69" y="362"/>
<body name="t_barm_s" width="236" rotation="90" height="24" x="21" y="255"/>
<body name="t_barm_s" width="236" rotation="90" height="24" x="21" y="21"/>
<body name="t_barm_s" width="236" rotation="90" height="24" x="672" y="129"/>
<body name="t_bb_s" width="50" rotation="0" height="50" x="574" y="396"/>
<body name="t_bk2_d" width="52" rotation="-20" height="21" x="190" y="-48"/>
<body name="t_bk2_d" width="52" rotation="20" height="21" x="190" y="111"/>
<body name="t_bk2_d" width="163" rotation="90" height="21" x="173" y="32"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="675" y="272"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="639" y="272"/>
<body name="t_bte_d" width="36" rotation="0" height="51" x="640" y="221"/>
<body name="t_bk2_d" width="211" rotation="0" height="49" x="286" y="30"/>
<body name="t_rolB2_d" width="36" rotation="0" height="45" x="641" y="176"/>
<body name="t_rolB1_d" width="37" rotation="0" height="38" x="458" y="284"/>
<body name="t_rolG1_d" width="48" rotation="90" height="43" x="264" y="1"/>
<body name="t_rolG3_d" width="43" rotation="90" height="38" x="234" y="-6"/>
<body name="t_rolB5_d" width="36" rotation="90" height="47" x="200" y="71"/>
<body name="t_rolB3_d" width="39" rotation="90" height="40" x="235" y="71"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="181" y="-45"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="182" y="29"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="171" y="111"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="180" y="111"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="185" y="110"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="178" y="110"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="173" y="110"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="180" y="27"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="185" y="30"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="188" y="32"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="168" y="-50"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="171" y="-48"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="177" y="-45"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="180" y="-40"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="185" y="-33"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="170" y="108"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="183" y="18"/>
<body name="t_joint_fixed" width="15" rotation="0" height="15" x="183" y="9"/>
<body name="t_revolute" width="20" rotation="0" height="20" x="378" y="30"/>
<body name="t_pushka" width="86" rotation="0" height="51" x="69" y="325"/>
<body name="t_fire1_s" width="247" rotation="0" height="150" x="567" y="249"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="34" nickLevel="Johnny-K" nameLevel="LEVEL 34" fon="4">
<bodies>
<body name="t_barm_s" x="326" rotation="0" width="236" height="24" y="274"/>
<body name="t_barm_s" x="625" rotation="-54" width="236" height="24" y="257"/>
<body name="t_barm_s" x="646" rotation="0" width="236" height="24" y="350"/>
<body name="t_barm_s" x="562" rotation="0" width="236" height="24" y="413"/>
<body name="t_barm_s" x="327" rotation="0" width="236" height="24" y="413"/>
<body name="t_3_s" x="228" rotation="0" width="41" height="30" y="251"/>
<body name="t_b2_s" x="270" rotation="90" width="60" height="10" y="232"/>
<body name="t_barm_s" x="327" rotation="0" width="238" height="30" y="187"/>
<body name="t_barm_s" x="326" rotation="0" width="238" height="30" y="95"/>
<body name="t_b2_s" x="494" rotation="0" width="108" height="19" y="217"/>
<body name="t_b2_s" x="534" rotation="0" width="108" height="19" y="199"/>
<body name="t_barm_s" x="325" rotation="0" width="236" height="24" y="349"/>
<body name="t_bk_d" x="487" rotation="0" width="82" height="28" y="353"/>
<body name="t_bte_d" x="526" rotation="90" width="37" height="60" y="382"/>
<body name="t_b_d" x="245" rotation="0" width="78" height="62" y="142"/>
<body name="t_cw_d" x="306" rotation="0" width="55" height="55" y="235"/>
<body name="t_bte_d" x="223" rotation="0" width="38" height="51" y="312"/>
<body name="t_bte_d" x="262" rotation="0" width="38" height="51" y="312"/>
<body name="t_rolB3_d" x="542" rotation="0" width="39" height="40" y="323"/>
<body name="t_rolG2_d" x="318" rotation="0" width="39" height="38" y="324"/>
<body name="t_rolB2_d" x="303" rotation="0" width="36" height="45" y="159"/>
<body name="t_rolG2_d" x="427" rotation="0" width="39" height="38" y="159"/>
<body name="t_rolB3_d" x="419" rotation="0" width="39" height="40" y="247"/>
<body name="t_pushka" x="42" rotation="0" width="86" height="51" y="390"/>
<body name="t_fire1_s" x="481" rotation="0" width="177" height="139" y="360"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 44" fon="1" numberLevel="44" nickLevel="Johnny-K">
<bodies>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="351"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="401"/>
<body name="t_bs_s" x="607" rotation="0" width="50" height="50" y="351"/>
<body name="t_bs_s" x="607" rotation="0" width="50" height="50" y="401"/>
<body name="t_bs_s" x="557" rotation="0" width="50" height="50" y="401"/>
<body name="t_bs_s" x="557" rotation="0" width="50" height="50" y="351"/>
<body name="t_bs_s" x="507" rotation="0" width="50" height="50" y="351"/>
<body name="t_bs_s" x="507" rotation="0" width="50" height="50" y="401"/>
<body name="t_b2_s" x="360" rotation="90" width="78" height="19" y="386"/>
<body name="t_b2_s" x="473" rotation="90" width="78" height="19" y="386"/>
<body name="t_bs_s" x="393" rotation="0" width="47" height="50" y="433"/>
<body name="t_bs_s" x="326" rotation="0" width="50" height="50" y="403"/>
<body name="t_bs_s" x="326" rotation="0" width="50" height="50" y="354"/>
<body name="t_bs_s" x="276" rotation="0" width="50" height="50" y="354"/>
<body name="t_bs_s" x="276" rotation="0" width="50" height="50" y="403"/>
<body name="t_bs_s" x="226" rotation="0" width="50" height="50" y="355"/>
<body name="t_bs_s" x="226" rotation="0" width="50" height="50" y="404"/>
<body name="t_barm_s" x="158" rotation="0" width="136" height="24" y="75"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="302"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="252"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="202"/>
<body name="t_bs_s" x="657" rotation="0" width="50" height="50" y="152"/>
<body name="t_bs_s" x="440" rotation="0" width="47" height="50" y="435"/>
<body name="t_cw_d" x="458" rotation="-1" width="39" height="39" y="33"/>
<body name="t_cw_d" x="407" rotation="-1" width="39" height="39" y="33"/>
<body name="t_cw_d" x="354" rotation="-1" width="39" height="39" y="32"/>
<body name="t_bk_d" x="306" rotation="0" width="129" height="15" y="322"/>
<body name="t_ck_d" x="94" rotation="0" width="43" height="43" y="41"/>
<body name="t_bte_d" x="573" rotation="0" width="36" height="51" y="301"/>
<body name="t_cz_d" x="457" rotation="0" width="17" height="21" y="110"/>
<body name="t_cz_d" x="457" rotation="0" width="17" height="21" y="75"/>
<body name="t_cz_d" x="457" rotation="0" width="17" height="21" y="93"/>
<body name="t_cz_d" x="457" rotation="0" width="17" height="21" y="58"/>
<body name="t_cz_d" x="406" rotation="0" width="17" height="21" y="110"/>
<body name="t_cz_d" x="406" rotation="0" width="17" height="21" y="75"/>
<body name="t_cz_d" x="406" rotation="0" width="17" height="21" y="93"/>
<body name="t_cz_d" x="406" rotation="0" width="17" height="21" y="58"/>
<body name="t_cz_d" x="353" rotation="0" width="17" height="21" y="109"/>
<body name="t_cz_d" x="353" rotation="0" width="17" height="21" y="74"/>
<body name="t_cz_d" x="353" rotation="0" width="17" height="21" y="92"/>
<body name="t_cz_d" x="353" rotation="0" width="17" height="21" y="57"/>
<body name="t_rolB4_d" x="459" rotation="0" width="40" height="38" y="134"/>
<body name="t_rolB3_d" x="407" rotation="0" width="39" height="40" y="132"/>
<body name="t_rolB1_d" x="353" rotation="0" width="37" height="38" y="134"/>
<body name="t_rolG1_d" x="301" rotation="0" width="48" height="43" y="301"/>
<body name="t_rolB5_d" x="410" rotation="0" width="36" height="47" y="395"/>
<body name="t_rolB1_d" x="614" rotation="0" width="37" height="38" y="312"/>
<body name="t_rolG2_d" x="495" rotation="0" width="39" height="38" y="313"/>
<body name="t_rolG3_d" x="532" rotation="0" width="43" height="38" y="312"/>
<body name="t_joint" x="456" rotation="-2" width="11" height="11" y="53"/>
<body name="t_joint" x="458" rotation="-2" width="11" height="11" y="71"/>
<body name="t_joint" x="458" rotation="-2" width="11" height="11" y="88"/>
<body name="t_joint" x="458" rotation="-2" width="11" height="11" y="105"/>
<body name="t_joint" x="458" rotation="0" width="17" height="17" y="125"/>
<body name="t_joint" x="405" rotation="-2" width="11" height="11" y="53"/>
<body name="t_joint" x="407" rotation="-2" width="11" height="11" y="71"/>
<body name="t_joint" x="407" rotation="-2" width="11" height="11" y="88"/>
<body name="t_joint" x="407" rotation="-2" width="11" height="11" y="105"/>
<body name="t_joint" x="407" rotation="0" width="17" height="17" y="125"/>
<body name="t_joint" x="352" rotation="-2" width="11" height="11" y="52"/>
<body name="t_joint" x="354" rotation="-2" width="11" height="11" y="70"/>
<body name="t_joint" x="354" rotation="-2" width="11" height="11" y="87"/>
<body name="t_joint" x="354" rotation="-2" width="11" height="11" y="104"/>
<body name="t_joint" x="354" rotation="0" width="17" height="17" y="124"/>
<body name="t_revolute" x="458" rotation="0" width="19" height="19" y="35"/>
<body name="t_revolute" x="407" rotation="0" width="19" height="19" y="35"/>
<body name="t_revolute" x="354" rotation="0" width="19" height="19" y="34"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="390"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 35" fon="6" numberLevel="35" nickLevel="Johnny-K">
<bodies>
<body name="t_barm_s" width="236" rotation="0" height="24" x="584" y="412"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="446" y="279"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="408" y="279"/>
<body name="t_3_s" width="57" rotation="0" height="50" x="343" y="143"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="539" y="137"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="58" y="137"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="489" y="137"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="108" y="137"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="428" y="329"/>
<body name="t_barm_s" width="236" rotation="0" height="24" x="587" y="366"/>
<body name="t_barm_s" width="236" rotation="0" height="24" x="587" y="389"/>
<body name="t_barm_s" width="236" rotation="0" height="24" x="354" y="389"/>
<body name="t_b2_s" width="157" rotation="90" height="19" x="573" y="84"/>
<body name="t_b2_s" width="157" rotation="90" height="19" x="24" y="84"/>
<body name="t_bs_s" width="50" rotation="0" height="50" x="349" y="137"/>
<body name="t_barm_s" width="236" rotation="0" height="24" x="353" y="412"/>
<body name="t_b2_s" width="157" rotation="90" height="19" x="268" y="5"/>
<body name="t_b2_s" width="157" rotation="90" height="19" x="248" y="5"/>
<body name="t_b2_s" width="157" rotation="90" height="19" x="228" y="6"/>
<body name="t_bs_s" width="70" rotation="0" height="50" x="238" y="137"/>
<body name="t_bs_s" width="70" rotation="0" height="50" x="238" y="187"/>
<body name="t_barm_s" width="236" rotation="0" height="24" x="98" y="426"/>
<body name="t_barm_s" width="236" rotation="0" height="24" x="355" y="366"/>
<body name="t_bs_s" width="50" rotation="0" height="67" x="219" y="388"/>
<body name="t_b2_s" width="51" rotation="0" height="19" x="664" y="325"/>
<body name="t_b2_s" width="51" rotation="0" height="19" x="665" y="345"/>
<body name="t_b2_s" width="51" rotation="0" height="19" x="664" y="305"/>
<body name="t_b2_s" width="51" rotation="0" height="19" x="664" y="285"/>
<body name="t_b2_s" width="51" rotation="0" height="19" x="664" y="266"/>
<body name="t_b2_s" width="51" rotation="0" height="19" x="664" y="246"/>
<body name="t_bk_d" width="117" rotation="0" height="10" x="409" y="107"/>
<body name="t_bk_d" width="117" rotation="0" height="10" x="178" y="107"/>
<body name="t_bte_d" width="42" rotation="0" height="51" x="242" y="329"/>
<body name="t_rolB3_d" width="39" rotation="0" height="40" x="351" y="87"/>
<body name="t_rolG3_d" width="43" rotation="0" height="38" x="380" y="336"/>
<body name="t_rolG1_d" width="48" rotation="0" height="43" x="345" y="339"/>
<body name="t_rolG4_d" width="44" rotation="0" height="51" x="543" y="98"/>
<body name="t_rolB2_d" width="36" rotation="0" height="45" x="473" y="337"/>
<body name="t_rolB3_d" width="39" rotation="0" height="40" x="517" y="337"/>
<body name="t_rolB4_d" width="40" rotation="0" height="38" x="565" y="339"/>
<body name="t_rolB1_d" width="37" rotation="0" height="38" x="613" y="340"/>
<body name="t_rolB3_d" width="39" rotation="0" height="40" x="250" y="98"/>
<body name="t_o_d" width="25" rotation="0" height="21" x="508" y="103"/>
<body name="t_pushka" width="86" rotation="0" height="51" x="47" y="386"/>
<body name="t_fire1_s" width="180" rotation="0" height="150" x="154" y="374"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 46" fon="1" numberLevel="46" nickLevel="Johnny-K">
<bodies>
<body name="t_barm_s" x="454" rotation="0" width="236" height="24" y="272"/>
<body name="t_barm_s" x="451" rotation="0" width="236" height="24" y="97"/>
<body name="t_barm_s" x="334" rotation="0" width="236" height="24" y="97"/>
<body name="t_b2_s" x="261" rotation="0" width="91" height="19" y="149"/>
<body name="t_barm_s" x="231" rotation="26" width="236" height="27" y="361"/>
<body name="t_b2_s" x="523" rotation="0" width="91" height="19" y="148"/>
<body name="t_barm_s" x="675" rotation="90" width="236" height="24" y="191"/>
<body name="t_barm_s" x="572" rotation="-26" width="236" height="27" y="357"/>
<body name="t_barm_s" x="675" rotation="90" width="236" height="24" y="-42"/>
<body name="t_barm_s" x="338" rotation="0" width="236" height="24" y="272"/>
<body name="t_barm_s" x="396" rotation="0" width="280" height="24" y="372"/>
<body name="t_barm_s" x="396" rotation="0" width="280" height="24" y="395"/>
<body name="t_barm_s" x="396" rotation="0" width="280" height="24" y="418"/>
<body name="t_bs_s" x="35" rotation="0" width="50" height="50" y="405"/>
<body name="t_bs_s" x="35" rotation="0" width="50" height="50" y="355"/>
<body name="t_cw_d" x="385" rotation="0" width="55" height="55" y="57"/>
<body name="t_bk_d" x="385" rotation="92" width="145" height="21" y="186"/>
<body name="t_cz_d" x="485" rotation="0" width="17" height="21" y="128"/>
<body name="t_cz_d" x="297" rotation="0" width="17" height="21" y="129"/>
<body name="t_cz_d" x="275" rotation="0" width="17" height="21" y="130"/>
<body name="t_cz_d" x="510" rotation="0" width="17" height="21" y="129"/>
<body name="t_cz_d" x="251" rotation="0" width="17" height="21" y="130"/>
<body name="t_cz_d" x="534" rotation="0" width="17" height="21" y="129"/>
<body name="t_rolG4_d" x="262" rotation="0" width="44" height="51" y="247"/>
<body name="t_rolG1_d" x="325" rotation="0" width="48" height="43" y="246"/>
<body name="t_rolB4_d" x="531" rotation="0" width="40" height="38" y="246"/>
<body name="t_rolB5_d" x="489" rotation="0" width="36" height="47" y="245"/>
<body name="t_o_d" x="299" rotation="0" width="25" height="21" y="352"/>
<body name="t_o_d" x="343" rotation="0" width="25" height="21" y="351"/>
<body name="t_o_d" x="433" rotation="0" width="25" height="21" y="351"/>
<body name="t_o_d" x="477" rotation="0" width="25" height="21" y="350"/>
<body name="t_o_d" x="386" rotation="0" width="25" height="21" y="351"/>
<body name="t_revolute" x="387" rotation="0" width="18" height="18" y="125"/>
<body name="t_pushka" x="40" rotation="0" width="86" height="51" y="301"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="22" nameLevel="LEVEL 22">
<bodies>
<body name="t_barm_s" x="672" rotation="90" width="236" height="24" y="113"/>
<body name="t_barm_s" x="672" rotation="90" width="236" height="24" y="347"/>
<body name="t_b2_s" x="627" rotation="0" width="68" height="19" y="373"/>
<body name="t_b2_s" x="585" rotation="90" width="40" height="19" y="362"/>
<body name="t_b2_s" x="419" rotation="90" width="40" height="19" y="66"/>
<body name="t_b2_s" x="376" rotation="0" width="68" height="19" y="76"/>
<body name="t_b2_s" x="334" rotation="90" width="40" height="19" y="66"/>
<body name="t_b2_s" x="394" rotation="90" width="51" height="19" y="394"/>
<body name="t_b2_s" x="533" rotation="90" width="51" height="19" y="394"/>
<body name="t_b2_s" x="463" rotation="0" width="125" height="19" y="410"/>
<body name="t_b2_s" x="43" rotation="0" width="68" height="19" y="412"/>
<body name="t_b2_s" x="42" rotation="0" width="68" height="19" y="306"/>
<body name="t_b2_s" x="42" rotation="0" width="68" height="19" y="189"/>
<body name="t_b2_s" x="323" rotation="0" width="68" height="19" y="217"/>
<body name="t_b2_s" x="224" rotation="90" width="40" height="19" y="375"/>
<body name="t_b2_s" x="266" rotation="0" width="68" height="19" y="385"/>
<body name="t_b2_s" x="309" rotation="90" width="40" height="19" y="375"/>
<body name="t_b2_s" x="366" rotation="90" width="40" height="19" y="207"/>
<body name="t_b2_s" x="281" rotation="90" width="40" height="19" y="207"/>
<body name="t_b2_s" x="585" rotation="90" width="40" height="19" y="227"/>
<body name="t_b2_s" x="627" rotation="0" width="68" height="19" y="237"/>
<body name="t_b2_s" x="626" rotation="0" width="68" height="19" y="119"/>
<body name="t_b2_s" x="583" rotation="90" width="40" height="19" y="109"/>
<body name="t_rolB3_d" x="627" rotation="0" width="39" height="40" y="349"/>
<body name="t_rolG4_d" x="380" rotation="0" width="44" height="51" y="52"/>
<body name="t_rolB2_d" x="434" rotation="0" width="36" height="45" y="387"/>
<body name="t_rolB2_d" x="495" rotation="0" width="36" height="45" y="388"/>
<body name="t_rolB2_d" x="323" rotation="0" width="36" height="45" y="192"/>
<body name="t_rolB2_d" x="267" rotation="0" width="36" height="45" y="363"/>
<body name="t_rolG1_d" x="627" rotation="0" width="48" height="43" y="96"/>
<body name="t_rolG2_d" x="624" rotation="0" width="39" height="38" y="213"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="376"/>
<body name="t_pushka" x="44" rotation="0" width="86" height="51" y="269"/>
<body name="t_pushka" x="41" rotation="0" width="86" height="51" y="150"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" numberLevel="36" nameLevel="LEVEL 36" fon="6">
<bodies>
<body name="t_bs_s" x="282" rotation="0" width="50" height="50" y="440"/>
<body name="t_bs_s" x="234" rotation="0" width="50" height="50" y="440"/>
<body name="t_bs_s" x="84" rotation="0" width="50" height="50" y="440"/>
<body name="t_bs_s" x="134" rotation="0" width="50" height="50" y="440"/>
<body name="t_barm_s" x="646" rotation="0" width="236" height="24" y="110"/>
<body name="t_barm_s" x="252" rotation="0" width="186" height="23" y="10"/>
<body name="t_b2_s" x="255" rotation="0" width="187" height="19" y="161"/>
<body name="t_b2_s" x="255" rotation="0" width="187" height="19" y="143"/>
<body name="t_b2_s" x="252" rotation="0" width="187" height="19" y="49"/>
<body name="t_b2_s" x="252" rotation="0" width="187" height="19" y="31"/>
<body name="t_barm_s" x="439" rotation="0" width="204" height="23" y="10"/>
<body name="t_bs_s" x="34" rotation="0" width="50" height="50" y="445"/>
<body name="t_bs_s" x="331" rotation="0" width="50" height="50" y="395"/>
<body name="t_bs_s" x="331" rotation="0" width="50" height="50" y="445"/>
<body name="t_bs_s" x="281" rotation="0" width="50" height="50" y="460"/>
<body name="t_bs_s" x="84" rotation="0" width="50" height="50" y="460"/>
<body name="t_bs_s" x="184" rotation="0" width="50" height="50" y="440"/>
<body name="t_bs_s" x="567" rotation="0" width="50" height="50" y="297"/>
<body name="t_bs_s" x="567" rotation="0" width="50" height="50" y="197"/>
<body name="t_bs_s" x="617" rotation="0" width="50" height="50" y="297"/>
<body name="t_bs_s" x="617" rotation="0" width="50" height="50" y="197"/>
<body name="t_bs_s" x="564" rotation="0" width="50" height="50" y="23"/>
<body name="t_bs_s" x="564" rotation="0" width="50" height="50" y="73"/>
<body name="t_bs_s" x="614" rotation="0" width="50" height="50" y="73"/>
<body name="t_bs_s" x="614" rotation="0" width="50" height="50" y="23"/>
<body name="t_barm_s" x="652" rotation="0" width="236" height="24" y="382"/>
<body name="t_bs_s" x="34" rotation="0" width="50" height="50" y="409"/>
<body name="t_barm_s" x="127" rotation="0" width="236" height="24" y="372"/>
<body name="t_barm_s" x="127" rotation="0" width="236" height="24" y="348"/>
<body name="t_bs_s" x="580" rotation="0" width="75" height="50" y="147"/>
<body name="t_bs_s" x="580" rotation="0" width="75" height="50" y="247"/>
<body name="t_bs_s" x="580" rotation="0" width="75" height="50" y="346"/>
<body name="t_mpv_d" x="449" rotation="0" width="185" height="16" y="211"/>
<body name="t_b_d" x="205" rotation="0" width="74" height="73" y="96"/>
<body name="t_bte_d" x="441" rotation="0" width="43" height="51" y="180"/>
<body name="t_rolB5_d" x="329" rotation="0" width="36" height="47" y="120"/>
<body name="t_rolB4_d" x="292" rotation="0" width="40" height="38" y="119"/>
<body name="t_rolB3_d" x="260" rotation="0" width="39" height="40" y="118"/>
<body name="t_rolG2_d" x="655" rotation="0" width="39" height="38" y="356"/>
<body name="t_rolG5_d" x="661" rotation="0" width="40" height="45" y="82"/>
<body name="t_rolB2_d" x="477" rotation="0" width="36" height="45" y="191"/>
<body name="t_rolG1_d" x="404" rotation="0" width="48" height="43" y="190"/>
<body name="t_pushka" x="41" rotation="0" width="86" height="51" y="308"/>
<body name="t_fire1_s" x="408" rotation="0" width="214" height="150" y="384"/>
<body name="t_fire1_s" x="508" rotation="0" width="214" height="150" y="384"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" numberLevel="15" nameLevel="LEVEL 15" fon="2">
<bodies>
<body name="t_barm_s" x="670" rotation="90" width="236" height="24" y="254"/>
<body name="t_barm_s" x="564" rotation="0" width="236" height="24" y="383"/>
<body name="t_bb_s" x="486" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="685" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="536" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="586" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="636" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="436" rotation="0" width="50" height="50" y="420"/>
<body name="t_barm_s" x="329" rotation="0" width="236" height="24" y="383"/>
<body name="t_bb_s" x="386" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="337" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="287" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="237" rotation="0" width="50" height="50" y="420"/>
<body name="t_bb_s" x="190" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="140" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="91" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="41" rotation="0" width="50" height="50" y="419"/>
<body name="t_bb_s" x="-9" rotation="0" width="50" height="50" y="419"/>
<body name="t_barm_s" x="96" rotation="0" width="236" height="24" y="383"/>
<body name="t_cw_d" x="585" rotation="0" width="29" height="29" y="29"/>
<body name="t_cw_d" x="600" rotation="0" width="29" height="29" y="6"/>
<body name="t_cw_d" x="603" rotation="0" width="29" height="29" y="-20"/>
<body name="t_cw_d" x="594" rotation="0" width="29" height="29" y="-45"/>
<body name="t_cw_d" x="574" rotation="0" width="29" height="29" y="-62"/>
<body name="t_cw_d" x="550" rotation="0" width="29" height="29" y="-72"/>
<body name="t_cw_d" x="562" rotation="0" width="29" height="29" y="44"/>
<body name="t_cw_d" x="534" rotation="0" width="29" height="29" y="49"/>
<body name="t_cw_d" x="507" rotation="0" width="29" height="29" y="42"/>
<body name="t_cw_d" x="487" rotation="0" width="29" height="29" y="21"/>
<body name="t_cw_d" x="480" rotation="0" width="29" height="29" y="-6"/>
<body name="t_cw_d" x="480" rotation="0" width="29" height="29" y="-34"/>
<body name="t_cw_d" x="523" rotation="0" width="29" height="29" y="-69"/>
<body name="t_cw_d" x="499" rotation="0" width="29" height="29" y="-55"/>
<body name="t_cw_d" x="530" rotation="0" width="29" height="29" y="-99"/>
<body name="t_cw_d" x="558" rotation="0" width="29" height="29" y="-97"/>
<body name="t_cw_d" x="622" rotation="0" width="29" height="29" y="-50"/>
<body name="t_cw_d" x="605" rotation="0" width="29" height="29" y="-71"/>
<body name="t_cw_d" x="584" rotation="0" width="29" height="29" y="-89"/>
<body name="t_cw_d" x="504" rotation="0" width="29" height="29" y="-90"/>
<body name="t_cw_d" x="481" rotation="0" width="29" height="29" y="-76"/>
<body name="t_cw_d" x="461" rotation="0" width="29" height="29" y="-56"/>
<body name="t_cw_d" x="452" rotation="0" width="29" height="29" y="-29"/>
<body name="t_cw_d" x="628" rotation="0" width="29" height="29" y="-23"/>
<body name="t_cw_d" x="628" rotation="0" width="29" height="29" y="6"/>
<body name="t_cw_d" x="618" rotation="0" width="29" height="29" y="33"/>
<body name="t_cw_d" x="598" rotation="0" width="29" height="29" y="54"/>
<body name="t_cw_d" x="548" rotation="0" width="29" height="29" y="75"/>
<body name="t_cw_d" x="574" rotation="0" width="29" height="29" y="71"/>
<body name="t_cw_d" x="453" rotation="0" width="29" height="29" y="-1"/>
<body name="t_cw_d" x="459" rotation="0" width="29" height="29" y="26"/>
<body name="t_cw_d" x="476" rotation="0" width="29" height="29" y="49"/>
<body name="t_cw_d" x="494" rotation="0" width="29" height="29" y="67"/>
<body name="t_cw_d" x="520" rotation="0" width="29" height="29" y="74"/>
<body name="t_rolB5_d" x="538" rotation="0" width="36" height="47" y="-18"/>
<body name="t_rolB4_d" x="524" rotation="0" width="40" height="38" y="-7"/>
<body name="t_rolB2_d" x="553" rotation="0" width="36" height="45" y="-12"/>
<body name="t_rolB3_d" x="541" rotation="0" width="39" height="40" y="13"/>
<body name="t_rolB3_d" x="640" rotation="0" width="39" height="40" y="352"/>
<body name="t_joint_fixed" x="499" rotation="0" width="10" height="10" y="30"/>
<body name="t_joint_fixed" x="482" rotation="0" width="10" height="10" y="7"/>
<body name="t_joint_fixed" x="520" rotation="0" width="10" height="10" y="46"/>
<body name="t_joint_fixed" x="549" rotation="0" width="10" height="10" y="46"/>
<body name="t_joint_fixed" x="572" rotation="0" width="10" height="10" y="34"/>
<body name="t_joint_fixed" x="595" rotation="0" width="10" height="10" y="18"/>
<body name="t_joint_fixed" x="603" rotation="0" width="10" height="10" y="-6"/>
<body name="t_joint_fixed" x="596" rotation="0" width="10" height="10" y="-33"/>
<body name="t_joint_fixed" x="583" rotation="0" width="10" height="10" y="-53"/>
<body name="t_joint_fixed" x="563" rotation="0" width="10" height="10" y="-66"/>
<body name="t_joint_fixed" x="536" rotation="0" width="10" height="10" y="-71"/>
<body name="t_joint_fixed" x="513" rotation="0" width="10" height="10" y="-60"/>
<body name="t_joint_fixed" x="488" rotation="0" width="10" height="10" y="-47"/>
<body name="t_joint_fixed" x="479" rotation="0" width="10" height="10" y="-20"/>
<body name="t_joint_fixed" x="608" rotation="0" width="10" height="10" y="42"/>
<body name="t_joint_fixed" x="449" rotation="0" width="10" height="10" y="-16"/>
<body name="t_joint_fixed" x="454" rotation="0" width="10" height="10" y="15"/>
<body name="t_joint_fixed" x="465" rotation="0" width="10" height="10" y="41"/>
<body name="t_joint_fixed" x="483" rotation="0" width="10" height="10" y="62"/>
<body name="t_joint_fixed" x="507" rotation="0" width="10" height="10" y="74"/>
<body name="t_joint_fixed" x="533" rotation="0" width="10" height="10" y="76"/>
<body name="t_joint_fixed" x="589" rotation="0" width="10" height="10" y="65"/>
<body name="t_joint_fixed" x="562" rotation="0" width="10" height="10" y="74"/>
<body name="t_joint_fixed" x="625" rotation="0" width="10" height="10" y="21"/>
<body name="t_joint_fixed" x="632" rotation="0" width="10" height="10" y="-8"/>
<body name="t_joint_fixed" x="628" rotation="0" width="10" height="10" y="-38"/>
<body name="t_joint_fixed" x="616" rotation="0" width="10" height="10" y="-63"/>
<body name="t_joint_fixed" x="595" rotation="0" width="10" height="10" y="-79"/>
<body name="t_joint_fixed" x="571" rotation="0" width="10" height="10" y="-91"/>
<body name="t_joint_fixed" x="543" rotation="0" width="10" height="10" y="-98"/>
<body name="t_joint_fixed" x="516" rotation="0" width="10" height="10" y="-93"/>
<body name="t_joint_fixed" x="493" rotation="0" width="10" height="10" y="-82"/>
<body name="t_joint_fixed" x="470" rotation="0" width="10" height="10" y="-65"/>
<body name="t_joint_fixed" x="454" rotation="0" width="10" height="10" y="-43"/>
<body name="t_pushka" x="50" rotation="0" width="86" height="51" y="343"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="23" nickLevel="Johnny-K" fon="6" nameLevel="LEVEL 23">
<bodies>
<body name="t_b2_s" x="365" rotation="0" width="190" height="19" y="18"/>
<body name="t_barm_s" x="358" rotation="0" width="236" height="24" y="407"/>
<body name="t_barm_s" x="592" rotation="0" width="236" height="24" y="407"/>
<body name="t_b2_s" x="179" rotation="0" width="190" height="19" y="18"/>
<body name="t_b2_s" x="-8" rotation="0" width="190" height="19" y="18"/>
<body name="t_b2_s" x="17" rotation="90" width="190" height="19" y="120"/>
<body name="t_b2_s" x="17" rotation="90" width="190" height="19" y="306"/>
<body name="t_b2_s" x="580" rotation="0" width="190" height="19" y="115"/>
<body name="t_b2_s" x="674" rotation="90" width="194" height="19" y="100"/>
<body name="t_b2_s" x="582" rotation="0" width="190" height="19" y="368"/>
<body name="t_b2_s" x="674" rotation="90" width="194" height="19" y="290"/>
<body name="t_barm_s" x="-24" rotation="0" width="236" height="24" y="410"/>
<body name="t_b2_s" x="235" rotation="0" width="68" height="19" y="75"/>
<body name="t_ck_d" x="311" rotation="0" width="31" height="31" y="125"/>
<body name="t_ck_d" x="334" rotation="0" width="31" height="31" y="105"/>
<body name="t_ck_d" x="414" rotation="0" width="31" height="31" y="126"/>
<body name="t_ck_d" x="303" rotation="0" width="31" height="31" y="155"/>
<body name="t_ck_d" x="423" rotation="0" width="31" height="31" y="155"/>
<body name="t_ck_d" x="392" rotation="0" width="31" height="31" y="106"/>
<body name="t_ck_d" x="310" rotation="0" width="31" height="31" y="287"/>
<body name="t_ck_d" x="333" rotation="0" width="31" height="31" y="267"/>
<body name="t_ck_d" x="413" rotation="0" width="31" height="31" y="288"/>
<body name="t_ck_d" x="302" rotation="0" width="31" height="31" y="317"/>
<body name="t_ck_d" x="422" rotation="0" width="31" height="31" y="317"/>
<body name="t_ck_d" x="391" rotation="0" width="31" height="31" y="268"/>
<body name="t_bk_d" x="366" rotation="0" width="190" height="19" y="181"/>
<body name="t_bk_d" x="364" rotation="0" width="190" height="19" y="343"/>
<body name="t_ck_d" x="530" rotation="0" width="31" height="31" y="59"/>
<body name="t_ck_d" x="633" rotation="0" width="31" height="31" y="60"/>
<body name="t_ck_d" x="522" rotation="0" width="31" height="31" y="89"/>
<body name="t_ck_d" x="642" rotation="0" width="31" height="31" y="89"/>
<body name="t_ck_d" x="530" rotation="0" width="31" height="31" y="313"/>
<body name="t_ck_d" x="633" rotation="0" width="31" height="31" y="314"/>
<body name="t_ck_d" x="522" rotation="0" width="31" height="31" y="343"/>
<body name="t_ck_d" x="642" rotation="0" width="31" height="31" y="343"/>
<body name="t_bte_d" x="582" rotation="0" width="36" height="51" y="272"/>
<body name="t_ck_d" x="612" rotation="0" width="31" height="31" y="292"/>
<body name="t_ck_d" x="551" rotation="0" width="31" height="31" y="290"/>
<body name="t_ck_d" x="550" rotation="0" width="31" height="31" y="36"/>
<body name="t_ck_d" x="614" rotation="0" width="31" height="31" y="38"/>
<body name="t_bte_d" x="582" rotation="0" width="36" height="51" y="20"/>
<body name="t_bt_d" x="361" rotation="90" width="51" height="36" y="252"/>
<body name="t_bt_d" x="363" rotation="90" width="51" height="36" y="89"/>
<body name="t_bk2_d" x="279" rotation="90" width="37" height="15" y="43"/>
<body name="t_bk2_d" x="452" rotation="90" width="37" height="15" y="45"/>
<body name="t_bk2_d" x="278" rotation="90" width="37" height="15" y="153"/>
<body name="t_bk2_d" x="453" rotation="90" width="37" height="15" y="153"/>
<body name="t_bk2_d" x="279" rotation="90" width="37" height="15" y="207"/>
<body name="t_bk2_d" x="277" rotation="90" width="37" height="15" y="315"/>
<body name="t_bk2_d" x="450" rotation="90" width="37" height="15" y="315"/>
<body name="t_bk2_d" x="452" rotation="90" width="37" height="15" y="207"/>
<body name="t_cz_d" x="278" rotation="0" width="17" height="21" y="233"/>
<body name="t_cz_d" x="278" rotation="0" width="17" height="21" y="252"/>
<body name="t_cz_d" x="453" rotation="0" width="17" height="21" y="126"/>
<body name="t_cz_d" x="454" rotation="0" width="17" height="21" y="90"/>
<body name="t_cz_d" x="452" rotation="0" width="17" height="21" y="107"/>
<body name="t_cz_d" x="278" rotation="0" width="17" height="21" y="125"/>
<body name="t_cz_d" x="279" rotation="0" width="17" height="21" y="70"/>
<body name="t_cz_d" x="279" rotation="0" width="17" height="21" y="89"/>
<body name="t_cz_d" x="277" rotation="0" width="17" height="21" y="106"/>
<body name="t_cz_d" x="453" rotation="0" width="17" height="21" y="71"/>
<body name="t_cz_d" x="277" rotation="0" width="17" height="21" y="269"/>
<body name="t_cz_d" x="277" rotation="0" width="17" height="21" y="287"/>
<body name="t_cz_d" x="451" rotation="0" width="17" height="21" y="233"/>
<body name="t_cz_d" x="452" rotation="0" width="17" height="21" y="252"/>
<body name="t_cz_d" x="451" rotation="0" width="17" height="21" y="269"/>
<body name="t_cz_d" x="451" rotation="0" width="17" height="21" y="286"/>
<body name="t_rolB3_d" x="361" rotation="0" width="39" height="40" y="152"/>
<body name="t_rolB3_d" x="360" rotation="0" width="39" height="40" y="314"/>
<body name="t_rolB3_d" x="580" rotation="0" width="39" height="40" y="86"/>
<body name="t_rolB3_d" x="580" rotation="0" width="39" height="40" y="340"/>
<body name="t_joint_fixed" x="309" rotation="0" width="11" height="11" y="141"/>
<body name="t_joint_fixed" x="322" rotation="0" width="11" height="11" y="111"/>
<body name="t_joint_fixed" x="351" rotation="0" width="11" height="11" y="99"/>
<body name="t_joint_fixed" x="378" rotation="0" width="11" height="11" y="99"/>
<body name="t_joint_fixed" x="400" rotation="0" width="11" height="11" y="115"/>
<body name="t_joint_fixed" x="421" rotation="0" width="11" height="11" y="138"/>
<body name="t_joint_fixed" x="300" rotation="0" width="11" height="11" y="173"/>
<body name="t_joint_fixed" x="426" rotation="0" width="11" height="11" y="171"/>
<body name="t_joint_fixed" x="308" rotation="0" width="11" height="11" y="303"/>
<body name="t_joint_fixed" x="321" rotation="0" width="11" height="11" y="273"/>
<body name="t_joint_fixed" x="350" rotation="0" width="11" height="11" y="261"/>
<body name="t_joint_fixed" x="377" rotation="0" width="11" height="11" y="261"/>
<body name="t_joint_fixed" x="399" rotation="0" width="11" height="11" y="277"/>
<body name="t_joint_fixed" x="420" rotation="0" width="11" height="11" y="300"/>
<body name="t_joint_fixed" x="299" rotation="0" width="11" height="11" y="335"/>
<body name="t_joint_fixed" x="425" rotation="0" width="11" height="11" y="333"/>
<body name="t_joint" x="280" rotation="0" width="10" height="10" y="191"/>
<body name="t_joint" x="278" rotation="0" width="10" height="10" y="278"/>
<body name="t_joint" x="452" rotation="0" width="10" height="10" y="278"/>
<body name="t_joint" x="453" rotation="0" width="10" height="10" y="332"/>
<body name="t_joint" x="452" rotation="0" width="10" height="10" y="261"/>
<body name="t_joint" x="451" rotation="0" width="10" height="10" y="171"/>
<body name="t_joint" x="452" rotation="0" width="10" height="10" y="117"/>
<body name="t_joint" x="454" rotation="0" width="10" height="10" y="99"/>
<body name="t_joint" x="456" rotation="0" width="10" height="10" y="82"/>
<body name="t_joint" x="453" rotation="0" width="10" height="10" y="62"/>
<body name="t_joint" x="276" rotation="0" width="10" height="10" y="170"/>
<body name="t_joint" x="277" rotation="0" width="10" height="10" y="116"/>
<body name="t_joint" x="279" rotation="0" width="10" height="10" y="98"/>
<body name="t_joint" x="281" rotation="0" width="10" height="10" y="81"/>
<body name="t_joint" x="278" rotation="0" width="10" height="10" y="61"/>
<body name="t_joint_fixed" x="528" rotation="0" width="11" height="11" y="75"/>
<body name="t_joint_fixed" x="541" rotation="0" width="11" height="11" y="45"/>
<body name="t_joint_fixed" x="619" rotation="0" width="11" height="11" y="49"/>
<body name="t_joint_fixed" x="640" rotation="0" width="11" height="11" y="72"/>
<body name="t_joint_fixed" x="519" rotation="0" width="11" height="11" y="107"/>
<body name="t_joint_fixed" x="645" rotation="0" width="11" height="11" y="105"/>
<body name="t_joint_fixed" x="528" rotation="0" width="11" height="11" y="329"/>
<body name="t_joint_fixed" x="541" rotation="0" width="11" height="11" y="299"/>
<body name="t_joint_fixed" x="597" rotation="0" width="11" height="11" y="287"/>
<body name="t_joint_fixed" x="640" rotation="0" width="11" height="11" y="326"/>
<body name="t_joint_fixed" x="519" rotation="0" width="11" height="11" y="361"/>
<body name="t_joint_fixed" x="645" rotation="0" width="11" height="11" y="359"/>
<body name="t_joint_fixed" x="622" rotation="0" width="11" height="11" y="302"/>
<body name="t_joint_fixed" x="567" rotation="0" width="11" height="11" y="287"/>
<body name="t_joint_fixed" x="601" rotation="0" width="11" height="11" y="31"/>
<body name="t_joint_fixed" x="565" rotation="0" width="11" height="11" y="31"/>
<body name="t_joint" x="279" rotation="0" width="10" height="10" y="28"/>
<body name="t_joint" x="452" rotation="0" width="10" height="10" y="29"/>
<body name="t_joint" x="453" rotation="0" width="10" height="10" y="137"/>
<body name="t_joint" x="278" rotation="0" width="10" height="10" y="136"/>
<body name="t_joint" x="278" rotation="0" width="10" height="10" y="225"/>
<body name="t_joint" x="278" rotation="0" width="10" height="10" y="244"/>
<body name="t_joint" x="278" rotation="0" width="10" height="10" y="261"/>
<body name="t_joint" x="277" rotation="0" width="10" height="10" y="297"/>
<body name="t_joint" x="277" rotation="0" width="10" height="10" y="333"/>
<body name="t_joint" x="452" rotation="0" width="10" height="10" y="244"/>
<body name="t_joint" x="452" rotation="0" width="10" height="10" y="224"/>
<body name="t_joint" x="450" rotation="0" width="10" height="10" y="295"/>
<body name="t_joint" x="452" rotation="0" width="10" height="10" y="191"/>
<body name="t_pushka" x="61" rotation="0" width="86" height="51" y="369"/>
<body name="t_fire1_s" x="175" rotation="0" width="298" height="150" y="384"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" numberLevel="24" nameLevel="LEVEL 24" fon="4">
<bodies>
<body name="t_bs_s" x="404" rotation="0" width="50" height="50" y="-17"/>
<body name="t_bs_s" x="354" rotation="0" width="50" height="50" y="-17"/>
<body name="t_bs_s" x="454" rotation="0" width="50" height="50" y="-17"/>
<body name="t_bs_s" x="504" rotation="0" width="50" height="50" y="-17"/>
<body name="t_bs_s" x="554" rotation="0" width="50" height="50" y="-17"/>
<body name="t_bs_s" x="404" rotation="0" width="50" height="50" y="33"/>
<body name="t_bs_s" x="354" rotation="0" width="50" height="50" y="33"/>
<body name="t_bs_s" x="454" rotation="0" width="50" height="50" y="33"/>
<body name="t_bs_s" x="504" rotation="0" width="50" height="50" y="33"/>
<body name="t_bs_s" x="554" rotation="0" width="50" height="50" y="33"/>
<body name="t_barm_s" x="455" rotation="0" width="250" height="23" y="69"/>
<body name="t_bs_s" x="506" rotation="0" width="50" height="50" y="381"/>
<body name="t_bs_s" x="456" rotation="0" width="50" height="50" y="381"/>
<body name="t_bs_s" x="356" rotation="0" width="50" height="50" y="382"/>
<body name="t_bs_s" x="406" rotation="0" width="50" height="50" y="382"/>
<body name="t_bs_s" x="506" rotation="0" width="50" height="50" y="431"/>
<body name="t_bs_s" x="456" rotation="0" width="50" height="50" y="431"/>
<body name="t_bs_s" x="356" rotation="0" width="50" height="50" y="432"/>
<body name="t_bs_s" x="406" rotation="0" width="50" height="50" y="432"/>
<body name="t_bs_s" x="556" rotation="0" width="50" height="50" y="381"/>
<body name="t_bs_s" x="556" rotation="0" width="50" height="50" y="431"/>
<body name="t_bs_s" x="2" rotation="0" width="50" height="50" y="383"/>
<body name="t_bs_s" x="2" rotation="0" width="50" height="50" y="433"/>
<body name="t_bs_s" x="52" rotation="0" width="50" height="50" y="383"/>
<body name="t_bs_s" x="52" rotation="0" width="50" height="50" y="433"/>
<body name="t_barm_s" x="-57" rotation="0" width="268" height="23" y="346"/>
<body name="t_barm_s" x="456" rotation="0" width="250" height="23" y="345"/>
<body name="t_barm_s" x="647" rotation="90" width="250" height="23" y="204"/>
<body name="t_bs_s" x="684" rotation="0" width="50" height="50" y="253"/>
<body name="t_bs_s" x="684" rotation="90" width="50" height="50" y="303"/>
<body name="t_bs_s" x="684" rotation="90" width="50" height="50" y="253"/>
<body name="t_bs_s" x="684" rotation="90" width="50" height="50" y="203"/>
<body name="t_bs_s" x="684" rotation="90" width="50" height="50" y="153"/>
<body name="t_bs_s" x="684" rotation="90" width="50" height="50" y="103"/>
<body name="t_bk_d" x="490" rotation="-15" width="30" height="15" y="312"/>
<body name="t_bk_d" x="463" rotation="0" width="30" height="15" y="316"/>
<body name="t_bk_d" x="436" rotation="15" width="30" height="15" y="313"/>
<body name="t_bk2_d" x="462" rotation="90" width="203" height="44" y="208"/>
<body name="t_bk_d" x="435" rotation="-15" width="30" height="15" y="105"/>
<body name="t_bk_d" x="463" rotation="0" width="30" height="15" y="101"/>
<body name="t_bk_d" x="490" rotation="15" width="30" height="15" y="104"/>
<body name="t_bk_d" x="566" rotation="75" width="30" height="15" y="179"/>
<body name="t_bk_d" x="570" rotation="90" width="30" height="15" y="207"/>
<body name="t_bk_d" x="566" rotation="-75" width="30" height="15" y="235"/>
<body name="t_bk_d" x="356" rotation="90" width="30" height="15" y="209"/>
<body name="t_bk_d" x="360" rotation="75" width="30" height="15" y="236"/>
<body name="t_bk_d" x="360" rotation="-75" width="30" height="15" y="181"/>
<body name="t_bk_d" x="554" rotation="-60" width="30" height="15" y="261"/>
<body name="t_bk_d" x="537" rotation="-45" width="30" height="15" y="284"/>
<body name="t_bk_d" x="515" rotation="-30" width="30" height="15" y="301"/>
<body name="t_bk_d" x="410" rotation="30" width="30" height="15" y="302"/>
<body name="t_bk_d" x="388" rotation="45" width="30" height="15" y="285"/>
<body name="t_bk_d" x="371" rotation="60" width="30" height="15" y="262"/>
<body name="t_bk_d" x="516" rotation="30" width="30" height="15" y="115"/>
<body name="t_bk_d" x="371" rotation="-60" width="30" height="15" y="155"/>
<body name="t_bk_d" x="388" rotation="-45" width="30" height="15" y="133"/>
<body name="t_bk_d" x="410" rotation="-30" width="30" height="15" y="116"/>
<body name="t_bk_d" x="555" rotation="60" width="30" height="15" y="154"/>
<body name="t_bk_d" x="538" rotation="45" width="30" height="15" y="132"/>
<body name="t_bk_d" x="516" rotation="30" width="30" height="15" y="115"/>
<body name="t_bk2_d" x="463" rotation="0" width="202" height="50" y="208"/>
<body name="t_cz_d" x="427" rotation="0" width="17" height="21" y="229"/>
<body name="t_cz_d" x="430" rotation="0" width="17" height="21" y="186"/>
<body name="t_cz_d" x="501" rotation="0" width="17" height="21" y="188"/>
<body name="t_cz_d" x="499" rotation="0" width="17" height="21" y="225"/>
<body name="t_rolB2_d" x="428" rotation="0" width="36" height="45" y="171"/>
<body name="t_rolG2_d" x="427" rotation="180" width="39" height="38" y="248"/>
<body name="t_rolG1_d" x="499" rotation="180" width="48" height="43" y="246"/>
<body name="t_rolB3_d" x="499" rotation="0" width="39" height="40" y="170"/>
<body name="t_joint" x="478" rotation="0" width="10" height="10" y="318"/>
<body name="t_joint" x="480" rotation="0" width="10" height="10" y="99"/>
<body name="t_joint" x="506" rotation="0" width="10" height="10" y="107"/>
<body name="t_joint" x="527" rotation="0" width="10" height="10" y="122"/>
<body name="t_joint" x="550" rotation="0" width="10" height="10" y="140"/>
<body name="t_joint" x="561" rotation="0" width="10" height="10" y="165"/>
<body name="t_joint" x="573" rotation="0" width="10" height="10" y="195"/>
<body name="t_joint" x="574" rotation="0" width="10" height="10" y="222"/>
<body name="t_joint" x="561" rotation="0" width="10" height="10" y="250"/>
<body name="t_joint" x="546" rotation="0" width="10" height="10" y="274"/>
<body name="t_joint" x="526" rotation="0" width="10" height="10" y="296"/>
<body name="t_joint" x="506" rotation="0" width="10" height="10" y="309"/>
<body name="t_joint" x="449" rotation="0" width="10" height="10" y="316"/>
<body name="t_joint" x="396" rotation="0" width="10" height="10" y="294"/>
<body name="t_joint" x="422" rotation="0" width="10" height="10" y="310"/>
<body name="t_joint" x="377" rotation="0" width="10" height="10" y="275"/>
<body name="t_joint" x="365" rotation="0" width="10" height="10" y="251"/>
<body name="t_joint" x="448" rotation="0" width="10" height="10" y="100"/>
<body name="t_joint" x="353" rotation="0" width="10" height="10" y="221"/>
<body name="t_joint" x="422" rotation="0" width="10" height="10" y="111"/>
<body name="t_joint" x="399" rotation="0" width="10" height="10" y="124"/>
<body name="t_joint" x="378" rotation="0" width="10" height="10" y="143"/>
<body name="t_joint" x="364" rotation="0" width="10" height="10" y="169"/>
<body name="t_joint" x="355" rotation="0" width="10" height="10" y="193"/>
<body name="t_joint_fixed" x="499" rotation="0" width="15" height="15" y="188"/>
<body name="t_joint_fixed" x="428" rotation="0" width="15" height="15" y="185"/>
<body name="t_joint_fixed" x="426" rotation="0" width="15" height="15" y="228"/>
<body name="t_joint_fixed" x="495" rotation="0" width="15" height="15" y="228"/>
<body name="t_revolute_motor" x="463" rotation="1" width="33" height="33" y="209"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="306"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="10" nameLevel="LEVEL 10" nickLevel="Johnny-K" fon="5">
<bodies>
<body name="t_clock_s" x="407" rotation="0" width="55" height="55" y="80"/>
<body name="t_clock_s" x="605" rotation="0" width="55" height="55" y="79"/>
<body name="t_clock_s" x="304" rotation="0" width="55" height="55" y="161"/>
<body name="t_clock_s" x="505" rotation="0" width="55" height="55" y="158"/>
<body name="t_clock_s" x="198" rotation="0" width="55" height="55" y="81"/>
<body name="t_clock_s" x="199" rotation="0" width="55" height="55" y="256"/>
<body name="t_clock_s" x="619" rotation="0" width="55" height="55" y="253"/>
<body name="t_b2_s" x="50" rotation="0" width="102" height="19" y="413"/>
<body name="t_barm_s" x="227" rotation="0" width="236" height="24" y="424"/>
<body name="t_barm_s" x="420" rotation="0" width="236" height="24" y="427"/>
<body name="t_barm_s" x="681" rotation="0" width="236" height="24" y="425"/>
<body name="t_rolB3_d" x="407" rotation="0" width="39" height="40" y="37"/>
<body name="t_rolG4_d" x="605" rotation="0" width="44" height="51" y="39"/>
<body name="t_rolB1_d" x="304" rotation="0" width="37" height="38" y="119"/>
<body name="t_rolB1_d" x="505" rotation="0" width="37" height="38" y="116"/>
<body name="t_rolG1_d" x="198" rotation="0" width="48" height="43" y="42"/>
<body name="t_rolB3_d" x="199" rotation="0" width="39" height="40" y="213"/>
<body name="t_rolG2_d" x="619" rotation="0" width="39" height="38" y="213"/>
<body name="t_pushka" x="46" rotation="0" width="86" height="51" y="375"/>
<body name="t_fire1_s" x="618" rotation="0" width="180" height="150" y="336"/>
<body name="t_fire1_s" x="536" rotation="0" width="180" height="150" y="376"/>
<body name="t_fire1_s" x="468" rotation="0" width="180" height="150" y="374"/>
<body name="t_fire1_s" x="406" rotation="0" width="180" height="150" y="372"/>
<body name="t_fire1_s" x="334" rotation="0" width="180" height="150" y="372"/>
<body name="t_fire1_s" x="273" rotation="0" width="180" height="150" y="371"/>
<body name="t_fire1_s" x="217" rotation="0" width="180" height="150" y="373"/>
<body name="t_fire1_s" x="152" rotation="0" width="180" height="150" y="373"/>
<body name="t_fire1_s" x="692" rotation="0" width="180" height="150" y="337"/>
<body name="t_fire1_s" x="718" rotation="0" width="180" height="150" y="391"/>
<body name="t_fire1_s" x="709" rotation="0" width="180" height="150" y="306"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 37" fon="1" numberLevel="37" nickLevel="Johnny-K">
<bodies>
<body name="t_barm_s" x="673" rotation="90" width="236" height="24" y="102"/>
<body name="t_barm_s" x="430" rotation="0" width="322" height="24" y="457"/>
<body name="t_barm_s" x="302" rotation="0" width="236" height="24" y="453"/>
<body name="t_b2_s" x="363" rotation="0" width="20" height="19" y="317"/>
<body name="t_barm_s" x="652" rotation="0" width="236" height="24" y="170"/>
<body name="t_b2_s" x="452" rotation="0" width="20" height="19" y="258"/>
<body name="t_barm_s" x="3" rotation="0" width="236" height="24" y="349"/>
<body name="t_barm_s" x="69" rotation="0" width="21" height="14" y="398"/>
<body name="t_barm_s" x="68" rotation="0" width="236" height="24" y="415"/>
<body name="t_bk_d" x="362" rotation="90" width="107" height="17" y="246"/>
<body name="t_bk_d" x="272" rotation="90" width="107" height="17" y="306"/>
<body name="t_bte_d" x="585" rotation="0" width="36" height="51" y="133"/>
<body name="t_bk_d" x="451" rotation="90" width="107" height="17" y="185"/>
<body name="t_rolB5_d" x="623" rotation="0" width="36" height="47" y="142"/>
<body name="t_rolG2_d" x="538" rotation="0" width="53" height="48" y="133"/>
<body name="t_rolB1_d" x="69" rotation="0" width="37" height="38" y="377"/>
<body name="t_revolute" x="362" rotation="0" width="16" height="16" y="290"/>
<body name="t_revolute" x="272" rotation="0" width="16" height="16" y="350"/>
<body name="t_revolute" x="451" rotation="0" width="16" height="16" y="230"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="308"/>
<body name="t_fire1_s" x="243" rotation="0" width="180" height="150" y="377"/>
<body name="t_fire1_s" x="469" rotation="0" width="180" height="150" y="375"/>
<body name="t_fire1_s" x="541" rotation="0" width="180" height="150" y="377"/>
<body name="t_fire1_s" x="393" rotation="0" width="180" height="150" y="375"/>
<body name="t_fire1_s" x="322" rotation="0" width="180" height="150" y="377"/>
<body name="t_fire1_s" x="36" rotation="90" width="80" height="150" y="385"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="38" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 38">
<bodies>
<body name="t_barm_s" x="401" rotation="0" width="297" height="24" y="407"/>
<body name="t_bk_d" x="353" rotation="90" width="100" height="15" y="346"/>
<body name="t_bk_d" x="260" rotation="90" width="100" height="15" y="347"/>
<body name="t_bk_d" x="403" rotation="0" width="100" height="15" y="288"/>
<body name="t_bk_d" x="503" rotation="0" width="100" height="15" y="288"/>
<body name="t_bk_d" x="453" rotation="90" width="100" height="15" y="345"/>
<body name="t_bk_d" x="541" rotation="90" width="100" height="15" y="345"/>
<body name="t_bk_d" x="498" rotation="90" width="100" height="15" y="231"/>
<body name="t_bk_d" x="452" rotation="0" width="100" height="15" y="173"/>
<body name="t_bk_d" x="352" rotation="0" width="100" height="15" y="174"/>
<body name="t_bk_d" x="307" rotation="90" width="100" height="15" y="232"/>
<body name="t_bk_d" x="402" rotation="90" width="100" height="15" y="231"/>
<body name="t_bk_d" x="303" rotation="0" width="100" height="15" y="289"/>
<body name="t_bk_d" x="354" rotation="90" width="100" height="15" y="116"/>
<body name="t_bk_d" x="449" rotation="90" width="100" height="15" y="115"/>
<body name="t_bk_d" x="401" rotation="0" width="100" height="15" y="58"/>
<body name="t_bk_d" x="364" rotation="0" width="15" height="15" y="43"/>
<body name="t_bk_d" x="436" rotation="0" width="15" height="15" y="43"/>
<body name="t_rolB5_d" x="301" rotation="0" width="36" height="47" y="377"/>
<body name="t_rolB2_d" x="497" rotation="0" width="36" height="45" y="381"/>
<body name="t_rolG5_d" x="404" rotation="0" width="40" height="45" y="383"/>
<body name="t_rolB3_d" x="437" rotation="0" width="39" height="40" y="266"/>
<body name="t_rolB1_d" x="368" rotation="0" width="37" height="38" y="267"/>
<body name="t_rolB3_d" x="389" rotation="0" width="39" height="40" y="152"/>
<body name="t_rolB1_d" x="423" rotation="0" width="37" height="38" y="154"/>
<body name="t_rolB4_d" x="403" rotation="0" width="40" height="38" y="35"/>
<body name="t_pushka" x="46" rotation="0" width="86" height="51" y="390"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 39" fon="1" numberLevel="39" nickLevel="Johnny-K">
<bodies>
<body name="t_b2_s" x="227" rotation="-65" width="18" height="18" y="256"/>
<body name="t_b2_s" x="246" rotation="-45" width="51" height="19" y="235"/>
<body name="t_b2_s" x="650" rotation="-65" width="18" height="18" y="311"/>
<body name="t_b2_s" x="555" rotation="25" width="18" height="18" y="350"/>
<body name="t_b2_s" x="267" rotation="25" width="18" height="18" y="352"/>
<body name="t_b2_s" x="409" rotation="25" width="18" height="18" y="350"/>
<body name="t_b2_s" x="467" rotation="-25" width="18" height="18" y="350"/>
<body name="t_b2_s" x="438" rotation="0" width="51" height="19" y="353"/>
<body name="t_b2_s" x="610" rotation="-25" width="18" height="18" y="351"/>
<body name="t_b2_s" x="632" rotation="-45" width="51" height="19" y="332"/>
<body name="t_b2_s" x="583" rotation="0" width="51" height="19" y="353"/>
<body name="t_b2_s" x="650" rotation="65" width="18" height="18" y="254"/>
<body name="t_b2_s" x="632" rotation="45" width="51" height="19" y="233"/>
<body name="t_b2_s" x="652" rotation="90" width="51" height="19" y="283"/>
<body name="t_b2_s" x="227" rotation="65" width="18" height="18" y="313"/>
<body name="t_b2_s" x="245" rotation="45" width="51" height="19" y="333"/>
<body name="t_b2_s" x="225" rotation="90" width="51" height="19" y="284"/>
<body name="t_b2_s" x="321" rotation="-25" width="18" height="18" y="352"/>
<body name="t_b2_s" x="294" rotation="0" width="51" height="19" y="354"/>
<body name="t_b2_s" x="295" rotation="90" width="80" height="19" y="402"/>
<body name="t_b2_s" x="440" rotation="90" width="80" height="19" y="401"/>
<body name="t_b2_s" x="584" rotation="90" width="80" height="19" y="401"/>
<body name="t_b2_s" x="511" rotation="0" width="23" height="14" y="315"/>
<body name="t_b2_s" x="487" rotation="-45" width="51" height="19" y="332"/>
<body name="t_b2_s" x="534" rotation="45" width="51" height="19" y="332"/>
<body name="t_b2_s" x="367" rotation="0" width="23" height="14" y="315"/>
<body name="t_b2_s" x="366" rotation="0" width="23" height="14" y="252"/>
<body name="t_b2_s" x="343" rotation="45" width="51" height="19" y="234"/>
<body name="t_b2_s" x="390" rotation="-45" width="51" height="19" y="234"/>
<body name="t_b2_s" x="511" rotation="0" width="23" height="14" y="251"/>
<body name="t_b2_s" x="487" rotation="45" width="51" height="19" y="233"/>
<body name="t_b2_s" x="535" rotation="-45" width="51" height="19" y="234"/>
<body name="t_b2_s" x="343" rotation="-45" width="51" height="19" y="333"/>
<body name="t_b2_s" x="389" rotation="45" width="51" height="19" y="332"/>
<body name="t_bk_d" x="295" rotation="0" width="115" height="14" y="283"/>
<body name="t_bk_d" x="295" rotation="90" width="115" height="14" y="284"/>
<body name="t_bk_d" x="438" rotation="0" width="115" height="14" y="283"/>
<body name="t_bk_d" x="438" rotation="90" width="115" height="14" y="284"/>
<body name="t_bk_d" x="584" rotation="0" width="115" height="14" y="283"/>
<body name="t_bk_d" x="584" rotation="90" width="115" height="14" y="285"/>
<body name="t_cw_d" x="535" rotation="0" width="24" height="24" y="283"/>
<body name="t_cw_d" x="584" rotation="0" width="24" height="24" y="237"/>
<body name="t_cw_d" x="630" rotation="0" width="24" height="24" y="283"/>
<body name="t_cw_d" x="584" rotation="0" width="24" height="24" y="332"/>
<body name="t_cw_d" x="390" rotation="0" width="24" height="24" y="283"/>
<body name="t_cw_d" x="438" rotation="0" width="24" height="24" y="237"/>
<body name="t_cw_d" x="438" rotation="0" width="24" height="24" y="331"/>
<body name="t_cw_d" x="485" rotation="0" width="24" height="24" y="283"/>
<body name="t_rolB1_d" x="324" rotation="0" width="37" height="38" y="311"/>
<body name="t_rolB5_d" x="466" rotation="0" width="36" height="47" y="256"/>
<body name="t_rolB2_d" x="411" rotation="0" width="36" height="45" y="317"/>
<body name="t_rolB4_d" x="545" rotation="0" width="40" height="38" y="319"/>
<body name="t_rolB2_d" x="269" rotation="0" width="36" height="45" y="258"/>
<body name="t_rolG1_d" x="552" rotation="0" width="48" height="43" y="257"/>
<body name="t_joint_fixed" x="540" rotation="0" width="15" height="15" y="284"/>
<body name="t_joint_fixed" x="621" rotation="0" width="15" height="15" y="286"/>
<body name="t_joint_fixed" x="583" rotation="0" width="15" height="15" y="324"/>
<body name="t_joint_fixed" x="580" rotation="0" width="15" height="15" y="240"/>
<body name="t_joint_fixed" x="397" rotation="0" width="15" height="15" y="285"/>
<body name="t_joint_fixed" x="437" rotation="0" width="15" height="15" y="244"/>
<body name="t_joint_fixed" x="442" rotation="0" width="15" height="15" y="323"/>
<body name="t_joint_fixed" x="473" rotation="0" width="15" height="15" y="292"/>
<body name="t_revolute_motor" x="295" rotation="1" width="12" height="12" y="284"/>
<body name="t_revolute_motor" x="438" rotation="-1" width="12" height="12" y="284"/>
<body name="t_revolute_motor" x="584" rotation="1" width="12" height="12" y="284"/>
<body name="t_pushka" x="47" rotation="0" width="86" height="51" y="390"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="26" nickLevel="Johnny-K" fon="1" nameLevel="LEVEL 26">
<bodies>
<body name="t_barm_s" x="12" rotation="90" width="236" height="24" y="249"/>
<body name="t_barm_s" x="12" rotation="90" width="236" height="24" y="16"/>
<body name="t_barm_s" x="-10" rotation="0" width="236" height="24" y="108"/>
<body name="t_barm_s" x="-9" rotation="0" width="236" height="24" y="201"/>
<body name="t_b2_s" x="610" rotation="-79" width="20" height="18" y="258"/>
<body name="t_b2_s" x="614" rotation="90" width="51" height="19" y="385"/>
<body name="t_b2_s" x="614" rotation="90" width="51" height="19" y="334"/>
<body name="t_b2_s" x="614" rotation="90" width="51" height="19" y="232"/>
<body name="t_b2_s" x="557" rotation="-147" width="20" height="18" y="114"/>
<body name="t_b2_s" x="593" rotation="-123" width="20" height="18" y="153"/>
<body name="t_b2_s" x="589" rotation="-60" width="20" height="18" y="307"/>
<body name="t_b2_s" x="551" rotation="-34" width="20" height="18" y="344"/>
<body name="t_b2_s" x="614" rotation="90" width="51" height="19" y="283"/>
<body name="t_b2_s" x="576" rotation="-132" width="51" height="19" y="134"/>
<body name="t_b2_s" x="534" rotation="-154" width="51" height="19" y="102"/>
<body name="t_b2_s" x="480" rotation="-22" width="51" height="19" y="374"/>
<body name="t_b2_s" x="527" rotation="-22" width="51" height="19" y="355"/>
<body name="t_b2_s" x="571" rotation="-44" width="51" height="19" y="326"/>
<body name="t_b2_s" x="601" rotation="-66" width="51" height="19" y="282"/>
<body name="t_b2_s" x="612" rotation="-110" width="20" height="18" y="204"/>
<body name="t_b2_s" x="613" rotation="-88" width="51" height="19" y="231"/>
<body name="t_b2_s" x="603" rotation="-110" width="51" height="19" y="179"/>
<body name="t_barm_s" x="-10" rotation="0" width="236" height="24" y="292"/>
<body name="t_rolB5_d" x="52" rotation="0" width="36" height="47" y="84"/>
<body name="t_rolB4_d" x="54" rotation="0" width="40" height="38" y="174"/>
<body name="t_rolG5_d" x="106" rotation="0" width="40" height="45" y="266"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="391"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 28" fon="6" numberLevel="28" nickLevel="Johnny-K">
<bodies>
<body name="t_barm_s" x="650" rotation="90" width="236" height="24" y="0"/>
<body name="t_barm_s" x="354" rotation="0" width="236" height="24" y="95"/>
<body name="t_barm_s" x="381" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="146" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="-89" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="615" rotation="0" width="236" height="24" y="408"/>
<body name="t_barm_s" x="673" rotation="90" width="236" height="24" y="209"/>
<body name="t_barm_s" x="721" rotation="0" width="236" height="24" y="92"/>
<body name="t_barm_s" x="673" rotation="90" width="236" height="24" y="442"/>
<body name="t_barm_s" x="29" rotation="0" width="236" height="24" y="361"/>
<body name="t_barm_s" x="144" rotation="90" width="236" height="24" y="456"/>
<body name="t_bs_s" x="274" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="324" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="374" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="423" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="471" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="224" rotation="0" width="50" height="50" y="340"/>
<body name="t_bs_s" x="291" rotation="45" width="51" height="69" y="211"/>
<body name="t_bs_s" x="373" rotation="0" width="50" height="50" y="194"/>
<body name="t_bs_s" x="274" rotation="0" width="50" height="50" y="242"/>
<body name="t_bs_s" x="324" rotation="0" width="50" height="50" y="242"/>
<body name="t_bs_s" x="323" rotation="0" width="50" height="50" y="194"/>
<body name="t_bs_s" x="454" rotation="-45" width="51" height="69" y="211"/>
<body name="t_bs_s" x="471" rotation="0" width="50" height="50" y="242"/>
<body name="t_bs_s" x="423" rotation="0" width="50" height="50" y="194"/>
<body name="t_barm_s" x="754" rotation="0" width="236" height="24" y="336"/>
<body name="t_bs_s" x="374" rotation="0" width="50" height="50" y="242"/>
<body name="t_bk_d" x="372" rotation="0" width="210" height="46" y="291"/>
<body name="t_cz_d" x="607" rotation="0" width="17" height="21" y="114"/>
<body name="t_cz_d" x="471" rotation="0" width="17" height="21" y="116"/>
<body name="t_cz_d" x="493" rotation="-22" width="17" height="21" y="202"/>
<body name="t_cz_d" x="485" rotation="-12" width="17" height="21" y="185"/>
<body name="t_cz_d" x="478" rotation="-8" width="17" height="21" y="167"/>
<body name="t_cz_d" x="473" rotation="-4" width="17" height="21" y="149"/>
<body name="t_cz_d" x="472" rotation="0" width="17" height="21" y="131"/>
<body name="t_cz_d" x="607" rotation="-176" width="17" height="21" y="131"/>
<body name="t_cz_d" x="606" rotation="-176" width="17" height="21" y="147"/>
<body name="t_cz_d" x="604" rotation="-172" width="17" height="21" y="164"/>
<body name="t_cz_d" x="601" rotation="-161" width="17" height="21" y="182"/>
<body name="t_cz_d" x="596" rotation="-158" width="17" height="21" y="199"/>
<body name="t_cz_d" x="588" rotation="-149" width="17" height="21" y="214"/>
<body name="t_cz_d" x="577" rotation="-133" width="17" height="21" y="229"/>
<body name="t_cz_d" x="564" rotation="-111" width="17" height="21" y="239"/>
<body name="t_cz_d" x="547" rotation="-91" width="17" height="21" y="244"/>
<body name="t_cz_d" x="530" rotation="-67" width="17" height="21" y="241"/>
<body name="t_cz_d" x="516" rotation="-47" width="17" height="21" y="230"/>
<body name="t_cz_d" x="503" rotation="-38" width="17" height="21" y="217"/>
<body name="t_rolB1_d" x="522" rotation="0" width="37" height="38" y="173"/>
<body name="t_rolB2_d" x="535" rotation="0" width="36" height="45" y="165"/>
<body name="t_rolB3_d" x="550" rotation="0" width="39" height="40" y="162"/>
<body name="t_rolB5_d" x="547" rotation="0" width="36" height="47" y="173"/>
<body name="t_rolB4_d" x="565" rotation="0" width="40" height="38" y="182"/>
<body name="t_rolB3_d" x="543" rotation="0" width="39" height="40" y="183"/>
<body name="t_rolB5_d" x="542" rotation="0" width="36" height="47" y="182"/>
<body name="t_rolB2_d" x="544" rotation="0" width="36" height="45" y="185"/>
<body name="t_rolG5_d" x="517" rotation="0" width="40" height="45" y="380"/>
<body name="t_rolG3_d" x="581" rotation="0" width="43" height="38" y="379"/>
<body name="t_rolB1_d" x="421" rotation="0" width="37" height="38" y="248"/>
<body name="t_o_d" x="548" rotation="0" width="25" height="21" y="387"/>
<body name="t_o_d" x="610" rotation="0" width="25" height="21" y="386"/>
<body name="t_o_d" x="482" rotation="0" width="25" height="21" y="387"/>
<body name="t_joint" x="607" rotation="0" width="10" height="10" y="105"/>
<body name="t_joint" x="605" rotation="0" width="10" height="10" y="125"/>
<body name="t_joint" x="471" rotation="0" width="10" height="10" y="123"/>
<body name="t_joint" x="470" rotation="0" width="10" height="10" y="104"/>
<body name="t_joint" x="605" rotation="0" width="10" height="10" y="139"/>
<body name="t_joint" x="605" rotation="0" width="10" height="10" y="154"/>
<body name="t_joint" x="602" rotation="0" width="10" height="10" y="172"/>
<body name="t_joint" x="597" rotation="0" width="10" height="10" y="189"/>
<body name="t_joint" x="592" rotation="0" width="10" height="10" y="205"/>
<body name="t_joint" x="582" rotation="0" width="10" height="10" y="223"/>
<body name="t_joint" x="569" rotation="0" width="10" height="10" y="236"/>
<body name="t_joint" x="555" rotation="0" width="10" height="10" y="243"/>
<body name="t_joint" x="538" rotation="0" width="10" height="10" y="243"/>
<body name="t_joint" x="523" rotation="0" width="10" height="10" y="237"/>
<body name="t_joint" x="482" rotation="0" width="10" height="10" y="177"/>
<body name="t_joint" x="475" rotation="0" width="10" height="10" y="159"/>
<body name="t_joint" x="473" rotation="0" width="10" height="10" y="139"/>
<body name="t_joint" x="512" rotation="0" width="10" height="10" y="223"/>
<body name="t_joint" x="502" rotation="0" width="10" height="10" y="208"/>
<body name="t_joint" x="492" rotation="0" width="10" height="10" y="193"/>
<body name="t_pushka" x="52" rotation="0" width="86" height="51" y="320"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" numberLevel="40" nameLevel="LEVEL 40" fon="1">
<bodies>
<body name="t_barm_s" x="671" rotation="90" width="236" height="24" y="293"/>
<body name="t_barm_s" x="552" rotation="0" width="236" height="24" y="412"/>
<body name="t_barm_s" x="318" rotation="0" width="236" height="24" y="412"/>
<body name="t_barm_s" x="84" rotation="0" width="236" height="24" y="412"/>
<body name="t_barm_s" x="15" rotation="90" width="236" height="24" y="299"/>
<body name="t_rolB3_d" x="434" rotation="0" width="39" height="40" y="28"/>
<body name="t_rolB1_d" x="502" rotation="130" width="37" height="38" y="162"/>
<body name="t_rolB2_d" x="466" rotation="173" width="36" height="45" y="182"/>
<body name="t_rolB5_d" x="425" rotation="-172" width="36" height="47" y="179"/>
<body name="t_rolB5_d" x="385" rotation="-90" width="36" height="47" y="115"/>
<body name="t_rolB3_d" x="518" rotation="90" width="39" height="40" y="127"/>
<body name="t_rolB4_d" x="508" rotation="63" width="40" height="38" y="88"/>
<body name="t_rolB5_d" x="477" rotation="33" width="36" height="47" y="60"/>
<body name="t_rolB2_d" x="400" rotation="-45" width="36" height="45" y="74"/>
<body name="t_rolB3_d" x="436" rotation="-14" width="39" height="40" y="52"/>
<body name="t_rolB2_d" x="480" rotation="45" width="36" height="45" y="85"/>
<body name="t_rolB1_d" x="455" rotation="0" width="37" height="38" y="75"/>
<body name="t_rolB1_d" x="492" rotation="73" width="37" height="38" y="109"/>
<body name="t_rolB5_d" x="492" rotation="90" width="36" height="47" y="136"/>
<body name="t_rolB1_d" x="474" rotation="125" width="37" height="38" y="158"/>
<body name="t_rolB3_d" x="446" rotation="180" width="39" height="40" y="164"/>
<body name="t_rolB1_d" x="421" rotation="-125" width="37" height="38" y="150"/>
<body name="t_rolB4_d" x="410" rotation="-90" width="40" height="38" y="127"/>
<body name="t_rolB3_d" x="408" rotation="-51" width="39" height="40" y="99"/>
<body name="t_rolB4_d" x="429" rotation="-24" width="40" height="38" y="79"/>
<body name="t_rolB2_d" x="460" rotation="6" width="36" height="45" y="33"/>
<body name="t_rolB4_d" x="489" rotation="29" width="40" height="38" y="42"/>
<body name="t_rolB1_d" x="510" rotation="54" width="37" height="38" y="56"/>
<body name="t_rolB4_d" x="543" rotation="90" width="40" height="38" y="128"/>
<body name="t_rolB5_d" x="528" rotation="61" width="36" height="47" y="77"/>
<body name="t_rolB5_d" x="534" rotation="117" width="36" height="47" y="153"/>
<body name="t_rolB3_d" x="498" rotation="149" width="39" height="40" y="195"/>
<body name="t_rolB1_d" x="520" rotation="134" width="37" height="38" y="177"/>
<body name="t_rolB1_d" x="473" rotation="163" width="37" height="38" y="205"/>
<body name="t_rolB2_d" x="446" rotation="180" width="36" height="45" y="209"/>
<body name="t_rolB3_d" x="415" rotation="-148" width="39" height="40" y="205"/>
<body name="t_rolB2_d" x="535" rotation="74" width="36" height="45" y="103"/>
<body name="t_rolB1_d" x="384" rotation="-37" width="37" height="38" y="57"/>
<body name="t_rolB4_d" x="406" rotation="-22" width="40" height="38" y="41"/>
<body name="t_rolB3_d" x="370" rotation="-121" width="39" height="40" y="167"/>
<body name="t_rolB4_d" x="364" rotation="-101" width="40" height="38" y="137"/>
<body name="t_rolB1_d" x="362" rotation="-95" width="37" height="38" y="107"/>
<body name="t_rolB5_d" x="368" rotation="-76" width="36" height="47" y="80"/>
<body name="t_rolB3_d" x="395" rotation="-130" width="39" height="40" y="158"/>
<body name="t_rolB5_d" x="392" rotation="-135" width="36" height="47" y="185"/>
<body name="t_rolG1_d" x="447" rotation="0" width="48" height="43" y="117"/>
<body name="t_joint_fixed" x="479" rotation="0" width="15" height="15" y="40"/>
<body name="t_joint_fixed" x="532" rotation="0" width="15" height="15" y="137"/>
<body name="t_joint_fixed" x="509" rotation="0" width="15" height="15" y="179"/>
<body name="t_joint_fixed" x="464" rotation="0" width="15" height="15" y="200"/>
<body name="t_joint_fixed" x="412" rotation="0" width="15" height="15" y="192"/>
<body name="t_joint_fixed" x="378" rotation="0" width="15" height="15" y="155"/>
<body name="t_joint_fixed" x="491" rotation="0" width="15" height="15" y="154"/>
<body name="t_joint_fixed" x="462" rotation="0" width="15" height="15" y="173"/>
<body name="t_joint_fixed" x="430" rotation="0" width="15" height="15" y="166"/>
<body name="t_joint_fixed" x="403" rotation="0" width="15" height="15" y="145"/>
<body name="t_joint_fixed" x="398" rotation="0" width="15" height="15" y="114"/>
<body name="t_joint_fixed" x="502" rotation="0" width="15" height="15" y="122"/>
<body name="t_joint_fixed" x="470" rotation="0" width="15" height="15" y="72"/>
<body name="t_joint_fixed" x="413" rotation="0" width="15" height="15" y="83"/>
<body name="t_joint_fixed" x="440" rotation="0" width="15" height="15" y="66"/>
<body name="t_joint_fixed" x="493" rotation="0" width="15" height="15" y="96"/>
<body name="t_joint_fixed" x="517" rotation="0" width="15" height="15" y="70"/>
<body name="t_joint_fixed" x="424" rotation="0" width="15" height="15" y="39"/>
<body name="t_joint_fixed" x="381" rotation="0" width="15" height="15" y="72"/>
<body name="t_joint_fixed" x="374" rotation="0" width="15" height="15" y="110"/>
<body name="t_joint_fixed" x="430" rotation="0" width="15" height="15" y="208"/>
<body name="t_joint_fixed" x="534" rotation="0" width="15" height="15" y="91"/>
<body name="t_joint_fixed" x="545" rotation="0" width="15" height="15" y="115"/>
<body name="t_joint_fixed" x="502" rotation="0" width="15" height="15" y="48"/>
<body name="t_joint_fixed" x="361" rotation="0" width="15" height="15" y="93"/>
<body name="t_joint_fixed" x="392" rotation="0" width="15" height="15" y="44"/>
<body name="t_joint_fixed" x="358" rotation="0" width="15" height="15" y="123"/>
<body name="t_pushka" x="68" rotation="0" width="86" height="51" y="372"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="12" nameLevel="LEVEL 12">
<bodies>
<body name="t_bs_s" x="96" rotation="0" width="50" height="50" y="413"/>
<body name="t_bs_s" x="146" rotation="0" width="50" height="50" y="413"/>
<body name="t_b2_s" x="109" rotation="0" width="74" height="19" y="130"/>
<body name="t_b2_s" x="111" rotation="0" width="74" height="19" y="205"/>
<body name="t_b2_s" x="111" rotation="0" width="74" height="19" y="273"/>
<body name="t_b2_s" x="112" rotation="0" width="74" height="19" y="334"/>
<body name="t_b2_s" x="108" rotation="0" width="74" height="19" y="71"/>
<body name="t_bs_s" x="859" rotation="0" width="50" height="50" y="211"/>
<body name="t_bs_s" x="859" rotation="0" width="50" height="50" y="263"/>
<body name="t_bs_s" x="859" rotation="0" width="50" height="50" y="317"/>
<body name="t_bs_s" x="859" rotation="0" width="50" height="50" y="158"/>
<body name="t_bs_s" x="859" rotation="0" width="50" height="50" y="104"/>
<body name="t_bs_s" x="858" rotation="0" width="50" height="50" y="50"/>
<body name="t_barm_s" x="-50" rotation="0" width="236" height="24" y="442"/>
<body name="t_mpg_d" x="757" rotation="0" width="61" height="16" y="106"/>
<body name="t_mpg_d" x="728" rotation="0" width="61" height="16" y="249"/>
<body name="t_mpg_d" x="779" rotation="0" width="61" height="16" y="178"/>
<body name="t_rolG2_d" x="102" rotation="0" width="39" height="38" y="106"/>
<body name="t_rolG3_d" x="94" rotation="0" width="43" height="38" y="180"/>
<body name="t_rolG5_d" x="90" rotation="0" width="40" height="45" y="248"/>
<body name="t_rolG4_d" x="91" rotation="0" width="44" height="51" y="310"/>
<body name="t_rolG1_d" x="99" rotation="0" width="48" height="43" y="49"/>
<body name="t_rolB2_d" x="753" rotation="0" width="36" height="45" y="85"/>
<body name="t_rolB5_d" x="726" rotation="0" width="36" height="47" y="225"/>
<body name="t_rolB3_d" x="779" rotation="0" width="39" height="40" y="153"/>
<body name="t_pushka" x="145" rotation="0" width="86" height="51" y="359"/>
<body name="t_fire1_s" x="-41" rotation="0" width="180" height="150" y="378"/>
<body name="t_fire1_s" x="26" rotation="0" width="180" height="150" y="376"/>
<body name="t_fire1_s" x="-122" rotation="0" width="180" height="150" y="380"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="13" nameLevel="LEVEL 13">
<bodies>
<body name="t_bs_s" x="96" rotation="0" width="50" height="50" y="413"/>
<body name="t_bs_s" x="146" rotation="0" width="50" height="50" y="413"/>
<body name="t_b2_s" x="108" rotation="0" width="74" height="19" y="67"/>
<body name="t_b2_s" x="109" rotation="0" width="74" height="19" y="130"/>
<body name="t_b2_s" x="111" rotation="0" width="74" height="19" y="205"/>
<body name="t_b2_s" x="111" rotation="0" width="74" height="19" y="273"/>
<body name="t_b2_s" x="112" rotation="0" width="74" height="19" y="334"/>
<body name="t_barm_s" x="855" rotation="90" width="392" height="24" y="195"/>
<body name="t_barm_s" x="-45" rotation="0" width="236" height="24" y="436"/>
<body name="t_mpg_d" x="714" rotation="0" width="61" height="16" y="47"/>
<body name="t_mpg_d" x="716" rotation="0" width="61" height="16" y="313"/>
<body name="t_mpg_d" x="764" rotation="0" width="61" height="16" y="106"/>
<body name="t_mpg_d" x="773" rotation="0" width="61" height="16" y="249"/>
<body name="t_mpg_d" x="802" rotation="0" width="61" height="16" y="177"/>
<body name="t_rolG1_d" x="99" rotation="0" width="48" height="43" y="45"/>
<body name="t_rolG2_d" x="102" rotation="0" width="39" height="38" y="106"/>
<body name="t_rolG3_d" x="94" rotation="0" width="43" height="38" y="180"/>
<body name="t_rolG5_d" x="90" rotation="0" width="40" height="45" y="248"/>
<body name="t_rolG4_d" x="91" rotation="0" width="44" height="51" y="310"/>
<body name="t_rolB1_d" x="733" rotation="0" width="37" height="38" y="24"/>
<body name="t_rolB2_d" x="783" rotation="0" width="36" height="45" y="85"/>
<body name="t_rolB4_d" x="734" rotation="0" width="40" height="38" y="289"/>
<body name="t_rolB5_d" x="791" rotation="0" width="36" height="47" y="226"/>
<body name="t_rolB3_d" x="823" rotation="0" width="39" height="40" y="153"/>
<body name="t_pushka" x="145" rotation="0" width="86" height="51" y="359"/>
<body name="t_fire1_s" x="26" rotation="0" width="180" height="150" y="373"/>
<body name="t_fire1_s" x="-60" rotation="0" width="180" height="150" y="373"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="1" numberLevel="14" nameLevel="LEVEL 14">
<bodies>
<body name="t_bs_s" x="96" rotation="0" width="50" height="50" y="413"/>
<body name="t_bs_s" x="146" rotation="0" width="50" height="50" y="413"/>
<body name="t_b2_s" x="108" rotation="0" width="74" height="19" y="67"/>
<body name="t_b2_s" x="109" rotation="0" width="74" height="19" y="130"/>
<body name="t_b2_s" x="111" rotation="0" width="74" height="19" y="205"/>
<body name="t_b2_s" x="111" rotation="0" width="74" height="19" y="273"/>
<body name="t_b2_s" x="112" rotation="0" width="74" height="19" y="334"/>
<body name="t_barm_s" x="881" rotation="90" width="392" height="24" y="195"/>
<body name="t_barm_s" x="-48" rotation="0" width="236" height="24" y="439"/>
<body name="t_mpg_d" x="714" rotation="0" width="61" height="16" y="47"/>
<body name="t_mpg_d" x="716" rotation="0" width="61" height="16" y="313"/>
<body name="t_mpg_d" x="830" rotation="0" width="61" height="16" y="177"/>
<body name="t_mpg_d" x="742" rotation="0" width="61" height="16" y="177"/>
<body name="t_mpg_d" x="796" rotation="0" width="61" height="16" y="249"/>
<body name="t_mpg_d" x="720" rotation="0" width="61" height="16" y="249"/>
<body name="t_mpg_d" x="795" rotation="0" width="61" height="16" y="106"/>
<body name="t_mpg_d" x="719" rotation="0" width="61" height="16" y="106"/>
<body name="t_rolG1_d" x="99" rotation="0" width="48" height="43" y="45"/>
<body name="t_rolG2_d" x="102" rotation="0" width="39" height="38" y="106"/>
<body name="t_rolG3_d" x="94" rotation="0" width="43" height="38" y="180"/>
<body name="t_rolG5_d" x="90" rotation="0" width="40" height="45" y="248"/>
<body name="t_rolG4_d" x="91" rotation="0" width="44" height="51" y="310"/>
<body name="t_rolB1_d" x="733" rotation="0" width="37" height="38" y="24"/>
<body name="t_rolB4_d" x="730" rotation="0" width="40" height="38" y="288"/>
<body name="t_rolB2_d" x="729" rotation="0" width="36" height="45" y="85"/>
<body name="t_rolB2_d" x="805" rotation="0" width="36" height="45" y="85"/>
<body name="t_rolB3_d" x="756" rotation="0" width="39" height="40" y="152"/>
<body name="t_rolB3_d" x="844" rotation="0" width="39" height="40" y="152"/>
<body name="t_rolB5_d" x="732" rotation="0" width="36" height="47" y="225"/>
<body name="t_rolB5_d" x="814" rotation="0" width="36" height="47" y="225"/>
<body name="t_pushka" x="145" rotation="0" width="86" height="51" y="359"/>
<body name="t_fire1_s" x="26" rotation="0" width="180" height="150" y="373"/>
<body name="t_fire1_s" x="-56" rotation="0" width="180" height="150" y="373"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="3" numberLevel="29" nameLevel="LEVEL 29">
<bodies>
<body name="t_b2_s" x="44" rotation="0" width="71" height="19" y="392"/>
<body name="t_bb_s" x="640" rotation="0" width="50" height="50" y="296"/>
<body name="t_bb_s" x="640" rotation="0" width="50" height="50" y="346"/>
<body name="t_bb_s" x="640" rotation="0" width="50" height="50" y="248"/>
<body name="t_barm_s" x="639" rotation="90" width="148" height="16" y="315"/>
<body name="t_barm_s" x="709" rotation="0" width="148" height="16" y="128"/>
<body name="t_barm_s" x="678" rotation="90" width="148" height="16" y="71"/>
<body name="t_barm_s" x="438" rotation="0" width="148" height="16" y="162"/>
<body name="t_bb_s" x="641" rotation="0" width="50" height="50" y="395"/>
<body name="t_barm_s" x="441" rotation="0" width="148" height="16" y="357"/>
<body name="t_barm_s" x="441" rotation="0" width="148" height="16" y="269"/>
<body name="t_barm_s" x="513" rotation="90" width="148" height="16" y="299"/>
<body name="t_barm_s" x="572" rotation="0" width="148" height="16" y="371"/>
<body name="t_bk_d" x="626" rotation="95" width="115" height="15" y="160"/>
<body name="t_bte_d" x="394" rotation="0" width="36" height="51" y="323"/>
<body name="t_rolB4_d" x="658" rotation="0" width="40" height="38" y="209"/>
<body name="t_rolB1_d" x="508" rotation="0" width="37" height="38" y="213"/>
<body name="t_rolB2_d" x="457" rotation="0" width="36" height="45" y="336"/>
<body name="t_rolB3_d" x="501" rotation="0" width="39" height="40" y="139"/>
<body name="t_rolG2_d" x="602" rotation="0" width="39" height="38" y="350"/>
<body name="t_rolG3_d" x="574" rotation="0" width="43" height="38" y="349"/>
<body name="t_revolute" x="622" rotation="0" width="17" height="17" y="209"/>
<body name="t_pushka" x="41" rotation="0" width="86" height="51" y="354"/>
<body name="t_fire1_s" x="214" rotation="0" width="600" height="150" y="377"/>
<body name="t_fire1_s" x="403" rotation="0" width="600" height="150" y="374"/>
<body name="t_fire1_s" x="593" rotation="0" width="180" height="150" y="375"/>
<body name="t_fire1_s" x="174" rotation="0" width="600" height="150" y="396"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="2" numberLevel="41" nameLevel="LEVEL 41">
<bodies>
<body name="t_barm_s" x="356" rotation="0" width="236" height="24" y="410"/>
<body name="t_barm_s" x="565" rotation="0" width="236" height="24" y="410"/>
<body name="t_barm_s" x="124" rotation="0" width="236" height="24" y="410"/>
<body name="t_bs_s" x="31" rotation="0" width="50" height="50" y="373"/>
<body name="t_barm_s" x="393" rotation="0" width="236" height="24" y="336"/>
<body name="t_barm_s" x="622" rotation="-30" width="236" height="24" y="363"/>
<body name="t_barm_s" x="681" rotation="90" width="236" height="24" y="285"/>
<body name="t_barm_s" x="681" rotation="90" width="236" height="24" y="123"/>
<body name="t_barm_s" x="393" rotation="0" width="236" height="24" y="117"/>
<body name="t_b2_s" x="645" rotation="0" width="51" height="19" y="250"/>
<body name="t_b2_s" x="600" rotation="0" width="51" height="19" y="250"/>
<body name="t_barm_s" x="43" rotation="0" width="236" height="24" y="336"/>
<body name="t_barm_s" x="298" rotation="90" width="236" height="24" y="26"/>
<body name="t_cw_d" x="386" rotation="0" width="55" height="55" y="296"/>
<body name="t_bte_d" x="222" rotation="0" width="36" height="51" y="373"/>
<body name="t_rolG1_d" x="462" rotation="0" width="48" height="43" y="308"/>
<body name="t_rolB1_d" x="166" rotation="0" width="37" height="38" y="384"/>
<body name="t_rolG3_d" x="644" rotation="0" width="43" height="38" y="227"/>
<body name="t_rolB5_d" x="340" rotation="0" width="36" height="47" y="92"/>
<body name="t_rolB4_d" x="307" rotation="0" width="40" height="38" y="308"/>
<body name="t_pushka" x="45" rotation="0" width="86" height="51" y="295"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="16" nameLevel="LEVEL 16" nickLevel="Johnny-K" fon="6">
<bodies>
<body name="t_barm_s" x="640" rotation="-30" width="236" height="24" y="321"/>
<body name="t_barm_s" x="640" rotation="30" width="236" height="24" y="137"/>
<body name="t_barm_s" x="678" rotation="90" width="236" height="24" y="230"/>
<body name="t_bb_s" x="302" rotation="0" width="50" height="50" y="405"/>
<body name="t_bb_s" x="404" rotation="0" width="50" height="50" y="405"/>
<body name="t_bb_s" x="521" rotation="0" width="50" height="50" y="427"/>
<body name="t_bb_s" x="455" rotation="0" width="50" height="50" y="280"/>
<body name="t_bb_s" x="354" rotation="0" width="50" height="50" y="192"/>
<body name="t_bb_s" x="404" rotation="0" width="50" height="50" y="192"/>
<body name="t_bb_s" x="305" rotation="0" width="50" height="50" y="192"/>
<body name="t_bb_s" x="255" rotation="0" width="50" height="50" y="192"/>
<body name="t_bb_s" x="205" rotation="0" width="50" height="50" y="192"/>
<body name="t_bb_s" x="155" rotation="0" width="50" height="50" y="142"/>
<body name="t_bb_s" x="155" rotation="0" width="50" height="50" y="192"/>
<body name="t_bb_s" x="155" rotation="0" width="50" height="50" y="42"/>
<body name="t_bb_s" x="155" rotation="0" width="50" height="50" y="92"/>
<body name="t_bb_s" x="155" rotation="0" width="50" height="50" y="-7"/>
<body name="t_bb_s" x="33" rotation="0" width="50" height="50" y="422"/>
<body name="t_bb_s" x="82" rotation="0" width="50" height="50" y="423"/>
<body name="t_bk2_d" x="445" rotation="89" width="80" height="21" y="360"/>
<body name="t_rolB1_d" x="304" rotation="0" width="37" height="38" y="153"/>
<body name="t_rolG5_d" x="406" rotation="0" width="40" height="45" y="364"/>
<body name="t_rolB2_d" x="294" rotation="0" width="36" height="45" y="370"/>
<body name="t_rolG2_d" x="455" rotation="0" width="39" height="38" y="241"/>
<body name="t_rolB5_d" x="201" rotation="0" width="36" height="47" y="154"/>
<body name="t_revolute" x="445" rotation="0" width="23" height="23" y="389"/>
<body name="t_pushka" x="48" rotation="0" width="86" height="51" y="369"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nameLevel="LEVEL 17" numberLevel="17" nickLevel="Johnny-K" fon="4">
<bodies>
<body name="t_bs_s" x="219" rotation="0" width="50" height="50" y="65"/>
<body name="t_bs_s" x="219" rotation="0" width="50" height="50" y="16"/>
<body name="t_bs_s" x="219" rotation="0" width="50" height="50" y="105"/>
<body name="t_b2_s" x="294" rotation="0" width="85" height="19" y="264"/>
<body name="t_b2_s" x="262" rotation="90" width="112" height="19" y="204"/>
<body name="t_b2_s" x="562" rotation="0" width="85" height="19" y="157"/>
<body name="t_b2_s" x="479" rotation="0" width="85" height="19" y="157"/>
<body name="t_b2_s" x="395" rotation="0" width="85" height="19" y="157"/>
<body name="t_b2_s" x="311" rotation="0" width="85" height="19" y="157"/>
<body name="t_barm_s" x="578" rotation="0" width="236" height="24" y="326"/>
<body name="t_barm_s" x="369" rotation="0" width="236" height="24" y="326"/>
<body name="t_b2_s" x="675" rotation="-27" width="85" height="19" y="210"/>
<body name="t_b2_s" x="528" rotation="0" width="85" height="19" y="266"/>
<body name="t_b2_s" x="600" rotation="-27" width="85" height="19" y="248"/>
<body name="t_b2_s" x="676" rotation="90" width="112" height="19" y="261"/>
<body name="t_barm_s" x="178" rotation="0" width="236" height="24" y="435"/>
<body name="t_bs_s" x="35" rotation="0" width="50" height="50" y="423"/>
<body name="t_bs_s" x="35" rotation="0" width="50" height="50" y="373"/>
<body name="t_bs_s" x="174" rotation="0" width="50" height="50" y="32"/>
<body name="t_bs_s" x="124" rotation="0" width="50" height="50" y="32"/>
<body name="t_bs_s" x="74" rotation="0" width="50" height="50" y="32"/>
<body name="t_bs_s" x="24" rotation="0" width="50" height="50" y="32"/>
<body name="t_bte_d" x="319" rotation="90" width="40" height="71" y="293"/>
<body name="t_bk_d" x="358" rotation="0" width="220" height="53" y="113"/>
<body name="t_rolG1_d" x="641" rotation="0" width="48" height="43" y="298"/>
<body name="t_rolB5_d" x="268" rotation="0" width="36" height="47" y="299"/>
<body name="t_rolG3_d" x="372" rotation="0" width="43" height="38" y="299"/>
<body name="t_rolB1_d" x="279" rotation="0" width="37" height="38" y="74"/>
<body name="t_rolG4_d" x="437" rotation="0" width="44" height="51" y="74"/>
<body name="t_revolute" x="358" rotation="0" width="18" height="18" y="114"/>
<body name="t_pushka" x="43" rotation="0" width="86" height="51" y="319"/>
<body name="t_fire1_s" x="249" rotation="0" width="180" height="150" y="379"/>
<body name="t_fire1_s" x="106" rotation="0" width="180" height="150" y="377"/>
<body name="t_fire1_s" x="179" rotation="0" width="180" height="150" y="375"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="18" nameLevel="LEVEL 18" nickLevel="Johnny-K" fon="5">
<bodies>
<body name="t_b2_s" x="673" rotation="90" width="51" height="19" y="304"/>
<body name="t_b2_s" x="656" rotation="0" width="51" height="19" y="336"/>
<body name="t_b2_s" x="656" rotation="0" width="51" height="19" y="355"/>
<body name="t_b2_s" x="656" rotation="0" width="51" height="19" y="374"/>
<body name="t_b2_s" x="656" rotation="0" width="51" height="19" y="393"/>
<body name="t_b2_s" x="465" rotation="0" width="51" height="19" y="18"/>
<body name="t_b2_s" x="516" rotation="0" width="51" height="19" y="18"/>
<body name="t_b2_s" x="363" rotation="0" width="51" height="19" y="18"/>
<body name="t_b2_s" x="414" rotation="0" width="51" height="19" y="18"/>
<body name="t_b2_s" x="618" rotation="0" width="51" height="19" y="18"/>
<body name="t_b2_s" x="567" rotation="0" width="51" height="19" y="18"/>
<body name="t_b2_s" x="669" rotation="0" width="51" height="19" y="18"/>
<body name="t_b2_s" x="365" rotation="0" width="51" height="19" y="141"/>
<body name="t_b2_s" x="382" rotation="90" width="51" height="19" y="373"/>
<body name="t_b2_s" x="382" rotation="90" width="51" height="19" y="272"/>
<body name="t_b2_s" x="382" rotation="90" width="51" height="19" y="322"/>
<body name="t_b2_s" x="382" rotation="90" width="51" height="19" y="172"/>
<body name="t_b2_s" x="382" rotation="90" width="51" height="19" y="222"/>
<body name="t_barm_s" x="17" rotation="90" width="236" height="24" y="435"/>
<body name="t_barm_s" x="42" rotation="0" width="236" height="24" y="410"/>
<body name="t_barm_s" x="274" rotation="0" width="236" height="24" y="410"/>
<body name="t_bk_d" x="555" rotation="0" width="217" height="15" y="319"/>
<body name="t_ck_d" x="364" rotation="0" width="103" height="103" y="80"/>
<body name="t_cz_d" x="657" rotation="0" width="17" height="21" y="298"/>
<body name="t_rolB3_d" x="633" rotation="0" width="39" height="40" y="296"/>
<body name="t_rolG2_d" x="247" rotation="0" width="39" height="38" y="386"/>
<body name="t_rolG3_d" x="190" rotation="0" width="43" height="38" y="385"/>
<body name="t_rolG4_d" x="130" rotation="0" width="44" height="51" y="389"/>
<body name="t_rolG1_d" x="301" rotation="0" width="48" height="43" y="386"/>
<body name="t_o_d" x="99" rotation="0" width="25" height="21" y="390"/>
<body name="t_o_d" x="273" rotation="0" width="25" height="21" y="390"/>
<body name="t_o_d" x="218" rotation="0" width="25" height="21" y="390"/>
<body name="t_o_d" x="159" rotation="0" width="25" height="21" y="390"/>
<body name="t_o_d" x="330" rotation="0" width="25" height="21" y="390"/>
<body name="t_revolute" x="557" rotation="0" width="17" height="17" y="319"/>
<body name="t_pushka" x="67" rotation="0" width="86" height="51" y="369"/>
<body name="t_fire1_s" x="529" rotation="0" width="180" height="150" y="378"/>
<body name="t_fire1_s" x="447" rotation="0" width="180" height="150" y="378"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="31" nickLevel="Johnny-K" nameLevel="LEVEL 31" fon="5">
<bodies>
<body name="t_barm_s" x="544" rotation="0" width="236" height="24" y="389"/>
<body name="t_barm_s" x="312" rotation="0" width="236" height="24" y="389"/>
<body name="t_barm_s" x="79" rotation="0" width="236" height="24" y="389"/>
<body name="t_barm_s" x="30" rotation="90" width="236" height="24" y="321"/>
<body name="t_barm_s" x="356" rotation="90" width="236" height="24" y="459"/>
<body name="t_barm_s" x="544" rotation="0" width="236" height="24" y="13"/>
<body name="t_barm_s" x="449" rotation="90" width="236" height="24" y="39"/>
<body name="t_barm_s" x="449" rotation="90" width="236" height="24" y="298"/>
<body name="t_barm_s" x="613" rotation="90" width="236" height="24" y="39"/>
<body name="t_barm_s" x="613" rotation="90" width="236" height="24" y="300"/>
<body name="t_bs_s" x="352" rotation="0" width="25" height="25" y="280"/>
<body name="t_barm_s" x="332" rotation="90" width="236" height="24" y="459"/>
<body name="t_bs_s" x="327" rotation="0" width="25" height="25" y="280"/>
<body name="t_ck_d" x="566" rotation="0" width="20" height="20" y="75"/>
<body name="t_ck_d" x="490" rotation="0" width="20" height="20" y="72"/>
<body name="t_ck_d" x="512" rotation="0" width="20" height="20" y="53"/>
<body name="t_ck_d" x="528" rotation="0" width="20" height="20" y="76"/>
<body name="t_ck_d" x="549" rotation="0" width="20" height="20" y="38"/>
<body name="t_ck_d" x="480" rotation="0" width="20" height="20" y="43"/>
<body name="t_ck_d" x="508" rotation="0" width="20" height="20" y="94"/>
<body name="t_ck_d" x="488" rotation="0" width="20" height="20" y="129"/>
<body name="t_ck_d" x="540" rotation="0" width="20" height="20" y="125"/>
<body name="t_ck_d" x="569" rotation="0" width="20" height="20" y="99"/>
<body name="t_ck_d" x="588" rotation="0" width="20" height="20" y="57"/>
<body name="t_ck_d" x="570" rotation="0" width="20" height="20" y="145"/>
<body name="t_ck_d" x="589" rotation="0" width="20" height="20" y="129"/>
<body name="t_bk_d" x="507" rotation="0" width="196" height="11" y="175"/>
<body name="t_b_d" x="330" rotation="0" width="78" height="46" y="316"/>
<body name="t_rolB4_d" x="587" rotation="0" width="40" height="38" y="364"/>
<body name="t_rolB5_d" x="535" rotation="0" width="36" height="47" y="368"/>
<body name="t_rolB2_d" x="475" rotation="0" width="36" height="45" y="365"/>
<body name="t_rolG3_d" x="419" rotation="0" width="43" height="38" y="361"/>
<body name="t_o_d" x="559" rotation="0" width="25" height="21" y="371"/>
<body name="t_o_d" x="502" rotation="0" width="25" height="21" y="368"/>
<body name="t_pushka" x="78" rotation="0" width="86" height="51" y="348"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa nickLevel="Johnny-K" fon="5" numberLevel="49" nameLevel="LEVEL 49">
<bodies>
<body name="t_b2_s" x="624" rotation="-50" width="51" height="19" y="273"/>
<body name="t_b2_s" x="669" rotation="-80" width="51" height="19" y="189"/>
<body name="t_b2_s" x="653" rotation="-60" width="51" height="19" y="233"/>
<body name="t_b2_s" x="673" rotation="-90" width="51" height="19" y="140"/>
<body name="t_b2_s" x="258" rotation="0" width="51" height="19" y="374"/>
<body name="t_b2_s" x="309" rotation="0" width="51" height="19" y="374"/>
<body name="t_b2_s" x="207" rotation="0" width="51" height="19" y="374"/>
<body name="t_bs_s" x="293" rotation="0" width="50" height="50" y="284"/>
<body name="t_bs_s" x="248" rotation="0" width="50" height="50" y="234"/>
<body name="t_bs_s" x="293" rotation="0" width="50" height="50" y="234"/>
<body name="t_b2_s" x="550" rotation="-30" width="51" height="19" y="335"/>
<body name="t_b2_s" x="506" rotation="-20" width="51" height="19" y="356"/>
<body name="t_b2_s" x="459" rotation="-10" width="51" height="19" y="369"/>
<body name="t_b2_s" x="411" rotation="0" width="51" height="19" y="374"/>
<body name="t_b2_s" x="360" rotation="0" width="51" height="19" y="374"/>
<body name="t_b2_s" x="590" rotation="-40" width="51" height="19" y="307"/>
<body name="t_b2_s" x="488" rotation="-20" width="51" height="19" y="300"/>
<body name="t_b2_s" x="441" rotation="-10" width="51" height="19" y="313"/>
<body name="t_b2_s" x="393" rotation="0" width="51" height="19" y="318"/>
<body name="t_b2_s" x="342" rotation="0" width="51" height="19" y="318"/>
<body name="t_b2_s" x="619" rotation="-70" width="51" height="19" y="171"/>
<body name="t_b2_s" x="674" rotation="-90" width="51" height="19" y="59"/>
<body name="t_bs_s" x="342" rotation="0" width="50" height="50" y="284"/>
<body name="t_bs_s" x="391" rotation="0" width="50" height="50" y="284"/>
<body name="t_bs_s" x="342" rotation="0" width="50" height="50" y="234"/>
<body name="t_bs_s" x="391" rotation="0" width="50" height="50" y="234"/>
<body name="t_b2_s" x="673" rotation="-90" width="51" height="19" y="8"/>
<body name="t_b2_s" x="656" rotation="-90" width="51" height="19" y="20"/>
<body name="t_b2_s" x="638" rotation="-90" width="51" height="19" y="24"/>
<body name="t_b2_s" x="532" rotation="-30" width="51" height="19" y="279"/>
<body name="t_bs_s" x="201" rotation="0" width="50" height="50" y="284"/>
<body name="t_bs_s" x="201" rotation="0" width="50" height="50" y="234"/>
<body name="t_b2_s" x="201" rotation="0" width="51" height="19" y="200"/>
<body name="t_b2_s" x="250" rotation="0" width="51" height="19" y="200"/>
<body name="t_b2_s" x="201" rotation="0" width="51" height="19" y="318"/>
<body name="t_b2_s" x="294" rotation="0" width="51" height="19" y="318"/>
<body name="t_b2_s" x="33" rotation="0" width="51" height="19" y="396"/>
<body name="t_b2_s" x="33" rotation="0" width="51" height="19" y="414"/>
<body name="t_b2_s" x="390" rotation="0" width="51" height="19" y="201"/>
<body name="t_b2_s" x="350" rotation="0" width="51" height="19" y="200"/>
<body name="t_b2_s" x="300" rotation="0" width="51" height="19" y="200"/>
<body name="t_b2_s" x="250" rotation="0" width="51" height="19" y="182"/>
<body name="t_b2_s" x="300" rotation="0" width="51" height="19" y="182"/>
<body name="t_b2_s" x="340" rotation="0" width="51" height="19" y="183"/>
<body name="t_b2_s" x="274" rotation="0" width="51" height="19" y="164"/>
<body name="t_b2_s" x="314" rotation="0" width="51" height="19" y="165"/>
<body name="t_b2_s" x="293" rotation="0" width="51" height="19" y="147"/>
<body name="t_b2_s" x="620" rotation="-90" width="51" height="19" y="23"/>
<body name="t_b2_s" x="620" rotation="-90" width="51" height="19" y="73"/>
<body name="t_b2_s" x="612" rotation="-70" width="51" height="19" y="141"/>
<body name="t_b2_s" x="615" rotation="-80" width="51" height="19" y="121"/>
<body name="t_b2_s" x="637" rotation="-90" width="51" height="19" y="75"/>
<body name="t_b2_s" x="632" rotation="-80" width="51" height="19" y="124"/>
<body name="t_bte_d" x="248" rotation="0" width="41" height="51" y="306"/>
<body name="t_rolB2_d" x="247" rotation="0" width="36" height="45" y="352"/>
<body name="t_rolB5_d" x="671" rotation="0" width="36" height="47" y="103"/>
<body name="t_o_d" x="657" rotation="0" width="25" height="21" y="166"/>
<body name="t_o_d" x="657" rotation="0" width="25" height="21" y="135"/>
<body name="t_joint_fixed" x="660" rotation="0" width="15" height="15" y="171"/>
<body name="t_joint_fixed" x="666" rotation="0" width="15" height="15" y="133"/>
<body name="t_pushka" x="41" rotation="0" width="86" height="51" y="358"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
_local1 = <xml>
<jopa numberLevel="50" nameLevel="LEVEL 50" nickLevel="Johnny-K" fon="1">
<bodies>
<body name="t_b2_s" width="87" height="19" y="19" rotation="0" x="441"/>
<body name="t_b2_s" width="95" height="19" y="19" rotation="0" x="354"/>
<body name="t_b2_s" width="10" height="10" y="33" rotation="0" x="396"/>
<body name="t_b2_s" width="87" height="19" y="19" rotation="0" x="525"/>
<body name="t_b2_s" width="95" height="19" y="91" rotation="0" x="352"/>
<body name="t_b2_s" width="10" height="10" y="105" rotation="0" x="394"/>
<body name="t_b2_s" width="87" height="19" y="304" rotation="0" x="352"/>
<body name="t_b2_s" width="10" height="10" y="247" rotation="0" x="389"/>
<body name="t_b2_s" width="10" height="10" y="318" rotation="0" x="390"/>
<body name="t_b2_s" width="87" height="19" y="233" rotation="0" x="351"/>
<body name="t_b2_s" width="87" height="19" y="161" rotation="0" x="349"/>
<body name="t_b2_s" width="10" height="10" y="174" rotation="0" x="387"/>
<body name="t_b2_s" width="87" height="19" y="71" rotation="90" x="492"/>
<body name="t_b2_s" width="87" height="19" y="70" rotation="90" x="560"/>
<body name="t_b2_s" width="87" height="19" y="273" rotation="0" x="530"/>
<body name="t_b2_s" width="87" height="19" y="71" rotation="90" x="509"/>
<body name="t_b2_s" width="87" height="19" y="71" rotation="90" x="526"/>
<body name="t_b2_s" width="87" height="19" y="71" rotation="90" x="543"/>
<body name="t_b2_s" width="87" height="19" y="122" rotation="0" x="526"/>
<body name="t_b2_s" width="87" height="19" y="240" rotation="90" x="547"/>
<body name="t_b2_s" width="87" height="19" y="240" rotation="90" x="529"/>
<body name="t_b2_s" width="87" height="19" y="240" rotation="90" x="512"/>
<body name="t_b2_s" width="87" height="19" y="240" rotation="90" x="495"/>
<body name="t_b2_s" width="87" height="19" y="240" rotation="90" x="564"/>
<body name="t_b2_s" width="87" height="19" y="206" rotation="0" x="528"/>
<body name="t_b2_s" width="87" height="19" y="412" rotation="0" x="352"/>
<body name="t_b2_s" width="87" height="19" y="376" rotation="0" x="352"/>
<body name="t_b2_s" width="87" height="19" y="394" rotation="0" x="352"/>
<body name="t_b2_s" width="10" height="10" y="398" rotation="0" x="400"/>
<body name="t_b2_s" width="87" height="19" y="422" rotation="0" x="44"/>
<body name="t_b2_s" width="87" height="19" y="290" rotation="0" x="529"/>
<body name="t_b2_s" width="87" height="19" y="393" rotation="0" x="529"/>
<body name="t_b2_s" width="87" height="19" y="342" rotation="90" x="564"/>
<body name="t_b2_s" width="87" height="19" y="342" rotation="90" x="495"/>
<body name="t_b2_s" width="87" height="19" y="342" rotation="90" x="512"/>
<body name="t_b2_s" width="87" height="19" y="342" rotation="90" x="529"/>
<body name="t_b2_s" width="87" height="19" y="342" rotation="90" x="547"/>
<body name="t_b2_s" width="87" height="19" y="445" rotation="90" x="565"/>
<body name="t_b2_s" width="87" height="19" y="445" rotation="90" x="496"/>
<body name="t_b2_s" width="87" height="19" y="445" rotation="90" x="513"/>
<body name="t_b2_s" width="87" height="19" y="445" rotation="90" x="530"/>
<body name="t_b2_s" width="87" height="19" y="445" rotation="90" x="548"/>
<body name="t_bte_d" width="36" height="51" y="56" rotation="0" x="342"/>
<body name="t_bte_d" width="36" height="51" y="127" rotation="0" x="343"/>
<body name="t_bte_d" width="36" height="51" y="198" rotation="0" x="342"/>
<body name="t_mpv_d" width="86" height="16" y="190" rotation="0" x="439"/>
<body name="t_bte_d" width="36" height="51" y="269" rotation="0" x="344"/>
<body name="t_bte_d" width="36" height="51" y="340" rotation="0" x="346"/>
<body name="t_rolG3_d" width="43" height="38" y="63" rotation="0" x="381"/>
<body name="t_rolG3_d" width="43" height="38" y="278" rotation="0" x="380"/>
<body name="t_rolG2_d" width="39" height="38" y="140" rotation="0" x="379"/>
<body name="t_rolB5_d" width="36" height="47" y="208" rotation="0" x="380"/>
<body name="t_rolB1_d" width="37" height="38" y="182" rotation="0" x="556"/>
<body name="t_rolG4_d" width="44" height="51" y="352" rotation="0" x="382"/>
<body name="t_o_d" width="25" height="21" y="190" rotation="0" x="525"/>
<body name="t_pushka" width="86" height="51" y="386" rotation="0" x="49"/>
</bodies>
</jopa>
</xml>
;
_local2.push(_local1);
var _local3:Array = [];
var _local4 = 1;
while (_local4 < 51) {
for each (_local5 in _local2) {
for each (_local6 in _local5.children()) {
if (_local6.name() == "jopa"){
_local7 = _local6.attribute("numberLevel");
if (_local7 == _local4){
_local3.push(_local5);
_local4++;
break;
};
};
};
};
};
_local2 = null;
return (_local3);
}
}
}//package
Section 135
//ClassControlPlayersLevels (ClassControlPlayersLevels)
package {
import flash.events.*;
import flash.system.*;
import flash.net.*;
public class ClassControlPlayersLevels extends EventDispatcher {
public const EVENT_STR_READY:String = "EVENT_STR_READY";
private var numStepLevel:Number;
private var strLevel:String;
private function convertStrIn10(_arg1:String):String{
var _local4:String;
var _local5:Number;
var _local6:String;
var _local2 = "c";
var _local3:Number = 1;
while (_local3 < (_arg1.length - 1)) {
_local4 = _arg1.substr(_local3, 2);
_local5 = int(("0x" + _local4));
_local6 = String.fromCharCode(_local5);
_local2 = (_local2 + _local6);
_local3 = (_local3 + 2);
};
_local2 = (_local2 + "o");
return (_local2);
}
private function gettingCodeComplete(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
var _local3:String = _local2.data;
if (_local3 == "jopa"){
trace("jopa");
} else {
strLevel = convertStrIn10(_local3);
strLevel = strLevel.substring(1, (strLevel.length - 1));
strReady();
};
}
public function setNumLevelStep(_arg1:Number, _arg2:String):void{
numStepLevel = _arg1;
Security.loadPolicyFile("http://www.bubblebox.com/crossdomain.xml");
getLevelCodeByID(numStepLevel, _arg2);
}
private function getLevelCodeByID(_arg1:Number, _arg2:String):void{
var _local3:URLRequest = new URLRequest(_arg2);
var _local4:URLVariables = new URLVariables();
_local4.guid = _arg1;
_local3.data = _local4;
_local3.method = URLRequestMethod.POST;
var _local5:URLLoader = new URLLoader();
_local5.dataFormat = URLLoaderDataFormat.TEXT;
_local5.addEventListener(Event.COMPLETE, gettingCodeComplete);
_local5.load(_local3);
}
private function strReady():void{
dispatchEvent(new Event(EVENT_STR_READY));
}
public function getStrLevelFromNumber():XML{
var _local1:XML = new XML(strLevel);
return (_local1);
}
}
}//package
Section 136
//ClassInformGame (ClassInformGame)
package {
import Tela.*;
public class ClassInformGame {
public static const EVENT_TOTALSCORES:String = "EVENT_TOTALSCORES";
public static const EVENT_CREATE_LEVEL:String = "EVENT_CREATE_LEVEL";
public static const EVENT_MAKESHOT:String = "EVENT_MAKESHOT";
public static const RAGDOLL:String = "Rag_doll18";
public static const EVENT_LEVEL_COMPLETED:String = "EVENT_LEVEL_COMPLETED";
public static const ROLYPOLY:String = "Roly_poly7";
public static const EVENT_KILLED_RAGDOLL:String = "EVENT_KILLED_RAGDOLL";
public static const EVENT_GAMEOVER:String = "EVENT_GAMEOVER";
public static const EVENT_KILLED_ALL_GOOD_ROLY:String = "EVENT_KILLED_ALL_GOOD_ROLY";
public static const EVENT_LEVEL_LOSE:String = "EVENT_LEVEL_LOSE";
public static const EVENT_CHANGESCORES:String = "EVENT_CHANGESCORES";
public static var classMovieBlastBomb:Class;
public static var classShot:Class;
public static var nameGame:String = "Roly_poly7";
public static var isShowLink_iPhone:Boolean = true;
public static var classCore_1:Class;
public static var classCore_2:Class;
public static var idGame:Number;
public static var countCoreOnLevel:Number;
public static var pogreshnostVGabaritah:Number;
public static var bombRadius:Number;
public static var isShowIntro:Boolean = true;
public static var pauseBeforShot:Number;
public static var gameClassCore:Class;
public static var arrBadges:Array;
public static function assignNameGame():void{
var _local1:String;
var _local2:String;
var _local3:String;
if (nameGame == RAGDOLL){
_local1 = "ragdoll_1";
_local2 = "ragdoll_2";
_local3 = "shot_bomb";
gameClassCore = ClassRagdoll;
pauseBeforShot = 5;
countCoreOnLevel = 5;
bombRadius = 12;
pogreshnostVGabaritah = -3;
idGame = 1813;
};
if (nameGame == ROLYPOLY){
_local1 = "t_o_d";
_local2 = "t_o_d";
_local3 = "shot_bomb";
gameClassCore = ClassBomb;
pauseBeforShot = 5;
countCoreOnLevel = 100;
bombRadius = 18;
pogreshnostVGabaritah = 0;
idGame = 1814;
};
setFirstBadges();
classCore_1 = Ragdoll_3.swfMovies.getAssetClass(_local1);
classCore_2 = Ragdoll_3.swfMovies.getAssetClass(_local2);
classMovieBlastBomb = Ragdoll_3.swfMovies.getAssetClass(_local3);
}
public static function setFirstBadges():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:Array;
var _local9:Array;
var _local10:Array;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:Array;
var _local16:Array;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
if (nameGame == RAGDOLL){
_local1 = [1, "badge_01", [[EVENT_LEVEL_COMPLETED, 0, 1, 2, false], [EVENT_CHANGESCORES, 0, 1, 2, false]], "Level 2 completed in 1 shots"];
_local2 = [2, "badge_02", [[EVENT_KILLED_RAGDOLL, 0, 4, 5, false]], "4 ragdolls blasted on level 5"];
_local3 = [3, "badge_03", [[EVENT_KILLED_RAGDOLL, 0, 7, 20, false]], "7 ragdolls blasted on level 20"];
_local4 = [4, "badge_04", [[EVENT_LEVEL_COMPLETED, 0, 1, 18, false], [EVENT_CHANGESCORES, 0, 2, 18, false]], "Level 18 completed in 2 shots"];
_local5 = [5, "badge_05", [[EVENT_LEVEL_COMPLETED, 0, 1, 25, false]], "Level 25 completed!"];
_local6 = [6, "badge_06", [[EVENT_LEVEL_COMPLETED, 0, 1, 27, false], [EVENT_CHANGESCORES, 0, 2, 27, false]], "Level 27 completed in 2 shots"];
_local7 = [7, "badge_07", [[EVENT_LEVEL_COMPLETED, 0, 1, 28, false], [EVENT_CHANGESCORES, 0, 1, 28, false]], "Level 28 completed in 1 shots"];
_local8 = [8, "badge_08", [[EVENT_LEVEL_COMPLETED, 0, 1, 29, false], [EVENT_CHANGESCORES, 0, 1, 29, false]], "Level 29 completed in 1 shots"];
_local9 = [9, "badge_09", [[EVENT_LEVEL_COMPLETED, 0, 1, 35, false], [EVENT_CHANGESCORES, 0, 2, 35, false]], "Level 35 completed in 2 shots"];
_local10 = [10, "badge_10", [[EVENT_LEVEL_COMPLETED, 0, 1, 39, false]], "Level 39 completed!"];
_local11 = [11, "badge_11", [[EVENT_LEVEL_COMPLETED, 0, 1, 40, false], [EVENT_CHANGESCORES, 0, 2, 40, false]], "Level 40 completed in 2 shots"];
_local12 = [12, "badge_12", [[EVENT_LEVEL_COMPLETED, 0, 1, 42, false], [EVENT_CHANGESCORES, 0, 3, 42, false]], "Level 42 completed in 3 shots"];
_local13 = [13, "badge_13", [[EVENT_LEVEL_COMPLETED, 0, 1, 43, false], [EVENT_CHANGESCORES, 0, 2, 43, false]], "Level 43 completed in 2 shots"];
_local14 = [14, "badge_14", [[EVENT_KILLED_RAGDOLL, 0, 6, 44, false]], "6 ragdolls blasted on level 44"];
_local15 = [15, "badge_15", [[EVENT_LEVEL_COMPLETED, 0, 1, 45, false], [EVENT_CHANGESCORES, 0, 2, 45, false]], "Level 45 completed in 2 shots"];
_local16 = [16, "badge_16", [[EVENT_LEVEL_COMPLETED, 0, 1, 47, false], [EVENT_CHANGESCORES, 0, 1, 47, false]], "Level 47 completed in 1 shots"];
_local17 = [17, "badge_17", [[EVENT_KILLED_RAGDOLL, 0, 10, 48, false]], "10 ragdolls blasted on level 48"];
_local18 = [18, "badge_18", [[EVENT_GAMEOVER, 0, 1, -1, false]], "Game completed!"];
_local19 = [19, "badge_19", [[EVENT_GAMEOVER, 0, 1, -1, false], [EVENT_TOTALSCORES, 0, 0, 100, false]], "Game completed with a score below 100"];
_local20 = [20, "badge_20", [[EVENT_CREATE_LEVEL, 0, 3, -1, false]], "Create and share your own three levels"];
};
if (nameGame == ROLYPOLY){
_local1 = [1, "badge_01", [[EVENT_LEVEL_COMPLETED, 0, 1, 3, false], [EVENT_CHANGESCORES, 0, 2, 3, false]], "Level 3 completed in 2 shots"];
_local2 = [2, "badge_02", [[EVENT_LEVEL_COMPLETED, 0, 1, 4, false], [EVENT_CHANGESCORES, 0, 1, 4, false]], "Level 4 completed in 1 shots"];
_local3 = [3, "badge_03", [[EVENT_KILLED_ALL_GOOD_ROLY, 0, 1, 6, false]], "All friendly Roly Polys \n blasted on level 6"];
_local4 = [4, "badge_04", [[EVENT_LEVEL_COMPLETED, 0, 1, 8, false], [EVENT_CHANGESCORES, 0, 1, 8, false]], "Level 8 completed of 1 shots"];
_local5 = [5, "badge_05", [[EVENT_LEVEL_COMPLETED, 0, 1, 10, false], [EVENT_CHANGESCORES, 0, 2, 10, false]], "Level 10 completed of 2 shots"];
_local6 = [6, "badge_06", [[EVENT_LEVEL_COMPLETED, 0, 1, 14, false]], "Level 14 completed"];
_local7 = [7, "badge_07", [[EVENT_LEVEL_COMPLETED, 0, 1, 16, false], [EVENT_CHANGESCORES, 0, 2, 16, false]], "Level 16 completed of 2 shots"];
_local8 = [8, "badge_08", [[EVENT_LEVEL_COMPLETED, 0, 1, 19, false], [EVENT_CHANGESCORES, 0, 2, 19, false]], "Level 19 completed of 2 shots"];
_local9 = [9, "badge_09", [[EVENT_LEVEL_COMPLETED, 0, 1, 21, false], [EVENT_CHANGESCORES, 0, 1, 21, false]], "Level 21 completed of 1 shots"];
_local10 = [10, "badge_10", [[EVENT_KILLED_ALL_GOOD_ROLY, 0, 1, 26, false]], "Friendly Roly Poly blasted on level 26"];
_local11 = [11, "badge_11", [[EVENT_LEVEL_COMPLETED, 0, 1, 38, false], [EVENT_CHANGESCORES, 0, 1, 38, false]], "Level 38 completed of 1 shots"];
_local12 = [12, "badge_12", [[EVENT_LEVEL_COMPLETED, 0, 1, 40, false]], "Level 40 completed"];
_local13 = [13, "badge_13", [[EVENT_MAKESHOT, 0, 250, 40, false]], "Do 250 shots on level 40"];
_local14 = [14, "badge_14", [[EVENT_LEVEL_COMPLETED, 0, 1, 44, false]], "Level 44 completed"];
_local15 = [15, "badge_15", [[EVENT_LEVEL_COMPLETED, 0, 1, 47, false]], "Level 47 completed"];
_local16 = [16, "badge_16", [[EVENT_LEVEL_COMPLETED, 0, 1, 48, false]], "Level 48 completed"];
_local17 = [17, "badge_17", [[EVENT_LEVEL_COMPLETED, 0, 1, 49, false]], "Level 49 completed"];
_local18 = [18, "badge_18", [[EVENT_GAMEOVER, 0, 1, -1, false]], "Game completed!"];
_local19 = [19, "badge_19", [[EVENT_GAMEOVER, 0, 1, -1, false], [EVENT_TOTALSCORES, 0, 0, 300, false]], "Game completed with a score below 300"];
_local20 = [20, "badge_20", [[EVENT_CREATE_LEVEL, 0, 3, -1, false]], "Create and share your own three levels"];
};
arrBadges = [_local1, _local2, _local3, _local4, _local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12, _local13, _local14, _local15, _local16, _local17, _local18, _local19, _local20];
}
}
}//package
Section 137
//ClassIphone (ClassIphone)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class ClassIphone {
private var movieIphone:SimpleButton;
private var mainSprite:Sprite;
public function ClassIphone(_arg1:Sprite, _arg2:Point, _arg3:Point){
mainSprite = _arg1;
var _local4:Class = Ragdoll_3.swfMovies.getAssetClass("but_iphone");
movieIphone = new (_local4);
movieIphone.x = _arg2.x;
movieIphone.y = _arg2.y;
movieIphone.width = _arg3.x;
movieIphone.height = _arg3.y;
mainSprite.addChild(movieIphone);
movieIphone.addEventListener(MouseEvent.CLICK, goUpstore);
}
public function destroy():void{
movieIphone.removeEventListener(MouseEvent.CLICK, goUpstore);
mainSprite.removeChild(movieIphone);
movieIphone = null;
mainSprite = null;
}
private function goUpstore(_arg1:MouseEvent):void{
ClassLinks.goToLink("goUpstore", "http://itunes.apple.com/app/physics-gamebox/id368037317?mt=8");
}
}
}//package
Section 138
//ClassKeys (ClassKeys)
package {
import flash.events.*;
import flash.display.*;
public class ClassKeys {
private var press_left:Boolean;// = false
private var press_space:Boolean;// = false
private var press_shift:Boolean;// = false
private var movieclip:Stage;
private var press_N:Boolean;// = false
private var press_R:Boolean;// = false
private var press_up:Boolean;// = false
private var press_right:Boolean;// = false
private var press_down:Boolean;// = false
private var press_ctrl:Boolean;// = false
private var press_alt:Boolean;// = false
private var press_DEL:Boolean;// = false
public function ClassKeys(_arg1:Stage){
movieclip = _arg1;
movieclip.addEventListener(KeyboardEvent.KEY_DOWN, key_down);
movieclip.addEventListener(KeyboardEvent.KEY_UP, key_up);
}
private function key_down(_arg1:KeyboardEvent):void{
if (_arg1.altKey){
press_alt = true;
};
if (_arg1.shiftKey){
press_shift = true;
};
if (_arg1.keyCode == 78){
press_N = true;
};
if (_arg1.keyCode == 32){
press_space = true;
};
if (_arg1.keyCode == 37){
press_left = true;
};
if (_arg1.keyCode == 38){
press_up = true;
};
if (_arg1.keyCode == 39){
press_right = true;
};
if (_arg1.keyCode == 40){
press_down = true;
};
if (_arg1.keyCode == 17){
press_ctrl = true;
};
if (_arg1.keyCode == 82){
press_R = true;
};
if (_arg1.keyCode == 46){
press_DEL = true;
};
}
public function is_left():Boolean{
return (press_left);
}
public function is_up():Boolean{
return (press_up);
}
public function falsePress():void{
press_left = false;
press_right = false;
press_up = false;
press_down = false;
press_space = false;
press_ctrl = false;
press_R = false;
press_N = false;
press_shift = false;
press_alt = false;
press_DEL = false;
}
public function is_alt():Boolean{
return (press_alt);
}
public function is_DEL():Boolean{
return (press_DEL);
}
public function is_right():Boolean{
return (press_right);
}
public function is_down():Boolean{
return (press_down);
}
public function is_space():Boolean{
return (press_space);
}
public function is_shift():Boolean{
return (press_shift);
}
public function is_ctrl():Boolean{
return (press_ctrl);
}
public function is_N():Boolean{
return (press_N);
}
public function destroy():void{
movieclip.removeEventListener(KeyboardEvent.KEY_DOWN, key_down);
movieclip.removeEventListener(KeyboardEvent.KEY_UP, key_up);
movieclip = null;
}
private function key_up(_arg1:KeyboardEvent):void{
if (_arg1.altKey){
press_alt = false;
};
if (_arg1.shiftKey){
press_shift = false;
};
if (_arg1.keyCode == 78){
press_N = false;
};
if (_arg1.keyCode == 32){
press_space = false;
};
if (_arg1.keyCode == 37){
press_left = false;
};
if (_arg1.keyCode == 38){
press_up = false;
};
if (_arg1.keyCode == 39){
press_right = false;
};
if (_arg1.keyCode == 40){
press_down = false;
};
if (_arg1.keyCode == 17){
press_ctrl = false;
};
if (_arg1.keyCode == 46){
press_DEL = false;
};
}
public function is_R():Boolean{
return (press_R);
}
}
}//package
Section 139
//ClassKongregate (ClassKongregate)
package {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
public class ClassKongregate {
private var loader:Loader;
public var isOpen:Boolean;
public var kongregate;
private var mainSprite:Sprite;
public function ClassKongregate(_arg1:Sprite){
mainSprite = _arg1;
}
public function init():void{
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local1:String = mainSprite.stage.loaderInfo.url;
trace(_local1);
if (_local1.indexOf("kongregate.com") > -1){
_local2 = LoaderInfo(mainSprite.root.loaderInfo).parameters;
_local3 = ((_local2.kongregate_api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
Security.allowDomain(_local3);
_local4 = new URLRequest(_local3);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(_local4);
setStrite(mainSprite);
} else {
isOpen = false;
};
}
public function setStrite(_arg1:Sprite):void{
mainSprite = _arg1;
mainSprite.addChild(loader);
}
private function loadComplete(_arg1:Event):void{
kongregate = _arg1.target.content;
kongregate.services.connect();
isOpen = true;
}
}
}//package
Section 140
//ClassLinks (ClassLinks)
package {
import flash.events.*;
import flash.net.*;
public class ClassLinks {
public static function goToLink(_arg1:String, _arg2:String=null, _arg3=true):void{
var objectMessage:ClassMessage;
var closeMessage:Function;
var s = _arg1;
var strLink = _arg2;
var isMakePause = _arg3;
var id:Number = ClassInformGame.idGame;
var l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=");
if (s.length == 0){
s = "undef";
};
l = (l + s);
if (s == "addtosite"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=addToSite&action=addtosite");
};
if (s == "walk"){
l = ((("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=walkthrough&action=walkthrough_") + id);
};
if (s == "highscore"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=highscores&action=viewscores");
};
if (s == "RC1"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=playRagdollCannon1&action=game_1066");
};
if (s == "RC2"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=playRagdollCannon2&action=game_1098");
};
if (s == "RC_R"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=playRagdollCannonR&action=game_1249");
};
if (s == "RC_LP"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=playRagdollCannonLP&action=game_1508");
};
if (s == "ToThisGameFromMenu"){
l = ((("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=playThisGameFromMenu&action=game_") + id);
};
if (s == "RP_1"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=playRolyPoly1&action=game_1266");
};
if (s == "RP_2"){
l = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=playRolyPoly2&action=game_1398");
};
if (s == "tutorial"){
l = ((("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=tutorial&action=walkthrough_") + id);
};
if (s == "CreateFromPlayer"){
l = ((("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + id) + "&subid=fromPlayer&action=game_") + id);
};
if (s == "CreateAndShare"){
l = strLink;
};
if (s == "goUpstore"){
l = strLink;
MochiBot.track(Ragdoll_3.mainSprite, "8937d312");
};
var ur:URLRequest = new URLRequest(l);
navigateToURL(ur, "_blank");
if (isMakePause){
closeMessage = function (_arg1:Event):void{
objectMessage.removeEventListener(objectMessage.PRESS_OK, closeMessage);
objectMessage.destroy();
objectMessage = null;
Ragdoll_3.objectSounds.playMusic(Ragdoll_3.objectSounds.mUSIC_TYPE);
Ragdoll_3.objectSounds.isPermitPlaySound = true;
ClassMoveCursorMouse.isCursorOverMessage = false;
ClassMoveCursorMouse.isCursorMouseLeave = true;
};
objectMessage = new ClassMessage();
objectMessage.show(Ragdoll_3.mainSprite, "Game paused, press 'OK' to resume", objectMessage.msOk);
objectMessage.addEventListener(objectMessage.PRESS_OK, closeMessage);
Ragdoll_3.objectSounds.stopMusic();
Ragdoll_3.objectSounds.isPermitPlaySound = false;
ClassMoveCursorMouse.isCursorOverMessage = true;
};
}
}
}//package
Section 141
//ClassMessage (ClassMessage)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ClassMessage extends Sprite {
public const msOkNo:String = "msOkNo";
public const msOkCancel:String = "msOkCancel";
public const PRESS_OK:String = "PRESS_OK";
public const PRESS_CANCEL:String = "PRESS_CANCEL";
public const PRESS_NO:String = "PRESS_NO";
public const msOk:String = "msOk";
public const msOkClose:String = "msOkClose";
public const PRESS_CLOSE:String = "PRESS_CLOSE";
private var but_no:SimpleButton;
private var but_ok:SimpleButton;
private var mainSprite:Sprite;
private var textMessage:TextField;
private var movieMessage:MovieClip;
private var but_close:SimpleButton;
private var but_cancel:SimpleButton;
private function showButOk():void{
but_ok.visible = true;
but_close.visible = false;
but_no.visible = false;
but_cancel.visible = false;
but_ok.x = 353;
}
public function destroy():void{
but_cancel.removeEventListener(MouseEvent.CLICK, butCancelPress);
but_ok.removeEventListener(MouseEvent.CLICK, butOkPress);
but_close.removeEventListener(MouseEvent.CLICK, butClosePress);
but_no.removeEventListener(MouseEvent.CLICK, butNoPress);
while (movieMessage.numChildren) {
movieMessage.removeChildAt(0);
};
but_ok = null;
but_close = null;
but_no = null;
but_cancel = null;
textMessage = null;
mainSprite.removeChild(movieMessage);
movieMessage = null;
}
private function butOkPress(_arg1:MouseEvent):void{
dispatchEvent(new Event(PRESS_OK));
}
private function butClosePress(_arg1:MouseEvent):void{
dispatchEvent(new Event(PRESS_CLOSE));
}
private function setListeners():void{
but_ok.addEventListener(MouseEvent.CLICK, butOkPress);
but_close.addEventListener(MouseEvent.CLICK, butClosePress);
but_no.addEventListener(MouseEvent.CLICK, butNoPress);
but_cancel.addEventListener(MouseEvent.CLICK, butCancelPress);
}
private function showButOkClose():void{
but_ok.visible = true;
but_close.visible = true;
but_no.visible = false;
but_cancel.visible = false;
}
private function butNoPress(_arg1:MouseEvent):void{
dispatchEvent(new Event(PRESS_NO));
}
private function showButOkNo():void{
but_ok.visible = true;
but_close.visible = false;
but_no.visible = true;
but_cancel.visible = false;
}
private function showButOkCancel():void{
but_ok.visible = true;
but_cancel.visible = true;
but_close.visible = false;
but_no.visible = false;
}
private function butCancelPress(_arg1:MouseEvent):void{
dispatchEvent(new Event(PRESS_CANCEL));
}
public function show(_arg1:Sprite, _arg2:String, _arg3:String):void{
mainSprite = _arg1;
var _local4:Class = Ragdoll_3.swfMovies.getAssetClass("message");
movieMessage = new (_local4);
but_ok = (movieMessage as Object).but_ok;
but_no = (movieMessage as Object).but_no;
but_close = (movieMessage as Object).but_close;
but_cancel = (movieMessage as Object).but_cancel;
textMessage = (movieMessage as Object).mess;
textMessage.text = _arg2;
if (_arg3 == msOkNo){
showButOkNo();
};
if (_arg3 == msOk){
showButOk();
};
if (_arg3 == msOkClose){
showButOkClose();
};
if (_arg3 == msOkCancel){
showButOkCancel();
};
setListeners();
mainSprite.addChild(movieMessage);
}
}
}//package
Section 142
//ClassMoveCursorMouse (ClassMoveCursorMouse)
package {
import flash.events.*;
import flash.display.*;
import flash.ui.*;
public class ClassMoveCursorMouse extends EventDispatcher {
public const CURSOR_HERE:String = "CURSOR_HERE";
private var mainStage:Stage;
private var movie:MovieClip;
public static var isCursorMouseLeave:Boolean = false;
public static var isCursorOverMessage:Boolean = false;
public function ClassMoveCursorMouse(_arg1:Stage, _arg2:String){
mainStage = _arg1;
var _local3:Class = Ragdoll_3.swfMovies.getAssetClass(_arg2);
movie = new (_local3);
movie.mouseChildren = false;
movie.mouseEnabled = false;
mainStage.addEventListener(Event.MOUSE_LEAVE, leaveM);
mainStage.addEventListener(MouseEvent.MOUSE_MOVE, movieM);
}
public function hideMovieCursor():void{
movie.visible = false;
Mouse.show();
movie.stopDrag();
}
public function showMovieCursor():void{
movie.visible = true;
movie.x = mainStage.stage.mouseX;
movie.y = mainStage.stage.mouseY;
mainStage.addChild(movie);
movie.startDrag();
Mouse.hide();
}
public function stopDrage():void{
movie.stopDrag();
}
private function leaveM(_arg1:Event):void{
isCursorMouseLeave = true;
hideMovieCursor();
}
public function destroy():void{
mainStage.removeEventListener(Event.MOUSE_LEAVE, leaveM);
mainStage.removeEventListener(MouseEvent.MOUSE_MOVE, movieM);
mainStage.removeChild(movie);
movie = null;
mainStage = null;
}
private function movieM(_arg1:Event):void{
if (isCursorOverMessage){
hideMovieCursor();
return;
};
if (isCursorMouseLeave == true){
isCursorMouseLeave = false;
showMovieCursor();
dispatchEvent(new Event(CURSOR_HERE));
};
}
public function hideAll():void{
movie.visible = false;
movie.stopDrag();
Mouse.hide();
}
}
}//package
Section 143
//ClassSetDataGame (ClassSetDataGame)
package {
import flash.net.*;
public class ClassSetDataGame {
private static var badgeAttr:String;
public static var isAllLevelsCompleted:Boolean = false;
public static var isSound:Boolean = false;
public static var kolVoLevelForOpen:Number = 3;
public static var tekLevel:Number = 1;
public static var isGameWasLoad:Boolean = false;
public static var massivOpenLevels:Array = [];
public static var isMusic:Boolean = false;
public static var massivScores:Array = [];
public static var isMusicGame1:Boolean;
public static var isGameStarted:Boolean = false;
public static var totalScore:Number = 0;
public static var isGameFinish:Boolean = false;
public static var kolVoLevels:Number = 50;
public static var isShowIntroApple:Boolean;
public static var kolVoBadges:Number = 20;
public static var _so:SharedObject = SharedObject.getLocal(ClassInformGame.nameGame);
public static function clearDataGame():void{
totalScore = 0;
tekLevel = 1;
isGameFinish = false;
isGameStarted = false;
isGameWasLoad = false;
isAllLevelsCompleted = false;
massivOpenLevels = [];
massivScores = [];
var _local1:int;
while (_local1 <= kolVoLevels) {
_so.data[("isOpenLevel_" + _local1)] = undefined;
_so.data[("level_" + _local1)] = undefined;
_local1++;
};
_so.data["lastLevel"] = undefined;
_so.data["isGameFinish"] = undefined;
_so.data.isGameStarted = undefined;
_so.data.isAllLevelsCompleted = undefined;
_so.data.isShowIntroApple = undefined;
openLevelsAlways();
}
public static function loadDataGame():void{
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
badgeAttr = "badge61";
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
badgeAttr = "rpc3badge87";
};
isShowIntroApple = true;
totalScore = 0;
var _local1:int;
while (_local1 < (ClassSetDataGame.kolVoLevels + 1)) {
massivOpenLevels[_local1] = _so.data[("isOpenLevel_" + _local1)];
massivScores[_local1] = _so.data[("level_" + _local1)];
if (massivScores[_local1] != undefined){
totalScore = (totalScore + massivScores[_local1]);
};
_local1++;
};
openLevelsAlways();
if (massivScores[0] != undefined){
totalScore = (totalScore - massivScores[0]);
};
if (_so.data["lastLevel"] > 0){
tekLevel = _so.data["lastLevel"];
};
if (!_so.data["lastLevel"]){
tekLevel = 1;
};
if (_so.data["isGameFinish"] == 1){
isGameFinish = true;
};
if (_so.data.isMusic == undefined){
_so.data.isMusic = true;
};
if (_so.data.isSound == undefined){
_so.data.isSound = true;
};
if (_so.data.isMusicGame1 == undefined){
_so.data.isMusicGame1 = false;
};
if (_so.data.isShowIntroApple == 2){
isShowIntroApple = false;
};
_so.data.isMusicGame1 = !(_so.data.isMusicGame1);
isMusicGame1 = _so.data.isMusicGame1;
isMusic = _so.data.isMusic;
isSound = _so.data.isSound;
if (_so.data.isGameStarted == 1){
isGameStarted = true;
};
if (_so.data.isGameWasLoad == 1){
isGameWasLoad = true;
};
_so.data.isGameWasLoad = 1;
if (_so.data.isAllLevelsCompleted == 1){
isAllLevelsCompleted = true;
};
}
public static function setMusicPlay(_arg1:Boolean):void{
isMusic = _arg1;
_so.data.isMusic = isMusic;
}
public static function setGameFinish():void{
isGameFinish = true;
_so.data["isGameFinish"] = 1;
}
public static function getCodeGameLevels():String{
var _local3:XML;
var _local1:Number = 1;
var _local2 = "";
while (_so.data[("xmlLevel_" + _local1)]) {
_local3 = _so.data[("xmlLevel_" + _local1)];
_local2 = (_local2 + (("strLevel=" + _local3.toString()) + "\narrStrLevels.push(strLevel);\n"));
_local1++;
};
return (_local2);
}
public static function saveBadges(_arg1:int, _arg2:Array, _arg3:Boolean, _arg4:String, _arg5:Boolean):void{
_so.data[((badgeAttr + "_") + _arg1)] = [_arg2, _arg3, _arg4, _arg5];
}
public static function testAllLevelCompleted():Boolean{
isAllLevelsCompleted = true;
var _local1 = 1;
while (_local1 <= ClassSetDataGame.kolVoLevels) {
if (massivScores[_local1] == undefined){
isAllLevelsCompleted = false;
_so.data.isAllLevelsCompleted = undefined;
return (isAllLevelsCompleted);
};
_local1++;
};
_so.data.isAllLevelsCompleted = 1;
return (isAllLevelsCompleted);
}
public static function openLevelsAlways():void{
var _local1 = 1;
while (_local1 <= kolVoLevelForOpen) {
massivOpenLevels[_local1] = true;
_so.data[("isOpenLevel_" + _local1)] = true;
_local1++;
};
}
public static function setLevelScoresAndTotal(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:*;
isGameStarted = true;
_so.data.isGameStarted = 1;
if (massivScores[_arg1] != undefined){
_local3 = massivScores[_arg1];
} else {
openNextLevel();
};
if ((((massivScores[_arg1] == undefined)) || ((_local3 > _arg2)))){
massivScores[_arg1] = _arg2;
_so.data[("level_" + _arg1)] = _arg2;
totalScore = 0;
for each (_local4 in massivScores) {
if (_local4 != undefined){
totalScore = (totalScore + _local4);
};
};
if (massivScores[0] != undefined){
totalScore = (totalScore - massivScores[0]);
};
};
}
public static function setSoundPlay(_arg1:Boolean):void{
isSound = _arg1;
_so.data.isSound = isSound;
}
public static function loadDataBadge(_arg1:int):Array{
var _local2:Array = _so.data[((badgeAttr + "_") + _arg1)];
return (_local2);
}
public static function setShowIntroApple():void{
var _local1:Number;
if (_so.data.isShowIntroApple == undefined){
_so.data.isShowIntroApple = 0;
};
_local1 = _so.data.isShowIntroApple;
_local1++;
if (_local1 > 2){
_local1 = 2;
};
_so.data.isShowIntroApple = _local1;
}
public static function isRecordOnLevel(_arg1:Number, _arg2:Number):Boolean{
var _local3:Number = massivScores[_arg1];
if (_local3 > _arg2){
return (true);
};
return (false);
}
public static function setLastLevel(_arg1:Number):void{
tekLevel = _arg1;
_so.data["lastLevel"] = _arg1;
}
public static function SaveAllAchivenetsInFirstTimeGame(_arg1:Array):void{
var _local2:Array;
if (!isGameWasLoad){
for each (_local2 in _arg1) {
saveBadges(_local2[0], _local2[2], false, _local2[3], false);
};
};
}
public static function openNextLevel():void{
var _local1 = 1;
while (_local1 <= ClassSetDataGame.kolVoLevels) {
if (massivOpenLevels[_local1] == undefined){
massivOpenLevels[_local1] = true;
_so.data[("isOpenLevel_" + _local1)] = true;
break;
};
_local1++;
};
}
}
}//package
Section 144
//ClassShareObgects (ClassShareObgects)
package {
import flash.events.*;
import flash.display.*;
import EditorLevels.*;
import flash.text.*;
import flash.net.*;
public class ClassShareObgects extends Sprite {
public const LOAD_OK:String = "LOAD_OK";
public const CLOSE:String = "CLOSE";
public const NAME_LEVEL_READY:String = "NAME_LEVEL_READY";
private var doLevel:ClassDoLevel;
private var message:ClassMessage;
var dg:Object;
private var nName:String;
private var movieSave_table:MovieClip;
private var numLevel:Number;
private var xmlLevel:XML;
private var nickNameLevelStr:String;
private var nLevel:String;
private var nameLevelStr:String;
private static var _so:SharedObject = SharedObject.getLocal(ClassInformGame.nameGame);
private static var selectedIndexLevel:Number = 0;
public function ClassShareObgects(){
message = new ClassMessage();
super();
doLevel = new ClassDoLevel();
}
public function getNameLevel():String{
return (nLevel);
}
public function getNickName():String{
return (nName);
}
public function saveLevel(_arg1:XML, _arg2:Number, _arg3:String, _arg4:String):void{
var nameLevel:TextField;
var nameNick:TextField;
var saveAfterClickNo:Function;
var saveAfterClickOk:Function;
var xmlLevel = _arg1;
var numLevel = _arg2;
var nameLevelStr = _arg3;
var nickNameLevelStr = _arg4;
saveAfterClickNo = function (_arg1:MouseEvent):void{
movieSave_table.but_ok.removeEventListener(MouseEvent.CLICK, saveAfterClickOk);
movieSave_table.but_no.removeEventListener(MouseEvent.CLICK, saveAfterClickNo);
removeChild(movieSave_table);
dispatchEvent(new Event(CLOSE));
movieSave_table = null;
};
saveAfterClickOk = function (_arg1:MouseEvent):void{
saveStrOnComp(xmlLevel, nameNick.text);
nLevel = nameLevel.text;
nName = nameNick.text;
dispatchEvent(new Event(NAME_LEVEL_READY));
saveAfterClickNo(null);
};
var saveStrOnComp:Function = function (_arg1:XML, _arg2:String):void{
var _local3:XML;
numLevel = 1;
while (_so.data[("xmlLevel_" + numLevel)]) {
_local3 = _so.data[("xmlLevel_" + numLevel)];
if (doLevel.getNameLevel(_local3) == nameLevel.text){
break;
};
numLevel++;
};
doLevel.setLevelNameInStr(_arg1, nameLevel.text);
doLevel.setNickNameInStr(_arg1, _arg2);
_so.data[("xmlLevel_" + numLevel.toString())] = _arg1;
_so.data["myNameNike"] = _arg2;
_so.flush();
};
this.xmlLevel = xmlLevel;
this.numLevel = numLevel;
this.nameLevelStr = nameLevelStr;
this.nickNameLevelStr = nickNameLevelStr;
var save_tablClass:Class = Ragdoll_3.swfMovies.getAssetClass("save_table");
movieSave_table = new (save_tablClass);
movieSave_table.isSaveShare.text = "SAVE LEVEL";
nameLevel = movieSave_table.nameLevel;
nameNick = movieSave_table.nameNick;
if ((((nickNameLevelStr == "Player")) && (!((_so.data["myNameNike"] == undefined))))){
nameNick.text = _so.data["myNameNike"];
} else {
nameNick.text = nickNameLevelStr;
};
nameLevel.text = nameLevelStr;
nameLevel.setSelection(0, 200);
stage.focus = nameLevel;
nameLevel.alwaysShowSelection = true;
movieSave_table.but_ok.addEventListener(MouseEvent.CLICK, saveAfterClickOk);
movieSave_table.but_no.addEventListener(MouseEvent.CLICK, saveAfterClickNo);
addChild(movieSave_table);
}
function getMaxLevelNumber():Number{
var _local1:Number = 1;
while (_so.data[("xmlLevel_" + _local1)]) {
_local1++;
};
return (_local1);
}
public function getTekXmlLevel():XML{
return (xmlLevel);
}
public function destroy(){
movieSave_table = null;
}
public function loadLevel():void{
var movieLoad_tabl:MovieClip;
var loadAfterClickNo:Function;
var loadAfterClickOk:Function;
var loadAfterClickDel:Function;
var messageDestroy:Function;
var loadAfterClickDelAndOk:Function;
var tekStrLevrl:XML;
var doLevel:ClassDoLevel;
var nameLevel:String;
loadAfterClickNo = function (_arg1:MouseEvent):void{
trace("loadAfterClickNo");
movieLoad_tabl.but_ok.removeEventListener(MouseEvent.CLICK, loadAfterClickOk);
movieLoad_tabl.but_no.removeEventListener(MouseEvent.CLICK, loadAfterClickNo);
movieLoad_tabl.but_del.removeEventListener(MouseEvent.CLICK, loadAfterClickDel);
removeChild(movieLoad_tabl);
dispatchEvent(new Event(CLOSE));
};
loadAfterClickOk = function (_arg1:MouseEvent):void{
trace("loadAfterClickOk");
if (getMaxLevelNumber() == 1){
return;
};
var _local2:Number = dg.selectedItem.numLevel;
selectedIndexLevel = (_local2 - 1);
xmlLevel = _so.data[("xmlLevel_" + _local2)];
dispatchEvent(new Event(LOAD_OK));
loadAfterClickNo(_arg1);
};
loadAfterClickDel = function (_arg1:Event):void{
if (getMaxLevelNumber() == 1){
return;
};
var _local2:String = dg.selectedItem.label;
message.show(movieLoad_tabl, (("Are you sure you want to remove level '" + _local2) + "'?"), message.msOkNo);
message.addEventListener(message.PRESS_OK, loadAfterClickDelAndOk);
message.addEventListener(message.PRESS_NO, messageDestroy);
};
messageDestroy = function (_arg1:Event):void{
message.removeEventListener(message.PRESS_OK, loadAfterClickDelAndOk);
message.removeEventListener(message.PRESS_NO, messageDestroy);
message.destroy();
};
loadAfterClickDelAndOk = function (_arg1:Event):void{
var _local6:XML;
var _local7:String;
messageDestroy(_arg1);
var _local2:String = dg.selectedItem.label;
var _local3:Number = 1;
var _local4:Array = [];
while (_so.data[("xmlLevel_" + _local3)]) {
_local6 = _so.data[("xmlLevel_" + _local3)];
_local7 = doLevel.getNameLevel(_local6);
if (_local7 != _local2){
_local4.push(_local6);
} else {
_so.data[("xmlLevel_" + _local3)] = null;
selectedIndexLevel = (_local3 - 1);
};
_local3++;
};
if ((selectedIndexLevel + 2) == _local3){
selectedIndexLevel--;
};
var _local5 = 1;
while (_local5 < 1000) {
if (_so.data[("xmlLevel_" + _local5)]){
_so.data[("xmlLevel_" + _local5)] = null;
};
_local5++;
};
_local3 = 0;
while (_local4[_local3]) {
_so.data[("xmlLevel_" + (_local3 + 1))] = _local4[_local3];
_local3++;
};
selectedIndexLevel = (selectedIndexLevel - 1);
if (selectedIndexLevel < 0){
selectedIndexLevel = 0;
};
movieLoad_tabl.but_ok.removeEventListener(MouseEvent.CLICK, loadAfterClickOk);
movieLoad_tabl.but_no.removeEventListener(MouseEvent.CLICK, loadAfterClickNo);
movieLoad_tabl.but_del.removeEventListener(MouseEvent.CLICK, loadAfterClickDel);
removeChild(movieLoad_tabl);
loadLevel();
};
var load_tableClass:Class = Ragdoll_3.swfMovies.getAssetClass("load_table");
movieLoad_tabl = new (load_tableClass);
dg = (movieLoad_tabl as Object)["dataTable"];
var tekLevel:Number = 1;
while (_so.data[("xmlLevel_" + tekLevel)]) {
tekStrLevrl = _so.data[("xmlLevel_" + tekLevel)];
doLevel = new ClassDoLevel();
nameLevel = doLevel.getNameLevel(tekStrLevrl);
dg.addItem({label:nameLevel, numLevel:tekLevel});
tekLevel = (tekLevel + 1);
};
dg.selectedIndex = selectedIndexLevel;
dg.scrollToSelected();
addChild(movieLoad_tabl);
movieLoad_tabl.but_ok.addEventListener(MouseEvent.CLICK, loadAfterClickOk);
movieLoad_tabl.but_no.addEventListener(MouseEvent.CLICK, loadAfterClickNo);
movieLoad_tabl.but_del.addEventListener(MouseEvent.CLICK, loadAfterClickDel);
}
public static function getStrProtectedLevel(_arg1:Number):XML{
var _local2:XML;
if (_so.data[("xmlLevel_" + _arg1.toString())]){
_local2 = _so.data[("xmlLevel_" + _arg1.toString())];
} else {
_local2 = null;
};
return (_local2);
}
public static function setStrProtectedLevel(_arg1:XML, _arg2:Number):void{
_so.data[("xmlLevel_" + _arg2)] = _arg1;
}
public static function getStrProtectedLevelFromCode(_arg1:String, _arg2:Number):XML{
var _local3:XML;
var _local4:ClassAllLevels = new ClassAllLevels(_arg1);
_local3 = _local4.getStrLevel(_arg2);
return (_local3);
}
}
}//package
Section 145
//ClassSounds (ClassSounds)
package {
import flash.media.*;
public class ClassSounds {
public const MUSIC_GAME_2:String = "game_music_2";
public const MUSIC_GAME_1:String = "game_music_1";
public const MUSIC_MENU:String = "menu_music";
public var goodRolyDeath1:Sound;
public var goodRolyDeath2:Sound;
public var isPlayMusicNow:Boolean;
public var evilRolyYek1:Sound;
public var evilRolyYek2:Sound;
public var evilRolyYek3:Sound;
private var myMusicTransform:SoundTransform;
public var mUSIC_TYPE:String;// = ""
public var soundLevelCompleted:Sound;
public var soundShot_1:Sound;
public var evilRolyDeath2:Sound;
public var soundIntroJK:Sound;
public var soundBlast:Sound;
public var evilRolyDeath1:Sound;
public var goodRolyYek1:Sound;
public var goodRolyYek2:Sound;
private var soundSound:Sound;
public var goodRolyYek3:Sound;
private var mySoundChannel:SoundChannel;
public var isPermitPlaySound:Boolean;
private var soundMusic:Sound;
public var soundAchi:Sound;
private var swfMovies:Object;
private var mySoundTransform:SoundTransform;
private var myMusicChannel:SoundChannel;
public var isPermitPlayMusic:Boolean;
public var soundLevelLose:Sound;
public var MUSIC_GAME:String;
public var soundGameWin:Sound;
public function ClassSounds(_arg1:Object, _arg2:Boolean, _arg3:Boolean){
myMusicChannel = new SoundChannel();
myMusicTransform = new SoundTransform();
mySoundChannel = new SoundChannel();
mySoundTransform = new SoundTransform();
super();
this.swfMovies = _arg1;
this.isPermitPlayMusic = _arg2;
this.isPermitPlaySound = _arg3;
if (ClassSetDataGame.isMusicGame1){
MUSIC_GAME = MUSIC_GAME_1;
} else {
MUSIC_GAME = MUSIC_GAME_2;
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
MUSIC_GAME = MUSIC_GAME_1;
};
}
public function initRagdollSound():void{
commonSounds();
}
private function commonSounds():void{
var _local1:Class = swfMovies.getAssetClass("soundBlast");
soundShot_1 = new (_local1);
_local1 = swfMovies.getAssetClass("soundShot_1");
soundBlast = new (_local1);
_local1 = swfMovies.getAssetClass("soundLevelCompleted");
soundLevelCompleted = new (_local1);
_local1 = swfMovies.getAssetClass("soundLevelLose");
soundLevelLose = new (_local1);
_local1 = swfMovies.getAssetClass("soundGameWin");
soundGameWin = new (_local1);
_local1 = swfMovies.getAssetClass("soundIntroJK");
soundIntroJK = new (_local1);
_local1 = swfMovies.getAssetClass("soundAchi");
soundAchi = new (_local1);
}
public function stopSound():void{
mySoundChannel.stop();
}
public function playMusic(_arg1:String):void{
if (!isPermitPlayMusic){
return;
};
if ((((_arg1.toString().substr(0, 10) == mUSIC_TYPE.substr(0, 10))) && (isPlayMusicNow))){
return;
};
myMusicChannel.stop();
var _local2:Class = swfMovies.getAssetClass(_arg1);
soundMusic = new (_local2);
myMusicTransform.volume = 1;
myMusicChannel = soundMusic.play(0, 10000, myMusicTransform);
mUSIC_TYPE = _arg1;
isPlayMusicNow = true;
}
public function playSound(_arg1:Sound):void{
if (!isPermitPlaySound){
return;
};
mySoundTransform.volume = 1;
mySoundChannel = _arg1.play(0, 1, mySoundTransform);
}
public function stopMusic():void{
myMusicChannel.stop();
isPlayMusicNow = false;
}
public function initRolySound():void{
commonSounds();
var _local1:Class = swfMovies.getAssetClass("goodRolyYek1");
goodRolyYek1 = new (_local1);
_local1 = swfMovies.getAssetClass("goodRolyYek2");
goodRolyYek2 = new (_local1);
_local1 = swfMovies.getAssetClass("goodRolyYek3");
goodRolyYek3 = new (_local1);
_local1 = swfMovies.getAssetClass("goodRolyDeath1");
goodRolyDeath1 = new (_local1);
_local1 = swfMovies.getAssetClass("goodRolyDeath2");
goodRolyDeath2 = new (_local1);
_local1 = swfMovies.getAssetClass("evilRolyYek1");
evilRolyYek1 = new (_local1);
_local1 = swfMovies.getAssetClass("evilRolyYek2");
evilRolyYek2 = new (_local1);
_local1 = swfMovies.getAssetClass("evilRolyYek3");
evilRolyYek3 = new (_local1);
_local1 = swfMovies.getAssetClass("evilRolyDeath1");
evilRolyDeath1 = new (_local1);
_local1 = swfMovies.getAssetClass("evilRolyDeath2");
evilRolyDeath2 = new (_local1);
}
}
}//package
Section 146
//FPS (FPS)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.system.*;
import flash.utils.*;
public class FPS extends Sprite {
private var output:String;
private var frameCount:Number;
private var counterDisplay:TextField;
private var lastMeasure:Number;
private var sMillisecond:uint;
private var fMillisecond:uint;
public function FPS(){
counterDisplay = new TextField();
counterDisplay.selectable = false;
addChild(counterDisplay);
fMillisecond = getTimer();
sMillisecond = (fMillisecond + 1000);
frameCount = 0;
output = "--";
lastMeasure = 0;
addEventListener(Event.ENTER_FRAME, onEnterFrameEvent);
}
private function onEnterFrameEvent(_arg1:Event):void{
updateCounter();
}
private function updateCounter():void{
var _local1:Number;
fMillisecond = getTimer();
if (fMillisecond > sMillisecond){
_local1 = ((frameCount / ((fMillisecond - sMillisecond) + 1000)) * 1000);
sMillisecond = (fMillisecond + 1000);
frameCount = 0;
if (lastMeasure != _local1){
lastMeasure = _local1;
output = (((("FPS : " + _local1.toFixed(1)) + "\nMemory: ") + Math.round((System.totalMemory / 0x0400))) + " Kb");
};
} else {
frameCount = (frameCount + 1);
};
counterDisplay.text = output;
}
}
}//package
Section 147
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.system.*;
import flash.net.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 148
//Ragdoll_3 (Ragdoll_3)
package {
import flash.events.*;
import flash.display.*;
import StructureGame.*;
import ActionsBeforeGame.*;
public class Ragdoll_3 extends Sprite {
private var objectKongregate:ClassKongregate;
public var fp:FPS;
private var objectIntro:ClassIntro;
private var objectLevelOrGame:ClassLevelOrGame;
private var objectControllStructureGame:ClassControllStructureGame;
private var xmlLevel:XML;
public static var objectSounds:ClassSounds;
public static var mainStage:Stage;
public static var swfMovies:Object;
public static var mainSprite:Sprite;
public function Ragdoll_3(){
swfMovies = new ApplicationAssetsRoly();
addEventListener(Event.ADDED, eventAdded);
}
private function startPlayer(_arg1:Event):void{
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
MochiBot.track(this, "65235d62");
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
MochiBot.track(this, "810e3f22");
};
objectLevelOrGame.removeEventListener(objectLevelOrGame.IS_PLAYER, startPlayer);
objectLevelOrGame.removeEventListener(objectLevelOrGame.IS_GAME, startIntro);
xmlLevel = (objectLevelOrGame.getStrLevel() as XML);
objectControllStructureGame.playLevel(-1, xmlLevel);
}
private function eventAdded(_arg1:Event):void{
removeEventListener(Event.ADDED, eventAdded);
mainStage = this.stage;
mainSprite = this;
swfMovies.init();
swfMovies.addEventListener(Event.INIT, startGame);
}
private function createControllStructureGame(_arg1:Event):void{
objectIntro.removeEventListener(objectIntro.FINISH, createControllStructureGame);
objectIntro = null;
objectControllStructureGame.createMainMenu(_arg1);
ClassSetDataGame.setShowIntroApple();
}
private function startGame(_arg1:Event):void{
stage.quality = StageQuality.MEDIUM;
ClassInformGame.assignNameGame();
ClassSetDataGame.loadDataGame();
objectSounds = new ClassSounds(swfMovies, ClassSetDataGame.isMusic, ClassSetDataGame.isSound);
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
objectSounds.initRagdollSound();
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
objectSounds.initRolySound();
};
ClassSetDataGame.SaveAllAchivenetsInFirstTimeGame(ClassInformGame.arrBadges);
objectKongregate = new ClassKongregate(this);
objectKongregate.init();
objectControllStructureGame = new ClassControllStructureGame(this, objectSounds, objectKongregate);
levelOrGame();
}
private function startIntro(_arg1:Event):void{
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
MochiBot.track(this, "5bfab96b");
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
MochiBot.track(this, "88a03697");
};
objectLevelOrGame.removeEventListener(objectLevelOrGame.IS_PLAYER, startPlayer);
objectLevelOrGame.removeEventListener(objectLevelOrGame.IS_GAME, startIntro);
if (!ClassInformGame.isShowIntro){
createControllStructureGame(_arg1);
return;
};
var _local2:Boolean = ClassSetDataGame.isShowIntroApple;
objectIntro = new ClassIntro(swfMovies, this, objectSounds, ClassSetDataGame.isSound, _local2);
objectIntro.addEventListener(objectIntro.FINISH, createControllStructureGame);
}
private function levelOrGame():void{
var _local1:String;
objectLevelOrGame = new ClassLevelOrGame();
objectLevelOrGame.addEventListener(objectLevelOrGame.IS_GAME, startIntro);
objectLevelOrGame.addEventListener(objectLevelOrGame.IS_PLAYER, startPlayer);
if (ClassInformGame.nameGame == ClassInformGame.RAGDOLL){
_local1 = "http://www.bubblebox.com/scripts/coverorange/_rc3GetCodebyID_.php";
};
if (ClassInformGame.nameGame == ClassInformGame.ROLYPOLY){
_local1 = "http://www.bubblebox.com/scripts/coverorange/_rpc3GetCodebyID_.php";
};
objectLevelOrGame.init(this, _local1);
}
}
}//package