Initial commit
138
src/Preloader.as
Normal file
@@ -0,0 +1,138 @@
|
||||
package
|
||||
{
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
import flash.display.Shape;
|
||||
import flash.display.Sprite;
|
||||
import flash.display3D.Context3D;
|
||||
import flash.events.Event;
|
||||
import package_28.name_129;
|
||||
import package_28.name_167;
|
||||
import package_28.name_93;
|
||||
|
||||
public class Preloader extends Sprite
|
||||
{
|
||||
private static const EmbedPreloader:Class = name_166;
|
||||
|
||||
private static const EmbedPreloaderA:Class = name_165;
|
||||
|
||||
private static const EmbedProgress:Class = name_164;
|
||||
|
||||
private var area:Shape = new Shape();
|
||||
|
||||
private var var_27:Bitmap = new EmbedPreloader();
|
||||
|
||||
private var var_28:Bitmap = new EmbedPreloaderA();
|
||||
|
||||
private var progress:Bitmap = new EmbedProgress();
|
||||
|
||||
private var context:Context3D;
|
||||
|
||||
public var maps:Vector.<name_167>;
|
||||
|
||||
private var var_31:int;
|
||||
|
||||
private var counter:int;
|
||||
|
||||
private var baseURL:String;
|
||||
|
||||
private var var_30:name_129 = new name_93(new BitmapData(1,1,false,8355711));
|
||||
|
||||
private var var_29:Number = 0.09803921568627451;
|
||||
|
||||
public function Preloader()
|
||||
{
|
||||
super();
|
||||
addChild(this.area);
|
||||
this.area.alpha = 1;
|
||||
this.progress.alpha = 1;
|
||||
this.var_27.alpha = 1;
|
||||
addChild(this.var_27);
|
||||
addChild(this.var_28);
|
||||
addChild(this.progress);
|
||||
addEventListener(Event.ADDED_TO_STAGE,this.method_80);
|
||||
addEventListener(Event.REMOVED_FROM_STAGE,this.method_81);
|
||||
this.progress.scaleX = 0.025;
|
||||
}
|
||||
|
||||
public function name_69(param1:Number) : void
|
||||
{
|
||||
this.progress.scaleX = param1;
|
||||
if(this.progress.scaleX >= 1)
|
||||
{
|
||||
this.method_78();
|
||||
}
|
||||
}
|
||||
|
||||
private function method_78() : void
|
||||
{
|
||||
addEventListener(Event.ENTER_FRAME,this.method_12);
|
||||
}
|
||||
|
||||
public function method_82(param1:Number) : void
|
||||
{
|
||||
this.progress.scaleX += param1;
|
||||
if(this.progress.scaleX > 0.5)
|
||||
{
|
||||
addEventListener(Event.ENTER_FRAME,this.method_79);
|
||||
}
|
||||
if(this.progress.scaleX >= 1)
|
||||
{
|
||||
this.method_78();
|
||||
}
|
||||
}
|
||||
|
||||
private function method_80(param1:Event) : void
|
||||
{
|
||||
stage.addEventListener(Event.RESIZE,this.method_4);
|
||||
this.method_4();
|
||||
}
|
||||
|
||||
private function method_81(param1:Event) : void
|
||||
{
|
||||
stage.removeEventListener(Event.RESIZE,this.method_4);
|
||||
}
|
||||
|
||||
private function method_12(param1:Event) : void
|
||||
{
|
||||
this.area.alpha -= this.var_29;
|
||||
this.var_27.alpha -= this.var_29;
|
||||
this.progress.alpha -= this.var_29;
|
||||
if(this.area.alpha <= 0)
|
||||
{
|
||||
removeEventListener(Event.ENTER_FRAME,this.method_12);
|
||||
if(parent != null)
|
||||
{
|
||||
parent.removeChild(this);
|
||||
dispatchEvent(new Event(Event.COMPLETE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function method_79(param1:Event) : void
|
||||
{
|
||||
this.var_28.alpha -= this.var_29 * 1.5;
|
||||
if(this.var_28.alpha <= 0)
|
||||
{
|
||||
removeEventListener(Event.ENTER_FRAME,this.method_79);
|
||||
}
|
||||
}
|
||||
|
||||
private function method_4(param1:Event = null) : void
|
||||
{
|
||||
this.area.graphics.clear();
|
||||
this.var_27.x = Math.round(stage.stageWidth / 2 - this.var_27.width / 2);
|
||||
this.var_27.y = Math.round(stage.stageHeight / 2 - this.var_27.height / 2) - 30;
|
||||
this.var_28.x = this.var_27.x;
|
||||
this.var_28.y = this.var_27.y;
|
||||
this.progress.x = this.var_27.x + 2;
|
||||
this.progress.y = this.var_27.y + 221;
|
||||
this.area.graphics.beginFill(0);
|
||||
this.area.graphics.drawRect(0,0,this.var_27.x,stage.stageHeight);
|
||||
this.area.graphics.drawRect(this.var_27.x,0,this.var_27.width,this.var_27.y);
|
||||
this.area.graphics.drawRect(this.var_27.x + this.var_27.width,0,stage.stageWidth - this.var_27.width - this.var_27.x,stage.stageHeight);
|
||||
this.area.graphics.drawRect(this.var_27.x,this.var_27.y + this.var_27.height,this.var_27.width,stage.stageHeight - this.var_27.height - this.var_27.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
298
src/TanksTestingTool.as
Normal file
@@ -0,0 +1,298 @@
|
||||
package
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.Sprite;
|
||||
import flash.display.Stage3D;
|
||||
import flash.display.StageAlign;
|
||||
import flash.display.StageDisplayState;
|
||||
import flash.display.StageQuality;
|
||||
import flash.display.StageScaleMode;
|
||||
import flash.events.Event;
|
||||
import flash.events.FullScreenEvent;
|
||||
import flash.events.KeyboardEvent;
|
||||
import flash.ui.Keyboard;
|
||||
import package_1.name_1;
|
||||
import package_1.name_12;
|
||||
import package_1.name_13;
|
||||
import package_1.name_22;
|
||||
import package_10.name_17;
|
||||
import package_11.name_16;
|
||||
import package_12.name_15;
|
||||
import package_13.name_18;
|
||||
import package_14.name_21;
|
||||
import package_15.name_19;
|
||||
import package_16.name_26;
|
||||
import package_17.name_21;
|
||||
import package_18.name_44;
|
||||
import package_2.name_2;
|
||||
import package_2.name_9;
|
||||
import package_3.TankMaterial2;
|
||||
import package_3.name_10;
|
||||
import package_3.name_29;
|
||||
import package_3.name_33;
|
||||
import package_3.name_7;
|
||||
import package_4.name_11;
|
||||
import package_4.name_28;
|
||||
import package_4.name_6;
|
||||
import package_5.name_3;
|
||||
import package_6.name_4;
|
||||
import package_7.name_14;
|
||||
import package_7.name_43;
|
||||
import package_8.name_24;
|
||||
import package_8.name_25;
|
||||
import package_9.name_20;
|
||||
import package_9.name_23;
|
||||
|
||||
[SWF(backgroundColor="#333333",frameRate="100",width="1024",height="768")]
|
||||
public class TanksTestingTool extends Sprite
|
||||
{
|
||||
public static var testTask:name_43;
|
||||
|
||||
private var config:name_18;
|
||||
|
||||
private var gameKernel:name_17;
|
||||
|
||||
private var var_1:name_15;
|
||||
|
||||
private var stage3D:Stage3D;
|
||||
|
||||
private var var_2:name_16;
|
||||
|
||||
private var preloader:Preloader = new Preloader();
|
||||
|
||||
public function TanksTestingTool()
|
||||
{
|
||||
super();
|
||||
mouseEnabled = false;
|
||||
mouseChildren = false;
|
||||
this.method_7();
|
||||
this.method_16();
|
||||
this.method_6();
|
||||
this.method_11();
|
||||
name_2.fadeRadius = 7000;
|
||||
name_2.spotAngle = 140 * Math.PI / 180;
|
||||
name_2.fallofAngle = 170 * Math.PI / 180;
|
||||
this.stage3D = stage.stage3Ds[0];
|
||||
this.stage3D.addEventListener(Event.CONTEXT3D_CREATE,this.method_10);
|
||||
this.stage3D.requestContext3D();
|
||||
}
|
||||
|
||||
private function method_10(param1:Event) : void
|
||||
{
|
||||
switch(name_28.name_35(this.stage3D.context3D))
|
||||
{
|
||||
case name_6.DXT1:
|
||||
this.method_3("cfg.dxt1.xml");
|
||||
break;
|
||||
case name_6.ETC1:
|
||||
this.method_3("cfg.etc1.xml");
|
||||
break;
|
||||
case name_6.PVRTC:
|
||||
this.method_3("cfg.pvrtc.xml");
|
||||
}
|
||||
}
|
||||
|
||||
private function method_11() : void
|
||||
{
|
||||
new name_12("fog_mode",0,0,3,this.method_1);
|
||||
new name_1("fog_near",0,0,1000000,this.method_1);
|
||||
new name_1("fog_far",5000,0,1000000,this.method_1);
|
||||
new name_1("fog_density",1,0,1,this.method_1);
|
||||
new name_1("horizon_offset",0,-1000000,1000000,this.method_1);
|
||||
new name_1("horizon_size",5000,0,1000000,this.method_1);
|
||||
new name_13("fog_color","0x0",this.method_1);
|
||||
var _loc1_:name_4 = name_4(name_3.name_8().name_30(name_4));
|
||||
_loc1_.name_45("fog_texture",this.method_18);
|
||||
new name_1("beam_distance",7000,0,1000000,this.method_2);
|
||||
new name_1("beam_spot",140,0,180,this.method_2);
|
||||
new name_1("beam_fallof",170,0,180,this.method_2);
|
||||
new name_1("beam_fallof",170,0,180,this.method_2);
|
||||
new name_1("camera_smoothing",20,0,200,this.method_17);
|
||||
name_9.fogMode = name_9.DISABLED;
|
||||
name_10.fogMode = name_10.DISABLED;
|
||||
name_7.fogMode = name_7.DISABLED;
|
||||
TankMaterial2.fogMode = name_7.DISABLED;
|
||||
name_29.fogMode = name_11.DISABLED;
|
||||
name_33.fogMode = name_11.DISABLED;
|
||||
}
|
||||
|
||||
private function method_17(param1:name_1) : void
|
||||
{
|
||||
name_20.smoothing = param1.value;
|
||||
}
|
||||
|
||||
private function method_2(param1:name_22) : void
|
||||
{
|
||||
switch(param1.name_32())
|
||||
{
|
||||
case "beam_distance":
|
||||
name_2.fadeRadius = name_1(param1).value;
|
||||
break;
|
||||
case "beam_spot":
|
||||
name_2.spotAngle = name_1(param1).value * Math.PI / 180;
|
||||
break;
|
||||
case "beam_fallof":
|
||||
name_2.fallofAngle = name_1(param1).value * Math.PI / 180;
|
||||
}
|
||||
}
|
||||
|
||||
private function method_1(param1:name_22) : void
|
||||
{
|
||||
var _loc3_:Number = NaN;
|
||||
var _loc4_:Number = NaN;
|
||||
var _loc5_:Number = NaN;
|
||||
var _loc6_:name_44 = this.gameKernel.name_5();
|
||||
switch(param1.name_32())
|
||||
{
|
||||
case "fog_mode":
|
||||
_loc6_.name_41(name_12(param1).value);
|
||||
break;
|
||||
case "fog_near":
|
||||
_loc6_.name_47(name_1(param1).value);
|
||||
break;
|
||||
case "fog_far":
|
||||
_loc6_.name_48(name_1(param1).value);
|
||||
break;
|
||||
case "fog_density":
|
||||
_loc6_.name_49(name_1(param1).value);
|
||||
break;
|
||||
case "horizon_size":
|
||||
_loc6_.name_38(name_1(param1).value);
|
||||
break;
|
||||
case "horizon_offset":
|
||||
_loc6_.name_34(name_1(param1).value);
|
||||
break;
|
||||
case "fog_color":
|
||||
_loc6_.name_40(parseInt(name_13(param1).value,16));
|
||||
}
|
||||
}
|
||||
|
||||
private function method_18(param1:name_4, param2:Array) : void
|
||||
{
|
||||
this.gameKernel.name_5().name_36(param2.join(" "));
|
||||
}
|
||||
|
||||
private function method_7() : void
|
||||
{
|
||||
stage.scaleMode = StageScaleMode.NO_SCALE;
|
||||
stage.align = StageAlign.TOP_LEFT;
|
||||
stage.quality = StageQuality.LOW;
|
||||
}
|
||||
|
||||
private function method_16() : void
|
||||
{
|
||||
new name_3();
|
||||
this.var_2 = new name_16();
|
||||
this.var_2.start(this,new name_19(loaderInfo.parameters),new Vector.<name_24>(),new name_25(null,null,null),new Vector.<String>());
|
||||
new name_26().start(name_3.name_8());
|
||||
new package_17.name_21().start(name_3.name_8());
|
||||
new package_14.name_21().start(name_3.name_8());
|
||||
}
|
||||
|
||||
private function method_6() : void
|
||||
{
|
||||
var _loc1_:name_4 = name_4(name_3.name_8().name_30(name_4));
|
||||
_loc1_.width = 100;
|
||||
_loc1_.alpha = 0.8;
|
||||
_loc1_.height = 30;
|
||||
}
|
||||
|
||||
private function method_3(param1:String) : void
|
||||
{
|
||||
addChild(this.preloader);
|
||||
this.config = new name_18();
|
||||
this.config.addEventListener(Event.COMPLETE,this.method_14);
|
||||
this.config.load(param1,this.preloader);
|
||||
}
|
||||
|
||||
private function method_14(param1:Event) : void
|
||||
{
|
||||
this.method_8();
|
||||
this.method_13();
|
||||
}
|
||||
|
||||
private function method_13() : void
|
||||
{
|
||||
this.var_1 = new name_15();
|
||||
stage.addChild(this.var_1);
|
||||
this.var_1.mouseChildren = true;
|
||||
this.var_1.mouseEnabled = true;
|
||||
this.var_1.addEventListener("CLICK_FULL_SCREEN_BUTTON",this.method_19);
|
||||
this.var_1.addEventListener("CLICK_NEXT_TANK_BUTTON",this.method_9);
|
||||
stage.addChild(this.preloader);
|
||||
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.method_15);
|
||||
this.gameKernel.name_5().name_27().diagramVerticalMargin = 85;
|
||||
this.gameKernel.name_5().name_27().diagramHorizontalMargin = 12;
|
||||
this.method_4(null);
|
||||
}
|
||||
|
||||
private function method_15(param1:KeyboardEvent) : void
|
||||
{
|
||||
var _loc2_:DisplayObject = null;
|
||||
if(param1.keyCode == Keyboard.G)
|
||||
{
|
||||
_loc2_ = this.gameKernel.name_5().name_39();
|
||||
if(_loc2_.parent != null)
|
||||
{
|
||||
_loc2_.parent.removeChild(_loc2_);
|
||||
}
|
||||
else
|
||||
{
|
||||
stage.addChild(_loc2_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function method_19(param1:Event) : void
|
||||
{
|
||||
stage.displayState = this.var_1.name_31 ? StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL;
|
||||
stage.addEventListener(FullScreenEvent.FULL_SCREEN,this.method_5);
|
||||
}
|
||||
|
||||
private function method_5(param1:Event) : void
|
||||
{
|
||||
stage.removeEventListener(FullScreenEvent.FULL_SCREEN,this.method_5);
|
||||
this.var_1.name_31 = stage.displayState != StageDisplayState.NORMAL;
|
||||
}
|
||||
|
||||
private function method_9(param1:Event) : void
|
||||
{
|
||||
if(testTask != null)
|
||||
{
|
||||
testTask.include();
|
||||
}
|
||||
}
|
||||
|
||||
private function method_8() : void
|
||||
{
|
||||
this.gameKernel = new name_17(stage,this.config.options);
|
||||
this.gameKernel.name_5().name_37(this.stage3D);
|
||||
var _loc1_:name_14 = new name_14(this.gameKernel,this.config,this,this.preloader);
|
||||
this.gameKernel.addTask(_loc1_);
|
||||
stage.addEventListener(Event.RESIZE,this.method_4);
|
||||
this.method_4(null);
|
||||
stage.addEventListener(Event.ENTER_FRAME,this.method_12);
|
||||
}
|
||||
|
||||
private function method_12(param1:Event) : void
|
||||
{
|
||||
this.gameKernel.name_51();
|
||||
}
|
||||
|
||||
private function method_4(param1:Event) : void
|
||||
{
|
||||
var _loc2_:name_23 = null;
|
||||
if(this.gameKernel != null)
|
||||
{
|
||||
this.gameKernel.name_5().name_46(0,0,stage.stageWidth,stage.stageHeight);
|
||||
_loc2_ = this.gameKernel.name_5().name_42();
|
||||
_loc2_.y = stage.stageHeight - _loc2_.size;
|
||||
}
|
||||
if(this.var_1 != null)
|
||||
{
|
||||
this.var_1.name_50(stage.stageWidth,stage.stageHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 447 B |
|
After Width: | Height: | Size: 346 B |
|
After Width: | Height: | Size: 487 B |
BIN
src/_assets/13_name_165.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
src/_assets/14_name_164.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/_assets/15_package_12.name_221.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/_assets/16_name_166.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/_assets/17_package_12.TanksHudDemo_nextTankState1Class.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/_assets/18_package_12.TanksHudDemo_fullScreenState2Class.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/_assets/19_package_12.name_222.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 240 B |
BIN
src/_assets/20_package_12.TanksHudDemo_nextTankState2Class.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/_assets/21_package_12.TanksHudDemo_fullScreenState1Class.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/_assets/22_package_12.name_220.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 290 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 283 B |
|
After Width: | Height: | Size: 294 B |
|
After Width: | Height: | Size: 238 B |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 272 B |
5
src/alternativa/engine3d/alternativa3d.as
Normal file
@@ -0,0 +1,5 @@
|
||||
package alternativa.engine3d
|
||||
{
|
||||
public namespace alternativa3d = "http://alternativaplatform.com/en/alternativa3d";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/9_alternativa.tanks.game.usertitle.EffectIndicator_iconArmorCls_alternativa.tanks.game.usertitle.EffectIndicator_iconArmorCls.png")]
|
||||
public class EffectIndicator_iconArmorCls extends BitmapAsset
|
||||
{
|
||||
public function EffectIndicator_iconArmorCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/10_alternativa.tanks.game.usertitle.EffectIndicator_iconHealthCls_alternativa.tanks.game.usertitle.EffectIndicator_iconHealthCls.png")]
|
||||
public class EffectIndicator_iconHealthCls extends BitmapAsset
|
||||
{
|
||||
public function EffectIndicator_iconHealthCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/11_alternativa.tanks.game.usertitle.EffectIndicator_iconNitroCls_alternativa.tanks.game.usertitle.EffectIndicator_iconNitroCls.png")]
|
||||
public class EffectIndicator_iconNitroCls extends BitmapAsset
|
||||
{
|
||||
public function EffectIndicator_iconNitroCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/12_alternativa.tanks.game.usertitle.EffectIndicator_iconPowerCls_alternativa.tanks.game.usertitle.EffectIndicator_iconPowerCls.png")]
|
||||
public class EffectIndicator_iconPowerCls extends BitmapAsset
|
||||
{
|
||||
public function EffectIndicator_iconPowerCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/6_alternativa.tanks.game.usertitle.ProgressBarSkin_hpBlueEmptyCls_alternativa.tanks.game.usertitle.ProgressBarSkin_hpBlueEmptyCls.png")]
|
||||
public class ProgressBarSkin_hpBlueEmptyCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_hpBlueEmptyCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/8_alternativa.tanks.game.usertitle.ProgressBarSkin_hpBlueFullCls_alternativa.tanks.game.usertitle.ProgressBarSkin_hpBlueFullCls.png")]
|
||||
public class ProgressBarSkin_hpBlueFullCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_hpBlueFullCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/3_alternativa.tanks.game.usertitle.ProgressBarSkin_hpGreenEmptyCls_alternativa.tanks.game.usertitle.ProgressBarSkin_hpGreenEmptyCls.png")]
|
||||
public class ProgressBarSkin_hpGreenEmptyCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_hpGreenEmptyCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/1_alternativa.tanks.game.usertitle.ProgressBarSkin_hpGreenFullCls_alternativa.tanks.game.usertitle.ProgressBarSkin_hpGreenFullCls.png")]
|
||||
public class ProgressBarSkin_hpGreenFullCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_hpGreenFullCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/2_alternativa.tanks.game.usertitle.ProgressBarSkin_hpRedEmptyCls_alternativa.tanks.game.usertitle.ProgressBarSkin_hpRedEmptyCls.png")]
|
||||
public class ProgressBarSkin_hpRedEmptyCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_hpRedEmptyCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/7_alternativa.tanks.game.usertitle.ProgressBarSkin_hpRedFullCls_alternativa.tanks.game.usertitle.ProgressBarSkin_hpRedFullCls.png")]
|
||||
public class ProgressBarSkin_hpRedFullCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_hpRedFullCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/5_alternativa.tanks.game.usertitle.ProgressBarSkin_weaponEmptyCls_alternativa.tanks.game.usertitle.ProgressBarSkin_weaponEmptyCls.png")]
|
||||
public class ProgressBarSkin_weaponEmptyCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_weaponEmptyCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/4_alternativa.tanks.game.usertitle.ProgressBarSkin_weaponFullCls_alternativa.tanks.game.usertitle.ProgressBarSkin_weaponFullCls.png")]
|
||||
public class ProgressBarSkin_weaponFullCls extends BitmapAsset
|
||||
{
|
||||
public function ProgressBarSkin_weaponFullCls()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
24
src/alternativa/tanks/game/usertitle/component/class_40.as
Normal file
@@ -0,0 +1,24 @@
|
||||
package alternativa.tanks.game.usertitle.component
|
||||
{
|
||||
import package_114.class_35;
|
||||
|
||||
public class class_40 implements class_35
|
||||
{
|
||||
protected var component:name_245;
|
||||
|
||||
public function class_40(component:name_245)
|
||||
{
|
||||
super();
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public function start(data:*) : void
|
||||
{
|
||||
}
|
||||
|
||||
public function stop() : void
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
166
src/alternativa/tanks/game/usertitle/component/name_245.as
Normal file
@@ -0,0 +1,166 @@
|
||||
package alternativa.tanks.game.usertitle.component
|
||||
{
|
||||
import alternativa.tanks.game.usertitle.name_607;
|
||||
import alternativa.tanks.game.usertitle.name_610;
|
||||
import alternativa.tanks.game.usertitle.name_613;
|
||||
import package_10.class_17;
|
||||
import package_10.name_17;
|
||||
import package_114.name_488;
|
||||
import package_18.name_44;
|
||||
import package_18.name_82;
|
||||
import package_45.name_182;
|
||||
import package_46.name_194;
|
||||
import package_71.name_252;
|
||||
import package_74.class_25;
|
||||
import package_75.name_236;
|
||||
|
||||
public class name_245 extends class_17 implements name_82
|
||||
{
|
||||
private static const REMOTE_LABEL_OFFSET_Z:int = 200;
|
||||
|
||||
private static var position:name_194 = new name_194();
|
||||
|
||||
private var var_505:name_607;
|
||||
|
||||
private var chassisComponent:name_236;
|
||||
|
||||
private var var_442:class_25;
|
||||
|
||||
private var localPlayer:Boolean;
|
||||
|
||||
private var var_424:name_488;
|
||||
|
||||
private var gameKernel:name_17;
|
||||
|
||||
private var var_426:Boolean;
|
||||
|
||||
private var var_506:name_609;
|
||||
|
||||
private var titleRenderer:name_610;
|
||||
|
||||
public function name_245(maxHealth:int, rankIcon:name_613, name:String, localPlayer:Boolean, label:name_617, configFlags:int, titleRenderer:name_610)
|
||||
{
|
||||
super();
|
||||
this.var_505 = new name_607(maxHealth,rankIcon,label);
|
||||
this.localPlayer = localPlayer;
|
||||
this.titleRenderer = titleRenderer;
|
||||
this.var_505.name_620(name);
|
||||
this.var_505.name_619(configFlags);
|
||||
}
|
||||
|
||||
public function name_328() : Boolean
|
||||
{
|
||||
return this.var_426;
|
||||
}
|
||||
|
||||
public function method_527() : Boolean
|
||||
{
|
||||
return this.localPlayer;
|
||||
}
|
||||
|
||||
public function method_524(maxHealth:int) : void
|
||||
{
|
||||
this.var_505.method_524(maxHealth);
|
||||
}
|
||||
|
||||
public function name_339(indicatorId:int, duration:int) : void
|
||||
{
|
||||
this.var_505.name_339(indicatorId,duration);
|
||||
}
|
||||
|
||||
public function name_330(indicatorId:int) : void
|
||||
{
|
||||
this.var_505.name_330(indicatorId);
|
||||
}
|
||||
|
||||
override public function initComponent() : void
|
||||
{
|
||||
this.chassisComponent = name_236(entity.getComponentStrict(name_236));
|
||||
this.var_442 = class_25(entity.getComponent(class_25));
|
||||
this.var_424 = new name_488();
|
||||
this.var_506 = new name_609(this);
|
||||
this.var_424.name_486(entity,name_252.SET_ACTIVATING_STATE,this.var_506);
|
||||
this.var_424.name_486(entity,name_252.SET_ACTIVE_STATE,this.var_506);
|
||||
this.var_424.name_486(entity,name_252.SET_DEAD_STATE,new name_492(this));
|
||||
var offSceneState:name_608 = new name_608(this);
|
||||
this.var_424.name_486(entity,name_252.SET_RESPAWN_STATE,offSceneState);
|
||||
this.var_424.name_493 = offSceneState;
|
||||
entity.addEventHandler(name_252.SET_HEALTH,this.method_525);
|
||||
}
|
||||
|
||||
private function method_525(eventType:String, data:*) : void
|
||||
{
|
||||
this.setHealth(Number(data));
|
||||
}
|
||||
|
||||
override public function addToGame(gameKernel:name_17) : void
|
||||
{
|
||||
this.gameKernel = gameKernel;
|
||||
this.var_505.name_612(gameKernel.name_5());
|
||||
}
|
||||
|
||||
override public function removeFromGame(gameKernel:name_17) : void
|
||||
{
|
||||
this.var_424.name_493.stop();
|
||||
this.removeFromScene();
|
||||
}
|
||||
|
||||
public function addToScene() : void
|
||||
{
|
||||
var renderSystem:name_44 = null;
|
||||
if(!this.var_426)
|
||||
{
|
||||
renderSystem = this.gameKernel.name_5();
|
||||
if(this.localPlayer)
|
||||
{
|
||||
this.var_505.name_615();
|
||||
}
|
||||
this.var_505.name_611(renderSystem.method_46());
|
||||
renderSystem.method_63(this);
|
||||
this.var_426 = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function removeFromScene() : void
|
||||
{
|
||||
if(this.var_426)
|
||||
{
|
||||
this.var_505.name_618();
|
||||
this.gameKernel.name_5().method_64(this);
|
||||
this.var_426 = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function setHealth(health:Number) : void
|
||||
{
|
||||
this.var_505.setHealth(health);
|
||||
}
|
||||
|
||||
public function method_526(rankId:int) : void
|
||||
{
|
||||
this.var_505.method_526(rankId);
|
||||
}
|
||||
|
||||
public function render() : void
|
||||
{
|
||||
this.chassisComponent.name_503(position);
|
||||
position.transform4(this.chassisComponent.name_502());
|
||||
if(this.localPlayer && this.var_442 != null)
|
||||
{
|
||||
this.var_505.name_616(this.var_442.method_396() * 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
position.z += REMOTE_LABEL_OFFSET_Z;
|
||||
}
|
||||
this.titleRenderer.name_614(entity,this);
|
||||
this.var_505.update(position,name_182.time,name_182.timeDelta);
|
||||
}
|
||||
|
||||
public function getTitle() : name_607
|
||||
{
|
||||
return this.var_505;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
src/alternativa/tanks/game/usertitle/component/name_492.as
Normal file
@@ -0,0 +1,17 @@
|
||||
package alternativa.tanks.game.usertitle.component
|
||||
{
|
||||
public class name_492 extends class_40
|
||||
{
|
||||
public function name_492(component:name_245)
|
||||
{
|
||||
super(component);
|
||||
}
|
||||
|
||||
override public function start(data:*) : void
|
||||
{
|
||||
component.addToScene();
|
||||
component.getTitle().setDeadState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
src/alternativa/tanks/game/usertitle/component/name_608.as
Normal file
@@ -0,0 +1,16 @@
|
||||
package alternativa.tanks.game.usertitle.component
|
||||
{
|
||||
public class name_608 extends class_40
|
||||
{
|
||||
public function name_608(component:name_245)
|
||||
{
|
||||
super(component);
|
||||
}
|
||||
|
||||
override public function start(data:*) : void
|
||||
{
|
||||
component.removeFromScene();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
src/alternativa/tanks/game/usertitle/component/name_609.as
Normal file
@@ -0,0 +1,17 @@
|
||||
package alternativa.tanks.game.usertitle.component
|
||||
{
|
||||
public class name_609 extends class_40
|
||||
{
|
||||
public function name_609(component:name_245)
|
||||
{
|
||||
super(component);
|
||||
}
|
||||
|
||||
override public function start(data:*) : void
|
||||
{
|
||||
component.addToScene();
|
||||
component.getTitle().clearDeadState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
src/alternativa/tanks/game/usertitle/component/name_617.as
Normal file
@@ -0,0 +1,18 @@
|
||||
package alternativa.tanks.game.usertitle.component
|
||||
{
|
||||
import flash.display.IBitmapDrawable;
|
||||
|
||||
public interface name_617
|
||||
{
|
||||
function set text(param1:String) : void;
|
||||
|
||||
function get textWidth() : int;
|
||||
|
||||
function get textHeight() : int;
|
||||
|
||||
function set textColor(param1:uint) : void;
|
||||
|
||||
function method_777() : IBitmapDrawable;
|
||||
}
|
||||
}
|
||||
|
||||
624
src/alternativa/tanks/game/usertitle/name_607.as
Normal file
@@ -0,0 +1,624 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import alternativa.tanks.game.usertitle.component.name_617;
|
||||
import flash.display.BitmapData;
|
||||
import flash.filters.GlowFilter;
|
||||
import flash.geom.Matrix;
|
||||
import flash.geom.Point;
|
||||
import flash.geom.Rectangle;
|
||||
import flash.utils.Dictionary;
|
||||
import package_126.name_723;
|
||||
import package_18.class_3;
|
||||
import package_19.name_494;
|
||||
import package_21.name_78;
|
||||
import package_28.name_93;
|
||||
import package_39.name_160;
|
||||
import package_4.class_5;
|
||||
import package_46.name_194;
|
||||
import package_5.name_3;
|
||||
|
||||
public class name_607
|
||||
{
|
||||
public static const BIT_LABEL:int = 1;
|
||||
|
||||
public static const BIT_HEALTH:int = 2;
|
||||
|
||||
public static const BIT_WEAPON:int = 4;
|
||||
|
||||
public static const BIT_EFFECTS:int = 8;
|
||||
|
||||
private static const CONFIG_FLAGS:int = BIT_LABEL | BIT_HEALTH | BIT_WEAPON | BIT_EFFECTS;
|
||||
|
||||
private static const DIRTY_MASK:int = CONFIG_FLAGS << 8;
|
||||
|
||||
private static const BIT_STATE_HIDDEN:int = 1 << 16;
|
||||
|
||||
private static const BIT_STATE_DEAD:int = 1 << 17;
|
||||
|
||||
private static const HIDDEN_STATE_FLAGS:int = BIT_STATE_HIDDEN | BIT_STATE_DEAD;
|
||||
|
||||
private static const MAX_PROGRESS:int = 100;
|
||||
|
||||
private static const EFFECT_WARNING_TIME:int = 3000;
|
||||
|
||||
private static const RANK_ICON_SIZE:int = 12;
|
||||
|
||||
private static const RANK_ICON_OFFSET_Y:int = 0;
|
||||
|
||||
private static const EFFECTS_ICON_SIZE:int = 16;
|
||||
|
||||
private static const LABEL_HEIGHT:int = 12;
|
||||
|
||||
private static const LABEL_SPACING:int = 0;
|
||||
|
||||
private static const HEALTH_BAR_SPACING_Y:int = 2;
|
||||
|
||||
private static const WEAPON_BAR_SPACING_Y:int = -1;
|
||||
|
||||
private static const EFFECTS_SPACING_Y:int = 4;
|
||||
|
||||
private static const EFFECTS_SPACING_X:int = 4;
|
||||
|
||||
private static const BAR_WIDTH:int = 100;
|
||||
|
||||
private static const BAR_HEIGHT:int = 13;
|
||||
|
||||
private static const TEXTURE_MARGIN:int = 3;
|
||||
|
||||
private static const TEXTURE_MARGIN_2:int = 2 * TEXTURE_MARGIN;
|
||||
|
||||
private static const ALPHA_SPEED:Number = 0.002;
|
||||
|
||||
private static const matrix:Matrix = new Matrix();
|
||||
|
||||
private static const filter:GlowFilter = new GlowFilter(0,0.8,4,4,3);
|
||||
|
||||
private static const indicatorTypes:Vector.<int> = Vector.<int>([name_722.TYPE_HEALTH,name_722.TYPE_ARMOR,name_722.TYPE_POWER,name_722.TYPE_NITRO]);
|
||||
|
||||
private static var teamTypeSkin:Dictionary = new Dictionary();
|
||||
|
||||
teamTypeSkin[name_723.NONE] = name_724.HEALTHBAR_DM;
|
||||
teamTypeSkin[name_723.BLUE] = name_724.HEALTHBAR_BLUE;
|
||||
teamTypeSkin[name_723.RED] = name_724.HEALTHBAR_RED;
|
||||
|
||||
private var flags:int;
|
||||
|
||||
private var sprite:name_494;
|
||||
|
||||
private var var_650:Rectangle;
|
||||
|
||||
private var material:class_5;
|
||||
|
||||
private var textureResource:name_93;
|
||||
|
||||
private var texture:BitmapData;
|
||||
|
||||
private var label:name_617;
|
||||
|
||||
private var labelText:String;
|
||||
|
||||
private var rankIcon:name_613;
|
||||
|
||||
private var rankId:int;
|
||||
|
||||
private var var_652:name_725;
|
||||
|
||||
private var var_654:name_725;
|
||||
|
||||
private var var_649:Vector.<name_722>;
|
||||
|
||||
private var var_651:int;
|
||||
|
||||
private var var_655:int;
|
||||
|
||||
private var var_653:Boolean;
|
||||
|
||||
private var maxHealth:int;
|
||||
|
||||
private var health:Number;
|
||||
|
||||
private var weaponStatus:Number;
|
||||
|
||||
private var teamType:name_723 = name_723.NONE;
|
||||
|
||||
private var resourceManager:class_3;
|
||||
|
||||
public function name_607(maxHealth:int, rankIcon:name_613, label:name_617)
|
||||
{
|
||||
super();
|
||||
this.maxHealth = maxHealth;
|
||||
this.rankIcon = rankIcon;
|
||||
this.label = label;
|
||||
this.resourceManager = this.resourceManager;
|
||||
this.textureResource = new name_93(null);
|
||||
this.material = new class_5(this.textureResource);
|
||||
this.material.var_21 = true;
|
||||
this.sprite = new name_494(100,100,this.material);
|
||||
this.sprite.material = this.material;
|
||||
this.sprite.perspectiveScale = false;
|
||||
this.setDeadState();
|
||||
}
|
||||
|
||||
public function name_612(resourceManager:class_3) : void
|
||||
{
|
||||
this.resourceManager = resourceManager;
|
||||
}
|
||||
|
||||
public function name_615() : void
|
||||
{
|
||||
this.sprite.alwaysOnTop = true;
|
||||
}
|
||||
|
||||
public function method_524(maxHealth:int) : void
|
||||
{
|
||||
this.maxHealth = maxHealth;
|
||||
}
|
||||
|
||||
public function method_798() : void
|
||||
{
|
||||
this.method_782(BIT_STATE_HIDDEN);
|
||||
}
|
||||
|
||||
public function method_796() : void
|
||||
{
|
||||
this.method_781(BIT_STATE_HIDDEN);
|
||||
}
|
||||
|
||||
public function setDeadState() : void
|
||||
{
|
||||
this.method_782(BIT_STATE_DEAD);
|
||||
}
|
||||
|
||||
public function clearDeadState() : void
|
||||
{
|
||||
this.method_781(BIT_STATE_DEAD);
|
||||
}
|
||||
|
||||
public function method_141() : Boolean
|
||||
{
|
||||
return (this.flags & HIDDEN_STATE_FLAGS) == 0;
|
||||
}
|
||||
|
||||
public function name_619(configFlags:int) : void
|
||||
{
|
||||
if(!this.method_778(configFlags))
|
||||
{
|
||||
this.method_782(configFlags);
|
||||
this.method_783();
|
||||
}
|
||||
}
|
||||
|
||||
public function method_795(teamType:name_723) : void
|
||||
{
|
||||
var bit:int = 0;
|
||||
if(this.teamType != teamType)
|
||||
{
|
||||
this.teamType = teamType;
|
||||
for each(bit in [BIT_LABEL,BIT_HEALTH,BIT_WEAPON])
|
||||
{
|
||||
if(this.method_778(bit))
|
||||
{
|
||||
this.method_779(bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function method_526(rankId:int) : void
|
||||
{
|
||||
if(this.rankId != rankId)
|
||||
{
|
||||
this.rankId = rankId;
|
||||
if(this.method_778(BIT_LABEL))
|
||||
{
|
||||
this.method_779(BIT_LABEL | BIT_HEALTH | BIT_WEAPON | BIT_EFFECTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function name_620(labelText:String) : void
|
||||
{
|
||||
if(this.labelText != labelText)
|
||||
{
|
||||
this.labelText = labelText;
|
||||
if(this.method_778(BIT_LABEL))
|
||||
{
|
||||
this.method_783();
|
||||
this.method_779(BIT_LABEL | BIT_HEALTH | BIT_WEAPON | BIT_EFFECTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setHealth(health:Number) : void
|
||||
{
|
||||
if(this.health != health)
|
||||
{
|
||||
this.health = health;
|
||||
if(this.method_778(BIT_HEALTH))
|
||||
{
|
||||
this.method_779(BIT_HEALTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function name_616(weaponStatus:Number) : void
|
||||
{
|
||||
if(this.weaponStatus != weaponStatus)
|
||||
{
|
||||
this.weaponStatus = weaponStatus;
|
||||
if(this.method_778(BIT_WEAPON))
|
||||
{
|
||||
this.method_779(BIT_WEAPON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function name_339(indicatorId:int, duration:int) : void
|
||||
{
|
||||
var indicator:name_722 = null;
|
||||
if(this.method_778(BIT_EFFECTS))
|
||||
{
|
||||
indicator = this.method_785(indicatorId);
|
||||
if(indicator != null)
|
||||
{
|
||||
if(indicator.name_726())
|
||||
{
|
||||
this.method_787(1);
|
||||
}
|
||||
indicator.show(duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function name_330(indicatorId:int) : void
|
||||
{
|
||||
var indicator:name_722 = null;
|
||||
if(this.method_778(BIT_EFFECTS))
|
||||
{
|
||||
indicator = this.method_785(indicatorId);
|
||||
if(indicator != null)
|
||||
{
|
||||
indicator.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function method_797() : void
|
||||
{
|
||||
var indicatorId:int = 0;
|
||||
if(this.var_649 != null && this.method_778(BIT_EFFECTS))
|
||||
{
|
||||
for each(indicatorId in indicatorTypes)
|
||||
{
|
||||
this.name_330(indicatorId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal function method_794(indicator:name_722) : void
|
||||
{
|
||||
indicator.clear(this.texture);
|
||||
this.method_787(-1);
|
||||
}
|
||||
|
||||
public function update(pos:name_194, time:int, timeDelta:int) : void
|
||||
{
|
||||
var reloadResource:Boolean = false;
|
||||
var effectIndicator:name_722 = null;
|
||||
this.name_201(pos);
|
||||
this.method_791(timeDelta);
|
||||
if(this.method_786(DIRTY_MASK))
|
||||
{
|
||||
reloadResource = true;
|
||||
if(this.method_780(BIT_LABEL))
|
||||
{
|
||||
this.method_789();
|
||||
}
|
||||
if(this.method_780(BIT_HEALTH))
|
||||
{
|
||||
this.var_652.name_727(teamTypeSkin[this.teamType]);
|
||||
this.var_652.progress = MAX_PROGRESS * this.health / this.maxHealth;
|
||||
this.var_652.draw(this.texture);
|
||||
}
|
||||
if(this.method_780(BIT_WEAPON))
|
||||
{
|
||||
this.var_654.progress = this.weaponStatus;
|
||||
this.var_654.draw(this.texture);
|
||||
}
|
||||
if(this.method_780(BIT_EFFECTS))
|
||||
{
|
||||
for each(effectIndicator in this.var_649)
|
||||
{
|
||||
effectIndicator.name_728();
|
||||
}
|
||||
}
|
||||
this.method_781(DIRTY_MASK);
|
||||
}
|
||||
if(this.method_778(BIT_EFFECTS))
|
||||
{
|
||||
reloadResource = this.method_792(time,timeDelta) || reloadResource;
|
||||
}
|
||||
if(reloadResource)
|
||||
{
|
||||
this.resourceManager.method_30(this.textureResource);
|
||||
}
|
||||
}
|
||||
|
||||
private function method_780(bit:int) : Boolean
|
||||
{
|
||||
var mask:int = bit | bit << 8;
|
||||
return (mask & this.flags) == mask;
|
||||
}
|
||||
|
||||
private function method_792(now:int, delta:int) : Boolean
|
||||
{
|
||||
var indicator:name_722 = null;
|
||||
var i:int = 0;
|
||||
var wereUpdated:Boolean = false;
|
||||
var x:int = 0;
|
||||
var num:int = int(this.var_649.length);
|
||||
if(this.var_653)
|
||||
{
|
||||
this.var_653 = false;
|
||||
x = this.var_650.width + TEXTURE_MARGIN_2 - this.var_651 * EFFECTS_ICON_SIZE - (this.var_651 - 1) * EFFECTS_SPACING_X >> 1;
|
||||
for(i = 0; i < num; )
|
||||
{
|
||||
indicator = this.var_649[i];
|
||||
if(indicator.method_141())
|
||||
{
|
||||
indicator.clear(this.texture);
|
||||
}
|
||||
if(!indicator.name_726())
|
||||
{
|
||||
indicator.name_201(x,this.var_655);
|
||||
x += EFFECTS_ICON_SIZE + EFFECTS_SPACING_X;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
wereUpdated = true;
|
||||
}
|
||||
for(i = 0; i < num; )
|
||||
{
|
||||
indicator = this.var_649[i];
|
||||
wereUpdated = indicator.update(now,delta,this.texture) || wereUpdated;
|
||||
i++;
|
||||
}
|
||||
return wereUpdated;
|
||||
}
|
||||
|
||||
private function method_787(increment:int) : void
|
||||
{
|
||||
this.var_651 += increment;
|
||||
this.var_653 = true;
|
||||
}
|
||||
|
||||
private function method_783() : void
|
||||
{
|
||||
if(this.method_786(CONFIG_FLAGS))
|
||||
{
|
||||
this.method_788();
|
||||
this.method_790();
|
||||
}
|
||||
}
|
||||
|
||||
private function method_788() : void
|
||||
{
|
||||
var width:int = 0;
|
||||
var height:int = 0;
|
||||
var numEffects:int = 0;
|
||||
var w:int = 0;
|
||||
if(this.method_778(BIT_LABEL))
|
||||
{
|
||||
this.label.text = this.labelText || "";
|
||||
width = RANK_ICON_SIZE + LABEL_SPACING + this.label.textWidth;
|
||||
height = LABEL_HEIGHT;
|
||||
}
|
||||
if(this.method_778(BIT_HEALTH))
|
||||
{
|
||||
if(width < BAR_WIDTH)
|
||||
{
|
||||
width = BAR_WIDTH;
|
||||
}
|
||||
if(height > 0)
|
||||
{
|
||||
height += HEALTH_BAR_SPACING_Y;
|
||||
}
|
||||
height += BAR_HEIGHT;
|
||||
if(this.method_778(BIT_WEAPON))
|
||||
{
|
||||
height += WEAPON_BAR_SPACING_Y + BAR_HEIGHT;
|
||||
}
|
||||
}
|
||||
if(this.method_778(BIT_EFFECTS))
|
||||
{
|
||||
numEffects = 4;
|
||||
w = numEffects * EFFECTS_ICON_SIZE + (numEffects - 1) * EFFECTS_SPACING_X;
|
||||
if(width < w)
|
||||
{
|
||||
width = w;
|
||||
}
|
||||
if(height > 0)
|
||||
{
|
||||
height += EFFECTS_SPACING_Y;
|
||||
}
|
||||
height += EFFECTS_ICON_SIZE;
|
||||
}
|
||||
width += 2 * TEXTURE_MARGIN;
|
||||
width = this.method_784(width);
|
||||
height += 2 * TEXTURE_MARGIN;
|
||||
height = this.method_784(height);
|
||||
if(this.texture == null || this.texture.width != width || this.texture.height != height)
|
||||
{
|
||||
if(this.texture != null)
|
||||
{
|
||||
this.texture.dispose();
|
||||
}
|
||||
this.texture = new BitmapData(width,height,true,0);
|
||||
this.textureResource.data = this.texture;
|
||||
this.sprite.width = width;
|
||||
this.sprite.height = height;
|
||||
this.var_650 = this.texture.rect;
|
||||
this.method_779(BIT_LABEL | BIT_HEALTH | BIT_WEAPON | BIT_EFFECTS);
|
||||
}
|
||||
}
|
||||
|
||||
private function method_784(value:int) : int
|
||||
{
|
||||
for(var power:int = 2; value > power; )
|
||||
{
|
||||
power <<= 1;
|
||||
}
|
||||
return power;
|
||||
}
|
||||
|
||||
private function method_790() : void
|
||||
{
|
||||
var left:int = 0;
|
||||
var top:int = TEXTURE_MARGIN;
|
||||
if(this.method_778(BIT_LABEL))
|
||||
{
|
||||
top += LABEL_HEIGHT;
|
||||
}
|
||||
if(this.method_778(BIT_HEALTH))
|
||||
{
|
||||
if(this.method_778(BIT_LABEL))
|
||||
{
|
||||
top += HEALTH_BAR_SPACING_Y;
|
||||
}
|
||||
left = this.var_650.width - BAR_WIDTH >> 1;
|
||||
this.var_652 = new name_725(left,top,MAX_PROGRESS,BAR_WIDTH,teamTypeSkin[this.teamType]);
|
||||
top += BAR_HEIGHT;
|
||||
if(this.method_778(BIT_WEAPON))
|
||||
{
|
||||
top += WEAPON_BAR_SPACING_Y;
|
||||
this.var_654 = new name_725(left,top,MAX_PROGRESS,BAR_WIDTH,name_724.WEAPONBAR);
|
||||
top += BAR_HEIGHT;
|
||||
}
|
||||
}
|
||||
if(this.method_778(BIT_EFFECTS))
|
||||
{
|
||||
top += EFFECTS_SPACING_Y;
|
||||
this.var_655 = top;
|
||||
this.method_793();
|
||||
}
|
||||
}
|
||||
|
||||
public function name_611(container:name_78) : void
|
||||
{
|
||||
if(this.sprite.parent == null)
|
||||
{
|
||||
container.addChild(this.sprite);
|
||||
}
|
||||
}
|
||||
|
||||
public function name_618() : void
|
||||
{
|
||||
if(this.sprite.parent != null)
|
||||
{
|
||||
this.sprite.parent.removeChild(this.sprite);
|
||||
}
|
||||
}
|
||||
|
||||
public function name_201(pos:name_194) : void
|
||||
{
|
||||
this.sprite.x = pos.x;
|
||||
this.sprite.y = pos.y;
|
||||
this.sprite.z = pos.z;
|
||||
}
|
||||
|
||||
private function method_779(configBit:int) : void
|
||||
{
|
||||
this.flags |= configBit << 8;
|
||||
}
|
||||
|
||||
private function method_789() : void
|
||||
{
|
||||
var clientLog:name_160 = null;
|
||||
var tmpBitmapData:BitmapData = this.texture.clone();
|
||||
tmpBitmapData.fillRect(this.var_650,0);
|
||||
var labelWidth:int = RANK_ICON_SIZE + LABEL_SPACING + this.label.textWidth;
|
||||
var left:int = tmpBitmapData.width - labelWidth >> 1;
|
||||
matrix.tx = left;
|
||||
matrix.ty = TEXTURE_MARGIN + RANK_ICON_OFFSET_Y;
|
||||
var icon:BitmapData = this.rankIcon.method_776(this.rankId);
|
||||
clientLog = name_160(name_3.name_8().name_30(name_160));
|
||||
clientLog.log("icon","UserTitle::updateLabel() icon size: %1x%2",icon.width,icon.height);
|
||||
clientLog.log("icon","UserTitle::updateLabel() label height: %1",this.label.textHeight);
|
||||
tmpBitmapData.draw(icon,matrix,null,null,null,true);
|
||||
matrix.tx = left + RANK_ICON_SIZE + LABEL_SPACING;
|
||||
matrix.ty = TEXTURE_MARGIN;
|
||||
var skin:name_724 = teamTypeSkin[this.teamType];
|
||||
this.label.textColor = skin.color;
|
||||
tmpBitmapData.draw(this.label.method_777(),matrix,null,null,null,true);
|
||||
this.texture.applyFilter(tmpBitmapData,this.var_650,new Point(),filter);
|
||||
tmpBitmapData.dispose();
|
||||
}
|
||||
|
||||
private function method_793() : void
|
||||
{
|
||||
var indicatorType:int = 0;
|
||||
if(this.var_649 != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.var_649 = new Vector.<name_722>();
|
||||
for each(indicatorType in indicatorTypes)
|
||||
{
|
||||
if(indicatorType == name_722.TYPE_HEALTH)
|
||||
{
|
||||
this.var_649.push(new name_722(indicatorType,100000,this,300,0));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.var_649.push(new name_722(indicatorType,EFFECT_WARNING_TIME,this,300,30));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function method_785(effectId:int) : name_722
|
||||
{
|
||||
var len:int = 0;
|
||||
var i:int = 0;
|
||||
var indicator:name_722 = null;
|
||||
if(this.var_649 != null)
|
||||
{
|
||||
len = int(this.var_649.length);
|
||||
for(i = 0; i < len; )
|
||||
{
|
||||
indicator = this.var_649[i];
|
||||
if(indicator.effectId == effectId)
|
||||
{
|
||||
return indicator;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private function method_791(delta:int) : void
|
||||
{
|
||||
}
|
||||
|
||||
private function method_782(mask:int) : void
|
||||
{
|
||||
this.flags |= mask;
|
||||
}
|
||||
|
||||
private function method_781(mask:int) : void
|
||||
{
|
||||
this.flags &= ~mask;
|
||||
}
|
||||
|
||||
private function method_786(mask:int) : Boolean
|
||||
{
|
||||
return (this.flags & mask) != 0;
|
||||
}
|
||||
|
||||
private function method_778(mask:int) : Boolean
|
||||
{
|
||||
return (this.flags & mask) == mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
src/alternativa/tanks/game/usertitle/name_610.as
Normal file
@@ -0,0 +1,11 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import alternativa.tanks.game.usertitle.component.name_245;
|
||||
import package_10.name_54;
|
||||
|
||||
public interface name_610
|
||||
{
|
||||
function name_614(param1:name_54, param2:name_245) : void;
|
||||
}
|
||||
}
|
||||
|
||||
10
src/alternativa/tanks/game/usertitle/name_613.as
Normal file
@@ -0,0 +1,10 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import flash.display.BitmapData;
|
||||
|
||||
public interface name_613
|
||||
{
|
||||
function method_776(param1:int) : BitmapData;
|
||||
}
|
||||
}
|
||||
|
||||
224
src/alternativa/tanks/game/usertitle/name_722.as
Normal file
@@ -0,0 +1,224 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
import flash.geom.ColorTransform;
|
||||
import flash.geom.Matrix;
|
||||
import flash.geom.Rectangle;
|
||||
import flash.utils.Dictionary;
|
||||
import flash.utils.getTimer;
|
||||
import package_72.name_764;
|
||||
|
||||
public class name_722
|
||||
{
|
||||
public static const TYPE_HEALTH:int = 1;
|
||||
|
||||
public static const TYPE_ARMOR:int = 2;
|
||||
|
||||
public static const TYPE_POWER:int = 3;
|
||||
|
||||
public static const TYPE_NITRO:int = 4;
|
||||
|
||||
private static const STATE_HIDDEN:int = 1;
|
||||
|
||||
private static const STATE_PREPARED:int = 2;
|
||||
|
||||
private static const STATE_VISIBLE:int = 4;
|
||||
|
||||
private static const STATE_HIDING:int = 8;
|
||||
|
||||
private static const iconHealthCls:Class = EffectIndicator_iconHealthCls;
|
||||
|
||||
private static const iconArmorCls:Class = EffectIndicator_iconArmorCls;
|
||||
|
||||
private static const iconPowerCls:Class = EffectIndicator_iconPowerCls;
|
||||
|
||||
private static const iconNitroCls:Class = EffectIndicator_iconNitroCls;
|
||||
|
||||
private static const MIN_ALPHA:Number = 0.2;
|
||||
|
||||
private static var matrix:Matrix = new Matrix();
|
||||
|
||||
private static var icons:Dictionary = new Dictionary();
|
||||
|
||||
icons[TYPE_HEALTH] = Bitmap(new iconHealthCls()).bitmapData;
|
||||
icons[TYPE_ARMOR] = Bitmap(new iconArmorCls()).bitmapData;
|
||||
icons[TYPE_POWER] = Bitmap(new iconPowerCls()).bitmapData;
|
||||
icons[TYPE_NITRO] = Bitmap(new iconNitroCls()).bitmapData;
|
||||
|
||||
private static var iconRect:Rectangle = BitmapData(icons[TYPE_HEALTH]).rect;
|
||||
|
||||
private var var_713:int;
|
||||
|
||||
private var icon:BitmapData;
|
||||
|
||||
private var blinkingTime:int;
|
||||
|
||||
private var colorTransform:ColorTransform = new ColorTransform();
|
||||
|
||||
private var var_712:int;
|
||||
|
||||
private var var_709:name_764;
|
||||
|
||||
private var alpha:Number = 1;
|
||||
|
||||
private var var_710:Boolean;
|
||||
|
||||
private var x:int;
|
||||
|
||||
private var y:int;
|
||||
|
||||
private var userTitle:name_607;
|
||||
|
||||
private var state:int;
|
||||
|
||||
private var var_711:Boolean;
|
||||
|
||||
public function name_722(effectId:int, blinkingTime:int, userTitle:name_607, initialBlinkInterval:int, blinkIntervalDecrement:int)
|
||||
{
|
||||
super();
|
||||
this.var_713 = effectId;
|
||||
this.icon = icons[effectId];
|
||||
this.blinkingTime = blinkingTime;
|
||||
this.userTitle = userTitle;
|
||||
this.var_709 = new name_764(initialBlinkInterval,20,blinkIntervalDecrement,MIN_ALPHA,1,10);
|
||||
this.state = STATE_HIDDEN;
|
||||
}
|
||||
|
||||
public function get effectId() : int
|
||||
{
|
||||
return this.var_713;
|
||||
}
|
||||
|
||||
public function method_141() : Boolean
|
||||
{
|
||||
return (this.state & STATE_VISIBLE) != 0;
|
||||
}
|
||||
|
||||
public function name_726() : Boolean
|
||||
{
|
||||
return this.state == STATE_HIDDEN;
|
||||
}
|
||||
|
||||
public function show(duration:int) : void
|
||||
{
|
||||
this.state &= ~STATE_HIDING;
|
||||
if(this.state != STATE_VISIBLE || this.alpha != 1)
|
||||
{
|
||||
this.var_710 = true;
|
||||
}
|
||||
this.var_712 = getTimer() + duration - this.blinkingTime;
|
||||
this.var_711 = false;
|
||||
this.alpha = 1;
|
||||
if(this.state == STATE_HIDDEN)
|
||||
{
|
||||
this.state = STATE_PREPARED;
|
||||
}
|
||||
}
|
||||
|
||||
public function hide() : void
|
||||
{
|
||||
if(this.state == STATE_PREPARED)
|
||||
{
|
||||
this.userTitle.method_794(this);
|
||||
this.state = STATE_HIDDEN;
|
||||
return;
|
||||
}
|
||||
if((this.state & (STATE_HIDDEN | STATE_HIDING)) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.state |= STATE_HIDING;
|
||||
this.var_709.name_765(0);
|
||||
if(!this.var_711)
|
||||
{
|
||||
this.var_712 = 0;
|
||||
this.var_709.init(getTimer());
|
||||
this.var_711 = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function clear(texture:BitmapData) : void
|
||||
{
|
||||
if(this.state == STATE_HIDDEN || this.state == STATE_PREPARED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
iconRect.x = this.x;
|
||||
iconRect.y = this.y;
|
||||
texture.fillRect(iconRect,0);
|
||||
}
|
||||
|
||||
public function name_201(x:int, y:int) : void
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.var_710 = true;
|
||||
}
|
||||
|
||||
public function name_728() : void
|
||||
{
|
||||
this.var_710 = true;
|
||||
}
|
||||
|
||||
public function update(now:int, delta:int, texture:BitmapData) : Boolean
|
||||
{
|
||||
var updated:Boolean = false;
|
||||
if(this.state == STATE_HIDDEN)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(this.var_710)
|
||||
{
|
||||
this.draw(texture);
|
||||
this.var_710 = false;
|
||||
updated = true;
|
||||
}
|
||||
if(now > this.var_712)
|
||||
{
|
||||
this.method_884(now,delta,texture);
|
||||
updated = true;
|
||||
}
|
||||
if(this.state == STATE_PREPARED)
|
||||
{
|
||||
this.state = STATE_VISIBLE;
|
||||
}
|
||||
return updated;
|
||||
}
|
||||
|
||||
private function method_884(now:int, delta:int, texture:BitmapData) : void
|
||||
{
|
||||
var newAlpha:Number = NaN;
|
||||
if(this.var_711)
|
||||
{
|
||||
newAlpha = this.var_709.name_766(now,delta);
|
||||
if(newAlpha != this.alpha)
|
||||
{
|
||||
this.alpha = newAlpha;
|
||||
this.draw(texture);
|
||||
}
|
||||
if((this.state & STATE_HIDING) != 0 && this.alpha == 0)
|
||||
{
|
||||
this.userTitle.method_794(this);
|
||||
this.state = STATE_HIDDEN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.var_709.name_765(MIN_ALPHA);
|
||||
this.var_709.init(now);
|
||||
this.var_711 = true;
|
||||
}
|
||||
}
|
||||
|
||||
private function draw(texture:BitmapData) : void
|
||||
{
|
||||
this.clear(texture);
|
||||
matrix.tx = this.x;
|
||||
matrix.ty = this.y;
|
||||
this.colorTransform.alphaMultiplier = this.alpha;
|
||||
texture.draw(this.icon,matrix,this.colorTransform,null,null,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
83
src/alternativa/tanks/game/usertitle/name_724.as
Normal file
@@ -0,0 +1,83 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
|
||||
public class name_724
|
||||
{
|
||||
private static var hpGreenEmptyCls:Class = ProgressBarSkin_hpGreenEmptyCls;
|
||||
|
||||
private static var hpGreenEmpty:BitmapData = Bitmap(new hpGreenEmptyCls()).bitmapData;
|
||||
|
||||
private static var hpGreenFullCls:Class = ProgressBarSkin_hpGreenFullCls;
|
||||
|
||||
private static var hpGreenFull:BitmapData = Bitmap(new hpGreenFullCls()).bitmapData;
|
||||
|
||||
private static var hpRedEmptyCls:Class = ProgressBarSkin_hpRedEmptyCls;
|
||||
|
||||
private static var hpRedEmpty:BitmapData = Bitmap(new hpRedEmptyCls()).bitmapData;
|
||||
|
||||
private static var hpRedFullCls:Class = ProgressBarSkin_hpRedFullCls;
|
||||
|
||||
private static var hpRedFull:BitmapData = Bitmap(new hpRedFullCls()).bitmapData;
|
||||
|
||||
private static var hpBlueEmptyCls:Class = ProgressBarSkin_hpBlueEmptyCls;
|
||||
|
||||
private static var hpBlueEmpty:BitmapData = Bitmap(new hpBlueEmptyCls()).bitmapData;
|
||||
|
||||
private static var hpBlueFullCls:Class = ProgressBarSkin_hpBlueFullCls;
|
||||
|
||||
private static var hpBlueFull:BitmapData = Bitmap(new hpBlueFullCls()).bitmapData;
|
||||
|
||||
private static var weaponEmptyCls:Class = ProgressBarSkin_weaponEmptyCls;
|
||||
|
||||
private static var weaponEmpty:BitmapData = Bitmap(new weaponEmptyCls()).bitmapData;
|
||||
|
||||
private static var weaponFullCls:Class = ProgressBarSkin_weaponFullCls;
|
||||
|
||||
private static var weaponFull:BitmapData = Bitmap(new weaponFullCls()).bitmapData;
|
||||
|
||||
private static const COLOR_DM:uint = 4964125;
|
||||
|
||||
private static const COLOR_TEAM_BLUE:uint = 4691967;
|
||||
|
||||
private static const COLOR_TEAM_RED:uint = 15741974;
|
||||
|
||||
public static const HEALTHBAR_DM:name_724 = new name_724(COLOR_DM,hpGreenEmpty,hpGreenFull,4);
|
||||
|
||||
public static const HEALTHBAR_BLUE:name_724 = new name_724(COLOR_TEAM_BLUE,hpBlueEmpty,hpBlueFull,4);
|
||||
|
||||
public static const HEALTHBAR_RED:name_724 = new name_724(COLOR_TEAM_RED,hpRedEmpty,hpRedFull,4);
|
||||
|
||||
public static const WEAPONBAR:name_724 = new name_724(0,weaponEmpty,weaponFull,4);
|
||||
|
||||
public var var_704:BitmapData;
|
||||
|
||||
public var var_703:BitmapData;
|
||||
|
||||
public var var_701:BitmapData;
|
||||
|
||||
public var var_705:BitmapData;
|
||||
|
||||
public var var_700:BitmapData;
|
||||
|
||||
public var var_702:BitmapData;
|
||||
|
||||
public var color:uint;
|
||||
|
||||
public function name_724(color:uint, emptyBitmap:BitmapData, fullBitmap:BitmapData, tipWidth:int)
|
||||
{
|
||||
super();
|
||||
this.color = color;
|
||||
var parts:name_763 = new name_763(emptyBitmap,tipWidth);
|
||||
this.var_704 = parts.left;
|
||||
this.var_701 = parts.right;
|
||||
this.var_700 = parts.center;
|
||||
parts = new name_763(fullBitmap,tipWidth);
|
||||
this.var_703 = parts.left;
|
||||
this.var_705 = parts.right;
|
||||
this.var_702 = parts.center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
142
src/alternativa/tanks/game/usertitle/name_725.as
Normal file
@@ -0,0 +1,142 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import flash.display.BitmapData;
|
||||
import flash.display.Graphics;
|
||||
import flash.display.Shape;
|
||||
import flash.geom.Matrix;
|
||||
import flash.geom.Rectangle;
|
||||
|
||||
public class name_725
|
||||
{
|
||||
private static var canvas:Shape = new Shape();
|
||||
|
||||
private static var matrix:Matrix = new Matrix();
|
||||
|
||||
private var maxValue:int;
|
||||
|
||||
private var barWidth:int;
|
||||
|
||||
private var skin:name_724;
|
||||
|
||||
private var var_706:int;
|
||||
|
||||
private var var_707:int;
|
||||
|
||||
private var var_708:int;
|
||||
|
||||
private var x:int;
|
||||
|
||||
private var y:int;
|
||||
|
||||
private var rect:Rectangle;
|
||||
|
||||
public function name_725(x:int, y:int, maxValue:int, barWidth:int, skin:name_724)
|
||||
{
|
||||
super();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.maxValue = maxValue;
|
||||
this.barWidth = barWidth;
|
||||
this.name_727(skin);
|
||||
this.rect = new Rectangle(x,y,barWidth,this.var_707);
|
||||
}
|
||||
|
||||
public function name_727(skin:name_724) : void
|
||||
{
|
||||
this.skin = skin;
|
||||
this.var_706 = skin.var_704.width;
|
||||
this.var_707 = skin.var_704.height;
|
||||
}
|
||||
|
||||
public function get progress() : int
|
||||
{
|
||||
return this.var_708;
|
||||
}
|
||||
|
||||
public function set progress(value:int) : void
|
||||
{
|
||||
if(value < 0)
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
else if(value > this.maxValue)
|
||||
{
|
||||
value = this.maxValue;
|
||||
}
|
||||
this.var_708 = value;
|
||||
}
|
||||
|
||||
public function draw(texture:BitmapData) : void
|
||||
{
|
||||
var bgStart:int = 0;
|
||||
var g:Graphics = canvas.graphics;
|
||||
g.clear();
|
||||
matrix.ty = 0;
|
||||
var displayWidth:int = this.barWidth * this.var_708 / this.maxValue;
|
||||
var w:int = this.barWidth - this.var_706;
|
||||
if(displayWidth >= this.var_706)
|
||||
{
|
||||
if(displayWidth == this.barWidth)
|
||||
{
|
||||
this.method_883(g,this.skin.var_703,this.skin.var_705,this.skin.var_702);
|
||||
bgStart = displayWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
g.beginBitmapFill(this.skin.var_703,null,false);
|
||||
g.drawRect(0,0,this.var_706,this.var_707);
|
||||
if(displayWidth > this.var_706)
|
||||
{
|
||||
if(displayWidth > w)
|
||||
{
|
||||
displayWidth = w;
|
||||
}
|
||||
bgStart = displayWidth;
|
||||
this.method_882(g,this.skin.var_702,this.var_706,displayWidth - this.var_706);
|
||||
}
|
||||
else
|
||||
{
|
||||
bgStart = this.var_706;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(bgStart == 0)
|
||||
{
|
||||
this.method_883(g,this.skin.var_704,this.skin.var_701,this.skin.var_700);
|
||||
}
|
||||
else if(bgStart < this.barWidth)
|
||||
{
|
||||
this.method_882(g,this.skin.var_700,bgStart,w - bgStart);
|
||||
matrix.tx = w;
|
||||
g.beginBitmapFill(this.skin.var_701,matrix,false);
|
||||
g.drawRect(w,0,this.var_706,this.var_707);
|
||||
}
|
||||
g.endFill();
|
||||
texture.fillRect(this.rect,0);
|
||||
matrix.tx = this.x;
|
||||
matrix.ty = this.y;
|
||||
texture.draw(canvas,matrix);
|
||||
}
|
||||
|
||||
private function method_883(g:Graphics, leftTip:BitmapData, rightTip:BitmapData, center:BitmapData) : void
|
||||
{
|
||||
var w:int = this.barWidth - this.var_706;
|
||||
g.beginBitmapFill(leftTip,null,false);
|
||||
g.drawRect(0,0,this.var_706,this.var_707);
|
||||
matrix.tx = this.var_706;
|
||||
g.beginBitmapFill(center,matrix,true);
|
||||
g.drawRect(this.var_706,0,w - this.var_706,this.var_707);
|
||||
matrix.tx = w;
|
||||
g.beginBitmapFill(rightTip,matrix,false);
|
||||
g.drawRect(w,0,this.var_706,this.var_707);
|
||||
}
|
||||
|
||||
private function method_882(g:Graphics, center:BitmapData, x:int, width:int) : void
|
||||
{
|
||||
matrix.tx = x;
|
||||
g.beginBitmapFill(center,matrix,true);
|
||||
g.drawRect(x,0,width,this.var_707);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
29
src/alternativa/tanks/game/usertitle/name_763.as
Normal file
@@ -0,0 +1,29 @@
|
||||
package alternativa.tanks.game.usertitle
|
||||
{
|
||||
import flash.display.BitmapData;
|
||||
import flash.geom.Point;
|
||||
import flash.geom.Rectangle;
|
||||
|
||||
public class name_763
|
||||
{
|
||||
public var left:BitmapData;
|
||||
|
||||
public var right:BitmapData;
|
||||
|
||||
public var center:BitmapData;
|
||||
|
||||
public function name_763(bar:BitmapData, tipWidth:int)
|
||||
{
|
||||
super();
|
||||
var h:int = int(bar.height);
|
||||
var point:Point = new Point();
|
||||
this.left = new BitmapData(tipWidth,h,true,0);
|
||||
this.left.copyPixels(bar,new Rectangle(0,0,tipWidth,h),point);
|
||||
this.right = new BitmapData(tipWidth,h,true,0);
|
||||
this.right.copyPixels(bar,new Rectangle(bar.width - tipWidth,0,tipWidth,h),point);
|
||||
this.center = new BitmapData(1,h,true,0);
|
||||
this.center.copyPixels(bar,new Rectangle(tipWidth,0,1,h),point);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
465
src/mx/core/BitmapAsset.as
Normal file
@@ -0,0 +1,465 @@
|
||||
package mx.core
|
||||
{
|
||||
import flash.display.BitmapData;
|
||||
import flash.display.DisplayObjectContainer;
|
||||
import flash.events.Event;
|
||||
import flash.geom.Point;
|
||||
import flash.system.ApplicationDomain;
|
||||
|
||||
use namespace mx_internal;
|
||||
|
||||
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject, ILayoutDirectionElement
|
||||
{
|
||||
private static var FlexVersionClass:Class;
|
||||
|
||||
private static var MatrixUtilClass:Class;
|
||||
|
||||
mx_internal static const VERSION:String = "4.5.0.19786";
|
||||
|
||||
private var layoutFeaturesClass:Class;
|
||||
|
||||
private var layoutFeatures:IAssetLayoutFeatures;
|
||||
|
||||
private var _height:Number;
|
||||
|
||||
private var _layoutDirection:String = "ltr";
|
||||
|
||||
public function BitmapAsset(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false)
|
||||
{
|
||||
var appDomain:ApplicationDomain = null;
|
||||
super(bitmapData,pixelSnapping,smoothing);
|
||||
if(FlexVersionClass == null)
|
||||
{
|
||||
appDomain = ApplicationDomain.currentDomain;
|
||||
if(appDomain.hasDefinition("mx.core::FlexVersion"))
|
||||
{
|
||||
FlexVersionClass = Class(appDomain.getDefinition("mx.core::FlexVersion"));
|
||||
}
|
||||
}
|
||||
if(Boolean(FlexVersionClass) && FlexVersionClass["compatibilityVersion"] >= FlexVersionClass["VERSION_4_0"])
|
||||
{
|
||||
this.addEventListener(Event.ADDED,this.addedHandler);
|
||||
}
|
||||
}
|
||||
|
||||
override public function get x() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.x : Number(this.layoutFeatures.layoutX);
|
||||
}
|
||||
|
||||
override public function set x(value:Number) : void
|
||||
{
|
||||
if(this.x == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.x = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutX = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get y() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.y : Number(this.layoutFeatures.layoutY);
|
||||
}
|
||||
|
||||
override public function set y(value:Number) : void
|
||||
{
|
||||
if(this.y == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.y = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutY = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get z() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.z : Number(this.layoutFeatures.layoutZ);
|
||||
}
|
||||
|
||||
override public function set z(value:Number) : void
|
||||
{
|
||||
if(this.z == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.z = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutZ = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get width() : Number
|
||||
{
|
||||
var p:Point = null;
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
return super.width;
|
||||
}
|
||||
if(MatrixUtilClass != null)
|
||||
{
|
||||
p = MatrixUtilClass["transformSize"](this.layoutFeatures.layoutWidth,this._height,transform.matrix);
|
||||
}
|
||||
return Boolean(p) ? Number(p.x) : super.width;
|
||||
}
|
||||
|
||||
override public function set width(value:Number) : void
|
||||
{
|
||||
if(this.width == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.width = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutWidth = value;
|
||||
this.layoutFeatures.layoutScaleX = this.measuredWidth != 0 ? value / this.measuredWidth : 0;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get height() : Number
|
||||
{
|
||||
var p:Point = null;
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
return super.height;
|
||||
}
|
||||
if(MatrixUtilClass != null)
|
||||
{
|
||||
p = MatrixUtilClass["transformSize"](this.layoutFeatures.layoutWidth,this._height,transform.matrix);
|
||||
}
|
||||
return Boolean(p) ? Number(p.y) : super.height;
|
||||
}
|
||||
|
||||
override public function set height(value:Number) : void
|
||||
{
|
||||
if(this.height == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.height = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._height = value;
|
||||
this.layoutFeatures.layoutScaleY = this.measuredHeight != 0 ? value / this.measuredHeight : 0;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get rotationX() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.rotationX : Number(this.layoutFeatures.layoutRotationX);
|
||||
}
|
||||
|
||||
override public function set rotationX(value:Number) : void
|
||||
{
|
||||
if(this.rotationX == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.rotationX = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutRotationX = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get rotationY() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.rotationY : Number(this.layoutFeatures.layoutRotationY);
|
||||
}
|
||||
|
||||
override public function set rotationY(value:Number) : void
|
||||
{
|
||||
if(this.rotationY == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.rotationY = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutRotationY = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get rotationZ() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.rotationZ : Number(this.layoutFeatures.layoutRotationZ);
|
||||
}
|
||||
|
||||
override public function set rotationZ(value:Number) : void
|
||||
{
|
||||
if(this.rotationZ == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.rotationZ = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutRotationZ = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get rotation() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.rotation : Number(this.layoutFeatures.layoutRotationZ);
|
||||
}
|
||||
|
||||
override public function set rotation(value:Number) : void
|
||||
{
|
||||
if(this.rotation == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.rotation = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutRotationZ = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get scaleX() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.scaleX : Number(this.layoutFeatures.layoutScaleX);
|
||||
}
|
||||
|
||||
override public function set scaleX(value:Number) : void
|
||||
{
|
||||
if(this.scaleX == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.scaleX = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutScaleX = value;
|
||||
this.layoutFeatures.layoutWidth = Math.abs(value) * this.measuredWidth;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get scaleY() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.scaleY : Number(this.layoutFeatures.layoutScaleY);
|
||||
}
|
||||
|
||||
override public function set scaleY(value:Number) : void
|
||||
{
|
||||
if(this.scaleY == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.scaleY = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutScaleY = value;
|
||||
this._height = Math.abs(value) * this.measuredHeight;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
override public function get scaleZ() : Number
|
||||
{
|
||||
return this.layoutFeatures == null ? super.scaleZ : Number(this.layoutFeatures.layoutScaleZ);
|
||||
}
|
||||
|
||||
override public function set scaleZ(value:Number) : void
|
||||
{
|
||||
if(this.scaleZ == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.layoutFeatures == null)
|
||||
{
|
||||
super.scaleZ = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.layoutFeatures.layoutScaleZ = value;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
[Inspectable(category="General",enumeration="ltr,rtl")]
|
||||
public function get layoutDirection() : String
|
||||
{
|
||||
return this._layoutDirection;
|
||||
}
|
||||
|
||||
public function set layoutDirection(value:String) : void
|
||||
{
|
||||
if(value == this._layoutDirection)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this._layoutDirection = value;
|
||||
this.invalidateLayoutDirection();
|
||||
}
|
||||
|
||||
public function get measuredHeight() : Number
|
||||
{
|
||||
if(Boolean(bitmapData))
|
||||
{
|
||||
return bitmapData.height;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function get measuredWidth() : Number
|
||||
{
|
||||
if(Boolean(bitmapData))
|
||||
{
|
||||
return bitmapData.width;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function invalidateLayoutDirection() : void
|
||||
{
|
||||
var mirror:Boolean = false;
|
||||
for(var p:DisplayObjectContainer = parent; Boolean(p); )
|
||||
{
|
||||
if(p is ILayoutDirectionElement)
|
||||
{
|
||||
mirror = this._layoutDirection != null && ILayoutDirectionElement(p).layoutDirection != null && this._layoutDirection != ILayoutDirectionElement(p).layoutDirection;
|
||||
if(mirror && this.layoutFeatures == null)
|
||||
{
|
||||
this.initAdvancedLayoutFeatures();
|
||||
if(this.layoutFeatures != null)
|
||||
{
|
||||
this.layoutFeatures.mirror = mirror;
|
||||
this.validateTransformMatrix();
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(!mirror && Boolean(this.layoutFeatures))
|
||||
{
|
||||
this.layoutFeatures.mirror = mirror;
|
||||
this.validateTransformMatrix();
|
||||
this.layoutFeatures = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
p = p.parent;
|
||||
}
|
||||
}
|
||||
|
||||
public function move(x:Number, y:Number) : void
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public function setActualSize(newWidth:Number, newHeight:Number) : void
|
||||
{
|
||||
this.width = newWidth;
|
||||
this.height = newHeight;
|
||||
}
|
||||
|
||||
private function addedHandler(event:Event) : void
|
||||
{
|
||||
this.invalidateLayoutDirection();
|
||||
}
|
||||
|
||||
private function initAdvancedLayoutFeatures() : void
|
||||
{
|
||||
var appDomain:ApplicationDomain = null;
|
||||
var features:IAssetLayoutFeatures = null;
|
||||
if(this.layoutFeaturesClass == null)
|
||||
{
|
||||
appDomain = ApplicationDomain.currentDomain;
|
||||
if(appDomain.hasDefinition("mx.core::AdvancedLayoutFeatures"))
|
||||
{
|
||||
this.layoutFeaturesClass = Class(appDomain.getDefinition("mx.core::AdvancedLayoutFeatures"));
|
||||
}
|
||||
if(MatrixUtilClass == null)
|
||||
{
|
||||
if(appDomain.hasDefinition("mx.utils::MatrixUtil"))
|
||||
{
|
||||
MatrixUtilClass = Class(appDomain.getDefinition("mx.utils::MatrixUtil"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.layoutFeaturesClass != null)
|
||||
{
|
||||
features = new this.layoutFeaturesClass();
|
||||
features.layoutScaleX = this.scaleX;
|
||||
features.layoutScaleY = this.scaleY;
|
||||
features.layoutScaleZ = this.scaleZ;
|
||||
features.layoutRotationX = this.rotationX;
|
||||
features.layoutRotationY = this.rotationY;
|
||||
features.layoutRotationZ = this.rotation;
|
||||
features.layoutX = this.x;
|
||||
features.layoutY = this.y;
|
||||
features.layoutZ = this.z;
|
||||
features.layoutWidth = this.width;
|
||||
this._height = this.height;
|
||||
this.layoutFeatures = features;
|
||||
}
|
||||
}
|
||||
|
||||
private function validateTransformMatrix() : void
|
||||
{
|
||||
if(this.layoutFeatures != null)
|
||||
{
|
||||
if(this.layoutFeatures.is3D)
|
||||
{
|
||||
super.transform.matrix3D = this.layoutFeatures.computedMatrix3D;
|
||||
}
|
||||
else
|
||||
{
|
||||
super.transform.matrix = this.layoutFeatures.computedMatrix;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
31
src/mx/core/FlexBitmap.as
Normal file
@@ -0,0 +1,31 @@
|
||||
package mx.core
|
||||
{
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
import mx.utils.NameUtil;
|
||||
|
||||
use namespace mx_internal;
|
||||
|
||||
public class FlexBitmap extends Bitmap
|
||||
{
|
||||
mx_internal static const VERSION:String = "4.5.0.19786";
|
||||
|
||||
public function FlexBitmap(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false)
|
||||
{
|
||||
super(bitmapData,pixelSnapping,smoothing);
|
||||
try
|
||||
{
|
||||
name = NameUtil.createUniqueName(this);
|
||||
}
|
||||
catch(e:Error)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
{
|
||||
return NameUtil.displayObjectToString(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
89
src/mx/core/IAssetLayoutFeatures.as
Normal file
@@ -0,0 +1,89 @@
|
||||
package mx.core
|
||||
{
|
||||
import flash.geom.Matrix;
|
||||
import flash.geom.Matrix3D;
|
||||
|
||||
public interface IAssetLayoutFeatures
|
||||
{
|
||||
function set layoutX(param1:Number) : void;
|
||||
|
||||
function get layoutX() : Number;
|
||||
|
||||
function set layoutY(param1:Number) : void;
|
||||
|
||||
function get layoutY() : Number;
|
||||
|
||||
function set layoutZ(param1:Number) : void;
|
||||
|
||||
function get layoutZ() : Number;
|
||||
|
||||
function get layoutWidth() : Number;
|
||||
|
||||
function set layoutWidth(param1:Number) : void;
|
||||
|
||||
function set transformX(param1:Number) : void;
|
||||
|
||||
function get transformX() : Number;
|
||||
|
||||
function set transformY(param1:Number) : void;
|
||||
|
||||
function get transformY() : Number;
|
||||
|
||||
function set transformZ(param1:Number) : void;
|
||||
|
||||
function get transformZ() : Number;
|
||||
|
||||
function set layoutRotationX(param1:Number) : void;
|
||||
|
||||
function get layoutRotationX() : Number;
|
||||
|
||||
function set layoutRotationY(param1:Number) : void;
|
||||
|
||||
function get layoutRotationY() : Number;
|
||||
|
||||
function set layoutRotationZ(param1:Number) : void;
|
||||
|
||||
function get layoutRotationZ() : Number;
|
||||
|
||||
function set layoutScaleX(param1:Number) : void;
|
||||
|
||||
function get layoutScaleX() : Number;
|
||||
|
||||
function set layoutScaleY(param1:Number) : void;
|
||||
|
||||
function get layoutScaleY() : Number;
|
||||
|
||||
function set layoutScaleZ(param1:Number) : void;
|
||||
|
||||
function get layoutScaleZ() : Number;
|
||||
|
||||
function set layoutMatrix(param1:Matrix) : void;
|
||||
|
||||
function get layoutMatrix() : Matrix;
|
||||
|
||||
function set layoutMatrix3D(param1:Matrix3D) : void;
|
||||
|
||||
function get layoutMatrix3D() : Matrix3D;
|
||||
|
||||
function get is3D() : Boolean;
|
||||
|
||||
function get layoutIs3D() : Boolean;
|
||||
|
||||
function get mirror() : Boolean;
|
||||
|
||||
function set mirror(param1:Boolean) : void;
|
||||
|
||||
function get stretchX() : Number;
|
||||
|
||||
function set stretchX(param1:Number) : void;
|
||||
|
||||
function get stretchY() : Number;
|
||||
|
||||
function set stretchY(param1:Number) : void;
|
||||
|
||||
function get computedMatrix() : Matrix;
|
||||
|
||||
function get computedMatrix3D() : Matrix3D;
|
||||
}
|
||||
}
|
||||
|
||||
8
src/mx/core/IFlexAsset.as
Normal file
@@ -0,0 +1,8 @@
|
||||
package mx.core
|
||||
{
|
||||
public interface IFlexAsset
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
125
src/mx/core/IFlexDisplayObject.as
Normal file
@@ -0,0 +1,125 @@
|
||||
package mx.core
|
||||
{
|
||||
import flash.accessibility.AccessibilityProperties;
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.DisplayObjectContainer;
|
||||
import flash.display.IBitmapDrawable;
|
||||
import flash.display.LoaderInfo;
|
||||
import flash.display.Stage;
|
||||
import flash.events.IEventDispatcher;
|
||||
import flash.geom.Point;
|
||||
import flash.geom.Rectangle;
|
||||
import flash.geom.Transform;
|
||||
|
||||
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher
|
||||
{
|
||||
function get root() : DisplayObject;
|
||||
|
||||
function get stage() : Stage;
|
||||
|
||||
function get name() : String;
|
||||
|
||||
function set name(param1:String) : void;
|
||||
|
||||
function get parent() : DisplayObjectContainer;
|
||||
|
||||
function get mask() : DisplayObject;
|
||||
|
||||
function set mask(param1:DisplayObject) : void;
|
||||
|
||||
function get visible() : Boolean;
|
||||
|
||||
function set visible(param1:Boolean) : void;
|
||||
|
||||
function get x() : Number;
|
||||
|
||||
function set x(param1:Number) : void;
|
||||
|
||||
function get y() : Number;
|
||||
|
||||
function set y(param1:Number) : void;
|
||||
|
||||
function get scaleX() : Number;
|
||||
|
||||
function set scaleX(param1:Number) : void;
|
||||
|
||||
function get scaleY() : Number;
|
||||
|
||||
function set scaleY(param1:Number) : void;
|
||||
|
||||
function get mouseX() : Number;
|
||||
|
||||
function get mouseY() : Number;
|
||||
|
||||
function get rotation() : Number;
|
||||
|
||||
function set rotation(param1:Number) : void;
|
||||
|
||||
function get alpha() : Number;
|
||||
|
||||
function set alpha(param1:Number) : void;
|
||||
|
||||
function get width() : Number;
|
||||
|
||||
function set width(param1:Number) : void;
|
||||
|
||||
function get height() : Number;
|
||||
|
||||
function set height(param1:Number) : void;
|
||||
|
||||
function get cacheAsBitmap() : Boolean;
|
||||
|
||||
function set cacheAsBitmap(param1:Boolean) : void;
|
||||
|
||||
function get opaqueBackground() : Object;
|
||||
|
||||
function set opaqueBackground(param1:Object) : void;
|
||||
|
||||
function get scrollRect() : Rectangle;
|
||||
|
||||
function set scrollRect(param1:Rectangle) : void;
|
||||
|
||||
function get filters() : Array;
|
||||
|
||||
function set filters(param1:Array) : void;
|
||||
|
||||
function get blendMode() : String;
|
||||
|
||||
function set blendMode(param1:String) : void;
|
||||
|
||||
function get transform() : Transform;
|
||||
|
||||
function set transform(param1:Transform) : void;
|
||||
|
||||
function get scale9Grid() : Rectangle;
|
||||
|
||||
function set scale9Grid(param1:Rectangle) : void;
|
||||
|
||||
function globalToLocal(param1:Point) : Point;
|
||||
|
||||
function localToGlobal(param1:Point) : Point;
|
||||
|
||||
function getBounds(param1:DisplayObject) : Rectangle;
|
||||
|
||||
function getRect(param1:DisplayObject) : Rectangle;
|
||||
|
||||
function get loaderInfo() : LoaderInfo;
|
||||
|
||||
function hitTestObject(param1:DisplayObject) : Boolean;
|
||||
|
||||
function hitTestPoint(param1:Number, param2:Number, param3:Boolean = false) : Boolean;
|
||||
|
||||
function get accessibilityProperties() : AccessibilityProperties;
|
||||
|
||||
function set accessibilityProperties(param1:AccessibilityProperties) : void;
|
||||
|
||||
function get measuredHeight() : Number;
|
||||
|
||||
function get measuredWidth() : Number;
|
||||
|
||||
function move(param1:Number, param2:Number) : void;
|
||||
|
||||
function setActualSize(param1:Number, param2:Number) : void;
|
||||
}
|
||||
}
|
||||
|
||||
12
src/mx/core/ILayoutDirectionElement.as
Normal file
@@ -0,0 +1,12 @@
|
||||
package mx.core
|
||||
{
|
||||
public interface ILayoutDirectionElement
|
||||
{
|
||||
function get layoutDirection() : String;
|
||||
|
||||
function set layoutDirection(param1:String) : void;
|
||||
|
||||
function invalidateLayoutDirection() : void;
|
||||
}
|
||||
}
|
||||
|
||||
22
src/mx/core/IRepeaterClient.as
Normal file
@@ -0,0 +1,22 @@
|
||||
package mx.core
|
||||
{
|
||||
public interface IRepeaterClient
|
||||
{
|
||||
function get instanceIndices() : Array;
|
||||
|
||||
function set instanceIndices(param1:Array) : void;
|
||||
|
||||
function get isDocument() : Boolean;
|
||||
|
||||
function get repeaterIndices() : Array;
|
||||
|
||||
function set repeaterIndices(param1:Array) : void;
|
||||
|
||||
function get repeaters() : Array;
|
||||
|
||||
function set repeaters(param1:Array) : void;
|
||||
|
||||
function initializeRepeaterArrays(param1:IRepeaterClient) : void;
|
||||
}
|
||||
}
|
||||
|
||||
5
src/mx/core/mx_internal.as
Normal file
@@ -0,0 +1,5 @@
|
||||
package mx.core
|
||||
{
|
||||
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
|
||||
}
|
||||
|
||||
94
src/mx/utils/NameUtil.as
Normal file
@@ -0,0 +1,94 @@
|
||||
package mx.utils
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.utils.getQualifiedClassName;
|
||||
import mx.core.IRepeaterClient;
|
||||
import mx.core.mx_internal;
|
||||
|
||||
use namespace mx_internal;
|
||||
|
||||
public class NameUtil
|
||||
{
|
||||
mx_internal static const VERSION:String = "4.5.0.19786";
|
||||
|
||||
private static var counter:int = 0;
|
||||
|
||||
public function NameUtil()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function createUniqueName(object:Object) : String
|
||||
{
|
||||
if(!object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var name:String = getQualifiedClassName(object);
|
||||
var index:int = int(name.indexOf("::"));
|
||||
if(index != -1)
|
||||
{
|
||||
name = name.substr(index + 2);
|
||||
}
|
||||
var charCode:int = int(name.charCodeAt(name.length - 1));
|
||||
if(charCode >= 48 && charCode <= 57)
|
||||
{
|
||||
name += "_";
|
||||
}
|
||||
return name + counter++;
|
||||
}
|
||||
|
||||
public static function displayObjectToString(displayObject:DisplayObject) : String
|
||||
{
|
||||
var result:String = null;
|
||||
var o:DisplayObject = null;
|
||||
var s:String = null;
|
||||
var indices:Array = null;
|
||||
try
|
||||
{
|
||||
for(o = displayObject; o != null; )
|
||||
{
|
||||
if(o.parent && o.stage && o.parent == o.stage)
|
||||
{
|
||||
break;
|
||||
}
|
||||
s = "id" in o && Boolean(o["id"]) ? o["id"] : o.name;
|
||||
if(o is IRepeaterClient)
|
||||
{
|
||||
indices = IRepeaterClient(o).instanceIndices;
|
||||
if(Boolean(indices))
|
||||
{
|
||||
s += "[" + indices.join("][") + "]";
|
||||
}
|
||||
}
|
||||
result = result == null ? s : s + "." + result;
|
||||
o = o.parent;
|
||||
}
|
||||
}
|
||||
catch(e:SecurityError)
|
||||
{
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static function getUnqualifiedClassName(object:Object) : String
|
||||
{
|
||||
var name:String = null;
|
||||
if(object is String)
|
||||
{
|
||||
name = object as String;
|
||||
}
|
||||
else
|
||||
{
|
||||
name = getQualifiedClassName(object);
|
||||
}
|
||||
var index:int = int(name.indexOf("::"));
|
||||
if(index != -1)
|
||||
{
|
||||
name = name.substr(index + 2);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
src/name_164.as
Normal file
@@ -0,0 +1,15 @@
|
||||
package
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/14_name_164.jpg")]
|
||||
public class name_164 extends BitmapAsset
|
||||
{
|
||||
public function name_164()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
src/name_165.as
Normal file
@@ -0,0 +1,15 @@
|
||||
package
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/13_name_165.jpg")]
|
||||
public class name_165 extends BitmapAsset
|
||||
{
|
||||
public function name_165()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
src/name_166.as
Normal file
@@ -0,0 +1,15 @@
|
||||
package
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/16_name_166.jpg")]
|
||||
public class name_166 extends BitmapAsset
|
||||
{
|
||||
public function name_166()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
40
src/package_1/name_1.as
Normal file
@@ -0,0 +1,40 @@
|
||||
package package_1
|
||||
{
|
||||
public class name_1 extends name_22
|
||||
{
|
||||
public var value:Number;
|
||||
|
||||
private var minValue:Number;
|
||||
|
||||
private var maxValue:Number;
|
||||
|
||||
public function name_1(consoleVarName:String, initialValue:Number, minValue:Number, maxValue:Number, changeListener:Function = null)
|
||||
{
|
||||
super(consoleVarName,changeListener);
|
||||
this.value = initialValue;
|
||||
this.minValue = minValue;
|
||||
this.maxValue = maxValue;
|
||||
}
|
||||
|
||||
override protected function acceptInput(value:String) : String
|
||||
{
|
||||
var f:Number = Number(Number(value));
|
||||
if(isNaN(f))
|
||||
{
|
||||
return "Incorrect number";
|
||||
}
|
||||
if(f < this.minValue || f > this.maxValue)
|
||||
{
|
||||
return "Value is out of bounds [" + this.minValue + ", " + this.maxValue + "]";
|
||||
}
|
||||
this.value = f;
|
||||
return null;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
{
|
||||
return this.value.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
36
src/package_1/name_12.as
Normal file
@@ -0,0 +1,36 @@
|
||||
package package_1
|
||||
{
|
||||
public class name_12 extends name_22
|
||||
{
|
||||
public var value:int;
|
||||
|
||||
private var minValue:int;
|
||||
|
||||
private var maxValue:int;
|
||||
|
||||
public function name_12(consoleVarName:String, initialValue:int, minValue:int, maxValue:int, inputListener:Function = null)
|
||||
{
|
||||
super(consoleVarName,inputListener);
|
||||
this.value = initialValue;
|
||||
this.minValue = minValue;
|
||||
this.maxValue = maxValue;
|
||||
}
|
||||
|
||||
override protected function acceptInput(value:String) : String
|
||||
{
|
||||
var f:int = int(int(value));
|
||||
if(f < this.minValue || f > this.maxValue)
|
||||
{
|
||||
return "Value is out of bounds [" + this.minValue + ", " + this.maxValue + "]";
|
||||
}
|
||||
this.value = f;
|
||||
return null;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
{
|
||||
return this.value.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
src/package_1/name_13.as
Normal file
@@ -0,0 +1,25 @@
|
||||
package package_1
|
||||
{
|
||||
public class name_13 extends name_22
|
||||
{
|
||||
public var value:String;
|
||||
|
||||
public function name_13(consoleVarName:String, initialValue:String, inputListener:Function = null)
|
||||
{
|
||||
super(consoleVarName,inputListener);
|
||||
this.value = initialValue;
|
||||
}
|
||||
|
||||
override protected function acceptInput(value:String) : String
|
||||
{
|
||||
this.value = value;
|
||||
return null;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
77
src/package_1/name_22.as
Normal file
@@ -0,0 +1,77 @@
|
||||
package package_1
|
||||
{
|
||||
import package_5.name_3;
|
||||
import package_6.name_4;
|
||||
|
||||
public class name_22
|
||||
{
|
||||
protected var varName:String;
|
||||
|
||||
protected var inputListener:Function;
|
||||
|
||||
public function name_22(varName:String, inputListener:Function = null)
|
||||
{
|
||||
super();
|
||||
this.varName = varName;
|
||||
this.inputListener = inputListener;
|
||||
var console:name_4 = name_4(name_3.name_8().name_30(name_4));
|
||||
if(console != null)
|
||||
{
|
||||
console.name_147(this);
|
||||
}
|
||||
}
|
||||
|
||||
public function name_32() : String
|
||||
{
|
||||
return this.varName;
|
||||
}
|
||||
|
||||
public function destroy() : void
|
||||
{
|
||||
var console:name_4 = name_4(name_3.name_8().name_30(name_4));
|
||||
if(console != null)
|
||||
{
|
||||
console.name_146(this.varName);
|
||||
}
|
||||
this.inputListener = null;
|
||||
}
|
||||
|
||||
public function method_77(console:name_4, params:Array) : void
|
||||
{
|
||||
var oldValue:String = null;
|
||||
var errorText:String = null;
|
||||
if(params.length == 0)
|
||||
{
|
||||
console.name_145(this.varName + " = " + this.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
oldValue = this.toString();
|
||||
errorText = this.acceptInput(params[0]);
|
||||
if(errorText == null)
|
||||
{
|
||||
console.name_145(this.varName + " is set to " + this.toString() + " (was " + oldValue + ")");
|
||||
if(this.inputListener != null)
|
||||
{
|
||||
this.inputListener.call(null,this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
console.name_145(errorText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function acceptInput(value:String) : String
|
||||
{
|
||||
return "Not implemented";
|
||||
}
|
||||
|
||||
public function toString() : String
|
||||
{
|
||||
return "Not implemented";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
73
src/package_10/class_1.as
Normal file
@@ -0,0 +1,73 @@
|
||||
package package_10
|
||||
{
|
||||
public class class_1
|
||||
{
|
||||
public var var_4:name_52;
|
||||
|
||||
public var priority:int;
|
||||
|
||||
protected var var_3:Boolean;
|
||||
|
||||
public function class_1(priority:int)
|
||||
{
|
||||
super();
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public function start() : void
|
||||
{
|
||||
}
|
||||
|
||||
public function stop() : void
|
||||
{
|
||||
}
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
}
|
||||
|
||||
final public function get method_20() : Boolean
|
||||
{
|
||||
return this.var_3;
|
||||
}
|
||||
|
||||
final public function set method_20(value:Boolean) : void
|
||||
{
|
||||
if(value)
|
||||
{
|
||||
this.method_21();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.method_22();
|
||||
}
|
||||
}
|
||||
|
||||
final public function method_21() : void
|
||||
{
|
||||
if(!this.var_3)
|
||||
{
|
||||
this.var_3 = true;
|
||||
this.onPause();
|
||||
}
|
||||
}
|
||||
|
||||
final public function method_22() : void
|
||||
{
|
||||
if(this.var_3)
|
||||
{
|
||||
this.var_3 = false;
|
||||
this.onResume();
|
||||
}
|
||||
}
|
||||
|
||||
protected function onPause() : void
|
||||
{
|
||||
}
|
||||
|
||||
protected function onResume() : void
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
30
src/package_10/class_17.as
Normal file
@@ -0,0 +1,30 @@
|
||||
package package_10
|
||||
{
|
||||
public class class_17
|
||||
{
|
||||
protected var entity:name_54;
|
||||
|
||||
public function class_17()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function method_197(entity:name_54) : void
|
||||
{
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
public function initComponent() : void
|
||||
{
|
||||
}
|
||||
|
||||
public function addToGame(gameKernel:name_17) : void
|
||||
{
|
||||
}
|
||||
|
||||
public function removeFromGame(gameKernel:name_17) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
8
src/package_10/class_8.as
Normal file
@@ -0,0 +1,8 @@
|
||||
package package_10
|
||||
{
|
||||
public interface class_8
|
||||
{
|
||||
function log(param1:String, param2:String) : void;
|
||||
}
|
||||
}
|
||||
|
||||
216
src/package_10/name_17.as
Normal file
@@ -0,0 +1,216 @@
|
||||
package package_10
|
||||
{
|
||||
import flash.display.Stage;
|
||||
import package_18.name_44;
|
||||
import package_20.name_179;
|
||||
import package_20.name_56;
|
||||
import package_22.name_181;
|
||||
import package_22.name_87;
|
||||
import package_26.name_100;
|
||||
import package_27.name_180;
|
||||
import package_42.name_177;
|
||||
import package_42.name_184;
|
||||
import package_43.name_183;
|
||||
import package_43.name_190;
|
||||
import package_44.name_178;
|
||||
import package_45.name_182;
|
||||
|
||||
public class name_17
|
||||
{
|
||||
public static const TIME_SYSTEM_PRIORITY:int = 0;
|
||||
|
||||
public static const INPUT_SYSTEM_PRIORITY:int = 1000;
|
||||
|
||||
public static const EVENT_SYSTEM_PRIORITY:int = 2000;
|
||||
|
||||
public static const LOGIC_SYSTEM_1_PRIORITY:int = 3000;
|
||||
|
||||
public static const LOGIC_SYSTEM_2_PRIORITY:int = 3001;
|
||||
|
||||
public static const PHYSICS_SYSTEM_PRIORITY:int = 4000;
|
||||
|
||||
public static const RENDER_SYSTEM_PRIORITY:int = 5000;
|
||||
|
||||
public static const CLEANUP_SYSTEM_PRIORITY:int = 6000;
|
||||
|
||||
public const const_1:name_180 = new name_180(20);
|
||||
|
||||
private var var_43:Stage;
|
||||
|
||||
private var var_36:Object;
|
||||
|
||||
private var var_41:class_8 = new DummyLogger();
|
||||
|
||||
private var var_4:name_52;
|
||||
|
||||
private var var_44:name_182;
|
||||
|
||||
private var inputSystem:name_181;
|
||||
|
||||
private var eventSystem:name_179;
|
||||
|
||||
private var logicSystem1:name_177;
|
||||
|
||||
private var logicSystem2:name_177;
|
||||
|
||||
private var physicsSystem:name_178;
|
||||
|
||||
private var renderSystem:name_44;
|
||||
|
||||
private var var_42:name_183;
|
||||
|
||||
private var var_39:Vector.<name_54>;
|
||||
|
||||
private var var_38:int;
|
||||
|
||||
private var var_40:name_100;
|
||||
|
||||
public function name_17(stage:Stage, options:Object)
|
||||
{
|
||||
super();
|
||||
this.var_43 = stage;
|
||||
this.var_36 = options || {};
|
||||
this.var_39 = new Vector.<name_54>();
|
||||
this.var_40 = new name_100();
|
||||
this.var_4 = new name_52();
|
||||
this.var_44 = new name_182(TIME_SYSTEM_PRIORITY);
|
||||
this.var_4.addTask(this.var_44);
|
||||
this.inputSystem = new name_181(INPUT_SYSTEM_PRIORITY,stage);
|
||||
this.var_4.addTask(this.inputSystem);
|
||||
this.eventSystem = new name_179(EVENT_SYSTEM_PRIORITY);
|
||||
this.var_4.addTask(this.eventSystem);
|
||||
this.logicSystem1 = new name_177(LOGIC_SYSTEM_1_PRIORITY,this);
|
||||
this.var_4.addTask(this.logicSystem1);
|
||||
this.logicSystem2 = new name_177(LOGIC_SYSTEM_2_PRIORITY,this);
|
||||
this.var_4.addTask(this.logicSystem2);
|
||||
this.physicsSystem = new name_178(PHYSICS_SYSTEM_PRIORITY,this.var_40);
|
||||
this.var_4.addTask(this.physicsSystem);
|
||||
this.renderSystem = new name_44(RENDER_SYSTEM_PRIORITY,stage);
|
||||
this.var_4.addTask(this.renderSystem);
|
||||
this.var_42 = new name_183(CLEANUP_SYSTEM_PRIORITY);
|
||||
this.var_4.addTask(this.var_42);
|
||||
}
|
||||
|
||||
public function get logger() : class_8
|
||||
{
|
||||
return this.var_41;
|
||||
}
|
||||
|
||||
public function set logger(value:class_8) : void
|
||||
{
|
||||
if(value == null)
|
||||
{
|
||||
throw new ArgumentError("Logger is null");
|
||||
}
|
||||
this.var_41 = value;
|
||||
}
|
||||
|
||||
public function get stage() : Stage
|
||||
{
|
||||
return this.var_43;
|
||||
}
|
||||
|
||||
public function get options() : Object
|
||||
{
|
||||
return this.var_36;
|
||||
}
|
||||
|
||||
public function method_111(command:name_190) : void
|
||||
{
|
||||
this.var_42.name_187(command);
|
||||
}
|
||||
|
||||
public function method_108() : name_100
|
||||
{
|
||||
return this.var_40;
|
||||
}
|
||||
|
||||
public function addTask(gameTask:class_1) : void
|
||||
{
|
||||
this.var_4.addTask(gameTask);
|
||||
}
|
||||
|
||||
public function name_73(entity:name_54) : void
|
||||
{
|
||||
if(entity.index < 0)
|
||||
{
|
||||
entity.index = this.var_38;
|
||||
var _loc2_:* = this.var_38++;
|
||||
this.var_39[_loc2_] = entity;
|
||||
entity.addToGame(this);
|
||||
return;
|
||||
}
|
||||
throw new Error("Entity " + entity + " is already in game");
|
||||
}
|
||||
|
||||
public function method_109(entity:name_54) : void
|
||||
{
|
||||
var index:int = int(entity.index);
|
||||
if(index < 0)
|
||||
{
|
||||
throw new Error("Entity " + entity + " is not in game");
|
||||
}
|
||||
var lastEntity:name_54 = this.var_39[--this.var_38];
|
||||
lastEntity.index = index;
|
||||
this.var_39[index] = lastEntity;
|
||||
this.var_39[this.var_38] = null;
|
||||
entity.index = -1;
|
||||
entity.removeFromGame(this);
|
||||
}
|
||||
|
||||
public function name_66() : name_87
|
||||
{
|
||||
return this.inputSystem;
|
||||
}
|
||||
|
||||
public function name_61() : name_56
|
||||
{
|
||||
return this.eventSystem;
|
||||
}
|
||||
|
||||
public function getLogicSystem1() : name_184
|
||||
{
|
||||
return this.logicSystem1;
|
||||
}
|
||||
|
||||
public function getLogicSystem2() : name_184
|
||||
{
|
||||
return this.logicSystem2;
|
||||
}
|
||||
|
||||
public function method_112() : name_178
|
||||
{
|
||||
return this.physicsSystem;
|
||||
}
|
||||
|
||||
public function name_5() : name_44
|
||||
{
|
||||
return this.renderSystem;
|
||||
}
|
||||
|
||||
public function name_51() : void
|
||||
{
|
||||
this.const_1.name_188();
|
||||
this.var_4.name_185();
|
||||
this.const_1.name_186();
|
||||
}
|
||||
|
||||
public function method_110() : void
|
||||
{
|
||||
this.var_4.name_189();
|
||||
this.var_4.name_185();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DummyLogger implements class_8
|
||||
{
|
||||
public function DummyLogger()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function log(channel:String, text:String) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
84
src/package_10/name_195.as
Normal file
@@ -0,0 +1,84 @@
|
||||
package package_10
|
||||
{
|
||||
import package_21.name_124;
|
||||
import package_21.name_78;
|
||||
import package_46.Matrix3;
|
||||
import package_46.name_194;
|
||||
|
||||
public class name_195
|
||||
{
|
||||
private static var matrix:Matrix3 = new Matrix3();
|
||||
|
||||
private static var vector:name_194 = new name_194();
|
||||
|
||||
private var var_234:name_78;
|
||||
|
||||
public function name_195()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function get object() : name_78
|
||||
{
|
||||
return this.var_234;
|
||||
}
|
||||
|
||||
public function set object(value:name_78) : void
|
||||
{
|
||||
this.var_234 = value;
|
||||
}
|
||||
|
||||
public function name_201(x:Number, y:Number, z:Number) : void
|
||||
{
|
||||
this.var_234.x = x;
|
||||
this.var_234.y = y;
|
||||
this.var_234.z = z;
|
||||
}
|
||||
|
||||
public function method_368(rx:Number, ry:Number, rz:Number) : void
|
||||
{
|
||||
this.var_234.rotationX = rx;
|
||||
this.var_234.rotationY = ry;
|
||||
this.var_234.rotationZ = rz;
|
||||
}
|
||||
|
||||
public function method_367(dx:Number, dy:Number, dz:Number) : void
|
||||
{
|
||||
matrix.name_196(this.var_234.rotationX,this.var_234.rotationY,this.var_234.rotationZ);
|
||||
vector.reset(dx,dy,dz);
|
||||
vector.transform3(matrix);
|
||||
this.var_234.x += vector.x;
|
||||
this.var_234.y += vector.y;
|
||||
this.var_234.z += vector.z;
|
||||
}
|
||||
|
||||
public function move(dx:Number, dy:Number, dz:Number) : void
|
||||
{
|
||||
this.var_234.x += dx;
|
||||
this.var_234.y += dy;
|
||||
this.var_234.z += dz;
|
||||
}
|
||||
|
||||
public function rotate(rdx:Number, rdy:Number, rdz:Number) : void
|
||||
{
|
||||
this.var_234.rotationX += rdx;
|
||||
this.var_234.rotationY += rdy;
|
||||
this.var_234.rotationZ += rdz;
|
||||
}
|
||||
|
||||
public function name_76(x:Number, y:Number, z:Number) : void
|
||||
{
|
||||
var dx:Number = x - this.var_234.x;
|
||||
var dy:Number = y - this.var_234.y;
|
||||
var dz:Number = z - this.var_234.z;
|
||||
this.var_234.rotationX = Math.atan2(dz,Math.sqrt(dx * dx + dy * dy));
|
||||
if(this.var_234 is name_124)
|
||||
{
|
||||
this.var_234.rotationX -= 0.5 * Math.PI;
|
||||
}
|
||||
this.var_234.rotationY = 0;
|
||||
this.var_234.rotationZ = -Math.atan2(dx,dy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
175
src/package_10/name_52.as
Normal file
@@ -0,0 +1,175 @@
|
||||
package package_10
|
||||
{
|
||||
import flash.utils.Dictionary;
|
||||
import flash.utils.describeType;
|
||||
import flash.utils.getDefinitionByName;
|
||||
import package_108.name_373;
|
||||
import package_108.name_374;
|
||||
|
||||
public class name_52
|
||||
{
|
||||
private var var_85:name_374 = new name_374();
|
||||
|
||||
private var var_87:TaskArray = new TaskArray();
|
||||
|
||||
private var var_86:TaskArray = new TaskArray();
|
||||
|
||||
private var var_88:Dictionary = new Dictionary();
|
||||
|
||||
public function name_52()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function addTask(task:class_1) : void
|
||||
{
|
||||
if(this.var_85.contains(task))
|
||||
{
|
||||
throw new Error("Task is already active");
|
||||
}
|
||||
if(this.var_87.contains(task))
|
||||
{
|
||||
throw new Error("Task has been already scheduled for addition");
|
||||
}
|
||||
this.var_87.add(task);
|
||||
}
|
||||
|
||||
public function killTask(task:class_1) : void
|
||||
{
|
||||
if(this.var_85.contains(task) && !this.var_86.contains(task))
|
||||
{
|
||||
this.var_86.add(task);
|
||||
}
|
||||
}
|
||||
|
||||
public function name_185() : void
|
||||
{
|
||||
var task:class_1 = null;
|
||||
this.method_196();
|
||||
var iterator:name_373 = this.var_85.listIterator();
|
||||
while(iterator.hasNext())
|
||||
{
|
||||
task = class_1(iterator.next());
|
||||
if(!task.method_20)
|
||||
{
|
||||
task.run();
|
||||
}
|
||||
}
|
||||
this.method_195();
|
||||
}
|
||||
|
||||
public function getTaskInterface(taskInterface:Class) : Object
|
||||
{
|
||||
return this.var_88[taskInterface];
|
||||
}
|
||||
|
||||
public function name_189() : void
|
||||
{
|
||||
var task:class_1 = null;
|
||||
var listIterator:name_373 = this.var_85.listIterator();
|
||||
while(listIterator.hasNext())
|
||||
{
|
||||
task = class_1(listIterator.next());
|
||||
this.killTask(task);
|
||||
}
|
||||
}
|
||||
|
||||
private function method_196() : void
|
||||
{
|
||||
var task:class_1 = null;
|
||||
var taskInterfaces:Vector.<Class> = null;
|
||||
var taskInterface:Class = null;
|
||||
var activeTasksIterator:name_373 = null;
|
||||
var activeTask:class_1 = null;
|
||||
for(var i:int = 0; i < this.var_87.numTasks; i++)
|
||||
{
|
||||
task = this.var_87.tasks[i];
|
||||
task.var_4 = this;
|
||||
task.start();
|
||||
taskInterfaces = this.method_194(task);
|
||||
for each(taskInterface in taskInterfaces)
|
||||
{
|
||||
this.var_88[taskInterface] = task;
|
||||
}
|
||||
activeTasksIterator = this.var_85.listIterator();
|
||||
while(activeTasksIterator.hasNext())
|
||||
{
|
||||
activeTask = class_1(activeTasksIterator.next());
|
||||
if(activeTask.priority > task.priority)
|
||||
{
|
||||
activeTasksIterator.name_375();
|
||||
break;
|
||||
}
|
||||
}
|
||||
activeTasksIterator.add(task);
|
||||
}
|
||||
this.var_87.clear();
|
||||
}
|
||||
|
||||
private function method_195() : void
|
||||
{
|
||||
var task:class_1 = null;
|
||||
var taskInterfaces:Vector.<Class> = null;
|
||||
var taskInterface:Class = null;
|
||||
for(var i:int = 0; i < this.var_86.numTasks; i++)
|
||||
{
|
||||
task = this.var_86.tasks[i];
|
||||
this.var_85.remove(task);
|
||||
task.stop();
|
||||
taskInterfaces = this.method_194(task);
|
||||
for each(taskInterface in taskInterfaces)
|
||||
{
|
||||
delete this.var_88[taskInterface];
|
||||
}
|
||||
task.var_4 = null;
|
||||
}
|
||||
this.var_86.clear();
|
||||
}
|
||||
|
||||
private function method_194(object:Object) : Vector.<Class>
|
||||
{
|
||||
var interfaceXML:XML = null;
|
||||
var interfaceClass:Object = null;
|
||||
var result:Vector.<Class> = new Vector.<Class>();
|
||||
var xml:XML = describeType(object);
|
||||
for each(interfaceXML in xml.implementsInterface)
|
||||
{
|
||||
interfaceClass = getDefinitionByName(interfaceXML.@type);
|
||||
result.push(interfaceClass);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TaskArray
|
||||
{
|
||||
public var tasks:Vector.<class_1> = new Vector.<class_1>();
|
||||
|
||||
public var numTasks:int;
|
||||
|
||||
public function TaskArray()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function add(task:class_1) : void
|
||||
{
|
||||
var _loc2_:* = this.numTasks++;
|
||||
this.tasks[_loc2_] = task;
|
||||
}
|
||||
|
||||
public function clear() : void
|
||||
{
|
||||
for(var i:int = 0; i < this.numTasks; i++)
|
||||
{
|
||||
this.tasks[i] = null;
|
||||
}
|
||||
this.numTasks = 0;
|
||||
}
|
||||
|
||||
public function contains(task:class_1) : Boolean
|
||||
{
|
||||
return this.tasks.indexOf(task) >= 0;
|
||||
}
|
||||
}
|
||||
116
src/package_10/name_54.as
Normal file
@@ -0,0 +1,116 @@
|
||||
package package_10
|
||||
{
|
||||
public class name_54
|
||||
{
|
||||
private static var lastId:int;
|
||||
|
||||
private var var_101:int;
|
||||
|
||||
private var components:Vector.<class_17>;
|
||||
|
||||
private var var_100:Object;
|
||||
|
||||
internal var index:int = -1;
|
||||
|
||||
public function name_54(id:int)
|
||||
{
|
||||
super();
|
||||
this.var_101 = id;
|
||||
this.components = new Vector.<class_17>();
|
||||
this.var_100 = new Object();
|
||||
}
|
||||
|
||||
public static function name_74() : int
|
||||
{
|
||||
return ++lastId;
|
||||
}
|
||||
|
||||
public function get id() : int
|
||||
{
|
||||
return this.var_101;
|
||||
}
|
||||
|
||||
public function name_60(component:class_17) : void
|
||||
{
|
||||
this.components.push(component);
|
||||
component.method_197(this);
|
||||
}
|
||||
|
||||
public function name_64() : void
|
||||
{
|
||||
var entityComponent:class_17 = null;
|
||||
for each(entityComponent in this.components)
|
||||
{
|
||||
entityComponent.initComponent();
|
||||
}
|
||||
}
|
||||
|
||||
public function getComponent(cls:Class) : class_17
|
||||
{
|
||||
var component:class_17 = null;
|
||||
for each(component in this.components)
|
||||
{
|
||||
if(component is cls)
|
||||
{
|
||||
return component;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getComponentStrict(cls:Class) : class_17
|
||||
{
|
||||
var component:class_17 = this.getComponent(cls);
|
||||
if(component == null)
|
||||
{
|
||||
throw new Error("Component " + cls + " not found");
|
||||
}
|
||||
return component;
|
||||
}
|
||||
|
||||
public function addToGame(gameKernel:name_17) : void
|
||||
{
|
||||
var entityComponent:class_17 = null;
|
||||
for each(entityComponent in this.components)
|
||||
{
|
||||
entityComponent.addToGame(gameKernel);
|
||||
}
|
||||
}
|
||||
|
||||
public function removeFromGame(gameKernel:name_17) : void
|
||||
{
|
||||
var entityComponent:class_17 = null;
|
||||
for each(entityComponent in this.components)
|
||||
{
|
||||
entityComponent.removeFromGame(gameKernel);
|
||||
}
|
||||
}
|
||||
|
||||
public function dispatchEvent(eventType:String, eventData:* = undefined) : void
|
||||
{
|
||||
var numListeners:uint = 0;
|
||||
var i:int = 0;
|
||||
var listeners:Vector.<Function> = this.var_100[eventType];
|
||||
if(listeners != null)
|
||||
{
|
||||
numListeners = uint(listeners.length);
|
||||
for(i = 0; i < numListeners; i++)
|
||||
{
|
||||
listeners[i].call(null,eventType,eventData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addEventHandler(eventType:String, handler:Function) : void
|
||||
{
|
||||
var handlers:Vector.<Function> = this.var_100[eventType];
|
||||
if(handlers == null)
|
||||
{
|
||||
handlers = new Vector.<Function>();
|
||||
this.var_100[eventType] = handlers;
|
||||
}
|
||||
handlers.push(handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
src/package_10/name_57.as
Normal file
@@ -0,0 +1,15 @@
|
||||
package package_10
|
||||
{
|
||||
public class name_57
|
||||
{
|
||||
public static const MAP_COMPLETE:String = "mapComplete";
|
||||
|
||||
public static const BATTLE_FINISHED:String = "battleFinished";
|
||||
|
||||
public function name_57()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
60
src/package_100/name_301.as
Normal file
@@ -0,0 +1,60 @@
|
||||
package package_100
|
||||
{
|
||||
import flash.geom.ColorTransform;
|
||||
import package_10.name_17;
|
||||
import package_4.class_4;
|
||||
import package_46.name_194;
|
||||
import package_72.name_239;
|
||||
import package_91.name_349;
|
||||
import package_91.name_522;
|
||||
|
||||
public class name_301 implements name_349
|
||||
{
|
||||
private static const EFFECT_SIZE:Number = 300;
|
||||
|
||||
private static const EFFECT_FPS:Number = 30;
|
||||
|
||||
private static const EXPLOSION_EFFECT_SIZE:Number = 600;
|
||||
|
||||
private static const EXPLOSION_FPS:int = 30;
|
||||
|
||||
private var gameKernel:name_17;
|
||||
|
||||
private var roundFrames:Vector.<class_4>;
|
||||
|
||||
private var explosionFrames:Vector.<class_4>;
|
||||
|
||||
private var colorTransform:ColorTransform;
|
||||
|
||||
public function name_301(gameKernel:name_17, roundFrames:Vector.<class_4>, explosionFrames:Vector.<class_4>, colorTransform:ColorTransform)
|
||||
{
|
||||
super();
|
||||
this.gameKernel = gameKernel;
|
||||
this.roundFrames = roundFrames;
|
||||
this.explosionFrames = explosionFrames;
|
||||
this.colorTransform = colorTransform;
|
||||
}
|
||||
|
||||
public function method_414() : name_522
|
||||
{
|
||||
var effect:name_625 = name_625(this.gameKernel.method_108().name_110(name_625));
|
||||
var rotation:Number = Math.random() * Math.PI;
|
||||
effect.init(EFFECT_SIZE,EFFECT_SIZE,this.roundFrames,name_194.ZERO,rotation,50,EFFECT_FPS,true,0.5,0.5);
|
||||
this.gameKernel.name_5().method_37(effect);
|
||||
return effect;
|
||||
}
|
||||
|
||||
public function method_413(position:name_194) : void
|
||||
{
|
||||
var explosionEffect:name_239 = name_239(this.gameKernel.method_108().name_110(name_239));
|
||||
var rotation:Number = Math.random() * Math.PI;
|
||||
explosionEffect.init(EXPLOSION_EFFECT_SIZE,EXPLOSION_EFFECT_SIZE,this.explosionFrames,position,rotation,50,EXPLOSION_FPS,false,0.5,0.5);
|
||||
this.gameKernel.name_5().method_37(explosionEffect);
|
||||
}
|
||||
|
||||
public function method_412(position:name_194, normal:name_194, direction:name_194) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
src/package_100/name_625.as
Normal file
@@ -0,0 +1,15 @@
|
||||
package package_100
|
||||
{
|
||||
import package_26.name_402;
|
||||
import package_72.name_239;
|
||||
import package_91.name_522;
|
||||
|
||||
public class name_625 extends name_239 implements name_522
|
||||
{
|
||||
public function name_625(objectPool:name_402)
|
||||
{
|
||||
super(objectPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
94
src/package_101/name_304.as
Normal file
@@ -0,0 +1,94 @@
|
||||
package package_101
|
||||
{
|
||||
import package_10.name_17;
|
||||
import package_119.name_552;
|
||||
import package_27.name_501;
|
||||
import package_46.name_194;
|
||||
import package_72.class_12;
|
||||
import package_74.name_233;
|
||||
import package_74.name_327;
|
||||
import package_74.name_553;
|
||||
import package_76.name_256;
|
||||
import package_86.name_257;
|
||||
import package_86.name_540;
|
||||
import package_90.name_273;
|
||||
import package_92.name_271;
|
||||
|
||||
public class name_304 implements name_233
|
||||
{
|
||||
private static const COLLISION_MASK:int = name_257.STATIC | name_257.WEAPON;
|
||||
|
||||
private static var hitPosition:name_194 = new name_194();
|
||||
|
||||
private static var filter:name_540 = new name_540();
|
||||
|
||||
private static var rayHit:name_273 = new name_273();
|
||||
|
||||
private static var hitInfo:name_553 = new name_553();
|
||||
|
||||
private var impactForce:Number;
|
||||
|
||||
private var weakening:name_327;
|
||||
|
||||
private var effects:class_12;
|
||||
|
||||
private var callback:name_552;
|
||||
|
||||
public function name_304(impactForce:Number, weakening:name_327, effects:class_12)
|
||||
{
|
||||
super();
|
||||
this.impactForce = impactForce;
|
||||
this.weakening = weakening;
|
||||
this.effects = effects;
|
||||
}
|
||||
|
||||
public function method_383(callback:name_552) : void
|
||||
{
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
public function method_372(gameKernel:name_17, shotId:int, shooter:name_271, barrelOrigin:name_194, barrelLength:Number, shotDirection:name_194, muzzlePosition:name_194) : void
|
||||
{
|
||||
var distance:Number = NaN;
|
||||
var weakeningCoefficient:Number = NaN;
|
||||
var collisionDetector:name_256 = gameKernel.method_112().name_246().collisionDetector;
|
||||
filter.body = shooter;
|
||||
if(collisionDetector.raycast(barrelOrigin,shotDirection,COLLISION_MASK,name_501.BIG_VALUE,filter,rayHit))
|
||||
{
|
||||
distance = rayHit.t - barrelLength;
|
||||
if(distance < 0)
|
||||
{
|
||||
distance = 0;
|
||||
}
|
||||
weakeningCoefficient = Number(this.weakening.name_554(distance));
|
||||
hitInfo.body = rayHit.primitive.body;
|
||||
hitInfo.direction.copy(shotDirection);
|
||||
hitInfo.normal.copy(rayHit.normal);
|
||||
hitInfo.position.copy(rayHit.position);
|
||||
hitInfo.distance = distance;
|
||||
this.method_464(hitInfo.body,hitInfo.position,hitInfo.direction,weakeningCoefficient);
|
||||
if(this.callback != null)
|
||||
{
|
||||
this.callback.name_555(shotId,hitInfo,null);
|
||||
}
|
||||
}
|
||||
filter.body = null;
|
||||
}
|
||||
|
||||
public function method_465(target:name_271, targetHitPosition:name_194, hitDirection:name_194, distance:Number) : void
|
||||
{
|
||||
hitPosition.copy(targetHitPosition);
|
||||
this.method_464(target,hitPosition,hitDirection,this.weakening.name_554(distance));
|
||||
}
|
||||
|
||||
private function method_464(target:name_271, hitPosition:name_194, hitDirection:name_194, weakening:Number) : void
|
||||
{
|
||||
if(target != null)
|
||||
{
|
||||
target.name_556(hitPosition,hitDirection,this.impactForce * weakening);
|
||||
}
|
||||
this.effects.createEffects(hitPosition,weakening,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
src/package_102/name_355.as
Normal file
@@ -0,0 +1,18 @@
|
||||
package package_102
|
||||
{
|
||||
import flash.utils.Dictionary;
|
||||
|
||||
public interface name_355
|
||||
{
|
||||
function name_360(param1:name_636) : void;
|
||||
|
||||
function method_591(param1:String) : void;
|
||||
|
||||
function dump(param1:String, param2:Array) : String;
|
||||
|
||||
function get method_590() : Dictionary;
|
||||
|
||||
function get method_592() : Vector.<name_636>;
|
||||
}
|
||||
}
|
||||
|
||||
99
src/package_102/name_359.as
Normal file
@@ -0,0 +1,99 @@
|
||||
package package_102
|
||||
{
|
||||
import flash.utils.Dictionary;
|
||||
import package_5.name_3;
|
||||
import package_6.name_4;
|
||||
|
||||
public class name_359 implements name_355
|
||||
{
|
||||
private var osgi:name_3;
|
||||
|
||||
private var var_548:Dictionary;
|
||||
|
||||
private var var_547:Vector.<name_636>;
|
||||
|
||||
public function name_359(osgi:name_3)
|
||||
{
|
||||
super();
|
||||
this.osgi = osgi;
|
||||
var console:name_4 = name_4(osgi.name_30(name_4));
|
||||
console.name_45("dump",this.method_594);
|
||||
this.var_548 = new Dictionary(false);
|
||||
this.var_547 = new Vector.<name_636>();
|
||||
}
|
||||
|
||||
public function name_360(dumper:name_636) : void
|
||||
{
|
||||
if(this.var_548[dumper.dumperName] != null)
|
||||
{
|
||||
throw new Error("Dumper is already registered");
|
||||
}
|
||||
this.var_548[dumper.dumperName] = dumper;
|
||||
this.var_547.push(dumper);
|
||||
}
|
||||
|
||||
public function method_591(dumperName:String) : void
|
||||
{
|
||||
var dumper:name_636 = this.var_548[dumperName];
|
||||
if(dumper != null)
|
||||
{
|
||||
this.var_547.splice(this.var_547.indexOf(dumper),1);
|
||||
delete this.var_548[dumperName];
|
||||
}
|
||||
}
|
||||
|
||||
public function dump(dumperName:String, params:Array) : String
|
||||
{
|
||||
var dumper:name_636 = null;
|
||||
var index:int = 0;
|
||||
if(dumperName == null)
|
||||
{
|
||||
return this.method_593();
|
||||
}
|
||||
if(dumperName.match(/^\d+$/) != null)
|
||||
{
|
||||
index = int(int(dumperName));
|
||||
if(index < this.var_547.length)
|
||||
{
|
||||
dumper = this.var_547[index];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dumper = this.var_548[dumperName];
|
||||
}
|
||||
if(dumper == null)
|
||||
{
|
||||
return "Dumper " + dumperName + " not found. Available dumpers: \n" + this.method_593();
|
||||
}
|
||||
return dumper.dump(params);
|
||||
}
|
||||
|
||||
public function get method_590() : Dictionary
|
||||
{
|
||||
return this.var_548;
|
||||
}
|
||||
|
||||
public function get method_592() : Vector.<name_636>
|
||||
{
|
||||
return this.var_547;
|
||||
}
|
||||
|
||||
private function method_593() : String
|
||||
{
|
||||
var s:String = "";
|
||||
for(var i:int = 0; i < this.var_547.length; i++)
|
||||
{
|
||||
s += i.toString() + " " + this.var_547[i].dumperName + "\n";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
private function method_594(console:name_4, params:Array) : void
|
||||
{
|
||||
var dumperName:String = params.shift();
|
||||
console.name_145(this.dump(dumperName,params));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
src/package_102/name_636.as
Normal file
@@ -0,0 +1,10 @@
|
||||
package package_102
|
||||
{
|
||||
public interface name_636
|
||||
{
|
||||
function dump(param1:Array) : String;
|
||||
|
||||
function get dumperName() : String;
|
||||
}
|
||||
}
|
||||
|
||||
40
src/package_103/name_361.as
Normal file
@@ -0,0 +1,40 @@
|
||||
package package_103
|
||||
{
|
||||
import package_15.name_19;
|
||||
import package_8.name_24;
|
||||
|
||||
public class name_361 implements name_365
|
||||
{
|
||||
private var urlParams:name_19;
|
||||
|
||||
private var var_553:Vector.<name_24>;
|
||||
|
||||
public function name_361(urlParams:name_19, startupLibraryInfos:Vector.<name_24>)
|
||||
{
|
||||
super();
|
||||
this.urlParams = urlParams;
|
||||
this.var_553 = startupLibraryInfos;
|
||||
}
|
||||
|
||||
public function method_608(parameterName:String) : String
|
||||
{
|
||||
return this.urlParams.method_24(parameterName);
|
||||
}
|
||||
|
||||
public function get method_607() : Vector.<String>
|
||||
{
|
||||
return this.urlParams.method_26;
|
||||
}
|
||||
|
||||
public function get startupLibraryInfos() : Vector.<name_24>
|
||||
{
|
||||
return this.var_553;
|
||||
}
|
||||
|
||||
public function get method_609() : Boolean
|
||||
{
|
||||
return Boolean(this.urlParams.method_24("debug"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
src/package_103/name_365.as
Normal file
@@ -0,0 +1,16 @@
|
||||
package package_103
|
||||
{
|
||||
import package_8.name_24;
|
||||
|
||||
public interface name_365
|
||||
{
|
||||
function method_608(param1:String) : String;
|
||||
|
||||
function get method_607() : Vector.<String>;
|
||||
|
||||
function get startupLibraryInfos() : Vector.<name_24>;
|
||||
|
||||
function get method_609() : Boolean;
|
||||
}
|
||||
}
|
||||
|
||||
32
src/package_104/name_358.as
Normal file
@@ -0,0 +1,32 @@
|
||||
package package_104
|
||||
{
|
||||
import flash.display.BitmapData;
|
||||
|
||||
public interface name_358
|
||||
{
|
||||
function method_599(param1:String, param2:String) : void;
|
||||
|
||||
function method_601(param1:String, param2:BitmapData) : void;
|
||||
|
||||
function method_595(param1:String, param2:Boolean) : void;
|
||||
|
||||
function method_600(param1:String, param2:Number) : void;
|
||||
|
||||
function method_598(param1:String, param2:int) : void;
|
||||
|
||||
function method_597(param1:String, ... rest) : String;
|
||||
|
||||
function method_604(param1:String) : BitmapData;
|
||||
|
||||
function method_602(param1:String) : Boolean;
|
||||
|
||||
function method_596(param1:String) : Number;
|
||||
|
||||
function method_603(param1:String) : int;
|
||||
|
||||
function get language() : String;
|
||||
|
||||
function get defaultLanguage() : String;
|
||||
}
|
||||
}
|
||||
|
||||
102
src/package_104/name_370.as
Normal file
@@ -0,0 +1,102 @@
|
||||
package package_104
|
||||
{
|
||||
import flash.display.BitmapData;
|
||||
import flash.utils.Dictionary;
|
||||
|
||||
public class name_370 implements name_358
|
||||
{
|
||||
private var strings:Object = {};
|
||||
|
||||
private var images:Object = {};
|
||||
|
||||
private var var_550:Object = {};
|
||||
|
||||
private var numbers:Object = {};
|
||||
|
||||
private var var_549:Object = {};
|
||||
|
||||
private var var_552:String;
|
||||
|
||||
private var var_551:String;
|
||||
|
||||
public function name_370(language:String, defaultLanguage:String)
|
||||
{
|
||||
super();
|
||||
this.var_552 = language;
|
||||
this.var_551 = defaultLanguage;
|
||||
this.strings = new Dictionary();
|
||||
this.images = new Dictionary();
|
||||
}
|
||||
|
||||
public function method_599(id:String, text:String) : void
|
||||
{
|
||||
this.strings[id] = text;
|
||||
}
|
||||
|
||||
public function method_601(id:String, image:BitmapData) : void
|
||||
{
|
||||
this.images[id] = image;
|
||||
}
|
||||
|
||||
public function method_595(id:String, value:Boolean) : void
|
||||
{
|
||||
this.var_550[id] = value;
|
||||
}
|
||||
|
||||
public function method_600(id:String, value:Number) : void
|
||||
{
|
||||
this.numbers[id] = value;
|
||||
}
|
||||
|
||||
public function method_598(id:String, value:int) : void
|
||||
{
|
||||
this.var_549[id] = value;
|
||||
}
|
||||
|
||||
public function method_597(id:String, ... vars) : String
|
||||
{
|
||||
var text:String = this.strings[id];
|
||||
if(text == null)
|
||||
{
|
||||
return id;
|
||||
}
|
||||
for(var i:int = 0; i < vars.length; )
|
||||
{
|
||||
text = text.replace("%" + (i + 1),vars[i]);
|
||||
i++;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
public function method_604(id:String) : BitmapData
|
||||
{
|
||||
return this.images[id];
|
||||
}
|
||||
|
||||
public function method_602(id:String) : Boolean
|
||||
{
|
||||
return this.var_550[id];
|
||||
}
|
||||
|
||||
public function method_596(id:String) : Number
|
||||
{
|
||||
return this.numbers[id];
|
||||
}
|
||||
|
||||
public function method_603(id:String) : int
|
||||
{
|
||||
return this.var_549[id];
|
||||
}
|
||||
|
||||
public function get language() : String
|
||||
{
|
||||
return this.var_552;
|
||||
}
|
||||
|
||||
public function get defaultLanguage() : String
|
||||
{
|
||||
return this.var_551;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
29
src/package_105/name_363.as
Normal file
@@ -0,0 +1,29 @@
|
||||
package package_105
|
||||
{
|
||||
import flash.display.DisplayObjectContainer;
|
||||
import flash.display.Stage;
|
||||
|
||||
public interface name_363
|
||||
{
|
||||
function get stage() : Stage;
|
||||
|
||||
function get method_610() : DisplayObjectContainer;
|
||||
|
||||
function get method_611() : DisplayObjectContainer;
|
||||
|
||||
function get method_614() : DisplayObjectContainer;
|
||||
|
||||
function get method_617() : DisplayObjectContainer;
|
||||
|
||||
function get method_613() : DisplayObjectContainer;
|
||||
|
||||
function get method_616() : DisplayObjectContainer;
|
||||
|
||||
function get method_612() : DisplayObjectContainer;
|
||||
|
||||
function get method_618() : DisplayObjectContainer;
|
||||
|
||||
function get method_615() : DisplayObjectContainer;
|
||||
}
|
||||
}
|
||||
|
||||
104
src/package_105/name_364.as
Normal file
@@ -0,0 +1,104 @@
|
||||
package package_105
|
||||
{
|
||||
import flash.display.DisplayObjectContainer;
|
||||
import flash.display.Sprite;
|
||||
import flash.display.Stage;
|
||||
|
||||
public class name_364 implements name_363
|
||||
{
|
||||
private var var_43:Stage;
|
||||
|
||||
private var var_557:DisplayObjectContainer;
|
||||
|
||||
private var var_565:DisplayObjectContainer;
|
||||
|
||||
private var var_559:DisplayObjectContainer;
|
||||
|
||||
private var var_558:DisplayObjectContainer;
|
||||
|
||||
private var var_561:DisplayObjectContainer;
|
||||
|
||||
private var var_564:DisplayObjectContainer;
|
||||
|
||||
private var var_560:DisplayObjectContainer;
|
||||
|
||||
private var var_563:DisplayObjectContainer;
|
||||
|
||||
private var var_562:DisplayObjectContainer;
|
||||
|
||||
public function name_364(rootContainer:DisplayObjectContainer)
|
||||
{
|
||||
super();
|
||||
this.var_43 = rootContainer.stage;
|
||||
this.var_557 = rootContainer;
|
||||
this.var_565 = this.method_619();
|
||||
this.var_559 = this.method_619();
|
||||
this.var_558 = this.method_619();
|
||||
this.var_561 = this.method_619();
|
||||
this.var_564 = this.method_619();
|
||||
this.var_560 = this.method_619();
|
||||
this.var_563 = this.method_619();
|
||||
this.var_562 = this.method_619();
|
||||
}
|
||||
|
||||
private function method_619() : Sprite
|
||||
{
|
||||
var sprite:Sprite = new Sprite();
|
||||
sprite.mouseEnabled = false;
|
||||
sprite.tabEnabled = false;
|
||||
this.var_557.addChild(sprite);
|
||||
return sprite;
|
||||
}
|
||||
|
||||
public function get stage() : Stage
|
||||
{
|
||||
return this.var_43;
|
||||
}
|
||||
|
||||
public function get method_610() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_557;
|
||||
}
|
||||
|
||||
public function get method_611() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_565;
|
||||
}
|
||||
|
||||
public function get method_614() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_559;
|
||||
}
|
||||
|
||||
public function get method_617() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_558;
|
||||
}
|
||||
|
||||
public function get method_613() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_561;
|
||||
}
|
||||
|
||||
public function get method_616() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_564;
|
||||
}
|
||||
|
||||
public function get method_612() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_560;
|
||||
}
|
||||
|
||||
public function get method_618() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_563;
|
||||
}
|
||||
|
||||
public function get method_615() : DisplayObjectContainer
|
||||
{
|
||||
return this.var_562;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
src/package_106/name_357.as
Normal file
@@ -0,0 +1,33 @@
|
||||
package package_106
|
||||
{
|
||||
import package_102.name_636;
|
||||
import package_5.name_3;
|
||||
|
||||
public class name_357 implements name_636
|
||||
{
|
||||
private var osgi:name_3;
|
||||
|
||||
public function name_357(osgi:name_3)
|
||||
{
|
||||
super();
|
||||
this.osgi = osgi;
|
||||
}
|
||||
|
||||
public function dump(params:Array) : String
|
||||
{
|
||||
var result:String = "Registered services\n";
|
||||
var services:Vector.<Object> = this.osgi.method_119;
|
||||
for(var i:int = 0; i < services.length; i++)
|
||||
{
|
||||
result += " " + (i + 1).toString() + ": " + services[i] + "\n";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public function get dumperName() : String
|
||||
{
|
||||
return "service";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
38
src/package_106/name_367.as
Normal file
@@ -0,0 +1,38 @@
|
||||
package package_106
|
||||
{
|
||||
import package_102.name_636;
|
||||
import package_31.name_202;
|
||||
import package_5.name_3;
|
||||
|
||||
public class name_367 implements name_636
|
||||
{
|
||||
private var osgi:name_3;
|
||||
|
||||
public function name_367(osgi:name_3)
|
||||
{
|
||||
super();
|
||||
this.osgi = osgi;
|
||||
}
|
||||
|
||||
public function dump(params:Array) : String
|
||||
{
|
||||
var result:String = "======= Registered bundles ======\n";
|
||||
var bundles:Vector.<name_202> = this.osgi.method_122;
|
||||
for(var i:int = 0; i < bundles.length; i++)
|
||||
{
|
||||
if(i < 9)
|
||||
{
|
||||
result += " ";
|
||||
}
|
||||
result += int(i + 1).toString() + ". " + bundles[i].name + "\n";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public function get dumperName() : String
|
||||
{
|
||||
return "bundle";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
src/package_107/name_362.as
Normal file
@@ -0,0 +1,16 @@
|
||||
package package_107
|
||||
{
|
||||
public interface name_362
|
||||
{
|
||||
function get controlServerAddress() : String;
|
||||
|
||||
function get controlServerPorts() : Vector.<int>;
|
||||
|
||||
function get resourcesRootUrl() : String;
|
||||
|
||||
function method_605(param1:String) : int;
|
||||
|
||||
function method_606(param1:String, param2:int) : void;
|
||||
}
|
||||
}
|
||||
|
||||
52
src/package_107/name_369.as
Normal file
@@ -0,0 +1,52 @@
|
||||
package package_107
|
||||
{
|
||||
import flash.net.SharedObject;
|
||||
|
||||
public class name_369 implements name_362
|
||||
{
|
||||
private static const SHARED_OBJECT_NAME:String = "connection";
|
||||
|
||||
private var var_555:String;
|
||||
|
||||
private var var_554:Vector.<int>;
|
||||
|
||||
private var var_556:String;
|
||||
|
||||
public function name_369(controlServerAddress:String, controlServerPorts:Vector.<int>, resourcesRootUrl:String)
|
||||
{
|
||||
super();
|
||||
this.var_555 = controlServerAddress;
|
||||
this.var_554 = controlServerPorts;
|
||||
this.var_556 = resourcesRootUrl;
|
||||
}
|
||||
|
||||
public function get controlServerAddress() : String
|
||||
{
|
||||
return this.var_555;
|
||||
}
|
||||
|
||||
public function get controlServerPorts() : Vector.<int>
|
||||
{
|
||||
return this.var_554;
|
||||
}
|
||||
|
||||
public function get resourcesRootUrl() : String
|
||||
{
|
||||
return this.var_556;
|
||||
}
|
||||
|
||||
public function method_605(host:String) : int
|
||||
{
|
||||
var so:SharedObject = SharedObject.getLocal(SHARED_OBJECT_NAME,"/");
|
||||
return so.data[host];
|
||||
}
|
||||
|
||||
public function method_606(host:String, port:int) : void
|
||||
{
|
||||
var so:SharedObject = SharedObject.getLocal(SHARED_OBJECT_NAME,"/");
|
||||
so.data[host] = port;
|
||||
so.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
src/package_108/name_373.as
Normal file
@@ -0,0 +1,16 @@
|
||||
package package_108
|
||||
{
|
||||
public interface name_373
|
||||
{
|
||||
function add(param1:Object) : void;
|
||||
|
||||
function hasNext() : Boolean;
|
||||
|
||||
function method_626() : Boolean;
|
||||
|
||||
function next() : Object;
|
||||
|
||||
function name_375() : Object;
|
||||
}
|
||||
}
|
||||
|
||||
106
src/package_108/name_374.as
Normal file
@@ -0,0 +1,106 @@
|
||||
package package_108
|
||||
{
|
||||
public class name_374
|
||||
{
|
||||
internal var head:name_639;
|
||||
|
||||
internal var tail:name_639;
|
||||
|
||||
internal var var_568:int;
|
||||
|
||||
public function name_374()
|
||||
{
|
||||
super();
|
||||
this.head = new name_639();
|
||||
this.tail = new name_639();
|
||||
this.head.next = this.tail;
|
||||
this.tail.prev = this.head;
|
||||
}
|
||||
|
||||
public function listIterator() : name_373
|
||||
{
|
||||
return new name_640(this);
|
||||
}
|
||||
|
||||
public function add(data:Object) : void
|
||||
{
|
||||
var newItem:name_639 = new name_639();
|
||||
newItem.data = data;
|
||||
newItem.next = this.tail;
|
||||
newItem.prev = this.tail.prev;
|
||||
this.tail.prev = newItem;
|
||||
newItem.prev.next = newItem;
|
||||
++this.var_568;
|
||||
}
|
||||
|
||||
public function remove(data:Object) : Boolean
|
||||
{
|
||||
var item:name_639 = this.method_628(data);
|
||||
if(item != null)
|
||||
{
|
||||
this.method_627(item);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function contains(data:Object) : Boolean
|
||||
{
|
||||
return this.method_628(data) != null;
|
||||
}
|
||||
|
||||
public function clear() : void
|
||||
{
|
||||
var tmp:name_639 = null;
|
||||
for(var item:name_639 = this.head.next; item != this.tail; )
|
||||
{
|
||||
tmp = item;
|
||||
item = item.next;
|
||||
this.method_627(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
public function method_629() : Object
|
||||
{
|
||||
return this.head.next.data;
|
||||
}
|
||||
|
||||
public function poll() : Object
|
||||
{
|
||||
if(this.head.next == this.tail)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var data:Object = this.head.next.data;
|
||||
this.method_627(this.head.next);
|
||||
return data;
|
||||
}
|
||||
|
||||
private function method_628(data:Object) : name_639
|
||||
{
|
||||
for(var item:name_639 = this.head.next; item != this.tail; )
|
||||
{
|
||||
if(item.data == data)
|
||||
{
|
||||
return item;
|
||||
}
|
||||
item = item.next;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private function method_627(item:name_639) : void
|
||||
{
|
||||
if(item == this.head || item == this.tail)
|
||||
{
|
||||
throw new Error("Cannot remove sentinels");
|
||||
}
|
||||
item.prev.next = item.next;
|
||||
item.next.prev = item.prev;
|
||||
item.next = null;
|
||||
item.prev = null;
|
||||
++this.var_568;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
src/package_108/name_639.as
Normal file
@@ -0,0 +1,17 @@
|
||||
package package_108
|
||||
{
|
||||
internal class name_639
|
||||
{
|
||||
public var data:Object;
|
||||
|
||||
public var next:name_639;
|
||||
|
||||
public var prev:name_639;
|
||||
|
||||
public function name_639()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
89
src/package_108/name_640.as
Normal file
@@ -0,0 +1,89 @@
|
||||
package package_108
|
||||
{
|
||||
import package_127.name_729;
|
||||
import package_127.name_730;
|
||||
|
||||
internal class name_640 implements name_373
|
||||
{
|
||||
private var list:name_374;
|
||||
|
||||
private var var_568:int;
|
||||
|
||||
private var var_668:name_639;
|
||||
|
||||
private var var_667:name_639;
|
||||
|
||||
public function name_640(list:name_374)
|
||||
{
|
||||
super();
|
||||
this.list = list;
|
||||
this.var_568 = list.var_568;
|
||||
this.var_667 = list.head;
|
||||
this.var_668 = this.var_667.next;
|
||||
}
|
||||
|
||||
public function add(data:Object) : void
|
||||
{
|
||||
this.method_811();
|
||||
var item:name_639 = new name_639();
|
||||
item.data = data;
|
||||
item.prev = this.var_667;
|
||||
item.next = this.var_668;
|
||||
this.var_667.next = item;
|
||||
this.var_668.prev = item;
|
||||
this.var_667 = item;
|
||||
this.method_812();
|
||||
}
|
||||
|
||||
public function hasNext() : Boolean
|
||||
{
|
||||
this.method_811();
|
||||
return this.var_668 != this.list.tail;
|
||||
}
|
||||
|
||||
public function method_626() : Boolean
|
||||
{
|
||||
this.method_811();
|
||||
return this.var_667 != this.list.head;
|
||||
}
|
||||
|
||||
public function next() : Object
|
||||
{
|
||||
this.method_811();
|
||||
if(this.var_668 == this.list.tail)
|
||||
{
|
||||
throw new name_729();
|
||||
}
|
||||
this.var_667 = this.var_668;
|
||||
this.var_668 = this.var_668.next;
|
||||
return this.var_667.data;
|
||||
}
|
||||
|
||||
public function name_375() : Object
|
||||
{
|
||||
this.method_811();
|
||||
if(this.var_667 == this.list.head)
|
||||
{
|
||||
throw new name_729();
|
||||
}
|
||||
this.var_668 = this.var_667;
|
||||
this.var_667 = this.var_667.prev;
|
||||
return this.var_668.data;
|
||||
}
|
||||
|
||||
private function method_811() : void
|
||||
{
|
||||
if(this.var_568 != this.list.var_568)
|
||||
{
|
||||
throw new name_730();
|
||||
}
|
||||
}
|
||||
|
||||
private function method_812() : void
|
||||
{
|
||||
++this.var_568;
|
||||
this.list.var_568 = this.var_568;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
223
src/package_109/name_377.as
Normal file
@@ -0,0 +1,223 @@
|
||||
package package_109
|
||||
{
|
||||
import package_46.Matrix4;
|
||||
import package_46.name_194;
|
||||
import package_76.name_235;
|
||||
import package_90.name_386;
|
||||
|
||||
public class name_377 extends name_235
|
||||
{
|
||||
public var hs:name_194 = new name_194();
|
||||
|
||||
public function name_377(hs:name_194, collisionGroup:int, collisionMask:int)
|
||||
{
|
||||
super(BOX,collisionGroup,collisionMask);
|
||||
this.hs.copy(hs);
|
||||
}
|
||||
|
||||
override public function calculateAABB() : name_386
|
||||
{
|
||||
var t:Matrix4 = null;
|
||||
var xx:Number = NaN;
|
||||
var yy:Number = NaN;
|
||||
var zz:Number = NaN;
|
||||
t = transform;
|
||||
xx = t.a < 0 ? -t.a : t.a;
|
||||
yy = t.b < 0 ? -t.b : t.b;
|
||||
zz = t.c < 0 ? -t.c : t.c;
|
||||
aabb.maxX = this.hs.x * xx + this.hs.y * yy + this.hs.z * zz;
|
||||
aabb.minX = -aabb.maxX;
|
||||
xx = t.e < 0 ? -t.e : t.e;
|
||||
yy = t.f < 0 ? -t.f : t.f;
|
||||
zz = t.g < 0 ? -t.g : t.g;
|
||||
aabb.maxY = this.hs.x * xx + this.hs.y * yy + this.hs.z * zz;
|
||||
aabb.minY = -aabb.maxY;
|
||||
xx = t.i < 0 ? -t.i : t.i;
|
||||
yy = t.j < 0 ? -t.j : t.j;
|
||||
zz = t.k < 0 ? -t.k : t.k;
|
||||
aabb.maxZ = this.hs.x * xx + this.hs.y * yy + this.hs.z * zz;
|
||||
aabb.minZ = -aabb.maxZ;
|
||||
aabb.minX += t.d;
|
||||
aabb.maxX += t.d;
|
||||
aabb.minY += t.h;
|
||||
aabb.maxY += t.h;
|
||||
aabb.minZ += t.l;
|
||||
aabb.maxZ += t.l;
|
||||
return aabb;
|
||||
}
|
||||
|
||||
override public function copyFrom(source:name_235) : name_235
|
||||
{
|
||||
var box:name_377 = source as name_377;
|
||||
if(box == null)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
super.copyFrom(box);
|
||||
this.hs.copy(box.hs);
|
||||
return this;
|
||||
}
|
||||
|
||||
override protected function createPrimitive() : name_235
|
||||
{
|
||||
return new name_377(this.hs,collisionGroup,collisionMask);
|
||||
}
|
||||
|
||||
override public function raycast(origin:name_194, vector:name_194, epsilon:Number, normal:name_194) : Number
|
||||
{
|
||||
var t1:Number = NaN;
|
||||
var t2:Number = NaN;
|
||||
var vx:Number = NaN;
|
||||
var tMin:Number = -1;
|
||||
var tMax:Number = 1e+308;
|
||||
vx = origin.x - transform.d;
|
||||
var vy:Number = origin.y - transform.h;
|
||||
var vz:Number = origin.z - transform.l;
|
||||
var ox:Number = transform.a * vx + transform.e * vy + transform.i * vz;
|
||||
var oy:Number = transform.b * vx + transform.f * vy + transform.j * vz;
|
||||
var oz:Number = transform.c * vx + transform.g * vy + transform.k * vz;
|
||||
vx = transform.a * vector.x + transform.e * vector.y + transform.i * vector.z;
|
||||
vy = transform.b * vector.x + transform.f * vector.y + transform.j * vector.z;
|
||||
vz = transform.c * vector.x + transform.g * vector.y + transform.k * vector.z;
|
||||
if(vx < epsilon && vx > -epsilon)
|
||||
{
|
||||
if(ox < -this.hs.x || ox > this.hs.x)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t1 = (-this.hs.x - ox) / vx;
|
||||
t2 = (this.hs.x - ox) / vx;
|
||||
if(t1 < t2)
|
||||
{
|
||||
if(t1 > tMin)
|
||||
{
|
||||
tMin = t1;
|
||||
normal.x = -1;
|
||||
normal.y = normal.z = 0;
|
||||
}
|
||||
if(t2 < tMax)
|
||||
{
|
||||
tMax = t2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(t2 > tMin)
|
||||
{
|
||||
tMin = t2;
|
||||
normal.x = 1;
|
||||
normal.y = normal.z = 0;
|
||||
}
|
||||
if(t1 < tMax)
|
||||
{
|
||||
tMax = t1;
|
||||
}
|
||||
}
|
||||
if(tMax < tMin)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if(vy < epsilon && vy > -epsilon)
|
||||
{
|
||||
if(oy < -this.hs.y || oy > this.hs.y)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t1 = (-this.hs.y - oy) / vy;
|
||||
t2 = (this.hs.y - oy) / vy;
|
||||
if(t1 < t2)
|
||||
{
|
||||
if(t1 > tMin)
|
||||
{
|
||||
tMin = t1;
|
||||
normal.y = -1;
|
||||
normal.x = normal.z = 0;
|
||||
}
|
||||
if(t2 < tMax)
|
||||
{
|
||||
tMax = t2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(t2 > tMin)
|
||||
{
|
||||
tMin = t2;
|
||||
normal.y = 1;
|
||||
normal.x = normal.z = 0;
|
||||
}
|
||||
if(t1 < tMax)
|
||||
{
|
||||
tMax = t1;
|
||||
}
|
||||
}
|
||||
if(tMax < tMin)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if(vz < epsilon && vz > -epsilon)
|
||||
{
|
||||
if(oz < -this.hs.z || oz > this.hs.z)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t1 = (-this.hs.z - oz) / vz;
|
||||
t2 = (this.hs.z - oz) / vz;
|
||||
if(t1 < t2)
|
||||
{
|
||||
if(t1 > tMin)
|
||||
{
|
||||
tMin = t1;
|
||||
normal.z = -1;
|
||||
normal.x = normal.y = 0;
|
||||
}
|
||||
if(t2 < tMax)
|
||||
{
|
||||
tMax = t2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(t2 > tMin)
|
||||
{
|
||||
tMin = t2;
|
||||
normal.z = 1;
|
||||
normal.x = normal.y = 0;
|
||||
}
|
||||
if(t1 < tMax)
|
||||
{
|
||||
tMax = t1;
|
||||
}
|
||||
}
|
||||
if(tMax < tMin)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
vx = normal.x;
|
||||
vy = normal.y;
|
||||
vz = normal.z;
|
||||
normal.x = transform.a * vx + transform.b * vy + transform.c * vz;
|
||||
normal.y = transform.e * vx + transform.f * vy + transform.g * vz;
|
||||
normal.z = transform.i * vx + transform.j * vy + transform.k * vz;
|
||||
return tMin;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
{
|
||||
return "[CollisionBox hs=" + this.hs + "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
268
src/package_109/name_378.as
Normal file
@@ -0,0 +1,268 @@
|
||||
package package_109
|
||||
{
|
||||
import package_46.name_194;
|
||||
import package_76.name_235;
|
||||
import package_90.name_386;
|
||||
|
||||
public class name_378 extends name_235
|
||||
{
|
||||
public var v0:name_194 = new name_194();
|
||||
|
||||
public var v1:name_194 = new name_194();
|
||||
|
||||
public var v2:name_194 = new name_194();
|
||||
|
||||
public var e0:name_194 = new name_194();
|
||||
|
||||
public var e1:name_194 = new name_194();
|
||||
|
||||
public var e2:name_194 = new name_194();
|
||||
|
||||
public function name_378(v0:name_194, v1:name_194, v2:name_194, collisionGroup:int, collisionMask:int)
|
||||
{
|
||||
super(TRIANGLE,collisionGroup,collisionMask);
|
||||
this.method_630(v0,v1,v2);
|
||||
}
|
||||
|
||||
override public function calculateAABB() : name_386
|
||||
{
|
||||
var a:Number = NaN;
|
||||
var b:Number = NaN;
|
||||
var aa:int = 0;
|
||||
var eps_c:Number = 0.005 * transform.c;
|
||||
var eps_g:Number = 0.005 * transform.g;
|
||||
var eps_k:Number = 0.005 * transform.k;
|
||||
a = this.v0.x * transform.a + this.v0.y * transform.b;
|
||||
aabb.minX = aabb.maxX = a + eps_c;
|
||||
b = a - eps_c;
|
||||
if(b > aabb.maxX)
|
||||
{
|
||||
aabb.maxX = b;
|
||||
}
|
||||
else if(b < aabb.minX)
|
||||
{
|
||||
aabb.minX = b;
|
||||
}
|
||||
a = this.v0.x * transform.e + this.v0.y * transform.f;
|
||||
aabb.minY = aabb.maxY = a + eps_g;
|
||||
b = a - eps_g;
|
||||
if(b > aabb.maxY)
|
||||
{
|
||||
aabb.maxY = b;
|
||||
}
|
||||
else if(b < aabb.minY)
|
||||
{
|
||||
aabb.minY = b;
|
||||
}
|
||||
a = this.v0.x * transform.i + this.v0.y * transform.j;
|
||||
aabb.minZ = aabb.maxZ = a + eps_k;
|
||||
b = a - eps_k;
|
||||
if(b > aabb.maxZ)
|
||||
{
|
||||
aabb.maxZ = b;
|
||||
}
|
||||
else if(b < aabb.minZ)
|
||||
{
|
||||
aabb.minZ = b;
|
||||
}
|
||||
a = this.v1.x * transform.a + this.v1.y * transform.b;
|
||||
b = a + eps_c;
|
||||
if(b > aabb.maxX)
|
||||
{
|
||||
aabb.maxX = b;
|
||||
}
|
||||
else if(b < aabb.minX)
|
||||
{
|
||||
aabb.minX = b;
|
||||
}
|
||||
b = a - eps_c;
|
||||
if(b > aabb.maxX)
|
||||
{
|
||||
aabb.maxX = b;
|
||||
}
|
||||
else if(b < aabb.minX)
|
||||
{
|
||||
aabb.minX = b;
|
||||
}
|
||||
a = this.v1.x * transform.e + this.v1.y * transform.f;
|
||||
b = a + eps_g;
|
||||
if(b > aabb.maxY)
|
||||
{
|
||||
aabb.maxY = b;
|
||||
}
|
||||
else if(b < aabb.minY)
|
||||
{
|
||||
aabb.minY = b;
|
||||
}
|
||||
b = a - eps_g;
|
||||
if(b > aabb.maxY)
|
||||
{
|
||||
aabb.maxY = b;
|
||||
}
|
||||
else if(b < aabb.minY)
|
||||
{
|
||||
aabb.minY = b;
|
||||
}
|
||||
a = this.v1.x * transform.i + this.v1.y * transform.j;
|
||||
b = a + eps_k;
|
||||
if(b > aabb.maxZ)
|
||||
{
|
||||
aabb.maxZ = b;
|
||||
}
|
||||
else if(b < aabb.minZ)
|
||||
{
|
||||
aabb.minZ = b;
|
||||
}
|
||||
b = a - eps_k;
|
||||
if(b > aabb.maxZ)
|
||||
{
|
||||
aabb.maxZ = b;
|
||||
}
|
||||
else if(b < aabb.minZ)
|
||||
{
|
||||
aabb.minZ = b;
|
||||
}
|
||||
a = this.v2.x * transform.a + this.v2.y * transform.b;
|
||||
b = a + eps_c;
|
||||
if(b > aabb.maxX)
|
||||
{
|
||||
aabb.maxX = b;
|
||||
}
|
||||
else if(b < aabb.minX)
|
||||
{
|
||||
aabb.minX = b;
|
||||
}
|
||||
b = a - eps_c;
|
||||
if(b > aabb.maxX)
|
||||
{
|
||||
aabb.maxX = b;
|
||||
}
|
||||
else if(b < aabb.minX)
|
||||
{
|
||||
aabb.minX = b;
|
||||
}
|
||||
a = this.v2.x * transform.e + this.v2.y * transform.f;
|
||||
b = a + eps_g;
|
||||
if(b > aabb.maxY)
|
||||
{
|
||||
aabb.maxY = b;
|
||||
}
|
||||
else if(b < aabb.minY)
|
||||
{
|
||||
aabb.minY = b;
|
||||
}
|
||||
b = a - eps_g;
|
||||
if(b > aabb.maxY)
|
||||
{
|
||||
aabb.maxY = b;
|
||||
}
|
||||
else if(b < aabb.minY)
|
||||
{
|
||||
aabb.minY = b;
|
||||
}
|
||||
a = this.v2.x * transform.i + this.v2.y * transform.j;
|
||||
b = a + eps_k;
|
||||
if(b > aabb.maxZ)
|
||||
{
|
||||
aabb.maxZ = b;
|
||||
}
|
||||
else if(b < aabb.minZ)
|
||||
{
|
||||
aabb.minZ = b;
|
||||
}
|
||||
b = a - eps_k;
|
||||
if(b > aabb.maxZ)
|
||||
{
|
||||
aabb.maxZ = b;
|
||||
}
|
||||
else if(b < aabb.minZ)
|
||||
{
|
||||
aabb.minZ = b;
|
||||
}
|
||||
aabb.minX += transform.d;
|
||||
aabb.maxX += transform.d;
|
||||
aabb.minY += transform.h;
|
||||
aabb.maxY += transform.h;
|
||||
aabb.minZ += transform.l;
|
||||
aabb.maxZ += transform.l;
|
||||
if(Boolean(isNaN(aabb.minX)) || Boolean(isNaN(aabb.minY)) || Boolean(isNaN(aabb.minZ)) || Boolean(isNaN(aabb.maxX)) || Boolean(isNaN(aabb.maxY)) || Boolean(isNaN(aabb.maxZ)))
|
||||
{
|
||||
aa = 1;
|
||||
trace(aabb);
|
||||
}
|
||||
return aabb;
|
||||
}
|
||||
|
||||
override public function raycast(origin:name_194, vector:name_194, epsilon:Number, normal:name_194) : Number
|
||||
{
|
||||
var t:Number = NaN;
|
||||
var vz:Number = vector.x * transform.c + vector.y * transform.g + vector.z * transform.k;
|
||||
if(vz < epsilon && vz > -epsilon)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
var tx:Number = origin.x - transform.d;
|
||||
var ty:Number = origin.y - transform.h;
|
||||
var tz:Number = origin.z - transform.l;
|
||||
var oz:Number = tx * transform.c + ty * transform.g + tz * transform.k;
|
||||
t = -oz / vz;
|
||||
if(t < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
var ox:Number = tx * transform.a + ty * transform.e + tz * transform.i;
|
||||
var oy:Number = tx * transform.b + ty * transform.f + tz * transform.j;
|
||||
tx = ox + t * (vector.x * transform.a + vector.y * transform.e + vector.z * transform.i);
|
||||
ty = oy + t * (vector.x * transform.b + vector.y * transform.f + vector.z * transform.j);
|
||||
tz = oz + t * vz;
|
||||
if(this.e0.x * (ty - this.v0.y) - this.e0.y * (tx - this.v0.x) < 0 || this.e1.x * (ty - this.v1.y) - this.e1.y * (tx - this.v1.x) < 0 || this.e2.x * (ty - this.v2.y) - this.e2.y * (tx - this.v2.x) < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
normal.x = transform.c;
|
||||
normal.y = transform.g;
|
||||
normal.z = transform.k;
|
||||
return t;
|
||||
}
|
||||
|
||||
override public function copyFrom(source:name_235) : name_235
|
||||
{
|
||||
super.copyFrom(source);
|
||||
var tri:name_378 = source as name_378;
|
||||
if(tri != null)
|
||||
{
|
||||
this.v0.copy(tri.v0);
|
||||
this.v1.copy(tri.v1);
|
||||
this.v2.copy(tri.v2);
|
||||
this.e0.copy(tri.e0);
|
||||
this.e1.copy(tri.e1);
|
||||
this.e2.copy(tri.e2);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
{
|
||||
return "[CollisionTriangle v0=" + this.v0 + ", v1=" + this.v1 + ", v2=" + this.v2 + "]";
|
||||
}
|
||||
|
||||
override protected function createPrimitive() : name_235
|
||||
{
|
||||
return new name_378(this.v0,this.v1,this.v2,collisionGroup,collisionMask);
|
||||
}
|
||||
|
||||
private function method_630(v0:name_194, v1:name_194, v2:name_194) : void
|
||||
{
|
||||
this.v0.copy(v0);
|
||||
this.v1.copy(v1);
|
||||
this.v2.copy(v2);
|
||||
this.e0.method_366(v1,v0);
|
||||
this.e0.normalize();
|
||||
this.e1.method_366(v2,v1);
|
||||
this.e1.normalize();
|
||||
this.e2.method_366(v0,v2);
|
||||
this.e2.normalize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
107
src/package_109/name_381.as
Normal file
@@ -0,0 +1,107 @@
|
||||
package package_109
|
||||
{
|
||||
import package_46.Matrix4;
|
||||
import package_46.name_194;
|
||||
import package_76.name_235;
|
||||
import package_90.name_386;
|
||||
|
||||
public class name_381 extends name_235
|
||||
{
|
||||
private static const EPSILON:Number = 0.005;
|
||||
|
||||
public var hs:name_194 = new name_194();
|
||||
|
||||
public var var_572:Boolean = true;
|
||||
|
||||
public function name_381(hs:name_194, collisionGroup:int, collisionMask:int)
|
||||
{
|
||||
super(RECT,collisionGroup,collisionMask);
|
||||
this.hs.copy(hs);
|
||||
}
|
||||
|
||||
override public function calculateAABB() : name_386
|
||||
{
|
||||
var t:Matrix4 = null;
|
||||
t = transform;
|
||||
var xx:Number = t.a < 0 ? -t.a : t.a;
|
||||
var yy:Number = t.b < 0 ? -t.b : t.b;
|
||||
var zz:Number = t.c < 0 ? -t.c : t.c;
|
||||
aabb.maxX = this.hs.x * xx + this.hs.y * yy + EPSILON * zz;
|
||||
aabb.minX = -aabb.maxX;
|
||||
xx = t.e < 0 ? -t.e : t.e;
|
||||
yy = t.f < 0 ? -t.f : t.f;
|
||||
zz = t.g < 0 ? -t.g : t.g;
|
||||
aabb.maxY = this.hs.x * xx + this.hs.y * yy + EPSILON * zz;
|
||||
aabb.minY = -aabb.maxY;
|
||||
xx = t.i < 0 ? -t.i : t.i;
|
||||
yy = t.j < 0 ? -t.j : t.j;
|
||||
zz = t.k < 0 ? -t.k : t.k;
|
||||
aabb.maxZ = this.hs.x * xx + this.hs.y * yy + EPSILON * zz;
|
||||
aabb.minZ = -aabb.maxZ;
|
||||
aabb.minX += t.d;
|
||||
aabb.maxX += t.d;
|
||||
aabb.minY += t.h;
|
||||
aabb.maxY += t.h;
|
||||
aabb.minZ += t.l;
|
||||
aabb.maxZ += t.l;
|
||||
return aabb;
|
||||
}
|
||||
|
||||
override public function copyFrom(source:name_235) : name_235
|
||||
{
|
||||
var rect:name_381 = source as name_381;
|
||||
if(rect == null)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
super.copyFrom(rect);
|
||||
this.hs.copy(rect.hs);
|
||||
return this;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
{
|
||||
return "[CollisionRect hs=" + this.hs + "]";
|
||||
}
|
||||
|
||||
override protected function createPrimitive() : name_235
|
||||
{
|
||||
return new name_381(this.hs,collisionGroup,collisionMask);
|
||||
}
|
||||
|
||||
override public function raycast(origin:name_194, vector:name_194, threshold:Number, normal:name_194) : Number
|
||||
{
|
||||
var t:Number = NaN;
|
||||
var vx:Number = origin.x - transform.d;
|
||||
var vy:Number = origin.y - transform.h;
|
||||
var vz:Number = origin.z - transform.l;
|
||||
var ox:Number = transform.a * vx + transform.e * vy + transform.i * vz;
|
||||
var oy:Number = transform.b * vx + transform.f * vy + transform.j * vz;
|
||||
var oz:Number = transform.c * vx + transform.g * vy + transform.k * vz;
|
||||
vx = transform.a * vector.x + transform.e * vector.y + transform.i * vector.z;
|
||||
vy = transform.b * vector.x + transform.f * vector.y + transform.j * vector.z;
|
||||
vz = transform.c * vector.x + transform.g * vector.y + transform.k * vector.z;
|
||||
if(vz > -threshold && vz < threshold)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
t = -oz / vz;
|
||||
if(t < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
ox += vx * t;
|
||||
oy += vy * t;
|
||||
oz = 0;
|
||||
if(ox < -this.hs.x - threshold || ox > this.hs.x + threshold || oy < -this.hs.y - threshold || oy > this.hs.y + threshold)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
normal.x = transform.c;
|
||||
normal.y = transform.g;
|
||||
normal.z = transform.k;
|
||||
return t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
65
src/package_109/name_767.as
Normal file
@@ -0,0 +1,65 @@
|
||||
package package_109
|
||||
{
|
||||
import package_46.name_194;
|
||||
import package_76.name_235;
|
||||
import package_90.name_386;
|
||||
|
||||
public class name_767 extends name_235
|
||||
{
|
||||
public var r:Number = 0;
|
||||
|
||||
public function name_767(r:Number, collisionGroup:int, collisionMask:int)
|
||||
{
|
||||
super(SPHERE,collisionGroup,collisionMask);
|
||||
this.r = r;
|
||||
}
|
||||
|
||||
override public function calculateAABB() : name_386
|
||||
{
|
||||
aabb.maxX = transform.d + this.r;
|
||||
aabb.minX = transform.d - this.r;
|
||||
aabb.maxY = transform.h + this.r;
|
||||
aabb.minY = transform.h - this.r;
|
||||
aabb.maxZ = transform.l + this.r;
|
||||
aabb.minZ = transform.l - this.r;
|
||||
return aabb;
|
||||
}
|
||||
|
||||
override public function raycast(origin:name_194, vector:name_194, threshold:Number, normal:name_194) : Number
|
||||
{
|
||||
var px:Number = origin.x - transform.d;
|
||||
var py:Number = origin.y - transform.h;
|
||||
var pz:Number = origin.z - transform.l;
|
||||
var k:Number = vector.x * px + vector.y * py + vector.z * pz;
|
||||
if(k > 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
var a:Number = vector.x * vector.x + vector.y * vector.y + vector.z * vector.z;
|
||||
var D:Number = k * k - a * (px * px + py * py + pz * pz - this.r * this.r);
|
||||
if(D < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return -(k + Math.sqrt(D)) / a;
|
||||
}
|
||||
|
||||
override public function copyFrom(source:name_235) : name_235
|
||||
{
|
||||
var sphere:name_767 = source as name_767;
|
||||
if(sphere == null)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
super.copyFrom(sphere);
|
||||
this.r = sphere.r;
|
||||
return this;
|
||||
}
|
||||
|
||||
override protected function createPrimitive() : name_235
|
||||
{
|
||||
return new name_767(this.r,collisionGroup,collisionMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
209
src/package_11/name_16.as
Normal file
@@ -0,0 +1,209 @@
|
||||
package package_11
|
||||
{
|
||||
import flash.display.DisplayObjectContainer;
|
||||
import flash.display.Stage;
|
||||
import flash.events.KeyboardEvent;
|
||||
import flash.ui.Keyboard;
|
||||
import package_102.name_355;
|
||||
import package_102.name_359;
|
||||
import package_103.name_361;
|
||||
import package_103.name_365;
|
||||
import package_104.name_358;
|
||||
import package_104.name_370;
|
||||
import package_105.name_363;
|
||||
import package_105.name_364;
|
||||
import package_106.name_357;
|
||||
import package_106.name_367;
|
||||
import package_107.name_362;
|
||||
import package_107.name_369;
|
||||
import package_15.name_19;
|
||||
import package_31.name_366;
|
||||
import package_39.name_160;
|
||||
import package_39.name_368;
|
||||
import package_5.name_3;
|
||||
import package_6.name_354;
|
||||
import package_6.name_356;
|
||||
import package_6.name_4;
|
||||
import package_8.class_16;
|
||||
import package_8.name_24;
|
||||
import package_8.name_25;
|
||||
|
||||
public class name_16 implements class_16
|
||||
{
|
||||
private var osgi:name_3;
|
||||
|
||||
private var clientLog:name_160;
|
||||
|
||||
private var console:name_354;
|
||||
|
||||
private var var_83:KeyboardShortcut;
|
||||
|
||||
private var var_84:KeyboardShortcut;
|
||||
|
||||
public function name_16()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function start(rootContainer:DisplayObjectContainer, urlParams:name_19, libraryInfos:Vector.<name_24>, connectionParameters:name_25, startupLogStrings:Vector.<String>) : void
|
||||
{
|
||||
var libraryInfo:name_24 = null;
|
||||
this.osgi = name_3.name_8();
|
||||
this.method_191(urlParams,startupLogStrings);
|
||||
this.method_6(rootContainer.stage,urlParams);
|
||||
this.osgi.method_116(name_365,new name_361(urlParams,libraryInfos));
|
||||
this.osgi.method_116(name_363,new name_364(rootContainer));
|
||||
this.osgi.method_116(name_362,new name_369(connectionParameters.serverAddress,connectionParameters.serverPorts,connectionParameters.resourcesRootURL));
|
||||
var language:String = urlParams.method_25("lang","ru");
|
||||
this.osgi.method_116(name_358,new name_370(language,"en"));
|
||||
var dumpService:name_355 = new name_359(this.osgi);
|
||||
this.osgi.method_116(name_355,dumpService);
|
||||
dumpService.name_360(new name_367(this.osgi));
|
||||
dumpService.name_360(new name_357(this.osgi));
|
||||
for each(libraryInfo in libraryInfos)
|
||||
{
|
||||
this.osgi.method_121(new name_366(libraryInfo.manifestProperties));
|
||||
}
|
||||
}
|
||||
|
||||
private function method_191(urlParams:name_19, startupLogStrings:Vector.<String>) : void
|
||||
{
|
||||
var s:String = null;
|
||||
var logChannelBufferSize:int = int(int(urlParams.method_25("log_channel_buffer_size","1000")));
|
||||
this.clientLog = new name_368(logChannelBufferSize);
|
||||
name_3.clientLog = this.clientLog;
|
||||
this.osgi.method_116(name_160,this.clientLog);
|
||||
for each(s in startupLogStrings)
|
||||
{
|
||||
this.clientLog.log("startup",s);
|
||||
}
|
||||
}
|
||||
|
||||
private function method_6(stage:Stage, urlParams:name_19) : void
|
||||
{
|
||||
var channelName:String = null;
|
||||
this.console = new name_354(stage,50,100,1,1);
|
||||
this.osgi.method_116(name_4,this.console);
|
||||
var consoleParams:String = urlParams.method_24("console");
|
||||
if(Boolean(consoleParams))
|
||||
{
|
||||
this.method_192(stage,this.console,consoleParams);
|
||||
}
|
||||
var clientLogConnector:name_356 = new name_356(this.clientLog,this.console);
|
||||
this.console.name_45("log",clientLogConnector.name_371);
|
||||
var logChannels:String = urlParams.method_24("showlog");
|
||||
if(Boolean(logChannels))
|
||||
{
|
||||
if(logChannels == "all")
|
||||
{
|
||||
this.clientLog.addLogListener(clientLogConnector);
|
||||
}
|
||||
else
|
||||
{
|
||||
for each(channelName in logChannels.split(","))
|
||||
{
|
||||
this.clientLog.addLogChannelListener(channelName,clientLogConnector);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function method_192(stage:Stage, console:name_354, consoleParams:String) : void
|
||||
{
|
||||
var pair:String = null;
|
||||
var parts:Array = null;
|
||||
var pairs:Array = consoleParams.split(",");
|
||||
var params:Object = {};
|
||||
for each(pair in pairs)
|
||||
{
|
||||
parts = pair.split(":");
|
||||
params[parts[0]] = parts[1];
|
||||
}
|
||||
if(params["show"] != null)
|
||||
{
|
||||
console.show();
|
||||
}
|
||||
if(params["ha"] != null)
|
||||
{
|
||||
console.method_138 = int(params["ha"]);
|
||||
}
|
||||
if(params["va"] != null)
|
||||
{
|
||||
console.method_137 = int(params["va"]);
|
||||
}
|
||||
if(params["w"] != null)
|
||||
{
|
||||
console.width = int(params["w"]);
|
||||
}
|
||||
if(params["h"] != null)
|
||||
{
|
||||
console.height = int(params["h"]);
|
||||
}
|
||||
if(params["alpha"] != null)
|
||||
{
|
||||
console.method_139("con_alpha " + params["alpha"]);
|
||||
}
|
||||
this.var_83 = this.method_190(params["hsw"],Keyboard.LEFT,false,true,true);
|
||||
this.var_84 = this.method_190(params["vsw"],Keyboard.UP,false,true,true);
|
||||
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.method_193,true);
|
||||
}
|
||||
|
||||
private function method_190(s:String, defKey:int, defAlt:Boolean, defCtrl:Boolean, defShift:Boolean) : KeyboardShortcut
|
||||
{
|
||||
if(s == null)
|
||||
{
|
||||
return new KeyboardShortcut(defKey,defAlt,defCtrl,defShift);
|
||||
}
|
||||
return new KeyboardShortcut(parseInt(s),s.indexOf("a") > -1,s.indexOf("c") > -1,s.indexOf("s") > -1);
|
||||
}
|
||||
|
||||
private function method_193(e:KeyboardEvent) : void
|
||||
{
|
||||
switch(e.keyCode)
|
||||
{
|
||||
case this.var_83.keyCode:
|
||||
if(this.var_83.altKey == e.altKey && this.var_83.shiftKey == e.shiftKey && this.var_83.ctrlKey == e.ctrlKey)
|
||||
{
|
||||
if(this.console.method_138 == 1)
|
||||
{
|
||||
this.console.method_138 = 2;
|
||||
break;
|
||||
}
|
||||
this.console.method_138 = 1;
|
||||
}
|
||||
break;
|
||||
case this.var_84.keyCode:
|
||||
if(this.var_84.altKey == e.altKey && this.var_84.shiftKey == e.shiftKey && this.var_84.ctrlKey == e.ctrlKey)
|
||||
{
|
||||
if(this.console.method_137 == 1)
|
||||
{
|
||||
this.console.method_137 = 2;
|
||||
break;
|
||||
}
|
||||
this.console.method_137 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class KeyboardShortcut
|
||||
{
|
||||
public var keyCode:int;
|
||||
|
||||
public var altKey:Boolean;
|
||||
|
||||
public var ctrlKey:Boolean;
|
||||
|
||||
public var shiftKey:Boolean;
|
||||
|
||||
public function KeyboardShortcut(keyCode:int, altKey:Boolean, ctrlKey:Boolean, shiftKey:Boolean)
|
||||
{
|
||||
super();
|
||||
this.keyCode = keyCode;
|
||||
this.altKey = altKey;
|
||||
this.ctrlKey = ctrlKey;
|
||||
this.shiftKey = shiftKey;
|
||||
}
|
||||
}
|
||||
13
src/package_11/name_406.as
Normal file
@@ -0,0 +1,13 @@
|
||||
package package_11
|
||||
{
|
||||
public class name_406
|
||||
{
|
||||
public static const version:String = "8.16.0";
|
||||
|
||||
public function name_406()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||