code
stringlengths 57
237k
|
|---|
package alternativa.tanks.gui.shop.shopitems.item.crystalitem {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.shop.shopitems.item.crystalitem.CrystalPackageItemIcons_crystalBlueClass.png")]
public class CrystalPackageItemIcons_crystalBlueClass extends BitmapAsset {
public function CrystalPackageItemIcons_crystalBlueClass() {
super();
}
}
}
|
package alternativa.tanks.model.item.skins {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class MountSkinEvents implements MountSkin {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function MountSkinEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getMountedSkin() : IGameObject {
var result:IGameObject = null;
var i:int = 0;
var m:MountSkin = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = MountSkin(this.impl[i]);
result = m.getMountedSkin();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function mount(param1:IGameObject) : void {
var i:int = 0;
var m:MountSkin = null;
var skin:IGameObject = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = MountSkin(this.impl[i]);
m.mount(skin);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.model.payment.shop.goldbox {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class GoldBoxPackageEvents implements GoldBoxPackage {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function GoldBoxPackageEvents(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:GoldBoxPackage = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = GoldBoxPackage(this.impl[i]);
result = int(m.getCount());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.commons.models.externalauth {
import flash.utils.Dictionary;
public class ExternalAuthParameters {
private var _parameters:Dictionary;
public function ExternalAuthParameters(param1:Dictionary = null) {
super();
this._parameters = param1;
}
public function get parameters() : Dictionary {
return this._parameters;
}
public function set parameters(param1:Dictionary) : void {
this._parameters = param1;
}
public function toString() : String {
var local1:String = "ExternalAuthParameters [";
local1 += "parameters = " + this.parameters + " ";
return local1 + "]";
}
}
}
|
package mx.core
{
public interface IFlexAsset
{
}
}
|
package alternativa.tanks.controller.events {
import flash.events.Event;
public class PasswordRestoreCaptchaEvent extends Event {
public static const CAPTCHA:String = "PasswordRestoreCaptchaEvent.CAPTCHA";
private var captchaAnswer:String;
private var email:String;
public function PasswordRestoreCaptchaEvent(param1:String, param2:String) {
super(CAPTCHA);
this.captchaAnswer = param1;
this.email = param2;
}
public function getCaptchaAnswer() : String {
return this.captchaAnswer;
}
public function getEmail() : String {
return this.email;
}
}
}
|
package alternativa.tanks.battle {
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.SpeedHackEvent;
import alternativa.tanks.utils.EncryptedInt;
import alternativa.tanks.utils.EncryptedIntImpl;
import flash.events.TimerEvent;
import flash.utils.Timer;
import flash.utils.getTimer;
public class SpeedHackChecker {
[Inject]
public static var clientLog:IClientLog;
private const checkInterval:EncryptedInt = new EncryptedIntImpl(15000);
private const threshold:EncryptedInt = new EncryptedIntImpl(300);
private const maxErrors:EncryptedInt = new EncryptedIntImpl(3);
private const errorCounter:EncryptedInt = new EncryptedIntImpl(0);
private var battleEventDispatcher:BattleEventDispatcher;
private var timer:Timer;
private var localTime:int;
private var systemTime:Number;
private var deltas:Array = [];
public function SpeedHackChecker(param1:BattleEventDispatcher) {
super();
this.battleEventDispatcher = param1;
this.localTime = getTimer();
this.systemTime = new Date().time;
this.timer = new Timer(this.checkInterval.getInt());
this.timer.addEventListener(TimerEvent.TIMER,this.onTimer);
this.timer.start();
}
public function stop() : void {
this.timer.stop();
}
private function onTimer(param1:TimerEvent) : void {
var local2:int = getTimer();
var local3:Number = new Date().time;
var local4:Number = local2 - this.localTime - local3 + this.systemTime;
if(Math.abs(local4) > this.threshold.getInt()) {
this.deltas.push(local4);
this.errorCounter.setInt(this.errorCounter.getInt() + 1);
if(this.errorCounter.getInt() >= this.maxErrors.getInt()) {
this.stop();
this.battleEventDispatcher.dispatchEvent(new SpeedHackEvent(this.deltas));
}
} else {
this.errorCounter.setInt(0);
this.deltas.length = 0;
}
this.localTime = local2;
this.systemTime = local3;
}
}
}
|
package alternativa.tanks.model.shop.items.base
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RedShopItemSkin_normalStateClass extends BitmapAsset
{
public function RedShopItemSkin_normalStateClass()
{
super();
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.matchmakinggroup {
import alternativa.types.Long;
import flash.events.Event;
public class MatchmakingGroupMembersEvent extends Event {
public static const INVITE:String = "InviteToMatchmakingGroupEvent.INVITE";
public static const REMOVE:String = "InviteToMatchmakingGroupEvent.REMOVE";
private var userId:Long;
public function MatchmakingGroupMembersEvent(param1:String, param2:Long) {
this.userId = param2;
super(param1);
}
public function getUserId() : Long {
return this.userId;
}
}
}
|
package alternativa.tanks.controller.events {
import flash.events.Event;
public class PassToFirstBattle extends Event {
public const PASS:String = "PassToFirstBattle.PASS";
public function PassToFirstBattle() {
super(this.PASS);
}
}
}
|
package alternativa.init {
import mx.core.FontAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.init.TanksFontsActivator_IRANSansWeb.ttf",
fontName="IRANSans",
fontFamily="IRANSansWeb",
mimeType="application/x-font",
fontWeight="normal",
fontStyle="normal",
unicodeRange="U+0000,U+0020-007E,U+00A0-00BF,U+00C6-00C6,U+00D7-00D8,U+00DE-00DF,U+00E6-00E6,U+00F0-00F0,U+00F7-00F7,U+02C6-02C7,U+02C9-02C9,U+02CB-02CB,U+02D8-02DD,U+02F3-02F3,U+0300-0301,U+0303-0303,U+0309-0309,U+030F-030F,U+0323-0323,U+060C-060C,U+0615-0615,U+061B-061B,U+061F-061F,U+0621-063A,U+0640-0656,U+0660-0671,U+0679-0679,U+067E-067E,U+0686-0686,U+0688-0688,U+0691-0691,U+0698-0698,U+06A9-06A9,U+06AF-06AF,U+06BA-06BA,U+06BE-06BE,U+06C0-06C3,U+06CC-06CC,U+06D2-06D3,U+06D5-06D5,U+06F0-06F9,U+2000-2011,U+2013-2015,U+2017-201E,U+2020-2022,U+2025-2027,U+2030-2030,U+2032-2033,U+2039-203A,U+203C-203C,U+2044-2044,U+2202-2202,U+2206-2206,U+220F-220F,U+2211-2212,U+221A-221A,U+221E-221E,U+222B-222B,U+2248-2248,U+2260-2260,U+2264-2265,U+FB50-FB51,U+FB56-FB59,U+FB66-FB6D,U+FB7A-FB7D,U+FB88-FB95,U+FB9E-FB9F,U+FBA4-FBB1,U+FBE8-FBE9,U+FBFC-FBFF,U+FC5E-FC63,U+FD3E-FD3F,U+FDF2-FDF2,U+FDFC-FDFC,U+FE70-FE70,U+FE72-FE72,U+FE74-FE74,U+FE76-FE76,U+FE78-FE78,U+FE7A-FE7A,U+FE7C-FE7C,U+FE7E-FE7E,U+FE80-FEF1",
advancedAntiAliasing="true",
embedAsCFF="false"
)]
public class TanksFontsActivator_IRANSansWeb extends FontAsset {
public function TanksFontsActivator_IRANSansWeb() {
super();
}
}
}
|
package alternativa.tanks.model.garage.resistance {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.garage.resistance.ResistancesIcons_bitmapThunderResistance_x2.png")]
public class ResistancesIcons_bitmapThunderResistance_x2 extends BitmapAsset {
public function ResistancesIcons_bitmapThunderResistance_x2() {
super();
}
}
}
|
package projects.tanks.client.garage.models.item.mobilelootbox.deliverylootbox {
public class MobileLootBoxDeliveryCC {
private var _periodOfGiveLootBoxInMin:int;
private var _remainingTimeToGiveLootBoxInSec:int;
public function MobileLootBoxDeliveryCC(param1:int = 0, param2:int = 0) {
super();
this._periodOfGiveLootBoxInMin = param1;
this._remainingTimeToGiveLootBoxInSec = param2;
}
public function get periodOfGiveLootBoxInMin() : int {
return this._periodOfGiveLootBoxInMin;
}
public function set periodOfGiveLootBoxInMin(param1:int) : void {
this._periodOfGiveLootBoxInMin = param1;
}
public function get remainingTimeToGiveLootBoxInSec() : int {
return this._remainingTimeToGiveLootBoxInSec;
}
public function set remainingTimeToGiveLootBoxInSec(param1:int) : void {
this._remainingTimeToGiveLootBoxInSec = param1;
}
public function toString() : String {
var local1:String = "MobileLootBoxDeliveryCC [";
local1 += "periodOfGiveLootBoxInMin = " + this.periodOfGiveLootBoxInMin + " ";
local1 += "remainingTimeToGiveLootBoxInSec = " + this.remainingTimeToGiveLootBoxInSec + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.model.payment.shop.emailrequired {
import projects.tanks.client.panel.model.shop.emailrequired.EmailRequiredModelBase;
import projects.tanks.client.panel.model.shop.emailrequired.IEmailRequiredModelBase;
[ModelInfo]
public class EmailRequiredModel extends EmailRequiredModelBase implements IEmailRequiredModelBase, ShopItemEmailRequired {
public function EmailRequiredModel() {
super();
}
public function isEmailRequired() : Boolean {
return getInitParam().emailRequired;
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.wink {
public interface IWinkingField {
function setVisible(param1:Boolean) : void;
}
}
|
package alternativa.tanks.gui.friends.list.refferals {
import controls.Money;
import controls.base.LabelBase;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import forms.ColorConstants;
import forms.stat.StatListRenderer;
import forms.userlabel.UserLabel;
public class ReferralStatListRenderer extends StatListRenderer {
private var userLabel:UserLabel;
public function ReferralStatListRenderer() {
super();
}
override public function set data(param1:Object) : void {
var local2:DisplayObject = null;
var local3:DisplayObject = null;
_data = param1;
local2 = new ReferralStatLineBackgroundNormal();
local3 = new ReferalStatLineBackgroundSelected();
this.mouseChildren = true;
this.buttonMode = this.useHandCursor = false;
nicon = this.myIcon(_data);
_data.uid = this.userLabel.uid;
setStyle("upSkin",local2);
setStyle("downSkin",local2);
setStyle("overSkin",local2);
setStyle("selectedUpSkin",local3);
setStyle("selectedOverSkin",local3);
setStyle("selectedDownSkin",local3);
}
override protected function myIcon(param1:Object) : Sprite {
var local2:Sprite = new Sprite();
this.userLabel = new UserLabel(param1.userId);
this.userLabel.inviteBattleEnable = true;
this.userLabel.setUidColor(ColorConstants.WHITE);
this.userLabel.x = -3;
this.userLabel.y = -1;
local2.addChild(this.userLabel);
var local3:LabelBase = new LabelBase();
local3.autoSize = TextFieldAutoSize.NONE;
local3.align = TextFormatAlign.RIGHT;
local3.width = 90;
local3.x = _width - 100;
local3.text = param1.income > -1 ? Money.numToString(param1.income,false) : "null";
local3.y = -1;
local2.addChild(local3);
return local2;
}
}
}
|
package assets.resultwindow {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.resultwindow.bres_SELECTED_GREEN_PIXEL.png")]
public dynamic class bres_SELECTED_GREEN_PIXEL extends BitmapData {
public function bres_SELECTED_GREEN_PIXEL(param1:int = 4, param2:int = 4) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.models.effects.effectlevel {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IEffectLevelAdapt implements IEffectLevel {
private var object:IGameObject;
private var impl:IEffectLevel;
public function IEffectLevelAdapt(param1:IGameObject, param2:IEffectLevel) {
super();
this.object = param1;
this.impl = param2;
}
public function getEffectLevel() : int {
var result:int = 0;
try {
Model.object = this.object;
result = int(this.impl.getEffectLevel());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.jgr.killstreak {
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.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.battle.jgr.killstreak.KillStreakCC;
import projects.tanks.client.battlefield.models.battle.jgr.killstreak.KillStreakItem;
public class CodecKillStreakCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_items:ICodec;
public function CodecKillStreakCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_items = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(KillStreakItem,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:KillStreakCC = new KillStreakCC();
local2.items = this.codec_items.decode(param1) as Vector.<KillStreakItem>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:KillStreakCC = KillStreakCC(param2);
this.codec_items.encode(param1,local3.items);
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.messages {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.messages.KillMessageOutputLine_gaussIconClass.png")]
public class KillMessageOutputLine_gaussIconClass extends BitmapAsset {
public function KillMessageOutputLine_gaussIconClass() {
super();
}
}
}
|
package alternativa.tanks.bonuses {
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
public class FallController implements BonusController {
private static const MAX_ANGLE_X:Number = 0.1;
private static const ANGLE_X_FREQ:Number = 1;
private static const m:Matrix3 = new Matrix3();
private static const v:Vector3 = new Vector3();
private const interpolatedMatrix:Matrix3 = new Matrix3();
private const interpolatedVector:Vector3 = new Vector3();
private const oldState:BattleBonusState = new BattleBonusState();
private const newState:BattleBonusState = new BattleBonusState();
private const interpolatedState:BattleBonusState = new BattleBonusState();
private var battleBonus:BattleBonus;
private var minPivotZ:Number;
private var time:Number;
private var fallSpeed:Number;
private var t0:Number;
private var x:Number = 0;
private var y:Number = 0;
public function FallController(param1:BattleBonus) {
super();
this.battleBonus = param1;
}
public function init(param1:Vector3, param2:Number, param3:Number, param4:Number, param5:Number, param6:Number) : void {
this.x = param1.x;
this.y = param1.y;
this.newState.pivotZ = param1.z + BonusConst.BONUS_OFFSET_Z - param2 * param5;
this.newState.angleZ = param6 + BonusConst.ANGULAR_SPEED_Z * param5;
this.fallSpeed = param2;
this.minPivotZ = param3;
this.t0 = param4;
this.time = param5;
}
public function start() : void {
}
public function runBeforePhysicsUpdate(param1:Number) : void {
this.oldState.copy(this.newState);
this.time += param1;
this.newState.pivotZ -= this.fallSpeed * param1;
this.newState.angleX = MAX_ANGLE_X * Math.sin(ANGLE_X_FREQ * (this.t0 + this.time));
this.newState.angleZ += BonusConst.ANGULAR_SPEED_Z * param1;
if(this.newState.pivotZ <= this.minPivotZ) {
this.newState.pivotZ = this.minPivotZ;
this.newState.angleX = 0;
this.interpolatePhysicsState(1);
this.render();
this.battleBonus.onTouchGround();
}
this.updateTrigger();
}
private function updateTrigger() : void {
m.setRotationMatrix(this.newState.angleX,0,this.newState.angleZ);
m.transformVector(Vector3.DOWN,v);
v.scale(BonusConst.BONUS_OFFSET_Z);
var local1:BonusTrigger = this.battleBonus.getTrigger();
local1.updateByComponents(this.x + v.x,this.y + v.y,this.newState.pivotZ + v.z,this.newState.angleX,0,this.newState.angleZ);
}
public function interpolatePhysicsState(param1:Number) : void {
this.interpolatedState.interpolate(this.oldState,this.newState,param1);
this.interpolatedMatrix.setRotationMatrix(this.interpolatedState.angleX,0,this.interpolatedState.angleZ);
this.interpolatedMatrix.transformVector(Vector3.DOWN,this.interpolatedVector);
}
public function render() : void {
this.setObjectTransform(this.battleBonus.getParachute(),BonusConst.PARACHUTE_OFFSET_Z,this.interpolatedVector);
this.setObjectTransform(this.battleBonus.getBonusMesh(),BonusConst.BONUS_OFFSET_Z,this.interpolatedVector);
this.battleBonus.getCords().updateVertices();
}
private function setObjectTransform(param1:Object3DWrapper, param2:Number, param3:Vector3) : void {
param1.setRotationComponents(this.interpolatedState.angleX,0,this.interpolatedState.angleZ);
param1.setPositionComponents(this.x + param2 * param3.x,this.y + param2 * param3.y,this.interpolatedState.pivotZ + param2 * param3.z);
}
}
}
|
package alternativa.tanks.models.weapon.gauss.state.targetselection {
public class AimTransition {
public var eventType:GaussAimEventType;
public var state:IGaussAimState;
public var newState:IGaussAimState;
public function AimTransition(param1:GaussAimEventType, param2:IGaussAimState, param3:IGaussAimState) {
super();
this.eventType = param1;
this.state = param2;
this.newState = param3;
}
}
}
|
package projects.tanks.client.clans.clan.acceptednotificator {
import alternativa.types.Long;
public interface IClanAcceptedNotificatorModelBase {
function onAdding(param1:Long) : void;
function onRemoved(param1:Long) : void;
}
}
|
package projects.tanks.client.battlefield.models.effects.activeafterdeath {
public class ActiveAfterDeathCC {
private var _enabled:Boolean;
public function ActiveAfterDeathCC(param1:Boolean = false) {
super();
this._enabled = param1;
}
public function get enabled() : Boolean {
return this._enabled;
}
public function set enabled(param1:Boolean) : void {
this._enabled = param1;
}
public function toString() : String {
var local1:String = "ActiveAfterDeathCC [";
local1 += "enabled = " + this.enabled + " ";
return local1 + "]";
}
}
}
|
package alternativa.engine3d.core {
import alternativa.engine3d.alternativa3d;
import alternativa.gfx.core.Device;
import alternativa.gfx.core.IndexBufferResource;
import alternativa.gfx.core.ProgramResource;
import alternativa.gfx.core.RenderTargetTextureResource;
import alternativa.gfx.core.VertexBufferResource;
import flash.display3D.Context3DProgramType;
import flash.display3D.Context3DVertexBufferFormat;
import flash.utils.ByteArray;
use namespace alternativa3d;
public class ShadowAtlas {
alternativa3d static const sizeLimit:int = 1024;
private static var blurPrograms:Array = new Array();
private static var blurVertexBuffer:VertexBufferResource = new VertexBufferResource(Vector.<Number>([-1,1,0,0,0,-1,-1,0,0,1,1,-1,0,1,1,1,1,0,1,0]),5);
private static var blurIndexBuffer:IndexBufferResource = new IndexBufferResource(Vector.<uint>([0,1,3,2,3,1]));
private static var blurConst:Vector.<Number> = Vector.<Number>([0,0,0,1,0,0,0,1]);
alternativa3d var shadows:Vector.<Shadow> = new Vector.<Shadow>();
alternativa3d var shadowsCount:int = 0;
private var mapSize:int;
private var blur:int;
private var maps:Array = new Array();
private var map1:RenderTargetTextureResource;
private var map2:RenderTargetTextureResource;
public function ShadowAtlas(param1:int, param2:int) {
super();
this.mapSize = param1;
this.blur = param2;
}
alternativa3d function renderCasters(param1:Camera3D) : void {
var local9:Shadow = null;
var local2:Device = param1.alternativa3d::device;
var local3:int = alternativa3d::sizeLimit / this.mapSize;
var local4:int = Math.ceil(this.alternativa3d::shadowsCount / local3);
var local5:int = this.alternativa3d::shadowsCount > local3 ? local3 : this.alternativa3d::shadowsCount;
local4 = 1 << Math.ceil(Math.log(local4) / Math.LN2);
local5 = 1 << Math.ceil(Math.log(local5) / Math.LN2);
if(local4 > local3) {
local4 = local3;
this.alternativa3d::shadowsCount = local4 * local5;
}
var local6:int = local4 << 8 | local5;
this.map1 = this.maps[local6];
var local7:int = 1 << 16 | local6;
this.map2 = this.maps[local7];
if(this.map1 == null) {
this.map1 = new RenderTargetTextureResource(local5 * this.mapSize,local4 * this.mapSize);
this.map2 = new RenderTargetTextureResource(local5 * this.mapSize,local4 * this.mapSize);
this.maps[local6] = this.map1;
this.maps[local7] = this.map2;
}
local2.setRenderToTexture(this.map1,true);
local2.clear(0,0,0,0,0);
var local8:int = 0;
while(local8 < this.alternativa3d::shadowsCount) {
local9 = this.alternativa3d::shadows[local8];
local9.alternativa3d::texture = this.map1;
local9.alternativa3d::textureScaleU = 1 / local5;
local9.alternativa3d::textureScaleV = 1 / local4;
local9.alternativa3d::textureOffsetU = local8 % local5 / local5;
local9.alternativa3d::textureOffsetV = int(local8 / local5) / local4;
local9.alternativa3d::renderCasters(param1);
local8++;
}
}
alternativa3d function renderBlur(param1:Camera3D) : void {
var local2:Device = param1.alternativa3d::device;
if(this.blur > 0) {
local2.setVertexBufferAt(0,blurVertexBuffer,0,Context3DVertexBufferFormat.FLOAT_3);
local2.setVertexBufferAt(1,blurVertexBuffer,3,Context3DVertexBufferFormat.FLOAT_2);
blurConst[0] = 1 / this.map1.width;
blurConst[1] = 1 / this.map1.height;
blurConst[3] = 1 + this.blur + this.blur;
blurConst[4] = this.blur / this.map1.width;
blurConst[5] = this.blur / this.map1.height;
local2.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,blurConst,2);
local2.setRenderToTexture(this.map2,false);
local2.clear(0,0,0,0);
local2.setProgram(this.getBlurProgram(1,this.blur));
local2.setTextureAt(0,this.map1);
local2.drawTriangles(blurIndexBuffer,0,2);
local2.setRenderToTexture(this.map1,false);
local2.clear(0,0,0,0);
local2.setProgram(this.getBlurProgram(2,this.blur));
local2.setTextureAt(0,this.map2);
local2.drawTriangles(blurIndexBuffer,0,2);
}
}
alternativa3d function clear() : void {
var local2:Shadow = null;
var local1:int = 0;
while(local1 < this.alternativa3d::shadowsCount) {
local2 = this.alternativa3d::shadows[local1];
local2.alternativa3d::texture = null;
local1++;
}
this.alternativa3d::shadows.length = 0;
this.alternativa3d::shadowsCount = 0;
}
private function getBlurProgram(param1:int, param2:int) : ProgramResource {
var local5:ByteArray = null;
var local6:ByteArray = null;
var local3:int = (param1 << 16) + param2;
var local4:ProgramResource = blurPrograms[local3];
if(local4 == null) {
local5 = new ShadowAtlasVertexShader().agalcode;
local6 = new ShadowAtlasFragmentShader(param2,param1 == 1).agalcode;
local4 = new ProgramResource(local5,local6);
blurPrograms[local3] = local4;
}
return local4;
}
}
}
|
package alternativa.tanks.service.impl {
import alternativa.tanks.controller.events.AuthorizationFailedEvent;
import alternativa.tanks.controller.events.CallsignCheckResultEvent;
import alternativa.tanks.controller.events.CaptchaAnswerIsIncorrectEvent;
import alternativa.tanks.controller.events.ChangeUidResultEvent;
import alternativa.tanks.controller.events.EmailCheckResultEvent;
import alternativa.tanks.controller.events.EntranceErrorEvent;
import alternativa.tanks.controller.events.InviteCheckResultEvent;
import alternativa.tanks.controller.events.NavigationEvent;
import alternativa.tanks.controller.events.ParseUrlParamsEvent;
import alternativa.tanks.controller.events.PartnersEvent;
import alternativa.tanks.controller.events.PasswordRestoreResultEvent;
import alternativa.tanks.controller.events.RegistrationFailedEvent;
import alternativa.tanks.controller.events.SetPasswordChangeResultEvent;
import alternativa.tanks.controller.events.showform.ShowBlockValidationAlertEvent;
import alternativa.tanks.controller.events.showform.ShowChangeEmailAndPasswordFormEvent;
import alternativa.tanks.controller.events.showform.ShowConfirmEmailAlertEvent;
import alternativa.tanks.controller.events.showform.ShowFormEvent;
import alternativa.tanks.controller.events.showform.ShowLoginFormEvent;
import alternativa.tanks.controller.events.socialnetwork.NavigationExternalEvent;
import alternativa.tanks.model.EntranceServerParamsModel;
import alternativa.tanks.model.EntranceUrlParamsModel;
import alternativa.tanks.model.RegistrationBackgroundModel;
import alternativa.tanks.service.ICaptchaService;
import alternativa.tanks.service.IEntranceClientFacade;
import alternativa.tanks.view.layers.EntranceViewEvent;
import flash.display.BitmapData;
import org.robotlegs.mvcs.Actor;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.commons.models.captcha.CaptchaLocation;
import projects.tanks.client.entrance.model.entrance.emailconfirm.ConfirmEmailStatus;
public class EntranceClientFacade extends Actor implements IEntranceClientFacade {
[Inject]
public var registrationBackgroundModel:RegistrationBackgroundModel;
[Inject]
public var serverParams:EntranceServerParamsModel;
[Inject]
public var paramsModel:EntranceUrlParamsModel;
[Inject]
public var captchaService:ICaptchaService;
public function EntranceClientFacade() {
super();
}
public function set registrationFormBackgroundRGB(param1:BitmapData) : void {
this.registrationBackgroundModel.rgbData = param1;
}
public function set entranceObject(param1:IGameObject) : void {
dispatch(new ParseUrlParamsEvent());
}
public function wrongPassword() : void {
dispatch(new AuthorizationFailedEvent(AuthorizationFailedEvent.PASSWORD_AUTHORIZATION_FAILED));
}
public function wrongPasswordExternalEntrance() : void {
dispatch(new AuthorizationFailedEvent(AuthorizationFailedEvent.PASSWORD_EXTERNAL_AUTHORIZATION_FAILED));
}
public function externalLinkAlreadyExists() : void {
dispatch(new AuthorizationFailedEvent(AuthorizationFailedEvent.EXTERNAL_LINK_ALREADY_EXISTS));
}
public function externalValidationFailed() : void {
dispatch(new AuthorizationFailedEvent(AuthorizationFailedEvent.EXTERNAL_VALIDATION_FAILED));
}
public function inviteAlreadyActivated(param1:String) : void {
dispatch(new ShowLoginFormEvent(param1,false,false));
}
public function inviteIsFree() : void {
dispatch(new ShowLoginFormEvent("",true,false));
}
public function goToLoginForm() : void {
dispatch(new NavigationEvent(NavigationEvent.GO_TO_LOGIN_FORM));
}
public function goToLoginFormWithHashError() : void {
dispatch(new NavigationEvent(NavigationEvent.GO_TO_LOGIN_FORM));
dispatch(new AuthorizationFailedEvent(AuthorizationFailedEvent.HASH_AUTHORIZATION_FAILED));
}
public function goToExternalRegistrationForm(param1:String) : void {
dispatch(new NavigationExternalEvent(NavigationExternalEvent.GO_TO_EXTERNAL_REGISTRATION_FORM,param1));
}
public function goToExternalLoginForm(param1:String) : void {
dispatch(new NavigationExternalEvent(NavigationExternalEvent.GO_TO_EXTERNAL_LOGIN_FORM,param1));
}
public function callsignIsFree() : void {
dispatch(new CallsignCheckResultEvent(CallsignCheckResultEvent.CALLSIGN_IS_FREE));
}
public function callsignIsBusy(param1:Vector.<String>) : void {
var local2:CallsignCheckResultEvent = new CallsignCheckResultEvent(CallsignCheckResultEvent.CALLSIGN_IS_BUSY);
local2.freeUids = param1;
dispatch(local2);
}
public function callsignIsIncorrect() : void {
dispatch(new CallsignCheckResultEvent(CallsignCheckResultEvent.CALLSIGN_IS_INCORRECT));
}
public function inviteNotFound() : void {
dispatch(new InviteCheckResultEvent(InviteCheckResultEvent.INVITE_CODE_DOES_NOT_EXIST));
}
public function showView() : void {
dispatch(new EntranceViewEvent(EntranceViewEvent.SHOW));
}
public function hideView() : void {
dispatch(new EntranceViewEvent(EntranceViewEvent.HIDE));
}
public function set inviteEnabled(param1:Boolean) : void {
this.serverParams.inviteEnabled = param1;
}
public function set registrationThroughEmail(param1:Boolean) : void {
this.serverParams.registrationThroughEmail = param1;
}
public function emailWithRestoreLinkSuccessfullySent() : void {
dispatch(new PasswordRestoreResultEvent(PasswordRestoreResultEvent.RESTORE_MESSAGE_HAVE_BEEN_SENT));
}
public function emailNotFound() : void {
dispatch(new PasswordRestoreResultEvent(PasswordRestoreResultEvent.EMAIL_DOES_NOT_EXISTS));
}
public function goToChangePasswordAndEmailForm(param1:String) : void {
dispatch(new ShowChangeEmailAndPasswordFormEvent(param1));
}
public function recoveryHashIsWrong() : void {
dispatch(new ShowFormEvent(ShowFormEvent.SHOW_RECOVERY_HASH_IS_WRONG_ALERT));
}
public function captchaUpdated(param1:CaptchaLocation, param2:Vector.<int>) : void {
this.captchaService.setNewCaptchaBytes(param2,param1);
}
public function set antiAddictionEnabled(param1:Boolean) : void {
this.serverParams.antiAddictionEnabled = param1;
}
public function setCaptchaLocations(param1:Vector.<CaptchaLocation>) : void {
this.serverParams.standAloneCaptchaEnabled = param1.indexOf(CaptchaLocation.CLIENT_STARTUP) != -1;
this.serverParams.registrationCaptchaEnabled = param1.indexOf(CaptchaLocation.REGISTER_FORM) != -1;
this.serverParams.loginCaptchaEnabled = param1.indexOf(CaptchaLocation.LOGIN_FORM) != -1;
}
public function setPasswordChangeResult(param1:Boolean, param2:String) : void {
dispatch(new SetPasswordChangeResultEvent(param1,param2));
}
public function confirmEmailStatus(param1:ConfirmEmailStatus) : void {
dispatch(new ShowConfirmEmailAlertEvent(param1));
}
public function blockValidationAlert(param1:String) : void {
dispatch(new ShowBlockValidationAlertEvent(ShowBlockValidationAlertEvent.YOU_WERE_BLOCKED,param1));
}
public function kickValidationAlert(param1:String, param2:int, param3:int, param4:int) : void {
dispatch(new ShowBlockValidationAlertEvent(ShowBlockValidationAlertEvent.YOU_WERE_KICKED,param1,param2,param3,param4));
}
public function captchaAnswerCorrect(param1:CaptchaLocation) : void {
this.captchaService.answerCorrect(param1);
}
public function captchaAnswerIncorrect(param1:CaptchaLocation, param2:Vector.<int>) : void {
dispatch(new CaptchaAnswerIsIncorrectEvent());
this.captchaService.setNewCaptchaBytes(param2,param1);
}
public function startPartnerRegistration() : void {
dispatch(new PartnersEvent(PartnersEvent.START_REGISTRATION));
}
public function partnerLinkAlreadyExists() : void {
dispatch(new AuthorizationFailedEvent(AuthorizationFailedEvent.PARTNER_LINK_ALREADY_EXISTS));
}
public function partnerWrongPassword() : void {
dispatch(new AuthorizationFailedEvent(AuthorizationFailedEvent.PARTNER_PASSWORD_AUTHORIZATION_FAILED));
}
public function registrationPasswordIsIncorrect() : void {
dispatch(new RegistrationFailedEvent(RegistrationFailedEvent.PASSWORD_IS_INCORRECT));
}
public function serverHalt() : void {
if(!this.serverParams.serverHalt) {
this.serverParams.serverHalt = true;
dispatch(new EntranceErrorEvent(EntranceErrorEvent.SERVER_HALT));
}
}
public function emailIsInvalid() : void {
dispatch(new EmailCheckResultEvent(EmailCheckResultEvent.EMAIL_IS_INVALID));
}
public function emailIsBusy() : void {
dispatch(new EmailCheckResultEvent(EmailCheckResultEvent.EMAIL_IS_BUSY));
}
public function emailIsFree() : void {
dispatch(new EmailCheckResultEvent(EmailCheckResultEvent.EMAIL_IS_FREE));
}
public function emailDomainIsForbidden() : void {
dispatch(new EmailCheckResultEvent(EmailCheckResultEvent.EMAIL_DOMAIN_IS_FORBIDDEN));
}
public function emailWithPasswordSuccessfullySent(param1:String) : void {
this.paramsModel.passedCallsign = param1;
this.goToLoginForm();
}
public function goToChangeUidAndPasswordForm() : void {
dispatch(new ShowFormEvent(ShowFormEvent.SHOW_CHANGE_UID_AND_PASSWORD_FORM));
}
public function goToChangeUidForm() : void {
dispatch(new ShowFormEvent(ShowFormEvent.SHOW_CHANGE_UID_FORM));
}
public function uidChangedSuccessfully(param1:String) : void {
this.paramsModel.passedCallsign = param1;
this.goToLoginForm();
}
public function changeUidFailedPasswordIsIncorrect() : void {
dispatch(new ChangeUidResultEvent(ChangeUidResultEvent.PASSWORD_IS_INCORRECT));
}
}
}
|
package alternativa.tanks.utils {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
public class TransparentJPG {
public function TransparentJPG() {
super();
}
public static function createImageFromRGBAndAlpha(param1:BitmapData, param2:BitmapData) : Bitmap {
var local3:Number = param1.width;
var local4:Number = param1.height;
var local5:BitmapData = new BitmapData(local3,local4,true,0);
local5.copyPixels(param1,new Rectangle(0,0,local3,local4),new Point());
local5.copyChannel(param2,new Rectangle(0,0,local3,local4),new Point(),1,8);
return new Bitmap(local5);
}
}
}
|
package platform.client.fp10.core.service.localstorage {
public interface IResourceLocalStorage {
function get enabled() : Boolean;
function set enabled(param1:Boolean) : void;
function clear() : void;
}
}
|
package projects.tanks.client.battlefield.models.battle.pointbased {
import alternativa.types.Long;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.ClientFlagFlyingData;
import projects.tanks.client.battlefield.types.Vector3d;
public interface IPointBasedBattleModelBase {
function dropFlag(param1:int, param2:Vector3d) : void;
function dropFlyingFlag(param1:int, param2:int, param3:ClientFlagFlyingData) : void;
function exileFlag(param1:int) : void;
function flagDelivered(param1:int, param2:int, param3:Long) : void;
function flagTaken(param1:int, param2:Long) : void;
function returnFlagToBase(param1:int, param2:IGameObject) : void;
function throwFlyingFlag(param1:int, param2:ClientFlagFlyingData) : void;
}
}
|
package _codec.projects.tanks.client.battlefield.models.effects.description {
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.effects.description.EffectDescriptionCC;
public class VectorCodecEffectDescriptionCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecEffectDescriptionCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(EffectDescriptionCC,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.<EffectDescriptionCC> = new Vector.<EffectDescriptionCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = EffectDescriptionCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:EffectDescriptionCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<EffectDescriptionCC> = Vector.<EffectDescriptionCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.models.tank {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.BodyState;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.UserTitleRenderer;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.BattleEventSupport;
import alternativa.tanks.battle.events.TankAddedToBattleEvent;
import alternativa.tanks.battle.events.TankRemovedFromBattleEvent;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.scene3d.BattleScene3D;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.utils.EncryptedNumber;
import alternativa.tanks.utils.EncryptedNumberImpl;
import alternativa.utils.clearDictionary;
import flash.utils.Dictionary;
import platform.client.fp10.core.type.AutoClosable;
public class RegularUserTitleRenderer implements UserTitleRenderer, AutoClosable {
[Inject]
public static var battleEventDispatcher:BattleEventDispatcher;
[Inject]
public static var battleService:BattleService;
private static const DISTANCE_TO_SHOW_TITLES:EncryptedNumber = new EncryptedNumberImpl(7000);
private static const DISTANCE_TO_HIDE_TITLES:EncryptedNumber = new EncryptedNumberImpl(7050);
private var localTank:Tank;
private var battleEventSupport:BattleEventSupport;
private const remoteTanksInBattle:Dictionary = new Dictionary();
public function RegularUserTitleRenderer(param1:Tank, param2:Dictionary) {
super();
this.localTank = param1;
this.remoteTankAddToBattle(param2);
this.battleEventSupport = new BattleEventSupport(battleEventDispatcher);
this.battleEventSupport.addEventHandler(TankAddedToBattleEvent,this.onTankAddedToBattle);
this.battleEventSupport.addEventHandler(TankRemovedFromBattleEvent,this.onTankRemovedFromBattle);
this.battleEventSupport.activateHandlers();
}
private function remoteTankAddToBattle(param1:Dictionary) : void {
var local2:Tank = null;
for each(local2 in param1) {
if(local2 != this.localTank) {
this.remoteTanksInBattle[local2] = true;
}
}
}
private function onTankAddedToBattle(param1:TankAddedToBattleEvent) : void {
if(param1.tank != this.localTank) {
this.remoteTanksInBattle[param1.tank] = true;
}
}
private function onTankRemovedFromBattle(param1:TankRemovedFromBattleEvent) : void {
if(param1.tank != this.localTank) {
delete this.remoteTanksInBattle[param1.tank];
}
}
public function renderUserTitles() : void {
var local4:* = undefined;
var local1:BattleScene3D = battleService.getBattleScene3D();
var local2:GameCamera = local1.getCamera();
var local3:Vector3 = local2.position;
for(local4 in this.remoteTanksInBattle) {
this.updateTitleVisibility(local4,local3);
}
}
private function updateTitleVisibility(param1:Tank, param2:Vector3) : void {
if(param1.health > 0) {
if(this.localTank.isSameTeam(param1.teamType)) {
param1.showTitle();
} else {
this.updateTitleForEnemyTank(param1,param2);
}
} else {
param1.hideTitle();
}
}
private function updateTitleForEnemyTank(param1:Tank, param2:Vector3) : void {
var local3:Body = param1.getBody();
var local4:BodyState = local3.state;
var local5:Vector3 = local4.position;
var local6:Number = local5.x - param2.x;
var local7:Number = local5.y - param2.y;
var local8:Number = local5.z - param2.z;
var local9:Number = Math.sqrt(local6 * local6 + local7 * local7 + local8 * local8);
if(local9 >= DISTANCE_TO_HIDE_TITLES.getNumber() || param1.isInvisible(param2)) {
param1.hideTitle();
} else if(local9 < DISTANCE_TO_SHOW_TITLES.getNumber()) {
param1.showTitle();
}
}
[Obfuscation(rename="false")]
public function close() : void {
if(this.localTank != null) {
this.battleEventSupport.deactivateHandlers();
this.battleEventSupport = null;
this.localTank = null;
clearDictionary(this.remoteTanksInBattle);
}
}
}
}
|
package _codec.projects.tanks.client.battleservice.model.map.params {
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.model.map.params.MapTheme;
public class VectorCodecMapThemeLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecMapThemeLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(MapTheme,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.<MapTheme> = new Vector.<MapTheme>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = MapTheme(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:MapTheme = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<MapTheme> = Vector.<MapTheme>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.models.battle.gui.chat {
import alternativa.tanks.models.battle.battlefield.common.MessageLine;
import controls.Label;
public class BattleChatSystemLine extends MessageLine {
private var output:Label = new Label();
public function BattleChatSystemLine(param1:int, param2:String) {
super();
this.output.color = 8454016;
this.output.multiline = true;
this.output.wordWrap = true;
this.output.mouseEnabled = false;
this.output.text = param2;
shadowContainer.addChild(this.output);
this.width = param1;
}
[Obfuscation(rename="false")]
override public function set width(param1:Number) : void {
this.output.width = int(param1) - 5;
}
}
}
|
package alternativa.osgi.service.network
{
public class NetworkService implements INetworkService
{
private var _server:String;
private var _ports:Array;
private var _proxyHost:String;
private var _proxyPort:int;
private var _resourcesPath:String;
private var listeners:Array;
public function NetworkService(server:String, ports:Array, resourcesPath:String, proxyHost:String, proxyPort:int)
{
super();
this.listeners = new Array();
this._server = server;
this._ports = ports;
this._resourcesPath = resourcesPath;
this._proxyHost = proxyHost;
this._proxyPort = proxyPort;
}
public function addEventListener(listener:INetworkListener) : void
{
var index:int = this.listeners.indexOf(listener);
if(index == -1)
{
this.listeners.push(listener);
}
}
public function removeEventListener(listener:INetworkListener) : void
{
var index:int = this.listeners.indexOf(listener);
if(index != -1)
{
this.listeners.splice(index,1);
}
}
public function get server() : String
{
return this._server;
}
public function get ports() : Array
{
return this._ports;
}
public function get resourcesPath() : String
{
return this._resourcesPath;
}
public function get proxyHost() : String
{
return this._proxyHost;
}
public function get proxyPort() : int
{
return this._proxyPort;
}
}
}
|
package projects.tanks.client.clans.user.outgoing {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.clans.container.ContainerCC;
public class ClanUserOutgoingModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ClanUserOutgoingModelServer;
private var client:IClanUserOutgoingModelBase = IClanUserOutgoingModelBase(this);
private var modelId:Long = Long.getLong(205268203,-139952058);
private var _onAddingId:Long = Long.getLong(230800152,-1398596335);
private var _onAdding_userIdCodec:ICodec;
private var _onRemovedId:Long = Long.getLong(1435129862,-1648365870);
private var _onRemoved_userIdCodec:ICodec;
public function ClanUserOutgoingModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ClanUserOutgoingModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ContainerCC,false)));
this._onAdding_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._onRemoved_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
}
protected function getInitParam() : ContainerCC {
return ContainerCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._onAddingId:
this.client.onAdding(Long(this._onAdding_userIdCodec.decode(param2)));
break;
case this._onRemovedId:
this.client.onRemoved(Long(this._onRemoved_userIdCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.config
{
import alternativa.engine3d.containers.KDContainer;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.objects.Occluder;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.init.Main;
import alternativa.physics.collision.CollisionPrimitive;
import alternativa.tanks.config.loaders.MapLoader;
import alternativa.tanks.models.battlefield.BattlefieldModel;
import alternativa.tanks.models.battlefield.IBattleField;
import alternativa.tanks.models.battlefield.hidableobjects.HidableObject3DWrapper;
import flash.events.Event;
import specter.utils.Logger;
public class TanksMap extends ResourceLoader
{
public var mapContainer:KDContainer;
private var loader:MapLoader;
private var spawnMarkers:Object;
private var ctfFlags:Object;
public var mapId:String;
public function TanksMap(config:Config, idMap:String)
{
this.spawnMarkers = {};
this.ctfFlags = {};
this.mapId = idMap;
super("Tank map loader",config);
}
override public function run() : void
{
this.loader = new MapLoader();
this.loader.addEventListener(Event.COMPLETE,this.onLoadingComplete);
this.loader.load("maps/" + this.mapId + ".xml",config.propLibRegistry);
}
public function get collisionPrimitives() : Vector.<CollisionPrimitive>
{
return this.loader.collisionPrimitives;
}
private function onLoadingComplete(e:Event) : void
{
var sprite:Sprite3D = null;
this.mapContainer = this.createKDContainer(this.loader.objects,this.loader.occluders);
this.mapContainer.threshold = 0.1;
this.mapContainer.ignoreChildrenInCollider = true;
this.mapContainer.calculateBounds();
var bfModel:BattlefieldModel = BattlefieldModel(Main.osgi.getService(IBattleField));
this.mapContainer.name = "Visual Kd-tree";
for each(sprite in this.loader.sprites)
{
this.mapContainer.addChild(sprite);
bfModel.hidableObjects.add(new HidableObject3DWrapper(sprite));
}
bfModel.build(this.mapContainer,this.collisionPrimitives,this.loader.lights);
completeTask();
Logger.log("Loaded map");
}
private function createKDContainer(objects:Vector.<Object3D>, occluders:Vector.<Occluder>) : KDContainer
{
var container:KDContainer = new KDContainer();
container.createTree(objects,occluders);
return container;
}
public function destroy() : *
{
this.loader.destroy();
this.loader = null;
this.mapContainer.destroyTree();
this.mapContainer.destroy();
this.mapContainer = null;
}
}
}
import alternativa.engine3d.core.Object3D;
class SpawnMarkersData
{
public var markers:Vector.<Object3D>;
function SpawnMarkersData()
{
super();
}
}
|
package controls.scroller.gray
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ScrollSkinGray_thumbTop extends BitmapAsset
{
public function ScrollSkinGray_thumbTop()
{
super();
}
}
}
|
package projects.tanks.client.garage.models.item.object3ds {
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 Object3DSModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function Object3DSModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.client.battleselect.model.matchmaking.queue {
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 MatchmakingQueueModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:MatchmakingQueueModelServer;
private var client:IMatchmakingQueueModelBase = IMatchmakingQueueModelBase(this);
private var modelId:Long = Long.getLong(736490567,-734280032);
public function MatchmakingQueueModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new MatchmakingQueueModelServer(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.battle.objects.tank.controllers {
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.camera.FollowCameraController;
import alternativa.tanks.service.settings.ISettingsService;
import alternativa.tanks.service.settings.keybinding.GameActionEnum;
import alternativa.tanks.services.battleinput.BattleInputService;
import alternativa.tanks.services.battleinput.GameActionListener;
import alternativa.tanks.services.battleinput.MouseLockListener;
import alternativa.tanks.services.battleinput.MouseMovementListener;
import alternativa.tanks.utils.MathUtils;
import platform.client.fp10.core.type.AutoClosable;
import projects.tanks.client.battlefield.models.user.tank.commands.TurretControlType;
public final class LocalTurretController implements GameActionListener, MouseLockListener, MouseMovementListener, AutoClosable {
[Inject]
public static var battleInputService:BattleInputService;
[Inject]
public static var settingsService:ISettingsService;
private static const MOUSE_SENS_MUL:Number = 0.0001;
private var actionMap:TurretActions = TurretActions.DEFAULT;
private var tank:Tank;
private var turret:Turret;
private var isEnabled:Boolean = false;
private var left:Boolean = false;
private var right:Boolean = false;
private var mouseLookDirection:Number = 0;
private var lockTurretDirection:Boolean = false;
public function LocalTurretController(param1:Tank, param2:Turret) {
super();
this.tank = param1;
this.turret = param2;
}
public function onGameAction(param1:GameActionEnum, param2:Boolean) : void {
var local3:* = undefined;
if(param1 == GameActionEnum.LOOK_AROUND) {
this.lockTurretDirection = param2;
if(FollowCameraController.getFollowCameraMode() == FollowCameraController.CAMERA_FOLLOWS_MOUSE) {
if(this.lockTurretDirection) {
this.turret.setTurretControlState(TurretControlType.TARGET_ANGLE_LOCAL,this.turret.getTurretPhysicsDirection(),Turret.TURN_SPEED_COUNT);
} else {
this.turret.setTurretControlState(TurretControlType.TARGET_ANGLE_WORLD,this.mouseLookDirection,Turret.TURN_SPEED_COUNT);
}
}
} else {
local3 = this.actionMap.getTurretAction(param1);
if(local3 != null) {
switch(int(local3)) {
case TurretActions.LEFT:
this.rotateLeft(param2);
break;
case TurretActions.RIGHT:
this.rotateRight(param2);
break;
case TurretActions.CENTER:
this.center(param2);
}
}
}
}
private function rotateLeft(param1:Boolean) : void {
this.left = param1;
this.setDirectionalRotationControlState();
FollowCameraController.setFollowCameraMode(FollowCameraController.CAMERA_FOLLOWS_TURRET);
battleInputService.releaseMouse();
}
private function rotateRight(param1:Boolean) : void {
this.right = param1;
this.setDirectionalRotationControlState();
FollowCameraController.setFollowCameraMode(FollowCameraController.CAMERA_FOLLOWS_TURRET);
battleInputService.releaseMouse();
}
private function setDirectionalRotationControlState() : void {
var local1:int = int(this.left) - int(this.right);
this.turret.setTurretControlState(TurretControlType.ROTATION_DIRECTION,local1,Turret.TURN_SPEED_COUNT);
}
private function center(param1:Boolean) : void {
if(param1 && !(this.left || this.right)) {
this.turret.setTurretControlState(TurretControlType.TARGET_ANGLE_LOCAL,0,Turret.TURN_SPEED_COUNT);
FollowCameraController.setFollowCameraMode(FollowCameraController.CAMERA_FOLLOWS_TURRET);
battleInputService.releaseMouse();
}
}
public function onMouseLock(param1:Boolean) : void {
if(param1 && FollowCameraController.getFollowCameraMode() != FollowCameraController.CAMERA_FOLLOWS_MOUSE) {
this.mouseLookDirection = this.tank.getInterpolatedTurretWorldDirection();
FollowCameraController.setFollowCameraMode(FollowCameraController.CAMERA_FOLLOWS_MOUSE);
FollowCameraController.setFollowCameraDirection(this.mouseLookDirection);
this.turret.setTurretControlState(TurretControlType.TARGET_ANGLE_WORLD,this.mouseLookDirection,Turret.TURN_SPEED_COUNT);
}
}
public function onMouseRelativeMovement(param1:Number, param2:Number) : void {
this.mouseLookDirection = MathUtils.clampAngle(this.mouseLookDirection - param1 * settingsService.mouseSensitivity * MOUSE_SENS_MUL);
FollowCameraController.setFollowCameraDirection(this.mouseLookDirection);
if(!this.lockTurretDirection) {
this.turret.setTurretControlState(TurretControlType.TARGET_ANGLE_WORLD,this.mouseLookDirection,Turret.TURN_SPEED_COUNT);
}
}
public function enable() : void {
if(!this.isEnabled) {
this.isEnabled = true;
battleInputService.addGameActionListener(this);
battleInputService.addMouseLockListener(this);
battleInputService.addMouseMoveListener(this);
}
}
public function disable() : void {
if(this.isEnabled) {
this.isEnabled = false;
battleInputService.removeGameActionListener(this);
battleInputService.removeMouseLockListener(this);
battleInputService.removeMouseMoveListener(this);
this.left = false;
this.right = false;
FollowCameraController.setFollowCameraMode(FollowCameraController.CAMERA_FOLLOWS_TURRET);
this.turret.setTurretControlState(TurretControlType.ROTATION_DIRECTION,0,Turret.TURN_SPEED_COUNT);
}
}
public function onAddToBattle() : void {
if(FollowCameraController.getFollowCameraMode() == FollowCameraController.CAMERA_FOLLOWS_MOUSE) {
this.mouseLookDirection = this.tank.getInterpolatedTurretWorldDirection();
FollowCameraController.setFollowCameraDirection(this.mouseLookDirection);
this.turret.setTurretControlState(TurretControlType.TARGET_ANGLE_WORLD,this.mouseLookDirection,Turret.TURN_SPEED_COUNT);
}
}
[Obfuscation(rename="false")]
public function close() : void {
this.disable();
}
}
}
|
package alternativa.tanks.model.useremailandpassword {
[ModelInterface]
public interface PasswordService {
function checkIsPasswordSet(param1:Function) : void;
function checkPassword(param1:String, param2:Function) : void;
function setPassword(param1:String) : void;
function updatePassword(param1:String, param2:String) : void;
}
}
|
package alternativa.tanks.model.shop.items.crystallitem
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class CrystalPackageItemIcons_crystalWhiteClass extends BitmapAsset
{
public function CrystalPackageItemIcons_crystalWhiteClass()
{
super();
}
}
}
|
package alternativa.tanks.models.battle.dm {
import alternativa.physics.Body;
import alternativa.tanks.models.weapon.shared.HealingGunTargetEvaluator;
public class DMHealingGunTargetEvaluator implements HealingGunTargetEvaluator {
public function DMHealingGunTargetEvaluator() {
super();
}
public function getTargetPriority(param1:Body) : Number {
return 1;
}
}
}
|
package projects.tanks.client.panel.model.shop.clientlayoutkit {
public interface IKitBundleViewModelBase {
}
}
|
package {
import flash.display.Sprite;
import flash.system.Security;
[ExcludeClass]
public class _4eddc6d1a60731b254971ee057a2b99332142f434bd3690387a10211aade4e97_flash_display_Sprite extends Sprite {
public function _4eddc6d1a60731b254971ee057a2b99332142f434bd3690387a10211aade4e97_flash_display_Sprite() {
super();
}
public function allowDomainInRSL(... rest) : void {
Security.allowDomain.apply(null,rest);
}
public function allowInsecureDomainInRSL(... rest) : void {
Security.allowInsecureDomain.apply(null,rest);
}
}
}
|
package projects.tanks.clients.flash.resources.resource.loaders.events {
import flash.events.ErrorEvent;
import flash.events.Event;
public class BatchTextureLoaderErrorEvent extends ErrorEvent {
public static const LOADER_ERROR:String = "loaderError";
private var _textureName:String;
public function BatchTextureLoaderErrorEvent(param1:String, param2:String, param3:String) {
super(param1);
this.text = param3;
this._textureName = param2;
}
public function get textureName() : String {
return this._textureName;
}
override public function clone() : Event {
return new BatchTextureLoaderErrorEvent(type,this._textureName,text);
}
override public function toString() : String {
return "[BatchTextureLoaderErrorEvent textureName=" + this._textureName + ", text=" + text + "]";
}
}
}
|
package platform.client.fp10.core.model {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IObjectLoadListenerEvents implements IObjectLoadListener {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IObjectLoadListenerEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function objectLoaded() : void {
var i:int = 0;
var m:IObjectLoadListener = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IObjectLoadListener(this.impl[i]);
m.objectLoaded();
i++;
}
}
finally {
Model.popObject();
}
}
public function objectLoadedPost() : void {
var i:int = 0;
var m:IObjectLoadListener = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IObjectLoadListener(this.impl[i]);
m.objectLoadedPost();
i++;
}
}
finally {
Model.popObject();
}
}
public function objectUnloaded() : void {
var i:int = 0;
var m:IObjectLoadListener = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IObjectLoadListener(this.impl[i]);
m.objectUnloaded();
i++;
}
}
finally {
Model.popObject();
}
}
public function objectUnloadedPost() : void {
var i:int = 0;
var m:IObjectLoadListener = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IObjectLoadListener(this.impl[i]);
m.objectUnloadedPost();
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.view.battlelist.battleitem.renderer.normal {
import controls.cellrenderer.CellRendererDefault;
import flash.display.Bitmap;
import flash.display.BitmapData;
public class CellNormalSelected extends CellRendererDefault {
private static const normalLeft:Class = CellNormalSelected_normalLeft;
private static const normalLeftData:BitmapData = Bitmap(new normalLeft()).bitmapData;
private static const normalCenter:Class = CellNormalSelected_normalCenter;
private static const normalCenterData:BitmapData = Bitmap(new normalCenter()).bitmapData;
private static const normalRight:Class = CellNormalSelected_normalRight;
private static const normalRightData:BitmapData = Bitmap(new normalRight()).bitmapData;
public function CellNormalSelected() {
super();
bmpLeft = normalLeftData;
bmpCenter = normalCenterData;
bmpRight = normalRightData;
}
}
}
|
package alternativa.tanks.models.battlefield.decals
{
import alternativa.engine3d.objects.Decal;
public class DecalEntry
{
public var decal:Decal;
public var startTime:int;
public function DecalEntry(param1:Decal, param2:int)
{
super();
this.decal = param1;
this.startTime = param2;
}
}
}
|
package alternativa.engine3d.materials {
public class VertexLightMaterial extends TextureMaterial {
public function VertexLightMaterial() {
super();
}
}
}
|
package alternativa.tanks.help
{
public class HelperArrowDirection
{
public static const VERTICAL:Boolean = true;
public static const HORIZONTAL:Boolean = false;
public function HelperArrowDirection()
{
super();
}
}
}
|
package alternativa.protocol.impl {
import alternativa.protocol.CompressionType;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
public class PacketHelper {
private static const ZIP_PACKET_SIZE_DELIMITER:int = 2000;
private static const LONG_SIZE_DELIMITER:int = 16384;
private static const ZIPPED_FLAG:int = 64;
private static const BIG_LENGTH_FLAG:int = 128;
private static const HELPER:ByteArray = new ByteArray();
public function PacketHelper() {
super();
}
public static function unwrapPacket(param1:IDataInput, param2:ProtocolBuffer, param3:CompressionType) : Boolean {
var local4:Boolean = false;
var local5:int = 0;
var local10:int = 0;
var local11:int = 0;
var local12:int = 0;
var local13:int = 0;
if(param1.bytesAvailable < 2) {
return false;
}
var local6:int = param1.readByte();
var local7:Boolean = (local6 & BIG_LENGTH_FLAG) != 0;
if(local7) {
if(param1.bytesAvailable < 3) {
return false;
}
local4 = param3 != CompressionType.NONE;
local10 = (local6 ^ BIG_LENGTH_FLAG) << 24;
local11 = (param1.readByte() & 0xFF) << 16;
local12 = (param1.readByte() & 0xFF) << 8;
local13 = param1.readByte() & 0xFF;
local5 = local10 + local11 + local12 + local13;
} else {
local4 = (local6 & ZIPPED_FLAG) != 0;
local10 = (local6 & 0x3F) << 8;
local12 = param1.readByte() & 0xFF;
local5 = local10 + local12;
}
if(param1.bytesAvailable < local5) {
return false;
}
var local8:ByteArray = new ByteArray();
if(local5 != 0) {
param1.readBytes(local8,0,local5);
}
if(local4) {
local8.uncompress();
}
local8.position = 0;
var local9:ByteArray = ByteArray(param2.reader);
OptionalMapCodecHelper.decodeNullMap(local8,param2.optionalMap);
local9.writeBytes(local8,local8.position,local8.length - local8.position);
local9.position = 0;
return true;
}
public static function wrapPacket(param1:IDataOutput, param2:ProtocolBuffer, param3:CompressionType) : void {
var local7:int = 0;
var local8:int = 0;
var local9:int = 0;
var local4:Boolean = false;
switch(param3) {
case CompressionType.NONE:
break;
case CompressionType.DEFLATE:
local4 = true;
break;
case CompressionType.DEFLATE_AUTO:
local4 = determineZipped(param2.reader);
}
HELPER.position = 0;
HELPER.length = 0;
OptionalMapCodecHelper.encodeNullMap(param2.optionalMap,HELPER);
param2.reader.readBytes(HELPER,HELPER.position,param2.reader.bytesAvailable);
HELPER.position = 0;
var local5:Boolean = isLongSize(HELPER);
if(local4) {
HELPER.compress();
}
var local6:int = int(HELPER.length);
if(local5) {
local7 = local6 + (BIG_LENGTH_FLAG << 24);
param1.writeInt(local7);
} else {
local8 = int(((local6 & 0xFF00) >> 8) + (local4 ? ZIPPED_FLAG : 0));
local9 = int(local6 & 0xFF);
param1.writeByte(local8);
param1.writeByte(local9);
}
param1.writeBytes(HELPER,0,local6);
}
private static function isLongSize(param1:IDataInput) : Boolean {
return param1.bytesAvailable >= LONG_SIZE_DELIMITER || param1.bytesAvailable == -1;
}
private static function determineZipped(param1:IDataInput) : Boolean {
return param1.bytesAvailable == -1 || param1.bytesAvailable > ZIP_PACKET_SIZE_DELIMITER;
}
private static function bytesToString(param1:ByteArray, param2:int, param3:int, param4:int) : String {
var local7:int = 0;
var local8:int = 0;
var local9:int = 0;
var local10:String = null;
var local5:String = "";
var local6:int = int(param1.position);
param1.position = param2;
while(param1.bytesAvailable > 0 && local9 < param3) {
local9++;
local10 = param1.readUnsignedByte().toString(16);
if(local10.length == 1) {
local10 = "0" + local10;
}
local5 += local10;
local8++;
if(local8 == 4) {
local8 = 0;
local7++;
if(local7 == param4) {
local7 = 0;
local5 += "\n";
} else {
local5 += " ";
}
} else {
local5 += " ";
}
}
if(local9 < param3) {
local5 += "\nOnly " + local9 + " of " + param3 + " bytes have been read";
}
param1.position = local6;
return local5;
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank07.png")]
public class DefaultRanksBitmaps_bitmapBigRank07 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapBigRank07() {
super();
}
}
}
|
package alternativa.engine3d.animation {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.animation.keys.TransformKey;
import alternativa.engine3d.core.Object3D;
import flash.geom.Vector3D;
use namespace alternativa3d;
public class AnimationState {
public var useCount:int = 0;
public var transform:TransformKey = new TransformKey();
public var transformWeightSum:Number = 0;
public var numbers:Object = new Object();
public var numberWeightSums:Object = new Object();
public function AnimationState() {
super();
}
public function reset() : void {
var local1:String = null;
this.transformWeightSum = 0;
for(local1 in this.numbers) {
delete this.numbers[local1];
delete this.numberWeightSums[local1];
}
}
public function addWeightedTransform(param1:TransformKey, param2:Number) : void {
this.transformWeightSum += param2;
this.transform.interpolate(this.transform,param1,param2 / this.transformWeightSum);
}
public function addWeightedNumber(param1:String, param2:Number, param3:Number) : void {
var local5:Number = NaN;
var local4:Number = Number(this.numberWeightSums[param1]);
if(local4 == local4) {
local4 += param3;
param3 /= local4;
local5 = Number(this.numbers[param1]);
this.numbers[param1] = (1 - param3) * local5 + param3 * param2;
this.numberWeightSums[param1] = local4;
} else {
this.numbers[param1] = param2;
this.numberWeightSums[param1] = param3;
}
}
public function apply(param1:Object3D) : void {
var local2:Number = NaN;
var local3:Number = NaN;
var local4:String = null;
if(this.transformWeightSum > 0) {
param1.x = this.transform.alternativa3d::x;
param1.y = this.transform.alternativa3d::y;
param1.z = this.transform.alternativa3d::z;
this.setEulerAngles(this.transform.alternativa3d::rotation,param1);
param1.scaleX = this.transform.alternativa3d::scaleX;
param1.scaleY = this.transform.alternativa3d::scaleY;
param1.scaleZ = this.transform.alternativa3d::scaleZ;
}
for(local4 in this.numbers) {
switch(local4) {
case "x":
local2 = Number(this.numberWeightSums["x"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.x = (1 - local3) * param1.x + local3 * this.numbers["x"];
break;
case "y":
local2 = Number(this.numberWeightSums["y"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.y = (1 - local3) * param1.y + local3 * this.numbers["y"];
break;
case "z":
local2 = Number(this.numberWeightSums["z"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.z = (1 - local3) * param1.z + local3 * this.numbers["z"];
break;
case "rotationX":
local2 = Number(this.numberWeightSums["rotationX"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.rotationX = (1 - local3) * param1.rotationX + local3 * this.numbers["rotationX"];
break;
case "rotationY":
local2 = Number(this.numberWeightSums["rotationY"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.rotationY = (1 - local3) * param1.rotationY + local3 * this.numbers["rotationY"];
break;
case "rotationZ":
local2 = Number(this.numberWeightSums["rotationZ"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.rotationZ = (1 - local3) * param1.rotationZ + local3 * this.numbers["rotationZ"];
break;
case "scaleX":
local2 = Number(this.numberWeightSums["scaleX"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.scaleX = (1 - local3) * param1.scaleX + local3 * this.numbers["scaleX"];
break;
case "scaleY":
local2 = Number(this.numberWeightSums["scaleY"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.scaleY = (1 - local3) * param1.scaleY + local3 * this.numbers["scaleY"];
break;
case "scaleZ":
local2 = Number(this.numberWeightSums["scaleZ"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.scaleZ = (1 - local3) * param1.scaleZ + local3 * this.numbers["scaleZ"];
break;
default:
param1[local4] = this.numbers[local4];
break;
}
}
}
public function applyObject(param1:Object) : void {
var local2:Number = NaN;
var local3:Number = NaN;
var local4:String = null;
if(this.transformWeightSum > 0) {
param1.x = this.transform.alternativa3d::x;
param1.y = this.transform.alternativa3d::y;
param1.z = this.transform.alternativa3d::z;
this.setEulerAnglesObject(this.transform.alternativa3d::rotation,param1);
param1.scaleX = this.transform.alternativa3d::scaleX;
param1.scaleY = this.transform.alternativa3d::scaleY;
param1.scaleZ = this.transform.alternativa3d::scaleZ;
}
for(local4 in this.numbers) {
switch(local4) {
case "x":
local2 = Number(this.numberWeightSums["x"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.x = (1 - local3) * param1.x + local3 * this.numbers["x"];
break;
case "y":
local2 = Number(this.numberWeightSums["y"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.y = (1 - local3) * param1.y + local3 * this.numbers["y"];
break;
case "z":
local2 = Number(this.numberWeightSums["z"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.z = (1 - local3) * param1.z + local3 * this.numbers["z"];
break;
case "rotationX":
local2 = Number(this.numberWeightSums["rotationX"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.rotationX = (1 - local3) * param1.rotationX + local3 * this.numbers["rotationX"];
break;
case "rotationY":
local2 = Number(this.numberWeightSums["rotationY"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.rotationY = (1 - local3) * param1.rotationY + local3 * this.numbers["rotationY"];
break;
case "rotationZ":
local2 = Number(this.numberWeightSums["rotationZ"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.rotationZ = (1 - local3) * param1.rotationZ + local3 * this.numbers["rotationZ"];
break;
case "scaleX":
local2 = Number(this.numberWeightSums["scaleX"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.scaleX = (1 - local3) * param1.scaleX + local3 * this.numbers["scaleX"];
break;
case "scaleY":
local2 = Number(this.numberWeightSums["scaleY"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.scaleY = (1 - local3) * param1.scaleY + local3 * this.numbers["scaleY"];
break;
case "scaleZ":
local2 = Number(this.numberWeightSums["scaleZ"]);
local3 = local2 / (local2 + this.transformWeightSum);
param1.scaleZ = (1 - local3) * param1.scaleZ + local3 * this.numbers["scaleZ"];
break;
default:
param1[local4] = this.numbers[local4];
break;
}
}
}
private function setEulerAngles(param1:Vector3D, param2:Object3D) : void {
var local3:Number = 2 * param1.x * param1.x;
var local4:Number = 2 * param1.y * param1.y;
var local5:Number = 2 * param1.z * param1.z;
var local6:Number = 2 * param1.x * param1.y;
var local7:Number = 2 * param1.y * param1.z;
var local8:Number = 2 * param1.z * param1.x;
var local9:Number = 2 * param1.w * param1.x;
var local10:Number = 2 * param1.w * param1.y;
var local11:Number = 2 * param1.w * param1.z;
var local12:Number = 1 - local4 - local5;
var local13:Number = local6 - local11;
var local14:Number = local6 + local11;
var local15:Number = 1 - local3 - local5;
var local16:Number = local8 - local10;
var local17:Number = local7 + local9;
var local18:Number = 1 - local3 - local4;
if(-1 < local16 && local16 < 1) {
param2.rotationX = Math.atan2(local17,local18);
param2.rotationY = -Math.asin(local16);
param2.rotationZ = Math.atan2(local14,local12);
} else {
param2.rotationX = 0;
param2.rotationY = local16 <= -1 ? Math.PI : -Math.PI;
param2.rotationY *= 0.5;
param2.rotationZ = Math.atan2(-local13,local15);
}
}
private function setEulerAnglesObject(param1:Vector3D, param2:Object) : void {
var local3:Number = 2 * param1.x * param1.x;
var local4:Number = 2 * param1.y * param1.y;
var local5:Number = 2 * param1.z * param1.z;
var local6:Number = 2 * param1.x * param1.y;
var local7:Number = 2 * param1.y * param1.z;
var local8:Number = 2 * param1.z * param1.x;
var local9:Number = 2 * param1.w * param1.x;
var local10:Number = 2 * param1.w * param1.y;
var local11:Number = 2 * param1.w * param1.z;
var local12:Number = 1 - local4 - local5;
var local13:Number = local6 - local11;
var local14:Number = local6 + local11;
var local15:Number = 1 - local3 - local5;
var local16:Number = local8 - local10;
var local17:Number = local7 + local9;
var local18:Number = 1 - local3 - local4;
if(-1 < local16 && local16 < 1) {
param2.rotationX = Math.atan2(local17,local18);
param2.rotationY = -Math.asin(local16);
param2.rotationZ = Math.atan2(local14,local12);
} else {
param2.rotationX = 0;
param2.rotationY = local16 <= -1 ? Math.PI : -Math.PI;
param2.rotationY *= 0.5;
param2.rotationZ = Math.atan2(-local13,local15);
}
}
}
}
|
package alternativa.engine3d.materials {
public class AverageLightMaterial extends TextureMaterial {
public function AverageLightMaterial() {
super();
}
}
}
|
package alternativa.tanks.models.battle.battlefield {
public class TimeStatisticsTimerEvent {
public function TimeStatisticsTimerEvent() {
super();
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.groupinvite {
import alternativa.types.Long;
import flash.events.IEventDispatcher;
public interface GroupInviteService extends IEventDispatcher {
function accept(param1:Long) : void;
function reject(param1:Long) : void;
}
}
|
package alternativa.tanks.sfx.floatingmessage {
import alternativa.engine3d.core.Object3D;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.sfx.*;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.geom.Vector3D;
public class FloatingTextEffect extends PooledObject implements GraphicEffect {
[Inject]
public static var battleService:BattleService;
private static const vector1:Vector3D = new Vector3D();
private var messageLifeTime:int;
private var messages:Vector.<Message>;
private var anchor:Object3D;
private var messageContainer:DisplayObjectContainer;
private var destructionCallback:Function;
private var killed:Boolean;
public function FloatingTextEffect(param1:Pool) {
super(param1);
this.messages = new Vector.<Message>();
this.messageContainer = new Sprite();
}
public function init(param1:int, param2:Object3D, param3:Function) : void {
this.messageLifeTime = param1;
this.anchor = param2;
this.destructionCallback = param3;
this.killed = false;
}
public function addMessage(param1:String, param2:uint) : void {
var local3:Message = Message.create();
local3.color = param2;
local3.text = param1;
local3.lifeTime = 0;
this.messages.push(local3);
this.messageContainer.addChild(local3);
}
public function addedToScene(param1:Scene3DContainer) : void {
battleService.getBattleView().addOverlayObject(this.messageContainer);
}
public function kill() : void {
this.killed = true;
}
public function play(param1:int, param2:GameCamera) : Boolean {
var local3:int = 0;
var local6:Message = null;
if(this.killed) {
return false;
}
local3 = 0;
while(local3 < this.messages.length) {
local6 = this.messages[local3];
local6.lifeTime += param1;
if(local6.lifeTime >= this.messageLifeTime) {
local6.destroy();
this.messages.shift();
local3--;
}
local3++;
}
if(this.messages.length == 0) {
return false;
}
vector1.x = 0;
vector1.y = 0;
vector1.z = 0;
var local4:Vector3D = param2.projectGlobal(this.anchor.localToGlobal(vector1));
if(local4.z > 0.01 && local4.z > param2.nearClipping) {
this.messageContainer.visible = true;
this.messageContainer.x = int(local4.x);
this.messageContainer.y = int(local4.y);
} else {
this.messageContainer.visible = false;
}
var local5:int = 0;
local3 = this.messages.length - 1;
while(local3 >= 0) {
local6 = this.messages[local3];
local6.y = local5;
local6.x = -int(local6.textWidth / 2);
local5 -= 20;
local3--;
}
return true;
}
public function destroy() : void {
var local1:Message = null;
var local2:Function = null;
if(this.messageContainer.parent != null) {
this.messageContainer.parent.removeChild(this.messageContainer);
}
for each(local1 in this.messages) {
local1.destroy();
}
this.messages.length = 0;
if(this.destructionCallback != null) {
local2 = this.destructionCallback;
this.destructionCallback = null;
local2.call();
}
}
}
}
|
package platform.client.fp10.core.service.errormessage.impl {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.display.IDisplay;
import platform.client.fp10.core.service.errormessage.IErrorMessageService;
import platform.client.fp10.core.service.errormessage.IMessageBox;
import platform.client.fp10.core.service.errormessage.errors.ErrorType;
public class MessageBoxService implements IErrorMessageService {
private var osgi:OSGi;
private var window:IMessageBox;
public function MessageBoxService(param1:OSGi) {
super();
this.osgi = param1;
this.window = new DefaultMessageWindow();
}
public function showMessage(param1:ErrorType) : void {
var local2:IDisplay = IDisplay(this.osgi.getService(IDisplay));
local2.stage.addChild(this.window.getDisplayObject(param1));
}
public function hideMessage() : void {
this.window.hide();
}
public function setMessageBox(param1:IMessageBox) : void {
this.window = param1;
}
}
}
|
package projects.tanks.client.battleservice.model.battle.jgr {
public interface IBattleJGRModelBase {
}
}
|
package alternativa.tanks.model.shop.items.base
{
import flash.display.BitmapData;
public class ButtonItemSkin
{
public var overState:BitmapData;
public var normalState:BitmapData;
public function ButtonItemSkin()
{
super();
}
}
}
|
package alternativa.tanks.models.effects.common
{
import alternativa.object.ClientObject;
import alternativa.tanks.bonuses.IBonus;
public interface IBonusCommonModel
{
function getBonus(param1:ClientObject, param2:String, param3:int, param4:Boolean) : IBonus;
}
}
|
package alternativa.tanks.model
{
public interface IItemEffectListener
{
function setTimeRemaining(param1:String, param2:Number) : void;
function effectStopped(param1:String) : void;
}
}
|
package _codec.projects.tanks.client.entrance.model.entrance.externalentrance {
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 projects.tanks.client.entrance.model.entrance.externalentrance.SocialNetworkEntranceParams;
public class CodecSocialNetworkEntranceParams implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_authorizationUrl:ICodec;
private var codec_enabled:ICodec;
private var codec_snId:ICodec;
public function CodecSocialNetworkEntranceParams() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_authorizationUrl = param1.getCodec(new TypeCodecInfo(String,true));
this.codec_enabled = param1.getCodec(new TypeCodecInfo(Boolean,true));
this.codec_snId = param1.getCodec(new TypeCodecInfo(String,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:SocialNetworkEntranceParams = new SocialNetworkEntranceParams();
local2.authorizationUrl = this.codec_authorizationUrl.decode(param1) as String;
local2.enabled = this.codec_enabled.decode(param1) as Boolean;
local2.snId = this.codec_snId.decode(param1) as String;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:SocialNetworkEntranceParams = SocialNetworkEntranceParams(param2);
this.codec_authorizationUrl.encode(param1,local3.authorizationUrl);
this.codec_enabled.encode(param1,local3.enabled);
this.codec_snId.encode(param1,local3.snId);
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapSmallRank08.png")]
public class DefaultRanksBitmaps_bitmapSmallRank08 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapSmallRank08() {
super();
}
}
}
|
package projects.tanks.client.battleservice.model.performance {
public class PerformanceCC {
private var _alertFPSRatioThreshold:Number;
private var _alertFPSThreshold:Number;
private var _alertMinTestTime:Number;
private var _alertPingRatioThreshold:Number;
private var _alertPingThreshold:Number;
private var _indicatorHighFPS:int;
private var _indicatorHighFPSColor:String;
private var _indicatorHighPing:int;
private var _indicatorHighPingColor:String;
private var _indicatorLowFPS:int;
private var _indicatorLowFPSColor:String;
private var _indicatorLowPing:int;
private var _indicatorLowPingColor:String;
private var _indicatorVeryHighPing:int;
private var _indicatorVeryHighPingColor:String;
private var _indicatorVeryLowFPS:int;
private var _indicatorVeryLowFPSColor:String;
private var _qualityFPSThreshold:Number;
private var _qualityIdleTime:Number;
private var _qualityMaxAttempts:int;
private var _qualityRatioThreshold:Number;
private var _qualityTestTime:Number;
private var _qualityVisualizationSpeed:Number;
public function PerformanceCC(param1:Number = 0, param2:Number = 0, param3:Number = 0, param4:Number = 0, param5:Number = 0, param6:int = 0, param7:String = null, param8:int = 0, param9:String = null, param10:int = 0, param11:String = null, param12:int = 0, param13:String = null, param14:int = 0, param15:String = null, param16:int = 0, param17:String = null, param18:Number = 0, param19:Number = 0, param20:int = 0, param21:Number = 0, param22:Number = 0, param23:Number = 0) {
super();
this._alertFPSRatioThreshold = param1;
this._alertFPSThreshold = param2;
this._alertMinTestTime = param3;
this._alertPingRatioThreshold = param4;
this._alertPingThreshold = param5;
this._indicatorHighFPS = param6;
this._indicatorHighFPSColor = param7;
this._indicatorHighPing = param8;
this._indicatorHighPingColor = param9;
this._indicatorLowFPS = param10;
this._indicatorLowFPSColor = param11;
this._indicatorLowPing = param12;
this._indicatorLowPingColor = param13;
this._indicatorVeryHighPing = param14;
this._indicatorVeryHighPingColor = param15;
this._indicatorVeryLowFPS = param16;
this._indicatorVeryLowFPSColor = param17;
this._qualityFPSThreshold = param18;
this._qualityIdleTime = param19;
this._qualityMaxAttempts = param20;
this._qualityRatioThreshold = param21;
this._qualityTestTime = param22;
this._qualityVisualizationSpeed = param23;
}
public function get alertFPSRatioThreshold() : Number {
return this._alertFPSRatioThreshold;
}
public function set alertFPSRatioThreshold(param1:Number) : void {
this._alertFPSRatioThreshold = param1;
}
public function get alertFPSThreshold() : Number {
return this._alertFPSThreshold;
}
public function set alertFPSThreshold(param1:Number) : void {
this._alertFPSThreshold = param1;
}
public function get alertMinTestTime() : Number {
return this._alertMinTestTime;
}
public function set alertMinTestTime(param1:Number) : void {
this._alertMinTestTime = param1;
}
public function get alertPingRatioThreshold() : Number {
return this._alertPingRatioThreshold;
}
public function set alertPingRatioThreshold(param1:Number) : void {
this._alertPingRatioThreshold = param1;
}
public function get alertPingThreshold() : Number {
return this._alertPingThreshold;
}
public function set alertPingThreshold(param1:Number) : void {
this._alertPingThreshold = param1;
}
public function get indicatorHighFPS() : int {
return this._indicatorHighFPS;
}
public function set indicatorHighFPS(param1:int) : void {
this._indicatorHighFPS = param1;
}
public function get indicatorHighFPSColor() : String {
return this._indicatorHighFPSColor;
}
public function set indicatorHighFPSColor(param1:String) : void {
this._indicatorHighFPSColor = param1;
}
public function get indicatorHighPing() : int {
return this._indicatorHighPing;
}
public function set indicatorHighPing(param1:int) : void {
this._indicatorHighPing = param1;
}
public function get indicatorHighPingColor() : String {
return this._indicatorHighPingColor;
}
public function set indicatorHighPingColor(param1:String) : void {
this._indicatorHighPingColor = param1;
}
public function get indicatorLowFPS() : int {
return this._indicatorLowFPS;
}
public function set indicatorLowFPS(param1:int) : void {
this._indicatorLowFPS = param1;
}
public function get indicatorLowFPSColor() : String {
return this._indicatorLowFPSColor;
}
public function set indicatorLowFPSColor(param1:String) : void {
this._indicatorLowFPSColor = param1;
}
public function get indicatorLowPing() : int {
return this._indicatorLowPing;
}
public function set indicatorLowPing(param1:int) : void {
this._indicatorLowPing = param1;
}
public function get indicatorLowPingColor() : String {
return this._indicatorLowPingColor;
}
public function set indicatorLowPingColor(param1:String) : void {
this._indicatorLowPingColor = param1;
}
public function get indicatorVeryHighPing() : int {
return this._indicatorVeryHighPing;
}
public function set indicatorVeryHighPing(param1:int) : void {
this._indicatorVeryHighPing = param1;
}
public function get indicatorVeryHighPingColor() : String {
return this._indicatorVeryHighPingColor;
}
public function set indicatorVeryHighPingColor(param1:String) : void {
this._indicatorVeryHighPingColor = param1;
}
public function get indicatorVeryLowFPS() : int {
return this._indicatorVeryLowFPS;
}
public function set indicatorVeryLowFPS(param1:int) : void {
this._indicatorVeryLowFPS = param1;
}
public function get indicatorVeryLowFPSColor() : String {
return this._indicatorVeryLowFPSColor;
}
public function set indicatorVeryLowFPSColor(param1:String) : void {
this._indicatorVeryLowFPSColor = param1;
}
public function get qualityFPSThreshold() : Number {
return this._qualityFPSThreshold;
}
public function set qualityFPSThreshold(param1:Number) : void {
this._qualityFPSThreshold = param1;
}
public function get qualityIdleTime() : Number {
return this._qualityIdleTime;
}
public function set qualityIdleTime(param1:Number) : void {
this._qualityIdleTime = param1;
}
public function get qualityMaxAttempts() : int {
return this._qualityMaxAttempts;
}
public function set qualityMaxAttempts(param1:int) : void {
this._qualityMaxAttempts = param1;
}
public function get qualityRatioThreshold() : Number {
return this._qualityRatioThreshold;
}
public function set qualityRatioThreshold(param1:Number) : void {
this._qualityRatioThreshold = param1;
}
public function get qualityTestTime() : Number {
return this._qualityTestTime;
}
public function set qualityTestTime(param1:Number) : void {
this._qualityTestTime = param1;
}
public function get qualityVisualizationSpeed() : Number {
return this._qualityVisualizationSpeed;
}
public function set qualityVisualizationSpeed(param1:Number) : void {
this._qualityVisualizationSpeed = param1;
}
public function toString() : String {
var local1:String = "PerformanceCC [";
local1 += "alertFPSRatioThreshold = " + this.alertFPSRatioThreshold + " ";
local1 += "alertFPSThreshold = " + this.alertFPSThreshold + " ";
local1 += "alertMinTestTime = " + this.alertMinTestTime + " ";
local1 += "alertPingRatioThreshold = " + this.alertPingRatioThreshold + " ";
local1 += "alertPingThreshold = " + this.alertPingThreshold + " ";
local1 += "indicatorHighFPS = " + this.indicatorHighFPS + " ";
local1 += "indicatorHighFPSColor = " + this.indicatorHighFPSColor + " ";
local1 += "indicatorHighPing = " + this.indicatorHighPing + " ";
local1 += "indicatorHighPingColor = " + this.indicatorHighPingColor + " ";
local1 += "indicatorLowFPS = " + this.indicatorLowFPS + " ";
local1 += "indicatorLowFPSColor = " + this.indicatorLowFPSColor + " ";
local1 += "indicatorLowPing = " + this.indicatorLowPing + " ";
local1 += "indicatorLowPingColor = " + this.indicatorLowPingColor + " ";
local1 += "indicatorVeryHighPing = " + this.indicatorVeryHighPing + " ";
local1 += "indicatorVeryHighPingColor = " + this.indicatorVeryHighPingColor + " ";
local1 += "indicatorVeryLowFPS = " + this.indicatorVeryLowFPS + " ";
local1 += "indicatorVeryLowFPSColor = " + this.indicatorVeryLowFPSColor + " ";
local1 += "qualityFPSThreshold = " + this.qualityFPSThreshold + " ";
local1 += "qualityIdleTime = " + this.qualityIdleTime + " ";
local1 += "qualityMaxAttempts = " + this.qualityMaxAttempts + " ";
local1 += "qualityRatioThreshold = " + this.qualityRatioThreshold + " ";
local1 += "qualityTestTime = " + this.qualityTestTime + " ";
local1 += "qualityVisualizationSpeed = " + this.qualityVisualizationSpeed + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.help {
import alternativa.osgi.service.locale.ILocaleService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.BubbleHelper;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.HelperAlign;
public class TanksPartHelper extends BubbleHelper {
[Inject]
public static var localeService:ILocaleService;
public function TanksPartHelper() {
super();
text = localeService.getText(TanksLocale.TEXT_GARAGE_HELPER_TANK_PARTS);
arrowLehgth = 48;
arrowAlign = HelperAlign.MIDDLE_RIGHT;
_showLimit = 3;
}
}
}
|
package alternativa.resource.loaders
{
import alternativa.engine3d.loaders.events.LoaderEvent;
import alternativa.engine3d.loaders.events.LoaderProgressEvent;
import alternativa.resource.loaders.events.BatchTextureLoaderErrorEvent;
import flash.display.BitmapData;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IOErrorEvent;
import flash.system.LoaderContext;
[Event(name="open",type="flash.events.Event")]
[Event(name="complete",type="flash.events.Event")]
[Event(name="loaderError",type="alternativa.resource.loaders.events.BatchTextureLoaderErrorEvent")]
[Event(name="partOpen",type="alternativa.engine3d.loaders.events.LoaderEvent")]
[Event(name="partComplete",type="alternativa.engine3d.loaders.events.LoaderEvent")]
[Event(name="loaderProgress",type="alternativa.engine3d.loaders.events.LoaderProgressEvent")]
public class BatchTextureLoader extends EventDispatcher
{
private static var stubBitmapData:BitmapData;
private static const IDLE:int = 0;
private static const LOADING:int = 1;
private var state:int = 0;
private var textureLoader:TextureLoader;
private var loaderContext:LoaderContext;
private var baseURL:String;
private var batch:Object;
private var textureNames:Vector.<String>;
private var textureIndex:int;
private var numTextures:int;
private var _textures:Object;
public function BatchTextureLoader()
{
super();
}
public function get textures() : Object
{
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(baseURL:String, batch:Object, loaderContext:LoaderContext = null) : void
{
var textureName:* = null;
if(baseURL == null)
{
throw ArgumentError("Parameter baseURL cannot be null");
}
if(batch == null)
{
throw ArgumentError("Parameter batch cannot be null");
}
this.baseURL = baseURL;
this.batch = batch;
this.loaderContext = loaderContext;
if(this.textureLoader == null)
{
this.textureLoader = new TextureLoader();
}
else
{
this.close();
}
this.textureLoader.addEventListener(Event.OPEN,this.onTextureLoadingStart);
this.textureLoader.addEventListener(LoaderProgressEvent.LOADER_PROGRESS,this.onProgress);
this.textureLoader.addEventListener(Event.COMPLETE,this.onTextureLoadingComplete);
this.textureLoader.addEventListener(IOErrorEvent.IO_ERROR,this.onLoadingError);
this.textureNames = new Vector.<String>();
for(textureName in batch)
{
this.textureNames.push(textureName);
}
this.numTextures = this.textureNames.length;
this.textureIndex = 0;
this._textures = {};
if(hasEventListener(Event.OPEN))
{
dispatchEvent(new Event(Event.OPEN));
}
this.state = LOADING;
this.loadNextTexture();
}
private function loadNextTexture() : void
{
var info:TextureInfo = this.batch[this.textureNames[this.textureIndex]];
var opacityMapFileUrl:String = info.opacityMapFileName == null || info.opacityMapFileName == "" ? null : this.baseURL + info.opacityMapFileName;
this.textureLoader.load(this.baseURL + info.diffuseMapFileName,opacityMapFileUrl,this.loaderContext);
}
private function onTextureLoadingStart(e:Event) : void
{
if(hasEventListener(LoaderEvent.PART_OPEN))
{
dispatchEvent(new LoaderEvent(LoaderEvent.PART_OPEN,this.numTextures,this.textureIndex));
}
}
private function onProgress(e:LoaderProgressEvent) : void
{
var totalProgress:Number = NaN;
if(hasEventListener(LoaderProgressEvent.LOADER_PROGRESS))
{
totalProgress = (this.textureIndex + e.totalProgress) / this.numTextures;
dispatchEvent(new LoaderProgressEvent(LoaderProgressEvent.LOADER_PROGRESS,this.numTextures,this.textureIndex,totalProgress,e.bytesLoaded,e.bytesTotal));
}
}
private function onTextureLoadingComplete(e:Event) : void
{
this._textures[this.textureNames[this.textureIndex]] = this.textureLoader.bitmapData;
this.tryNextTexure();
}
private function onLoadingError(e:ErrorEvent) : void
{
var textureName:String = this.textureNames[this.textureIndex];
this._textures[textureName] = this.getStubBitmapData();
dispatchEvent(new BatchTextureLoaderErrorEvent(BatchTextureLoaderErrorEvent.LOADER_ERROR,textureName,e.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.removeEventListeners();
this.state = IDLE;
if(hasEventListener(Event.COMPLETE))
{
dispatchEvent(new Event(Event.COMPLETE));
}
}
else
{
this.loadNextTexture();
}
}
private function removeEventListeners() : void
{
this.textureLoader.removeEventListener(Event.OPEN,this.onTextureLoadingStart);
this.textureLoader.removeEventListener(LoaderProgressEvent.LOADER_PROGRESS,this.onProgress);
this.textureLoader.removeEventListener(Event.COMPLETE,this.onTextureLoadingComplete);
this.textureLoader.removeEventListener(IOErrorEvent.IO_ERROR,this.onLoadingError);
}
private function cleanup() : void
{
this.loaderContext = null;
this.textureNames = null;
}
private function getStubBitmapData() : BitmapData
{
var size:uint = 0;
var i:uint = 0;
var j:uint = 0;
if(stubBitmapData == null)
{
size = 20;
stubBitmapData = new BitmapData(size,size,false,0);
for(i = 0; i < size; i++)
{
for(j = 0; j < size; j += 2)
{
stubBitmapData.setPixel(!!Boolean(i % 2) ? int(int(j)) : int(int(j + 1)),i,16711935);
}
}
}
return stubBitmapData;
}
}
}
|
package alternativa.tanks.models.battle.meteor {
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.math.Matrix3;
import alternativa.math.Quaternion;
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleRunner;
import alternativa.tanks.battle.LogicUnit;
import alternativa.tanks.battle.scene3d.BattleScene3D;
import alternativa.tanks.battle.scene3d.Renderer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.models.battle.meteor.nuclear.NuclearBangEffect;
import alternativa.tanks.sfx.AnimatedLightEffect;
import alternativa.tanks.sfx.ExternalObject3DPositionProvider;
import alternativa.tanks.sfx.PositionAndRotationProvider;
import alternativa.tanks.utils.objectpool.ObjectPool;
import alternativa.utils.TextureMaterialRegistry;
import flash.display.BitmapData;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class Meteor implements Renderer, LogicUnit, PositionAndRotationProvider {
internal const timeDisappearing:* = 20;
internal const SMOKE_INTERVAL:* = 24;
internal const MAX_NUKE_EFFECT_TIME:* = 5000;
internal const NUKE_BANG_VOLUME:* = 2;
internal const ROTATION_SPEED:* = 0.006283185307179587;
internal const DECAL_RADIUS:* = 1000;
private var pool:ObjectPool;
private var initialPosition:Vector3;
private var groundPosition:Vector3;
private var bangPosition:Vector3;
private var timeToFlyMs:int;
private var sfxData:MeteorSFXData;
private var bitmapTexturesRegistry:TextureMaterialRegistry;
private var rotationQ:Quaternion = new Quaternion();
private var rotation:Matrix3 = new Matrix3();
private var rotationV:Vector3 = new Vector3();
private var baseRotation:Matrix3 = new Matrix3();
private var vector3:Vector3 = new Vector3();
internal var fallDirection:Vector3;
internal var fallSpeed:Number;
internal var fallSpeedVector:Vector3;
internal var arrivingSoundPlayTime:int;
private var flyTime:int;
private var smokeTime:* = 0;
private var meteorTime:int;
private var arriving:Boolean = false;
internal var state:MeteorState = MeteorState.INIT;
internal var newPosition:Vector3 = new Vector3();
private var meteorFlame:MeteorFlame;
private var lightEffect:AnimatedLightEffect;
private var meteorObject:Mesh;
private var nuclearBangEffect:NuclearBangEffect;
private var battleScene3D:BattleScene3D;
private var battleRunner:BattleRunner;
private var gameCamera:GameCamera;
private var finishCallback:Function;
private var lightPositionProvider:ExternalObject3DPositionProvider;
public function Meteor(param1:ObjectPool, param2:TextureMaterialRegistry, param3:Vector3, param4:Vector3, param5:Vector3, param6:int, param7:MeteorSFXData) {
super();
this.pool = param1;
this.initialPosition = param3;
this.groundPosition = param4;
this.bangPosition = param5;
this.timeToFlyMs = param6;
this.sfxData = param7;
this.bitmapTexturesRegistry = param2;
this.meteorFlame = new MeteorFlame(this.sfxData.tailFlame,this);
this.lightPositionProvider = ExternalObject3DPositionProvider(param1.getObject(ExternalObject3DPositionProvider));
this.lightEffect = AnimatedLightEffect(param1.getObject(AnimatedLightEffect));
this.lightEffect.init(this.lightPositionProvider,this.sfxData.tailLight,AnimatedLightEffect.DEFAULT_MAX_DISTANCE,true);
this.meteorObject = this.createMeteorObject(this.sfxData.meteorResource);
this.flyTime = param6;
this.fallDirection = param4.clone().subtract(param3);
var local8:Number = this.fallDirection.length();
this.fallSpeed = local8 / this.flyTime;
this.fallDirection.normalize();
this.fallSpeedVector = this.fallDirection.clone().scale(this.fallSpeed);
this.arrivingSoundPlayTime = Math.max(this.flyTime - this.sfxData.impactSoundTimerLabel,0);
this.meteorTime = 0;
this.arriving = false;
}
public function setTime(param1:int) : void {
this.meteorTime = param1;
}
private function createMeteorObject(param1:Tanks3DSResource) : Mesh {
var local2:Mesh = param1.objects[0].clone() as Mesh;
var local3:BitmapData = param1.getTextureForObject(0);
if(local3 == null) {
throw Error("Texture not found");
}
var local4:TextureMaterial = this.bitmapTexturesRegistry.getMaterial(local3);
local2.setMaterialToAllFaces(local4);
return local2;
}
internal function addToBattle(param1:BattleScene3D, param2:BattleRunner, param3:Function) : void {
this.finishCallback = param3;
this.newPosition.copy(this.initialPosition);
Vector3.Z_AXIS.clone().scale(-1).rotationTo(this.fallDirection).toMatrix3(this.baseRotation);
this.setObjectPosition(this.meteorObject,this.newPosition);
this.setObjectOrientation(this.meteorObject,this.baseRotation);
this.state = MeteorState.INIT;
this.battleScene3D = param1;
this.battleRunner = param2;
this.gameCamera = param1.getCamera();
param1.addGraphicEffect(this.meteorFlame);
param1.addGraphicEffect(this.lightEffect);
param1.addRenderer(this);
param1.addObject(this.meteorObject);
param2.addLogicUnit(this);
this.nuclearBangEffect = new NuclearBangEffect(this.pool,this.sfxData.nuclearBangLight,this.sfxData.nuclearBangWave,this.sfxData.nuclearBangSmoke,this.sfxData.nuclearBangFlame);
}
public function removeFromBattle() : void {
this.meteorFlame.kill();
this.lightEffect.kill();
this.mute();
this.battleScene3D.removeObject(this.meteorObject);
this.battleScene3D.removeRenderer(this);
this.battleRunner.removeLogicUnit(this);
this.battleScene3D = null;
this.battleRunner = null;
}
public function mute() : void {
this.sfxData.meteorDistantSound.stop();
this.sfxData.nuclearBangSound.stop();
this.sfxData.meteorArrivingSound.stop();
}
public function runLogic(param1:int, param2:int) : void {
var local3:Vector3 = null;
var local4:int = 0;
this.meteorTime += param2;
if(this.state == MeteorState.INIT) {
this.state = MeteorState.FALLING;
}
if(this.state == MeteorState.FALLING) {
this.lightPositionProvider.setPosition(this.newPosition);
if(this.meteorTime < this.flyTime) {
local3 = this.fallDirection.clone().scale(this.meteorTime * this.fallSpeed);
this.newPosition.copy(this.initialPosition).add(local3);
if(this.meteorTime >= this.arrivingSoundPlayTime) {
if(!this.arriving) {
this.arriving = true;
this.sfxData.meteorDistantSound.stop();
this.sfxData.meteorArrivingSound.play(0,1);
}
this.sfxData.meteorArrivingSound.checkVolume(this.gameCamera.position,this.newPosition,this.gameCamera.xAxis);
} else {
this.sfxData.meteorDistantSound.checkVolume(this.gameCamera.position,this.newPosition,this.gameCamera.xAxis);
}
this.smokeTime += param2;
if(this.smokeTime > this.SMOKE_INTERVAL) {
this.smokeTime = 0;
this.addSmoke();
}
} else {
this.newPosition.copy(this.groundPosition);
this.sfxData.meteorArrivingSound.stop();
this.state = MeteorState.DISAPPEARING;
this.meteorFlame.fadeOut();
this.explode();
}
} else if(this.state == MeteorState.DISAPPEARING) {
local4 = this.meteorTime - this.flyTime;
if(local4 < this.timeDisappearing) {
this.meteorObject.alpha = (this.timeDisappearing.toDouble() - local4) / this.timeDisappearing;
} else {
this.meteorObject.visible = false;
this.state = MeteorState.EXPLOSION;
if(this.finishCallback != null) {
this.finishCallback.call(this,this);
this.finishCallback = null;
}
}
} else if(this.state == MeteorState.EXPLOSION) {
if(this.meteorTime > this.timeDisappearing + this.flyTime + this.MAX_NUKE_EFFECT_TIME) {
this.removeFromBattle();
}
}
}
private function explode() : void {
this.sfxData.nuclearBangSound.checkVolume(this.gameCamera.position,this.groundPosition,this.gameCamera.xAxis);
this.sfxData.nuclearBangSound.volume = this.NUKE_BANG_VOLUME;
this.sfxData.nuclearBangSound.play(0,1);
this.nuclearBangEffect.play(this.bangPosition,this.battleScene3D);
var local1:Vector3 = this.groundPosition.clone().add(Vector3.Z_AXIS.clone().scale(5));
this.battleScene3D.addDecal(this.groundPosition,local1,this.DECAL_RADIUS,this.sfxData.craterDecal);
}
private function addSmoke() : void {
var local1:MeteorSmoke = MeteorSmoke(this.pool.getObject(MeteorSmoke));
local1.init(this.newPosition,this.fallDirection,this.sfxData.tailSmoke);
this.battleScene3D.addGraphicEffect(local1);
}
public function render(param1:int, param2:int) : void {
this.setObjectPosition(this.meteorObject,this.newPosition);
this.rotationQ.setFromAxisAngle(Vector3.Z_AXIS,param1 * this.ROTATION_SPEED).toMatrix3(this.rotation);
this.rotation.append(this.baseRotation).getEulerAngles(this.rotationV);
this.setObjectOrientationV(this.meteorObject,this.rotationV);
}
private function setObjectOrientation(param1:Mesh, param2:Matrix3) : void {
param2.getEulerAngles(this.vector3);
this.setObjectOrientationV(param1,this.vector3);
}
private function setObjectOrientationV(param1:Mesh, param2:Vector3) : void {
param1.rotationX = param2.x;
param1.rotationY = param2.y;
param1.rotationZ = param2.z;
}
private function setObjectPosition(param1:Mesh, param2:Vector3) : void {
param1.x = param2.x;
param1.y = param2.y;
param1.z = param2.z;
}
public function readPositionAndRotation(param1:Vector3, param2:Vector3) : void {
param1.copy(this.newPosition);
param2.copy(this.fallDirection);
}
}
}
|
package alternativa.tanks.models.tank
{
public interface ITankEventListener
{
function handleTankEvent(param1:int, param2:TankData) : void;
}
}
|
package alternativa.tanks.model.payment.shop.emailrequired {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ShopItemEmailRequiredAdapt implements ShopItemEmailRequired {
private var object:IGameObject;
private var impl:ShopItemEmailRequired;
public function ShopItemEmailRequiredAdapt(param1:IGameObject, param2:ShopItemEmailRequired) {
super();
this.object = param1;
this.impl = param2;
}
public function isEmailRequired() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.isEmailRequired());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.battlefield.mine
{
public class MineModelData
{
public var armingDuration:int;
public var armedFlashDuration:int;
public var armedFlashFadeDuration:int;
public var flashChannelOffset:int;
public var farRadius:Number = 1500;
public var nearRadius:Number = 500;
public function MineModelData()
{
super();
}
}
}
|
package projects.tanks.client.panel.model.payment.modes {
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 PaymentModeModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:PaymentModeModelServer;
private var client:IPaymentModeModelBase = IPaymentModeModelBase(this);
private var modelId:Long = Long.getLong(1105601461,1114828071);
public function PaymentModeModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new PaymentModeModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(PayModeCC,false)));
}
protected function getInitParam() : PayModeCC {
return PayModeCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.client.chat.types {
import projects.tanks.client.chat.models.chat.chat.ChatAddressMode;
public class ChatMessage {
private var _addressMode:ChatAddressMode;
private var _battleLinks:Vector.<BattleChatLink>;
private var _channel:String;
private var _links:Vector.<String>;
private var _messageType:MessageType;
private var _sourceUser:UserStatus;
private var _targetUser:UserStatus;
private var _text:String;
private var _timePassedInSec:int;
public function ChatMessage(param1:ChatAddressMode = null, param2:Vector.<BattleChatLink> = null, param3:String = null, param4:Vector.<String> = null, param5:MessageType = null, param6:UserStatus = null, param7:UserStatus = null, param8:String = null, param9:int = 0) {
super();
this._addressMode = param1;
this._battleLinks = param2;
this._channel = param3;
this._links = param4;
this._messageType = param5;
this._sourceUser = param6;
this._targetUser = param7;
this._text = param8;
this._timePassedInSec = param9;
}
public function get addressMode() : ChatAddressMode {
return this._addressMode;
}
public function set addressMode(param1:ChatAddressMode) : void {
this._addressMode = param1;
}
public function get battleLinks() : Vector.<BattleChatLink> {
return this._battleLinks;
}
public function set battleLinks(param1:Vector.<BattleChatLink>) : void {
this._battleLinks = param1;
}
public function get channel() : String {
return this._channel;
}
public function set channel(param1:String) : void {
this._channel = param1;
}
public function get links() : Vector.<String> {
return this._links;
}
public function set links(param1:Vector.<String>) : void {
this._links = param1;
}
public function get messageType() : MessageType {
return this._messageType;
}
public function set messageType(param1:MessageType) : void {
this._messageType = param1;
}
public function get sourceUser() : UserStatus {
return this._sourceUser;
}
public function set sourceUser(param1:UserStatus) : void {
this._sourceUser = param1;
}
public function get targetUser() : UserStatus {
return this._targetUser;
}
public function set targetUser(param1:UserStatus) : void {
this._targetUser = param1;
}
public function get text() : String {
return this._text;
}
public function set text(param1:String) : void {
this._text = param1;
}
public function get timePassedInSec() : int {
return this._timePassedInSec;
}
public function set timePassedInSec(param1:int) : void {
this._timePassedInSec = param1;
}
public function toString() : String {
var local1:String = "ChatMessage [";
local1 += "addressMode = " + this.addressMode + " ";
local1 += "battleLinks = " + this.battleLinks + " ";
local1 += "channel = " + this.channel + " ";
local1 += "links = " + this.links + " ";
local1 += "messageType = " + this.messageType + " ";
local1 += "sourceUser = " + this.sourceUser + " ";
local1 += "targetUser = " + this.targetUser + " ";
local1 += "text = " + this.text + " ";
local1 += "timePassedInSec = " + this.timePassedInSec + " ";
return local1 + "]";
}
}
}
|
package assets.resultwindow {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.resultwindow.items_mini_RIGHT.png")]
public dynamic class items_mini_RIGHT extends BitmapData {
public function items_mini_RIGHT(param1:int = 20, param2:int = 40) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.models.statistics {
import alternativa.osgi.OSGi;
import alternativa.tanks.models.battle.battlefield.BattleUserInfoListener;
import alternativa.tanks.models.battle.battlefield.BattleUserInfoService;
import alternativa.tanks.models.battle.gui.statistics.ShortUserInfo;
import alternativa.types.Long;
import platform.client.fp10.core.type.AutoClosable;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.users.services.chatmoderator.ChatModeratorLevel;
public class BattleUserInfoServiceImpl implements BattleUserInfoService, AutoClosable {
private const userInfoListeners:Vector.<BattleUserInfoListener> = new Vector.<BattleUserInfoListener>();
private var battleObject:IGameObject;
public function BattleUserInfoServiceImpl(param1:IGameObject) {
super();
this.battleObject = param1;
OSGi.getInstance().registerService(BattleUserInfoService,this);
}
public function getUserName(param1:Long) : String {
var local2:ShortUserInfo = this.getShortUserInfo(param1);
return local2 != null ? local2.uid : "";
}
public function getUserRank(param1:Long) : int {
var local2:ShortUserInfo = this.getShortUserInfo(param1);
return local2 != null ? local2.rank : -1;
}
public function isUserSuspected(param1:Long) : Boolean {
var local2:ShortUserInfo = this.getShortUserInfo(param1);
return local2 != null ? local2.suspicious : false;
}
public function getChatModeratorLevel(param1:Long) : ChatModeratorLevel {
var local2:ShortUserInfo = this.getShortUserInfo(param1);
return local2 != null ? local2.chatModeratorLevel : ChatModeratorLevel.NONE;
}
public function hasUserPremium(param1:Long) : Boolean {
var local2:ShortUserInfo = this.getShortUserInfo(param1);
return local2 != null ? local2.hasPremium : false;
}
public function addBattleUserInfoListener(param1:BattleUserInfoListener) : void {
var local2:int = int(this.userInfoListeners.indexOf(param1));
if(local2 < 0) {
this.userInfoListeners.push(param1);
}
}
public function removeBattleUserInfoListener(param1:BattleUserInfoListener) : void {
var local2:int = int(this.userInfoListeners.indexOf(param1));
if(local2 >= 0) {
this.userInfoListeners.splice(local2,1);
}
}
public function dispatchStatChange(param1:ShortUserInfo) : void {
var local2:BattleUserInfoListener = null;
for each(local2 in this.userInfoListeners) {
local2.userInfoChanged(param1.userId,param1.uid,param1.rank,param1.suspicious);
}
}
public function dispatchRankChange(param1:Long, param2:int) : void {
var local3:BattleUserInfoListener = null;
for each(local3 in this.userInfoListeners) {
local3.userRankChanged(param1,param2);
}
}
public function dispatchSuspiciousnessChange(param1:Long, param2:Boolean) : void {
var local3:BattleUserInfoListener = null;
for each(local3 in this.userInfoListeners) {
local3.userSuspiciousnessChanged(param1,param2);
}
}
[Obfuscation(rename="false")]
public function close() : void {
this.battleObject = null;
this.userInfoListeners.length = 0;
OSGi.getInstance().unregisterService(BattleUserInfoService);
}
public function getUsersCount() : int {
var local1:IClientUserInfo = IClientUserInfo(this.battleObject.adapt(IClientUserInfo));
return local1.getUsersCount();
}
private function getShortUserInfo(param1:Long) : ShortUserInfo {
var local2:IClientUserInfo = IClientUserInfo(this.battleObject.adapt(IClientUserInfo));
return local2.getShortUserInfo(param1);
}
}
}
|
package alternativa.tanks.models.battlefield.effects.graffiti
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class TexturesManager_graffiti_heart extends BitmapAsset
{
public function TexturesManager_graffiti_heart()
{
super();
}
}
}
|
package alternativa.tanks.models.weapon.healing {
public class HealingGunEffectsParams {
public static const VISUALIZATION_SPEED:Number = 13;
public static const MIN_SCALE:Number = 0.2;
public static const MUZZLE_SPARK_SIZE:Number = 150;
public static const END_SPARK_SIZE:Number = 150;
public static const END_POSITION_OFFSET:Number = 0;
public static const SHAFT_WIDTH:Number = 120;
public static const SHAFT_NUM_SEGMENTS:int = 20;
public static const SHAFT_STREAM_SPEED:Number = 800;
public static const SHAFT_WAVE_AMPLITUDE:Number = 20;
public static const SHAFT_WAVE1_LENGTH:Number = 750;
public static const SHAFT_WAVE2_LENGTH:Number = 450;
public static const SHAFT_WAVE1_SPEED:Number = 450;
public static const SHAFT_WAVE2_SPEED:Number = 400;
public static const SHAFT_AMPLITUDE_FADE:Number = 200;
public function HealingGunEffectsParams() {
super();
}
}
}
|
package utils
{
import flash.display.Shape;
public class SectorMask extends Shape
{
private static const MIN_PROGRESS:Number = 0;
private static const MAX_PROGRESS:Number = 1;
private var _pen:Pen;
private var _radius:int;
private var _size:int;
private var _startProgress:Number;
private var _endProgress:Number;
private var _isReverse:Boolean;
public function SectorMask(param1:Number, param2:Boolean = false)
{
super();
this._size = param1;
this._isReverse = param2;
this.init();
}
private static function clamp(param1:Number) : Number
{
return Math.max(MIN_PROGRESS,Math.min(MAX_PROGRESS,param1));
}
private function init() : void
{
this._radius = Math.ceil(Math.sqrt(this._size * this._size + this._size * this._size) / 2);
this._pen = new Pen(this.graphics);
}
public function setProgress(param1:Number, param2:Number) : void
{
if(this._startProgress == param1 && this._endProgress == param2)
{
return;
}
this._startProgress = param1;
this._endProgress = param2;
var _loc3_:Number = 360 * clamp(param1);
var _loc4_:Number = 360 * clamp(param2);
var _loc5_:Number = _loc4_ - _loc3_;
var _loc6_:Number = !!this._isReverse ? Number(Number(Number(-90))) : Number(Number(Number(_loc3_ - 90)));
this._pen.clear();
this._pen.beginFill(16711680);
this._pen.drawArc(this._size / 2,this._size / 2,this._radius,_loc5_,_loc6_,true);
this._pen.endFill();
}
}
}
|
package projects.tanks.client.panel.model.shop.androidspecialoffer.offers {
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 MediumTimeOfferModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:MediumTimeOfferModelServer;
private var client:IMediumTimeOfferModelBase = IMediumTimeOfferModelBase(this);
private var modelId:Long = Long.getLong(412778416,343976083);
public function MediumTimeOfferModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new MediumTimeOfferModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(MediumTimeOfferCC,false)));
}
protected function getInitParam() : MediumTimeOfferCC {
return MediumTimeOfferCC(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 alternativa.physics
{
import alternativa.physics.collision.CollisionPrimitive;
public class CollisionPrimitiveList
{
public var head:CollisionPrimitiveListItem;
public var tail:CollisionPrimitiveListItem;
public var size:int;
public function CollisionPrimitiveList()
{
super();
}
public function append(primitive:CollisionPrimitive) : void
{
var item:CollisionPrimitiveListItem = CollisionPrimitiveListItem.create(primitive);
if(this.head == null)
{
this.head = this.tail = item;
}
else
{
this.tail.next = item;
item.prev = this.tail;
this.tail = item;
}
++this.size;
}
public function remove(primitve:CollisionPrimitive) : void
{
var item:CollisionPrimitiveListItem = this.findItem(primitve);
if(item == null)
{
return;
}
if(item == this.head)
{
if(this.size == 1)
{
this.head = this.tail = null;
}
else
{
this.head = item.next;
this.head.prev = null;
}
}
else if(item == this.tail)
{
this.tail = this.tail.prev;
this.tail.next = null;
}
else
{
item.prev.next = item.next;
item.next.prev = item.prev;
}
item.dispose();
--this.size;
}
public function findItem(primitive:CollisionPrimitive) : CollisionPrimitiveListItem
{
var item:CollisionPrimitiveListItem = this.head;
while(item != null && item.primitive != primitive)
{
item = item.next;
}
return item;
}
public function clear() : void
{
var item:CollisionPrimitiveListItem = null;
while(this.head != null)
{
item = this.head;
this.head = this.head.next;
item.dispose();
}
this.tail = null;
this.size = 0;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
public class VectorCodecLightingSFXEntityLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecLightingSFXEntityLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(LightingSFXEntity,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.<LightingSFXEntity> = new Vector.<LightingSFXEntity>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = LightingSFXEntity(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:LightingSFXEntity = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<LightingSFXEntity> = Vector.<LightingSFXEntity>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.models.weapon {
import alternativa.tanks.utils.EncryptedNumber;
import alternativa.tanks.utils.EncryptedNumberImpl;
public class ConicAreaData {
private var coneAngle:EncryptedNumber;
private var range:EncryptedNumber;
public function ConicAreaData(param1:Number, param2:Number) {
super();
this.coneAngle = new EncryptedNumberImpl(param1);
this.range = new EncryptedNumberImpl(param2);
}
public function getConeAngle() : Number {
return this.coneAngle.getNumber();
}
public function getRange() : Number {
return this.range.getNumber();
}
}
}
|
package scpacker.test.spectator
{
import alternativa.math.Vector3;
import alternativa.tanks.camera.GameCamera;
public interface MovementMethod
{
function getDisplacement(param1:UserInput, param2:GameCamera, param3:Number) : Vector3;
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.sfx.shoot.smoky {
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.Short;
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
import projects.tanks.client.battlefield.models.tankparts.sfx.shoot.smoky.SmokyShootSFXCC;
public class CodecSmokyShootSFXCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_criticalHitSize:ICodec;
private var codec_criticalHitTexture:ICodec;
private var codec_explosionMarkTexture:ICodec;
private var codec_explosionSize:ICodec;
private var codec_explosionSound:ICodec;
private var codec_explosionTexture:ICodec;
private var codec_lightingSFXEntity:ICodec;
private var codec_shotSound:ICodec;
private var codec_shotTexture:ICodec;
public function CodecSmokyShootSFXCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_criticalHitSize = param1.getCodec(new TypeCodecInfo(Short,false));
this.codec_criticalHitTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
this.codec_explosionMarkTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_explosionSize = param1.getCodec(new TypeCodecInfo(Short,false));
this.codec_explosionSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_explosionTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
this.codec_lightingSFXEntity = param1.getCodec(new TypeCodecInfo(LightingSFXEntity,false));
this.codec_shotSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_shotTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:SmokyShootSFXCC = new SmokyShootSFXCC();
local2.criticalHitSize = this.codec_criticalHitSize.decode(param1) as int;
local2.criticalHitTexture = this.codec_criticalHitTexture.decode(param1) as MultiframeTextureResource;
local2.explosionMarkTexture = this.codec_explosionMarkTexture.decode(param1) as TextureResource;
local2.explosionSize = this.codec_explosionSize.decode(param1) as int;
local2.explosionSound = this.codec_explosionSound.decode(param1) as SoundResource;
local2.explosionTexture = this.codec_explosionTexture.decode(param1) as MultiframeTextureResource;
local2.lightingSFXEntity = this.codec_lightingSFXEntity.decode(param1) as LightingSFXEntity;
local2.shotSound = this.codec_shotSound.decode(param1) as SoundResource;
local2.shotTexture = this.codec_shotTexture.decode(param1) as TextureResource;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:SmokyShootSFXCC = SmokyShootSFXCC(param2);
this.codec_criticalHitSize.encode(param1,local3.criticalHitSize);
this.codec_criticalHitTexture.encode(param1,local3.criticalHitTexture);
this.codec_explosionMarkTexture.encode(param1,local3.explosionMarkTexture);
this.codec_explosionSize.encode(param1,local3.explosionSize);
this.codec_explosionSound.encode(param1,local3.explosionSound);
this.codec_explosionTexture.encode(param1,local3.explosionTexture);
this.codec_lightingSFXEntity.encode(param1,local3.lightingSFXEntity);
this.codec_shotSound.encode(param1,local3.shotSound);
this.codec_shotTexture.encode(param1,local3.shotTexture);
}
}
}
|
package controls.windowinner {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.windowinner.WindowInner_leftClass.png")]
public class WindowInner_leftClass extends BitmapAsset {
public function WindowInner_leftClass() {
super();
}
}
}
|
package controls.slider
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class SelectRankThumb_bitmapArrow extends BitmapAsset
{
public function SelectRankThumb_bitmapArrow()
{
super();
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.messages {
import alternativa.tanks.models.battle.battlefield.common.MessageLine;
import alternativa.tanks.models.battle.ctf.MessageColor;
import alternativa.tanks.models.battle.gui.statistics.ShortUserInfo;
import alternativa.tanks.models.battle.gui.userlabel.BattleActionUserLabel;
import alternativa.tanks.models.battle.gui.userlabel.BattleChatUserLabel;
import controls.Label;
import flash.display.Bitmap;
import flash.utils.Dictionary;
public class ActionOutputLine extends MessageLine {
private static var aslBluePlayerDeliverFlagIcon:Class = ActionOutputLine_aslBluePlayerDeliverFlagIcon;
private static var aslBluePlayerDropFlagIcon:Class = ActionOutputLine_aslBluePlayerDropFlagIcon;
private static var aslBluePlayerPickFlagIcon:Class = ActionOutputLine_aslBluePlayerPickFlagIcon;
private static var aslRedPlayerDeliverFlagIcon:Class = ActionOutputLine_aslRedPlayerDeliverFlagIcon;
private static var aslRedPlayerDropFlagIcon:Class = ActionOutputLine_aslRedPlayerDropFlagIcon;
private static var aslRedPlayerPickFlagIcon:Class = ActionOutputLine_aslRedPlayerPickFlagIcon;
private static var cpPointBlueNeutralIcon:Class = ActionOutputLine_cpPointBlueNeutralIcon;
private static var cpPointNeutralBlueIcon:Class = ActionOutputLine_cpPointNeutralBlueIcon;
private static var cpPointNeutralRedIcon:Class = ActionOutputLine_cpPointNeutralRedIcon;
private static var cpPointRedNeutralIcon:Class = ActionOutputLine_cpPointRedNeutralIcon;
private static var ctfBluePlayerBringbackBlueflagIcon:Class = ActionOutputLine_ctfBluePlayerBringbackBlueflagIcon;
private static var ctfBluePlayerDeliverRedflagIcon:Class = ActionOutputLine_ctfBluePlayerDeliverRedflagIcon;
private static var ctfBluePlayerDropRedflagIcon:Class = ActionOutputLine_ctfBluePlayerDropRedflagIcon;
private static var ctfBluePlayerPickRedflagIcon:Class = ActionOutputLine_ctfBluePlayerPickRedflagIcon;
private static var ctfRedPlayerBringbackRedflagIcon:Class = ActionOutputLine_ctfRedPlayerBringbackRedflagIcon;
private static var ctfRedPlayerDeliverBlueflagIcon:Class = ActionOutputLine_ctfRedPlayerDeliverBlueflagIcon;
private static var ctfRedPlayerDropBlueflagIcon:Class = ActionOutputLine_ctfRedPlayerDropBlueflagIcon;
private static var ctfRedPlayerPickBlueflagIcon:Class = ActionOutputLine_ctfRedPlayerPickBlueflagIcon;
private static var playerChangeEquipmentIcon:Class = ActionOutputLine_playerChangeEquipmentIcon;
private static var playerGoldBoxIcon:Class = ActionOutputLine_playerGoldBoxIcon;
private static var playerJoinTheBattleIcon:Class = ActionOutputLine_playerJoinTheBattleIcon;
private static var playerLeaveTheBattleIcon:Class = ActionOutputLine_playerLeaveTheBattleIcon;
private static var playerSelfDestroyIcon:Class = ActionOutputLine_playerSelfDestroyIcon;
private static var rgbPlayerDeliverBallIcon:Class = ActionOutputLine_rgbPlayerDeliverBallIcon;
private static var rgbPlayerLooseBallIcon:Class = ActionOutputLine_rgbPlayerLooseBallIcon;
private static var rgbPlayerPickBallIcon:Class = ActionOutputLine_rgbPlayerPickBallIcon;
private static var rgbPlayerThrewBallIcon:Class = ActionOutputLine_rgbPlayerThrewBallIcon;
private static var action2icon:Dictionary = new Dictionary();
action2icon[UserAction.ASL_BLUE_PLAYER_DELIVER_FLAG] = new aslBluePlayerDeliverFlagIcon().bitmapData;
action2icon[UserAction.ASL_BLUE_PLAYER_DROP_FLAG] = new aslBluePlayerDropFlagIcon().bitmapData;
action2icon[UserAction.ASL_BLUE_PLAYER_PICK_FLAG] = new aslBluePlayerPickFlagIcon().bitmapData;
action2icon[UserAction.ASL_RED_PLAYER_DELIVER_FLAG] = new aslRedPlayerDeliverFlagIcon().bitmapData;
action2icon[UserAction.ASL_RED_PLAYER_DROP_FLAG] = new aslRedPlayerDropFlagIcon().bitmapData;
action2icon[UserAction.ASL_RED_PLAYER_PICK_FLAG] = new aslRedPlayerPickFlagIcon().bitmapData;
action2icon[UserAction.CP_POINT_BLUE_NEUTRAL] = new cpPointBlueNeutralIcon().bitmapData;
action2icon[UserAction.CP_POINT_NEUTRAL_BLUE] = new cpPointNeutralBlueIcon().bitmapData;
action2icon[UserAction.CP_POINT_NEUTRAL_RED] = new cpPointNeutralRedIcon().bitmapData;
action2icon[UserAction.CP_POINT_RED_NEUTRAL] = new cpPointRedNeutralIcon().bitmapData;
action2icon[UserAction.CTF_BLUE_PLAYER_BRINGBACK_BLUEFLAG] = new ctfBluePlayerBringbackBlueflagIcon().bitmapData;
action2icon[UserAction.CTF_BLUE_PLAYER_DELIVER_REDFLAG] = new ctfBluePlayerDeliverRedflagIcon().bitmapData;
action2icon[UserAction.CTF_BLUE_PLAYER_DROP_REDFLAG] = new ctfBluePlayerDropRedflagIcon().bitmapData;
action2icon[UserAction.CTF_BLUE_PLAYER_PICK_REDFLAG] = new ctfBluePlayerPickRedflagIcon().bitmapData;
action2icon[UserAction.CTF_RED_PLAYER_BRINGBACK_REDFLAG] = new ctfRedPlayerBringbackRedflagIcon().bitmapData;
action2icon[UserAction.CTF_RED_PLAYER_DELIVER_BLUEFLAG] = new ctfRedPlayerDeliverBlueflagIcon().bitmapData;
action2icon[UserAction.CTF_RED_PLAYER_DROP_BLUEFLAG] = new ctfRedPlayerDropBlueflagIcon().bitmapData;
action2icon[UserAction.CTF_RED_PLAYER_PICK_BLUEFLAG] = new ctfRedPlayerPickBlueflagIcon().bitmapData;
action2icon[UserAction.PLAYER_CHANGE_EQUIPMENT] = new playerChangeEquipmentIcon().bitmapData;
action2icon[UserAction.PLAYER_GOLD_BOX] = new playerGoldBoxIcon().bitmapData;
action2icon[UserAction.PLAYER_JOIN_THE_BATTLE] = new playerJoinTheBattleIcon().bitmapData;
action2icon[UserAction.PLAYER_LEAVE_THE_BATTLE] = new playerLeaveTheBattleIcon().bitmapData;
action2icon[UserAction.PLAYER_SELF_DESTROY] = new playerSelfDestroyIcon().bitmapData;
action2icon[UserAction.RGB_PLAYER_DELIVER_BALL] = new rgbPlayerDeliverBallIcon().bitmapData;
action2icon[UserAction.RGB_PLAYER_LOOSE_BALL] = new rgbPlayerLooseBallIcon().bitmapData;
action2icon[UserAction.RGB_PLAYER_PICK_BALL] = new rgbPlayerPickBallIcon().bitmapData;
action2icon[UserAction.RGB_PLAYER_THREW_BALL] = new rgbPlayerThrewBallIcon().bitmapData;
private var userLabel:BattleChatUserLabel;
private var label:Label;
public function ActionOutputLine() {
super();
}
public static function userAction(param1:ShortUserInfo, param2:UserAction, param3:ShortUserInfo) : ActionOutputLine {
var local4:ActionOutputLine = new ActionOutputLine();
local4.createUserLabel(param1);
local4.createActionIcon(param2,6);
if(param3 != null) {
local4.createUserLabel(param1);
}
return local4;
}
public static function simple(param1:UserAction) : ActionOutputLine {
var local2:ActionOutputLine = new ActionOutputLine();
local2.createActionIcon(param1,0);
return local2;
}
public static function pointAction(param1:String, param2:UserAction) : ActionOutputLine {
var local3:ActionOutputLine = new ActionOutputLine();
local3.createActionTextLabel(param1);
local3.createActionIcon(param2,6);
return local3;
}
private function createActionTextLabel(param1:String) : void {
this.label = new Label();
this.label.text = param1;
this.label.x = width + 4;
this.label.y = 5;
shadowContainer.addChild(this.label);
}
private function createUserLabel(param1:ShortUserInfo) : void {
this.userLabel = new BattleActionUserLabel(param1.userId);
this.userLabel.setUidColor(MessageColor.getUserNameColor(param1.teamType,false),true);
this.userLabel.x = width + 4;
this.userLabel.y = 5;
addChild(this.userLabel);
}
private function createActionIcon(param1:UserAction, param2:int) : void {
var local3:Bitmap = null;
local3 = new Bitmap(action2icon[param1]);
local3.x = width + param2;
shadowContainer.addChild(local3);
}
}
}
|
package {
import flash.display.MovieClip;
[Embed(source="/_assets/assets.swf", symbol="symbol1146")]
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
public function ScrollArrowUp_disabledSkin() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.artillery.rotation {
public interface IArtilleryRotatingTurretModelBase {
}
}
|
package projects.tanks.client.partners.impl.china.ifeng {
public interface IIfengModelBase {
}
}
|
package _codec.projects.tanks.client.panel.model.shop.kitpackage {
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 projects.tanks.client.panel.model.shop.kitpackage.KitPackageItemInfo;
public class CodecKitPackageItemInfo implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_count:ICodec;
private var codec_crystalPrice:ICodec;
private var codec_itemName:ICodec;
public function CodecKitPackageItemInfo() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_count = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_crystalPrice = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_itemName = param1.getCodec(new TypeCodecInfo(String,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:KitPackageItemInfo = new KitPackageItemInfo();
local2.count = this.codec_count.decode(param1) as int;
local2.crystalPrice = this.codec_crystalPrice.decode(param1) as int;
local2.itemName = this.codec_itemName.decode(param1) as String;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:KitPackageItemInfo = KitPackageItemInfo(param2);
this.codec_count.encode(param1,local3.count);
this.codec_crystalPrice.encode(param1,local3.crystalPrice);
this.codec_itemName.encode(param1,local3.itemName);
}
}
}
|
package projects.tanks.client.battlefield.models.battle.battlefield.billboard.billboardimage {
import platform.client.fp10.core.resource.types.TextureResource;
public class BillboardImageCC {
private var _image:TextureResource;
public function BillboardImageCC(param1:TextureResource = null) {
super();
this._image = param1;
}
public function get image() : TextureResource {
return this._image;
}
public function set image(param1:TextureResource) : void {
this._image = param1;
}
public function toString() : String {
var local1:String = "BillboardImageCC [";
local1 += "image = " + this.image + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.client.battlefield.models.bonus.battle.battlefield {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.battlefield.models.bonus.battle.BonusSpawnData;
public class BattlefieldBonusesModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:BattlefieldBonusesModelServer;
private var client:IBattlefieldBonusesModelBase = IBattlefieldBonusesModelBase(this);
private var modelId:Long = Long.getLong(499495185,-1001709329);
private var _attemptToTakeBonusFailedTankNotActiveId:Long = Long.getLong(1110230456,-1498226724);
private var _attemptToTakeBonusFailedTankNotActive_bonusIdCodec:ICodec;
private var _bonusTakenId:Long = Long.getLong(947041522,265172046);
private var _bonusTaken_bonusIdCodec:ICodec;
private var _removeBonusesId:Long = Long.getLong(1746264244,602761789);
private var _removeBonuses_bonusIdsCodec:ICodec;
private var _spawnBonusesId:Long = Long.getLong(325483057,2045730824);
private var _spawnBonuses_spawnDataCodec:ICodec;
private var _spawnBonusesOnGroundId:Long = Long.getLong(517408438,-497402786);
private var _spawnBonusesOnGround_spawnDataCodec:ICodec;
public function BattlefieldBonusesModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new BattlefieldBonusesModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(BattlefieldBonusesCC,false)));
this._attemptToTakeBonusFailedTankNotActive_bonusIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._bonusTaken_bonusIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._removeBonuses_bonusIdsCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Long,false),false,1));
this._spawnBonuses_spawnDataCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(BonusSpawnData,false),false,1));
this._spawnBonusesOnGround_spawnDataCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(BonusSpawnData,false),false,1));
}
protected function getInitParam() : BattlefieldBonusesCC {
return BattlefieldBonusesCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._attemptToTakeBonusFailedTankNotActiveId:
this.client.attemptToTakeBonusFailedTankNotActive(Long(this._attemptToTakeBonusFailedTankNotActive_bonusIdCodec.decode(param2)));
break;
case this._bonusTakenId:
this.client.bonusTaken(Long(this._bonusTaken_bonusIdCodec.decode(param2)));
break;
case this._removeBonusesId:
this.client.removeBonuses(this._removeBonuses_bonusIdsCodec.decode(param2) as Vector.<Long>);
break;
case this._spawnBonusesId:
this.client.spawnBonuses(this._spawnBonuses_spawnDataCodec.decode(param2) as Vector.<BonusSpawnData>);
break;
case this._spawnBonusesOnGroundId:
this.client.spawnBonusesOnGround(this._spawnBonusesOnGround_spawnDataCodec.decode(param2) as Vector.<BonusSpawnData>);
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.protocol.codec.complex {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.impl.LengthCodecHelper;
import flash.utils.ByteArray;
public class ByteArrayCodec implements ICodec {
public function ByteArrayCodec() {
super();
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local3:ByteArray = ByteArray(param2);
LengthCodecHelper.encodeLength(param1,local3.length);
param1.writer.writeBytes(local3);
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = LengthCodecHelper.decodeLength(param1);
var local3:ByteArray = new ByteArray();
if(local2 > 0) {
param1.reader.readBytes(local3,0,local2);
}
return local3;
}
public function init(param1:IProtocol) : void {
}
}
}
|
package alternativa.tanks.models.effects.common.bonuscommon
{
import alternativa.engine3d.core.Object3D;
import alternativa.math.Matrix3;
import alternativa.math.Vector3;
public class FallController
{
private static const MAX_ANGLE_X:Number = 0.3;
private static const ANGLE_X_FREQ:Number = 3.4;
private static const MAX_ANGLE_X_PARACHUTE:Number = 0.15;
private static const ANGLE_X_FREQ_PARACHUTE:Number = 1.3;
private static const m:Matrix3 = new Matrix3();
private static const v:Vector3 = new Vector3();
private const interpolatedMatrix:Matrix3 = new Matrix3();
private const interpolatedParachuteMatrix:Matrix3 = new Matrix3();
private const interpolatedVector:Vector3 = new Vector3();
private const interpolatedParachuteVector:Vector3 = new Vector3();
private const oldState:BattleBonusState = new BattleBonusState();
private const oldStateParachute:BattleBonusState = new BattleBonusState();
private const newState:BattleBonusState = new BattleBonusState();
private const newStateParachute:BattleBonusState = new BattleBonusState();
private const interpolatedState:BattleBonusState = new BattleBonusState();
private const interpolatedParachuteState:BattleBonusState = new BattleBonusState();
private var battleBonus:ParaBonus;
private var minPivotZ:Number;
private var time:Number;
private var fallSpeed:Number;
private var t0:Number;
private var x:Number = 0;
private var y:Number = 0;
public function FallController(battleBonus:ParaBonus)
{
super();
this.battleBonus = battleBonus;
}
public function init(spawnPosition:Vector3, fallSpeed:Number, minPivotZ:Number, t0:Number, startTime:Number, startingAngleZ:Number) : void
{
this.x = spawnPosition.x;
this.y = spawnPosition.y;
this.newState.pivotZ = spawnPosition.z + BonusConst.BONUS_OFFSET_Z - fallSpeed * startTime;
this.newState.angleZ = startingAngleZ + BonusConst.ANGULAR_SPEED_Z * startTime;
this.newStateParachute.pivotZ = spawnPosition.z + BonusConst.BONUS_OFFSET_Z - fallSpeed * startTime;
this.newStateParachute.angleZ = startingAngleZ + BonusConst.ANGULAR_SPEED_Z * startTime;
this.fallSpeed = fallSpeed;
this.minPivotZ = minPivotZ;
this.t0 = t0;
this.time = startTime;
}
public function start() : void
{
}
public function runBeforePhysicsUpdate(dt:Number) : void
{
dt *= 0.001;
this.oldState.copy(this.newState);
this.oldStateParachute.copy(this.newStateParachute);
this.time += dt;
this.newState.pivotZ -= this.fallSpeed * dt;
this.newState.angleX = MAX_ANGLE_X * Math.sin(ANGLE_X_FREQ * (this.t0 + this.time));
this.newState.angleZ += (BonusConst.ANGULAR_SPEED_Z + 0.2) * dt;
this.newStateParachute.pivotZ -= this.fallSpeed * dt;
this.newStateParachute.angleX = MAX_ANGLE_X_PARACHUTE * Math.sin(ANGLE_X_FREQ_PARACHUTE * (this.t0 + this.time));
this.newStateParachute.angleZ += BonusConst.ANGULAR_SPEED_Z * dt;
if(this.newState.pivotZ <= this.minPivotZ)
{
this.newState.pivotZ = this.minPivotZ;
this.newState.angleX = 0;
this.newStateParachute.pivotZ = this.minPivotZ;
this.newStateParachute.angleX = 0;
this.interpolatePhysicsState(1);
this.render();
this.battleBonus.onStaticCollision();
}
this.updateTrigger();
}
private function updateTrigger() : void
{
m.setRotationMatrix(this.newState.angleX,0,this.newState.angleZ);
m.transformVector(Vector3.DOWN,v);
v.scale(BonusConst.BONUS_OFFSET_Z);
this.battleBonus.trigger.update(this.x + v.x,this.y + v.y,this.newState.pivotZ + v.z,this.newState.angleX,0,this.newState.angleZ);
}
public function interpolatePhysicsState(interpolationCoeff:Number) : void
{
this.interpolatedParachuteState.interpolate(this.oldStateParachute,this.newStateParachute,interpolationCoeff);
this.interpolatedParachuteMatrix.setRotationMatrix(this.interpolatedParachuteState.angleX,0,this.interpolatedParachuteState.angleZ);
this.interpolatedParachuteMatrix.transformVector(Vector3.DOWN,this.interpolatedParachuteVector);
this.interpolatedState.interpolate(this.oldState,this.newState,interpolationCoeff);
this.interpolatedMatrix.setRotationMatrix(this.interpolatedState.angleX,0,this.interpolatedState.angleZ);
this.interpolatedMatrix.transformVector(Vector3.DOWN,this.interpolatedVector);
}
public function render() : void
{
this.setObjectTransform(this.battleBonus.parachute,BonusConst.PARACHUTE_OFFSET_Z,this.interpolatedParachuteVector);
this.setObjectTransform(this.battleBonus.skin,BonusConst.BONUS_OFFSET_Z,this.interpolatedVector);
this.battleBonus.cordsMesh.updateVertices();
}
private function setObjectTransform(object:Object3D, objectOffset:Number, offsetVector:Vector3) : void
{
if(object != this.battleBonus.parachute)
{
object.rotationX = this.interpolatedState.angleX;
object.rotationZ = this.interpolatedState.angleZ;
object.x = this.x + 50 * offsetVector.x;
object.y = this.y + 50 * offsetVector.y;
object.z = this.interpolatedState.pivotZ + objectOffset * offsetVector.z;
}
else
{
object.rotationX = this.interpolatedParachuteState.angleX;
object.rotationZ = this.interpolatedParachuteState.angleZ;
object.x = this.x + objectOffset * offsetVector.x;
object.y = this.y + objectOffset * offsetVector.y;
object.z = this.interpolatedParachuteState.pivotZ + objectOffset * offsetVector.z;
}
}
}
}
|
package assets.windowinner.bitmaps {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.windowinner.bitmaps.WindowInnerTop.png")]
public class WindowInnerTop extends BitmapData {
public function WindowInnerTop(param1:int, param2:int, param3:Boolean = true, param4:uint = 0) {
super(param1,param2,param3,param4);
}
}
}
|
package com.alternativaplatform.projects.tanks.client.models.ctf
{
public class FlagsState
{
public var blueFlag:ClientFlag;
public var redFlag:ClientFlag;
public function FlagsState()
{
super();
}
}
}
|
package alternativa.tanks.models.sfx.shoot.thunder
{
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.object.ClientObject;
import alternativa.tanks.sfx.EffectsPair;
public interface IThunderSFXModel
{
function createShotEffects(param1:ClientObject, param2:Vector3, param3:Object3D) : EffectsPair;
function createExplosionEffects(param1:ClientObject, param2:Vector3) : EffectsPair;
}
}
|
package _codec.projects.tanks.client.panel.model.battlepass.purchasenotifier {
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.battlepass.purchasenotifier.BattlePassPurchaseNotifierCC;
public class VectorCodecBattlePassPurchaseNotifierCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecBattlePassPurchaseNotifierCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(BattlePassPurchaseNotifierCC,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.<BattlePassPurchaseNotifierCC> = new Vector.<BattlePassPurchaseNotifierCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = BattlePassPurchaseNotifierCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:BattlePassPurchaseNotifierCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<BattlePassPurchaseNotifierCC> = Vector.<BattlePassPurchaseNotifierCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.