code
stringlengths 57
237k
|
|---|
package projects.tanks.client.clans.panel.loadingclan {
public class ClanLoadingPanelCC {
private var _clanButtonVisible:Boolean;
private var _minRankForCreateClan:int;
public function ClanLoadingPanelCC(param1:Boolean = false, param2:int = 0) {
super();
this._clanButtonVisible = param1;
this._minRankForCreateClan = param2;
}
public function get clanButtonVisible() : Boolean {
return this._clanButtonVisible;
}
public function set clanButtonVisible(param1:Boolean) : void {
this._clanButtonVisible = param1;
}
public function get minRankForCreateClan() : int {
return this._minRankForCreateClan;
}
public function set minRankForCreateClan(param1:int) : void {
this._minRankForCreateClan = param1;
}
public function toString() : String {
var local1:String = "ClanLoadingPanelCC [";
local1 += "clanButtonVisible = " + this.clanButtonVisible + " ";
local1 += "minRankForCreateClan = " + this.minRankForCreateClan + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.model.info {
[ModelInterface]
public interface ShowInfo {
function showInfo() : void;
}
}
|
package controls.rangicons
{
public class RangIconSmall extends RangIcon
{
public function RangIconSmall(param1:int = 1)
{
super(param1);
}
}
}
|
package alternativa.tanks.models.battle.facilities {
import alternativa.math.Vector3;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class FacilityDispellEffectEvents implements FacilityDispellEffect {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function FacilityDispellEffectEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function createDispellEffects(param1:Vector3) : void {
var i:int = 0;
var m:FacilityDispellEffect = null;
var position:Vector3 = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = FacilityDispellEffect(this.impl[i]);
m.createDispellEffects(position);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.makeup {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_okIcon.png")]
public class MakeUp_okIcon extends BitmapAsset {
public function MakeUp_okIcon() {
super();
}
}
}
|
package alternativa.engine3d.core {
import alternativa.Alternativa3D;
import alternativa.engine3d.alternativa3d;
import alternativa.gfx.core.Device;
import flash.display.Bitmap;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display3D.Context3DClearMask;
import flash.display3D.Context3DRenderMode;
import flash.events.ContextMenuEvent;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.net.URLRequest;
import flash.net.navigateToURL;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.ui.Keyboard;
import flash.ui.Mouse;
import flash.utils.setTimeout;
use namespace alternativa3d;
public class View extends Canvas {
private static var staticDevice:Device;
private static const mouse:Point = new Point();
private static const coords:Point = new Point();
private static const branch:Vector.<Object3D> = new Vector.<Object3D>();
private static const overedBranch:Vector.<Object3D> = new Vector.<Object3D>();
private static const changedBranch:Vector.<Object3D> = new Vector.<Object3D>();
private static const functions:Vector.<Function> = new Vector.<Function>();
private static var views:Vector.<View> = new Vector.<View>();
private static var configured:Boolean = false;
private static var cleared:Boolean = false;
private var presented:Boolean = false;
private var globalCoords:Point;
alternativa3d var rect:Rectangle;
alternativa3d var correction:Boolean = false;
alternativa3d var device:Device;
alternativa3d var quality:Boolean;
alternativa3d var constrained:Boolean;
alternativa3d var camera:Camera3D;
alternativa3d var _width:Number;
alternativa3d var _height:Number;
alternativa3d var canvas:Sprite;
private var lastEvent:MouseEvent;
private var target:Object3D;
private var pressedTarget:Object3D;
private var clickedTarget:Object3D;
private var overedTarget:Object3D;
private var altKey:Boolean;
private var ctrlKey:Boolean;
private var shiftKey:Boolean;
private var delta:int;
private var buttonDown:Boolean;
private var area:Sprite;
private var logo:Logo;
private var bitmap:Bitmap;
private var _logoAlign:String = "BR";
private var _logoHorizontalMargin:Number = 0;
private var _logoVerticalMargin:Number = 0;
public var enableErrorChecking:Boolean = false;
public var zBufferPrecision:int = 16;
public var antiAliasEnabled:Boolean = true;
public var offsetX:Number = 0;
public var offsetY:Number = 0;
public function View(param1:Number, param2:Number, param3:Boolean = false) {
var item:ContextMenuItem;
var menu:ContextMenu;
var width:Number = param1;
var height:Number = param2;
var constrainedMode:Boolean = param3;
this.alternativa3d::rect = new Rectangle();
this.alternativa3d::canvas = new Sprite();
super();
this.alternativa3d::_width = width;
this.alternativa3d::_height = height;
this.alternativa3d::constrained = constrainedMode;
mouseEnabled = true;
mouseChildren = true;
doubleClickEnabled = true;
buttonMode = true;
useHandCursor = false;
tabEnabled = false;
tabChildren = false;
item = new ContextMenuItem("Powered by Alternativa3D " + Alternativa3D.version);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,function(param1:ContextMenuEvent):void {
try {
navigateToURL(new URLRequest("http://alternativaplatform.com"),"_blank");
}
catch(e:Error) {
}
});
menu = new ContextMenu();
menu.customItems = [item];
contextMenu = menu;
this.area = new Sprite();
this.area.graphics.beginFill(16711680);
this.area.graphics.drawRect(0,0,width,height);
this.area.mouseEnabled = false;
this.area.visible = false;
hitArea = this.area;
super.addChild(hitArea);
this.alternativa3d::canvas.mouseEnabled = false;
super.addChild(this.alternativa3d::canvas);
this.showLogo();
addEventListener(Event.ADDED_TO_STAGE,this.onAddToStage);
}
private function onAddToStage(param1:Event) : void {
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
removeEventListener(Event.ADDED_TO_STAGE,this.onAddToStage);
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
if(staticDevice == null) {
staticDevice = new Device(stage,Context3DRenderMode.AUTO,this.alternativa3d::constrained ? "baselineConstrained" : "baseline");
}
views.push(this);
this.alternativa3d::device = staticDevice;
}
private function onRemoveFromStage(param1:Event) : void {
stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
addEventListener(Event.ADDED_TO_STAGE,this.onAddToStage);
removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
this.alternativa3d::canvas.graphics.clear();
var local2:int = int(views.indexOf(this));
while(local2 < views.length - 1) {
views[local2] = views[int(local2 + 1)];
local2++;
}
views.pop();
if(views.length == 0) {
staticDevice.dispose();
staticDevice = null;
}
this.alternativa3d::device = null;
}
private function onKeyDown(param1:KeyboardEvent) : void {
this.altKey = param1.altKey;
this.ctrlKey = param1.ctrlKey;
this.shiftKey = param1.shiftKey;
if(this.ctrlKey && this.shiftKey && param1.keyCode == Keyboard.F1 && this.bitmap == null) {
this.bitmap = new Bitmap(Logo.image);
this.bitmap.x = Math.round((this.alternativa3d::_width - this.bitmap.width) / 2);
this.bitmap.y = Math.round((this.alternativa3d::_height - this.bitmap.height) / 2);
super.addChild(this.bitmap);
setTimeout(this.removeBitmap,2048);
}
}
private function removeBitmap() : void {
if(this.bitmap != null) {
super.removeChild(this.bitmap);
this.bitmap = null;
}
}
private function onKeyUp(param1:KeyboardEvent) : void {
this.altKey = param1.altKey;
this.ctrlKey = param1.ctrlKey;
this.shiftKey = param1.shiftKey;
}
private function onMouse(param1:MouseEvent) : void {
this.altKey = param1.altKey;
this.ctrlKey = param1.ctrlKey;
this.shiftKey = param1.shiftKey;
this.buttonDown = param1.buttonDown;
this.delta = param1.delta;
this.lastEvent = param1;
}
private function onMouseDown(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_DOWN,this.target,this.branchToVector(this.target,branch));
}
this.pressedTarget = this.target;
this.target = null;
}
private function onMouseWheel(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_WHEEL,this.target,this.branchToVector(this.target,branch));
}
this.target = null;
}
private function onClick(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_UP,this.target,this.branchToVector(this.target,branch));
if(this.pressedTarget == this.target) {
this.clickedTarget = this.target;
this.propagateEvent(MouseEvent3D.CLICK,this.target,this.branchToVector(this.target,branch));
}
}
this.pressedTarget = null;
this.target = null;
}
private function onDoubleClick(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_UP,this.target,this.branchToVector(this.target,branch));
if(this.pressedTarget == this.target) {
this.propagateEvent(this.clickedTarget == this.target && this.target.doubleClickEnabled ? MouseEvent3D.DOUBLE_CLICK : MouseEvent3D.CLICK,this.target,this.branchToVector(this.target,branch));
}
}
this.clickedTarget = null;
this.pressedTarget = null;
this.target = null;
}
private function onMouseMove(param1:MouseEvent) : void {
this.onMouse(param1);
this.defineTarget(param1);
if(this.target != null) {
this.propagateEvent(MouseEvent3D.MOUSE_MOVE,this.target,this.branchToVector(this.target,branch));
}
if(this.overedTarget != this.target) {
this.processOverOut();
}
this.target = null;
}
private function onMouseOut(param1:MouseEvent) : void {
this.onMouse(param1);
this.lastEvent = null;
this.target = null;
if(this.overedTarget != this.target) {
this.processOverOut();
}
this.target = null;
}
alternativa3d function configure() : void {
var local3:Number = NaN;
var local4:Number = NaN;
var local5:Number = NaN;
var local6:Number = NaN;
var local7:int = 0;
var local8:View = null;
var local1:int = stage.quality == "LOW" ? 0 : (stage.quality == "MEDIUM" ? 2 : 4);
var local2:int = this.antiAliasEnabled && !this.alternativa3d::constrained ? local1 : 0;
this.alternativa3d::quality = local1 > 0;
if(!configured) {
local3 = 1000000;
local4 = 1000000;
local5 = -1000000;
local6 = -1000000;
local7 = 0;
while(local7 < views.length) {
local8 = views[local7];
coords.x = 0;
coords.y = 0;
local8.globalCoords = local8.localToGlobal(coords);
if(local8.globalCoords.x < local3) {
local3 = local8.globalCoords.x;
}
if(local8.globalCoords.y < local4) {
local4 = local8.globalCoords.y;
}
if(local8.globalCoords.x + local8.alternativa3d::_width > local5) {
local5 = local8.globalCoords.x + local8.alternativa3d::_width;
}
if(local8.globalCoords.y + local8.alternativa3d::_height > local6) {
local6 = local8.globalCoords.y + local8.alternativa3d::_height;
}
local7++;
}
this.alternativa3d::device.x = local3;
this.alternativa3d::device.y = local4;
this.alternativa3d::device.width = local5 - local3;
this.alternativa3d::device.height = local6 - local4;
this.alternativa3d::device.antiAlias = local2;
this.alternativa3d::device.enableDepthAndStencil = true;
this.alternativa3d::device.enableErrorChecking = this.enableErrorChecking;
configured = true;
}
if(this.globalCoords == null) {
this.globalCoords = localToGlobal(new Point(0,0));
}
this.alternativa3d::rect.x = int(this.globalCoords.x) - this.alternativa3d::device.x;
this.alternativa3d::rect.y = int(this.globalCoords.y) - this.alternativa3d::device.y;
this.alternativa3d::rect.width = int(this.alternativa3d::_width);
this.alternativa3d::rect.height = int(this.alternativa3d::_height);
this.alternativa3d::correction = false;
this.alternativa3d::canvas.x = this.alternativa3d::_width / 2;
this.alternativa3d::canvas.y = this.alternativa3d::_height / 2;
this.alternativa3d::canvas.graphics.clear();
}
alternativa3d function clearArea() : void {
if(!cleared) {
this.alternativa3d::device.clear((stage.color >> 16 & 0xFF) / 255,(stage.color >> 8 & 0xFF) / 255,(stage.color & 0xFF) / 255);
cleared = true;
} else {
this.alternativa3d::device.clear((stage.color >> 16 & 0xFF) / 255,(stage.color >> 8 & 0xFF) / 255,(stage.color & 0xFF) / 255,1,1,0,Context3DClearMask.DEPTH | Context3DClearMask.STENCIL);
}
if(this.alternativa3d::rect.x != 0 || this.alternativa3d::rect.y != 0 || this.alternativa3d::rect.width != this.alternativa3d::device.width || this.alternativa3d::rect.height != this.alternativa3d::device.height) {
this.alternativa3d::device.setScissorRectangle(this.alternativa3d::rect);
this.alternativa3d::correction = true;
}
}
alternativa3d function present() : void {
var local1:int = 0;
var local2:View = null;
this.presented = true;
this.alternativa3d::device.setScissorRectangle(null);
this.alternativa3d::correction = false;
local1 = 0;
while(local1 < views.length) {
local2 = views[local1];
if(!local2.presented) {
break;
}
local1++;
}
if(local1 == views.length) {
this.alternativa3d::device.present();
configured = false;
cleared = false;
local1 = 0;
while(local1 < views.length) {
local2 = views[local1];
local2.presented = false;
local1++;
}
}
}
alternativa3d function onRender(param1:Camera3D) : void {
}
private function processOverOut() : void {
var local3:int = 0;
var local4:int = 0;
var local5:int = 0;
var local6:Object3D = null;
this.branchToVector(this.target,branch);
this.branchToVector(this.overedTarget,overedBranch);
var local1:int = int(branch.length);
var local2:int = int(overedBranch.length);
if(this.overedTarget != null) {
this.propagateEvent(MouseEvent3D.MOUSE_OUT,this.overedTarget,overedBranch,true,this.target);
local3 = 0;
local4 = 0;
while(local4 < local2) {
local6 = overedBranch[local4];
local5 = 0;
while(local5 < local1) {
if(local6 == branch[local5]) {
break;
}
local5++;
}
if(local5 == local1) {
changedBranch[local3] = local6;
local3++;
}
local4++;
}
if(local3 > 0) {
changedBranch.length = local3;
this.propagateEvent(MouseEvent3D.ROLL_OUT,this.overedTarget,changedBranch,false,this.target);
}
}
if(this.target != null) {
local3 = 0;
local4 = 0;
while(local4 < local1) {
local6 = branch[local4];
local5 = 0;
while(local5 < local2) {
if(local6 == overedBranch[local5]) {
break;
}
local5++;
}
if(local5 == local2) {
changedBranch[local3] = local6;
local3++;
}
local4++;
}
if(local3 > 0) {
changedBranch.length = local3;
this.propagateEvent(MouseEvent3D.ROLL_OVER,this.target,changedBranch,false,this.overedTarget);
}
this.propagateEvent(MouseEvent3D.MOUSE_OVER,this.target,branch,true,this.overedTarget);
useHandCursor = this.target.useHandCursor;
} else {
useHandCursor = false;
}
Mouse.cursor = Mouse.cursor;
this.overedTarget = this.target;
}
private function branchToVector(param1:Object3D, param2:Vector.<Object3D>) : Vector.<Object3D> {
var local3:int = 0;
while(param1 != null) {
param2[local3] = param1;
local3++;
param1 = param1.alternativa3d::_parent;
}
param2.length = local3;
return param2;
}
private function propagateEvent(param1:String, param2:Object3D, param3:Vector.<Object3D>, param4:Boolean = true, param5:Object3D = null) : void {
var local7:Object3D = null;
var local8:Vector.<Function> = null;
var local9:int = 0;
var local10:int = 0;
var local11:int = 0;
var local12:MouseEvent3D = null;
var local6:int = int(param3.length);
local10 = local6 - 1;
while(local10 > 0) {
local7 = param3[local10];
if(local7.alternativa3d::captureListeners != null) {
local8 = local7.alternativa3d::captureListeners[param1];
if(local8 != null) {
if(local12 == null) {
local12 = new MouseEvent3D(param1,param4,param5,this.altKey,this.ctrlKey,this.shiftKey,this.buttonDown,this.delta);
local12.alternativa3d::_target = param2;
local12.alternativa3d::calculateLocalRay(mouseX,mouseY,param2,this.alternativa3d::camera);
}
local12.alternativa3d::_currentTarget = local7;
local12.alternativa3d::_eventPhase = 1;
local9 = int(local8.length);
local11 = 0;
while(local11 < local9) {
functions[local11] = local8[local11];
local11++;
}
local11 = 0;
while(local11 < local9) {
(functions[local11] as Function).call(null,local12);
if(local12.alternativa3d::stopImmediate) {
return;
}
local11++;
}
if(local12.alternativa3d::stop) {
return;
}
}
}
local10--;
}
local10 = 0;
while(local10 < local6) {
local7 = param3[local10];
if(local7.alternativa3d::bubbleListeners != null) {
local8 = local7.alternativa3d::bubbleListeners[param1];
if(local8 != null) {
if(local12 == null) {
local12 = new MouseEvent3D(param1,param4,param5,this.altKey,this.ctrlKey,this.shiftKey,this.buttonDown,this.delta);
local12.alternativa3d::_target = param2;
local12.alternativa3d::calculateLocalRay(mouseX,mouseY,param2,this.alternativa3d::camera);
}
local12.alternativa3d::_currentTarget = local7;
local12.alternativa3d::_eventPhase = local10 == 0 ? 2 : 3;
local9 = int(local8.length);
local11 = 0;
while(local11 < local9) {
functions[local11] = local8[local11];
local11++;
}
local11 = 0;
while(local11 < local9) {
(functions[local11] as Function).call(null,local12);
if(local12.alternativa3d::stopImmediate) {
return;
}
local11++;
}
if(local12.alternativa3d::stop) {
return;
}
}
}
local10++;
}
}
private function defineTarget(param1:MouseEvent) : void {
var local2:Object3D = null;
var local3:Object3D = null;
var local6:Canvas = null;
var local7:DisplayObject = null;
var local8:Object3D = null;
var local9:Object3D = null;
mouse.x = param1.localX;
mouse.y = param1.localY;
var local4:Array = stage != null ? stage.getObjectsUnderPoint(localToGlobal(mouse)) : super.getObjectsUnderPoint(mouse);
var local5:int = local4.length - 1;
while(local5 >= 0) {
local6 = null;
local7 = local4[local5];
while(local7.parent != stage) {
local6 = local7 as Canvas;
if(local6 != null) {
break;
}
local7 = local7.parent;
}
if(local6 != null) {
if(local3 != null) {
local8 = null;
local9 = local3;
while(local9 != null) {
if(local9 is Object3DContainer && !Object3DContainer(local9).mouseChildren) {
local8 = null;
}
if(local8 == null && local9.mouseEnabled) {
local8 = local9;
}
local9 = local9.alternativa3d::_parent;
}
if(local8 != null) {
if(this.target != null) {
local9 = local8;
while(local9 != null) {
if(local9 == this.target) {
local2 = local3;
this.target = local8;
break;
}
local9 = local9.alternativa3d::_parent;
}
} else {
local2 = local3;
this.target = local8;
}
if(local2 == this.target) {
break;
}
}
}
}
local5--;
}
}
override public function getObjectsUnderPoint(param1:Point) : Array {
return null;
}
public function showLogo() : void {
if(this.logo == null) {
this.logo = new Logo();
super.addChild(this.logo);
this.resizeLogo();
}
}
public function hideLogo() : void {
if(this.logo != null) {
super.removeChild(this.logo);
this.logo = null;
}
}
public function get logoAlign() : String {
return this._logoAlign;
}
public function set logoAlign(param1:String) : void {
this._logoAlign = param1;
this.resizeLogo();
}
public function get logoHorizontalMargin() : Number {
return this._logoHorizontalMargin;
}
public function set logoHorizontalMargin(param1:Number) : void {
this._logoHorizontalMargin = param1;
this.resizeLogo();
}
public function get logoVerticalMargin() : Number {
return this._logoVerticalMargin;
}
public function set logoVerticalMargin(param1:Number) : void {
this._logoVerticalMargin = param1;
this.resizeLogo();
}
private function resizeLogo() : void {
if(this.logo != null) {
if(this._logoAlign == StageAlign.TOP_LEFT || this._logoAlign == StageAlign.LEFT || this._logoAlign == StageAlign.BOTTOM_LEFT) {
this.logo.x = Math.round(this._logoHorizontalMargin);
}
if(this._logoAlign == StageAlign.TOP || this._logoAlign == StageAlign.BOTTOM) {
this.logo.x = Math.round((this.alternativa3d::_width - this.logo.width) / 2);
}
if(this._logoAlign == StageAlign.TOP_RIGHT || this._logoAlign == StageAlign.RIGHT || this._logoAlign == StageAlign.BOTTOM_RIGHT) {
this.logo.x = Math.round(this.alternativa3d::_width - this._logoHorizontalMargin - this.logo.width);
}
if(this._logoAlign == StageAlign.TOP_LEFT || this._logoAlign == StageAlign.TOP || this._logoAlign == StageAlign.TOP_RIGHT) {
this.logo.y = Math.round(this._logoVerticalMargin);
}
if(this._logoAlign == StageAlign.LEFT || this._logoAlign == StageAlign.RIGHT) {
this.logo.y = Math.round((this.alternativa3d::_height - this.logo.height) / 2);
}
if(this._logoAlign == StageAlign.BOTTOM_LEFT || this._logoAlign == StageAlign.BOTTOM || this._logoAlign == StageAlign.BOTTOM_RIGHT) {
this.logo.y = Math.round(this.alternativa3d::_height - this._logoVerticalMargin - this.logo.height);
}
}
}
public function clear() : void {
if(this.alternativa3d::device != null && this.alternativa3d::device.ready) {
this.alternativa3d::device.clear((stage.color >> 16 & 0xFF) / 255,(stage.color >> 8 & 0xFF) / 255,(stage.color & 0xFF) / 255);
}
this.alternativa3d::canvas.graphics.clear();
}
override public function get width() : Number {
return this.alternativa3d::_width;
}
override public function set width(param1:Number) : void {
this.alternativa3d::_width = param1;
this.area.width = param1;
this.resizeLogo();
}
override public function get height() : Number {
return this.alternativa3d::_height;
}
override public function set height(param1:Number) : void {
this.alternativa3d::_height = param1;
this.area.height = param1;
this.resizeLogo();
}
override public function addChild(param1:DisplayObject) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function removeChild(param1:DisplayObject) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function addChildAt(param1:DisplayObject, param2:int) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function removeChildAt(param1:int) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function getChildAt(param1:int) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function getChildIndex(param1:DisplayObject) : int {
throw new Error("Unsupported operation.");
}
override public function setChildIndex(param1:DisplayObject, param2:int) : void {
throw new Error("Unsupported operation.");
}
override public function swapChildren(param1:DisplayObject, param2:DisplayObject) : void {
throw new Error("Unsupported operation.");
}
override public function swapChildrenAt(param1:int, param2:int) : void {
throw new Error("Unsupported operation.");
}
override public function getChildByName(param1:String) : DisplayObject {
throw new Error("Unsupported operation.");
}
override public function get numChildren() : int {
return 0;
}
}
}
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.events.EventDispatcher;
import flash.events.MouseEvent;
import flash.geom.Matrix;
import flash.net.URLRequest;
import flash.net.navigateToURL;
class Logo extends Sprite {
public static const image:BitmapData = createBMP();
private var border:int = 5;
private var over:Boolean = false;
private var press:Boolean;
public function Logo() {
super();
graphics.beginFill(16711680,0);
graphics.drawRect(0,0,image.width + this.border + this.border,image.height + this.border + this.border);
graphics.drawRect(this.border,this.border,image.width,image.height);
graphics.beginBitmapFill(image,new Matrix(1,0,0,1,this.border,this.border),false,true);
graphics.drawRect(this.border,this.border,image.width,image.height);
tabEnabled = false;
buttonMode = true;
useHandCursor = true;
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
addEventListener(MouseEvent.CLICK,this.onClick);
addEventListener(MouseEvent.DOUBLE_CLICK,this.onDoubleClick);
addEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseMove);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseOut);
addEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel);
}
private static function createBMP() : BitmapData {
var local1:BitmapData = new BitmapData(103,22,true,0);
local1.setVector(local1.rect,Vector.<uint>([0,0,0,0,0,0,0,0,0,0,0,0,0,0,1040187392,2701131776,2499805184,738197504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,771751936,2533359616,4282199055,4288505883,4287716373,4280949511,2298478592,234881024,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1728053248,4279504646,4287917866,4294285341,4294478345,4294478346,4293626391,4285810708,4278387201,1291845632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,2516582400,4278190080,2516582400
,2516582400,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2197815296,4280753934,4291530288,4294412558,4294411013,4294411784,4294411784,4294411271,4294411790,4289816858,4279635461,1711276032,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,2516582400,4278190080,4294892416,4278190080,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080
,4294892416,4294892416,4294892416,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4294892416,4294892416,4294892416,4278190080,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2332033024,4283252258,4293301553,4294409478,4294409991,4294410761,4294476552,4294476296,4294410249,4294344200,4294343945,4291392799,4280752908,2030043136,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,2516582400,0,0,0,0,2516582400,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,0,4278190080
,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2281701376,4283186471,4293692972,4294276097,4294343176,4294409225,4294475017,4293554194,4293817874,4294408967,4294342921,4294342664,4294341895,4292640548,4281936662,2197815296,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4294892416,4294892416,4294892416,4278190080,4294892416,4278190080,2516582400,4278190080,4294892416,4278190080,4294892416,4294892416,4294892416,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2030043136,4282068512,4293561399,4294208769,4294210313,4294407689,4294210313,4290530057,4281734151,4282851341,4291913754,4294275848,4294275591
,4294275592,4294208517,4293164329,4282133785,2080374784,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,0,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,4294892416,4278190080,4294892416,4278190080,4278190080,4278190080,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1627389952,4280293393,4292577349,4294272769,4294208264,4294471177,4293617417,4286918406,4279502337,1912602624,2030043136,4280422919,4289945382,4294009867,4293875462,4293743369,4293610244,4292440624,4280950288,1761607680,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4294892416,4294892416,4294892416
,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,2516582400,4278190080,4294892416,4278190080,4278190080,4294892416,4294892416,4278190080,4278190080,4294892416,4294892416,4294892416,4278190080,4278190080,4294892416,4278190080,0,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,0,0,0,0,2516582400,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,4278190080,4294892416,4294892416,4294892416,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,788529152,4279044359,4291067728,4294075141,4294075143,4294338057,4293352968,4284490243,4278321408,1291845632,0,0,1476395008,4278781187,4288236848,4293610511,4293609221,4293610249,4293609989,4291261239,4279241478,1291845632,0,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,2516582400,4278190080
,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,2550136832,4287849288,4294009360,4293941509,4294007817,4293679113,4284620803,2852126720,822083584,0,0,0,0,989855744,2751463424,4288172857,4293610511,4293543429,4293543943,4293611019,4289621050,4278649858,620756992,0,0,0,0,0,0,0,4278190080,4294892416,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294892416,4294892416,4294892416,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,2030043136,4283380775,4294011945,4293873409,4293939977,4293808649,4285867012,4278649344,1090519040,0,0,0,0,0,0,939524096,4278255872,4288764223,4293609227,4293543175
,4293542917,4293677843,4287124784,2516582400,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,805306368,4279569674,4292243009,4293609217,4293676041,4293937929,4288687621,4279305216,1543503872,0,0,0,0,0,0,0,452984832,2214592512,4278781188,4290602054,4293410821,4293477384,4293476868,4293745950,4283773466,2181038080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2566914048,4287714107,4293543949,4293542919,4293673225,4291834377,4280879106,2080374784,0,0,0,0,0,0,0,1962934272,4279898124,4286467380,4278846980,4280686612,4292961598,4293343745,4293411081,4293476100,4292566822,4280357128,1140850688,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,0,0,2516582400,4278190080,2516582400,0,0,1207959552,4281539862,4293417771,4293343234,4293277193,4292947466,4284880134,2483027968,0,0,0,0,0,0,989855744,2751463424,4282917657,4291648314,4293346067,4288303409,2734686208,4284299053,4293479197,4293343493,4293409801,4293410569,4288759582,2902458368,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4294967295,4278190080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4278190080,4293141248,4293141248,4293141248,4278190080,2516582400,0,0,0,4278190080,4293141248,4278190080,0,0,2969567232,4289023795,4293211656,4293144328,4293143305,4290389514,4279108353,536870912,0,0,0,335544320,1543503872,2986344448,4281076999,4287967257,4293213977,4293078532,4293078275,4293412634,4284428061,2986344448,4289023285,4293277192,4293343240,4293277191
,4293412372,4282850829,1711276032,0,0,0,0,0,0,0,2516582400,4278190080,2516582400,0,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,4278190080,4278190080,4278190080,4278190080,2516582400,0,0,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,4294967295,4278190080,4278190080,2516582400,4278190080,2516582400,0,0,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,0,0,2516582400,4278190080,4278190080,4278190080,4293141248,4278190080,2516582400,4278190080,4278190080,4278190080,4293141248,4278190080,0,956301312,4281604366,4293149982,4293077253,4293078025,4292684810,4282912516,1979711488,1660944384,1778384896,2130706432,3204448256,4279371011,4283635982,4288752661,4292621844,4293078537,4293078022,4293078537,4293210121,4293144583,4290726433,4278518273,4280422668,4292691489,4293210117,4293276937,4293276680,4290592536,4278649601,134217728,0,0,0,0,0,2516582400,4278190080
,4294967295,4278190080,2516582400,0,4278190080,4294967295,4278190080,4294967295,4294967295,4278190080,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,2516582400,4278190080,4294967295,4278190080,4294967295,4294967295,4294967295,4294967295,4278190080,2516582400,0,2516582400,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,0,0,0,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,2516582400,0,0,4278190080,4293141248,4293141248,4278190080,2516582400,4278190080,4293141248,4293141248,4293141248,4293141248,4278190080,0,2717908992,4287903514,4293078538,4293078280,4293143817,4290652684,4281666563,4281797635,4283831561,4284292110,4285670934,4289475868,4291769878,4293079566,4293078281,4293078023,4293078280,4293209609,4293275145,4292357130,4287900432,4280290309,1728053248,2432696320,4286854178,4293145355,4293144584,4293144328,4293212431,4283636492,1610612736,0,0,0,0,2516582400
,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,0,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,0,2516582400,4278190080,4278190080,4293141248,4278190080,4293141248,4278190080,4278190080,4278190080,4278190080,2516582400,520093696,4280027652,4292426772,4293078279,4293079049,4293144329,4292751115,4292555019,4292948491,4293079819,4293146126,4293211917,4293210888,4293145095,4293210632,4293144841,4293210633,4293275913,4292685578,4288618760,4282584324,2969567232,1207959552,0,671088640,4279896839,4292362526,4293078022
,4293078793,4293078536,4290065172,4278780673,167772160,0,0,2516582400,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4294967295,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4294967295,4278190080,2516582400,0,0,4278190080,4293141248,4278190080,4293141248,4278190080,0,4278190080,4293141248,4278190080,1811939328,4284620297,4293211403,4293210888,4293211145,4293276937,4293277193,4293277961,4293344265,4293410056,4293344776,4293344776,4293345033,4293410569,4293475848,4293344265,4292819211,4289276169,4283437573,4278714880,1828716544
,0,0,0,0,2516582400,4287181084,4293078538,4293078025,4293143560,4293211664,4283110665,1409286144,0,0,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4278190080,4278190080,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4278190080,4278190080,4278190080,4293141248,4278190080,4293141248,4278190080,4278190080,4278190080,4293141248,4278190080,3087007744,4289148172,4293345035,4293345034,4293411080,4293476870,4293477893,4293544453,4293611013,4293677063,4293677833,4293677833,4293612298,4293218572,4292102669,4287771145
,4282651909,4278714880,1912602624,218103808,0,0,0,0,0,771751936,4280880904,4292621585,4293143048,4292685067,4290916111,4284160266,1811939328,0,0,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4278190080,4294967295,4278190080,4294967295,4278190080,4278190080,4294967295,4294967295,4294967295,4278190080,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,0,4278190080,4294967295,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4294967295,4278190080,4294967295,4278190080,0,2516582400,4278190080,4294967295,4278190080,2516582400,4278190080,4294967295,4294967295,4294967295,4278190080,2516582400,4278190080,4294967295,4278190080,4293141248,4293141248,4293141248,4278190080,2516582400,4278190080,4293141248,4293141248,4293141248,4278190080,2516582400,1325400064,4280618243,4284819723,4287709972,4289877530,4293028892,4293948702,4293883680,4293818144,4292045341,4289484568,4288433169,4286856717
,4282916870,4279831042,3036676096,1526726656,184549376,0,0,0,0,0,0,0,0,3305111552,4289014285,4288159495,4283372037,4279370753,2164260864,50331648,0,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,2516582400,2516582400,4278190080,2516582400,4278190080,2516582400,2516582400,4278190080,4278190080,4278190080,2516582400,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,2516582400,4278190080,2516582400,4278190080,2516582400,0,0,2516582400,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,2516582400,4278190080,4278190080,4278190080,2516582400,0,2516582400,4278190080,4278190080,4278190080,2516582400,0,0,671088640,1828716544,2600468480,3170893824,4026531840,4261412864,4261412864,4261412864,3808428032,3170893824,2969567232,2667577344,1526726656,553648128,0,0,0,0,0,0,0,0,0,0,0,1543503872,3305111552
,3120562176,1811939328,385875968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]));
return local1;
}
private function onMouseDown(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onClick(param1:MouseEvent) : void {
param1.stopPropagation();
try {
navigateToURL(new URLRequest("http://alternativaplatform.com"),"_blank");
}
catch(e:Error) {
}
}
private function onDoubleClick(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onMouseMove(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onMouseOut(param1:MouseEvent) : void {
param1.stopPropagation();
}
private function onMouseWheel(param1:MouseEvent) : void {
param1.stopPropagation();
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangIconNormal_p8 extends BitmapAsset
{
public function RangIconNormal_p8()
{
super();
}
}
}
|
package utils {
import alternativa.osgi.service.command.FormattedOutput;
import alternativa.osgi.service.display.IDisplay;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.ui.Keyboard;
import flash.utils.clearInterval;
import flash.utils.setInterval;
public class GUIDebugger {
[Inject]
public static var display:IDisplay;
private static var isGuiDebugEnabled:Boolean = false;
private static var isAutoClickEnabled:Boolean = false;
private static var clickId:int = -1;
private static var bounds:Sprite = new Sprite();
private static var object:DisplayObject = null;
private static var visibleStack:Vector.<DisplayObject> = new Vector.<DisplayObject>();
private static var parentStack:Vector.<DisplayObject> = new Vector.<DisplayObject>();
public function GUIDebugger() {
super();
}
public static function debug(param1:FormattedOutput) : void {
isGuiDebugEnabled = !isGuiDebugEnabled;
if(isGuiDebugEnabled) {
display.stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMove);
display.stage.addChild(bounds);
display.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDown);
} else {
display.stage.removeEventListener(MouseEvent.MOUSE_MOVE,mouseMove);
display.stage.removeEventListener(KeyboardEvent.KEY_DOWN,keyDown);
display.stage.removeChild(bounds);
}
if(param1 != null) {
param1.addText(" GUI DEBUG: " + (isGuiDebugEnabled ? "enabled" : "disabled"));
}
}
public static function autoClick(param1:FormattedOutput) : void {
isAutoClickEnabled = !isAutoClickEnabled;
if(isAutoClickEnabled) {
display.stage.focus = display.stage;
display.stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveForClickHandler);
display.stage.addEventListener(KeyboardEvent.KEY_DOWN,onKeyDown);
display.stage.addEventListener(KeyboardEvent.KEY_UP,onKeyUp);
} else {
if(clickId != -1) {
clearInterval(clickId);
}
display.stage.removeEventListener(KeyboardEvent.KEY_DOWN,onKeyDown);
display.stage.removeEventListener(KeyboardEvent.KEY_UP,onKeyUp);
display.stage.removeEventListener(MouseEvent.MOUSE_MOVE,mouseMoveForClickHandler);
}
if(param1 != null) {
param1.addText(" AutoClick: " + (isAutoClickEnabled ? "enabled" : "disabled"));
}
}
private static function mouseMoveForClickHandler(param1:MouseEvent) : void {
if(param1.target != display.stage) {
object = param1.target as DisplayObject;
}
}
private static function mouseMove(param1:MouseEvent) : void {
if(param1.target != display.stage) {
if(parentStack.length > 0) {
parentStack = new Vector.<DisplayObject>();
}
drawBounds(param1.target as DisplayObject);
}
}
private static function drawBounds(param1:DisplayObject) : void {
object = param1;
var local2:Point = object.localToGlobal(new Point(0,0));
var local3:Rectangle = new Rectangle(local2.x,local2.y,object.width,object.height);
bounds.mouseEnabled = false;
bounds.graphics.clear();
bounds.graphics.beginFill(11149858,0.6);
bounds.graphics.drawRect(local3.x,local3.y,local3.width,local3.height);
bounds.graphics.endFill();
bounds.removeChildren();
createTextFields(object);
}
private static function onKeyDown(param1:KeyboardEvent) : void {
if(param1.keyCode == Keyboard.G) {
if(clickId != -1) {
clearInterval(clickId);
}
clickId = setInterval(doClick,5);
}
}
private static function onKeyUp(param1:KeyboardEvent) : void {
if(param1.keyCode == Keyboard.G) {
if(clickId != -1) {
clearInterval(clickId);
}
}
}
private static function doClick() : void {
if(object == null) {
return;
}
var local1:MouseEvent = new MouseEvent(MouseEvent.CLICK);
setPosition(local1,object.mouseX,object.mouseY);
object.dispatchEvent(local1);
}
private static function setPosition(param1:MouseEvent, param2:int, param3:int) : void {
param1.localX = param2;
param1.localY = param3;
}
private static function keyDown(param1:KeyboardEvent) : void {
var local2:DisplayObject = null;
var local3:String = null;
if(param1.keyCode == Keyboard.DOWN) {
if(visibleStack.length > 0) {
object = visibleStack.pop();
}
}
if(object == null) {
return;
}
switch(param1.keyCode) {
case Keyboard.PAGE_UP:
if(parentStack.length > 0) {
object = parentStack.pop();
}
break;
case Keyboard.PAGE_DOWN:
if(object.parent != null) {
parentStack.push(object);
object = object.parent;
}
break;
case Keyboard.P:
local2 = object;
local3 = "object";
while(local2 != null) {
local3 += ".parent";
local2 = local2.parent;
}
break;
case Keyboard.SPACE:
break;
case Keyboard.EQUAL:
object.visible = false;
visibleStack.push(object);
break;
case Keyboard.MINUS:
object.visible = true;
break;
case Keyboard.DOWN:
object.y += 1;
break;
case Keyboard.UP:
object.y -= 1;
break;
case Keyboard.LEFT:
object.x -= 1;
break;
case Keyboard.RIGHT:
object.x += 1;
break;
case Keyboard.NUMPAD_4:
object.width -= 1;
break;
case Keyboard.NUMPAD_6:
object.width += 1;
break;
case Keyboard.NUMPAD_8:
object.height -= 1;
break;
case Keyboard.NUMPAD_2:
object.height += 1;
break;
case Keyboard.ESCAPE:
debug(null);
}
drawBounds(object);
}
private static function createTextFields(param1:DisplayObject) : void {
var local3:TextField = null;
var local2:Point = param1.localToGlobal(new Point(0,0));
local3 = new TextField();
local3.mouseEnabled = false;
local3.autoSize = TextFieldAutoSize.LEFT;
local3.selectable = false;
local3.textColor = 16776960;
local3.text = "(" + local2.x.toString() + ", " + local2.y.toString() + ")";
local3.x = local2.x - local3.width / 2;
local3.y = local2.y - local3.height / 2;
bounds.addChild(local3);
local3 = new TextField();
local3.mouseEnabled = false;
local3.autoSize = TextFieldAutoSize.LEFT;
local3.selectable = false;
local3.textColor = 16776960;
local3.text = "(" + (local2.x + param1.width).toString() + ", " + (local2.y + param1.height).toString() + ")";
local3.x = local2.x + param1.width - local3.width / 2;
local3.y = local2.y + param1.height - local3.height / 2;
bounds.addChild(local3);
local3 = new TextField();
local3.mouseEnabled = false;
local3.autoSize = TextFieldAutoSize.LEFT;
local3.selectable = false;
local3.textColor = 16776960;
local3.text = param1.width.toString() + " x " + param1.height.toString();
local3.x = local2.x + param1.width / 2 - local3.width / 2;
local3.y = local2.y + param1.height / 2 - local3.height / 2;
bounds.addChild(local3);
}
}
}
|
package projects.tanks.client.battlefield.models.battle.pointbased.assault {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class AssaultModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function AssaultModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.model.gpu {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class GPUDetectorEvents implements GPUDetector {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function GPUDetectorEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function detectGPUCapabilities() : void {
var i:int = 0;
var m:GPUDetector = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = GPUDetector(this.impl[i]);
m.detectGPUCapabilities();
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package projects.tanks.client.panel.model.quest.notifier {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class QuestNotifierModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:QuestNotifierModelServer;
private var client:IQuestNotifierModelBase = IQuestNotifierModelBase(this);
private var modelId:Long = Long.getLong(2083723058,-1617932508);
private var _completedDailyQuestId:Long = Long.getLong(1649960148,-282513245);
private var _completedWeeklyQuestsId:Long = Long.getLong(881910911,183376780);
private var _newInDailyQuestsId:Long = Long.getLong(68721805,897135658);
private var _newInWeeklyQuestsId:Long = Long.getLong(2017235952,945739610);
public function QuestNotifierModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new QuestNotifierModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(QuestNotifierCC,false)));
}
protected function getInitParam() : QuestNotifierCC {
return QuestNotifierCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._completedDailyQuestId:
this.client.completedDailyQuest();
break;
case this._completedWeeklyQuestsId:
this.client.completedWeeklyQuests();
break;
case this._newInDailyQuestsId:
this.client.newInDailyQuests();
break;
case this._newInWeeklyQuestsId:
this.client.newInWeeklyQuests();
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.gui.error {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.error.ErrorForm_IconImage.png")]
public class ErrorForm_IconImage extends BitmapAsset {
public function ErrorForm_IconImage() {
super();
}
}
}
|
package projects.tanks.client.commons.models.runtime {
import alternativa.types.Long;
public class DataOwnerCC {
private var _dataOwnerId:Long;
public function DataOwnerCC(param1:Long = null) {
super();
this._dataOwnerId = param1;
}
public function get dataOwnerId() : Long {
return this._dataOwnerId;
}
public function set dataOwnerId(param1:Long) : void {
this._dataOwnerId = param1;
}
public function toString() : String {
var local1:String = "DataOwnerCC [";
local1 += "dataOwnerId = " + this.dataOwnerId + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.gui.device {
import alternativa.tanks.gui.confirm.ConfirmAlertEvent;
import alternativa.tanks.gui.confirm.DeviceConfirmAlert;
import alternativa.tanks.model.item.device.ItemDevicesGarage;
import alternativa.tanks.service.delaymountcategory.IDelayMountCategoryService;
import alternativa.tanks.service.device.DeviceService;
import alternativa.tanks.service.device.UpdateDevicesEvent;
import alternativa.tanks.service.item.ItemService;
import alternativa.tanks.service.money.IMoneyService;
import flash.events.Event;
import flash.events.MouseEvent;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.flash.commons.services.payment.PaymentDisplayService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService;
public class DeviceController {
[Inject]
public static var delayMountCategoryService:IDelayMountCategoryService;
[Inject]
public static var itemService:ItemService;
[Inject]
public static var lobbyLayoutService:ILobbyLayoutService;
[Inject]
public static var deviceService:DeviceService;
[Inject]
public static var moneyService:IMoneyService;
[Inject]
public static var paymentDisplayService:PaymentDisplayService;
private var devicePanels:Vector.<DevicePanel>;
private var targetItem:IGameObject;
private var deviceForPurchase:IGameObject;
public function DeviceController(param1:Vector.<DevicePanel>, param2:IGameObject) {
var local3:DevicePanel = null;
super();
this.devicePanels = param1;
this.targetItem = param2;
for each(local3 in param1) {
local3.buyButton.addEventListener(MouseEvent.CLICK,this.buyButtonClick);
local3.mountButton.addEventListener(MouseEvent.CLICK,this.mountButtonClick);
}
deviceService.addEventListener(UpdateDevicesEvent.EVENT,this.onDevicesUpdate);
this.updateDevicePanels();
}
private function onDevicesUpdate(param1:UpdateDevicesEvent) : void {
this.updateDevicePanels();
}
private function mountButtonClick(param1:MouseEvent) : void {
var local2:IGameObject = DevicePanel(param1.target.parent).device;
var local3:ItemDevicesGarage = ItemDevicesGarage(this.targetItem.adapt(ItemDevicesGarage));
if(local2 != null) {
local3.insertDevice(local2);
} else {
local3.removeDevice();
}
this.updateDevicePanels();
}
private function buyButtonClick(param1:MouseEvent) : void {
var local4:DeviceConfirmAlert = null;
var local2:IGameObject = DevicePanel(param1.target.parent).device;
var local3:int = int(itemService.getPrice(local2));
if(moneyService.checkEnough(local3)) {
this.deviceForPurchase = local2;
local4 = new DeviceConfirmAlert(local2,local3);
local4.addEventListener(ConfirmAlertEvent.BUY_ITEM,this.onPurchaseConfirmed);
local4.addEventListener(Event.CANCEL,this.onPurchaseCanceled);
}
}
private function onPurchaseConfirmed(param1:ConfirmAlertEvent) : void {
var local2:ItemDevicesGarage = ItemDevicesGarage(this.targetItem.adapt(ItemDevicesGarage));
var local3:int = int(itemService.getPrice(this.deviceForPurchase));
moneyService.spend(local3);
local2.buyDevice(this.deviceForPurchase,local3);
this.removeDeviceConfirmAlertListeners(DeviceConfirmAlert(param1.target));
this.updateDevicePanels();
}
private function onPurchaseCanceled(param1:Event) : void {
this.removeDeviceConfirmAlertListeners(DeviceConfirmAlert(param1.target));
}
private function removeDeviceConfirmAlertListeners(param1:DeviceConfirmAlert) : void {
param1.removeEventListener(ConfirmAlertEvent.BUY_ITEM,this.onPurchaseConfirmed);
param1.removeEventListener(Event.CANCEL,this.onPurchaseCanceled);
}
public function updateDevicePanels() : void {
var local2:DevicePanel = null;
var local1:IGameObject = deviceService.getInsertedDevice(this.targetItem);
for each(local2 in this.devicePanels) {
local2.updatePanel(local2.device == local1);
}
}
public function destroy() : void {
var local1:DevicePanel = null;
deviceService.removeEventListener(UpdateDevicesEvent.EVENT,this.onDevicesUpdate);
for each(local1 in this.devicePanels) {
local1.buyButton.removeEventListener(MouseEvent.CLICK,this.buyButtonClick);
local1.mountButton.removeEventListener(MouseEvent.CLICK,this.mountButtonClick);
}
}
}
}
|
package {
import flash.display.Sprite;
import flash.system.Security;
[ExcludeClass]
public class _238f222210817333033b35aa737ba8de257d4df23609f40b2472357f35e07d6c_flash_display_Sprite extends Sprite {
public function _238f222210817333033b35aa737ba8de257d4df23609f40b2472357f35e07d6c_flash_display_Sprite() {
super();
}
public function allowDomainInRSL(... rest) : void {
Security.allowDomain.apply(null,rest);
}
public function allowInsecureDomainInRSL(... rest) : void {
Security.allowInsecureDomain.apply(null,rest);
}
}
}
|
package projects.tanks.client.battlefield.models.ultimate.effects.titan.generator {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class TitanUltimateGeneratorModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function TitanUltimateGeneratorModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.client.clans.clan.clanmembersdata {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class ClanMembersDataModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ClanMembersDataModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.servermodels.changeuid {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.service.IEntranceClientFacade;
import projects.tanks.client.entrance.model.entrance.changeuid.ChangeUidModelBase;
import projects.tanks.client.entrance.model.entrance.changeuid.IChangeUidModelBase;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.AlertServiceEvent;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.IAlertService;
import services.alertservice.AlertAnswer;
[ModelInfo]
public class ChangeUidModel extends ChangeUidModelBase implements IChangeUidModelBase, IChangeUid {
[Inject]
public static var alertService:IAlertService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var clientFacade:IEntranceClientFacade;
private var changeUidHash:String;
private var email:String;
private var newUid:String;
public function ChangeUidModel() {
super();
}
public function checkChangeUidHash(param1:String, param2:String) : void {
this.changeUidHash = param1;
this.email = param2;
server.checkChangeUidParams(param1,param2);
}
public function changeUidAndPassword(param1:String, param2:String) : void {
this.newUid = param1;
if(param2.length > 0) {
server.changeUidAndPassword(this.email,this.changeUidHash,param1,param2);
} else {
server.changeUid(this.email,this.changeUidHash,param1);
}
}
public function changeUid(param1:String) : void {
server.changeUidViaPartner(param1);
}
public function startChangingUid() : void {
clientFacade.goToChangeUidAndPasswordForm();
}
public function startChangingUidViaPartner() : void {
clientFacade.goToChangeUidForm();
}
public function passwordIncorrect() : void {
clientFacade.changeUidFailedPasswordIsIncorrect();
}
public function uidIncorrect() : void {
clientFacade.callsignIsIncorrect();
}
public function parametersIncorrect() : void {
alertService.showAlert(localeService.getText(TanksLocale.TEXT_LINK_IS_NO_LONGER_VALID_TEXT),Vector.<String>([localeService.getText(AlertAnswer.OK)]));
alertService.addEventListener(AlertServiceEvent.ALERT_BUTTON_PRESSED,this.onAlertButtonPressed);
}
private function onAlertButtonPressed(param1:AlertServiceEvent) : void {
alertService.removeEventListener(AlertServiceEvent.ALERT_BUTTON_PRESSED,this.onAlertButtonPressed);
if(param1.typeButton == localeService.getText(AlertAnswer.OK)) {
clientFacade.goToLoginForm();
}
}
public function uidChanged() : void {
clientFacade.uidChangedSuccessfully(this.newUid);
}
}
}
|
package alternativa.tanks.models.weapon.common {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.type.IGameObject;
public class WeaponSoundAdapt implements WeaponSound {
private var object:IGameObject;
private var impl:WeaponSound;
public function WeaponSoundAdapt(param1:IGameObject, param2:WeaponSound) {
super();
this.object = param1;
this.impl = param2;
}
public function getTurretRotationSound() : SoundResource {
var result:SoundResource = null;
try {
Model.object = this.object;
result = this.impl.getTurretRotationSound();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.battle.assault {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.BattleEventSupport;
import alternativa.tanks.battle.events.BattleRestartEvent;
import alternativa.tanks.battle.events.TankAddedToBattleEvent;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.battle.battlefield.BattleModel;
import alternativa.tanks.models.battle.battlefield.BattleType;
import alternativa.tanks.models.battle.commonflag.CommonFlag;
import alternativa.tanks.models.battle.commonflag.Flag;
import alternativa.tanks.models.battle.commonflag.FlagNotification;
import alternativa.tanks.models.battle.commonflag.ICommonFlagModeModel;
import alternativa.tanks.models.battle.commonflag.IFlagModeInitilizer;
import alternativa.tanks.models.battle.commonflag.MarkersUtils;
import alternativa.tanks.models.battle.ctf.FlagMessage;
import alternativa.tanks.models.battle.gui.BattlefieldGUI;
import alternativa.tanks.models.battle.gui.gui.statistics.messages.UserAction;
import alternativa.tanks.models.battle.gui.markers.PointHudIndicator;
import alternativa.tanks.services.lightingeffects.ILightingEffectsService;
import alternativa.utils.TextureMaterialRegistry;
import flash.media.Sound;
import flash.utils.Dictionary;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectLoadPostListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.battle.pointbased.ClientTeamPoint;
import projects.tanks.client.battlefield.models.battle.pointbased.assault.AssaultCC;
import projects.tanks.client.battlefield.models.battle.pointbased.assault.AssaultModelBase;
import projects.tanks.client.battlefield.models.battle.pointbased.assault.AssaultSoundFX;
import projects.tanks.client.battlefield.models.battle.pointbased.assault.IAssaultModelBase;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.ClientFlag;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.FlagState;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
import projects.tanks.clients.fp10.libraries.tanksservices.service.battle.IBattleInfoService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
[ModelInfo]
public class AssaultModel extends AssaultModelBase implements IAssaultModelBase, IFlagModeInitilizer, FlagNotification, ObjectLoadListener, ObjectLoadPostListener, ObjectUnloadListener, BattleModel {
[Inject]
public static var battleService:BattleService;
[Inject]
public static var battleInfoService:IBattleInfoService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var lightingEffectsService:ILightingEffectsService;
[Inject]
public static var materialRegistry:TextureMaterialRegistry;
[Inject]
public static var battleEventDispatcher:BattleEventDispatcher;
[Inject]
public static var userPropertiesService:IUserPropertiesService;
private var guiModel:BattlefieldGUI;
private var flagReturnSound:Sound;
private var flagTakeSound:Sound;
private var winSound:Sound;
private var flagLostSound:Sound;
private var flagHudIndicators:AssaultHudIndicators;
private var messages:AssaultMessages = new AssaultMessages();
private var battleEventSupport:BattleEventSupport;
private var flags:Vector.<Flag> = new Vector.<Flag>();
public function AssaultModel() {
super();
this.battleEventSupport = new BattleEventSupport(battleEventDispatcher);
this.battleEventSupport.addEventHandler(TankAddedToBattleEvent,this.onTankAddedToBattle);
this.battleEventSupport.addEventHandler(BattleRestartEvent,this.onBattleRestart);
}
public function getBattleType() : BattleType {
return BattleType.AS;
}
public function objectLoaded() : void {
this.guiModel = BattlefieldGUI(object.adapt(BattlefieldGUI));
var local1:AssaultSoundFX = getInitParam().sounds;
this.flagReturnSound = local1.flagReturnSound.sound;
this.flagTakeSound = local1.flagTakeSound.sound;
this.winSound = local1.winSound.sound;
this.flagLostSound = local1.flagDropSound.sound;
}
public function objectLoadedPost() : void {
this.battleEventSupport.activateHandlers();
}
public function objectUnloaded() : void {
this.battleEventSupport.deactivateHandlers();
}
public function init(param1:Vector.<ClientFlag>, param2:Vector.<ClientTeamPoint>) : void {
var local6:ClientTeamPoint = null;
var local7:ClientFlag = null;
var local8:Flag = null;
var local9:Flag = null;
var local10:Object3D = null;
var local3:ICommonFlagModeModel = ICommonFlagModeModel(object.adapt(ICommonFlagModeModel));
var local4:Dictionary = new Dictionary();
var local5:AssaultCC = getInitParam();
this.flagHudIndicators = new AssaultHudIndicators();
for each(local6 in param2) {
if(local6.id >= 0) {
local4[local6.id] = local6.flagBasePosition;
}
}
for each(local7 in param1) {
local9 = new Flag(local7.flagId,local4[local7.flagId],BattleTeam.RED,local5.flagSprite);
this.flags.push(local9);
local3.initFlag(local9,local7);
this.flagHudIndicators.addRedFlag(local7.flagId,local9);
}
for each(local6 in param2) {
if(local6.id < 0) {
local3.createBasePoint(local6,local5.pointPedestalModel);
MarkersUtils.createMarkers(BattleTeam.BLUE,local5.pointSmallMarker.data,local5.pointBigMarker.data,new IndicatorStateAdapter(Vector3.fromVector3d(local6.flagBasePosition)),true);
} else {
local10 = local3.createBasePoint(local6,local5.flagPedestalModel);
this.flagHudIndicators.addRedBase(local6.id,local10);
}
}
battleService.getBattleScene3D().addRenderer(this.flagHudIndicators);
for each(local8 in this.flags) {
this.flagHudIndicators.setFlagState(local8.id,local8.state == FlagState.CARRIED ? PointHudIndicator.STATE_CARRIED : PointHudIndicator.STATE_DEFAULT);
}
if(battleInfoService.isSpectatorMode()) {
this.flagHudIndicators.setLocalTeam(BattleTeam.NONE);
}
}
private function onTankAddedToBattle(param1:TankAddedToBattleEvent) : void {
var local2:BattleTeam = null;
var local3:Flag = null;
if(param1.isLocal) {
local2 = param1.tank.teamType;
this.flagHudIndicators.setLocalTeam(local2);
for each(local3 in this.flags) {
local3.hideIndicatorOnBase = local2 == BattleTeam.BLUE;
}
}
}
private function onBattleRestart(param1:BattleRestartEvent) : void {
var local2:Flag = null;
for each(local2 in this.flags) {
this.flagHudIndicators.setFlagState(local2.id,PointHudIndicator.STATE_DEFAULT);
}
}
public function guiShowFlagDropped(param1:CommonFlag) : void {
this.guiModel.showUserBattleLogMessage(param1.carrierId,UserAction.ASL_RED_PLAYER_DROP_FLAG);
}
public function guiShowFlagCarried(param1:CommonFlag) : void {
}
public function guiShowFlagAtBase(param1:CommonFlag) : void {
}
public function notifyFlagTaken(param1:CommonFlag, param2:Tank) : void {
battleService.soundManager.playSound(this.flagTakeSound);
this.flagHudIndicators.setFlagState(param1.id,PointHudIndicator.STATE_CARRIED);
this.guiModel.showUserBattleLogMessage(param2.getUser().id,UserAction.ASL_RED_PLAYER_PICK_FLAG);
}
public function notifyFlagReturned(param1:CommonFlag, param2:IGameObject) : void {
battleService.soundManager.playSound(this.flagReturnSound);
this.flagHudIndicators.setFlagState(param1.id,PointHudIndicator.STATE_DEFAULT);
}
public function notifyFlagDropped(param1:CommonFlag) : void {
battleService.soundManager.playSound(this.flagLostSound);
if(param1.carrier == null) {
this.guiModel.showBattleLogMessage(UserAction.ASL_RED_PLAYER_DROP_FLAG);
} else {
this.guiModel.showUserBattleLogMessage(param1.carrierId,UserAction.ASL_RED_PLAYER_DROP_FLAG);
}
}
public function notifyFlagDelivered(param1:CommonFlag, param2:Tank) : void {
var local3:Tank = ICommonFlagModeModel(object.adapt(ICommonFlagModeModel)).getLocalTank();
var local4:FlagMessage = this.messages.getMessage(Boolean(local3) ? local3.teamType : null);
this.guiModel.showBattleMessage(local4.color,local4.text);
this.guiModel.showUserBattleLogMessage(param2.getUser().id,UserAction.ASL_RED_PLAYER_DELIVER_FLAG);
battleService.soundManager.playSound(this.winSound);
this.flagHudIndicators.setFlagState(param1.id,PointHudIndicator.STATE_DEFAULT);
}
public function notifyFlagFacedOff(param1:CommonFlag) : void {
}
public function notifyReadyToFaceOff() : void {
}
public function notifyFlagThrown(param1:CommonFlag) : void {
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.bonus.battle.bonusregions {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.bonus.battle.bonusregions.BonusRegionResource;
public class VectorCodecBonusRegionResourceLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecBonusRegionResourceLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(BonusRegionResource,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = int(LengthCodecHelper.decodeLength(param1));
var local3:Vector.<BonusRegionResource> = new Vector.<BonusRegionResource>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = BonusRegionResource(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:BonusRegionResource = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<BonusRegionResource> = Vector.<BonusRegionResource>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.tank {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import projects.tanks.client.battlefield.models.user.tank.TankLogicState;
public class VectorCodecTankLogicStateLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTankLogicStateLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(TankLogicState,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = int(LengthCodecHelper.decodeLength(param1));
var local3:Vector.<TankLogicState> = new Vector.<TankLogicState>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TankLogicState(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TankLogicState = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TankLogicState> = Vector.<TankLogicState>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.display.usertitle {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.display.usertitle.ProgressBarSkin_barShadowLeftCls.png")]
public class ProgressBarSkin_barShadowLeftCls extends BitmapAsset {
public function ProgressBarSkin_barShadowLeftCls() {
super();
}
}
}
|
package alternativa.init
{
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.osgi.service.dump.IDumpService;
import alternativa.service.IModelService;
import alternativa.tanks.model.antiaddiction.AntiAddictionAlertModel;
import alternativa.tanks.model.banner.BannerModel;
import alternativa.tanks.model.bonus.BonusModel;
import alternativa.tanks.model.challenge.ChallengeModel;
import alternativa.tanks.model.challenge.IChallenge;
import alternativa.tanks.model.entrancealert.EntranceAlertModel;
import alternativa.tanks.model.gift.server.GiftServerModel;
import alternativa.tanks.model.gift.server.IGiftServerModel;
import alternativa.tanks.model.news.INewsModel;
import alternativa.tanks.model.news.NewsModel;
import alternativa.tanks.model.panel.CapabilitiesDumper;
import alternativa.tanks.model.panel.IBattleSettings;
import alternativa.tanks.model.panel.PanelModel;
import alternativa.tanks.model.payment.PaymentModel;
import alternativa.tanks.model.referals.ReferalsModel;
import alternativa.tanks.model.user.UserDataModel;
public class PanelModelActivator implements IBundleActivator
{
public static var osgi:OSGi;
private var panelModel:PanelModel;
private var userDataModel:UserDataModel;
private var paymentModel:PaymentModel;
private var bonusModel:BonusModel;
private var bannerModel:BannerModel;
private var referalsModel:ReferalsModel;
private var antiAddictionModel:AntiAddictionAlertModel;
private var entranceAlertModel:EntranceAlertModel;
private var newsModel:NewsModel;
private var questsModel:ChallengeModel;
private var giftsModel:GiftServerModel;
private var capabilitiesDumper:CapabilitiesDumper;
public function PanelModelActivator()
{
super();
}
public function start(osgi:OSGi) : void
{
PanelModelActivator.osgi = osgi;
var modelRegister:IModelService = IModelService(osgi.getService(IModelService));
this.panelModel = new PanelModel();
modelRegister.add(this.panelModel);
osgi.registerService(IBattleSettings,this.panelModel);
this.userDataModel = new UserDataModel();
modelRegister.add(this.userDataModel);
this.bonusModel = new BonusModel();
modelRegister.add(this.bonusModel);
this.bannerModel = new BannerModel();
modelRegister.add(this.bannerModel);
this.referalsModel = new ReferalsModel();
modelRegister.add(this.referalsModel);
this.antiAddictionModel = new AntiAddictionAlertModel();
modelRegister.add(this.antiAddictionModel);
this.entranceAlertModel = new EntranceAlertModel();
modelRegister.add(this.entranceAlertModel);
this.newsModel = new NewsModel();
osgi.registerService(INewsModel,this.newsModel);
this.questsModel = new ChallengeModel();
osgi.registerService(IChallenge,this.questsModel);
this.giftsModel = new GiftServerModel();
osgi.registerService(IGiftServerModel,this.giftsModel);
this.capabilitiesDumper = new CapabilitiesDumper();
IDumpService(osgi.getService(IDumpService)).registerDumper(this.capabilitiesDumper);
}
public function stop(osgi:OSGi) : void
{
var modelRegister:IModelService = IModelService(osgi.getService(IModelService));
osgi.unregisterService(IBattleSettings);
modelRegister.remove(this.panelModel.id);
this.panelModel = null;
modelRegister.remove(this.userDataModel.id);
this.userDataModel = null;
modelRegister.remove(this.paymentModel.id);
this.paymentModel = null;
modelRegister.remove(this.bonusModel.id);
this.bonusModel = null;
modelRegister.remove(this.bannerModel.id);
this.bannerModel = null;
modelRegister.remove(this.referalsModel.id);
this.referalsModel = null;
modelRegister.remove(this.antiAddictionModel.id);
this.antiAddictionModel = null;
modelRegister.remove(this.entranceAlertModel.id);
this.entranceAlertModel = null;
this.newsModel = null;
this.questsModel = null;
this.giftsModel = null;
IDumpService(osgi.getService(IDumpService)).unregisterDumper(this.capabilitiesDumper.dumperName);
this.capabilitiesDumper = null;
PanelModelActivator.osgi = null;
}
}
}
|
package alternativa.tanks.models.dom.cp
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ControlPointSprite_blueC extends BitmapAsset
{
public function ControlPointSprite_blueC()
{
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.shop.onetimepurchase {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.shop.onetimepurchase.ShopItemOneTimePurchaseCC;
public class VectorCodecShopItemOneTimePurchaseCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecShopItemOneTimePurchaseCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ShopItemOneTimePurchaseCC,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = LengthCodecHelper.decodeLength(param1);
var local3:Vector.<ShopItemOneTimePurchaseCC> = new Vector.<ShopItemOneTimePurchaseCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ShopItemOneTimePurchaseCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ShopItemOneTimePurchaseCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ShopItemOneTimePurchaseCC> = Vector.<ShopItemOneTimePurchaseCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.model.matchmaking.invitewindow {
import alternativa.tanks.controllers.mathmacking.ShowGroupInviteWindowEvent;
import alternativa.tanks.gui.friends.FriendsWindowState;
import alternativa.tanks.service.matchmaking.MatchmakingGroupInviteService;
import alternativa.tanks.view.mainview.groupinvite.GroupInviteWindow;
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadPostListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.battleselect.model.matchmaking.group.invitewindow.GroupInviteWindowModelBase;
import projects.tanks.client.battleselect.model.matchmaking.group.invitewindow.IGroupInviteWindowModelBase;
import projects.tanks.client.battleselect.model.matchmaking.group.invitewindow.MatchMakingUserInfo;
[ModelInfo]
public class GroupInviteWindowModel extends GroupInviteWindowModelBase implements IGroupInviteWindowModelBase, ObjectLoadPostListener, ObjectUnloadListener {
[Inject]
public static var inviteService:MatchmakingGroupInviteService;
[Inject]
public static var inviteWindowService:InviteWindowService;
private var window:GroupInviteWindow;
public function GroupInviteWindowModel() {
super();
}
public function objectLoadedPost() : void {
this.window = new GroupInviteWindow();
inviteWindowService.setInviteWindow(this.window);
inviteService.addEventListener(ShowGroupInviteWindowEvent.TYPE,getFunctionWrapper(this.onShowInviteWindow));
}
private function onShowInviteWindow(param1:ShowGroupInviteWindowEvent) : void {
server.prepareToShow();
}
public function show(param1:Vector.<Long>, param2:Vector.<Long>) : void {
this.window.setAllowedUsers(param1,param2);
this.window.show(FriendsWindowState.ACCEPTED);
}
public function objectUnloaded() : void {
this.window.destroy();
inviteWindowService.setInviteWindow(null);
this.window = null;
inviteService.removeEventListener(ShowGroupInviteWindowEvent.TYPE,getFunctionWrapper(this.onShowInviteWindow));
}
public function setAvailableToInviteUsers(param1:Vector.<MatchMakingUserInfo>) : void {
}
}
}
|
package projects.tanks.client.battlefield.models.user.configuration {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class TankConfigurationModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function TankConfigurationModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.armor.explosion {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class TankExplosionModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:TankExplosionModelServer;
private var client:ITankExplosionModelBase = ITankExplosionModelBase(this);
private var modelId:Long = Long.getLong(1983242842,420087132);
public function TankExplosionModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new TankExplosionModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(TankExplosionCC,false)));
}
protected function getInitParam() : TankExplosionCC {
return TankExplosionCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.client.battlefield.models.statistics.fps {
public interface IFpsStatisticsModelBase {
}
}
|
package controls.buttons.h50px {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.buttons.h50px.GreyBigButtonSkin_middleDownClass.png")]
public class GreyBigButtonSkin_middleDownClass extends BitmapAsset {
public function GreyBigButtonSkin_middleDownClass() {
super();
}
}
}
|
package alternativa.tanks.model.panel.payment.load {
import platform.client.fp10.core.model.ObjectLoadPostListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.payment.loader.IPaymentLoaderModelBase;
import projects.tanks.client.panel.model.payment.loader.PaymentLoaderModelBase;
import projects.tanks.clients.flash.commons.services.payment.PaymentDisplayService;
import projects.tanks.clients.flash.commons.services.payment.event.PaymentLoadWithCategoryEvent;
import projects.tanks.clients.flash.commons.services.payment.event.PaymentLoadWithGarageItemEvent;
import projects.tanks.clients.flash.commons.services.payment.event.PaymentLoadWithShopItemEvent;
[ModelInfo]
public class PaymentLoaderModel extends PaymentLoaderModelBase implements IPaymentLoaderModelBase, ObjectLoadPostListener, ObjectUnloadListener {
[Inject]
public static var paymentDisplayService:PaymentDisplayService;
public function PaymentLoaderModel() {
super();
}
public function objectLoadedPost() : void {
this.subscribe(PaymentLoadWithCategoryEvent.LOAD_PAYMENT,this.loadWithCategoryHandler);
this.subscribe(PaymentLoadWithGarageItemEvent.LOAD_PAYMENT,this.loadWithGarageItemHandler);
this.subscribe(PaymentLoadWithShopItemEvent.LOAD_PAYMENT,this.loadWithShopItemHandler);
}
public function objectUnloaded() : void {
this.unsubscribe(PaymentLoadWithCategoryEvent.LOAD_PAYMENT,this.loadWithCategoryHandler);
this.unsubscribe(PaymentLoadWithGarageItemEvent.LOAD_PAYMENT,this.loadWithGarageItemHandler);
this.unsubscribe(PaymentLoadWithShopItemEvent.LOAD_PAYMENT,this.loadWithShopItemHandler);
}
private function subscribe(param1:String, param2:Function) : void {
paymentDisplayService.addEventListener(param1,getFunctionWrapper(param2));
}
private function unsubscribe(param1:String, param2:Function) : void {
paymentDisplayService.removeEventListener(param1,getFunctionWrapper(param2));
}
private function loadWithCategoryHandler(param1:PaymentLoadWithCategoryEvent) : void {
server.loadPayment(param1.shopCategoryType);
}
private function loadWithGarageItemHandler(param1:PaymentLoadWithGarageItemEvent) : void {
server.loadPaymentWithGarageItem(param1.garageItem);
}
private function loadWithShopItemHandler(param1:PaymentLoadWithShopItemEvent) : void {
server.loadPaymentWithShopItem(param1.shopItem);
}
}
}
|
package alternativa.tanks.gui.communication.tabs.chat {
import alternativa.tanks.gui.chat.ChatOutputData;
import flash.utils.Dictionary;
public class HiddenMessageKeeper {
private var hiddenChannels:Dictionary = new Dictionary();
public function HiddenMessageKeeper() {
super();
}
public function pushMessage(param1:String, param2:ChatOutputData) : void {
if(!(param1 in this.hiddenChannels)) {
this.hiddenChannels[param1] = new Vector.<ChatOutputData>();
}
this.hiddenChannels[param1].push(param2);
}
public function popMessages(param1:String) : Vector.<ChatOutputData> {
var local2:Vector.<ChatOutputData> = this.hiddenChannels[param1];
delete this.hiddenChannels[param1];
return local2 != null ? local2 : new Vector.<ChatOutputData>();
}
public function cleanOutUsersMessages(param1:String) : void {
var local2:Vector.<ChatOutputData> = null;
var local3:Vector.<int> = null;
var local4:int = 0;
var local5:ChatOutputData = null;
for each(local2 in this.hiddenChannels) {
local3 = new Vector.<int>();
local4 = 0;
while(local4 < local2.length) {
local5 = local2[local4] as ChatOutputData;
if(local5.getSender().uid == param1) {
local3.push(local4);
}
local4++;
}
local4 = local3.length - 1;
while(local4 >= 0) {
local2.splice(local3[local4],1);
local4--;
}
}
}
}
}
|
package alternativa.tanks.models.battle.gui.inventory {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_overdriveHunterIconClass.png")]
public class HudInventoryIcon_overdriveHunterIconClass extends BitmapAsset {
public function HudInventoryIcon_overdriveHunterIconClass() {
super();
}
}
}
|
package controls.panel {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.display.MovieClip;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.GlowFilter;
[Embed(source="/_assets/assets.swf", symbol="symbol255")]
public class TankState extends Sprite {
public static const ARMOR:int = 3;
public static const ENGINE:int = 1;
public static const WEAPON:int = 2;
public static var _engineWarning:int = 10;
public static var _shieldWarning:int = 30;
public static var _weaponWarning:int = 30;
private static const ENGINE_COLOR:uint = 8092539;
private static const SHIELD_COLOR:uint = 15129098;
private static const WEAPON_COLOR:uint = 2477349;
public var SR:MovieClip;
public var SMI:MovieClip;
public var GR:MovieClip;
public var YL:MovieClip;
public var YM:MovieClip;
public var YMI:MovieClip;
public var SL:MovieClip;
public var SM:MovieClip;
public var YR:MovieClip;
public var GL:MovieClip;
public var GM:MovieClip;
public var GMI:MovieClip;
private var _GL:MovieClip;
private var _GM:MovieClip;
private var _GMI:MovieClip;
private var _GR:MovieClip;
private var _SL:MovieClip;
private var _SM:MovieClip;
private var _SMI:MovieClip;
private var _SR:MovieClip;
private var _YL:MovieClip;
private var _YM:MovieClip;
private var _YMI:MovieClip;
private var _YR:MovieClip;
private var _engine:int = 100;
private var _shield:int = 100;
private var _weapon:int = 100;
private var _width:int;
private var glowAlpha:Number = 0;
private var glowDelta:* = 0.2;
private var glowTargets:Array = [null,null,null,null,null,null];
public function TankState() {
super();
y = 6;
this._YL = getChildByName("YL") as MovieClip;
this._YM = getChildByName("YM") as MovieClip;
this._YMI = getChildByName("YMI") as MovieClip;
this._YR = getChildByName("YR") as MovieClip;
this._GL = getChildByName("GL") as MovieClip;
this._GM = getChildByName("GM") as MovieClip;
this._GMI = getChildByName("GMI") as MovieClip;
this._GR = getChildByName("GR") as MovieClip;
this._SL = getChildByName("SL") as MovieClip;
this._SM = getChildByName("SM") as MovieClip;
this._SMI = getChildByName("SMI") as MovieClip;
this._SR = getChildByName("SR") as MovieClip;
}
public function set engine(param1:int) : void {
this._engine = int(param1 / 100);
this._engine = this._engine < 1 ? 1 : this._engine;
if(this._engine < _engineWarning) {
this.startGlow(TankState.ENGINE);
} else {
this.stopGlow(TankState.ENGINE);
}
this.draw();
}
public function set shield(param1:int) : void {
this._shield = int(param1 / 100);
this._shield = this._shield < 1 ? 1 : this._shield;
if(this._shield < _shieldWarning) {
this.startGlow(TankState.ARMOR);
} else {
this.stopGlow(TankState.ARMOR);
}
this.draw();
}
public function startGlow(param1:int) : void {
switch(param1) {
case ENGINE:
this.glowTargets[0] = this._YM;
this.glowTargets[1] = this._YL;
break;
case WEAPON:
this.glowTargets[2] = this._GM;
this.glowTargets[3] = this._GL;
break;
case ARMOR:
this.glowTargets[4] = this._SM;
this.glowTargets[5] = this._SL;
}
var local2:int = 0;
while(local2 < 6) {
if(this.glowTargets[local2] != null) {
addEventListener(Event.ENTER_FRAME,this.glowFrame);
break;
}
local2++;
}
}
public function stopGlow(param1:int) : void {
var local2:Boolean = true;
switch(param1) {
case ENGINE:
this.glowTargets[0] = null;
this.glowTargets[1] = null;
this._YM.filters = this._YL.filters = new Array();
break;
case WEAPON:
this.glowTargets[2] = null;
this.glowTargets[3] = null;
this._GM.filters = this._GL.filters = new Array();
break;
case ARMOR:
this.glowTargets[4] = null;
this.glowTargets[5] = null;
this._SM.filters = this._SL.filters = new Array();
}
var local3:int = 0;
while(local3 < 6) {
if(this.glowTargets[local3] != null) {
local2 = false;
break;
}
local3++;
}
if(local2) {
removeEventListener(Event.ENTER_FRAME,this.glowFrame);
this._YM.filters = this._YL.filters = this._GM.filters = this._GL.filters = this._SM.filters = this._SL.filters = new Array();
this.glowAlpha = 0;
}
}
public function set type(param1:int) : void {
switch(param1) {
case ENGINE:
this._YL.y = this._YM.y = this._YMI.y = this._YR.y = 0;
this._GL.visible = this._GM.visible = this._GMI.visible = this._GR.visible = false;
this._SL.visible = this._SM.visible = this._SMI.visible = this._SR.visible = false;
break;
case WEAPON:
this._GL.y = this._GM.y = this._GMI.y = this._GR.y = 0;
this._SL.visible = this._SM.visible = this._SMI.visible = this._SR.visible = false;
this._YL.visible = this._YM.visible = this._YMI.visible = this._YR.visible = false;
break;
case ARMOR:
this._SL.y = this._SM.y = this._SMI.y = this._SR.y = 0;
this._GL.visible = this._GM.visible = this._GMI.visible = this._GR.visible = false;
this._YL.visible = this._YM.visible = this._YMI.visible = this._YR.visible = false;
}
this.draw();
}
public function set weapon(param1:int) : void {
this._weapon = int(param1 / 100);
this._weapon = this._weapon < 1 ? 1 : this._weapon;
if(this._weapon < _weaponWarning) {
this.startGlow(TankState.WEAPON);
} else {
this.stopGlow(TankState.WEAPON);
}
this.draw();
}
override public function set width(param1:Number) : void {
this._width = int(param1);
this.draw();
}
private function draw() : void {
var local4:BitmapData = null;
var local5:Bitmap = null;
var local1:Shape = new Shape();
var local2:Graphics = local1.graphics;
var local3:Number = this._width / 100;
this._YMI.width = this._width - 2;
this._GMI.width = this._width - 2;
this._SMI.width = this._width - 2;
this._YM.width = int(this._engine * local3 + 0.5) - 1;
this._GM.width = int(this._weapon * local3 + 0.5) - 1;
this._SM.width = int(this._shield * local3 + 0.5) - 1;
this._YR.x = this._width;
this._GR.x = this._width;
this._SR.x = this._width;
this._YR.gotoAndStop(this._engine > 99 ? 2 : 1);
this._GR.gotoAndStop(this._weapon > 99 ? 2 : 1);
this._SR.gotoAndStop(this._shield > 99 ? 2 : 1);
}
private function glowFrame(param1:Event) : * {
var local2:MovieClip = null;
var local3:GlowFilter = new GlowFilter(16711680,this.glowAlpha,8,8,2,1,true);
var local4:int = 0;
while(local4 < 6) {
if(this.glowTargets[local4] != null) {
local2 = this.glowTargets[local4];
local2.filters = [local3];
}
local4++;
}
this.glowDelta *= this.glowAlpha > 1 || this.glowAlpha < 0 ? -1 : 1;
this.glowAlpha += this.glowDelta;
}
}
}
|
package _codec.projects.tanks.client.tanksservices.model.logging.garage {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import projects.tanks.client.tanksservices.model.logging.garage.GarageAction;
public class VectorCodecGarageActionLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecGarageActionLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(GarageAction,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = LengthCodecHelper.decodeLength(param1);
var local3:Vector.<GarageAction> = new Vector.<GarageAction>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = GarageAction(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:GarageAction = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<GarageAction> = Vector.<GarageAction>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.model.user
{
public class UserData
{
public var id:String;
public var name:String;
public var rank:int;
public function UserData(id:String, name:String, rank:int)
{
super();
this.id = id;
this.name = name;
this.rank = rank;
}
}
}
|
package alternativa.tanks.model.useremailandpassword {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class PasswordServiceEvents implements PasswordService {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function PasswordServiceEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function checkIsPasswordSet(param1:Function) : void {
var i:int = 0;
var m:PasswordService = null;
var callback:Function = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = PasswordService(this.impl[i]);
m.checkIsPasswordSet(callback);
i++;
}
}
finally {
Model.popObject();
}
}
public function checkPassword(param1:String, param2:Function) : void {
var i:int = 0;
var m:PasswordService = null;
var password:String = param1;
var callback:Function = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = PasswordService(this.impl[i]);
m.checkPassword(password,callback);
i++;
}
}
finally {
Model.popObject();
}
}
public function setPassword(param1:String) : void {
var i:int = 0;
var m:PasswordService = null;
var password:String = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = PasswordService(this.impl[i]);
m.setPassword(password);
i++;
}
}
finally {
Model.popObject();
}
}
public function updatePassword(param1:String, param2:String) : void {
var i:int = 0;
var m:PasswordService = null;
var oldPassword:String = param1;
var newPassword:String = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = PasswordService(this.impl[i]);
m.updatePassword(oldPassword,newPassword);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.model.quest.challenge.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.quest.challenge.gui.TierRenderer_goldenPickedClass.png")]
public class TierRenderer_goldenPickedClass extends BitmapAsset {
public function TierRenderer_goldenPickedClass() {
super();
}
}
}
|
package alternativa.tanks.models.battle.battlefield.map {
import alternativa.engine3d.core.Face;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.utils.TextureMaterialRegistry;
import flash.display.BitmapData;
public class Billboards {
[Inject]
public static var textureMaterialRegistry:TextureMaterialRegistry;
private static const BILLBOARD_MATERIAL_NAME:String = "display";
private var billboards:Vector.<Mesh> = new Vector.<Mesh>();
private var faces:Vector.<Face> = new Vector.<Face>();
private var material:TextureMaterial;
private var billboardImage:BitmapData;
public function Billboards() {
super();
}
public function add(param1:Mesh) : void {
var local2:Face = null;
this.billboards.push(param1);
for each(local2 in param1.faces) {
if(local2.material.name == BILLBOARD_MATERIAL_NAME) {
this.faces.push(local2);
if(this.material == null) {
this.material = TextureMaterial(local2.material);
this.updateMaterial();
}
}
}
}
public function setImage(param1:BitmapData) : void {
this.billboardImage = param1;
this.updateMaterial();
}
private function updateMaterial() : void {
if(this.material != null && this.billboardImage != null) {
this.material.texture = this.billboardImage;
this.setMaterialResolution();
}
}
private function setMaterialResolution() : void {
if(this.billboards.length > 0) {
this.material.resolution = 1;
}
}
}
}
|
package alternativa.tanks.models.weapon.freeze {
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.engine3d.EffectsMaterialRegistry;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.models.sfx.lighting.LightingSfx;
import alternativa.tanks.models.weapon.shared.streamweapon.StreamWeaponEffects;
import alternativa.tanks.models.weapon.streamweapon.StreamWeaponSFXData;
import alternativa.tanks.utils.GraphicsUtils;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import projects.tanks.client.battlefield.models.tankparts.sfx.freeze.FreezeSFXCC;
import projects.tanks.client.battlefield.models.tankparts.sfx.freeze.FreezeSFXModelBase;
import projects.tanks.client.battlefield.models.tankparts.sfx.freeze.IFreezeSFXModelBase;
[ModelInfo]
public class FreezeSFXModel extends FreezeSFXModelBase implements IFreezeSFXModelBase, ObjectLoadListener, ObjectUnloadListener, IFreezeSFXModel {
[Inject]
public static var battleService:BattleService;
[Inject]
public static var materialRegistry:EffectsMaterialRegistry;
public function FreezeSFXModel() {
super();
}
[Obfuscation(rename="false")]
public function objectLoaded() : void {
var local1:FreezeSFXCC = getInitParam();
var local2:StreamWeaponSFXData = new StreamWeaponSFXData();
local2.particleAnimation = this.getParticleAnimation(local1.particleTextureResource);
local2.muzzlePlaneAnimation = this.getMuzzlePlaneAnimation(local1.planeTextureResource);
local2.additionalElementTexture = materialRegistry.getMaterial(local1.buffedShardsTextureResource.data);
local2.particleSpeed = BattleUtils.toClientScale(local1.particleSpeed);
local2.shootingSound = local1.shotSoundResource.sound;
var local3:LightingSfx = new LightingSfx(local1.lightingSFXEntity);
local2.startLightAnimation = local3.createAnimation("start");
local2.loopLightAnimation = local3.createAnimation("loop");
local2.startFireAnimation = local3.createAnimation("startFire");
local2.loopFireAnimation = local3.createAnimation("loopFire");
putData(StreamWeaponSFXData,local2);
}
private function getParticleAnimation(param1:MultiframeTextureResource) : TextureAnimation {
var local2:TextureAnimation = GraphicsUtils.getTextureAnimationFromResource(materialRegistry,param1);
local2.material.resolution = FreezeEffectsParams.PARTICLE_END_SIZE / param1.frameWidth;
return local2;
}
private function getMuzzlePlaneAnimation(param1:MultiframeTextureResource) : TextureAnimation {
var local2:TextureAnimation = GraphicsUtils.getTextureAnimationFromResource(materialRegistry,param1);
local2.material.resolution = FreezeEffectsParams.PLANE_LENGTH / param1.frameWidth;
return local2;
}
public function objectUnloaded() : void {
var local4:TextureMaterial = null;
var local1:StreamWeaponSFXData = StreamWeaponSFXData(getData(StreamWeaponSFXData));
var local2:Array = local1.getMaterialsToRelease();
var local3:int = 0;
while(local3 < local2.length) {
local4 = local2[local3];
materialRegistry.releaseMaterial(local4);
local3++;
}
}
public function getFreezeEffects(param1:Number, param2:Number) : StreamWeaponEffects {
var local3:StreamWeaponSFXData = StreamWeaponSFXData(getData(StreamWeaponSFXData));
return new FreezeEffects(battleService.getObjectPool(),param1,param2,local3);
}
}
}
|
package projects.tanks.client.entrance.model.entrance.externalentrance {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class ExternalEntranceModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ExternalEntranceModelServer;
private var client:IExternalEntranceModelBase = IExternalEntranceModelBase(this);
private var modelId:Long = Long.getLong(108568170,1674173608);
private var _linkAlreadyExistsId:Long = Long.getLong(440559406,964760605);
private var _validationFailedId:Long = Long.getLong(1703558387,-1533773165);
private var _validationSuccessId:Long = Long.getLong(1270702467,-1082907539);
private var _wrongPasswordId:Long = Long.getLong(914150414,-1180956683);
public function ExternalEntranceModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ExternalEntranceModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ExternalEntranceCC,false)));
}
protected function getInitParam() : ExternalEntranceCC {
return ExternalEntranceCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._linkAlreadyExistsId:
this.client.linkAlreadyExists();
break;
case this._validationFailedId:
this.client.validationFailed();
break;
case this._validationSuccessId:
this.client.validationSuccess();
break;
case this._wrongPasswordId:
this.client.wrongPassword();
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.camera {
import alternativa.math.Vector3;
public class CameraShaker {
private var maxAngle:Number = 1.5707963267948966;
private var direction:Vector3 = new Vector3();
private var maxTime:int = 500;
private var time:int;
private var maxRadius:Number = 50;
private var radius:Number = 0;
private var e1:Vector3 = new Vector3();
private var e2:Vector3 = new Vector3();
public function CameraShaker() {
super();
}
public function setMaxTime(param1:int) : void {
this.maxTime = param1;
}
public function start() : void {
this.time = this.maxTime;
this.radius = this.maxRadius;
this.direction.reset(1 - 2 * Math.random(),1 - 2 * Math.random(),1 - 2 * Math.random()).normalize();
this.calculateBasisVectors();
}
public function isActive() : Boolean {
return this.time > 0;
}
public function getCameraPosition(param1:Vector3, param2:Vector3) : void {
param2.copy(param1);
if(this.time > 0) {
param2.addScaled(this.radius,this.direction);
}
}
public function update(param1:int) : void {
if(this.time > 0) {
this.time -= param1;
if(this.time > 0) {
this.calculateNewDirection();
this.calculateBasisVectors();
this.calculateRadius(this.time);
}
}
}
private function calculateRadius(param1:int) : void {
var local2:Number = Math.cos(Math.PI * (this.maxTime - param1) / this.maxTime);
this.radius = this.maxRadius * 0.5 * (1 + local2);
}
private function calculateNewDirection() : void {
var local1:Number = this.maxAngle * Math.random();
var local2:Number = -Math.cos(local1);
var local3:Number = Math.sin(local1);
local1 = 2 * Math.PI * Math.random();
var local4:Number = local3 * Math.cos(local1);
var local5:Number = local3 * Math.sin(local1);
var local6:Number = local2 * this.direction.x + local4 * this.e1.x + local5 * this.e2.x;
var local7:Number = local2 * this.direction.y + local4 * this.e1.y + local5 * this.e2.y;
var local8:Number = local2 * this.direction.z + local4 * this.e1.z + local5 * this.e2.z;
this.direction.reset(local6,local7,local8).normalize();
}
private function calculateBasisVectors() : void {
var local1:int = 0;
var local2:Number = this.direction.x < 0 ? -this.direction.x : this.direction.x;
var local3:Number = this.direction.y < 0 ? -this.direction.y : this.direction.y;
if(local3 > local2) {
local2 = local3;
local1 = 1;
}
local3 = this.direction.z < 0 ? -this.direction.z : this.direction.z;
if(local3 > local2) {
local1 = 2;
}
switch(local1) {
case 0:
this.e1.x = 0;
this.e1.y = this.direction.z;
this.e1.z = -this.direction.y;
break;
case 1:
this.e1.x = -this.direction.z;
this.e1.y = 0;
this.e1.z = this.direction.x;
break;
case 2:
this.e1.x = this.direction.y;
this.e1.y = -this.direction.x;
this.e1.z = 0;
}
this.e1.normalize();
this.e2.cross2(this.direction,this.e1);
}
}
}
|
package projects.tanks.client.garage.models.item.kit {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class GarageKitModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function GarageKitModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.assault {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.battle.pointbased.assault.AssaultCC;
import projects.tanks.client.battlefield.models.battle.pointbased.assault.AssaultSoundFX;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class CodecAssaultCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_flagPedestalModel:ICodec;
private var codec_flagSprite:ICodec;
private var codec_pointBigMarker:ICodec;
private var codec_pointPedestalModel:ICodec;
private var codec_pointSmallMarker:ICodec;
private var codec_sounds:ICodec;
public function CodecAssaultCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_flagPedestalModel = param1.getCodec(new TypeCodecInfo(Tanks3DSResource,false));
this.codec_flagSprite = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_pointBigMarker = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_pointPedestalModel = param1.getCodec(new TypeCodecInfo(Tanks3DSResource,false));
this.codec_pointSmallMarker = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_sounds = param1.getCodec(new TypeCodecInfo(AssaultSoundFX,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:AssaultCC = new AssaultCC();
local2.flagPedestalModel = this.codec_flagPedestalModel.decode(param1) as Tanks3DSResource;
local2.flagSprite = this.codec_flagSprite.decode(param1) as TextureResource;
local2.pointBigMarker = this.codec_pointBigMarker.decode(param1) as TextureResource;
local2.pointPedestalModel = this.codec_pointPedestalModel.decode(param1) as Tanks3DSResource;
local2.pointSmallMarker = this.codec_pointSmallMarker.decode(param1) as TextureResource;
local2.sounds = this.codec_sounds.decode(param1) as AssaultSoundFX;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:AssaultCC = AssaultCC(param2);
this.codec_flagPedestalModel.encode(param1,local3.flagPedestalModel);
this.codec_flagSprite.encode(param1,local3.flagSprite);
this.codec_pointBigMarker.encode(param1,local3.pointBigMarker);
this.codec_pointPedestalModel.encode(param1,local3.pointPedestalModel);
this.codec_pointSmallMarker.encode(param1,local3.pointSmallMarker);
this.codec_sounds.encode(param1,local3.sounds);
}
}
}
|
package _codec.projects.tanks.client.panel.model.payment {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.payment.PaymentCC;
public class VectorCodecPaymentCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecPaymentCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(PaymentCC,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = LengthCodecHelper.decodeLength(param1);
var local3:Vector.<PaymentCC> = new Vector.<PaymentCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = PaymentCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:PaymentCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<PaymentCC> = Vector.<PaymentCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package platform.client.models.commons.description {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class DescriptionModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function DescriptionModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.engine3d.debug
{
import alternativa.tanks.engine3d.IMaterialSequenceRegistry;
import alternativa.tanks.engine3d.MaterialSequence;
import alternativa.tanks.engine3d.MaterialType;
import flash.display.BitmapData;
public class MaterialSequenceRegistry implements IMaterialSequenceRegistry
{
private var sequence:MaterialSequence;
public function MaterialSequenceRegistry()
{
super();
var bmp:DebugTexture = new DebugTexture(24,6,8355711,6710784);
this.sequence = new MaterialSequence(null,bmp,bmp.width,false,false,false,0);
}
public function set timerInterval(value:int) : void
{
}
public function get useMipMapping() : Boolean
{
return false;
}
public function set useMipMapping(value:Boolean) : void
{
}
public function getSequence(materialType:MaterialType, sourceImage:BitmapData, frameWidth:int, mipMapResolution:Number, disposeSourceImage:Boolean = false, createMirroredFrames:Boolean = false) : MaterialSequence
{
return this.sequence;
}
public function getSquareSequence(materialType:MaterialType, sourceImage:BitmapData, mipMapResolution:Number, disposeSourceImage:Boolean = false, createMirroredFrames:Boolean = false) : MaterialSequence
{
return this.sequence;
}
public function clear() : void
{
}
public function getDump() : String
{
return "";
}
public function disposeSequence(sequence:MaterialSequence) : void
{
}
}
}
|
package alternativa.tanks.display
{
import flash.display.Sprite;
import utils.graphics.SectorMask;
public class SquareSectorIndicator extends Sprite
{
private var size:Number;
private var ellipseWidth:Number;
private var sectorMask:SectorMask;
public function SquareSectorIndicator(param1:int, param2:Number, param3:uint, param4:Number)
{
super();
this.size = param1;
this.ellipseWidth = param2;
this.drawShape(param3,param4);
this.sectorMask = new SectorMask(param1);
addChild(this.sectorMask);
mask = this.sectorMask;
}
private function drawShape(param1:uint, param2:Number) : void
{
graphics.clear();
graphics.beginFill(param1,param2);
graphics.drawRoundRect(0,0,this.size,this.size,this.ellipseWidth);
graphics.endFill();
}
public function setProgress(param1:Number) : void
{
this.sectorMask.setProgress(1 - param1,1);
}
public function setColor(param1:uint, param2:Number) : void
{
this.drawShape(param1,param2);
}
}
}
|
package projects.tanks.clients.fp10.TanksLauncher {
import flash.display.BlendMode;
import flash.display.Graphics;
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
public class DebugProgressBar extends Sprite {
private static const WIDTH:int = 300;
private static const HEIGHT:int = 30;
private static const BAR_MARGIN:int = 3;
private static const BGCOLOR:uint = 3355443;
private static const FGCOLOR:uint = 16777215;
public var text:String;
private var textField:TextField;
public function DebugProgressBar() {
super();
this.textField = new TextField();
this.textField.defaultTextFormat = new TextFormat("Tahoma",12,16777215);
this.textField.autoSize = TextFieldAutoSize.LEFT;
this.textField.x = 10;
this.textField.y = 5;
this.textField.blendMode = BlendMode.INVERT;
addChild(this.textField);
this.setProgress(0,1);
}
public function setProgress(param1:int, param2:int) : void {
var local3:String = param1 + "/" + param2;
if(this.text) {
this.textField.text = this.text + local3;
} else {
this.textField.text = local3;
}
var local4:int = (WIDTH - 2 * BAR_MARGIN) * param1 / param2;
var local5:Graphics = graphics;
local5.lineStyle(1,FGCOLOR);
local5.beginFill(BGCOLOR);
local5.drawRect(0,0,WIDTH - 1,HEIGHT - 1);
local5.lineStyle();
local5.beginFill(FGCOLOR);
local5.drawRect(BAR_MARGIN,BAR_MARGIN,local4,HEIGHT - BAR_MARGIN - BAR_MARGIN);
local5.endFill();
}
public function align() : void {
x = stage.stageWidth - width >> 1;
}
}
}
|
package projects.tanks.client.clans.clan.incoming {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.clans.container.ContainerCC;
public class ClanIncomingModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ClanIncomingModelServer;
private var client:IClanIncomingModelBase = IClanIncomingModelBase(this);
private var modelId:Long = Long.getLong(794660588,-483099162);
private var _onAddingId:Long = Long.getLong(492813833,1824512689);
private var _onAdding_userIdCodec:ICodec;
private var _onRemovedId:Long = Long.getLong(1902640351,1514469490);
private var _onRemoved_userIdCodec:ICodec;
public function ClanIncomingModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ClanIncomingModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ContainerCC,false)));
this._onAdding_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._onRemoved_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
}
protected function getInitParam() : ContainerCC {
return ContainerCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._onAddingId:
this.client.onAdding(Long(this._onAdding_userIdCodec.decode(param2)));
break;
case this._onRemovedId:
this.client.onRemoved(Long(this._onRemoved_userIdCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangsIcon_p23 extends BitmapAsset
{
public function RangsIcon_p23()
{
super();
}
}
}
|
package alternativa.tanks.sfx {
import alternativa.engine3d.lights.OmniLight;
import alternativa.tanks.utils.objectpool.Pool;
public final class OmniStreamLightEffect extends StreamLightEffect {
public function OmniStreamLightEffect(param1:Pool) {
super(param1,new OmniLight(0,0,0));
}
public function init(param1:Object3DPositionProvider, param2:LightAnimation, param3:LightAnimation) : void {
this.positionProvider = param1;
this.startTime = param2.getLiveTime();
this.loopTime = param3.getLiveTime();
this.startAnimation = param2;
this.loopAnimation = param3;
this.random = loopTime / 4;
starting = true;
currentTime = 0;
alive = true;
fading = false;
fadeTime = 0;
}
}
}
|
package alternativa.tanks.battle.objects.tank.tankskin.turret {
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
[ModelInterface]
public interface CustomTurretSkin {
function createSkin(param1:Tanks3DSResource) : TurretSkin;
}
}
|
package alternativa.utils.textureutils {
public class TextureByteDataMap {
private var _data:Object;
public function TextureByteDataMap(data:Object = null) {
super();
this._data = data == null ? {} : data;
}
public function get data() : Object {
return this._data;
}
public function getValue(key:String) : TextureByteData {
return this._data[key];
}
public function putValue(key:String, value:TextureByteData) : void {
this._data[key] = value;
}
}
}
|
package alternativa.tanks.models.battlefield.gui.chat.cmdhandlers
{
public interface IChatCommandHandler
{
function handleCommand(param1:Array) : Boolean;
}
}
|
package alternativa.startup {
import flash.display.Loader;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.system.LoaderContext;
import flash.utils.ByteArray;
import flash.utils.getDefinitionByName;
public class CacheLoader extends Loader {
private var encodedUrl:String;
private var cacheDirectory:Object;
private var context:LoaderContext;
private var cached:Boolean;
private var FileClass:Class;
private var FileStreamClass:Class;
private var FileModeClass:Class;
public function CacheLoader() {
super();
if(StartupSettings.isDesktop) {
this.FileClass = getDefinitionByName("flash.filesystem.File") as Class;
this.FileStreamClass = getDefinitionByName("flash.filesystem.FileStream") as Class;
this.FileModeClass = getDefinitionByName("flash.filesystem.FileMode") as Class;
this.cacheDirectory = this.FileClass.applicationStorageDirectory.resolvePath("cache");
if(!this.cacheDirectory.exists) {
this.cacheDirectory.createDirectory();
} else if(!this.cacheDirectory.isDirectory) {
throw new Error("Cannot create directory." + this.cacheDirectory.nativePath + " is already exists.");
}
}
}
override public function load(param1:URLRequest, param2:LoaderContext = null) : void {
if(!StartupSettings.isDesktop) {
super.load(param1,param2);
return;
}
var local3:URLRequest = param1;
this.context = param2;
this.encodedUrl = URLEncoder.encode(param1.url);
var local4:Object = this.cacheDirectory.resolvePath(this.encodedUrl);
if(local4.exists) {
local3 = new URLRequest(local4.url);
this.cached = true;
}
var local5:URLLoader = new URLLoader();
local5.dataFormat = URLLoaderDataFormat.BINARY;
local5.addEventListener(Event.COMPLETE,this.onBytesLoaded,false,0,true);
local5.addEventListener(IOErrorEvent.IO_ERROR,this.onIOError,false,0,true);
local5.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onSecurityError,false,0,true);
local5.load(local3);
}
private function onIOError(param1:Event) : void {
dispatchEvent(new IOErrorEvent("CacheLoader: IOError!"));
}
private function onSecurityError(param1:Event) : void {
dispatchEvent(new SecurityErrorEvent("CacheLoader: Security error!"));
}
private function onBytesLoaded(param1:Event) : void {
var file:Object = null;
var fileStream:Object = null;
var e:Event = param1;
var bytes:ByteArray = URLLoader(e.target).data as ByteArray;
if(!this.cached) {
file = new this.FileClass(this.cacheDirectory.resolvePath(this.encodedUrl).nativePath);
fileStream = new this.FileStreamClass();
try {
fileStream.open(file,this.FileModeClass.WRITE);
fileStream.writeBytes(URLLoader(e.target).data as ByteArray);
fileStream.close();
}
catch(e:Error) {
dispatchEvent(new IOErrorEvent("CacheLoader error! " + e.message + "url: " + encodedUrl));
}
}
super.loadBytes(bytes,this.context);
}
}
}
|
package alternativa.tanks.models.weapons.common {
import alternativa.tanks.battle.BattleRunnerProvider;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.LogicUnit;
import alternativa.tanks.battle.objects.tank.LocalWeapon;
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.shared.SimpleWeaponController;
import flash.errors.IllegalOperationError;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class CommonLocalWeapon extends BattleRunnerProvider implements Weapon, LocalWeapon, LogicUnit {
[Inject]
public static var battleService:BattleService;
protected static const gunParams:AllGlobalGunParams = new AllGlobalGunParams();
private var enabled:Boolean;
private var triggerPulled:Boolean;
private var shooting:Boolean;
private var controller:SimpleWeaponController;
private var weaponPlatform:WeaponPlatform;
public function CommonLocalWeapon(param1:Boolean) {
super();
if(param1) {
this.controller = new SimpleWeaponController();
this.controller.setWeapon(this);
}
}
public function init(param1:WeaponPlatform) : void {
this.weaponPlatform = param1;
if(this.controller != null) {
this.controller.init();
getBattleRunner().addLogicUnit(this);
}
}
public function destroy() : void {
if(this.controller != null) {
this.controller.destroy();
this.weaponPlatform = null;
getBattleRunner().removeLogicUnit(this);
}
}
public function activate() : void {
}
public function deactivate() : void {
this.disable(true);
}
public function enable() : void {
if(!this.enabled) {
this.enabled = true;
this.triggerPulled = this.controller.isTriggerPulled();
if(this.triggerPulled) {
if(this.canStart()) {
this.start(getBattleRunner().getPhysicsTime());
}
}
}
}
public function disable(param1:Boolean) : void {
if(this.enabled) {
if(this.triggerPulled) {
this.triggerPulled = false;
this.stop(getBattleRunner().getPhysicsTime(),param1);
}
this.enabled = false;
}
}
public function reset() : void {
this.shooting = false;
this.triggerPulled = false;
}
public function pullTrigger() : void {
if(this.enabled) {
this.triggerPulled = true;
if(this.canStart()) {
this.start(getBattleRunner().getPhysicsTime());
}
}
}
public function releaseTrigger() : void {
if(this.enabled) {
this.triggerPulled = false;
this.stop(getBattleRunner().getPhysicsTime(),true);
}
}
protected function start(param1:int) : void {
this.shooting = true;
}
protected function stop(param1:int, param2:Boolean) : void {
this.shooting = false;
}
public function getStatus() : Number {
return 0;
}
public function runLogic(param1:int, param2:int) : void {
if(this.isEnabled() && this.triggerPulled && !this.isShooting() && this.canStart()) {
this.start(param1);
}
}
public function isShooting() : Boolean {
return this.isEnabled() && this.shooting;
}
public function isEnabled() : Boolean {
return this.enabled;
}
public function getWeaponPlatform() : WeaponPlatform {
return this.weaponPlatform;
}
protected function canStart() : Boolean {
return true;
}
public function getResistanceProperty() : ItemProperty {
throw new IllegalOperationError();
}
protected function getPhysicsTime() : int {
return battleService.getPhysicsTime();
}
public function updateRecoilForce(param1:Number) : void {
}
public function fullyRecharge() : void {
}
public function weaponReloadTimeChanged(param1:int, param2:int) : void {
}
public function stun() : void {
}
public function calm(param1:int) : void {
}
}
}
|
package projects.tanks.client.panel.model.shop.crystalpackage {
public interface ICrystalPackageModelBase {
}
}
|
package alternativa.tanks.controller.commands.goto_ {
import alternativa.tanks.controller.events.showform.ShowExternalEntranceFormEvent;
import alternativa.tanks.controller.events.socialnetwork.NavigationExternalEvent;
import alternativa.tanks.model.EntranceServerParamsModel;
import alternativa.tanks.model.EntranceUrlParamsModel;
import alternativa.tanks.service.AccountService;
import alternativa.tanks.service.ICaptchaService;
import org.robotlegs.mvcs.Command;
public class GoToExternalLoginCommand extends Command {
[Inject]
public var entranceUrlParamsModel:EntranceUrlParamsModel;
[Inject]
public var serverParamsModel:EntranceServerParamsModel;
[Inject]
public var accountService:AccountService;
[Inject]
public var event:NavigationExternalEvent;
[Inject]
public var captchaService:ICaptchaService;
public function GoToExternalLoginCommand() {
super();
}
override public function execute() : void {
var local1:Boolean = false;
if(this.serverParamsModel.loginCaptchaEnabled) {
local1 = true;
} else {
local1 = Boolean(this.captchaService.loginCaptchaEnabled);
}
dispatch(new ShowExternalEntranceFormEvent(ShowExternalEntranceFormEvent.LOGIN_FORM,this.event.socialNetworkId,this.entranceUrlParamsModel.passedCallsign || this.accountService.storedUserName,local1));
}
}
}
|
package {
import assets.scroller.ScrollThumbSkin;
[Embed(source="/_assets/assets.swf", symbol="symbol21")]
public dynamic class ScrollThumb_upSkin extends ScrollThumbSkin {
public function ScrollThumb_upSkin() {
super();
}
}
}
|
package projects.tanks.client.garage.models.item.object3ds {
public interface IObject3DSModelBase {
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_cooldownMineClass.png")]
public class ItemInfoPanelBitmaps_cooldownMineClass extends BitmapAsset {
public function ItemInfoPanelBitmaps_cooldownMineClass() {
super();
}
}
}
|
package projects.tanks.client.garage.models.item.item3d {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class Item3DModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function Item3DModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.models.weapon.artillery.sfx {
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
import platform.client.fp10.core.type.AutoClosable;
public class ArtilleryTrailEffect extends PooledObject implements AutoClosable {
[Inject]
public static var battleService:BattleService;
private static const SMOKE_INTERVAL:Number = 0.001;
private var smokeTime:Number;
private var shellMesh:Mesh;
private var smokeMaterial:TextureMaterial;
public function ArtilleryTrailEffect(param1:Pool) {
super(param1);
}
public function init(param1:Mesh, param2:ArtillerySfxData) : void {
this.shellMesh = param1;
this.smokeMaterial = param2.trail;
this.smokeTime = 0;
}
public function update(param1:Number) : void {
var local2:ArtillerySmoke = null;
this.smokeTime += param1;
if(this.smokeTime >= SMOKE_INTERVAL) {
local2 = ArtillerySmoke(battleService.getObjectPool().getObject(ArtillerySmoke));
local2.init(this.shellMesh,this.smokeMaterial);
battleService.addGraphicEffect(local2);
this.smokeTime = 0;
}
}
public function close() : void {
this.shellMesh = null;
this.smokeMaterial = null;
recycle();
}
}
}
|
package controls.buttons.h71px {
import controls.buttons.FixedHeightButton;
public class GreyHugeButton extends FixedHeightButton {
public function GreyHugeButton() {
super(new GreyHugeButtonSkin());
}
}
}
|
package projects.tanks.client.panel.model.kitoffer {
public interface IKitOfferModelBase {
function showOffer(param1:KitOfferInfo) : void;
}
}
|
package forms
{
import alternativa.init.Main;
import controls.DefaultButton;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TextEvent;
import flash.ui.Keyboard;
import forms.events.LoginFormEvent;
import scpacker.networking.INetworker;
import scpacker.networking.Network;
import scpacker.utils.CaptchaParser;
public class LoginForm extends Sprite
{
private var _state:Boolean = false;
public var checkPassword:CheckPassword;
public var registerForm:RegisterForm;
public var _restoreEmailForm:RestoreEmail;
private var antiAddictionEnabled:Boolean = false;
public function LoginForm(antiAddictionEnabled:Boolean)
{
this.checkPassword = new CheckPassword();
this._restoreEmailForm = new RestoreEmail();
super();
this.antiAddictionEnabled = antiAddictionEnabled;
this.registerForm = new RegisterForm(antiAddictionEnabled);
if(antiAddictionEnabled)
{
this.registerForm.y = -110;
}
addChild(this.registerForm);
addChild(this.checkPassword);
addChild(this._restoreEmailForm);
this.checkPassword.visible = false;
this.registerForm.visible = true;
this._restoreEmailForm.visible = false;
this.checkPassword.playButton.addEventListener(MouseEvent.CLICK,this.playClick);
this.registerForm.playButton.addEventListener(MouseEvent.CLICK,this.playClick);
this.checkPassword.password.addEventListener(KeyboardEvent.KEY_DOWN,this.playClickKey);
this.registerForm.rulesButton.addEventListener(TextEvent.LINK,this.onRules);
this.checkPassword.registerButton.addEventListener(MouseEvent.CLICK,this.switchState);
this.registerForm.loginButton.addEventListener(MouseEvent.CLICK,this.switchState);
addEventListener(Event.ADDED_TO_STAGE,this.Init);
}
public function get loginState() : Boolean
{
return this._state;
}
public function set loginState(value:Boolean) : void
{
this._state = !value;
this.switchState(null);
}
public function get callSign() : String
{
return !!this._state ? this.checkPassword.callSign.value : this.registerForm.callSign.value;
}
public function set callSign(value:String) : void
{
this.checkPassword.callSign.value = value;
if(stage != null)
{
}
}
public function get mainPassword() : String
{
return this.checkPassword.password.value;
}
public function get pass1() : String
{
return this.registerForm.pass1.value;
}
public function get pass2() : String
{
return this.registerForm.pass2.value;
}
public function get realName() : String
{
if(this.registerForm.realName != null)
{
return this.registerForm.realName.value;
}
return null;
}
public function get idNumber() : String
{
if(this.registerForm.idNumber != null)
{
return this.registerForm.idNumber.value;
}
return null;
}
public function get remember() : Boolean
{
return !!this._state ? Boolean(this.checkPassword.checkRemember.checked) : Boolean(this.registerForm.chekRemember.checked);
}
public function set remember(value:Boolean) : void
{
this.checkPassword.checkRemember.checked = value;
}
public function get email() : String
{
return !!this.registerForm.confirm.visible ? this.registerForm.email.value : null;
}
public function get restoreEmail() : String
{
return this._restoreEmailForm.email.value;
}
public function clearPassword() : void
{
this.checkPassword.password.clear();
}
private function Init(e:Event) : void
{
removeEventListener(Event.ADDED_TO_STAGE,this.Init);
stage.addEventListener(Event.RESIZE,this.doLayout);
this.doLayout(null);
this.loginState = !this._state;
}
public function setCaptchaEnable(type:String, packet:String) : void
{
if(type == "AUTH")
{
this.checkPassword.captcha(true);
this.checkPassword.captchaView.refreshBtn.addEventListener(MouseEvent.CLICK,this.onRefreshCaptchaAuth);
CaptchaParser.parse(packet,this.checkPassword.captchaView.captcha);
}
else if(type == "REGISTER")
{
this.registerForm.captcha(true);
this.registerForm.captchaView.refreshBtn.addEventListener(MouseEvent.CLICK,this.onRefreshCaptchaAuth);
CaptchaParser.parse(packet,this.registerForm.captchaView.captcha);
}
else if(type == "RESTORE")
{
this._restoreEmailForm.captcha(true);
this._restoreEmailForm.captchaView.refreshBtn.addEventListener(MouseEvent.CLICK,this.onRefreshCaptchaAuth);
CaptchaParser.parse(packet,this._restoreEmailForm.captchaView.captcha);
}
}
private function onRefreshCaptchaAuth(e:Event) : void
{
Network(Main.osgi.getService(INetworker)).send("auth;refresh_captcha");
}
public function updateCaptcha(type:String, packet:String) : void
{
if(type == "AUTH" && this.checkPassword.captchaView != null)
{
CaptchaParser.parse(packet,this.checkPassword.captchaView.captcha);
}
if(type == "REGISTER" && this.registerForm.captchaView != null)
{
CaptchaParser.parse(packet,this.registerForm.captchaView.captcha);
}
if(type == "RESTORE" && this._restoreEmailForm.captchaView != null)
{
CaptchaParser.parse(packet,this._restoreEmailForm.captchaView.captcha);
}
}
private function switchState(e:MouseEvent) : void
{
this._state = !this._state;
this.checkPassword.visible = this._state;
this.registerForm.visible = !this._state;
if(stage != null)
{
if(this._state)
{
stage.focus = this.checkPassword.callSign.textField.length == 0 ? this.checkPassword.callSign.textField : this.checkPassword.password.textField;
}
else
{
stage.focus = this.registerForm.callSign.textField;
}
}
dispatchEvent(new LoginFormEvent(LoginFormEvent.CHANGE_STATE));
}
private function onRules(e:TextEvent) : void
{
if(e.text == "rules")
{
dispatchEvent(new LoginFormEvent(LoginFormEvent.SHOW_RULES));
}
else
{
dispatchEvent(new LoginFormEvent(LoginFormEvent.SHOW_TERMS));
}
}
private function doLayout(e:Event) : void
{
this.x = int(stage.stageWidth / 2 - this.width / 2);
this.y = int(stage.stageHeight / 2 - this.height / 2) + (!!this.antiAddictionEnabled ? 110 : 50);
}
private function playClick(event:MouseEvent) : void
{
var trgt:DefaultButton = event.currentTarget as DefaultButton;
trgt.enable = false;
dispatchEvent(new LoginFormEvent(LoginFormEvent.PLAY_PRESSED));
}
private function playClickKey(e:KeyboardEvent) : void
{
if(e.keyCode == Keyboard.ENTER)
{
dispatchEvent(new LoginFormEvent(LoginFormEvent.PLAY_PRESSED));
}
}
public function showRestoreForm() : void
{
this.checkPassword.visible = false;
this._restoreEmailForm.visible = true;
this._restoreEmailForm.email.validValue = true;
this._restoreEmailForm.cancelButton.addEventListener(MouseEvent.CLICK,this.clickRestoreForm);
this._restoreEmailForm.recoverButton.addEventListener(MouseEvent.CLICK,this.clickRestoreForm);
}
public function invalidRestoreForm() : void
{
this._restoreEmailForm.email.validValue = false;
}
public function clickRestoreForm(e:MouseEvent) : void
{
if(e.currentTarget == this._restoreEmailForm.recoverButton)
{
dispatchEvent(new LoginFormEvent(LoginFormEvent.RESTORE_PRESSED));
}
else
{
this.hideRestoreForm();
}
}
public function hideRestoreForm() : void
{
this.checkPassword.visible = true;
this._restoreEmailForm.visible = false;
this.loginState = true;
this._restoreEmailForm.cancelButton.removeEventListener(MouseEvent.CLICK,this.clickRestoreForm);
this._restoreEmailForm.recoverButton.removeEventListener(MouseEvent.CLICK,this.clickRestoreForm);
}
public function hide() : void
{
stage.removeEventListener(Event.RESIZE,this.doLayout);
this.checkPassword.playButton.removeEventListener(MouseEvent.CLICK,this.playClick);
this.registerForm.playButton.removeEventListener(MouseEvent.CLICK,this.playClick);
this.checkPassword.registerButton.removeEventListener(MouseEvent.CLICK,this.switchState);
this.registerForm.loginButton.removeEventListener(MouseEvent.CLICK,this.switchState);
this.checkPassword.password.removeEventListener(KeyboardEvent.KEY_DOWN,this.playClickKey);
this.registerForm.hide();
if(this.checkPassword.captchaView != null)
{
this.checkPassword.captchaView.refreshBtn.removeEventListener(MouseEvent.CLICK,this.onRefreshCaptchaAuth);
}
if(this.registerForm.captchaView != null)
{
this.registerForm.captchaView.refreshBtn.removeEventListener(MouseEvent.CLICK,this.onRefreshCaptchaAuth);
}
if(this._restoreEmailForm.captchaView != null)
{
this._restoreEmailForm.captchaView.refreshBtn.removeEventListener(MouseEvent.CLICK,this.onRefreshCaptchaAuth);
}
}
}
}
|
package alternativa.tanks.gui.settings {
import flash.events.Event;
public class SelectTabEvent extends Event {
public static var SELECT_SETTING_TAB:String = "SelectTabEvent";
private var selectedCategory:SettingsCategoryEnum;
public function SelectTabEvent(param1:SettingsCategoryEnum) {
super(SELECT_SETTING_TAB);
this.selectedCategory = param1;
}
public function getSelectedCategory() : SettingsCategoryEnum {
return this.selectedCategory;
}
}
}
|
package projects.tanks.client.garage.models.garage.upgrade {
public interface IUpgradeGarageItemModelBase {
function itemAlreadyUpgraded(param1:int) : void;
}
}
|
package platform.client.fp10.core.network.command {
import alternativa.types.Long;
import flash.utils.ByteArray;
public class SpaceOpenedCommand implements IConnectionInitCommand {
public var spaceId:Long;
public var hash:ByteArray;
public function SpaceOpenedCommand(param1:Long, param2:ByteArray) {
super();
this.hash = param2;
this.spaceId = param1;
}
}
}
|
package alternativa.tanks.model.panel
{
import alternativa.osgi.service.dump.dumper.IDumper;
import flash.system.Capabilities;
public class CapabilitiesDumper implements IDumper
{
public function CapabilitiesDumper()
{
super();
}
public function dump(params:Vector.<String>) : String
{
var s:String = "\n\nCapabilities\n";
s += "\n os: " + Capabilities.os;
s += "\n version: " + Capabilities.version;
s += "\n playerType: " + Capabilities.playerType;
s += "\n isDebugger: " + Capabilities.isDebugger;
s += "\n language: " + Capabilities.language;
return s + ("\n screenResolution: " + Capabilities.screenResolutionX + " x " + Capabilities.screenResolutionY);
}
public function get dumperName() : String
{
return "capabilities";
}
}
}
|
package alternativa.tanks.model.battle {
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
[ModelInterface]
public interface BattleEntrance {
function fight(param1:BattleTeam = null) : void;
function enterAsSpectator() : void;
}
}
|
package alternativa.tanks.model.payment.shop.premium {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class PremiumPackageEvents implements PremiumPackage {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function PremiumPackageEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getDurationInDays() : int {
var result:int = 0;
var i:int = 0;
var m:PremiumPackage = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = PremiumPackage(this.impl[i]);
result = int(m.getDurationInDays());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.battlefield.effects
{
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.object.ClientObject;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.sfx.IGraphicEffect;
import alternativa.tanks.utils.objectpool.ObjectPool;
import alternativa.tanks.utils.objectpool.PooledObject;
public class DamageUpEffect extends PooledObject implements IGraphicEffect
{
private static const POP_HEIGHT:Number = 100;
private static const REST_HEIGHT:Number = 250;
private static const MAX_HEIGHT:Number = 300;
private static const POP_SPEED:Number = 1000;
private static const REST_SPEED:Number = 100;
private var damage:Sprite3D;
private var delay:int;
private var time:int;
private var maxHeight:Number;
private var visibleHeight:Number;
private var heightSpeed:Number;
private var x:Number;
private var y:Number;
private var z:Number;
private var object:Object3D;
private var container:Scene3DContainer;
private var variationX:Number;
private var variationY:Number;
public function DamageUpEffect(param1:ObjectPool)
{
super(param1);
this.damage = new Sprite3D(50,30);
}
public function init(param1:int, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number, param7:Number, param8:Number, param9:Number, param10:Number, param11:Object3D, param12:TextureMaterial, param13:String) : void
{
this.delay = param1;
this.damage.width = param2;
this.damage.height = param3;
this.damage.calculateBounds();
this.damage.rotation = param4;
this.maxHeight = param5;
this.visibleHeight = param6;
this.heightSpeed = param7;
this.x = param8;
this.y = param9;
this.z = param10;
this.object = param11;
this.damage.material = param12;
this.damage.softAttenuation = 150;
this.damage.depthMapAlphaThreshold = 2;
this.damage.shadowMapAlphaThreshold = 2;
this.damage.useShadowMap = false;
this.damage.useLight = false;
this.damage.depthTest = false;
this.damage.sorting = 1;
this.damage.perspectiveScale = false;
this.damage.blendMode = param13;
this.damage.alpha = 1;
this.time = 0;
}
public function addToContainer(param1:Scene3DContainer) : void
{
this.container = param1;
param1.addChild(this.damage);
}
public function play(param1:int, param2:GameCamera) : Boolean
{
var _loc3_:Number = NaN;
if(this.z >= this.maxHeight)
{
return false;
}
this.damage.x = this.object.x + this.x;
this.damage.y = this.object.y + this.y;
this.damage.z = this.object.z + this.z;
this.time += param1;
this.z += this.maxHeight * this.heightSpeed * param1 * 0.001;
if(this.z < this.visibleHeight)
{
this.damage.alpha = this.z / this.visibleHeight;
}
else
{
_loc3_ = (this.z - this.visibleHeight) / (this.maxHeight - this.visibleHeight);
this.damage.alpha = 1 - _loc3_ * _loc3_ * _loc3_ * _loc3_ * _loc3_ * _loc3_ * _loc3_ * _loc3_;
}
if(this.damage.alpha < 0)
{
this.damage.alpha = 0;
}
if(this.damage.alpha > 1)
{
this.damage.alpha = 1;
}
return true;
}
public function get owner() : ClientObject
{
return null;
}
public function destroy() : void
{
this.container.removeChild(this.damage);
this.container = null;
this.damage.material = null;
}
public function kill() : void
{
this.z = this.maxHeight;
this.damage.alpha = 0;
}
}
}
|
package alternativa.tanks.gui.shop.components.itemscategory {
import base.DiscreteSprite;
import controls.base.LabelBase;
public class ItemsCategoryViewHeader extends DiscreteSprite {
private var headerText:String;
private var descriptionText:String;
private var headerLabel:LabelBase;
private var descriptionLabel:LabelBase;
public function ItemsCategoryViewHeader(param1:String, param2:String) {
super();
this.headerText = param1;
this.descriptionText = param2;
this.init();
}
private function init() : void {
this.createHeaderLabel();
this.createDescriptionLabel();
}
private function createHeaderLabel() : void {
this.headerLabel = new LabelBase();
this.headerLabel.size = 18;
this.headerLabel.text = this.headerText;
addChild(this.headerLabel);
}
private function createDescriptionLabel() : void {
this.descriptionLabel = new LabelBase();
this.descriptionLabel.htmlText = this.descriptionText;
this.descriptionLabel.wordWrap = true;
addChild(this.descriptionLabel);
}
public function render(param1:int) : void {
this.headerLabel.width = param1;
this.descriptionLabel.width = param1;
this.descriptionLabel.y = this.headerLabel.y + this.headerLabel.height;
}
}
}
|
package alternativa.tanks.models.weapon.ricochet
{
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.collision.ICollisionDetector;
import alternativa.physics.collision.IRayCollisionPredicate;
import alternativa.physics.collision.types.RayIntersection;
import alternativa.tanks.models.weapon.shared.ICommonTargetEvaluator;
import alternativa.tanks.physics.CollisionGroup;
public class RicochetTargetSystem implements IRayCollisionPredicate
{
public var angleUp:Number;
public var numRaysUp:int;
public var angleDown:Number;
public var numRaysDown:int;
public var range:Number;
public var collisionDetector:ICollisionDetector;
public var targetEvaluator:ICommonTargetEvaluator;
private var rayHit:RayIntersection;
private var targetDistance:Number;
private var maxPriority:Number;
private var currOrigin:Vector3;
private var currDirection:Vector3;
private var dir:Vector3;
private var matrix:Matrix3;
private var ricochetCount:int;
private var shooterBody:Body;
public function RicochetTargetSystem(angleUp:Number, numRaysUp:int, angleDown:Number, numRaysDown:int, range:Number, collisionDetector:ICollisionDetector, targetEvaluator:ICommonTargetEvaluator)
{
this.rayHit = new RayIntersection();
this.currOrigin = new Vector3();
this.currDirection = new Vector3();
this.dir = new Vector3();
this.matrix = new Matrix3();
super();
this.init(angleUp,numRaysUp,angleDown,numRaysDown,range,collisionDetector,targetEvaluator);
}
public function init(angleUp:Number, numRaysUp:int, angleDown:Number, numRaysDown:int, range:Number, collisionDetector:ICollisionDetector, targetEvaluator:ICommonTargetEvaluator) : void
{
this.angleUp = angleUp;
this.numRaysUp = numRaysUp;
this.angleDown = angleDown;
this.numRaysDown = numRaysDown;
this.range = range;
this.collisionDetector = collisionDetector;
this.targetEvaluator = targetEvaluator;
}
public function getShotDirection(origin:Vector3, gunDir:Vector3, gunRotationAxis:Vector3, shooterBody:Body, result:Vector3) : Boolean
{
this.shooterBody = shooterBody;
this.maxPriority = 0;
this.targetDistance = this.range + 1;
this.checkDirection(origin,gunDir,0,result);
this.checkSector(origin,gunDir,gunRotationAxis,this.angleUp / this.numRaysUp,this.numRaysUp,result);
this.checkSector(origin,gunDir,gunRotationAxis,-this.angleDown / this.numRaysDown,this.numRaysDown,result);
this.shooterBody = null;
return this.targetDistance < this.range + 1;
}
public function considerBody(body:Body) : Boolean
{
return !(this.shooterBody == body && this.ricochetCount == 0);
}
private function checkDirection(origin:Vector3, direction:Vector3, angle:Number, result:Vector3) : void
{
var body:Body = null;
var distance:Number = NaN;
var targetPriority:Number = NaN;
var normal:Vector3 = null;
this.ricochetCount = 0;
var remainingDistance:Number = this.range;
var collisionGroup:int = CollisionGroup.WEAPON;
this.currOrigin.vCopy(origin);
this.currDirection.vCopy(direction);
while(remainingDistance > 0)
{
if(!this.collisionDetector.intersectRay(this.currOrigin,this.currDirection,collisionGroup,remainingDistance,this,this.rayHit))
{
return;
}
remainingDistance -= this.rayHit.t;
if(remainingDistance < 0)
{
remainingDistance = 0;
}
body = this.rayHit.primitive.body;
if(body != null && body != this.shooterBody)
{
distance = this.range - remainingDistance;
targetPriority = this.targetEvaluator.getTargetPriority(body,distance,angle);
if(targetPriority > this.maxPriority)
{
this.maxPriority = targetPriority;
this.targetDistance = distance;
result.vCopy(direction);
}
return;
}
++this.ricochetCount;
normal = this.rayHit.normal;
this.currDirection.vAddScaled(-2 * this.currDirection.vDot(normal),normal);
this.currOrigin.vCopy(this.rayHit.pos).vAddScaled(0.1,normal);
}
}
private function checkSector(origin:Vector3, gunDir:Vector3, gunRotationAxis:Vector3, angleStep:Number, numRays:int, result:Vector3) : void
{
this.dir.vCopy(gunDir);
this.matrix.fromAxisAngle(gunRotationAxis,angleStep);
if(angleStep < 0)
{
angleStep = -angleStep;
}
var angle:Number = angleStep;
for(var i:int = 0; i < numRays; i++,angle += angleStep)
{
this.dir.vTransformBy3(this.matrix);
this.checkDirection(origin,this.dir,angle,result);
}
}
}
}
|
package alternativa.tanks.gui.components.indicators {
import alternativa.tanks.models.service.ClanNotificationsManager;
import alternativa.types.Long;
public class NewCandidateIndicator extends LabelNewIndicator {
private var userId:Long;
private var _visible:Boolean = true;
public function NewCandidateIndicator(param1:Long) {
super();
this.userId = param1;
}
override public function hide() : void {
this._visible = false;
}
override public function show() : void {
this._visible = true;
}
override public function updateNotifications() : void {
visible = ClanNotificationsManager.userInIncomingNotifications(this.userId) && this._visible;
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ItemInfoPanel_bitmapPropertiesLeft extends BitmapAsset
{
public function ItemInfoPanel_bitmapPropertiesLeft()
{
super();
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_selfheatingIconClass.png")]
public class DeviceIcons_selfheatingIconClass extends BitmapAsset {
public function DeviceIcons_selfheatingIconClass() {
super();
}
}
}
|
package projects.tanks.client.battleselect.model.battle.team {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.battleselect.model.battle.entrance.user.BattleInfoUser;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class TeamBattleInfoModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:TeamBattleInfoModelServer;
private var client:ITeamBattleInfoModelBase = ITeamBattleInfoModelBase(this);
private var modelId:Long = Long.getLong(1548819686,-690668258);
private var _addUserId:Long = Long.getLong(1082637975,-979180615);
private var _addUser_userInfoCodec:ICodec;
private var _addUser_teamCodec:ICodec;
private var _removeUserId:Long = Long.getLong(1958615472,-14223454);
private var _removeUser_userIdCodec:ICodec;
private var _swapTeamsId:Long = Long.getLong(1033012780,-1733683120);
private var _updateTeamScoreId:Long = Long.getLong(344688414,904593895);
private var _updateTeamScore_teamCodec:ICodec;
private var _updateTeamScore_scoreCodec:ICodec;
private var _updateUserScoreId:Long = Long.getLong(344688125,389346965);
private var _updateUserScore_userIdCodec:ICodec;
private var _updateUserScore_scoreCodec:ICodec;
public function TeamBattleInfoModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new TeamBattleInfoModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(TeamBattleInfoCC,false)));
this._addUser_userInfoCodec = this._protocol.getCodec(new TypeCodecInfo(BattleInfoUser,false));
this._addUser_teamCodec = this._protocol.getCodec(new EnumCodecInfo(BattleTeam,false));
this._removeUser_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._updateTeamScore_teamCodec = this._protocol.getCodec(new EnumCodecInfo(BattleTeam,false));
this._updateTeamScore_scoreCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._updateUserScore_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._updateUserScore_scoreCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
}
protected function getInitParam() : TeamBattleInfoCC {
return TeamBattleInfoCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._addUserId:
this.client.addUser(BattleInfoUser(this._addUser_userInfoCodec.decode(param2)),BattleTeam(this._addUser_teamCodec.decode(param2)));
break;
case this._removeUserId:
this.client.removeUser(Long(this._removeUser_userIdCodec.decode(param2)));
break;
case this._swapTeamsId:
this.client.swapTeams();
break;
case this._updateTeamScoreId:
this.client.updateTeamScore(BattleTeam(this._updateTeamScore_teamCodec.decode(param2)),int(this._updateTeamScore_scoreCodec.decode(param2)));
break;
case this._updateUserScoreId:
this.client.updateUserScore(Long(this._updateUserScore_userIdCodec.decode(param2)),int(this._updateUserScore_scoreCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package _codec.projects.tanks.client.battleservice.model.battle.team {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class CodecBattleTeam implements ICodec {
public function CodecBattleTeam() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BattleTeam = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = BattleTeam.RED;
break;
case 1:
local2 = BattleTeam.BLUE;
break;
case 2:
local2 = BattleTeam.NONE;
}
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:int = int(param2.value);
param1.writer.writeInt(local3);
}
}
}
|
package projects.tanks.client.chat.models {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class CommunicationPanelModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function CommunicationPanelModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.models.weapon.rocketlauncher.weapon.salvo.aim {
import alternativa.tanks.utils.MathUtils;
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.filters.BitmapFilterQuality;
import flash.filters.GlowFilter;
import flash.geom.Matrix;
import flash.geom.Rectangle;
public class AimShape extends Sprite {
private static const halfSquareClass:Class = AimShape_halfSquareClass;
private static const halfSquare:BitmapData = new halfSquareClass().bitmapData;
private static const OFFSET_BETWEEN_SQUARES:int = 9;
private static const CIRCLE_FILL_COLOR:uint = 8056625;
private static const CIRCLE_BACKGROUND_COLOR:uint = 2456322;
private static const CIRCLE_THICKNESS:Number = 3;
private static const CIRCLE_RADIUS:Number = 28;
private const matrix:Matrix = new Matrix();
private var circleShape:Shape;
private var texture:BitmapData;
private var rectForClearing:Rectangle;
public function AimShape() {
super();
this.createSquare();
this.createCircleShape();
this.rectForClearing = new Rectangle(0,0,this.width,this.height);
}
private function createSquare() : void {
var local1:Graphics = graphics;
local1.beginBitmapFill(halfSquare);
local1.drawRect(0,0,halfSquare.width,halfSquare.height);
local1.endFill();
this.matrix.tx = -OFFSET_BETWEEN_SQUARES;
this.matrix.ty = -OFFSET_BETWEEN_SQUARES;
this.matrix.rotate(Math.PI);
local1.beginBitmapFill(halfSquare,this.matrix);
local1.drawRect(OFFSET_BETWEEN_SQUARES,OFFSET_BETWEEN_SQUARES,halfSquare.width,halfSquare.height);
local1.endFill();
}
private function createCircleShape() : void {
this.circleShape = new Shape();
this.circleShape.filters = [new GlowFilter(0,0.6,2,2,2,BitmapFilterQuality.HIGH)];
this.circleShape.x = halfSquare.width + OFFSET_BETWEEN_SQUARES >> 1;
this.circleShape.y = halfSquare.height + OFFSET_BETWEEN_SQUARES >> 1;
this.circleShape.visible = false;
addChild(this.circleShape);
this.matrix.identity();
this.matrix.tx = this.circleShape.x;
this.matrix.ty = this.circleShape.y;
}
public function setTexture(param1:BitmapData) : void {
this.texture = param1;
}
public function update(param1:Boolean, param2:Number = 0) : void {
this.texture.fillRect(this.rectForClearing,0);
this.circleShape.visible = !param1;
this.drawCircle(param2);
this.texture.draw(this);
}
private function drawCircle(param1:Number) : void {
var local5:Number = NaN;
var local6:Number = NaN;
if(!this.circleShape.visible) {
return;
}
param1 = MathUtils.clamp(param1,0,1);
var local2:Graphics = this.circleShape.graphics;
var local3:int = 0;
var local4:int = 0;
local2.clear();
local2.lineStyle(CIRCLE_THICKNESS,CIRCLE_BACKGROUND_COLOR);
local2.drawCircle(local3,local4,CIRCLE_RADIUS);
if(param1 > 0) {
local2.lineStyle(CIRCLE_THICKNESS,CIRCLE_FILL_COLOR);
local5 = Math.PI / 2;
local6 = local5 + MathUtils.PI2 * param1;
this.drawCircleSegment(local2,local3,local4,local5,local6,CIRCLE_RADIUS);
}
}
private function drawCircleSegment(param1:Graphics, param2:int, param3:int, param4:Number, param5:Number, param6:Number) : void {
var local12:Number = NaN;
var local13:Number = NaN;
var local14:Number = NaN;
var local15:Number = NaN;
var local16:Number = NaN;
param1.moveTo(param2 + Math.cos(param4) * param6,param3 + Math.sin(param4) * param6);
var local7:uint = 8;
var local8:Number = (param5 - param4) / local7;
var local9:Number = param4;
var local10:Number = param6 / Math.cos(local8 / 2);
var local11:int = 0;
while(local11 < local7) {
local9 += local8;
local12 = local9 - local8 / 2;
local13 = param2 + Math.cos(local12) * local10;
local14 = param3 + Math.sin(local12) * local10;
local15 = param2 + Math.cos(local9) * param6;
local16 = param3 + Math.sin(local9) * param6;
param1.curveTo(local13,local14,local15,local16);
local11++;
}
}
}
}
|
package alternativa.tanks.models.battlefield.gui.statistics.fps
{
import alternativa.init.Main;
import alternativa.tanks.model.PingService;
import alternativa.tanks.utils.MathUtils;
import controls.Label;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.TimerEvent;
import flash.filters.DropShadowFilter;
import flash.text.TextFieldAutoSize;
import flash.utils.Timer;
import flash.utils.getTimer;
import scpacker.networking.INetworker;
import scpacker.networking.Network;
public class FPSText extends Sprite
{
private const OFFSET_X:int = 70;
private const OFFSET_Y:int = 74;
private const FPS_OFFSET_X:int = 60;
private const NUM_FRAMES:int = 10;
private var fps:Label;
private var label:Label;
private var ping:Label;
private var pingLabel:Label;
private var tfDelay:int = 0;
private var tfTimer:int;
private var filter:DropShadowFilter;
private var timer:Timer;
public var colored:Boolean = false;
public function FPSText(color:Boolean = false)
{
this.fps = new Label();
this.label = new Label();
this.ping = new Label();
this.pingLabel = new Label();
this.filter = new DropShadowFilter(0,0,0,1,2,2,3,3,false,false,false);
super();
this.colored = color;
addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage);
}
private function onAddedToStage(e:Event) : void
{
this.label.autoSize = TextFieldAutoSize.LEFT;
this.label.color = 16777215;
this.label.text = "FPS: ";
this.label.selectable = false;
addChild(this.label);
this.fps.autoSize = TextFieldAutoSize.RIGHT;
this.fps.color = 16777215;
this.fps.text = Number(stage.frameRate).toFixed(2);
this.fps.selectable = false;
this.fps.bold = true;
if(this.colored)
{
this.fps.filters = [this.filter];
}
addChild(this.fps);
this.pingLabel.autoSize = TextFieldAutoSize.LEFT;
this.pingLabel.color = 16777215;
this.pingLabel.text = "PING: ";
this.pingLabel.selectable = false;
addChild(this.pingLabel);
this.ping.autoSize = TextFieldAutoSize.RIGHT;
this.ping.color = 16777215;
this.ping.text = "0";
this.ping.selectable = false;
this.ping.bold = true;
if(this.colored)
{
this.ping.filters = [this.filter];
}
addChild(this.ping);
this.tfTimer = getTimer();
this.onResize(null);
this.timer = new Timer(1000);
this.timer.addEventListener(TimerEvent.TIMER,this.sendRequest);
this.timer.start();
stage.addEventListener(Event.ENTER_FRAME,this.onEnterFrame);
stage.addEventListener(Event.RESIZE,this.onResize);
}
private function onRemovedFromStage(e:Event) : void
{
this.timer.removeEventListener(TimerEvent.TIMER,this.sendRequest);
this.timer.stop();
stage.removeEventListener(Event.ENTER_FRAME,this.onEnterFrame);
stage.removeEventListener(Event.RESIZE,this.onResize);
}
private function sendRequest(e:TimerEvent) : void
{
Network(Main.osgi.getService(INetworker)).send("battle;ping");
PingService.setReqTime();
}
private function onEnterFrame(e:Event) : void
{
var delta:uint = 0;
var now:int = 0;
var deltaP:int = 0;
var pingInt:int = 0;
var offset:Number = NaN;
var r:String = null;
var g:String = null;
if(++this.tfDelay >= this.NUM_FRAMES)
{
delta = this.tfTimer;
this.tfTimer = getTimer();
delta = this.tfTimer - delta;
this.fps.text = Number(1000 * this.tfDelay / delta).toFixed(2);
if(this.colored)
{
offset = Number(this.fps.text) / 60;
r = MathUtils.clamp(255 * (1 - offset) + 150,0,255).toString(16);
g = MathUtils.clamp(255 * offset + 150,0,255).toString(16);
this.fps.color = uint("0x" + (r == "0" ? "00" : r) + (g == "0" ? "00" : g) + "00");
this.fps.filters = [this.filter];
}
else
{
this.fps.color = 16777215;
this.fps.filters = null;
}
now = getTimer();
deltaP = now - PingService.getResTime();
pingInt = PingService.getPing();
if(pingInt > 0)
{
this.ping.text = pingInt.toString();
if(deltaP > 2000)
{
this.ping.text = "999";
}
if(this.colored)
{
if(Number(this.ping.text) > 500)
{
this.ping.color = 16711680;
}
else if(Number(this.ping.text) > 200)
{
this.ping.color = 16776960;
}
else
{
this.ping.color = 65297;
}
this.ping.filters = [this.filter];
}
else
{
this.ping.color = 16777215;
this.ping.filters = null;
}
}
this.tfDelay = 0;
}
}
private function onResize(e:Event) : void
{
x = stage.stageWidth - this.OFFSET_X;
y = stage.stageHeight - this.OFFSET_Y;
this.fps.x = this.FPS_OFFSET_X - this.fps.width;
this.fps.y = this.ping.y - this.ping.height;
this.label.y = this.ping.y - this.ping.height;
this.ping.x = this.FPS_OFFSET_X - this.ping.width;
}
}
}
|
package alternativa.tanks.models.teamlight {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IModeLightEvents implements IModeLight {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IModeLightEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getControlPointsMode() : ModeLight {
var result:ModeLight = null;
var i:int = 0;
var m:IModeLight = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IModeLight(this.impl[i]);
result = m.getControlPointsMode();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getCaptureFlagMode() : ModeLight {
var result:ModeLight = null;
var i:int = 0;
var m:IModeLight = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IModeLight(this.impl[i]);
result = m.getCaptureFlagMode();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.gui.settings.controls {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.settings.controls.TabIcons_accountTabIconClass.png")]
public class TabIcons_accountTabIconClass extends BitmapAsset {
public function TabIcons_accountTabIconClass() {
super();
}
}
}
|
package org.osflash.signals.natives {
import flash.events.Event;
import flash.events.IEventDispatcher;
public class NativeMappedSignal extends NativeRelaySignal {
protected var _eventClass:Class;
private var _mappingFunction:Function = null;
public function NativeMappedSignal(target:IEventDispatcher, eventType:String, eventClass:Class = null, ... mappedTypes) {
this._eventClass = eventClass || Event;
super(target,eventType);
valueClasses = mappedTypes;
}
public function get eventClass() : Class {
return this._eventClass;
}
protected function get mappingFunction() : Function {
return this._mappingFunction;
}
public function mapTo(... objectListOrFunction) : NativeMappedSignal {
if(this.isArgumentListAFunction(objectListOrFunction)) {
this._mappingFunction = objectListOrFunction[0] as Function;
if(this.hasFunctionMoreThanOneArgument(this._mappingFunction)) {
throw new ArgumentError("Mapping function has " + this._mappingFunction.length + " arguments but it needs zero or one of type Event");
}
} else {
this._mappingFunction = function():Object {
return objectListOrFunction;
};
}
return this;
}
private function isArgumentListAFunction(argList:Array) : Boolean {
return argList.length == 1 && argList[0] is Function;
}
private function hasFunctionMoreThanOneArgument(f:Function) : Boolean {
return f.length > 1;
}
override public function dispatch(... valueObjects) : void {
var mappedData:Object = null;
if(this.areValueObjectValidForMapping(valueObjects)) {
mappedData = this.mapEvent(valueObjects[0] as Event);
this.dispatchMappedData(mappedData);
} else {
super.dispatch.apply(null,valueObjects);
}
}
private function areValueObjectValidForMapping(valueObjects:Array) : Boolean {
return valueObjects.length == 1 && valueObjects[0] is this._eventClass;
}
private function dispatchMappedData(mappedData:Object) : void {
if(mappedData is Array) {
if(this.shouldArrayBePassedWithoutUnrolling) {
super.dispatch.call(null,mappedData);
} else {
super.dispatch.apply(null,mappedData);
}
} else {
super.dispatch.call(null,mappedData);
}
}
private function get shouldArrayBePassedWithoutUnrolling() : Boolean {
return _valueClasses.length == 1 && _valueClasses[0] == Array;
}
protected function get mappingFunctionWantsEvent() : Boolean {
return this._mappingFunction.length == 1;
}
protected function get mappingFunctionExists() : Boolean {
return this._mappingFunction != null;
}
protected function mapEvent(eventFromTarget:Event) : Object {
if(this.mappingFunctionExists) {
if(this.mappingFunctionWantsEvent) {
return this._mappingFunction(eventFromTarget);
}
return this._mappingFunction();
}
if(valueClasses.length == 0) {
return [];
}
throw new ArgumentError("There are valueClasses set to be dispatched <" + valueClasses + "> but mappingFunction is null.");
}
}
}
|
package alternativa.tanks.models.service {
import flash.events.Event;
public class ClanServiceEvent extends Event {
public static const CLAN_LOADING:String = "CreateClanServiceEvent.CLAN_LOADING";
public static const CLAN_BLOCK:String = "CreateClanServiceEvent.CLAN_BLOCK";
public var reasonBlock:String;
public function ClanServiceEvent(param1:String, param2:String = "", param3:Boolean = false, param4:Boolean = false) {
this.reasonBlock = param2;
super(param1,param3,param4);
}
}
}
|
package alternativa.gfx.agal
{
public class RelativeRegister extends CommonRegister
{
public function RelativeRegister(param1:int, param2:int)
{
super(param1,param2);
}
public function rel(param1:Register, param2:uint) : CommonRegister
{
relate(param1,param2);
return this;
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangsIcon_p18 extends BitmapAsset
{
public function RangsIcon_p18()
{
super();
}
}
}
|
package alternativa.tanks.ymservice {
import alternativa.tanks.newbieservice.NewbieUserService;
import flash.events.TimerEvent;
import flash.external.ExternalInterface;
import flash.utils.Timer;
public class YandexMetricaServiceImpl implements YandexMetricaService {
[Inject]
public static var newbieUserService:NewbieUserService;
private static const YM_REACH_GOAL:String = "YMReachGoal";
private static const YM_LOADED:String = "checkYMLoaded";
private static const COOKIE_EXISTS_FUNC:String = "Cookie.exists";
private static const WAS_IN_TUTORIAL:String = "FROM_TUTORIAL";
private var delayedExecutionTimer:Timer = new Timer(100);
private var reachedGoalsQueue:Vector.<String> = new Vector.<String>();
public function YandexMetricaServiceImpl() {
super();
this.delayedExecutionTimer.addEventListener(TimerEvent.TIMER,this.executeOnTimer);
}
private static function isYMAvailable() : Boolean {
return ExternalInterface.available && ExternalInterface.call(YM_LOADED);
}
private function executeOnTimer(param1:TimerEvent) : void {
if(this.reachedGoalsQueue.length > 0) {
this.executeTopQueueCommand();
} else {
this.delayedExecutionTimer.stop();
}
}
private function executeTopQueueCommand() : void {
var local1:String = null;
if(isYMAvailable()) {
local1 = this.reachedGoalsQueue.shift();
ExternalInterface.call(YM_REACH_GOAL,local1);
}
}
public function reachGoal(param1:String) : void {
this.reachedGoalsQueue.push(param1);
if(!this.delayedExecutionTimer.running) {
this.delayedExecutionTimer.start();
}
}
public function reachGoalIfPlayerWasInTutorial(param1:String) : void {
var local2:Boolean = ExternalInterface.available && ExternalInterface.call(COOKIE_EXISTS_FUNC,WAS_IN_TUTORIAL) > 0;
if(local2) {
this.reachGoal(param1);
}
}
public function reachGoalIfPlayerIsNewbie(param1:String) : void {
if(newbieUserService.isNewbieUser) {
this.reachGoalIfPlayerWasInTutorial(param1);
}
}
}
}
|
package alternativa.tanks.models.weapon.rocketlauncher.radio {
import alternativa.tanks.models.weapon.rocketlauncher.weapon.RocketLauncherWeaponProvider;
import projects.tanks.client.battlefield.models.tankparts.weapons.rocketlauncher.radio.IRocketLauncherRadioExplosionModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapons.rocketlauncher.radio.RocketLauncherRadioExplosionModelBase;
[ModelInfo]
public class RocketLauncherRadioExplosionModel extends RocketLauncherRadioExplosionModelBase implements IRocketLauncherRadioExplosionModelBase, RocketExplosion {
public function RocketLauncherRadioExplosionModel() {
super();
}
public function shellDestroyed(param1:int) : void {
RocketLauncherWeaponProvider(object.adapt(RocketLauncherWeaponProvider)).remoteWeapon().explodeRocket(param1);
}
}
}
|
package platform.clients.fp10.libraries.alternativapartners.errors {
public class PartnerHasNotPaymentUrlError extends Error {
public function PartnerHasNotPaymentUrlError(param1:Object) {
super();
message = "Partner hasn\'t payment URL. Partner: " + param1;
}
}
}
|
package alternativa.tanks.loader.dishonestprogressbar {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.loader.dishonestprogressbar.DishonestProgressBar_progressLineClass.png")]
public class DishonestProgressBar_progressLineClass extends BitmapAsset {
public function DishonestProgressBar_progressLineClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.artillery.sfx {
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
public class ArtillerySfxCC {
private var _chargingSound:SoundResource;
private var _explosionSound:SoundResource;
private var _explosionTexture:MultiframeTextureResource;
private var _farShotSound:SoundResource;
private var _flameTexture:TextureResource;
private var _flyBySound:SoundResource;
private var _lightingSFXEntity:LightingSFXEntity;
private var _markTexture:TextureResource;
private var _reloadSound:SoundResource;
private var _shot1Sound:SoundResource;
private var _shot2Sound:SoundResource;
private var _shot3Sound:SoundResource;
private var _shot4Sound:SoundResource;
private var _smokeTexture:MultiframeTextureResource;
private var _streamTexture:TextureResource;
private var _trailTexture:TextureResource;
public function ArtillerySfxCC(param1:SoundResource = null, param2:SoundResource = null, param3:MultiframeTextureResource = null, param4:SoundResource = null, param5:TextureResource = null, param6:SoundResource = null, param7:LightingSFXEntity = null, param8:TextureResource = null, param9:SoundResource = null, param10:SoundResource = null, param11:SoundResource = null, param12:SoundResource = null, param13:SoundResource = null, param14:MultiframeTextureResource = null, param15:TextureResource = null, param16:TextureResource = null) {
super();
this._chargingSound = param1;
this._explosionSound = param2;
this._explosionTexture = param3;
this._farShotSound = param4;
this._flameTexture = param5;
this._flyBySound = param6;
this._lightingSFXEntity = param7;
this._markTexture = param8;
this._reloadSound = param9;
this._shot1Sound = param10;
this._shot2Sound = param11;
this._shot3Sound = param12;
this._shot4Sound = param13;
this._smokeTexture = param14;
this._streamTexture = param15;
this._trailTexture = param16;
}
public function get chargingSound() : SoundResource {
return this._chargingSound;
}
public function set chargingSound(param1:SoundResource) : void {
this._chargingSound = param1;
}
public function get explosionSound() : SoundResource {
return this._explosionSound;
}
public function set explosionSound(param1:SoundResource) : void {
this._explosionSound = param1;
}
public function get explosionTexture() : MultiframeTextureResource {
return this._explosionTexture;
}
public function set explosionTexture(param1:MultiframeTextureResource) : void {
this._explosionTexture = param1;
}
public function get farShotSound() : SoundResource {
return this._farShotSound;
}
public function set farShotSound(param1:SoundResource) : void {
this._farShotSound = param1;
}
public function get flameTexture() : TextureResource {
return this._flameTexture;
}
public function set flameTexture(param1:TextureResource) : void {
this._flameTexture = param1;
}
public function get flyBySound() : SoundResource {
return this._flyBySound;
}
public function set flyBySound(param1:SoundResource) : void {
this._flyBySound = param1;
}
public function get lightingSFXEntity() : LightingSFXEntity {
return this._lightingSFXEntity;
}
public function set lightingSFXEntity(param1:LightingSFXEntity) : void {
this._lightingSFXEntity = param1;
}
public function get markTexture() : TextureResource {
return this._markTexture;
}
public function set markTexture(param1:TextureResource) : void {
this._markTexture = param1;
}
public function get reloadSound() : SoundResource {
return this._reloadSound;
}
public function set reloadSound(param1:SoundResource) : void {
this._reloadSound = param1;
}
public function get shot1Sound() : SoundResource {
return this._shot1Sound;
}
public function set shot1Sound(param1:SoundResource) : void {
this._shot1Sound = param1;
}
public function get shot2Sound() : SoundResource {
return this._shot2Sound;
}
public function set shot2Sound(param1:SoundResource) : void {
this._shot2Sound = param1;
}
public function get shot3Sound() : SoundResource {
return this._shot3Sound;
}
public function set shot3Sound(param1:SoundResource) : void {
this._shot3Sound = param1;
}
public function get shot4Sound() : SoundResource {
return this._shot4Sound;
}
public function set shot4Sound(param1:SoundResource) : void {
this._shot4Sound = param1;
}
public function get smokeTexture() : MultiframeTextureResource {
return this._smokeTexture;
}
public function set smokeTexture(param1:MultiframeTextureResource) : void {
this._smokeTexture = param1;
}
public function get streamTexture() : TextureResource {
return this._streamTexture;
}
public function set streamTexture(param1:TextureResource) : void {
this._streamTexture = param1;
}
public function get trailTexture() : TextureResource {
return this._trailTexture;
}
public function set trailTexture(param1:TextureResource) : void {
this._trailTexture = param1;
}
public function toString() : String {
var local1:String = "ArtillerySfxCC [";
local1 += "chargingSound = " + this.chargingSound + " ";
local1 += "explosionSound = " + this.explosionSound + " ";
local1 += "explosionTexture = " + this.explosionTexture + " ";
local1 += "farShotSound = " + this.farShotSound + " ";
local1 += "flameTexture = " + this.flameTexture + " ";
local1 += "flyBySound = " + this.flyBySound + " ";
local1 += "lightingSFXEntity = " + this.lightingSFXEntity + " ";
local1 += "markTexture = " + this.markTexture + " ";
local1 += "reloadSound = " + this.reloadSound + " ";
local1 += "shot1Sound = " + this.shot1Sound + " ";
local1 += "shot2Sound = " + this.shot2Sound + " ";
local1 += "shot3Sound = " + this.shot3Sound + " ";
local1 += "shot4Sound = " + this.shot4Sound + " ";
local1 += "smokeTexture = " + this.smokeTexture + " ";
local1 += "streamTexture = " + this.streamTexture + " ";
local1 += "trailTexture = " + this.trailTexture + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.gui.shop.windows {
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.osgi.service.display.IDisplay;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.shop.components.paymentview.PaymentView;
import alternativa.tanks.gui.shop.components.window.ShopWindowHeader;
import alternativa.tanks.gui.shop.components.window.ShopWindowNavigationBar;
import alternativa.tanks.gui.shop.windows.bugreport.PaymentBugReportBlock;
import alternativa.tanks.model.coin.CoinInfoService;
import alternativa.tanks.model.coin.CoinsChangedEvent;
import alternativa.tanks.model.payment.paymentstate.PaymentState;
import alternativa.tanks.model.payment.shop.notification.service.ShopNotifierService;
import alternativa.tanks.service.settings.ISettingsService;
import alternativa.tanks.tracker.ITrackerService;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import flash.events.Event;
import flash.events.MouseEvent;
import forms.TankWindowWithHeader;
import platform.clients.fp10.libraries.alternativapartners.service.IPartnerService;
import projects.tanks.client.commons.socialnetwork.SocialNetworkEnum;
import projects.tanks.client.commons.types.ShopCategoryEnum;
import projects.tanks.clients.flash.commons.services.payment.PaymentDisplayService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.blur.IBlurService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.IDialogsService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow;
import projects.tanks.clients.fp10.libraries.tanksservices.service.storage.IStorageService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
public class ShopWindow extends DialogWindow {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var blurService:IBlurService;
[Inject]
public static var display:IDisplay;
[Inject]
public static var clientLog:IClientLog;
[Inject]
public static var dialogsService:IDialogsService;
[Inject]
public static var userPropertyService:IUserPropertiesService;
[Inject]
public static var storageService:IStorageService;
[Inject]
public static var trackerService:ITrackerService;
[Inject]
public static var settingsService:ISettingsService;
[Inject]
public static var paymentDisplayService:PaymentDisplayService;
[Inject]
public static var shopNotifierService:ShopNotifierService;
[Inject]
public static var partnerService:IPartnerService;
[Inject]
public static var coinInfoService:CoinInfoService;
public static const WINDOW_PADDING:int = 11;
public static const WINDOW_WIDTH:int = 915;
private static const WINDOW_MAX_HEIGHT:int = 691;
private static const WINDOW_MIN_HEIGHT:int = 580;
private var window:TankWindowWithHeader;
private var header:ShopWindowHeader;
private var headerLayerIndex:int;
private var navigationBar:ShopWindowNavigationBar;
private var paymentView:PaymentView;
private var bugReportBlock:PaymentBugReportBlock;
private var closeButton:DefaultButtonBase;
private var eulaLink:LabelBase = new LabelBase();
private var privacyAndCookiesLink:LabelBase = new LabelBase();
private var purchaseInstructionLink:LabelBase = new LabelBase();
private var params:ShopWindowParams;
private var nextXPosition:Number = 11;
private var coinsLabel:LabelBase = new LabelBase();
public function ShopWindow(param1:ShopWindowParams) {
super();
this.params = param1;
this.createWindow();
this.createWindowHeader();
this.createNavigationBar();
this.createBugReportBlock();
this.createCloseButton();
if(this.needLinks()) {
this.createLinks();
}
this.createCoinLabel();
shopNotifierService.hideNotification();
}
private function createCoinLabel() : void {
this.coinsLabel.x = this.nextXPosition;
this.coinsLabel.text = coinInfoService.getCoins().toString();
coinInfoService.addEventListener(CoinsChangedEvent.EVENT_TYPE,this.onCoinsChanged);
if(coinInfoService.enabled) {
addChild(this.coinsLabel);
}
}
private function onCoinsChanged(param1:CoinsChangedEvent) : void {
this.coinsLabel.text = param1.coins.toString();
}
private function needLinks() : Boolean {
return partnerService.getEnvironmentPartnerId() != SocialNetworkEnum.ODNOKLASSNIKI_INTERNAL.name.toLocaleLowerCase();
}
private function createWindow() : void {
this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_MONEYSHOP);
this.window.width = WINDOW_WIDTH;
addChild(this.window);
}
private function createWindowHeader() : void {
this.header = new ShopWindowHeader(localeService.getText(TanksLocale.TEXT_SHOP_WINDOW_HEADER_DESCRIPTION));
this.header.x = WINDOW_PADDING;
this.header.y = WINDOW_PADDING;
this.header.resize(WINDOW_WIDTH - WINDOW_PADDING * 2);
addChild(this.header);
this.headerLayerIndex = numChildren;
}
private function createNavigationBar() : void {
this.navigationBar = new ShopWindowNavigationBar(this.params.shopCategories,this.params.shopItems);
this.navigationBar.y = this.header.y + this.header.height;
this.navigationBar.resize(WINDOW_WIDTH);
addChild(this.navigationBar);
}
private function createBugReportBlock() : void {
this.bugReportBlock = new PaymentBugReportBlock();
this.bugReportBlock.x = WINDOW_PADDING;
addChild(this.bugReportBlock);
}
private function createCloseButton() : void {
this.closeButton = new DefaultButtonBase();
this.closeButton.tabEnabled = false;
this.closeButton.label = localeService.getText(TanksLocale.TEXT_CLOSE_LABEL);
this.closeButton.x = WINDOW_WIDTH - this.closeButton.width - 2 * WINDOW_PADDING;
this.closeButton.addEventListener(MouseEvent.CLICK,this.onCancelClick);
addChild(this.closeButton);
}
private function createLinks() : void {
var local1:String = localeService.getText(TanksLocale.TEXT_SHOP_WINDOW_PURCHASE_INSTRUCTION);
if(local1 != "") {
this.purchaseInstructionLink.htmlText = local1;
this.purchaseInstructionLink.x = this.nextXPosition;
addChild(this.purchaseInstructionLink);
this.nextXPosition += this.purchaseInstructionLink.textWidth + WINDOW_PADDING * 2;
}
var local2:String = localeService.getText(TanksLocale.TEXT_SHOP_WINDOW_EULA_LINK);
if(local2 != "") {
this.eulaLink.htmlText = local2;
this.eulaLink.x = this.nextXPosition;
addChild(this.eulaLink);
this.nextXPosition += this.eulaLink.textWidth + WINDOW_PADDING * 2;
}
var local3:String = localeService.getText(TanksLocale.TEXT_SHOP_WINDOW_PRIVACY_AND_COOKIES_POLICY_LINK);
if(local3 != "") {
this.privacyAndCookiesLink.htmlText = local3;
this.privacyAndCookiesLink.x = this.nextXPosition;
addChild(this.privacyAndCookiesLink);
this.nextXPosition += this.privacyAndCookiesLink.textWidth + WINDOW_PADDING * 2;
}
}
public function show() : void {
display.stage.addEventListener(Event.RESIZE,this.render);
this.render();
dialogsService.addDialog(this);
}
public function navigateToCategory(param1:ShopCategoryEnum) : void {
if(param1 != ShopCategoryEnum.NO_CATEGORY) {
this.navigationBar.navigateToCategoryByType(param1);
}
}
public function switchToPaymentState(param1:PaymentState, param2:PaymentView) : void {
if(Boolean(this.paymentView) && contains(this.paymentView)) {
removeChild(this.paymentView);
this.paymentView.destroy();
}
this.paymentView = param2;
this.paymentView.window = this;
addChildAt(this.paymentView,this.headerLayerIndex - 1);
this.navigationBar.switchToState(param1);
this.render();
this.paymentView.postRender();
}
public function get currentPaymentView() : PaymentView {
return this.paymentView;
}
private function onCancelClick(param1:MouseEvent) : void {
this.cancelKeyPressed();
}
override protected function cancelKeyPressed() : void {
paymentDisplayService.closePayment();
}
public function destroy() : void {
if(Boolean(this.paymentView)) {
this.paymentView.destroy();
}
this.navigationBar.destroy();
display.stage.removeEventListener(Event.RESIZE,this.render);
this.closeButton.removeEventListener(MouseEvent.CLICK,this.onCancelClick);
coinInfoService.removeEventListener(CoinsChangedEvent.EVENT_TYPE,this.onCoinsChanged);
dialogsService.removeDialog(this);
display.stage.focus = null;
}
public function render(param1:Event = null) : void {
this.window.height = Math.round(Math.max(WINDOW_MIN_HEIGHT,Math.min(display.stage.stageHeight - 60,WINDOW_MAX_HEIGHT)));
this.closeButton.y = this.window.height - this.closeButton.height - WINDOW_PADDING;
this.eulaLink.y = this.privacyAndCookiesLink.y = this.purchaseInstructionLink.y = this.window.height - this.eulaLink.height - WINDOW_PADDING;
this.coinsLabel.y = this.eulaLink.y;
this.bugReportBlock.y = this.closeButton.y - this.bugReportBlock.height - 3;
this.bugReportBlock.width = WINDOW_WIDTH - WINDOW_PADDING - this.bugReportBlock.x;
if(Boolean(this.paymentView)) {
this.paymentView.x = WINDOW_PADDING;
this.paymentView.y = this.header.y + this.header.height + this.navigationBar.height;
this.paymentView.render(WINDOW_WIDTH - WINDOW_PADDING * 2,this.bugReportBlock.y - this.paymentView.y - 3);
}
}
override public function get height() : Number {
return this.window.height;
}
override public function get width() : Number {
return this.window.width;
}
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.guestform {
import mx.core.FontAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.models.tankspartnersmodel.guestform.GuestForm_ttfFont.ttf",
fontName="Quadrat",
fontFamily="QuadratGroteskNewCTT",
mimeType="application/x-font",
fontWeight="normal",
fontStyle="normal",
unicodeRange="U+0020,U+0025,U+0030-0039,U+0041-005B,U+0410-042F",
advancedAntiAliasing="true",
embedAsCFF="false"
)]
public class GuestForm_ttfFont extends FontAsset {
public function GuestForm_ttfFont() {
super();
}
}
}
|
package alternativa.tanks.view.mainview.button {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.mainview.button.DisabledButtonSkin_middleClass.png")]
public class DisabledButtonSkin_middleClass extends BitmapAsset {
public function DisabledButtonSkin_middleClass() {
super();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapon.shot {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.tankparts.weapon.shot.ShotCC;
public class VectorCodecShotCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecShotCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ShotCC,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = int(LengthCodecHelper.decodeLength(param1));
var local3:Vector.<ShotCC> = new Vector.<ShotCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ShotCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ShotCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ShotCC> = Vector.<ShotCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.