code
stringlengths 57
237k
|
|---|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_cooldownBoostClass.png")]
public class ItemInfoPanelBitmaps_cooldownBoostClass extends BitmapAsset {
public function ItemInfoPanelBitmaps_cooldownBoostClass() {
super();
}
}
}
|
package alternativa.tanks.model
{
import alternativa.init.Main;
import alternativa.model.IModel;
import alternativa.service.IModelService;
import com.alternativaplatform.projects.tanks.client.garage.effects.effectableitem.EffectableItemModelBase;
import com.alternativaplatform.projects.tanks.client.garage.effects.effectableitem.IEffectableItemModelBase;
import flash.utils.Dictionary;
public class ItemEffectModel extends EffectableItemModelBase implements IEffectableItemModelBase, IItemEffect
{
private var modelRegister:IModelService;
private var remainingTime:Dictionary;
private var timers:Dictionary;
private var idByTimer:Dictionary;
public function ItemEffectModel()
{
super();
_interfaces.push(IModel);
_interfaces.push(IItemEffect);
_interfaces.push(IEffectableItemModelBase);
this.remainingTime = new Dictionary();
this.idByTimer = new Dictionary();
this.modelRegister = Main.osgi.getService(IModelService) as IModelService;
}
public function setRemaining(clientObject:String, remaining:Number) : void
{
var i:int = 0;
this.remainingTime[clientObject] = remaining;
var listeners:Vector.<IModel> = this.modelRegister.getModelsByInterface(IItemEffectListener);
if(listeners != null)
{
for(i = 0; i < listeners.length; i++)
{
(listeners[i] as IItemEffectListener).setTimeRemaining(clientObject,remaining);
}
}
}
public function effectStopped(clientObject:String) : void
{
var i:int = 0;
this.remainingTime[clientObject] = null;
var listeners:Vector.<IModel> = this.modelRegister.getModelsByInterface(IItemEffectListener);
if(listeners != null)
{
for(i = 0; i < listeners.length; i++)
{
(listeners[i] as IItemEffectListener).effectStopped(clientObject);
}
}
}
public function getTimeRemaining(itemId:String) : Number
{
return Number(this.remainingTime[itemId]);
}
}
}
|
package alternativa.tanks.display.usertitle
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ProgressBarSkin_weaponLeftCls extends BitmapAsset
{
public function ProgressBarSkin_weaponLeftCls()
{
super();
}
}
}
|
package alternativa.engine3d.animation {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.animation.events.NotifyEvent;
import alternativa.engine3d.core.Object3D;
import flash.utils.Dictionary;
import flash.utils.getTimer;
use namespace alternativa3d;
public class AnimationController {
private var _root:AnimationNode;
private var _objects:Vector.<Object>;
private var _object3ds:Vector.<Object3D> = new Vector.<Object3D>();
private var objectsUsedCount:Dictionary = new Dictionary();
private var states:Object = new Object();
private var lastTime:int = -1;
alternativa3d var nearestNotifyers:AnimationNotify;
public function AnimationController() {
super();
}
public function get root() : AnimationNode {
return this._root;
}
public function set root(param1:AnimationNode) : void {
if(this._root != param1) {
if(this._root != null) {
this._root.alternativa3d::setController(null);
this._root.alternativa3d::_isActive = false;
}
if(param1 != null) {
param1.alternativa3d::setController(this);
param1.alternativa3d::_isActive = true;
}
this._root = param1;
}
}
public function update() : void {
var local1:Number = NaN;
var local2:AnimationState = null;
var local3:int = 0;
var local4:int = 0;
var local6:int = 0;
var local7:Object3D = null;
if(this.lastTime < 0) {
this.lastTime = getTimer();
local1 = 0;
} else {
local6 = getTimer();
local1 = 0.001 * (local6 - this.lastTime);
this.lastTime = local6;
}
if(this._root == null) {
return;
}
for each(local2 in this.states) {
local2.reset();
}
this._root.alternativa3d::update(local1,1);
local3 = 0;
local4 = int(this._object3ds.length);
while(local3 < local4) {
local7 = this._object3ds[local3];
local2 = this.states[local7.name];
if(local2 != null) {
local2.apply(local7);
}
local3++;
}
var local5:AnimationNotify = this.alternativa3d::nearestNotifyers;
while(local5 != null) {
if(local5.willTrigger(NotifyEvent.NOTIFY)) {
local5.dispatchEvent(new NotifyEvent(local5));
}
local5 = local5.alternativa3d::processNext;
}
this.alternativa3d::nearestNotifyers = null;
}
alternativa3d function addObject(param1:Object) : void {
if(param1 in this.objectsUsedCount) {
++this.objectsUsedCount[param1];
} else {
if(param1 is Object3D) {
this._object3ds.push(param1);
} else {
this._objects.push(param1);
}
this.objectsUsedCount[param1] = 1;
}
}
alternativa3d function removeObject(param1:Object) : void {
var local3:int = 0;
var local4:int = 0;
var local5:int = 0;
var local2:int = int(this.objectsUsedCount[param1]);
local2--;
if(local2 <= 0) {
if(param1 is Object3D) {
local3 = int(this._object3ds.indexOf(param1));
local5 = this._object3ds.length - 1;
local4 = local3 + 1;
while(local3 < local5) {
this._object3ds[local3] = this._object3ds[local4];
local3++;
local4++;
}
this._object3ds.length = local5;
} else {
local3 = int(this._objects.indexOf(param1));
local5 = this._objects.length - 1;
local4 = local3 + 1;
while(local3 < local5) {
this._objects[local3] = this._objects[local4];
local3++;
local4++;
}
this._objects.length = local5;
}
delete this.objectsUsedCount[param1];
} else {
this.objectsUsedCount[param1] = local2;
}
}
alternativa3d function getState(param1:String) : AnimationState {
var local2:AnimationState = this.states[param1];
if(local2 == null) {
local2 = new AnimationState();
this.states[param1] = local2;
}
return local2;
}
public function freeze() : void {
this.lastTime = -1;
}
}
}
|
package controls.cellrenderer {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.cellrenderer.CellNormal_normalCenter.png")]
public class CellNormal_normalCenter extends BitmapAsset {
public function CellNormal_normalCenter() {
super();
}
}
}
|
package alternativa.tanks.gui.icons {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.icons.CrystalIcon_smallCrystal.png")]
public class CrystalIcon_smallCrystal extends BitmapAsset {
public function CrystalIcon_smallCrystal() {
super();
}
}
}
|
package alternativa.osgi.service.debug
{
public class DebugService implements IDebugService
{
public function DebugService()
{
super();
}
}
}
|
package alternativa.tanks.gui
{
import alternativa.init.Main;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.locale.constants.TextConst;
import controls.Label;
import controls.TankCombo;
import controls.TankWindowInner;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.geom.Point;
import forms.payment.PaymentList;
import utils.TextUtils;
public class SMSblock extends Sprite
{
private const windowMargin:int = 11;
private const spaceModule:int = 7;
public var countriesCombo:TankCombo;
public var operatorsCombo:TankCombo;
private var comboWidth:int = 200;
private var comboLabelWidth:int = 50;
public var smsTextLabel:Label;
private var smsText:Label;
private var smsTextBmp:Bitmap;
public var numbersList:PaymentList;
private var numbersListInner:TankWindowInner;
private var smsTextInner:TankWindowInner;
private var oneText:Boolean;
private var size:Point;
public function SMSblock()
{
super();
var localeService:ILocaleService = ILocaleService(Main.osgi.getService(ILocaleService));
this.size = new Point();
this.numbersListInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.numbersListInner.showBlink = true;
addChild(this.numbersListInner);
this.smsTextInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.smsTextInner.showBlink = true;
addChild(this.smsTextInner);
this.numbersList = new PaymentList();
addChild(this.numbersList);
this.smsTextLabel = new Label();
this.smsTextLabel.text = localeService.getText(TextConst.PAYMENT_SMSTEXT_HEADER_LABEL_TEXT);
addChild(this.smsTextLabel);
this.smsText = new Label();
this.smsTextBmp = new Bitmap();
addChild(this.smsTextBmp);
this.operatorsCombo = new TankCombo();
addChild(this.operatorsCombo);
this.operatorsCombo.label = localeService.getText(TextConst.PAYMENT_OPERATORS_LABEL_TEXT);
this.countriesCombo = new TankCombo();
addChild(this.countriesCombo);
this.countriesCombo.label = localeService.getText(TextConst.PAYMENT_COUNTRIES_LABEL_TEXT);
this.numbersList.withSMSText = false;
this.smsTextInner.visible = false;
this.smsTextLabel.visible = false;
this.smsTextBmp.visible = false;
}
public function resize(width:int, height:int) : void
{
var newSize:int = 0;
this.size.x = width;
this.size.y = height;
this.countriesCombo.width = int(width * 0.5) - this.comboLabelWidth - this.windowMargin;
this.operatorsCombo.width = int(width * 0.5) - this.comboLabelWidth - this.windowMargin;
this.countriesCombo.x = this.comboLabelWidth;
this.operatorsCombo.x = int(width * 0.5) + this.comboLabelWidth + this.windowMargin;
this.graphics.drawRect(this.comboLabelWidth,0,int(width * 0.5) - this.comboLabelWidth - this.windowMargin,this.countriesCombo.height);
this.graphics.drawRect(int(width * 0.5) + this.comboLabelWidth + this.windowMargin,0,int(width * 0.5) - this.comboLabelWidth - this.windowMargin,this.operatorsCombo.height);
if(this.oneText)
{
this.smsTextInner.width = width - this.comboLabelWidth;
this.smsTextInner.height = 50;
this.smsTextInner.x = this.comboLabelWidth;
this.smsTextInner.y = this.spaceModule * 5;
if(this.smsText.text != null && this.smsText.text != "")
{
newSize = Math.min(12 + int((this.size.x - 447) * 0.03) + int((28 - this.smsText.text.length) * 0.3),20);
this.smsText.size = newSize;
this.smsTextBmp.bitmapData = TextUtils.getTextInCells(this.smsText,11 * (newSize / 12),16 * (newSize / 12));
this.smsTextBmp.x = this.smsTextInner.x + this.spaceModule * 2;
this.smsTextBmp.y = this.smsTextInner.y + (this.smsTextInner.height - this.smsTextBmp.height >> 1);
}
this.smsTextLabel.x = this.smsTextInner.x - this.spaceModule - this.smsTextLabel.width;
this.smsTextLabel.y = this.smsTextInner.y + (this.smsTextInner.height - this.smsTextLabel.height >> 1);
this.numbersListInner.y = this.smsTextInner.y + this.smsTextInner.height + this.spaceModule;
}
else
{
this.numbersListInner.y = this.spaceModule * 5;
}
this.numbersListInner.width = width;
this.numbersListInner.height = height - this.numbersListInner.y;
this.numbersList.x = 5;
this.numbersList.y = this.numbersListInner.y + 5;
this.numbersList.width = width - 10;
this.numbersList.height = height - this.numbersListInner.y - 10;
}
public function set smsString(value:String) : void
{
var newSize:int = 0;
if(value != null && value != "")
{
this.smsTextBmp.visible = true;
this.smsText.text = value;
newSize = Math.min(12 + int((this.size.x - 447) * 0.03) + int((28 - this.smsText.text.length) * 0.3),20);
this.smsText.size = newSize;
this.smsTextBmp.bitmapData = TextUtils.getTextInCells(this.smsText,11 * (newSize / 12),16 * (newSize / 12));
this.smsTextBmp.x = this.smsTextInner.x + this.spaceModule * 2;
this.smsTextBmp.y = this.smsTextInner.y + (this.smsTextInner.height - this.smsTextBmp.height >> 1);
}
else
{
this.smsTextBmp.visible = false;
}
}
public function set oneTextForAllNumbers(value:Boolean) : void
{
this.oneText = value;
this.numbersList.withSMSText = !value;
this.smsTextInner.visible = value;
this.smsTextLabel.visible = value;
this.smsTextBmp.visible = value;
this.resize(this.size.x,this.size.y);
}
}
}
|
package _codec.projects.tanks.client.battleservice {
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.battleservice.BattleMode;
public class VectorCodecBattleModeLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecBattleModeLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(BattleMode,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.<BattleMode> = new Vector.<BattleMode>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = BattleMode(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:BattleMode = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<BattleMode> = Vector.<BattleMode>(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 projects.tanks.client.battlefield.models.drone.demoman {
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
public class DroneExplosionCC {
private var _explosionTexture:MultiframeTextureResource;
public function DroneExplosionCC(param1:MultiframeTextureResource = null) {
super();
this._explosionTexture = param1;
}
public function get explosionTexture() : MultiframeTextureResource {
return this._explosionTexture;
}
public function set explosionTexture(param1:MultiframeTextureResource) : void {
this._explosionTexture = param1;
}
public function toString() : String {
var local1:String = "DroneExplosionCC [";
local1 += "explosionTexture = " + this.explosionTexture + " ";
return local1 + "]";
}
}
}
|
package scpacker.test.spectator
{
public class MovementMethods
{
private var methods:Vector.<MovementMethod>;
private var currentMethodIndex:int;
public function MovementMethods(param1:Vector.<MovementMethod>)
{
super();
this.methods = param1;
}
public function getMethod() : MovementMethod
{
return this.methods[this.currentMethodIndex];
}
public function selectNextMethod() : void
{
this.currentMethodIndex = (this.currentMethodIndex + 1) % this.methods.length;
}
}
}
|
package controls.scroller.gray
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ScrollSkinGray_trackBottom extends BitmapAsset
{
public function ScrollSkinGray_trackBottom()
{
super();
}
}
}
|
package alternativa.tanks.models.weapon.angles.verticals {
import projects.tanks.client.battlefield.models.tankparts.weapon.angles.verticals.autoaiming.IWeaponVerticalAnglesModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapon.angles.verticals.autoaiming.WeaponVerticalAnglesModelBase;
[ModelInfo]
public class WeaponVerticalAnglesModel extends WeaponVerticalAnglesModelBase implements IWeaponVerticalAnglesModelBase, VerticalAngles {
public function WeaponVerticalAnglesModel() {
super();
}
public function getAngleUp() : Number {
return getInitParam().angleUp;
}
public function getAngleDown() : Number {
return getInitParam().angleDown;
}
}
}
|
package alternativa.tanks.services {
import alternativa.types.Long;
import flash.events.IEventDispatcher;
import projects.tanks.client.chat.models.news.showing.NewsItemData;
public interface NewsService extends IEventDispatcher {
function setInitialNewsItems(param1:Vector.<NewsItemData>) : void;
function addNewsItem(param1:NewsItemData) : void;
function removeNewsItem(param1:Long) : void;
function setIsViewed(param1:Long) : void;
function isViewed(param1:NewsItemData) : Boolean;
function setNewsAddingCallback(param1:Function) : void;
function resetNewsAddingCallback() : void;
function setHasUnreadNewsCallback(param1:Function) : void;
function resetHasUnreadNewsCallback() : void;
function clearExpiredReadNews() : void;
function cleanup() : void;
function getUnreadNewsItems() : Vector.<NewsItemData>;
}
}
|
package alternativa.tanks.sfx.drone {
import flash.media.Sound;
import platform.client.fp10.core.type.AutoClosable;
import projects.tanks.client.battlefield.models.drone.DroneSFXCC;
public class DroneSFXData implements AutoClosable {
public var activationSound:Sound;
public function DroneSFXData(param1:DroneSFXCC) {
super();
this.activationSound = param1.activationSound.sound;
}
public function close() : void {
this.activationSound = this.activationSound;
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist.list {
import alternativa.types.Long;
import fl.data.DataProvider;
public class ClanMembersDataProvider extends DataProvider {
private var _getItemAtHandler:Function;
public function ClanMembersDataProvider() {
super();
}
public function getItemIndexById(param1:Long) : int {
var local2:Object = null;
var local3:int = int(length);
var local4:int = 0;
while(local4 < local3) {
local2 = this.getItemAt(local4);
if(local2 && local2.hasOwnProperty("id") && local2["id"] == param1) {
return local4;
}
local4++;
}
return -1;
}
public function get getItemAtHandler() : Function {
return this._getItemAtHandler;
}
public function set getItemAtHandler(param1:Function) : void {
this._getItemAtHandler = param1;
}
override public function getItemAt(param1:uint) : Object {
var local2:Object = super.getItemAt(param1);
if(this.getItemAtHandler != null) {
this.getItemAtHandler(local2);
}
return local2;
}
}
}
|
package alternativa.tanks.sfx {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
import flash.geom.ColorTransform;
public class SFXUtils {
private static var axis1:Vector3 = new Vector3();
private static var axis2:Vector3 = new Vector3();
private static var eulerAngles:Vector3 = new Vector3();
private static var targetAxisZ:Vector3 = new Vector3();
private static var objectAxis:Vector3 = new Vector3();
private static var matrix1:Matrix3 = new Matrix3();
private static var matrix2:Matrix3 = new Matrix3();
public function SFXUtils() {
super();
}
public static function alignObjectPlaneToView(param1:Object3D, param2:Vector3, param3:Vector3, param4:Vector3) : void {
var local5:Number = NaN;
var local6:Number = NaN;
if(param3.y < -0.9999999 || param3.y > 0.9999999) {
axis1.x = 0;
axis1.y = 0;
axis1.z = 1;
local5 = param3.y < 0 ? Math.PI : 0;
} else {
axis1.x = param3.z;
axis1.y = 0;
axis1.z = -param3.x;
axis1.normalize();
local5 = Math.acos(param3.y);
}
matrix1.fromAxisAngle(axis1,local5);
targetAxisZ.x = param4.x - param2.x;
targetAxisZ.y = param4.y - param2.y;
targetAxisZ.z = param4.z - param2.z;
local6 = targetAxisZ.x * param3.x + targetAxisZ.y * param3.y + targetAxisZ.z * param3.z;
targetAxisZ.x -= local6 * param3.x;
targetAxisZ.y -= local6 * param3.y;
targetAxisZ.z -= local6 * param3.z;
targetAxisZ.normalize();
matrix1.transformVector(Vector3.Z_AXIS,objectAxis);
local6 = objectAxis.x * targetAxisZ.x + objectAxis.y * targetAxisZ.y + objectAxis.z * targetAxisZ.z;
axis2.x = objectAxis.y * targetAxisZ.z - objectAxis.z * targetAxisZ.y;
axis2.y = objectAxis.z * targetAxisZ.x - objectAxis.x * targetAxisZ.z;
axis2.z = objectAxis.x * targetAxisZ.y - objectAxis.y * targetAxisZ.x;
axis2.normalize();
local5 = Math.acos(local6);
matrix2.fromAxisAngle(axis2,local5);
matrix1.append(matrix2);
matrix1.getEulerAngles(eulerAngles);
param1.rotationX = eulerAngles.x;
param1.rotationY = eulerAngles.y;
param1.rotationZ = eulerAngles.z;
param1.x = param2.x;
param1.y = param2.y;
param1.z = param2.z;
}
public static function setEffectParams(param1:Object3D) : void {
param1.softAttenuation = 80;
param1.useLight = false;
param1.shadowMapAlphaThreshold = 2;
param1.depthMapAlphaThreshold = 2;
param1.useShadowMap = false;
}
public static function copyColorTransform(param1:ColorTransform, param2:ColorTransform) : void {
param2.redMultiplier = param1.redMultiplier;
param2.greenMultiplier = param1.greenMultiplier;
param2.blueMultiplier = param1.blueMultiplier;
param2.alphaMultiplier = param1.alphaMultiplier;
param2.redOffset = param1.redOffset;
param2.greenOffset = param1.greenOffset;
param2.blueOffset = param1.blueOffset;
param2.alphaOffset = param1.alphaOffset;
}
public static function calculateAlphaForObject(param1:Object3D, param2:Vector3, param3:Vector3, param4:Boolean, param5:Number, param6:Number) : void {
var local7:Number = param2.x - param1.x;
var local8:Number = param2.y - param1.y;
var local9:Number = param2.z - param1.z;
var local10:Number = Math.sqrt(local7 * local7 + local8 * local8 + local9 * local9);
local7 /= local10;
local8 /= local10;
local9 /= local10;
var local11:Number = Math.abs(local7 * param3.x + local8 * param3.y + local9 * param3.z);
if(param4) {
local11 = 1 - local11;
}
local11 = Math.pow(local11,param5);
param1.alpha = 1 - local11 / param6;
if(param1.alpha < 0) {
param1.alpha = 0;
}
}
}
}
|
package alternativa.engine3d.core {
public class MipMapping {
public static const NONE:int = 0;
public static const OBJECT_DISTANCE:int = 1;
public static const PER_PIXEL:int = 2;
public function MipMapping() {
super();
}
}
}
|
package alternativa.tanks.gui.device {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.buttons.TimerButton;
import alternativa.tanks.gui.buttons.TimerButtonEvent;
import alternativa.tanks.gui.crystalbutton.CrystalButton;
import alternativa.tanks.gui.device.list.DeviceBorder;
import alternativa.tanks.service.delaymountcategory.IDelayMountCategoryService;
import alternativa.tanks.service.device.DeviceOwningType;
import alternativa.tanks.service.device.DeviceService;
import alternativa.tanks.service.item.ItemService;
import alternativa.tanks.service.temporaryitem.ITemporaryItemService;
import base.DiscreteSprite;
import controls.labels.MouseDisabledLabel;
import controls.timer.CountDownTimer;
import controls.timer.CountDownTimerWithIcon;
import flash.display.Bitmap;
import flash.utils.getTimer;
import forms.ColorConstants;
import platform.client.fp10.core.resource.types.ImageResource;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService;
import utils.preview.IImageResource;
import utils.preview.ImageResourceLoadingWrapper;
public class DevicePanel extends DiscreteSprite implements IImageResource {
[Inject]
public static var itemService:ItemService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var delayMountCategoryService:IDelayMountCategoryService;
[Inject]
public static var lobbyLayoutService:ILobbyLayoutService;
[Inject]
public static var temporaryItemService:ITemporaryItemService;
[Inject]
public static var deviceService:DeviceService;
private static const ICON_SIZE:int = 64;
private static const DESCRIPTION_WIDTH:int = 200;
private var icon:Bitmap = new Bitmap();
public var buyButton:CrystalButton = new CrystalButton();
public var mountButton:TimerButton = new TimerButton();
public var rentTimerWithIcon:CountDownTimerWithIcon = new CountDownTimerWithIcon(false);
private var border:DeviceBorder;
private var iconResource:ImageResource;
private var iconLoadListener:ImageResourceLoadingWrapper;
private var timer:CountDownTimer;
public var device:IGameObject;
public var targetItem:IGameObject;
public function DevicePanel(param1:IGameObject, param2:IGameObject) {
super();
this.targetItem = param1;
this.device = param2;
this.icon.x = 30;
this.icon.y = 20;
if(param2 == null) {
this.icon.bitmapData = DevicesIcons.iconDefaultDeviceBitmap;
} else {
this.iconResource = itemService.getPreviewResource(param2);
if(Boolean(this.iconResource.isLazy) && !this.iconResource.isLoaded) {
this.iconLoadListener = new ImageResourceLoadingWrapper(this);
if(!this.iconResource.isLoading) {
this.iconResource.loadLazyResource(this.iconLoadListener);
} else {
this.iconResource.addLazyListener(this.iconLoadListener);
}
} else {
this.icon.bitmapData = this.iconResource.data;
}
}
addChild(this.icon);
var local3:MouseDisabledLabel = new MouseDisabledLabel();
local3.size = 18;
local3.color = ColorConstants.GREEN_TEXT;
local3.width = DESCRIPTION_WIDTH;
local3.wordWrap = true;
local3.x = this.icon.x + ICON_SIZE + 10;
local3.y = 20;
local3.text = param2 != null ? itemService.getName(param2) : localeService.getText(TanksLocale.TEXT_DEVICES_STANDARD_SETTINGS);
addChild(local3);
var local4:MouseDisabledLabel = new MouseDisabledLabel();
local4.color = ColorConstants.GREEN_TEXT;
local4.multiline = true;
local4.wordWrap = true;
local4.width = DESCRIPTION_WIDTH;
local4.x = local3.x;
local4.y = local3.y + local3.height + 8;
local4.text = param2 != null ? itemService.getDescription(param2) : localeService.getText(TanksLocale.TEXT_DEVICES_STANDARD_SETTINGS_DESCRIPTION);
addChild(local4);
this.border = new DeviceBorder(local4.y + local4.height + 20,this.getDeviceOwnType() == DeviceOwningType.BOUGHT);
this.border.x = 10;
addChild(this.border);
this.mountButton.x = this.border.x + this.border.width - this.mountButton.width - 20;
this.mountButton.y = this.border.height - this.mountButton.height * 2 - 10 >> 1;
addChild(this.mountButton);
this.buyButton.setText(localeService.getText(TanksLocale.TEXT_GARAGE_BUY_TEXT));
this.buyButton.setCost(param2 != null ? int(itemService.getPrice(param2)) : 0);
this.buyButton.setSale(param2 != null && itemService.getDiscount(param2) != 0);
this.buyButton.x = this.mountButton.x;
this.buyButton.y = this.border.height - this.buyButton.height >> 1;
addChild(this.buyButton);
this.rentTimerWithIcon.x = this.icon.x;
this.rentTimerWithIcon.y = this.buyButton.y + this.buyButton.height - this.rentTimerWithIcon.height;
addChild(this.rentTimerWithIcon);
}
public function updatePanel(param1:Boolean) : void {
this.stopCountDownTimer();
var local2:DeviceOwningType = this.getDeviceOwnType();
this.buyButton.visible = local2 != DeviceOwningType.BOUGHT;
this.mountButton.visible = local2 != DeviceOwningType.NOT_OWNED;
if(local2 != DeviceOwningType.NOT_OWNED) {
this.mountButton.enabled = !param1;
this.mountButton.label = localeService.getText(param1 ? TanksLocale.TEXT_GARAGE_EQUIPPED_TEXT : TanksLocale.TEXT_GARAGE_INFO_PANEL_BUTTON_EQUIP_TEXT);
if(this.mountButton.enabled) {
this.updateMountButtonTimer();
}
}
if(local2 == DeviceOwningType.RENT) {
this.startCountDownTimer();
}
if(local2 == DeviceOwningType.BOUGHT) {
this.mountButton.y = this.border.height - this.mountButton.height >> 1;
}
}
private function updateMountButtonTimer() : void {
var local1:CountDownTimer = delayMountCategoryService.getDownTimer(this.targetItem);
if(Boolean(lobbyLayoutService.inBattle()) && local1.getRemainingSeconds() > 0 && Boolean(itemService.isMounted(this.targetItem))) {
this.mountButton.startTimer(local1);
this.mountButton.addEventListener(TimerButtonEvent.TIME_ON_COMPLETE_TIMER_BUTTON,this.onCompletedTimer);
}
}
private function stopCountDownTimer() : void {
this.rentTimerWithIcon.visible = false;
if(this.timer != null) {
this.rentTimerWithIcon.stop();
this.timer.stop();
this.timer = null;
}
}
private function startCountDownTimer() : void {
this.stopCountDownTimer();
this.timer = new CountDownTimer();
this.timer.start(getTimer() + temporaryItemService.getCurrentTimeRemainingMSec(this.device));
this.rentTimerWithIcon.start(this.timer);
this.rentTimerWithIcon.visible = true;
}
public function destroy() : void {
if(this.iconLoadListener != null) {
this.iconResource.removeLazyListener(this.iconLoadListener);
}
this.stopCountDownTimer();
this.mountButton.removeEventListener(TimerButtonEvent.TIME_ON_COMPLETE_TIMER_BUTTON,this.onCompletedTimer);
}
public function setPreviewResource(param1:ImageResource) : void {
this.icon.bitmapData = param1.data;
}
private function getDeviceOwnType() : DeviceOwningType {
return deviceService.getDeviceOwnType(this.device);
}
private function onCompletedTimer(param1:TimerButtonEvent) : void {
TimerButton(param1.target).enabled = true;
}
}
}
|
package alternativa.tanks.view.layers {
import flash.events.Event;
public class EntranceViewEvent extends Event {
public static var SHOW:String = "EntranceViewEvent::Show";
public static var HIDE:String = "EntranceViewEvent::Hide";
public function EntranceViewEvent(param1:String) {
super(param1);
}
}
}
|
package alternativa.tanks.gui.settings.controls {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.settings.controls.TabIcons_controlTabIconClass.png")]
public class TabIcons_controlTabIconClass extends BitmapAsset {
public function TabIcons_controlTabIconClass() {
super();
}
}
}
|
package alternativa.tanks.models.weapon.healing.targeting {
import alternativa.physics.Body;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.weapon.shared.CommonTargetEvaluator;
import alternativa.tanks.models.weapon.shared.HealingGunTargetEvaluator;
import alternativa.tanks.models.weapons.targeting.priority.targeting.TargetPriorityCalculator;
import projects.tanks.client.battlefield.models.tankparts.weapon.healing.IsisCC;
public class IsisTargetPriorityCalculator implements TargetPriorityCalculator {
[Inject]
public static var battleService:BattleService;
private const COMMON_PRIORITY_WEIGHT:Number = 0.0001;
private const LOCK_RANGE_DELTA:Number = 50;
private const CURRENT_TARGET_BONUS:Number = 100;
private var commonTargetEvaluator:CommonTargetEvaluator;
private var targetEvaluator:HealingGunTargetEvaluator;
private var maxAngle:Number;
private var fullDamageDistance:Number;
private var target:Tank;
public function IsisTargetPriorityCalculator(param1:IsisCC) {
super();
this.commonTargetEvaluator = battleService.getCommonTargetEvaluator();
this.targetEvaluator = battleService.getHealingGunTargetEvaluator();
this.fullDamageDistance = param1.radius - this.LOCK_RANGE_DELTA;
this.maxAngle = param1.coneAngle;
}
public function setTarget(param1:Tank) : void {
this.target = param1;
}
public function resetTarget() : void {
this.target = null;
}
public function getTargetPriority(param1:Tank, param2:Number, param3:Number) : Number {
if(param1.health == 0) {
return 0;
}
var local4:Body = param1.getBody();
var local5:Number = Number(this.commonTargetEvaluator.getTargetPriority(local4,param2,param3,this.fullDamageDistance,this.maxAngle));
return this.targetEvaluator.getTargetPriority(local4) + local5 * this.COMMON_PRIORITY_WEIGHT + this.calculateBonusForLastTarget(param1);
}
private function calculateBonusForLastTarget(param1:Tank) : Number {
return param1 != this.target ? 0 : this.CURRENT_TARGET_BONUS;
}
}
}
|
package alternativa.tanks.models.weapon.common {
import alternativa.tanks.utils.EncryptedNumber;
import alternativa.tanks.utils.EncryptedNumberImpl;
public class WeaponCommonData {
private var maxTurretRotationSpeed:EncryptedNumber;
private var turretRotationAcceleration:EncryptedNumber;
private var impactForce:EncryptedNumber;
private var recoilForce:EncryptedNumber;
public function WeaponCommonData(param1:Number, param2:Number, param3:Number, param4:Number) {
super();
this.maxTurretRotationSpeed = new EncryptedNumberImpl(param1);
this.turretRotationAcceleration = new EncryptedNumberImpl(param2);
this.impactForce = new EncryptedNumberImpl(param3);
this.recoilForce = new EncryptedNumberImpl(param4);
}
public function getMaxTurretRotationSpeed() : Number {
return this.maxTurretRotationSpeed.getNumber();
}
public function getTurretRotationAcceleration() : Number {
return this.turretRotationAcceleration.getNumber();
}
public function getImpactForce() : Number {
return this.impactForce.getNumber();
}
public function getRecoilForce() : Number {
return this.recoilForce.getNumber();
}
public function setRecoilForce(param1:Number) : void {
this.recoilForce.setNumber(param1);
}
}
}
|
package alternativa.tanks.physics
{
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.BodyList;
import alternativa.physics.BodyListItem;
import alternativa.physics.CollisionPrimitiveListItem;
import alternativa.physics.Contact;
import alternativa.physics.ContactPoint;
import alternativa.physics.altphysics;
import alternativa.physics.collision.CollisionKdNode;
import alternativa.physics.collision.CollisionKdTree;
import alternativa.physics.collision.CollisionPrimitive;
import alternativa.physics.collision.ICollider;
import alternativa.physics.collision.ICollisionDetector;
import alternativa.physics.collision.IRayCollisionPredicate;
import alternativa.physics.collision.colliders.BoxBoxCollider;
import alternativa.physics.collision.colliders.BoxRectCollider;
import alternativa.physics.collision.colliders.BoxSphereCollider;
import alternativa.physics.collision.colliders.BoxTriangleCollider;
import alternativa.physics.collision.types.BoundBox;
import alternativa.physics.collision.types.RayIntersection;
use namespace altphysics;
public class TanksCollisionDetector implements ICollisionDetector
{
public var tree:CollisionKdTree;
public var bodies:BodyList;
public var threshold:Number = 1.0E-4;
private var colliders:Object;
private var _time:MinMax;
private var _n:Vector3;
private var _o:Vector3;
private var _dynamicIntersection:RayIntersection;
private var _rayAABB:BoundBox;
private const _rayHit:RayIntersection = new RayIntersection();
public function TanksCollisionDetector()
{
this.colliders = {};
this._time = new MinMax();
this._n = new Vector3();
this._o = new Vector3();
this._dynamicIntersection = new RayIntersection();
this._rayAABB = new BoundBox();
super();
this.tree = new CollisionKdTree();
this.bodies = new BodyList();
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.BOX,new BoxBoxCollider());
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.RECT,new BoxRectCollider());
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.TRIANGLE,new BoxTriangleCollider());
this.addCollider(CollisionPrimitive.BOX,CollisionPrimitive.SPHERE,new BoxSphereCollider());
}
public function buildKdTree(collisionPrimitives:Vector.<CollisionPrimitive>, boundBox:BoundBox = null) : void
{
this.tree.createTree(collisionPrimitives,boundBox);
}
public function addBody(body:Body) : void
{
this.bodies.append(body);
}
public function removeBody(body:Body) : void
{
this.bodies.remove(body);
}
public function getAllContacts(contact:Contact) : Contact
{
var cpListItem1:CollisionPrimitiveListItem = null;
var body:Body = null;
var cpListItem2:CollisionPrimitiveListItem = null;
var bodyListItem2:BodyListItem = null;
var otherBody:Body = null;
var abort:Boolean = false;
var primitive1:CollisionPrimitive = null;
var bodyListItem1:BodyListItem = this.bodies.head;
while(bodyListItem1 != null)
{
body = bodyListItem1.body;
if(!body.frozen)
{
cpListItem1 = body.collisionPrimitives.head;
while(cpListItem1 != null)
{
contact = this.getPrimitiveNodeCollisions(this.tree.rootNode,cpListItem1.primitive,contact);
cpListItem1 = cpListItem1.next;
}
}
bodyListItem2 = bodyListItem1.next;
while(bodyListItem2 != null)
{
otherBody = bodyListItem2.body;
if(body.frozen && otherBody.frozen || !body.aabb.intersects(otherBody.aabb,0.1))
{
bodyListItem2 = bodyListItem2.next;
}
else
{
cpListItem1 = body.collisionPrimitives.head;
abort = false;
while(cpListItem1 != null && !abort)
{
primitive1 = cpListItem1.primitive;
cpListItem2 = otherBody.collisionPrimitives.head;
while(cpListItem2 != null)
{
if(this.getContact(primitive1,cpListItem2.primitive,contact))
{
if(body.postCollisionPredicate != null && !body.postCollisionPredicate.considerBodies(body,otherBody) || otherBody.postCollisionPredicate != null && !otherBody.postCollisionPredicate.considerBodies(otherBody,body))
{
abort = true;
break;
}
contact = contact.next;
}
cpListItem2 = cpListItem2.next;
}
cpListItem1 = cpListItem1.next;
}
bodyListItem2 = bodyListItem2.next;
}
}
bodyListItem1 = bodyListItem1.next;
}
return contact;
}
public function getContact(prim1:CollisionPrimitive, prim2:CollisionPrimitive, contact:Contact) : Boolean
{
var pen:Number = NaN;
var i:int = 0;
if((prim1.collisionGroup & prim2.collisionGroup) == 0)
{
return false;
}
if(prim1.body != null && prim1.body == prim2.body)
{
return false;
}
if(!prim1.aabb.intersects(prim2.aabb,0.01))
{
return false;
}
var colliderId:int = prim1.type <= prim2.type ? int(int(prim1.type << 16 | prim2.type)) : int(int(prim2.type << 16 | prim1.type));
var collider:ICollider = this.colliders[colliderId];
if(collider != null && collider.getContact(prim1,prim2,contact))
{
if(prim1.postCollisionPredicate != null && !prim1.postCollisionPredicate.considerCollision(prim2))
{
return false;
}
if(prim2.postCollisionPredicate != null && !prim2.postCollisionPredicate.considerCollision(prim1))
{
return false;
}
if(prim1.body != null)
{
var _loc8_:* = prim1.body.contactsNum++;
prim1.body.contacts[_loc8_] = contact;
}
if(prim2.body != null)
{
_loc8_ = prim2.body.contactsNum++;
prim2.body.contacts[_loc8_] = contact;
}
contact.maxPenetration = (contact.points[0] as ContactPoint).penetration;
for(i = contact.pcount - 1; i >= 1; i--)
{
if((pen = (contact.points[i] as ContactPoint).penetration) > contact.maxPenetration)
{
contact.maxPenetration = pen;
}
}
return true;
}
return false;
}
public function testCollision(prim1:CollisionPrimitive, prim2:CollisionPrimitive) : Boolean
{
if((prim1.collisionGroup & prim2.collisionGroup) == 0)
{
return false;
}
if(prim1.body != null && prim1.body == prim2.body)
{
return false;
}
if(!prim1.aabb.intersects(prim2.aabb,0.01))
{
return false;
}
var colliderId:int = prim1.type <= prim2.type ? int(int(prim1.type << 16 | prim2.type)) : int(int(prim2.type << 16 | prim1.type));
var collider:ICollider = this.colliders[colliderId];
if(collider != null && collider.haveCollision(prim1,prim2))
{
if(prim1.postCollisionPredicate != null && !prim1.postCollisionPredicate.considerCollision(prim2))
{
return false;
}
if(prim2.postCollisionPredicate != null && !prim2.postCollisionPredicate.considerCollision(prim1))
{
return false;
}
return true;
}
return false;
}
public function hasStaticHit(param1:Vector3, param2:Vector3, param3:int, param4:Number) : Boolean
{
return Boolean(this.raycastStatic(param1,param2,param3,param4,this._rayHit));
}
public function raycastStatic(param1:Vector3, param2:Vector3, param3:int, param4:Number, param6:RayIntersection) : Boolean
{
if(!this.getRayBoundBoxIntersection(param1,param2,this.tree.rootNode.boundBox,this._time))
{
return false;
}
if(this._time.max < 0 || this._time.min > param4)
{
return false;
}
if(this._time.min <= 0)
{
this._time.min = 0;
this._o.x = param1.x;
this._o.y = param1.y;
this._o.z = param1.z;
}
else
{
this._o.x = param1.x + this._time.min * param2.x;
this._o.y = param1.y + this._time.min * param2.y;
this._o.z = param1.z + this._time.min * param2.z;
}
if(this._time.max > param4)
{
this._time.max = param4;
}
var _loc7_:Boolean = this.testRayAgainstNode(this.tree.rootNode,param1,this._o,param2,param3,this._time.min,this._time.max,null,param6);
return !!_loc7_ ? Boolean(Boolean(Boolean(param6.t <= param4))) : Boolean(Boolean(Boolean(false)));
}
public function intersectRay(origin:Vector3, dir:Vector3, collisionGroup:int, maxTime:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
var hasStaticIntersection:Boolean = this.intersectRayWithStatic(origin,dir,collisionGroup,maxTime,predicate,result);
var hasDynamicIntersection:Boolean = this.intersectRayWithDynamic(origin,dir,collisionGroup,maxTime,predicate,this._dynamicIntersection);
if(!(hasDynamicIntersection || hasStaticIntersection))
{
return false;
}
if(hasDynamicIntersection && hasStaticIntersection)
{
if(result.t > this._dynamicIntersection.t)
{
result.copy(this._dynamicIntersection);
}
return true;
}
if(hasStaticIntersection)
{
return true;
}
result.copy(this._dynamicIntersection);
return true;
}
public function intersectRayWithStatic(origin:Vector3, dir:Vector3, collisionGroup:int, maxTime:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
if(!this.getRayBoundBoxIntersection(origin,dir,this.tree.rootNode.boundBox,this._time))
{
return false;
}
if(this._time.max < 0 || this._time.min > maxTime)
{
return false;
}
if(this._time.min <= 0)
{
this._time.min = 0;
this._o.x = origin.x;
this._o.y = origin.y;
this._o.z = origin.z;
}
else
{
this._o.x = origin.x + this._time.min * dir.x;
this._o.y = origin.y + this._time.min * dir.y;
this._o.z = origin.z + this._time.min * dir.z;
}
if(this._time.max > maxTime)
{
this._time.max = maxTime;
}
var hasIntersection:Boolean = this.testRayAgainstNode(this.tree.rootNode,origin,this._o,dir,collisionGroup,this._time.min,this._time.max,predicate,result);
return !!hasIntersection ? Boolean(Boolean(result.t <= maxTime)) : Boolean(Boolean(false));
}
public function testPrimitiveTreeCollision(primitive:CollisionPrimitive) : Boolean
{
return this.testPrimitiveNodeCollision(primitive,this.tree.rootNode);
}
private function addCollider(type1:int, type2:int, collider:ICollider) : void
{
this.colliders[type1 <= type2 ? type1 << 16 | type2 : type2 << 16 | type1] = collider;
}
private function getPrimitiveNodeCollisions(node:CollisionKdNode, primitive:CollisionPrimitive, contact:Contact) : Contact
{
var min:Number = NaN;
var max:Number = NaN;
var primitives:Vector.<CollisionPrimitive> = null;
var indices:Vector.<int> = null;
var i:int = 0;
if(node.indices != null)
{
primitives = this.tree.staticChildren;
indices = node.indices;
for(i = indices.length - 1; i >= 0; i--)
{
if(this.getContact(primitive,primitives[indices[i]],contact))
{
contact = contact.next;
}
}
}
if(node.axis == -1)
{
return contact;
}
switch(node.axis)
{
case 0:
min = primitive.aabb.minX;
max = primitive.aabb.maxX;
break;
case 1:
min = primitive.aabb.minY;
max = primitive.aabb.maxY;
break;
case 2:
min = primitive.aabb.minZ;
max = primitive.aabb.maxZ;
}
if(min < node.coord)
{
contact = this.getPrimitiveNodeCollisions(node.negativeNode,primitive,contact);
}
if(max > node.coord)
{
contact = this.getPrimitiveNodeCollisions(node.positiveNode,primitive,contact);
}
if(node.splitTree != null && min < node.coord && max > node.coord)
{
contact = this.getPrimitiveNodeCollisions(node.splitTree.rootNode,primitive,contact);
}
return contact;
}
private function testPrimitiveNodeCollision(primitive:CollisionPrimitive, node:CollisionKdNode) : Boolean
{
var min:Number = NaN;
var max:Number = NaN;
var primitives:Vector.<CollisionPrimitive> = null;
var indices:Vector.<int> = null;
var i:int = 0;
if(node.indices != null)
{
primitives = this.tree.staticChildren;
indices = node.indices;
for(i = indices.length - 1; i >= 0; i--)
{
if(this.testCollision(primitive,primitives[indices[i]]))
{
return true;
}
}
}
if(node.axis == -1)
{
return false;
}
switch(node.axis)
{
case 0:
min = primitive.aabb.minX;
max = primitive.aabb.maxX;
break;
case 1:
min = primitive.aabb.minY;
max = primitive.aabb.maxY;
break;
case 2:
min = primitive.aabb.minZ;
max = primitive.aabb.maxZ;
}
if(node.splitTree != null && min < node.coord && max > node.coord)
{
if(this.testPrimitiveNodeCollision(primitive,node.splitTree.rootNode))
{
return true;
}
}
if(min < node.coord)
{
if(this.testPrimitiveNodeCollision(primitive,node.negativeNode))
{
return true;
}
}
if(max > node.coord)
{
if(this.testPrimitiveNodeCollision(primitive,node.positiveNode))
{
return true;
}
}
return false;
}
private function intersectRayWithDynamic(origin:Vector3, dir:Vector3, collisionGroup:int, maxTime:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
var minTime:Number = NaN;
var body:Body = null;
var aabb:BoundBox = null;
var listItem:CollisionPrimitiveListItem = null;
var primitive:CollisionPrimitive = null;
var t:Number = NaN;
var xx:Number = origin.x + dir.x * maxTime;
var yy:Number = origin.y + dir.y * maxTime;
var zz:Number = origin.z + dir.z * maxTime;
if(xx < origin.x)
{
this._rayAABB.minX = xx;
this._rayAABB.maxX = origin.x;
}
else
{
this._rayAABB.minX = origin.x;
this._rayAABB.maxX = xx;
}
if(yy < origin.y)
{
this._rayAABB.minY = yy;
this._rayAABB.maxY = origin.y;
}
else
{
this._rayAABB.minY = origin.y;
this._rayAABB.maxY = yy;
}
if(zz < origin.z)
{
this._rayAABB.minZ = zz;
this._rayAABB.maxZ = origin.z;
}
else
{
this._rayAABB.minZ = origin.z;
this._rayAABB.maxZ = zz;
}
minTime = maxTime + 1;
var bodyItem:BodyListItem = this.bodies.head;
while(bodyItem != null)
{
body = bodyItem.body;
aabb = body.aabb;
if(this._rayAABB.maxX < aabb.minX || this._rayAABB.minX > aabb.maxX || this._rayAABB.maxY < aabb.minY || this._rayAABB.minY > aabb.maxY || this._rayAABB.maxZ < aabb.minZ || this._rayAABB.minZ > aabb.maxZ)
{
bodyItem = bodyItem.next;
}
else
{
listItem = body.collisionPrimitives.head;
while(listItem != null)
{
primitive = listItem.primitive;
if((primitive.collisionGroup & collisionGroup) == 0)
{
listItem = listItem.next;
}
else
{
aabb = primitive.aabb;
if(this._rayAABB.maxX < aabb.minX || this._rayAABB.minX > aabb.maxX || this._rayAABB.maxY < aabb.minY || this._rayAABB.minY > aabb.maxY || this._rayAABB.maxZ < aabb.minZ || this._rayAABB.minZ > aabb.maxZ)
{
listItem = listItem.next;
}
else if(predicate != null && !predicate.considerBody(body))
{
listItem = listItem.next;
}
else
{
t = primitive.getRayIntersection(origin,dir,this.threshold,this._n);
if(t >= 0 && t < minTime)
{
minTime = t;
result.primitive = primitive;
result.normal.x = this._n.x;
result.normal.y = this._n.y;
result.normal.z = this._n.z;
}
listItem = listItem.next;
}
}
}
bodyItem = bodyItem.next;
}
}
if(minTime > maxTime)
{
return false;
}
result.pos.x = origin.x + dir.x * minTime;
result.pos.y = origin.y + dir.y * minTime;
result.pos.z = origin.z + dir.z * minTime;
result.t = minTime;
return true;
}
private function getRayBoundBoxIntersection(origin:Vector3, dir:Vector3, bb:BoundBox, time:MinMax) : Boolean
{
var t1:Number = NaN;
var t2:Number = NaN;
time.min = -1;
time.max = 1e+308;
for(var i:int = 0; i < 3; i++)
{
switch(i)
{
case 0:
if(!(dir.x < this.threshold && dir.x > -this.threshold))
{
t1 = (bb.minX - origin.x) / dir.x;
t2 = (bb.maxX - origin.x) / dir.x;
break;
}
if(origin.x < bb.minX || origin.x > bb.maxX)
{
return false;
}
continue;
case 1:
if(!(dir.y < this.threshold && dir.y > -this.threshold))
{
t1 = (bb.minY - origin.y) / dir.y;
t2 = (bb.maxY - origin.y) / dir.y;
break;
}
if(origin.y < bb.minY || origin.y > bb.maxY)
{
return false;
}
continue;
case 2:
if(!(dir.z < this.threshold && dir.z > -this.threshold))
{
t1 = (bb.minZ - origin.z) / dir.z;
t2 = (bb.maxZ - origin.z) / dir.z;
}
if(origin.z < bb.minZ || origin.z > bb.maxZ)
{
return false;
}
continue;
}
if(t1 < t2)
{
if(t1 > time.min)
{
time.min = t1;
}
if(t2 < time.max)
{
time.max = t2;
}
}
else
{
if(t2 > time.min)
{
time.min = t2;
}
if(t1 < time.max)
{
time.max = t1;
}
}
if(time.max < time.min)
{
return false;
}
}
return true;
}
private function testRayAgainstNode(node:CollisionKdNode, origin:Vector3, localOrigin:Vector3, dir:Vector3, collisionGroup:int, t1:Number, t2:Number, predicate:IRayCollisionPredicate, result:RayIntersection) : Boolean
{
var splitTime:Number = NaN;
var currChildNode:CollisionKdNode = null;
var intersects:Boolean = false;
var splitNode:CollisionKdNode = null;
var i:int = 0;
var primitive:CollisionPrimitive = null;
if(node.indices != null && this.getRayNodeIntersection(origin,dir,collisionGroup,this.tree.staticChildren,node.indices,predicate,result))
{
return true;
}
if(node.axis == -1)
{
return false;
}
switch(node.axis)
{
case 0:
if(dir.x > -this.threshold && dir.x < this.threshold)
{
splitTime = t2 + 1;
}
else
{
splitTime = (node.coord - origin.x) / dir.x;
}
currChildNode = localOrigin.x < node.coord ? node.negativeNode : node.positiveNode;
break;
case 1:
if(dir.y > -this.threshold && dir.y < this.threshold)
{
splitTime = t2 + 1;
}
else
{
splitTime = (node.coord - origin.y) / dir.y;
}
currChildNode = localOrigin.y < node.coord ? node.negativeNode : node.positiveNode;
break;
case 2:
if(dir.z > -this.threshold && dir.z < this.threshold)
{
splitTime = t2 + 1;
}
else
{
splitTime = (node.coord - origin.z) / dir.z;
}
currChildNode = localOrigin.z < node.coord ? node.negativeNode : node.positiveNode;
}
if(splitTime < t1 || splitTime > t2)
{
return this.testRayAgainstNode(currChildNode,origin,localOrigin,dir,collisionGroup,t1,t2,predicate,result);
}
intersects = this.testRayAgainstNode(currChildNode,origin,localOrigin,dir,collisionGroup,t1,splitTime,predicate,result);
if(intersects)
{
return true;
}
this._o.x = origin.x + splitTime * dir.x;
this._o.y = origin.y + splitTime * dir.y;
this._o.z = origin.z + splitTime * dir.z;
if(node.splitTree != null)
{
splitNode = node.splitTree.rootNode;
while(splitNode != null && splitNode.axis != -1)
{
switch(splitNode.axis)
{
case 0:
splitNode = this._o.x < splitNode.coord ? splitNode.negativeNode : splitNode.positiveNode;
break;
case 1:
splitNode = this._o.y < splitNode.coord ? splitNode.negativeNode : splitNode.positiveNode;
break;
case 2:
splitNode = this._o.z < splitNode.coord ? splitNode.negativeNode : splitNode.positiveNode;
break;
}
}
if(splitNode != null && splitNode.indices != null)
{
for(i = splitNode.indices.length - 1; i >= 0; i--)
{
primitive = this.tree.staticChildren[splitNode.indices[i]];
if((primitive.collisionGroup & collisionGroup) != 0)
{
if(!(predicate != null && primitive.body != null && !predicate.considerBody(primitive.body)))
{
result.t = primitive.getRayIntersection(origin,dir,this.threshold,result.normal);
if(result.t >= 0)
{
result.pos.vCopy(this._o);
result.primitive = primitive;
return true;
}
}
}
}
}
}
return this.testRayAgainstNode(currChildNode == node.negativeNode ? node.positiveNode : node.negativeNode,origin,this._o,dir,collisionGroup,splitTime,t2,predicate,result);
}
private function getRayNodeIntersection(origin:Vector3, dir:Vector3, collisionGroup:int, primitives:Vector.<CollisionPrimitive>, indices:Vector.<int>, predicate:IRayCollisionPredicate, intersection:RayIntersection) : Boolean
{
var primitive:CollisionPrimitive = null;
var t:Number = NaN;
var pnum:int = indices.length;
var minTime:Number = 1e+308;
for(var i:int = 0; i < pnum; i++)
{
primitive = primitives[indices[i]];
if((primitive.collisionGroup & collisionGroup) != 0)
{
if(!(predicate != null && primitive.body != null && !predicate.considerBody(primitive.body)))
{
t = primitive.getRayIntersection(origin,dir,this.threshold,this._n);
if(t > 0 && t < minTime)
{
minTime = t;
intersection.primitive = primitive;
intersection.normal.x = this._n.x;
intersection.normal.y = this._n.y;
intersection.normal.z = this._n.z;
}
}
}
}
if(minTime == 1e+308)
{
return false;
}
intersection.pos.x = origin.x + dir.x * minTime;
intersection.pos.y = origin.y + dir.y * minTime;
intersection.pos.z = origin.z + dir.z * minTime;
intersection.t = minTime;
return true;
}
public function destroy() : void
{
var c:ICollider = null;
this._n = null;
this._o = null;
for each(c in this.colliders)
{
c.destroy();
c = null;
}
}
}
}
class MinMax
{
public var min:Number = 0;
public var max:Number = 0;
function MinMax()
{
super();
}
}
|
package projects.tanks.client.battlefield.models.battle.cp {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class ControlPointsModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _forceUpdatePointId:Long = Long.getLong(1386525242,-25718765);
private var _forceUpdatePoint_pointIdCodec:ICodec;
private var model:IModel;
public function ControlPointsModelServer(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());
this._forceUpdatePoint_pointIdCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
}
public function forceUpdatePoint(param1:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._forceUpdatePoint_pointIdCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._forceUpdatePointId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package forms.userlabel {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.userlabel.ChatUserLabel_silverStatusIconClass.png")]
public class ChatUserLabel_silverStatusIconClass extends BitmapAsset {
public function ChatUserLabel_silverStatusIconClass() {
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.quest.daily {
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.quest.daily.DailyQuestShowingCC;
public class VectorCodecDailyQuestShowingCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecDailyQuestShowingCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(DailyQuestShowingCC,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.<DailyQuestShowingCC> = new Vector.<DailyQuestShowingCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = DailyQuestShowingCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:DailyQuestShowingCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<DailyQuestShowingCC> = Vector.<DailyQuestShowingCC>(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 projects.tanks.clients.fp10.Prelauncher.serverslist {
public class ServerNode {
public var serverNumber:int;
public var usersOnline:int;
public function ServerNode(serverNumber:int, usersOnline:int) {
super();
this.serverNumber = serverNumber;
this.usersOnline = usersOnline;
}
}
}
|
package com.lorentz.SVG.display.base {
import com.lorentz.SVG.data.filters.SVGFilterCollection;
import com.lorentz.SVG.data.style.StyleDeclaration;
import com.lorentz.SVG.display.SVGClipPath;
import com.lorentz.SVG.display.SVGDocument;
import com.lorentz.SVG.display.SVGPattern;
import com.lorentz.SVG.events.SVGEvent;
import com.lorentz.SVG.events.StyleDeclarationEvent;
import com.lorentz.SVG.parser.SVGParserCommon;
import com.lorentz.SVG.utils.ICloneable;
import com.lorentz.SVG.utils.MathUtils;
import com.lorentz.SVG.utils.SVGUtil;
import com.lorentz.SVG.utils.SVGViewPortUtils;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.BlendMode;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.filters.ColorMatrixFilter;
import flash.geom.Matrix;
import flash.geom.Rectangle;
[Event(name="invalidate", type="com.lorentz.SVG.events.SVGEvent")]
[Event(name="syncValidated", type="com.lorentz.SVG.events.SVGEvent")]
[Event(name="asyncValidated", type="com.lorentz.SVG.events.SVGEvent")]
[Event(name="validated", type="com.lorentz.SVG.events.SVGEvent")]
public class SVGElement extends Sprite implements ICloneable {
protected var content:Sprite;
private var _mask:DisplayObject;
private static const _maskRgbToLuminanceFilter:ColorMatrixFilter = new ColorMatrixFilter([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0,]);
private var _currentFontSize:Number = Number.NaN;
private var _type:String;
private var _id:String;
private var _svgClipPathChanged:Boolean = false;
private var _svgMaskChanged:Boolean = false;
private var _svgFilterChanged:Boolean = false;
private var _style:StyleDeclaration;
private var _finalStyle:StyleDeclaration;
private var _parentElement:SVGElement;
private var _viewPortElement:ISVGViewPort;
private var _document:SVGDocument;
private var _numInvalidElements:int = 0;
private var _numRunningAsyncValidations:int = 0;
private var _runningAsyncValidations:Object = {};
private var _invalidFlag:Boolean = false;
private var _invalidStyleFlag:Boolean = false;
private var _invalidPropertiesFlag:Boolean = false;
private var _invalidTransformFlag:Boolean = false;
private var _displayChanged:Boolean = false;
private var _opacityChanged:Boolean = false;
private var _attributes:Object = {};
private var _elementsAttached:Vector.<SVGElement> = new Vector.<SVGElement>();
private var _viewPortWidth:Number;
private var _viewPortHeight:Number;
public function SVGElement(tagName:String){
_type = tagName;
initialize();
}
protected function initialize():void {
_style = new StyleDeclaration();
_style.addEventListener(StyleDeclarationEvent.PROPERTY_CHANGE, style_propertyChangeHandler, false, 0, true);
_finalStyle = new StyleDeclaration();
_finalStyle.addEventListener(StyleDeclarationEvent.PROPERTY_CHANGE, finalStyle_propertyChangeHandler, false, 0, true);
content = new Sprite();
addChild(content);
}
public function get type():String {
return _type;
}
public function get id():String {
return _id;
}
public function set id(value:String):void {
_id = value;
}
public function get svgClass():String {
return getAttribute("class") as String;
}
public function set svgClass(value:String):void {
setAttribute("class", value);
}
public function get svgClipPath():String {
return getAttribute("clip-path") as String;
}
public function set svgClipPath(value:String):void {
setAttribute("clip-path", value);
}
public function get svgMask():String {
return getAttribute("mask") as String;
}
public function set svgMask(value:String):void {
setAttribute("mask", value);
}
public function get svgTransform():String {
return getAttribute("transform") as String;
}
public function set svgTransform(value:String):void {
setAttribute("transform", value);
}
public function getAttribute(name:String):Object {
return _attributes[name];
}
public function setAttribute(name:String, value:Object):void {
if(_attributes[name] != value){
var oldValue:Object = _attributes[name];
_attributes[name] = value;
onAttributeChanged(name, oldValue, value);
}
}
public function removeAttribute(name:String):void {
delete _attributes[name];
}
public function hasAttribute(name:String):Boolean {
return name in _attributes;
}
protected function onAttributeChanged(attributeName:String, oldValue:Object, newValue:Object):void {
switch(attributeName){
case "class" :
invalidateStyle(true);
break;
case "clip-path" :
_svgClipPathChanged = true;
invalidateProperties();
break;
case "mask" :
_svgMaskChanged = true;
invalidateProperties();
break;
case "transform" :
_invalidTransformFlag = true;
invalidateProperties();
break;
}
}
/////////////////////////////
// Stores a list of elements that are attached to this element
/////////////////////////////
protected function attachElement(element:SVGElement):void {
if(_elementsAttached.indexOf(element) == -1){
_elementsAttached.push(element);
element.setParentElement(this);
}
}
protected function detachElement(element:SVGElement):void {
var index:int = _elementsAttached.indexOf(element);
if(index != -1){
_elementsAttached.splice(index, 1);
element.setParentElement(null);
}
}
///////////////////////////////////////
// Style manipulation
///////////////////////////////////////
public function get style():StyleDeclaration {
return _style;
}
public function get finalStyle():StyleDeclaration {
return _finalStyle;
}
///////////////////////////////////////
public function isInClipPath():Boolean {
if(this is SVGClipPath)
return true;
if(parentElement == null)
return false;
return parentElement.isInClipPath();
}
public function get parentElement():SVGElement {
return _parentElement;
}
protected function setParentElement(value:SVGElement):void {
if(_parentElement != value){
if(_parentElement != null) {
_parentElement.numInvalidElements -= _numInvalidElements;
_parentElement.numRunningAsyncValidations -= _numRunningAsyncValidations;
}
_parentElement = value;
if(_parentElement != null) {
_parentElement.numInvalidElements += _numInvalidElements;
_parentElement.numRunningAsyncValidations += _numRunningAsyncValidations;
}
setSVGDocument(_parentElement != null ? _parentElement.document : null);
setViewPortElement(_parentElement != null ? _parentElement.viewPortElement : null);
invalidateStyle();
}
}
private function setSVGDocument(value:SVGDocument):void {
if(_document != value){
if(_document)
_document.onElementRemoved(this);
_document = value;
if(_document)
_document.onElementAdded(this);
invalidateStyle(true);
for each(var element:SVGElement in _elementsAttached){
element.setSVGDocument(value);
}
}
}
private function setViewPortElement(value:ISVGViewPort):void {
if(_viewPortElement != value){
_viewPortElement = value;
for each(var element:SVGElement in _elementsAttached){
element.setViewPortElement(value);
}
}
}
public function get document():SVGDocument {
return this is SVGDocument ? this as SVGDocument : _document;
}
public function get viewPortElement():ISVGViewPort {
return this is ISVGViewPort ? this as ISVGViewPort : _viewPortElement;
}
public function get validationInProgress():Boolean
{
return numInvalidElements != 0 || numRunningAsyncValidations != 0;
}
protected function get numInvalidElements():int {
return _numInvalidElements;
}
protected function set numInvalidElements(value:int):void {
var d:int = value - _numInvalidElements;
_numInvalidElements = value;
if(_parentElement != null)
_parentElement.numInvalidElements += d;
if(_numInvalidElements == 0 && d != 0){
if(hasEventListener(SVGEvent.SYNC_VALIDATED))
dispatchEvent(new SVGEvent(SVGEvent.SYNC_VALIDATED));
onPartialyValidated();
}
}
protected function get numRunningAsyncValidations():int {
return _numRunningAsyncValidations;
}
protected function set numRunningAsyncValidations(value:int):void {
var d:int = value - _numRunningAsyncValidations;
_numRunningAsyncValidations = value;
if(_numRunningAsyncValidations == 0 && d != 0) {
if(hasEventListener(SVGEvent.ASYNC_VALIDATED))
dispatchEvent(new SVGEvent(SVGEvent.ASYNC_VALIDATED));
onPartialyValidated();
}
if(_parentElement != null)
_parentElement.numRunningAsyncValidations += d;
}
protected function onPartialyValidated():void {
if(this is ISVGViewPort && document)
adjustContentToViewPort();
if(!validationInProgress)
{
if(hasEventListener(SVGEvent.VALIDATED))
dispatchEvent(new SVGEvent(SVGEvent.VALIDATED));
onValidated();
}
}
protected function onValidated():void {
}
protected function invalidate():void {
if(!_invalidFlag){
_invalidFlag = true;
numInvalidElements += 1;
if(hasEventListener(SVGEvent.INVALIDATE))
dispatchEvent(new SVGEvent(SVGEvent.INVALIDATE));
}
}
public function invalidateStyle(recursive:Boolean = true):void {
if(!_invalidStyleFlag){
_invalidStyleFlag = true;
invalidate();
}
if(recursive) {
for each(var element:SVGElement in _elementsAttached){
element.invalidateStyle(recursive);
}
}
}
public function invalidateProperties():void {
if(!_invalidPropertiesFlag){
_invalidPropertiesFlag = true;
invalidate();
}
}
public function validate():void {
if(_invalidStyleFlag)
updateStyles();
updateCurrentFontSize();
if(_invalidPropertiesFlag)
commitProperties();
if(_invalidFlag){
_invalidFlag = false;
numInvalidElements -= 1;
}
if(numInvalidElements > 0) {
for each(var element:SVGElement in _elementsAttached){
element.validate();
}
}
}
public function beginASyncValidation(validationId:String):void {
if(_runningAsyncValidations[validationId] == null){
_runningAsyncValidations[validationId] = true;
numRunningAsyncValidations++;
}
}
public function endASyncValidation(validationId:String):void {
if(_runningAsyncValidations[validationId] != null){
numRunningAsyncValidations--;
delete _runningAsyncValidations[validationId];
}
}
protected function getElementToInheritStyles():SVGElement {
if (this is SVGPattern)
return null;
return parentElement;
}
protected function updateStyles():void {
_invalidStyleFlag = false;
var newFinalStyle:StyleDeclaration = new StyleDeclaration();
var inheritFrom:SVGElement = getElementToInheritStyles();
if(inheritFrom){
inheritFrom.finalStyle.copyStyles(newFinalStyle, true);
}
var typeStyle:StyleDeclaration = document.getStyleDeclaration(_type);
if(typeStyle){ //Merge with elements styles
typeStyle.copyStyles(newFinalStyle);
}
if(svgClass){ //Merge with classes styles
for each(var className:String in svgClass.split(" ")){
var classStyle:StyleDeclaration = document.getStyleDeclaration("."+className);
if(classStyle)
classStyle.copyStyles(newFinalStyle);
}
}
//Merge all styles with the style attribute
_style.copyStyles(newFinalStyle);
//Apply new finalStyle
newFinalStyle.cloneOn(_finalStyle);
}
private function style_propertyChangeHandler(e:StyleDeclarationEvent):void {
invalidateStyle();
}
private function finalStyle_propertyChangeHandler(e:StyleDeclarationEvent):void {
onStyleChanged(e.propertyName, e.oldValue, e.newValue);
}
protected function onStyleChanged(styleName:String, oldValue:String, newValue:String):void {
switch(styleName){
case "display" :
_displayChanged = true;
invalidateProperties();
break;
case "opacity" :
_opacityChanged = true;
invalidateProperties();
break;
case "filter" :
_svgFilterChanged = true;
invalidateProperties();
break;
case "clip-path" :
_svgClipPathChanged = true;
invalidateProperties();
break;
}
}
protected function get shouldApplySvgTransform():Boolean {
return true;
}
private function computeTransformMatrix():Matrix {
var mat:Matrix = null;
if(transform.matrix){
mat = transform.matrix;
mat.identity();
} else {
mat = new Matrix();
}
mat.scale(scaleX, scaleY);
mat.rotate(MathUtils.radiusToDegress(rotation));
mat.translate(x, y);
if(shouldApplySvgTransform && svgTransform != null){
var svgTransformMat:Matrix = SVGParserCommon.parseTransformation(svgTransform);
if(svgTransformMat)
mat.concat(svgTransformMat);
}
return mat;
}
public function get currentFontSize():Number {
return _currentFontSize;
}
protected function updateCurrentFontSize():void {
_currentFontSize = Number.NaN;
if(parentElement)
_currentFontSize = parentElement.currentFontSize;
var fontSize:String = finalStyle.getPropertyValue("font-size");
if(fontSize)
_currentFontSize = SVGUtil.getFontSize(fontSize, _currentFontSize, viewPortWidth, viewPortHeight);
if(isNaN(_currentFontSize))
_currentFontSize = SVGUtil.getFontSize("medium", currentFontSize, viewPortWidth, viewPortHeight);
}
protected function commitProperties():void {
_invalidPropertiesFlag = false;
if(_invalidTransformFlag){
_invalidTransformFlag = false;
transform.matrix = computeTransformMatrix();
}
if (_svgClipPathChanged || _svgMaskChanged)
{
_svgClipPathChanged = false;
_svgMaskChanged = false;
if (_mask != null) //Clear mask
{
content.mask = null;
content.cacheAsBitmap = false;
removeChild(_mask);
if (_mask is SVGElement)
detachElement(_mask as SVGElement);
else if (_mask is Bitmap)
{
(_mask as Bitmap).bitmapData.dispose();
(_mask as Bitmap).bitmapData = null;
}
_mask = null;
}
var mask:SVGElement = null;
var clip:SVGElement = null;
var validateN:int = 0;
var onClipOrMaskValidated:Function = function(e:SVGEvent):void
{
e.target.removeEventListener(SVGEvent.VALIDATED, onClipOrMaskValidated);
--validateN;
if (validateN == 0)
{
if (mask)
{
if (clip)
{
mask.mask = clip;
clip.cacheAsBitmap = false;
}
var maskRc:Rectangle = mask.getBounds(mask);
if (maskRc.width > 0 && maskRc.height > 0)
{
var matrix:Matrix = new Matrix();
matrix.translate( -maskRc.left, -maskRc.top);
var bmd:BitmapData = new BitmapData(maskRc.width, maskRc.height, true, 0);
bmd.draw(mask, matrix, null, null, null, true);
mask.filters = [_maskRgbToLuminanceFilter];
bmd.draw(mask, matrix, null, BlendMode.ALPHA, null, true);
_mask = new Bitmap(bmd);
_mask.x = maskRc.left;
_mask.y = maskRc.top;
addChild(_mask);
_mask.cacheAsBitmap = true;
content.cacheAsBitmap = true;
content.mask = _mask;
}
detachElement(mask);
if (clip)
{
detachElement(clip);
mask.mask = null;
}
}
else if (clip /*&& !mask*/)
{
_mask = clip;
_mask.cacheAsBitmap = false;
content.cacheAsBitmap = false;
addChild(_mask);
content.mask = _mask;
}
}
}
if (svgMask != null && svgMask != "" && svgMask != "none") // mask
{
var maskId:String = SVGUtil.extractUrlId(svgMask);
mask = document.getDefinitionClone(maskId) as SVGElement;
if (mask != null)
{
attachElement(mask);
mask.addEventListener(SVGEvent.VALIDATED, onClipOrMaskValidated);
validateN++;
}
}
var clipPathValue:String = finalStyle.getPropertyValue("clip-path") || svgClipPath;
if (clipPathValue != null && clipPathValue != "" && clipPathValue != "none") // clip-path
{
var clipPathId:String = SVGUtil.extractUrlId(clipPathValue);
clip = document.getDefinitionClone(clipPathId) as SVGElement;
if (clip != null)
{
attachElement(clip);
clip.addEventListener(SVGEvent.VALIDATED, onClipOrMaskValidated);
validateN++;
}
}
}
if(_displayChanged){
_displayChanged = false;
visible = finalStyle.getPropertyValue("display") != "none" && finalStyle.getPropertyValue("visibility") != "hidden";
}
if(_opacityChanged){
_opacityChanged = false;
content.alpha = Number(finalStyle.getPropertyValue("opacity") || 1);
if (content.alpha != 1 && this is SVGContainer)
content.blendMode = BlendMode.LAYER;
else
content.blendMode = BlendMode.NORMAL;
}
if(_svgFilterChanged){
_svgFilterChanged = false;
var filters:Array = [];
var filterLink:String = finalStyle.getPropertyValue("filter");
if(filterLink){
var filterId:String = SVGUtil.extractUrlId(filterLink);
var filterCollection:SVGFilterCollection = document.getDefinition(filterId) as SVGFilterCollection;
if(filterCollection)
filters = filterCollection.getFlashFilters();
}
this.filters = filters;
}
if(this is ISVGViewPort)
updateViewPortSize();
}
protected function getViewPortUserUnit(s:String, reference:String):Number {
var viewPortWidth:Number = 0;
var viewPortHeight:Number = 0;
if(parentElement == document)
{
viewPortWidth = document.availableWidth;
viewPortHeight = document.availableHeight;
}
else if(viewPortElement != null)
{
viewPortWidth = viewPortElement.viewPortWidth;
viewPortHeight = viewPortElement.viewPortHeight;
}
return SVGUtil.getUserUnit(s, _currentFontSize, viewPortWidth, viewPortHeight, reference);
}
public function clone():Object {
var clazz:Class = Object(this).constructor as Class;
var copy:SVGElement = new clazz();
copy.svgClass = svgClass;
copy.svgClipPath = svgClipPath;
copy.svgMask = svgMask;
_style.cloneOn(copy.style);
copy.id = "???? Clone of \"" + id + "\"";
copy.svgTransform = svgTransform;
if(this is ISVGViewBox)
(copy as ISVGViewBox).svgViewBox = (this as ISVGViewBox).svgViewBox;
if(this is ISVGPreserveAspectRatio)
(copy as ISVGPreserveAspectRatio).svgPreserveAspectRatio = (this as ISVGPreserveAspectRatio).svgPreserveAspectRatio;
if(this is ISVGViewPort){
var thisViewPort:ISVGViewPort = this as ISVGViewPort;
var cViewPort:ISVGViewPort = copy as ISVGViewPort;
cViewPort.svgX = thisViewPort.svgX;
cViewPort.svgY = thisViewPort.svgY;
cViewPort.svgWidth = thisViewPort.svgWidth;
cViewPort.svgHeight = thisViewPort.svgHeight;
cViewPort.svgOverflow = thisViewPort.svgOverflow;
}
return copy;
}
/////////////////////////////////////////////////
// ViewPort
/////////////////////////////////////////////////
public function get viewPortWidth():Number {
return _viewPortWidth;
}
public function get viewPortHeight():Number {
return _viewPortHeight;
}
protected function updateViewPortSize():void {
var viewPort:ISVGViewPort = this as ISVGViewPort;
if(viewPort == null)
throw new Error("Element '"+type+"' isn't a viewPort.");
if(this is ISVGViewBox && (this as ISVGViewBox).svgViewBox != null){
_viewPortWidth = (this as ISVGViewBox).svgViewBox.width;
_viewPortHeight = (this as ISVGViewBox).svgViewBox.height;
} else {
if(viewPort.svgWidth)
_viewPortWidth = getViewPortUserUnit(viewPort.svgWidth, SVGUtil.WIDTH);
if(viewPort.svgHeight)
_viewPortHeight = getViewPortUserUnit(viewPort.svgHeight, SVGUtil.HEIGHT);
}
}
protected function adjustContentToViewPort():void {
var viewPort:ISVGViewPort = this as ISVGViewPort;
if(viewPort == null)
throw new Error("Element '"+type+"' isn't a viewPort.");
scrollRect = null;
content.scaleX = 1;
content.scaleY = 1;
content.x = 0;
content.y = 0;
var viewBoxRect:Rectangle = getViewBoxRect();
var viewPortRect:Rectangle = getViewPortRect();
var svgPreserveAspectRatio:String = getPreserveAspectRatio();
if(viewBoxRect != null && viewPortRect != null) {
if(svgPreserveAspectRatio != "none"){
var preserveAspectRatio:Object = SVGParserCommon.parsePreserveAspectRatio(svgPreserveAspectRatio || "");
var viewPortContentMetrics:Object = SVGViewPortUtils.getContentMetrics(viewPortRect, viewBoxRect, preserveAspectRatio.align, preserveAspectRatio.meetOrSlice);
if(preserveAspectRatio.meetOrSlice == "slice")
this.scrollRect = viewPortRect;
content.x = viewPortContentMetrics.contentX;
content.y = viewPortContentMetrics.contentY;
content.scaleX = viewPortContentMetrics.contentScaleX;
content.scaleY = viewPortContentMetrics.contentScaleY;
} else {
content.x = viewPortRect.x;
content.y = viewPortRect.y;
content.scaleX = viewPortRect.width / content.width;
content.scaleY = viewPortRect.height / content.height;
}
}
}
private function getViewBoxRect():Rectangle {
if(this is ISVGViewBox)
return (this as ISVGViewBox).svgViewBox;
else
return getContentBox();
}
protected function getContentBox():Rectangle {
return null;
}
private function getViewPortRect():Rectangle {
var viewPort:ISVGViewPort = this as ISVGViewPort;
if(viewPort != null && viewPort.svgWidth != null && viewPort.svgHeight != null)
{
var x:Number = viewPort.svgX ? getViewPortUserUnit(viewPort.svgX, SVGUtil.WIDTH) : 0;
var y:Number = viewPort.svgY ? getViewPortUserUnit(viewPort.svgY, SVGUtil.HEIGHT) : 0;
var w:Number = getViewPortUserUnit(viewPort.svgWidth, SVGUtil.WIDTH);
var h:Number = getViewPortUserUnit(viewPort.svgHeight, SVGUtil.HEIGHT);
return new Rectangle(x, y, w, h);
}
return null;
}
private function getPreserveAspectRatio():String {
var viewPort:ISVGViewPort = this as ISVGViewPort;
if(viewPort != null)
return viewPort.svgPreserveAspectRatio;
return null;
}
/**
* metadata of the related SVG node as defined in the
* original SVG document
* @default null
**/
public var metadata:XML;
}
}
|
package alternativa.tanks.model.item.properties {
import alternativa.tanks.service.itempropertyparams.ItemPropertyParams;
import alternativa.tanks.service.itempropertyparams.ItemPropertyParamsService;
import projects.tanks.client.garage.models.item.properties.IItemPropertiesModelBase;
import projects.tanks.client.garage.models.item.properties.ItemGaragePropertyData;
import projects.tanks.client.garage.models.item.properties.ItemPropertiesModelBase;
[ModelInfo]
public class ItemPropertiesModel extends ItemPropertiesModelBase implements IItemPropertiesModelBase, ItemProperties {
[Inject]
public static var propertyService:ItemPropertyParamsService;
public function ItemPropertiesModel() {
super();
}
private static function compare(param1:ItemPropertyValue, param2:ItemPropertyValue) : Number {
var local3:ItemPropertyParams = propertyService.getParams(param1.getProperty());
var local4:ItemPropertyParams = propertyService.getParams(param2.getProperty());
var local5:int = local3 != null ? local3.sortIndex : 0;
var local6:int = local4 != null ? local4.sortIndex : 0;
if(local5 < local6) {
return -1;
}
if(local5 > local6) {
return 1;
}
return 0;
}
public function getProperties() : Vector.<ItemPropertyValue> {
var local1:Vector.<ItemPropertyValue> = null;
var local3:ItemGaragePropertyData = null;
var local2:Object = getData(Vector);
if(local2 == null) {
local1 = new Vector.<ItemPropertyValue>();
for each(local3 in getInitParam().properties) {
local1.push(new ItemGaragePropertyValue(local3));
}
local1.sort(compare);
putData(Vector,local1);
} else {
local1 = Vector.<ItemPropertyValue>(local2);
}
return local1;
}
public function getPropertiesForInfoWindow() : Vector.<ItemPropertyValue> {
return this.getProperties();
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapResourceWear.png")]
public class ItemInfoPanelBitmaps_bitmapResourceWear extends BitmapAsset {
public function ItemInfoPanelBitmaps_bitmapResourceWear() {
super();
}
}
}
|
package projects.tanks.client.panel.model.shop.coinpackage {
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 CoinPackageModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function CoinPackageModelServer(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.view.mainview.groupinvite {
import alternativa.tanks.view.mainview.grouplist.item.GroupUserCellStyle;
import fl.controls.listClasses.CellRenderer;
import fl.controls.listClasses.ListData;
import flash.display.DisplayObject;
import flash.events.Event;
import flash.events.MouseEvent;
import forms.Styles;
public class GroupInviteListRenderer extends CellRenderer {
private var item:InviteUserItem;
public function GroupInviteListRenderer() {
super();
}
override public function set data(param1:Object) : void {
_data = param1;
mouseEnabled = false;
mouseChildren = true;
buttonMode = useHandCursor = false;
var local2:Boolean = Boolean(data.online);
var local3:DisplayObject = new GroupUserCellStyle(local2,false);
var local4:DisplayObject = new GroupUserCellStyle(local2,local2);
setStyle(Styles.UP_SKIN,local3);
setStyle(Styles.DOWN_SKIN,local3);
setStyle(Styles.OVER_SKIN,local3);
setStyle(Styles.SELECTED_UP_SKIN,local4);
setStyle(Styles.SELECTED_OVER_SKIN,local4);
setStyle(Styles.SELECTED_DOWN_SKIN,local4);
if(_data.id != null) {
this.item = new InviteUserItem(_data);
addChild(this.item);
}
addEventListener(Event.RESIZE,this.onResize,false,0,true);
addEventListener(MouseEvent.ROLL_OVER,this.onRollOver,false,0,true);
addEventListener(MouseEvent.ROLL_OUT,this.onRollOut,false,0,true);
this.onResize();
}
protected function onResize(param1:Event = null) : void {
if(this.item != null) {
this.item.width = width;
}
}
private function onRollOver(param1:MouseEvent) : void {
if(this.item != null) {
this.item.showAddIndicator();
super.selected = true;
}
}
private function onRollOut(param1:MouseEvent) : void {
if(this.item != null) {
this.item.hideAddIndicator();
super.selected = false;
}
}
override public function set listData(param1:ListData) : void {
_listData = param1;
label = _listData.label;
if(this.item != null) {
setStyle("icon",this.item);
}
}
}
}
|
package alternativa.tanks.view {
import alternativa.tanks.controller.events.CallsignCheckResultEvent;
import alternativa.tanks.controller.events.CheckCallsignEvent;
import alternativa.tanks.controller.events.NavigationEvent;
import alternativa.tanks.controller.events.socialnetwork.FinishExternalRegisterEvent;
import alternativa.tanks.view.forms.ExternalRegistrationForm;
import org.robotlegs.core.IInjector;
import org.robotlegs.mvcs.Mediator;
public class ExternalRegistrationFormMediator extends Mediator {
[Inject]
public var view:ExternalRegistrationForm;
[Inject]
public var injector:IInjector;
public function ExternalRegistrationFormMediator() {
super();
}
override public function onRegister() : void {
this.injector.injectInto(this.view);
addViewListener(CheckCallsignEvent.CHECK_CALLSIGN,dispatch,CheckCallsignEvent);
addViewListener(FinishExternalRegisterEvent.FINISH_REGISTRATION,dispatch,FinishExternalRegisterEvent);
addViewListener(NavigationEvent.GO_TO_REGISTRATION_FORM,dispatch,NavigationEvent);
addContextListener(CallsignCheckResultEvent.CALLSIGN_IS_BUSY,this.onCallsignBusy);
addContextListener(CallsignCheckResultEvent.CALLSIGN_IS_FREE,this.onCallsignFree);
addContextListener(CallsignCheckResultEvent.CALLSIGN_IS_INCORRECT,this.onCallsignIncorrect);
}
private function onCallsignFree(param1:CallsignCheckResultEvent) : void {
this.view.alertAboutFreeUid();
}
private function onCallsignBusy(param1:CallsignCheckResultEvent) : void {
this.view.alertAboutBusyUid(param1.freeUids);
}
private function onCallsignIncorrect(param1:CallsignCheckResultEvent) : void {
this.view.alertAboutIncorrectUid();
}
}
}
|
package controls.lifeindicator
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class LineLife_bitmapRight extends BitmapAsset
{
public function LineLife_bitmapRight()
{
super();
}
}
}
|
package alternativa.tanks.model.payment.modes.pricerange {
[ModelInterface]
public interface PriceRange {
function priceIsValid(param1:Number) : Boolean;
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.init {
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleActivator;
import projects.tanks.clients.fp10.models.tankspartnersmodel.services.SteamDataService;
import projects.tanks.clients.fp10.models.tankspartnersmodel.services.SteamDataServiceImpl;
public class PartnersModelActivator implements IBundleActivator {
public function PartnersModelActivator() {
super();
}
public function start(param1:OSGi) : void {
param1.registerService(SteamDataService,new SteamDataServiceImpl());
}
public function stop(param1:OSGi) : void {
}
}
}
|
package assets.icon {
import flash.display.MovieClip;
[Embed(source="/_assets/assets.swf", symbol="symbol913")]
public dynamic class PaymentsIcon extends MovieClip {
public function PaymentsIcon() {
super();
}
}
}
|
package alternativa.tanks.battle {
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.View;
import alternativa.osgi.service.display.IDisplay;
import alternativa.tanks.bg.IBackgroundService;
import alternativa.tanks.display.AxisIndicator;
import alternativa.tanks.models.battle.battlefield.ViewportBorder;
import alternativa.tanks.service.settings.keybinding.GameActionEnum;
import alternativa.tanks.services.battleinput.BattleInputService;
import alternativa.tanks.services.battleinput.GameActionListener;
import alternativa.tanks.utils.MathUtils;
import alternativa.utils.removeDisplayObject;
import alternativa.utils.removeDisplayObjectChildren;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Rectangle;
import projects.tanks.clients.flash.commons.models.gpu.GPUCapabilities;
import projects.tanks.clients.fp10.libraries.tanksservices.service.storage.IStorageService;
public class BattleView implements GameActionListener {
[Inject]
public static var storageService:IStorageService;
[Inject]
public static var battleInputService:BattleInputService;
[Inject]
public static var display:IDisplay;
[Inject]
public static var battleService:BattleService;
[Inject]
public static var backgroundService:IBackgroundService;
public static const MAX_SCREEN_SIZE:int = 10;
private static const SCREEN_SIZE_KEY:String = "screenSize";
private var container:Sprite;
private var view:View;
private var overlay:Sprite;
private var viewportBorderLayer:Shape;
private var showAxisIndicator:Boolean;
private var axisIndicator:AxisIndicator;
private var screenSize:int = 10;
public function BattleView() {
super();
this.container = this.createContainer();
this.view = new View(1,1,GPUCapabilities.constrained);
this.view.mouseEnabled = false;
this.view.hideLogo();
this.container.addChild(this.view);
battleService.getBattleScene3D().setCameraView(this.view);
this.overlay = new Sprite();
this.overlay.mouseEnabled = false;
this.container.addChild(this.overlay);
this.viewportBorderLayer = new Shape();
this.container.addChild(this.viewportBorderLayer);
this.setSize(storageService.getStorage().data[SCREEN_SIZE_KEY]);
}
private function createContainer() : Sprite {
var local1:Sprite = new Sprite();
local1.mouseEnabled = false;
local1.addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
local1.addEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage);
return local1;
}
private function onAddedToStage(param1:Event) : void {
this.container.stage.addEventListener(Event.RESIZE,this.onResize);
battleInputService.addGameActionListener(this);
this.setFocus();
this.resize();
}
private function onRemovedFromStage(param1:Event) : void {
this.container.stage.removeEventListener(Event.RESIZE,this.onResize);
battleInputService.removeGameActionListener(this);
}
private function onResize(param1:Event) : void {
this.resize();
}
public function onGameAction(param1:GameActionEnum, param2:Boolean) : void {
if(param2) {
switch(param1) {
case GameActionEnum.BATTLE_VIEW_INCREASE:
this.increaseViewSize();
break;
case GameActionEnum.BATTLE_VIEW_DECREASE:
this.decreaseViewSize();
}
}
}
private function increaseViewSize() : void {
this.incSize();
storageService.getStorage().data[SCREEN_SIZE_KEY] = this.getScreenSize();
}
private function decreaseViewSize() : void {
this.decSize();
storageService.getStorage().data[SCREEN_SIZE_KEY] = this.getScreenSize();
}
public function destroy() : void {
this.removeFromScreen();
this.view.clear();
this.view = null;
removeDisplayObjectChildren(this.overlay);
this.overlay = null;
removeDisplayObjectChildren(this.container);
this.container.removeEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
this.container.removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage);
this.container = null;
}
public function setShowAxisIndicator(param1:Boolean) : void {
if(this.showAxisIndicator != param1) {
this.showAxisIndicator = param1;
if(param1) {
this.axisIndicator = new AxisIndicator(100);
this.container.addChild(this.axisIndicator);
this.setAxisIndicatorPosition();
} else {
this.container.removeChild(this.axisIndicator);
this.axisIndicator = null;
}
}
}
public function setShowFPSIndicator(param1:Boolean) : void {
var local2:Camera3D = battleService.getBattleScene3D().getCamera();
if(param1 != this.container.contains(local2.diagram)) {
if(param1) {
this.container.addChild(local2.diagram);
} else {
this.container.removeChild(local2.diagram);
}
}
}
private function resize() : void {
if(this.container.stage == null) {
return;
}
this.resizeView();
this.updateContainerPosition();
this.drawViewPortBorder();
this.drawBackground();
this.setAxisIndicatorPosition();
battleService.getBattleScene3D().getCamera().updateFov();
}
private function resizeView() : void {
var local1:Number = this.screenSize / MAX_SCREEN_SIZE;
this.view.width = int(this.container.stage.stageWidth * local1);
this.view.height = int(this.container.stage.stageHeight * local1);
}
private function updateContainerPosition() : void {
this.container.x = this.container.stage.stageWidth - this.view.width >> 1;
this.container.y = this.container.stage.stageHeight - this.view.height >> 1;
}
private function drawViewPortBorder() : void {
this.viewportBorderLayer.graphics.clear();
if(this.screenSize < MAX_SCREEN_SIZE) {
ViewportBorder.draw(this.viewportBorderLayer.graphics,this.view.width,this.view.height);
}
}
private function drawBackground() : void {
var local1:int = 0.5 * (this.container.stage.stageWidth - this.view.width);
var local2:int = 0.5 * (this.container.stage.stageHeight - this.view.height);
backgroundService.drawBg(new Rectangle(local1,local2,this.view.width,this.view.height));
}
private function setAxisIndicatorPosition() : void {
if(this.showAxisIndicator) {
this.axisIndicator.y = this.view.height - this.axisIndicator.size - 50;
}
}
public function incSize() : void {
if(this.screenSize < MAX_SCREEN_SIZE) {
++this.screenSize;
this.resize();
}
}
public function decSize() : void {
if(this.screenSize > 1) {
--this.screenSize;
this.resize();
}
}
private function setSize(param1:int) : void {
if(param1 == 0) {
this.screenSize = MAX_SCREEN_SIZE;
} else {
this.screenSize = MathUtils.clamp(param1,1,MAX_SCREEN_SIZE);
}
this.resize();
}
public function getScreenSize() : int {
return this.screenSize;
}
public function update() : void {
if(this.showAxisIndicator) {
this.axisIndicator.update(battleService.getBattleScene3D().getCamera());
}
}
public function addOverlayObject(param1:DisplayObject) : void {
this.overlay.addChild(param1);
}
public function removeOverlayObject(param1:DisplayObject) : void {
this.overlay.removeChild(param1);
}
public function getWidth() : int {
if(this.container.stage == null) {
return 1;
}
return this.container.stage.stageWidth * this.screenSize / MAX_SCREEN_SIZE;
}
public function getHeight() : int {
if(this.container.stage == null) {
return 1;
}
return this.container.stage.stageHeight * this.screenSize / MAX_SCREEN_SIZE;
}
public function getDiagonalSquared() : Number {
return this.getHeight() * this.getHeight() + this.getWidth() * this.getWidth();
}
public function getParentDisplayContainer() : DisplayObjectContainer {
return this.container.parent;
}
public function getX() : int {
return this.container.x;
}
public function getY() : int {
return this.container.y;
}
public function addToScreen(param1:DisplayObjectContainer) : void {
param1.addChild(this.container);
}
public function removeFromScreen() : void {
removeDisplayObject(this.container);
}
public function setFocus() : void {
display.stage.focus = this.container;
}
}
}
|
package alternativa.tanks.models.sfx.shoot.snowman
{
import alternativa.engine3d.materials.Material;
import alternativa.tanks.engine3d.TextureAnimation;
import flash.geom.ColorTransform;
import flash.media.Sound;
public class SnowmanSFXData
{
public var shotMaterials:Vector.<Material>;
public var explosionMaterials:Vector.<Material>;
public var shotFlashMaterial:Material;
public var shotSound:Sound;
public var explosionSound:Sound;
public var colorTransform:ColorTransform;
public var shotData:TextureAnimation;
public var explosionData:TextureAnimation;
public var flashData:TextureAnimation;
public function SnowmanSFXData()
{
super();
}
}
}
|
package alternativa.tanks.model.user
{
public interface IUserData
{
function get userId() : String;
function get userName() : String;
function getData(param1:String) : UserData;
}
}
|
package alternativa.tanks.bonuses {
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.objects.Mesh;
import alternativa.tanks.services.lightingeffects.ILightingEffectsService;
import alternativa.types.Long;
import flash.geom.ColorTransform;
public class BonusMesh extends BonusObject3DBase {
[Inject]
public static var lightingService:ILightingEffectsService;
private var bonusColorTransform:ColorTransform;
private var combinedColorTransform:ColorTransform = new ColorTransform();
private var objectId:Long;
public function BonusMesh(param1:Long, param2:Mesh) {
super();
this.objectId = param1;
object = this.createMesh(param2);
}
private function createMesh(param1:Mesh) : Mesh {
var local2:Mesh = Mesh(param1.clone());
var local3:Face = param1.faces[0];
local2.setMaterialToAllFaces(local3.material);
local2.sorting = Sorting.DYNAMIC_BSP;
return local2;
}
public function init() : void {
object.rotationX = 0;
object.rotationY = 0;
object.rotationZ = 0;
this.setScale(1);
setAlpha(1);
setAlphaMultiplier(1);
this.bonusColorTransform = lightingService.getBonusColorAdjust();
object.colorTransform = this.bonusColorTransform;
}
public function setScale(param1:Number) : void {
object.scaleX = param1;
object.scaleY = param1;
object.scaleZ = param1;
}
public function getObjectId() : Long {
return this.objectId;
}
public function recycle() : void {
removeFromScene();
object.colorTransform = null;
BonusCache.putBonusMesh(this);
}
public function setRotationZ(param1:Number) : void {
object.rotationZ = param1;
}
public function setColorTransform(param1:ColorTransform) : void {
if(this.bonusColorTransform != null) {
if(param1 == null) {
object.colorTransform = this.bonusColorTransform;
} else {
this.copyColorTransform(this.bonusColorTransform,this.combinedColorTransform);
this.combinedColorTransform.concat(param1);
object.colorTransform = this.combinedColorTransform;
}
} else {
object.colorTransform = param1;
}
}
public function addRotationZ(param1:Number) : void {
object.rotationZ += param1;
}
public function getScale() : Number {
return object.scaleX;
}
private function copyColorTransform(param1:ColorTransform, param2:ColorTransform) : void {
param2.redMultiplier = param1.redMultiplier;
param2.greenMultiplier = param1.greenMultiplier;
param2.blueMultiplier = param1.blueMultiplier;
param2.alphaMultiplier = param1.alphaMultiplier;
param2.redOffset = param1.redOffset;
param2.greenOffset = param1.greenOffset;
param2.blueOffset = param1.blueOffset;
param2.alphaOffset = param1.alphaOffset;
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_lightweightcapacitorsIconClass.png")]
public class DeviceIcons_lightweightcapacitorsIconClass extends BitmapAsset {
public function DeviceIcons_lightweightcapacitorsIconClass() {
super();
}
}
}
|
package alternativa.tanks.models.battlefield
{
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.math.Vector3;
import alternativa.object.ClientObject;
import alternativa.tanks.camera.ICameraController;
import alternativa.tanks.camera.ICameraStateModifier;
import alternativa.tanks.models.battlefield.decals.RotationState;
import alternativa.tanks.models.tank.TankData;
import alternativa.tanks.sfx.IGraphicEffect;
import alternativa.tanks.sfx.ISound3DEffect;
import alternativa.tanks.sound.ISoundManager;
import alternativa.tanks.vehicles.tanks.Tank;
public interface IBattleField
{
function addDecal(param1:Vector3, param2:Vector3, param3:Number, param4:TextureMaterial, param5:RotationState = null, param6:Boolean = false) : void;
function getBattlefieldData() : BattlefieldData;
function addTank(param1:TankData) : void;
function removeTank(param1:TankData) : void;
function addGraphicEffect(param1:IGraphicEffect) : void;
function addSound3DEffect(param1:ISound3DEffect) : void;
function setLocalUser(param1:ClientObject) : void;
function initFlyCamera(param1:Vector3, param2:Vector3) : void;
function initFollowCamera(param1:Vector3, param2:Vector3) : void;
function initCameraController(param1:ICameraController) : void;
function setCameraTarget(param1:Tank) : void;
function removeTankFromField(param1:TankData) : void;
function showSuicideIndicator(param1:int) : void;
function hideSuicideIndicator() : void;
function getRespawnInvulnerabilityPeriod() : int;
function printDebugValue(param1:String, param2:String) : void;
function addPlugin(param1:IBattlefieldPlugin) : void;
function removePlugin(param1:IBattlefieldPlugin) : void;
function get soundManager() : ISoundManager;
function tankHit(param1:TankData, param2:Vector3, param3:Number) : void;
function addFollowCameraModifier(param1:ICameraStateModifier) : void;
}
}
|
package {
import flash.display.BitmapData;
[Embed(source="/_assets/goldButtonRight.png")]
public dynamic class goldButtonRight extends BitmapData {
public function goldButtonRight(param1:int = 6, param2:int = 29) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.sfx {
import alternativa.engine3d.lights.OmniLight;
import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
public class FadingLightEffect extends PooledObject implements GraphicEffect {
public static const DEFAULT_CURVE:Number = 1 / 2.2;
private var light:OmniLight;
private var time:int;
private var currentTime:int;
private var curve:Number;
private var container:Scene3DContainer;
private var sourceIntensity:Number;
public function FadingLightEffect(param1:Pool) {
super(param1);
this.light = new OmniLight(0,0,0);
}
public function init(param1:OmniLight, param2:int, param3:Number = 0.45454545454545453) : void {
this.light.intensity = param1.intensity;
this.light.color = param1.color;
this.light.attenuationBegin = param1.attenuationBegin;
this.light.attenuationEnd = param1.attenuationEnd;
this.light.x = param1.x;
this.light.y = param1.y;
this.light.z = param1.z;
this.light.calculateBounds();
this.time = param2;
this.curve = param3;
this.sourceIntensity = param1.intensity;
this.currentTime = 0;
}
public function addedToScene(param1:Scene3DContainer) : void {
this.container = param1;
param1.addChild(this.light);
}
public function play(param1:int, param2:GameCamera) : Boolean {
this.currentTime += param1;
this.currentTime = Math.min(this.currentTime,this.time);
var local3:Number = 1 - this.currentTime / this.time;
this.light.intensity = this.sourceIntensity * Math.pow(local3,this.curve);
return this.currentTime < this.time;
}
public function destroy() : void {
if(this.container != null) {
this.container.removeChild(this.light);
this.container = null;
}
recycle();
}
public function kill() : void {
this.light = null;
}
}
}
|
package _codec.projects.tanks.client.panel.model.payment.modes.terminal {
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.modes.terminal.TerminalPaymentCC;
public class VectorCodecTerminalPaymentCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTerminalPaymentCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(TerminalPaymentCC,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.<TerminalPaymentCC> = new Vector.<TerminalPaymentCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TerminalPaymentCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TerminalPaymentCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TerminalPaymentCC> = Vector.<TerminalPaymentCC>(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 projects.tanks.clients.fp10.Prelauncher.makeup {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_materialsIconMakeUp.png")]
public class MakeUp_materialsIconMakeUp extends BitmapAsset {
public function MakeUp_materialsIconMakeUp() {
super();
}
}
}
|
package controls.statassets
{
import assets.resultwindow.bres_BG_BLACKCORNER;
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.geom.Matrix;
public class BlackRoundRect extends StatLineBase
{
public function BlackRoundRect()
{
super();
tl = new bres_BG_BLACKCORNER(1,1);
px = new BitmapData(1,1,true,2566914048);
}
override protected function draw() : void
{
var matrix:Matrix = null;
var g:Graphics = this.graphics;
g.clear();
g.beginBitmapFill(tl);
g.drawRect(0,0,8,8);
g.endFill();
matrix = new Matrix();
matrix.rotate(Math.PI * 0.5);
matrix.translate(_width - 8,0);
g.beginBitmapFill(tl,matrix);
g.drawRect(_width - 8,0,8,8);
g.endFill();
matrix = new Matrix();
matrix.rotate(Math.PI);
matrix.translate(_width - 8,_height - 8);
g.beginBitmapFill(tl,matrix);
g.drawRect(_width - 8,_height - 8,8,8);
g.endFill();
matrix = new Matrix();
matrix.rotate(Math.PI * 1.5);
matrix.translate(0,_height - 8);
g.beginBitmapFill(tl,matrix);
g.drawRect(0,_height - 8,8,8);
g.endFill();
g.beginBitmapFill(px);
g.drawRect(8,0,_width - 16,_height);
g.drawRect(0,8,8,_height - 16);
g.drawRect(_width - 8,8,8,_height - 16);
g.endFill();
}
}
}
|
package projects.tanks.client.battlefield.models.effects.duration.time {
public interface IDurationModelBase {
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.railgun {
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 RailgunShootSFXModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function RailgunShootSFXModelServer(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.flag {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.FlyingMode;
public class CodecFlyingMode implements ICodec {
public function CodecFlyingMode() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:FlyingMode = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = FlyingMode.FLY;
break;
case 1:
local2 = FlyingMode.ROLL;
break;
case 2:
local2 = FlyingMode.IMPACT;
break;
case 3:
local2 = FlyingMode.DROP;
break;
case 4:
local2 = FlyingMode.KILL;
}
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 controls.base {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.base.TankInput_rightWrongClass.png")]
public class TankInput_rightWrongClass extends BitmapAsset {
public function TankInput_rightWrongClass() {
super();
}
}
}
|
package alternativa.tanks.model.payment.modes.yandex {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.GoToUrlForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.PayUrl;
import alternativa.tanks.model.payment.modes.asyncurl.AsyncUrlPayMode;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.payment.modes.gotourl.GoToUrlPaymentModelBase;
import projects.tanks.client.panel.model.payment.modes.gotourl.IGoToUrlPaymentModelBase;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
[ModelInfo]
public class GoToUrlPaymentModel extends GoToUrlPaymentModelBase implements IGoToUrlPaymentModelBase, AsyncUrlPayMode, ObjectLoadListener, PayModeView, ObjectUnloadListener {
[Inject]
public static var paymentWindowService:PaymentWindowService;
public function GoToUrlPaymentModel() {
super();
}
public function requestAsyncUrl() : void {
var local1:Long = paymentWindowService.getChosenItem().id;
server.getPaymentUrl(local1);
}
public function receiveUrl(param1:PaymentRequestUrl) : void {
PayUrl(object.adapt(PayUrl)).forceGoToUrl(param1);
}
public function objectLoaded() : void {
putData(PayModeForm,new GoToUrlForm(object));
}
public function getView() : PayModeForm {
return PayModeForm(getData(PayModeForm));
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(PayModeForm);
}
}
}
|
package alternativa.tanks.services.battlegui {
import flash.display.DisplayObjectContainer;
import flash.events.IEventDispatcher;
public interface BattleGUIService extends IEventDispatcher {
function getViewportContainer() : DisplayObjectContainer;
function getGuiContainer() : DisplayObjectContainer;
function getTabContainer() : DisplayObjectContainer;
function hide() : void;
function show() : void;
function setPositionXDefaultLayout(param1:int) : void;
function getPositionXDefaultLayout() : int;
function setPositionXInventory(param1:int) : void;
function getPositionXInventory() : int;
function resetPositionXInventory() : void;
}
}
|
package projects.tanks.client.panel.model.shop.emailrequired {
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 EmailRequiredModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:EmailRequiredModelServer;
private var client:IEmailRequiredModelBase = IEmailRequiredModelBase(this);
private var modelId:Long = Long.getLong(1570409509,1727350312);
public function EmailRequiredModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new EmailRequiredModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(EmailRequiredCC,false)));
}
protected function getInitParam() : EmailRequiredCC {
return EmailRequiredCC(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 _codec.projects.tanks.client.battlefield.models.bonus.bonuslight {
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.bonuslight.BonusLightCC;
public class VectorCodecBonusLightCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecBonusLightCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(BonusLightCC,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.<BonusLightCC> = new Vector.<BonusLightCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = BonusLightCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:BonusLightCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<BonusLightCC> = Vector.<BonusLightCC>(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 projects.tanks.client.panel.model.quest.daily.type.goal {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class CaptureGoalDailyQuestModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:CaptureGoalDailyQuestModelServer;
private var client:ICaptureGoalDailyQuestModelBase = ICaptureGoalDailyQuestModelBase(this);
private var modelId:Long = Long.getLong(835552943,1303329520);
public function CaptureGoalDailyQuestModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new CaptureGoalDailyQuestModelServer(IModel(this));
}
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 alternativa.tanks.gui.tankpreview {
import flash.utils.Dictionary;
public class TankPreviewStateMachine {
private var eventTransitions:Dictionary = new Dictionary();
private var currentState:TankPreviewState;
public function TankPreviewStateMachine() {
super();
}
public function addTransition(param1:TankPreviewEvent, param2:TankPreviewState, param3:TankPreviewState) : void {
var local4:Dictionary = this.eventTransitions[param1];
if(local4 == null) {
local4 = new Dictionary();
this.eventTransitions[param1] = local4;
}
local4[param2] = param3;
}
public function handleEvent(param1:TankPreviewState, param2:TankPreviewEvent) : void {
var local3:Dictionary = this.eventTransitions[param2];
if(local3 == null) {
throw new NoTransitionsFoundError();
}
var local4:TankPreviewState = local3[param1];
if(local4 == null) {
throw new NewStateMissingError();
}
param1.exit();
local4.enter();
this.currentState = local4;
}
public function setCurrentState(param1:TankPreviewState) : void {
this.currentState = param1;
this.currentState.enter();
}
public function updateCurrentState() : void {
this.currentState.update();
}
}
}
|
package projects.tanks.client.tanksservices.model.formatbattle {
public class EquipmentConstraintsModeInfo {
private var _index:int;
private var _mode:String;
private var _name:String;
public function EquipmentConstraintsModeInfo(param1:int = 0, param2:String = null, param3:String = null) {
super();
this._index = param1;
this._mode = param2;
this._name = param3;
}
public function get index() : int {
return this._index;
}
public function set index(param1:int) : void {
this._index = param1;
}
public function get mode() : String {
return this._mode;
}
public function set mode(param1:String) : void {
this._mode = param1;
}
public function get name() : String {
return this._name;
}
public function set name(param1:String) : void {
this._name = param1;
}
public function toString() : String {
var local1:String = "EquipmentConstraintsModeInfo [";
local1 += "index = " + this.index + " ";
local1 += "mode = " + this.mode + " ";
local1 += "name = " + this.name + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.clan.outgoing {
import alternativa.tanks.gui.clanmanagement.ClanOutgoingRequestsDialog;
import alternativa.types.Long;
[ModelInterface]
public interface IClanOutgoingModel {
function setClanOutgoingWindow(param1:ClanOutgoingRequestsDialog) : void;
function getUsers() : Vector.<Long>;
}
}
|
package scpacker.gui.en
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GTanksIEN_coldload9 extends BitmapAsset
{
public function GTanksIEN_coldload9()
{
super();
}
}
}
|
package alternativa.tanks.models.sfx.healing
{
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.tanks.models.battlefield.IBattleField;
import alternativa.tanks.models.tank.TankData;
import alternativa.tanks.sfx.ISpecialEffect;
import alternativa.tanks.utils.objectpool.ObjectPool;
import alternativa.tanks.utils.objectpool.PooledObject;
import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.healing.IsisActionType;
public class HealingGunSFX extends PooledObject implements IHealingGunEffectListener
{
private static var cameraEffect:HealingGunCameraEffect = new HealingGunCameraEffect();
public var targetData:TankData;
private var graphicEffect:HealingGunGraphicEffect;
private var soundEffect:HealingGunSoundEffect;
private var battlefield:IBattleField;
private var graphicEffectDestroyed:Boolean;
private var soundEffectDestroyed:Boolean;
public function HealingGunSFX(objectPool:ObjectPool)
{
super(objectPool);
this.graphicEffect = new HealingGunGraphicEffect(this);
this.soundEffect = new HealingGunSoundEffect(this);
}
public function init(mode:IsisActionType, sfxData:HealingGunSFXData, turret:Object3D, localSourcePosition:Vector3, tankData:TankData) : void
{
this.graphicEffect.init(mode,sfxData,turret,localSourcePosition,tankData);
this.soundEffect.init(mode,sfxData,turret);
this.graphicEffectDestroyed = false;
this.soundEffectDestroyed = false;
}
public function set mode(value:IsisActionType) : void
{
this.graphicEffect.mode = value;
this.soundEffect.mode = value;
}
public function addToBattlefield(battlefield:IBattleField) : void
{
this.battlefield = battlefield;
if(this.isLocalTarget() && cameraEffect.refCounter == 1)
{
battlefield.addFollowCameraModifier(cameraEffect);
}
battlefield.addGraphicEffect(this.graphicEffect);
battlefield.addSound3DEffect(this.soundEffect);
}
public function destroy() : void
{
if(this.isLocalTarget())
{
--cameraEffect.refCounter;
}
this.graphicEffect.kill();
this.soundEffect.kill();
this.targetData = null;
this.battlefield = null;
}
public function setTargetParams(targetData:TankData, ownerData:TankData, target:Object3D, localTargetPosition:Vector3, mode:IsisActionType) : void
{
var showBeamLight:Boolean = true;
if(this.isLocalTarget())
{
--cameraEffect.refCounter;
}
this.targetData = targetData;
if(this.isLocalTarget())
{
++cameraEffect.refCounter;
if(this.battlefield != null && cameraEffect.refCounter == 1)
{
this.battlefield.addFollowCameraModifier(cameraEffect);
}
}
if(targetData != null)
{
showBeamLight = true;
}
this.graphicEffect.setTargetParams(target,localTargetPosition,ownerData,mode,showBeamLight);
}
public function onEffectDestroyed(effect:ISpecialEffect) : void
{
if(effect == this.graphicEffect)
{
this.graphicEffectDestroyed = true;
}
if(effect == this.soundEffect)
{
this.soundEffectDestroyed = true;
}
if(this.graphicEffectDestroyed && this.soundEffectDestroyed)
{
storeInPool();
}
}
override protected function getClass() : Class
{
return HealingGunSFX;
}
private function isLocalTarget() : Boolean
{
return this.targetData != null && this.targetData == TankData.localTankData;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.model.listener {
import alternativa.types.Long;
import projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.UserInfoConsumer;
[ModelInterface]
public interface UserNotifier {
function getDataConsumer(param1:Long) : UserInfoConsumer;
function hasDataConsumer(param1:Long) : Boolean;
function subcribe(param1:Long, param2:UserInfoConsumer) : void;
function refresh(param1:Long, param2:UserInfoConsumer) : void;
function unsubcribe(param1:Vector.<Long>) : void;
function getCurrentUserId() : Long;
}
}
|
package projects.tanks.clients.flash.resources.resource.loaders {
import alternativa.engine3d.loaders.events.LoaderEvent;
import alternativa.engine3d.loaders.events.LoaderProgressEvent;
import alternativa.proplib.utils.TextureByteDataMap;
import alternativa.utils.textureutils.TextureByteData;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.utils.ByteArray;
import projects.tanks.clients.flash.resources.resource.loaders.events.BatchTextureLoaderErrorEvent;
[Event(name="loaderProgress",type="alternativa.engine3d.loaders.events.LoaderProgressEvent")]
[Event(name="partComplete",type="alternativa.engine3d.loaders.events.LoaderEvent")]
[Event(name="partOpen",type="alternativa.engine3d.loaders.events.LoaderEvent")]
[Event(name="loaderError",type="projects.tanks.clients.flash.resources.resource.loaders.events.BatchTextureLoaderErrorEvent")]
[Event(name="complete",type="flash.events.Event")]
[Event(name="open",type="flash.events.Event")]
public class BatchTextureLoader extends EventDispatcher {
private static var redSquareClass:Class = BatchTextureLoader_redSquareClass;
private static var redSquareData:ByteArray = new redSquareClass();
private static const IDLE:int = 0;
private static const LOADING:int = 1;
private var state:int = 0;
private var textureLoader:TextureLoader;
private var baseURL:String;
private var batch:Object;
private var textureNames:Vector.<String>;
private var textureIndex:int;
private var numTextures:int;
private var _textures:TextureByteDataMap;
private var loadingOpened:Boolean;
public function BatchTextureLoader(param1:Object) {
var local2:String = null;
super();
if(param1 == null) {
throw ArgumentError("Parameter batch cannot be null");
}
this.batch = param1;
this.textureNames = new Vector.<String>();
for(local2 in param1) {
this.textureNames.push(local2);
}
this.numTextures = this.textureNames.length;
}
public function get textures() : TextureByteDataMap {
return this._textures;
}
public function close() : void {
if(this.state == LOADING) {
this.textureLoader.close();
this.cleanup();
this._textures = null;
this.state = IDLE;
}
}
public function unload() : void {
this._textures = null;
}
public function load(param1:String) : void {
if(param1 == null) {
throw ArgumentError("Parameter baseURL cannot be null");
}
this.baseURL = param1;
if(this.textureLoader == null) {
this.textureLoader = new TextureLoader();
this.textureLoader.addEventListener(Event.OPEN,this.onTextureLoadingOpen);
this.textureLoader.addEventListener(LoaderProgressEvent.LOADER_PROGRESS,this.onProgress);
this.textureLoader.addEventListener(Event.COMPLETE,this.onTextureLoadingComplete);
this.textureLoader.addEventListener(IOErrorEvent.IO_ERROR,this.onLoadingError);
this.textureLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onLoadingError);
} else {
this.close();
}
this._textures = new TextureByteDataMap();
this.loadingOpened = false;
this.state = LOADING;
this.textureIndex = 0;
this.loadCurrentTexture();
}
public function reload() : void {
if(this.state == IDLE) {
throw new Error("Wrong method invocation");
}
this.textureLoader.reload();
}
private function loadCurrentTexture() : void {
var local1:TextureInfo = this.batch[this.textureNames[this.textureIndex]];
var local2:String = Boolean(local1.opacityMapFileName) ? this.baseURL + local1.opacityMapFileName : null;
this.textureLoader.load(this.baseURL + local1.diffuseMapFileName,local2);
}
private function onTextureLoadingOpen(param1:Event) : void {
if(!this.loadingOpened) {
this.loadingOpened = true;
if(hasEventListener(Event.OPEN)) {
dispatchEvent(new Event(Event.OPEN));
}
}
if(hasEventListener(LoaderEvent.PART_OPEN)) {
dispatchEvent(new LoaderEvent(LoaderEvent.PART_OPEN,this.numTextures,this.textureIndex));
}
}
private function onProgress(param1:LoaderProgressEvent) : void {
var local2:Number = NaN;
if(hasEventListener(LoaderProgressEvent.LOADER_PROGRESS)) {
local2 = (this.textureIndex + param1.totalProgress) / this.numTextures;
dispatchEvent(new LoaderProgressEvent(LoaderProgressEvent.LOADER_PROGRESS,this.numTextures,this.textureIndex,local2,param1.bytesLoaded,param1.bytesTotal));
}
}
private function onTextureLoadingComplete(param1:Event) : void {
this._textures.putValue(this.textureNames[this.textureIndex],new TextureByteData(this.textureLoader.diffuseData,this.textureLoader.opacityData));
this.tryNextTexure();
}
private function onLoadingError(param1:ErrorEvent) : void {
var local2:String = this.textureNames[this.textureIndex];
this._textures.putValue(local2,new TextureByteData(this.textureLoader.diffuseData || redSquareData));
dispatchEvent(new BatchTextureLoaderErrorEvent(BatchTextureLoaderErrorEvent.LOADER_ERROR,local2,param1.text));
this.tryNextTexure();
}
private function tryNextTexure() : void {
if(this.state == IDLE) {
return;
}
if(hasEventListener(LoaderEvent.PART_COMPLETE)) {
dispatchEvent(new LoaderEvent(LoaderEvent.PART_COMPLETE,this.numTextures,this.textureIndex));
}
if(++this.textureIndex == this.numTextures) {
this.cleanup();
this.state = IDLE;
if(hasEventListener(Event.COMPLETE)) {
dispatchEvent(new Event(Event.COMPLETE));
}
} else {
this.loadCurrentTexture();
}
}
private function cleanup() : void {
this.textureNames = null;
}
}
}
|
package projects.tanks.client.battleselect.model.matchmaking.group.notify {
public class MatchmakingGroupCC {
private var _users:Vector.<MatchmakingUserData>;
public function MatchmakingGroupCC(param1:Vector.<MatchmakingUserData> = null) {
super();
this._users = param1;
}
public function get users() : Vector.<MatchmakingUserData> {
return this._users;
}
public function set users(param1:Vector.<MatchmakingUserData>) : void {
this._users = param1;
}
public function toString() : String {
var local1:String = "MatchmakingGroupCC [";
local1 += "users = " + this.users + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.model.payment.modes.description {
import platform.client.fp10.core.resource.types.ImageResource;
[ModelInterface]
public interface PayModeBottomDescription {
function getDescription() : String;
function getImages() : Vector.<ImageResource>;
function enabled() : Boolean;
}
}
|
package alternativa.tanks.gui.communication.button {
public class TabButtonTypes {
public static const NEWS_TAB:String = "NEWS_TAB";
public static const CHAT_TAB:String = "CHAT_TAB";
public static const CLAN_CHAT_TAB:String = "CLAN_CHAT_TAB";
public function TabButtonTypes() {
super();
}
}
}
|
package controls.buttons.h30px {
import controls.buttons.FixedHeightButton;
public class OrangeMediumButton extends FixedHeightButton {
public function OrangeMediumButton() {
super(new OrangeMediumButtonSkin());
this.correctPositionX();
}
private function correctPositionX() : void {
upState.x = -1;
overState.x = -1;
downState.x = -1;
disabledState.x = -1;
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_percentClass.png")]
public class ItemInfoPanelBitmaps_percentClass extends BitmapAsset {
public function ItemInfoPanelBitmaps_percentClass() {
super();
}
}
}
|
package alternativa.tanks.models.weapon {
import alternativa.physics.Body;
import alternativa.physics.collision.IRayCollisionFilter;
public class RayCollisionFilter implements IRayCollisionFilter {
public var exclusion:Body;
public function RayCollisionFilter() {
super();
}
public function considerBody(param1:Body) : Boolean {
return this.exclusion != param1;
}
}
}
|
package alternativa.tanks.gui.category {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.category.ItemCategoryButton_inventoryIconClass.png")]
public class ItemCategoryButton_inventoryIconClass extends BitmapAsset {
public function ItemCategoryButton_inventoryIconClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.ricochet {
public interface IRicochetSFXModelBase {
}
}
|
package alternativa.tanks.gui.category {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.friends.button.friends.NewRequestIndicator;
import controls.buttons.IconButton;
import flash.display.Bitmap;
import projects.tanks.client.commons.types.ItemViewCategoryEnum;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class ItemCategoryButton extends IconButton {
public static const specialIconClass:Class = ItemCategoryButton_specialIconClass;
public static const weaponIconClass:Class = ItemCategoryButton_weaponIconClass;
public static const armorIconClass:Class = ItemCategoryButton_armorIconClass;
public static const colorIconClass:Class = ItemCategoryButton_colorIconClass;
public static const kitIconClass:Class = ItemCategoryButton_kitIconClass;
public static const inventoryIconClass:Class = ItemCategoryButton_inventoryIconClass;
public static const discountIconClass:Class = ItemCategoryButton_discountIconClass;
public static const givenPresentsIconClass:Class = ItemCategoryButton_givenPresentsIconClass;
public static const resistanceIconClass:Class = ItemCategoryButton_resistanceIconClass;
private static const droneIconClass:Class = ItemCategoryButton_droneIconClass;
private var category:ItemViewCategoryEnum;
private var _newItemIndicator:Bitmap;
private var _discountIndicator:Bitmap;
private var _width:int;
public function ItemCategoryButton(param1:ItemViewCategoryEnum) {
var local3:String = null;
var local4:Class = null;
this._newItemIndicator = new NewRequestIndicator.attentionIconClass();
this._discountIndicator = new discountIconClass();
var local2:ILocaleService = ILocaleService(OSGi.getInstance().getService(ILocaleService));
switch(param1) {
case ItemViewCategoryEnum.SPECIAL:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_SPECIAL);
local4 = specialIconClass;
break;
case ItemViewCategoryEnum.WEAPON:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_TURRETS);
local4 = weaponIconClass;
break;
case ItemViewCategoryEnum.ARMOR:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_HULLS);
local4 = armorIconClass;
break;
case ItemViewCategoryEnum.PAINT:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_PAINTS);
local4 = colorIconClass;
break;
case ItemViewCategoryEnum.KIT:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_KITS);
local4 = kitIconClass;
break;
case ItemViewCategoryEnum.INVENTORY:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_SUPPLIES);
local4 = inventoryIconClass;
break;
case ItemViewCategoryEnum.RESISTANCE:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_RESISTANCE_MODULES);
local4 = resistanceIconClass;
break;
case ItemViewCategoryEnum.GIVEN_PRESENTS:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_PRESENTS);
local4 = givenPresentsIconClass;
break;
case ItemViewCategoryEnum.DRONE:
local3 = local2.getText(TanksLocale.TEXT_GARAGE_CATEGORY_BUTTON_DRONES);
local4 = droneIconClass;
}
super(local3,local4);
enabled = true;
this.category = param1;
addChild(this._newItemIndicator);
this._newItemIndicator.y = -5;
this._newItemIndicator.visible = false;
addChild(this._discountIndicator);
this._discountIndicator.y = -5;
this._discountIndicator.visible = false;
alignIcon();
}
public function getCategory() : ItemViewCategoryEnum {
return this.category;
}
public function setIconState() : void {
icon.visible = true;
_label.visible = false;
this.width = 30;
}
public function setTextState() : void {
icon.visible = false;
_label.visible = true;
this.width = 6 + _label.width + 6;
}
public function setIconTextState() : void {
icon.visible = true;
_label.visible = true;
this.width = 27 + _label.width + 6;
}
public function showNewItemIndicator() : void {
this._newItemIndicator.visible = true;
}
public function hideNewItemIndicator() : void {
this._newItemIndicator.visible = false;
}
public function showDiscountIndicator() : void {
this._discountIndicator.visible = true;
}
public function hideDiscountIndicator() : void {
this._discountIndicator.visible = false;
}
override public function get width() : Number {
return this._width;
}
override public function set width(param1:Number) : void {
this._width = param1;
if(_label.visible) {
if(Boolean(icon) && Boolean(icon.visible)) {
_label.x = 21 + (this._width - 21 - _label.width >> 1);
} else {
_label.x = this._width - _label.width >> 1;
}
}
this._newItemIndicator.x = param1 - (this._newItemIndicator.width >> 1) - 4;
this._discountIndicator.x = param1 - (this._discountIndicator.width >> 1) - 4;
super.width = this._width;
}
}
}
|
package alternativa.tanks.model.item.container.resource {
import projects.tanks.client.garage.models.item.container.resources.ContainerResourceCC;
[ModelInterface]
public interface ContainerResource {
function getResources() : ContainerResourceCC;
}
}
|
package projects.tanks.clients.fp10.TanksLauncherErrorScreen {
import controls.TankWindowInner;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.text.TextFormatAlign;
public class TankErrorWindow extends Sprite {
private static const bitmapTechnical:Class = TankErrorWindow_bitmapTechnical;
private var window:TankWindow;
private var inner:TankWindowInner;
private var messageLabel:LabelBase;
private var windowWidth:int = 450;
private var windowHeight:int = 300;
private const windowMargin:int = 12;
private const margin:int = 9;
private var technicalBitmap:Bitmap;
public function TankErrorWindow() {
super();
this.technicalBitmap = new Bitmap(new bitmapTechnical().bitmapData);
}
public function init(messageText:String, locale:String) : void {
this.window = new TankWindow(this.windowWidth,this.windowHeight);
addChild(this.window);
this.inner = new TankWindowInner(this.windowWidth - this.windowMargin * 2,this.windowHeight - this.windowMargin * 2,TankWindowInner.GREEN);
this.inner.x = this.inner.y = this.windowMargin;
addChild(this.inner);
this.technicalBitmap.x = this.windowWidth - this.technicalBitmap.width >> 1;
this.technicalBitmap.y = this.windowMargin * 2;
addChild(this.technicalBitmap);
this.messageLabel = new LabelBase();
this.messageLabel.align = TextFormatAlign.CENTER;
this.messageLabel.wordWrap = true;
this.messageLabel.multiline = true;
this.messageLabel.embedFonts = TankFont.needEmbedFont(locale);
this.messageLabel.htmlText = messageText;
this.messageLabel.x = this.windowMargin * 2;
this.messageLabel.y = this.technicalBitmap.y + this.technicalBitmap.height + this.margin;
this.messageLabel.width = this.windowWidth - this.windowMargin * 4;
addChild(this.messageLabel);
if(this.messageLabel.numLines > 2) {
this.messageLabel.align = TextFormatAlign.CENTER;
this.messageLabel.htmlText = messageText;
this.messageLabel.width = this.windowWidth - this.windowMargin * 4;
}
var local3:int = 13;
this.messageLabel.setTextFormat(TankFont.getLocaleTextFormat(locale,local3));
this.window.height = this.messageLabel.y + this.messageLabel.height + this.windowMargin * 2;
this.inner.height = this.window.height - 2 * this.windowMargin;
}
}
}
|
package alternativa.tanks.view.battlelist {
import alternativa.osgi.service.display.IDisplay;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.controllers.battlelist.BattleListItemParams;
import alternativa.tanks.controllers.battlelist.IBattleListViewControllerCallback;
import alternativa.tanks.model.quest.common.gui.window.buttons.skin.GreenBigButtonSkin;
import alternativa.tanks.service.battlecreate.IBattleCreateFormService;
import alternativa.tanks.service.panel.IPanelView;
import alternativa.tanks.view.battleinfo.BattleInfoBaseParams;
import alternativa.tanks.view.battlelist.battleitem.BattleListItem;
import alternativa.tanks.view.battlelist.forms.BattleListRenderer;
import alternativa.tanks.view.battlelist.help.LockedMapsHelper;
import alternativa.tanks.view.battlelist.modefilter.BattleModeCheckBox;
import alternativa.types.Long;
import controls.BigButton;
import controls.TankWindowInner;
import controls.base.DefaultButtonBase;
import fl.controls.LabelButton;
import fl.controls.List;
import fl.controls.ScrollBar;
import fl.data.DataProvider;
import fl.events.ListEvent;
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.utils.clearTimeout;
import flash.utils.setTimeout;
import forms.TankWindowWithHeader;
import projects.tanks.client.battleservice.BattleCreateParameters;
import projects.tanks.client.battleservice.BattleMode;
import projects.tanks.client.battleservice.Range;
import projects.tanks.client.battleservice.model.createparams.BattleLimits;
import projects.tanks.client.battleservice.model.types.BattleSuspicionLevel;
import projects.tanks.clients.flash.commons.services.layout.event.LobbyLayoutServiceEvent;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.IHelpService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.battlelist.UserBattleSelectActionsService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.probattle.IUserProBattleService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.reconnect.ReconnectService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
import utils.ScrollStyleUtils;
public class BattleListView extends Sprite implements IBattleListView {
[Inject]
public static var display:IDisplay;
[Inject]
public static var helpService:IHelpService;
[Inject]
public static var userProBattleService:IUserProBattleService;
[Inject]
public static var userPropertiesService:IUserPropertiesService;
[Inject]
public static var battleSelectActionsService:UserBattleSelectActionsService;
[Inject]
public static var battleCreateFormService:IBattleCreateFormService;
[Inject]
public static var lobbyLayoutService:ILobbyLayoutService;
[Inject]
public static var reconnectService:ReconnectService;
[Inject]
public static var panelView:IPanelView;
[Inject]
public static var localeService:ILocaleService;
private static const MIN_FLASH_WIDTH:int = 970;
private static const MIN_FLASH_HEIGHT:int = 530;
private static const HEADER_HEIGHT:int = 60;
private static const ADDITIONAL_SCROLL_AREA_HEIGHT:Number = 7;
private static const RESIZE_DELAY:int = 400;
private const HELPER_GROUP_KEY:String = "BattleSelectModel";
private const HELPER_NOT_AVAILABLE:int = 1;
private var _lockedMapsHelper:LockedMapsHelper;
private var _callback:IBattleListViewControllerCallback;
private var _window:TankWindowWithHeader;
private var _inner:TankWindowInner;
private var _createBattleButton:DefaultButtonBase;
private var findBattleButton:BigButton = new BigButton();
private var _battleList:List;
private var battleModeItems:Vector.<BattleModeCheckBox>;
private var _dataProvider:DataProvider;
private var _timeOutResize:uint;
private var iconWidth:int = 100;
private var lastSelectedBattleId:Long;
public function BattleListView() {
super();
this._window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_CURRENT_BATTLES);
addChild(this._window);
this._inner = new TankWindowInner(100,100,TankWindowInner.GREEN);
this._inner.showBlink = true;
addChild(this._inner);
this._dataProvider = new DataProvider();
this._battleList = new List();
this._battleList.rowHeight = 20;
this._battleList.setStyle("cellRenderer",BattleListRenderer);
this._battleList.dataProvider = this._dataProvider;
this._battleList.focusEnabled = true;
addChild(this._battleList);
this._battleList.move(15,70);
this._battleList.verticalLineScrollSize = 12;
ScrollStyleUtils.setGreenStyle(this._battleList);
this._createBattleButton = new DefaultButtonBase();
this._createBattleButton.label = LocaleBattleList.showBattleCreateFormLabel;
this._createBattleButton.visible = !battleCreateFormService.battleCreationDisabled;
addChild(this._createBattleButton);
this.findBattleButton.setBigText();
this.findBattleButton.width = 200;
this.findBattleButton.label = localeService.getText(TanksLocale.TEXT_FIND_BATTLE_BUTTON_TEXT);
this.findBattleButton.y = 12;
this.findBattleButton.setSkin(GreenBigButtonSkin.GREEN_SKIN);
this.findBattleButton.enabled = true;
addChild(this.findBattleButton);
this.initBattleModeFilter();
this.resize();
}
private function initBattleModeFilter() : void {
this.battleModeItems = new Vector.<BattleModeCheckBox>();
this.createBattleModeCheckBox(BattleMode.DM);
this.createBattleModeCheckBox(BattleMode.TDM);
this.createBattleModeCheckBox(BattleMode.CTF);
this.createBattleModeCheckBox(BattleMode.CP);
this.createBattleModeCheckBox(BattleMode.AS);
this.createBattleModeCheckBox(BattleMode.RUGBY);
this.createBattleModeCheckBox(BattleMode.JGR);
this.resize();
}
private function createBattleModeCheckBox(param1:BattleMode) : void {
var local2:BattleModeCheckBox = new BattleModeCheckBox(param1);
addChild(local2);
this.battleModeItems.push(local2);
}
public function setCallBack(param1:IBattleListViewControllerCallback) : void {
this._callback = param1;
}
public function show(param1:BattleMode) : void {
if(!this.getContainer().contains(this)) {
this.resize();
this.setEvents();
this.getContainer().addChild(this);
this._lockedMapsHelper = new LockedMapsHelper();
helpService.registerHelper(this.HELPER_GROUP_KEY,this.HELPER_NOT_AVAILABLE,this._lockedMapsHelper,false);
this.getBattleModeCheckBox(param1).isPressed = true;
}
}
private function setEvents() : void {
this.getStage().addEventListener(Event.RESIZE,this.onResize);
lobbyLayoutService.addEventListener(LobbyLayoutServiceEvent.END_LAYOUT_SWITCH,this.onEndLayoutSwitch);
this._createBattleButton.addEventListener(MouseEvent.CLICK,this.onShowCreateBattleFormButtonClick);
this._battleList.addEventListener(ListEvent.ITEM_CLICK,this.onBattleListItemClick);
this._battleList.addEventListener(Event.CHANGE,this.onListChange);
this.findBattleButton.addEventListener(MouseEvent.CLICK,this.onBackToMatchmakingClick);
var local1:int = int(this.battleModeItems.length);
var local2:int = 0;
while(local2 < local1) {
this.battleModeItems[local2].addEventListener(Event.CHANGE,this.onBattleModeChange);
local2++;
}
}
public function hide() : void {
if(this.getContainer().contains(this)) {
this.removeEvents();
this.getContainer().removeChild(this);
helpService.hideHelper(this.HELPER_GROUP_KEY,this.HELPER_NOT_AVAILABLE);
helpService.unregisterHelper(this.HELPER_GROUP_KEY,this.HELPER_NOT_AVAILABLE);
}
}
public function destroy() : void {
this.removeEvents();
var local1:int = int(this.battleModeItems.length);
var local2:int = 0;
while(local2 < local1) {
this.battleModeItems[local2].destroy();
local2++;
}
clearTimeout(this._timeOutResize);
this.battleModeItems = null;
this._lockedMapsHelper = null;
this._callback = null;
}
private function removeEvents() : void {
lobbyLayoutService.removeEventListener(LobbyLayoutServiceEvent.END_LAYOUT_SWITCH,this.onEndLayoutSwitch);
this.getStage().removeEventListener(Event.RESIZE,this.onResize);
this._createBattleButton.removeEventListener(MouseEvent.CLICK,this.onShowCreateBattleFormButtonClick);
this._battleList.removeEventListener(ListEvent.ITEM_CLICK,this.onBattleListItemClick);
this._battleList.removeEventListener(Event.CHANGE,this.onListChange);
this.findBattleButton.removeEventListener(MouseEvent.CLICK,this.onBackToMatchmakingClick);
var local1:int = int(this.battleModeItems.length);
var local2:int = 0;
while(local2 < local1) {
this.battleModeItems[local2].removeEventListener(Event.CHANGE,this.onBattleModeChange);
local2++;
}
}
private function onEndLayoutSwitch(param1:LobbyLayoutServiceEvent) : void {
this.findBattleButton.enabled = true;
}
private function onBattleModeChange(param1:Event) : void {
var local2:BattleModeCheckBox = BattleModeCheckBox(param1.currentTarget);
this._callback.onBattleModeChange(local2.battleMode,local2.isPressed);
}
public function unPressFilter(param1:BattleMode) : void {
this.getBattleModeCheckBox(param1).isPressed = false;
}
public function lockFilter(param1:BattleMode) : void {
this.getBattleModeCheckBox(param1).lock = true;
}
public function unLockFilter(param1:BattleMode) : void {
this.getBattleModeCheckBox(param1).lock = false;
}
private function getBattleModeCheckBox(param1:BattleMode) : BattleModeCheckBox {
var local2:BattleModeCheckBox = null;
for each(local2 in this.battleModeItems) {
if(local2.battleMode == param1) {
return local2;
}
}
return null;
}
private function updateScrollOnEnterFrame(param1:Event) : void {
var local4:Sprite = null;
var local5:Sprite = null;
var local2:ScrollBar = this._battleList.verticalScrollBar;
var local3:int = 0;
while(local3 < local2.numChildren) {
local4 = Sprite(local2.getChildAt(local3));
if(local4.hitArea != null) {
local5 = local4.hitArea;
local5.graphics.clear();
} else {
local5 = new Sprite();
local5.mouseEnabled = false;
local4.hitArea = local5;
this._battleList.addChild(local5);
}
local5.graphics.beginFill(0,0);
if(local4 is LabelButton) {
local5.graphics.drawRect(local2.x - ADDITIONAL_SCROLL_AREA_HEIGHT,local4.y - 14,local4.width + ADDITIONAL_SCROLL_AREA_HEIGHT,local4.height + 28);
} else {
local5.graphics.drawRect(local2.x - ADDITIONAL_SCROLL_AREA_HEIGHT,local4.y,local4.width + ADDITIONAL_SCROLL_AREA_HEIGHT,local4.height);
}
local5.graphics.endFill();
local3++;
}
}
public function resize(param1:Boolean = true) : void {
clearTimeout(this._timeOutResize);
var local2:int = Math.max(MIN_FLASH_WIDTH,this.getStage().stageWidth) / 3;
var local3:int = Math.max(this.getStage().stageHeight - HEADER_HEIGHT,MIN_FLASH_HEIGHT);
this._window.width = local2;
this._window.height = local3;
this.x = local2;
this.y = HEADER_HEIGHT;
this._inner.width = local2 - 22;
this._inner.height = local3 - 115;
this._inner.x = 11;
this._inner.y = 67;
this.findBattleButton.x = (local2 - this.findBattleButton.width) / 2;
var local4:int = this._inner.width - (this._battleList.verticalScrollBar.visible ? 0 : 4);
this._battleList.setSize(local4,this._inner.height - 8);
var local5:int = int(this.battleModeItems.length);
var local6:int = 0;
while(local6 < local5) {
if(local6 == 0) {
this.battleModeItems[local6].x = 11;
} else {
this.battleModeItems[local6].x = this.battleModeItems[local6 - 1].x + this.battleModeItems[local6 - 1].width + 5;
}
this.battleModeItems[local6].y = local3 - 42;
local6++;
}
this._createBattleButton.x = local2 - this._createBattleButton.width - 11;
this._createBattleButton.y = local3 - 42;
this.resizeItems(local4);
if(param1) {
this.resizeWithDelay();
}
}
private function resizeItems(param1:int) : void {
var local3:Object = null;
this.iconWidth = param1 - (this._battleList.verticalScrollBar.visible ? 35 : 20);
var local2:int = 0;
while(local2 < this._dataProvider.length) {
local3 = this._dataProvider.getItemAt(local2);
BattleListItem(local3.iconNormal).resize(this.iconWidth);
this._dataProvider.invalidateItemAt(local2);
local2++;
}
}
private function resizeWithDelay() : void {
clearTimeout(this._timeOutResize);
this._timeOutResize = setTimeout(this.onResizeWithDelay,RESIZE_DELAY);
}
private function onResizeWithDelay() : void {
this.resize(false);
}
public function sortBattleList() : void {
if(this._dataProvider.length == 0) {
return;
}
this._dataProvider.sortOn(["suspicionLevel","accessible","createdAt"],[Array.NUMERIC,Array.DESCENDING,0]);
}
public function resetSelectedItem() : void {
this._battleList.selectedItem = null;
}
public function createItem(param1:BattleListItemParams, param2:Boolean) : void {
var local3:Object = new Object();
var local4:BattleInfoBaseParams = param1.params;
var local5:BattleCreateParameters = local4.createParams;
local3.id = param1.id;
local3.accessible = param1.accessible;
local3.iconNormal = local3.iconSelected = new BattleListItem(param1,this.iconWidth);
local3.suspicionLevel = local4.suspicionLevel.value;
local3.dat = param1;
local3.friends = local4.friends;
local3.modeIndex = this.getModeSortIndex(local5.battleMode);
var local6:BattleLimits = local5.limits;
local3.timeLimit = local6.timeLimitInSec == 0 ? 999999 : local6.timeLimitInSec;
local3.scoreLimit = local6.scoreLimit == 0 ? 0 : local6.scoreLimit;
local3.mapName = local4.mapName;
local3.customName = local4.customName;
local3.formatName = param1.formatName;
local3.proBattle = local5.proBattle ? 0 : 1;
local3.isFull = this.isFullBattle(param1);
local3.createdAt = param1.id.toString();
if(this.getItemIndex(param1.id) < 0) {
this._dataProvider.addItem(local3);
}
if(param2) {
this.sortBattleList();
this.resize();
helpService.hideHelper(this.HELPER_GROUP_KEY,this.HELPER_NOT_AVAILABLE);
}
}
private function getModeSortIndex(param1:BattleMode) : int {
switch(param1) {
case BattleMode.CTF:
return 1;
case BattleMode.DM:
return 2;
case BattleMode.TDM:
return 3;
case BattleMode.CP:
return 4;
case BattleMode.AS:
return 5;
case BattleMode.RUGBY:
return 6;
default:
return 0;
}
}
private function isFullBattle(param1:BattleListItemParams) : Boolean {
if(param1.isDM) {
return param1.dmParams.users.length == param1.params.createParams.maxPeopleCount;
}
return param1.teamParams.usersRed.length == param1.params.createParams.maxPeopleCount && param1.teamParams.usersBlue.length == param1.params.createParams.maxPeopleCount;
}
public function removeItem(param1:Long) : void {
var local2:int = this.getItemIndex(param1);
if(local2 >= 0) {
this._dataProvider.removeItemAt(local2);
this.resizeWithDelay();
}
}
public function setSelect(param1:Long) : void {
var local2:int = this.getItemIndex(param1);
if(local2 >= 0) {
this._battleList.selectedIndex = local2;
this._battleList.scrollToSelected();
if(this.getStage().focus != this._battleList) {
this.getStage().focus = this._battleList;
}
this.lastSelectedBattleId = BattleListItemParams(this._battleList.selectedItem.dat).id;
} else {
this._battleList.selectedItem = null;
}
this._battleList.drawNow();
}
public function updateSuspicious(param1:Long, param2:BattleSuspicionLevel) : void {
var local4:Object = null;
var local5:BattleListItemParams = null;
var local3:int = this.getItemIndex(param1);
if(local3 >= 0) {
local4 = this._dataProvider.getItemAt(local3);
local5 = local4.dat;
BattleListItem(local4.iconNormal).updateSuspicion(param2);
local4.suspicionLevel = param2.value;
this._dataProvider.invalidateItemAt(local3);
this.sortBattleList();
}
}
public function updateUsersCount(param1:Long) : void {
var local3:Object = null;
var local4:BattleListItemParams = null;
var local2:int = this.getItemIndex(param1);
if(local2 >= 0) {
local3 = this._dataProvider.getItemAt(local2);
local4 = local3.dat;
BattleListItem(local3.iconNormal).updateUsersCount();
local3.isFull = this.isFullBattle(local4);
this._dataProvider.invalidateItemAt(local2);
}
}
public function updateBattleName(param1:Long) : void {
var local2:int = this.getItemIndex(param1);
if(local2 >= 0) {
BattleListItem(this._dataProvider.getItemAt(local2).iconNormal).updateBattleName();
this._dataProvider.invalidateItemAt(local2);
}
}
public function swapTeams(param1:Long) : void {
var local3:Object = null;
var local4:BattleListItemParams = null;
var local2:int = this.getItemIndex(param1);
if(local2 >= 0) {
local3 = this._dataProvider.getItemAt(local2);
local4 = local3.dat;
BattleListItem(local3.iconNormal).updateUsersCount();
local3.isFull = this.isFullBattle(local4);
this._dataProvider.invalidateItemAt(local2);
}
}
public function updateAccessibleItems() : void {
var local3:Object = null;
var local4:BattleListItemParams = null;
var local5:Range = null;
var local6:Boolean = false;
var local1:int = int(this._dataProvider.length);
var local2:int = 0;
while(local2 < local1) {
local3 = this._dataProvider.getItemAt(local2);
local4 = local3.dat;
local5 = local4.params.createParams.rankRange;
local6 = local5.min <= userPropertiesService.rank && userPropertiesService.rank <= local5.max;
local4.accessible = local6;
BattleListItem(local3.iconNormal).updateAccessible();
local3.accessible = local6;
this._dataProvider.invalidateItemAt(local2);
local2++;
}
this.sortBattleList();
}
public function getItemIndex(param1:Long) : int {
var local4:Object = null;
var local2:int = int(this._dataProvider.length);
var local3:int = 0;
while(local3 < local2) {
local4 = this._dataProvider.getItemAt(local3);
if(local4.id == param1) {
return local3;
}
local3++;
}
return -1;
}
private function onResize(param1:Event) : void {
this.resize();
}
private function onShowCreateBattleFormButtonClick(param1:MouseEvent) : void {
this._callback.onShowCreateBattleFormButtonClick();
}
private function onBattleListItemClick(param1:ListEvent) : void {
var local2:Long = BattleListItemParams(param1.item.dat).id;
if(local2 != this.lastSelectedBattleId) {
this.lastSelectedBattleId = local2;
}
this._callback.onBattleListItemClick(BattleListItemParams(param1.item.dat).params.battle);
battleSelectActionsService.battleSelected(BattleListItemParams(param1.item.dat).createParams.battleMode,local2);
var local3:Boolean = BattleListItemParams(param1.item.dat).accessible;
if(!local3) {
this._lockedMapsHelper.targetPoint = new Point(this.getStage().mouseX,this.getStage().mouseY);
helpService.showHelper(this.HELPER_GROUP_KEY,this.HELPER_NOT_AVAILABLE);
}
}
private function onListChange(param1:Event) : void {
if(this._battleList.selectedItem != null) {
this._callback.onBattleListItemChange(BattleListItemParams(this._battleList.selectedItem.dat).params.battle);
}
}
private function onBackToMatchmakingClick(param1:MouseEvent) : void {
this.findBattleButton.enabled = false;
this._callback.onBackToMatchmakingClick();
}
private function getContainer() : DisplayObjectContainer {
return display.systemLayer;
}
private function getStage() : Stage {
return display.stage;
}
public function setBattleButtonEnabled(param1:Boolean) : void {
this.findBattleButton.enabled = param1;
}
public function setBattleCreationEnabled(param1:Boolean) : void {
this._createBattleButton.visible = param1;
}
}
}
|
package projects.tanks.client.panel.model.profile.usersettings {
import projects.tanks.client.chat.models.chat.users.personalmessagereceiver.PersonalMessageReceiveMode;
public interface ISettingsModelBase {
function openAntiAddictionSettings(param1:PersonalMessageReceiveMode, param2:String, param3:String) : void;
function openSettings(param1:PersonalMessageReceiveMode) : void;
}
}
|
package alternativa.tanks.gui.friends.list.refferals {
import controls.TankWindowInner;
import controls.statassets.StatLineBase;
import controls.statassets.StatLineNormal;
import controls.statassets.StatLineNormalActive;
import controls.statassets.StatLineSelected;
import controls.statassets.StatLineSelectedActive;
import fl.controls.List;
import fl.data.DataProvider;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import forms.events.StatListEvent;
import projects.tanks.client.panel.model.referrals.ReferralIncomeData;
import utils.ScrollStyleUtils;
public class ReferralStatList extends Sprite {
private var inner:TankWindowInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
private var header:ReferralStatHeader = new ReferralStatHeader();
private var list:List = new List();
private var dp:DataProvider = new DataProvider();
private var currentSort:int = 1;
public function ReferralStatList() {
super();
this.list.rowHeight = 20;
this.list.setStyle("cellRenderer",ReferralStatListRenderer);
this.list.dataProvider = this.dp;
this.list.focusEnabled = true;
ScrollStyleUtils.setGreenStyle(this.list);
addChild(this.inner);
this.inner.addChild(this.header);
this.header.y = 4;
this.header.x = 4;
this.inner.addChild(this.list);
this.list.y = this.header.y + this.header.height + 2;
this.list.x = this.header.x;
this.header.addEventListener(StatListEvent.UPDATE_SORT,this.changeSort);
}
private function clear() : void {
var local1:Object = {};
var local2:int = 0;
while(local2 < this.dp.length) {
local1 = this.dp.getItemAt(local2);
local1.sort = this.currentSort;
this.dp.replaceItemAt(local1,local2);
local2++;
}
this.sort();
}
private function sort() : void {
if(this.currentSort == 0) {
this.dp.sortOn("uid",Array.CASEINSENSITIVE);
} else {
this.dp.sortOn("income",Array.NUMERIC | Array.DESCENDING);
}
var local1:Boolean = this.list.maxVerticalScrollPosition > 0;
var local2:Number = local1 ? this.header.width + 25 : this.header.width;
this.list.width = local1 ? this.header.width + 7 : this.header.width;
ReferralStatLineBackgroundNormal.bg = new Bitmap(this.setBackground(local2,false));
ReferalStatLineBackgroundSelected.bg = new Bitmap(this.setBackground(local2,true));
this.dp.invalidate();
}
public function addReferrals(param1:Vector.<ReferralIncomeData>) : void {
var local2:ReferralIncomeData = null;
var local3:Object = null;
for each(local2 in param1) {
local3 = {};
local3.userId = local2.user;
local3.income = local2.income;
local3.sort = this.currentSort;
this.dp.addItem(local3);
}
this.header.setDefaultSort();
this.currentSort = 1;
this.sort();
}
private function setBackground(param1:int, param2:Boolean) : BitmapData {
var local4:StatLineBase = null;
var local3:Sprite = new Sprite();
var local5:Array = [0,param1 - 120,param1 - 1];
var local6:BitmapData = new BitmapData(param1,20,true,0);
var local7:uint = 0;
while(local7 < 2) {
local4 = this.currentSort == local7 ? (param2 ? new StatLineSelectedActive() : new StatLineNormalActive()) : (param2 ? new StatLineSelected() : new StatLineNormal());
local4.width = local5[local7 + 1] - local5[local7] - 2;
local4.height = 18;
local4.x = local5[local7];
local3.addChild(local4);
local7++;
}
local6.draw(local3);
return local6;
}
private function changeSort(param1:StatListEvent) : void {
this.currentSort = param1.sortField;
this.clear();
}
public function resize(param1:Number, param2:Number) : void {
this.inner.height = param2;
this.list.height = this.inner.height - 32;
this.inner.width = param1;
this.header.width = param1 - 6;
this.list.width = this.header.width;
}
public function hide() : void {
this.dp.removeAll();
}
}
}
|
package controls.resultassets {
import assets.resultwindow.bres_BG_RED_PIXEL;
import assets.resultwindow.bres_BG_RED_TL;
public class ResultWindowRed extends ResultWindowBase {
public function ResultWindowRed() {
super();
tl = new bres_BG_RED_TL(1,1);
px = new bres_BG_RED_PIXEL(1,1);
}
}
}
|
package alternativa.engine3d.objects
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Debug;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.VG;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.core.Wrapper;
import alternativa.gfx.core.IndexBufferResource;
import alternativa.gfx.core.VertexBufferResource;
use namespace alternativa3d;
public class Decal extends Mesh
{
public var attenuation:Number = 1000000;
public function Decal()
{
super();
shadowMapAlphaThreshold = 100;
}
public function createGeometry(param1:Mesh, param2:Boolean = false) : void
{
if(!param2)
{
param1 = param1.clone() as Mesh;
}
faceList = param1.faceList;
vertexList = param1.vertexList;
param1.faceList = null;
param1.vertexList = null;
var _loc3_:Vertex = vertexList;
while(_loc3_ != null)
{
_loc3_.transformId = 0;
_loc3_.id = null;
_loc3_ = _loc3_.next;
}
var _loc4_:Face = faceList;
while(_loc4_ != null)
{
_loc4_.id = null;
_loc4_ = _loc4_.next;
}
calculateBounds();
}
override public function clone() : Object3D
{
var _loc1_:Decal = new Decal();
_loc1_.clonePropertiesFrom(this);
return _loc1_;
}
override protected function clonePropertiesFrom(param1:Object3D) : void
{
super.clonePropertiesFrom(param1);
var _loc2_:Decal = param1 as Decal;
this.attenuation = _loc2_.attenuation;
}
override alternativa3d function draw(param1:Camera3D) : void
{
var _loc3_:Face = null;
var _loc4_:Vertex = null;
if(faceList == null)
{
return;
}
if(clipping == 0)
{
if(culling & 1)
{
return;
}
culling = 0;
}
this.prepareResources();
useDepth = true;
if(faceList.material != null)
{
param1.addDecal(this);
transformConst[0] = ma;
transformConst[1] = mb;
transformConst[2] = mc;
transformConst[3] = md;
transformConst[4] = me;
transformConst[5] = mf;
transformConst[6] = mg;
transformConst[7] = mh;
transformConst[8] = mi;
transformConst[9] = mj;
transformConst[10] = mk;
transformConst[11] = ml;
}
var _loc2_:int = !!param1.debug ? int(int(param1.checkInDebug(this))) : int(int(0));
if(_loc2_ & Debug.BOUNDS)
{
Debug.drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ);
}
if(_loc2_ & Debug.EDGES)
{
if(transformId > 500000000)
{
transformId = 0;
_loc4_ = vertexList;
while(_loc4_ != null)
{
_loc4_.transformId = 0;
_loc4_ = _loc4_.next;
}
}
++transformId;
calculateInverseMatrix();
_loc3_ = prepareFaces(param1,faceList);
if(_loc3_ == null)
{
return;
}
Debug.drawEdges(param1,_loc3_,16777215);
}
}
override alternativa3d function getVG(param1:Camera3D) : VG
{
this.draw(param1);
return null;
}
override alternativa3d function prepareResources() : void
{
var _loc1_:Vector.<Number> = null;
var _loc2_:int = 0;
var _loc3_:int = 0;
var _loc4_:Vertex = null;
var _loc5_:Vector.<uint> = null;
var _loc6_:int = 0;
var _loc7_:Face = null;
var _loc8_:Wrapper = null;
var _loc9_:uint = 0;
var _loc10_:uint = 0;
var _loc11_:uint = 0;
if(vertexBuffer == null)
{
_loc1_ = new Vector.<Number>();
_loc2_ = 0;
_loc3_ = 0;
_loc4_ = vertexList;
while(_loc4_ != null)
{
_loc1_[_loc2_] = _loc4_.x;
_loc2_++;
_loc1_[_loc2_] = _loc4_.y;
_loc2_++;
_loc1_[_loc2_] = _loc4_.z;
_loc2_++;
_loc1_[_loc2_] = _loc4_.u;
_loc2_++;
_loc1_[_loc2_] = _loc4_.v;
_loc2_++;
_loc1_[_loc2_] = _loc4_.normalX;
_loc2_++;
_loc1_[_loc2_] = _loc4_.normalY;
_loc2_++;
_loc1_[_loc2_] = _loc4_.normalZ;
_loc2_++;
_loc4_.index = _loc3_;
_loc3_++;
_loc4_ = _loc4_.next;
}
vertexBuffer = new VertexBufferResource(_loc1_,8);
_loc5_ = new Vector.<uint>();
_loc6_ = 0;
numTriangles = 0;
_loc7_ = faceList;
while(_loc7_ != null)
{
_loc8_ = _loc7_.wrapper;
_loc9_ = _loc8_.vertex.index;
_loc8_ = _loc8_.next;
_loc10_ = _loc8_.vertex.index;
_loc8_ = _loc8_.next;
while(_loc8_ != null)
{
_loc11_ = _loc8_.vertex.index;
_loc5_[_loc6_] = _loc9_;
_loc6_++;
_loc5_[_loc6_] = _loc10_;
_loc6_++;
_loc5_[_loc6_] = _loc11_;
_loc6_++;
_loc10_ = _loc11_;
++numTriangles;
_loc8_ = _loc8_.next;
}
_loc7_ = _loc7_.next;
}
indexBuffer = new IndexBufferResource(_loc5_);
}
}
}
}
|
package alternativa.tanks.battle.events {
public class SpeedHackEvent {
public var deltas:Array;
public function SpeedHackEvent(param1:Array) {
super();
this.deltas = param1;
}
}
}
|
package alternativa.engine3d.containers {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.Object3DContainer;
use namespace alternativa3d;
public class DistanceSortContainer extends Object3DContainer {
private static const sortingStack:Vector.<int> = new Vector.<int>();
public var sortByZ:Boolean = false;
public function DistanceSortContainer() {
super();
}
override public function clone() : Object3D {
var local1:DistanceSortContainer = new DistanceSortContainer();
local1.clonePropertiesFrom(this);
return local1;
}
override protected function clonePropertiesFrom(param1:Object3D) : void {
super.clonePropertiesFrom(param1);
var local2:DistanceSortContainer = param1 as DistanceSortContainer;
this.sortByZ = local2.sortByZ;
}
override alternativa3d function drawVisibleChildren(param1:Camera3D) : void {
var local2:int = 0;
var local3:int = 0;
var local4:Object3D = null;
var local7:int = 0;
var local8:Number = NaN;
var local9:Number = NaN;
var local10:Number = NaN;
var local11:Number = NaN;
var local12:Number = NaN;
var local5:int = 0;
var local6:int = alternativa3d::numVisibleChildren - 1;
sortingStack[0] = local5;
sortingStack[1] = local6;
local7 = 2;
if(this.sortByZ) {
while(local7 > 0) {
local6 = sortingStack[--local7];
local5 = sortingStack[--local7];
local3 = local6;
local2 = local5;
local4 = alternativa3d::visibleChildren[local6 + local5 >> 1];
local9 = Number(local4.alternativa3d::ml);
do {
while(true) {
local8 = Number((alternativa3d::visibleChildren[local2] as Object3D).alternativa3d::ml);
if(local8 <= local9) {
break;
}
local2++;
}
while(true) {
local10 = Number((alternativa3d::visibleChildren[local3] as Object3D).alternativa3d::ml);
if(local10 >= local9) {
break;
}
local3--;
}
if(local2 <= local3) {
local4 = alternativa3d::visibleChildren[local2];
var local13:* = local2++;
alternativa3d::visibleChildren[local13] = alternativa3d::visibleChildren[local3];
var local14:* = local3--;
alternativa3d::visibleChildren[local14] = local4;
}
}
while(local2 <= local3);
if(local5 < local3) {
local13 = local7++;
sortingStack[local13] = local5;
local14 = local7++;
sortingStack[local14] = local3;
}
if(local2 < local6) {
local13 = local7++;
sortingStack[local13] = local2;
local14 = local7++;
sortingStack[local14] = local6;
}
}
} else {
local2 = 0;
while(local2 < alternativa3d::numVisibleChildren) {
local4 = alternativa3d::visibleChildren[local2];
local11 = local4.alternativa3d::md * param1.alternativa3d::viewSizeX / param1.alternativa3d::focalLength;
local12 = local4.alternativa3d::mh * param1.alternativa3d::viewSizeY / param1.alternativa3d::focalLength;
local4.alternativa3d::distance = local11 * local11 + local12 * local12 + local4.alternativa3d::ml * local4.alternativa3d::ml;
local2++;
}
while(local7 > 0) {
local6 = sortingStack[--local7];
local5 = sortingStack[--local7];
local3 = local6;
local2 = local5;
local4 = alternativa3d::visibleChildren[local6 + local5 >> 1];
local9 = Number(local4.alternativa3d::distance);
do {
while(true) {
local8 = Number((alternativa3d::visibleChildren[local2] as Object3D).alternativa3d::distance);
if(local8 <= local9) {
break;
}
local2++;
}
while(true) {
local10 = Number((alternativa3d::visibleChildren[local3] as Object3D).alternativa3d::distance);
if(local10 >= local9) {
break;
}
local3--;
}
if(local2 <= local3) {
local4 = alternativa3d::visibleChildren[local2];
local13 = local2++;
alternativa3d::visibleChildren[local13] = alternativa3d::visibleChildren[local3];
local14 = local3--;
alternativa3d::visibleChildren[local14] = local4;
}
}
while(local2 <= local3);
if(local5 < local3) {
local13 = local7++;
sortingStack[local13] = local5;
local14 = local7++;
sortingStack[local14] = local3;
}
if(local2 < local6) {
local13 = local7++;
sortingStack[local13] = local2;
local14 = local7++;
sortingStack[local14] = local6;
}
}
}
local2 = alternativa3d::numVisibleChildren - 1;
while(local2 >= 0) {
local4 = alternativa3d::visibleChildren[local2];
local4.alternativa3d::concat(this);
local4.alternativa3d::draw(param1);
alternativa3d::visibleChildren[local2] = null;
local2--;
}
}
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.services {
import projects.tanks.clients.fp10.models.tankspartnersmodel.partners.steam.SteamWorks;
public interface SteamDataService {
function setSteamId(param1:String) : void;
function setSessionTicket(param1:String) : void;
function setLanguage(param1:String) : void;
function setAppId(param1:String) : void;
function setSteamWorks(param1:SteamWorks) : void;
function getSteamId() : String;
function getSessionTicket() : String;
function getLanguage() : String;
function getAppId() : String;
function getSteamWorks() : SteamWorks;
}
}
|
package projects.tanks.client.panel.model.garage.availableitems {
import projects.tanks.client.panel.model.garage.GarageItemInfo;
public interface IAvailableItemsModelBase {
function showAvailableItems(param1:Vector.<GarageItemInfo>) : void;
}
}
|
package projects.tanks.client.garage.skins {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class MountShotSkinModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _mountSkinId:Long = Long.getLong(1667335782,-903578771);
private var _mountSkin_skinCodec:ICodec;
private var model:IModel;
public function MountShotSkinModelServer(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());
this._mountSkin_skinCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
}
public function mountSkin(param1:IGameObject) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._mountSkin_skinCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._mountSkinId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.servermodels.partners {
[ModelInterface]
public interface ICompositePartnerModel {
function loadPartnerObject(param1:String) : void;
function finishRegistration(param1:String, param2:String) : void;
function bindAccount(param1:String, param2:String) : void;
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf.CTFScoreIndicator_flagRedClass.png")]
public class CTFScoreIndicator_flagRedClass extends BitmapAsset {
public function CTFScoreIndicator_flagRedClass() {
super();
}
}
}
|
package alternativa.tanks.model.payment.shop.lootbox {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class LootBoxPackageEvents implements LootBoxPackage {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function LootBoxPackageEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getCount() : int {
var result:int = 0;
var i:int = 0;
var m:LootBoxPackage = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = LootBoxPackage(this.impl[i]);
result = int(m.getCount());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.model.reconnect {
import flash.events.Event;
public class SetServerEvent extends Event {
public var serverNumber:int = 0;
public function SetServerEvent(param1:String, param2:int) {
super(param1,false,false);
this.serverNumber = param2;
}
}
}
|
package alternativa.engine3d.materials
{
import flash.geom.Matrix;
public class UVMatrixProvider
{
private var matrixValues:Vector.<Number>;
private var matrix:Matrix;
public function UVMatrixProvider()
{
this.matrixValues = new Vector.<Number>(8);
this.matrix = new Matrix();
super();
}
public function getMatrix() : Matrix
{
return this.matrix;
}
public function getValues() : Vector.<Number>
{
var _loc1_:Matrix = this.getMatrix();
this.matrixValues[0] = _loc1_.a;
this.matrixValues[1] = _loc1_.b;
this.matrixValues[2] = _loc1_.tx;
this.matrixValues[3] = 0;
this.matrixValues[4] = _loc1_.c;
this.matrixValues[5] = _loc1_.d;
this.matrixValues[6] = _loc1_.ty;
this.matrixValues[7] = 0;
return this.matrixValues;
}
}
}
|
package projects.tanks.client.entrance.model.entrance.loginbyhash {
public interface ILoginByHashModelBase {
function loginByHashFailed() : void;
function loginBySingleUseHashFailed() : void;
function rememberAccount(param1:String) : void;
function rememberUsersHash(param1:String) : void;
}
}
|
package alternativa.tanks.models.tank {
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class DummyWeapon implements Weapon {
public function DummyWeapon() {
super();
}
public function init(param1:WeaponPlatform) : void {
}
public function destroy() : void {
}
public function activate() : void {
}
public function deactivate() : void {
}
public function enable() : void {
}
public function disable(param1:Boolean) : void {
}
public function reset() : void {
}
public function getStatus() : Number {
return 0;
}
public function getResistanceProperty() : ItemProperty {
return ItemProperty.MINE_RESISTANCE;
}
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 alternativa.tanks.model.challenge
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChallengesIcons_winScoreBitmap extends BitmapAsset
{
public function ChallengesIcons_winScoreBitmap()
{
super();
}
}
}
|
package projects.tanks.client.panel.model.shop.kitview {
public interface IKitViewResourceModelBase {
}
}
|
package alternativa.tanks.models.weapons.targeting.priority.targeting {
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.weapon.WeaponObject;
import alternativa.tanks.models.weapon.angles.verticals.autoaiming.VerticalAutoAiming;
import alternativa.tanks.models.weapon.shared.CommonTargetEvaluator;
public class ShaftTargetPriorityCalculator implements TargetPriorityCalculator {
[Inject]
public static var battleService:BattleService;
private const MAX_DISTANCE:Number = 10000000000;
private var commonTargetEvaluator:CommonTargetEvaluator;
private var maxAngle:Number;
public function ShaftTargetPriorityCalculator(param1:WeaponObject) {
super();
this.commonTargetEvaluator = battleService.getCommonTargetEvaluator();
var local2:VerticalAutoAiming = param1.verticalAutoAiming();
this.maxAngle = local2.getMaxAngle();
}
public function getTargetPriority(param1:Tank, param2:Number, param3:Number) : Number {
return this.commonTargetEvaluator.getTargetPriority(param1.getBody(),param2,param3,this.MAX_DISTANCE,this.maxAngle);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapon.gauss {
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 alternativa.types.Float;
import projects.tanks.client.battlefield.models.tankparts.weapon.gauss.GaussCC;
import projects.tanks.client.battlefield.models.tankparts.weapon.splash.SplashCC;
public class CodecGaussCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_aimedShotImpact:ICodec;
private var codec_aimedShotKickback:ICodec;
private var codec_aimingGracePeriod:ICodec;
private var codec_aimingTime:ICodec;
private var codec_powerShotReloadDurationMs:ICodec;
private var codec_primaryShellRadius:ICodec;
private var codec_primaryShellSpeed:ICodec;
private var codec_secondarySplashParams:ICodec;
private var codec_shotRange:ICodec;
public function CodecGaussCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_aimedShotImpact = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_aimedShotKickback = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_aimingGracePeriod = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_aimingTime = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_powerShotReloadDurationMs = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_primaryShellRadius = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_primaryShellSpeed = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_secondarySplashParams = param1.getCodec(new TypeCodecInfo(SplashCC,false));
this.codec_shotRange = param1.getCodec(new TypeCodecInfo(Float,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:GaussCC = new GaussCC();
local2.aimedShotImpact = this.codec_aimedShotImpact.decode(param1) as Number;
local2.aimedShotKickback = this.codec_aimedShotKickback.decode(param1) as Number;
local2.aimingGracePeriod = this.codec_aimingGracePeriod.decode(param1) as int;
local2.aimingTime = this.codec_aimingTime.decode(param1) as int;
local2.powerShotReloadDurationMs = this.codec_powerShotReloadDurationMs.decode(param1) as int;
local2.primaryShellRadius = this.codec_primaryShellRadius.decode(param1) as Number;
local2.primaryShellSpeed = this.codec_primaryShellSpeed.decode(param1) as Number;
local2.secondarySplashParams = this.codec_secondarySplashParams.decode(param1) as SplashCC;
local2.shotRange = this.codec_shotRange.decode(param1) as Number;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:GaussCC = GaussCC(param2);
this.codec_aimedShotImpact.encode(param1,local3.aimedShotImpact);
this.codec_aimedShotKickback.encode(param1,local3.aimedShotKickback);
this.codec_aimingGracePeriod.encode(param1,local3.aimingGracePeriod);
this.codec_aimingTime.encode(param1,local3.aimingTime);
this.codec_powerShotReloadDurationMs.encode(param1,local3.powerShotReloadDurationMs);
this.codec_primaryShellRadius.encode(param1,local3.primaryShellRadius);
this.codec_primaryShellSpeed.encode(param1,local3.primaryShellSpeed);
this.codec_secondarySplashParams.encode(param1,local3.secondarySplashParams);
this.codec_shotRange.encode(param1,local3.shotRange);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.teamlight {
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 alternativa.types.Float;
import projects.tanks.client.battlefield.models.teamlight.TeamLightColorParams;
public class CodecTeamLightColorParams implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_color:ICodec;
private var codec_intensity:ICodec;
public function CodecTeamLightColorParams() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_color = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_intensity = param1.getCodec(new TypeCodecInfo(Float,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:TeamLightColorParams = new TeamLightColorParams();
local2.color = this.codec_color.decode(param1) as String;
local2.intensity = this.codec_intensity.decode(param1) as Number;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:TeamLightColorParams = TeamLightColorParams(param2);
this.codec_color.encode(param1,local3.color);
this.codec_intensity.encode(param1,local3.intensity);
}
}
}
|
package alternativa.tanks.battle.utils {
import alternativa.tanks.battle.BattleRunnerProvider;
import alternativa.tanks.battle.DeferredAction;
import alternativa.tanks.battle.PostPhysicsController;
public class RemovePostPhysicsController extends BattleRunnerProvider implements DeferredAction {
private var controller:PostPhysicsController;
public function RemovePostPhysicsController(param1:PostPhysicsController) {
super();
this.controller = param1;
}
public function execute() : void {
getBattleRunner().removePostPhysicsController(this.controller);
}
}
}
|
package controls.chat {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.chat.BattleChatInput_bitmapRR.png")]
public class BattleChatInput_bitmapRR extends BitmapAsset {
public function BattleChatInput_bitmapRR() {
super();
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.