code
stringlengths 57
237k
|
|---|
package forms.userlabel {
import flash.events.Event;
public class UserLabelClickWithCtrlEvent extends Event {
public static const USER_LABEL_CLICK_WITH_CTRL_EVENT:String = "UserLabelClickWithCtrlEvent.USER_LABEL_CLICK_WITH_CTRL_EVENT";
public var uid:String;
public var shiftPressed:Boolean;
public function UserLabelClickWithCtrlEvent(param1:String, param2:String, param3:Boolean) {
this.uid = param2;
this.shiftPressed = param3;
super(param1,true);
}
}
}
|
package _codec.projects.tanks.client.entrance.model.entrance.telegram {
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.entrance.model.entrance.telegram.TelegramEntranceModelCC;
public class VectorCodecTelegramEntranceModelCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTelegramEntranceModelCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(TelegramEntranceModelCC,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.<TelegramEntranceModelCC> = new Vector.<TelegramEntranceModelCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TelegramEntranceModelCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TelegramEntranceModelCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TelegramEntranceModelCC> = Vector.<TelegramEntranceModelCC>(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.services.battleinput {
import alternativa.tanks.service.settings.keybinding.GameActionEnum;
public interface GameActionListener {
function onGameAction(param1:GameActionEnum, param2:Boolean) : void;
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.tank.commands {
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.Byte;
import projects.tanks.client.battlefield.models.user.tank.commands.MoveCommand;
import projects.tanks.client.battlefield.types.Vector3d;
public class CodecMoveCommand implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_angularVelocity:ICodec;
private var codec_control:ICodec;
private var codec_linearVelocity:ICodec;
private var codec_orientation:ICodec;
private var codec_position:ICodec;
private var codec_turnSpeedNumber:ICodec;
public function CodecMoveCommand() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_angularVelocity = param1.getCodec(new TypeCodecInfo(Vector3d,false));
this.codec_control = param1.getCodec(new TypeCodecInfo(Byte,false));
this.codec_linearVelocity = param1.getCodec(new TypeCodecInfo(Vector3d,false));
this.codec_orientation = param1.getCodec(new TypeCodecInfo(Vector3d,false));
this.codec_position = param1.getCodec(new TypeCodecInfo(Vector3d,false));
this.codec_turnSpeedNumber = param1.getCodec(new TypeCodecInfo(Byte,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:MoveCommand = new MoveCommand();
local2.angularVelocity = this.codec_angularVelocity.decode(param1) as Vector3d;
local2.control = this.codec_control.decode(param1) as int;
local2.linearVelocity = this.codec_linearVelocity.decode(param1) as Vector3d;
local2.orientation = this.codec_orientation.decode(param1) as Vector3d;
local2.position = this.codec_position.decode(param1) as Vector3d;
local2.turnSpeedNumber = this.codec_turnSpeedNumber.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:MoveCommand = MoveCommand(param2);
this.codec_angularVelocity.encode(param1,local3.angularVelocity);
this.codec_control.encode(param1,local3.control);
this.codec_linearVelocity.encode(param1,local3.linearVelocity);
this.codec_orientation.encode(param1,local3.orientation);
this.codec_position.encode(param1,local3.position);
this.codec_turnSpeedNumber.encode(param1,local3.turnSpeedNumber);
}
}
}
|
package alternativa.tanks.gui.clanchat {
import fl.containers.ScrollPane;
import fl.controls.ScrollPolicy;
import flash.display.Sprite;
import flash.utils.setTimeout;
import forms.userlabel.ChatUpdateEvent;
import projects.tanks.client.chat.models.chat.chat.ChatAddressMode;
import projects.tanks.client.chat.types.MessageType;
import projects.tanks.client.chat.types.UserStatus;
public class ChatOutput extends ScrollPane {
private static const MAX_MESSAGES:int = 80;
public var wasScrolled:Boolean;
public var deltaWidth:int = 9;
public var selfUid:String;
private var container:Sprite = new Sprite();
private var lineWidth:Number;
private var _showIPMode:Boolean = false;
private var updateIntervalId:uint = 0;
public function ChatOutput() {
super();
this.source = this.container;
this.horizontalScrollPolicy = ScrollPolicy.OFF;
this.focusEnabled = false;
this.container.addEventListener(ChatUpdateEvent.UPDATE,this.onUpdateEvent);
}
public function addLine(param1:UserStatus, param2:UserStatus, param3:ChatAddressMode, param4:String, param5:Date, param6:MessageType = null, param7:Boolean = false, param8:Boolean = true) : void {
var local9:Boolean = false;
if(param8) {
local9 = verticalScrollPosition + 5 > maxVerticalScrollPosition || !this.wasScrolled;
}
if(this.container.numChildren > MAX_MESSAGES) {
this.shiftMessages();
}
var local10:ChatOutputLine = new ChatOutputLine(this.lineWidth,param1,param2,param3,param4,param5,param6,param7,this.selfUid);
local10.showIP = this._showIPMode;
local10.self = local10.userNameTo == this.selfUid;
local10.y = int(this.container.height + 0.5);
this.container.addChild(local10);
update();
if(local9) {
this.scrollDown();
}
}
public function scrollDown() : void {
verticalScrollPosition = maxVerticalScrollPosition;
}
public function highlightUids(param1:String) : void {
var local2:int = 0;
while(local2 < this.container.numChildren) {
this.highlightLine(this.container.getChildAt(local2) as ChatOutputLine,param1);
local2++;
}
}
public function highlightUidsInLastMessage(param1:String) : void {
if(this.container.numChildren > 0) {
this.highlightLine(this.container.getChildAt(this.container.numChildren - 1) as ChatOutputLine,param1);
}
}
private function highlightLine(param1:ChatOutputLine, param2:String) : void {
param1.light = param1.userName == param2 || param1.addressMode == ChatAddressMode.PUBLIC_ADDRESSED && param1.userNameTo == this.selfUid;
param1.self = param1.userNameTo == this.selfUid && param1.addressMode == ChatAddressMode.PRIVATE;
}
private function shiftMessages() : void {
var local1:ChatOutputLine = this.container.getChildAt(0) as ChatOutputLine;
var local2:Number = local1.height + local1.y;
this.container.removeChild(local1);
var local3:int = 0;
while(local3 < this.container.numChildren) {
this.container.getChildAt(local3).y = this.container.getChildAt(local3).y - local2;
local3++;
}
}
override public function setSize(param1:Number, param2:Number) : void {
super.setSize(param1,param2);
this.lineWidth = param1 - this.deltaWidth;
this.updateLines();
}
private function onUpdateEvent(param1:ChatUpdateEvent) : void {
if(this.updateIntervalId == 0) {
this.updateIntervalId = setTimeout(this.updateLines,500);
}
}
private function updateLines() : void {
var local2:ChatOutputLine = null;
var local3:ChatOutputLine = null;
this.updateIntervalId = 0;
if(this.container.numChildren == 0) {
return;
}
var local1:Vector.<ChatOutputLine> = new Vector.<ChatOutputLine>();
while(this.container.numChildren > 0) {
local3 = this.container.getChildAt(0) as ChatOutputLine;
local3.showIP = this._showIPMode;
local3.width = this.lineWidth;
local1.push(local3);
this.container.removeChildAt(0);
}
for each(local2 in local1) {
local2.y = int(this.container.height + 0.5);
this.container.addChild(local2);
}
update();
}
public function cleanOutUsersMessages(param1:String) : void {
var local4:ChatOutputLine = null;
var local2:Vector.<ChatOutputLine> = new Vector.<ChatOutputLine>();
var local3:int = 0;
while(local3 < this.container.numChildren) {
local4 = this.container.getChildAt(local3) as ChatOutputLine;
if(local4.userName == param1) {
local2.push(local4);
}
local3++;
}
local3 = 0;
while(local3 < local2.length) {
this.container.removeChild(local2[local3]);
local3++;
}
this.updateLines();
}
public function set showIPMode(param1:Boolean) : void {
this._showIPMode = param1;
this.updateLines();
}
}
}
|
package alternativa.tanks.models.controlpoints.hud.marker {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.controlpoints.hud.marker.MarkerBitmaps_grayMarkerClass.png")]
public class MarkerBitmaps_grayMarkerClass extends BitmapAsset {
public function MarkerBitmaps_grayMarkerClass() {
super();
}
}
}
|
package alternativa.tanks.gui {
import flash.events.Event;
public class EnterEmailReminderWindowEvent extends Event {
public static const EMAIL_SAVING_AND_CONFIRMATION:String = "SAVE_EMAIL";
public static const EMAIL_CONFIRMATION:String = "EMAIL_CONFIRMATION";
public static const WINDOW_CLOSING:String = "WINDOW_CLOSING";
private var _email:String;
public function EnterEmailReminderWindowEvent(param1:String, param2:String = null) {
this._email = param2;
super(param1,true);
}
public function get email() : String {
return this._email;
}
}
}
|
package alternativa.tanks.models.weapon.railgun
{
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.init.Main;
import alternativa.math.Vector3;
import alternativa.model.IModel;
import alternativa.model.IObjectLoadListener;
import alternativa.object.ClientObject;
import alternativa.service.IModelService;
import alternativa.tanks.models.battlefield.BattlefieldData;
import alternativa.tanks.models.battlefield.BattlefieldModel;
import alternativa.tanks.models.battlefield.IBattleField;
import alternativa.tanks.models.ctf.ICTFModel;
import alternativa.tanks.models.sfx.shoot.railgun.IRailgunSFXModel;
import alternativa.tanks.models.tank.ITank;
import alternativa.tanks.models.tank.TankData;
import alternativa.tanks.models.weapon.IWeaponController;
import alternativa.tanks.models.weapon.WeaponConst;
import alternativa.tanks.models.weapon.WeaponUtils;
import alternativa.tanks.models.weapon.common.IWeaponCommonModel;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.models.weapon.shared.shot.ShotData;
import alternativa.tanks.sfx.IGraphicEffect;
import alternativa.tanks.sfx.ISound3DEffect;
import com.alternativaplatform.projects.tanks.client.commons.types.Vector3d;
import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.railgun.IRailgunModelBase;
import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.railgun.RailgunModelBase;
import com.reygazu.anticheat.variables.SecureInt;
import scpacker.networking.INetworker;
import scpacker.networking.Network;
import scpacker.tanks.WeaponsManager;
public class RailgunModel extends RailgunModelBase implements IModel, IRailgunModelBase, IWeaponController, IObjectLoadListener
{
private static const DECAL_RADIUS:Number = 50;
[Embed(source="779.png")]
private static const DECAL:Class;
private static var decalMaterial:TextureMaterial;
private const INFINITY:Number = 20000;
private var modelService:IModelService;
private var battlefieldModel:BattlefieldModel;
private var tankModel:ITank;
private var commonModel:IWeaponCommonModel;
private var localTankData:TankData;
private var localShotData:ShotData;
private var localRailgunData:RailgunData;
private var localWeaponCommonData:WeaponCommonData;
private var weaponUtils:WeaponUtils;
private var _triggerPressed:Boolean;
private var chargeTimeLeft:SecureInt;
private var nextReadyTime:SecureInt;
private var targetSystem:RailgunTargetSystem;
private var shotResult:RailgunShotResult;
private var _globalHitPosition:Vector3;
private var _xAxis:Vector3;
private var _globalMuzzlePosition:Vector3;
private var _globalGunDirection:Vector3;
private var _barrelOrigin:Vector3;
private var _hitPos3d:Vector3d;
private var targetPositions:Array;
private var targetIncarnations:Array;
private var firstshot = true;
public function RailgunModel()
{
this.weaponUtils = WeaponUtils.getInstance();
this.chargeTimeLeft = new SecureInt("chargeTimeLeft.value railgun");
this.nextReadyTime = new SecureInt("chargeTimeLeft.value railgun");
this.targetSystem = new RailgunTargetSystem();
this.shotResult = new RailgunShotResult();
this._globalHitPosition = new Vector3();
this._xAxis = new Vector3();
this._globalMuzzlePosition = new Vector3();
this._globalGunDirection = new Vector3();
this._barrelOrigin = new Vector3();
this._hitPos3d = new Vector3d(0,0,0);
this.targetPositions = [];
this.targetIncarnations = [];
super();
_interfaces.push(IModel,IRailgunModelBase,IWeaponController,IObjectLoadListener);
this.objectLoaded(null);
if(decalMaterial == null)
{
decalMaterial = new TextureMaterial(new DECAL().bitmapData);
}
}
public function objectLoaded(clientObject:ClientObject) : void
{
if(this.commonModel == null)
{
this.modelService = Main.osgi.getService(IModelService) as IModelService;
this.battlefieldModel = Main.osgi.getService(IBattleField) as BattlefieldModel;
this.tankModel = Main.osgi.getService(ITank) as ITank;
this.commonModel = Main.osgi.getService(IWeaponCommonModel) as IWeaponCommonModel;
}
}
public function objectUnloaded(clientObject:ClientObject) : void
{
}
public function initObject(clientObject:ClientObject, chargingTimeMsec:int, weakeningCoeff:Number) : void
{
var railgunData:RailgunData = new RailgunData();
railgunData.chargingTime = chargingTimeMsec;
railgunData.weakeningCoeff = weakeningCoeff;
clientObject.putParams(RailgunModel,railgunData);
this.battlefieldModel.blacklist.push(decalMaterial.getTextureResource());
this.objectLoaded(clientObject);
}
public function startFire(clientObject:ClientObject, firingTankId:String) : void
{
var firingTank:ClientObject = clientObject;
if(firingTank == null)
{
return;
}
if(this.tankModel == null)
{
this.tankModel = Main.osgi.getService(ITank) as ITank;
}
var firingTankData:TankData = this.tankModel.getTankData(firingTank);
if(firingTankData.tank == null || !firingTankData.enabled || firingTankData.local)
{
return;
}
if(this.commonModel == null)
{
this.commonModel = Main.osgi.getService(IWeaponCommonModel) as IWeaponCommonModel;
}
var commonData:WeaponCommonData = this.commonModel.getCommonData(firingTankData.turret);
this.weaponUtils.calculateGunParamsAux(firingTankData.tank.skin.turretMesh,commonData.muzzles[0],this._globalMuzzlePosition,this._globalGunDirection);
var railgunSfxModel:IRailgunSFXModel = WeaponsManager.getRailgunSFX(firingTankData.turret);
var railgunData:RailgunData = this.getRailgunData(firingTankData.turret);
var graphicEffect:IGraphicEffect = railgunSfxModel.createChargeEffect(firingTankData.turret,firingTankData.user,commonData.muzzles[commonData.currBarrel],firingTankData.tank.skin.turretMesh,railgunData.chargingTime);
if(this.battlefieldModel == null)
{
this.battlefieldModel = Main.osgi.getService(IBattleField) as BattlefieldModel;
}
if(this.firstshot)
{
this.firstshot = false;
this.battlefieldModel.addGraphicEffect(graphicEffect);
graphicEffect = railgunSfxModel.createChargeEffect(firingTankData.turret,firingTankData.user,commonData.muzzles[commonData.currBarrel],firingTankData.tank.skin.turretMesh,railgunData.chargingTime);
}
this.battlefieldModel.addGraphicEffect(graphicEffect);
var soundEffect:ISound3DEffect = railgunSfxModel.createSoundShotEffect(firingTankData.turret,firingTankData.user,this._globalMuzzlePosition);
if(soundEffect != null)
{
this.battlefieldModel.addSound3DEffect(soundEffect);
}
}
public function fire(clientObject:ClientObject, firingTankId:String, affectedPoints:Array, affectedTankIds:Array) : void
{
var firingTankData:TankData = null;
var commonData:WeaponCommonData = null;
var railGunData:RailgunData = null;
var v:Vector3d = null;
var graphicEffect:IGraphicEffect = null;
var i:int = 0;
var affectedTankObject:ClientObject = null;
var affectedTankData:TankData = null;
var firingTank:ClientObject = clientObject;
if(firingTank == null)
{
return;
}
firingTankData = this.tankModel.getTankData(firingTank);
if(firingTankData == null || firingTankData.tank == null || !firingTankData.enabled || firingTankData.local)
{
return;
}
if(this.commonModel == null)
{
this.commonModel = Main.osgi.getService(IWeaponCommonModel) as IWeaponCommonModel;
}
if(this.battlefieldModel == null)
{
this.battlefieldModel = Main.osgi.getService(IBattleField) as BattlefieldModel;
}
commonData = this.commonModel.getCommonData(firingTankData.turret);
railGunData = this.getRailgunData(firingTankData.turret);
this.weaponUtils.calculateGunParamsAux(firingTankData.tank.skin.turretMesh,commonData.muzzles[0],this._globalMuzzlePosition,this._globalGunDirection);
var numPoints:int = affectedPoints.length;
var impactForce:Number = commonData.impactForce;
if(affectedTankIds != null)
{
for(i = 0; i < numPoints - 1; i++)
{
affectedTankObject = BattleController.activeTanks[affectedTankIds[i]];
if(affectedTankObject != null)
{
affectedTankData = this.tankModel.getTankData(affectedTankObject);
if(!(affectedTankData == null || affectedTankData.tank == null))
{
v = affectedPoints[i];
this._globalHitPosition.x = v.x;
this._globalHitPosition.y = v.y;
this._globalHitPosition.z = v.z;
this._globalHitPosition.vTransformBy3(affectedTankData.tank.baseMatrix);
this._globalHitPosition.vAdd(affectedTankData.tank.state.pos);
affectedTankData.tank.addWorldForceScaled(this._globalHitPosition,this._globalGunDirection,impactForce);
this.battlefieldModel.tankHit(affectedTankData,this._globalGunDirection,impactForce / WeaponConst.BASE_IMPACT_FORCE);
impactForce *= railGunData.weakeningCoeff;
}
}
}
}
v = affectedPoints[numPoints - 1];
this._globalHitPosition.x = v.x;
this._globalHitPosition.y = v.y;
this._globalHitPosition.z = v.z;
this.battlefieldModel.addDecal(this._globalHitPosition,this._globalMuzzlePosition,DECAL_RADIUS,decalMaterial);
firingTankData.tank.addWorldForceScaled(this._globalMuzzlePosition,this._globalGunDirection,-commonData.kickback);
var railgunSfxModel:IRailgunSFXModel = WeaponsManager.getRailgunSFX(firingTankData.turret);
var angle:Number = this._globalHitPosition.vClone().vRemove(this._globalMuzzlePosition).vNormalize().vCosAngle(this._globalGunDirection);
if(angle < 0)
{
trace("Adding inversed ray");
graphicEffect = railgunSfxModel.createGraphicShotEffect(firingTankData.turret,this._globalMuzzlePosition,this._globalMuzzlePosition.vClone().vScale(2).vRemove(this._globalHitPosition));
}
else
{
graphicEffect = railgunSfxModel.createGraphicShotEffect(firingTankData.turret,this._globalMuzzlePosition,this._globalHitPosition);
}
if(graphicEffect != null)
{
this.battlefieldModel.addGraphicEffect(graphicEffect);
}
}
public function activateWeapon(time:int) : void
{
this._triggerPressed = true;
}
public function deactivateWeapon(time:int, sendServerCommand:Boolean) : void
{
this._triggerPressed = false;
}
public function setLocalUser(localUserData:TankData) : void
{
this.localTankData = localUserData;
this.localShotData = WeaponsManager.shotDatas[localUserData.turret.id];
this.localRailgunData = this.getRailgunData(localUserData.turret);
this.localWeaponCommonData = this.commonModel.getCommonData(localUserData.turret);
this.battlefieldModel = Main.osgi.getService(IBattleField) as BattlefieldModel;
this.targetSystem.setParams(this.battlefieldModel.getBattlefieldData().physicsScene.collisionDetector,this.localShotData.autoAimingAngleUp.value,this.localShotData.numRaysUp.value,this.localShotData.autoAimingAngleDown.value,this.localShotData.numRaysDown.value,this.localRailgunData.weakeningCoeff,null);
this.reset();
var muzzleLocalPos:Vector3 = this.localWeaponCommonData.muzzles[0];
var railgunSfxModel:IRailgunSFXModel = WeaponsManager.getRailgunSFX(this.localTankData.turret);
var graphicEffect:IGraphicEffect = railgunSfxModel.createChargeEffect(this.localTankData.turret,this.localTankData.user,muzzleLocalPos,this.localTankData.tank.skin.turretMesh,this.localRailgunData.chargingTime);
if(graphicEffect != null)
{
this.battlefieldModel.addGraphicEffect(graphicEffect);
}
}
public function clearLocalUser() : void
{
this.localTankData = null;
this.localShotData = null;
this.localRailgunData = null;
this.localWeaponCommonData = null;
}
public function update(time:int, deltaTime:int) : Number
{
var muzzleLocalPos:Vector3 = null;
var railgunSfxModel:IRailgunSFXModel = null;
var graphicEffect:IGraphicEffect = null;
var soundEffect:ISound3DEffect = null;
if(this.chargeTimeLeft.value > 0)
{
this.chargeTimeLeft.value -= deltaTime;
if(this.chargeTimeLeft.value <= 0)
{
this.chargeTimeLeft.value = 0;
this.doFire(this.localWeaponCommonData,this.localTankData,time);
}
return this.chargeTimeLeft.value / this.localRailgunData.chargingTime;
}
if(time < this.nextReadyTime.value)
{
return 1 - (this.nextReadyTime.value - time) / this.localShotData.reloadMsec.value;
}
if(this._triggerPressed)
{
this.chargeTimeLeft.value = this.localRailgunData.chargingTime;
muzzleLocalPos = this.localWeaponCommonData.muzzles[0];
this.weaponUtils.calculateGunParams(this.localTankData.tank.skin.turretMesh,muzzleLocalPos,this._globalMuzzlePosition,this._barrelOrigin,this._xAxis,this._globalGunDirection);
railgunSfxModel = WeaponsManager.getRailgunSFX(this.localTankData.turret);
graphicEffect = railgunSfxModel.createChargeEffect(this.localTankData.turret,this.localTankData.user,muzzleLocalPos,this.localTankData.tank.skin.turretMesh,this.localRailgunData.chargingTime);
if(graphicEffect != null)
{
this.battlefieldModel.addGraphicEffect(graphicEffect);
}
soundEffect = railgunSfxModel.createSoundShotEffect(this.localTankData.turret,this.localTankData.user,this._globalMuzzlePosition);
if(soundEffect != null)
{
this.battlefieldModel.addSound3DEffect(soundEffect);
}
this.startFireCommand(this.localTankData.turret);
}
return 1;
}
private function startFireCommand(turr:ClientObject) : void
{
Network(Main.osgi.getService(INetworker)).send("battle;start_fire");
}
public function reset() : void
{
this.chargeTimeLeft.value = 0;
this.nextReadyTime.value = 0;
this._triggerPressed = false;
}
public function stopEffects(ownerTankData:TankData) : void
{
}
private function getRailgunData(clientObject:ClientObject) : RailgunData
{
return clientObject.getParams(RailgunModel) as RailgunData;
}
private function doFire(commonData:WeaponCommonData, tankData:TankData, time:int) : void
{
var graphicEffect:IGraphicEffect = null;
var len:int = 0;
var i:int = 0;
var currHitPoint:Vector3 = null;
var currTankData:TankData = null;
var v:Vector3 = null;
this.nextReadyTime.value = time + this.localShotData.reloadMsec.value;
this.weaponUtils.calculateGunParams(tankData.tank.skin.turretMesh,commonData.muzzles[commonData.currBarrel],this._globalMuzzlePosition,this._barrelOrigin,this._xAxis,this._globalGunDirection);
var bfData:BattlefieldData = this.battlefieldModel.getBattlefieldData();
this.targetSystem.getTargets(tankData,this._barrelOrigin,this._globalGunDirection,this._xAxis,bfData.tanks,this.shotResult);
if(this.shotResult.hitPoints.length == 0)
{
this._globalHitPosition.x = this._hitPos3d.x = this._globalMuzzlePosition.x + this.INFINITY * this._globalGunDirection.x;
this._globalHitPosition.y = this._hitPos3d.y = this._globalMuzzlePosition.y + this.INFINITY * this._globalGunDirection.y;
this._globalHitPosition.z = this._hitPos3d.z = this._globalMuzzlePosition.z + this.INFINITY * this._globalGunDirection.z;
this.fireCommand(tankData.turret,null,[this._hitPos3d],null,null);
}
else
{
this._globalHitPosition.vCopy(this.shotResult.hitPoints[this.shotResult.hitPoints.length - 1]);
if(this.shotResult.hitPoints.length == this.shotResult.targets.length)
{
this._globalHitPosition.vSubtract(this._globalMuzzlePosition).vNormalize().vScale(this.INFINITY).vAdd(this._globalMuzzlePosition);
this.shotResult.hitPoints.push(this._globalHitPosition);
}
this.shotResult.hitPoints[this.shotResult.hitPoints.length - 1] = new Vector3d(this._globalHitPosition.x,this._globalHitPosition.y,this._globalHitPosition.z);
this.targetPositions.length = 0;
this.targetIncarnations.length = 0;
len = this.shotResult.targets.length;
for(i = 0; i < len; i++)
{
currHitPoint = this.shotResult.hitPoints[i];
currTankData = this.shotResult.targets[i];
currTankData.tank.addWorldForceScaled(currHitPoint,this.shotResult.dir,commonData.impactForce);
this.shotResult.targets[i] = currTankData.user.id;
currHitPoint.vSubtract(currTankData.tank.state.pos).vTransformBy3Tr(currTankData.tank.baseMatrix);
this.shotResult.hitPoints[i] = new Vector3d(currHitPoint.x,currHitPoint.y,currHitPoint.z);
v = currTankData.tank.state.pos;
this.targetPositions[i] = new Vector3d(v.x,v.y,v.z);
this.targetIncarnations[i] = currTankData.incarnation;
}
if(len == 0)
{
this.battlefieldModel.addDecal(Vector3d(this.shotResult.hitPoints[0]).toVector3(),this._barrelOrigin,DECAL_RADIUS,decalMaterial);
}
else
{
this.battlefieldModel.addDecal(this._globalHitPosition,this._barrelOrigin,DECAL_RADIUS,decalMaterial);
}
this.fireCommand(tankData.turret,this.targetIncarnations,this.shotResult.hitPoints,this.shotResult.targets,this.targetPositions);
}
tankData.tank.addWorldForceScaled(this._globalMuzzlePosition,this._globalGunDirection,-commonData.kickback);
var railgunSfxModel:IRailgunSFXModel = WeaponsManager.getRailgunSFX(tankData.turret);
var angle:Number = this._globalHitPosition.vClone().vRemove(this._globalMuzzlePosition).vNormalize().vCosAngle(this._globalGunDirection);
if(angle < 0)
{
graphicEffect = railgunSfxModel.createGraphicShotEffect(tankData.turret,this._globalMuzzlePosition,this._globalMuzzlePosition.vClone().vScale(2).vRemove(this._globalHitPosition));
}
else
{
graphicEffect = railgunSfxModel.createGraphicShotEffect(tankData.turret,this._globalMuzzlePosition,this._globalHitPosition);
}
if(graphicEffect != null)
{
this.battlefieldModel.addGraphicEffect(graphicEffect);
}
}
public function fireCommand(turret:ClientObject, targetInc:Array, hitPoints:Array, targets:Array, targetPostitions:Array) : void
{
var firstHitPoints:Vector3d = hitPoints[0] as Vector3d;
var jsobject:Object = new Object();
jsobject.hitPoints = hitPoints;
jsobject.targetInc = targetInc;
jsobject.targets = targets;
jsobject.targetPostitions = targetPostitions;
jsobject.reloadTime = this.localShotData.reloadMsec.value;
trace(JSON.stringify(jsobject));
Network(Main.osgi.getService(INetworker)).send("battle;fire;" + JSON.stringify(jsobject));
}
}
}
|
package scpacker
{
import alternativa.network.ICommandHandler;
import alternativa.network.ICommandSender;
public class SocketListener implements ICommandHandler
{
public function SocketListener()
{
super();
}
public function open() : void
{
}
public function close() : void
{
}
public function disconnect(errorMessage:String) : void
{
}
public function executeCommand(command:Object) : void
{
}
public function get commandSender() : ICommandSender
{
return null;
}
public function set commandSender(commandSender:ICommandSender) : void
{
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.model.serverrestarttime {
import alternativa.osgi.OSGi;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.tanksservices.model.clientrestarttime.IOnceADayActionModelBase;
import projects.tanks.client.tanksservices.model.clientrestarttime.OnceADayActionModelBase;
import projects.tanks.clients.fp10.libraries.tanksservices.service.storage.IStorageService;
[ModelInfo]
public class OnceADayActionModel extends OnceADayActionModelBase implements IOnceADayActionModelBase, ObjectLoadListener, ObjectUnloadListener, OnceADayActionService {
[Inject]
public static var storageService:IStorageService;
private static var ONCE_A_DAY_ACTIONS:String = "ONCE_A_DAY_ACTIONS";
private var todayRestartTime:Number;
public function OnceADayActionModel() {
super();
}
public function objectLoaded() : void {
OSGi.getInstance().registerService(OnceADayActionService,this);
this.init();
}
public function init() : void {
this.todayRestartTime = getInitParam().todayRestartTime * 1000;
}
public function verifyAndSaveAction(param1:String) : Boolean {
var local2:Object = storageService.getStorage().data[ONCE_A_DAY_ACTIONS];
if(local2 == null) {
local2 = {};
}
var local3:Number = !!local2.hasOwnProperty(param1) ? Number(local2[param1]) : 0;
if(local3 < this.todayRestartTime) {
local2[param1] = new Date().time;
storageService.getStorage().data[ONCE_A_DAY_ACTIONS] = local2;
return true;
}
return false;
}
public function objectUnloaded() : void {
OSGi.getInstance().unregisterService(OnceADayActionService);
}
}
}
|
package alternativa.osgi.service.mainContainer
{
import flash.display.DisplayObjectContainer;
import flash.display.Stage;
public interface IMainContainerService
{
function get stage() : Stage;
function get mainContainer() : DisplayObjectContainer;
function get backgroundLayer() : DisplayObjectContainer;
function get contentLayer() : DisplayObjectContainer;
function get contentUILayer() : DisplayObjectContainer;
function get systemLayer() : DisplayObjectContainer;
function get systemUILayer() : DisplayObjectContainer;
function get dialogsLayer() : DisplayObjectContainer;
function get noticesLayer() : DisplayObjectContainer;
function get cursorLayer() : DisplayObjectContainer;
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.rocketlauncher.radio {
public interface IRocketLauncherRadioExplosionModelBase {
function shellDestroyed(param1:int) : void;
}
}
|
package alternativa.tanks.model.payment.modes.asyncurl {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.WaitUrlForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.PayUrl;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.payment.modes.asyncurl.AsyncUrlModelBase;
import projects.tanks.client.panel.model.payment.modes.asyncurl.IAsyncUrlModelBase;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
import projects.tanks.clients.fp10.libraries.tanksservices.model.payment.PayModeProceed;
[ModelInfo]
public class AsyncUrlPayModel extends AsyncUrlModelBase implements IAsyncUrlModelBase, AsyncUrlPayMode, ObjectLoadListener, PayModeView, PayModeProceed, ObjectUnloadListener {
[Inject]
public static var paymentWindowService:PaymentWindowService;
public function AsyncUrlPayModel() {
super();
}
public function proceedPayment() : void {
PayUrl(object.adapt(PayUrl)).forceGoToUrl(PaymentRequestUrl(getData(PaymentRequestUrl)));
clearData(PaymentRequestUrl);
}
public function requestAsyncUrl() : void {
server.getUrl(paymentWindowService.getChosenItem());
}
public function receiveUrl(param1:PaymentRequestUrl) : void {
putData(PaymentRequestUrl,param1);
WaitUrlForm(this.getView()).onPaymentUrlReceived();
}
public function objectLoaded() : void {
putData(PayModeForm,new WaitUrlForm(object));
}
public function getView() : PayModeForm {
return PayModeForm(getData(PayModeForm));
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(PayModeForm);
}
public function showErrorUrlReceived() : void {
WaitUrlForm(this.getView()).onErrorUrlReceived();
}
}
}
|
package alternativa.tanks.models.weapon.terminator {
import alternativa.math.Vector3;
import alternativa.physics.Body;
[ModelInterface]
public interface Terminator {
function primaryCharge(param1:int, param2:int) : void;
function primaryShot(param1:int, param2:Vector3, param3:Vector.<Body>, param4:Vector.<Vector3>, param5:int) : void;
function primaryDummyShot(param1:int, param2:int) : void;
function secondaryOpen(param1:int) : void;
function secondaryHide(param1:int) : void;
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.twins {
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 TwinsShootSFXModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:TwinsShootSFXModelServer;
private var client:ITwinsShootSFXModelBase = ITwinsShootSFXModelBase(this);
private var modelId:Long = Long.getLong(1791035142,-1712503825);
public function TwinsShootSFXModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new TwinsShootSFXModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(TwinsShootSFXCC,false)));
}
protected function getInitParam() : TwinsShootSFXCC {
return TwinsShootSFXCC(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.tanks.models.battle.commonflag {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.objects.tank.Tank;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.battle.pointbased.ClientTeamPoint;
import projects.tanks.client.battlefield.models.battle.pointbased.flag.ClientFlag;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class ICommonFlagModeModelAdapt implements ICommonFlagModeModel {
private var object:IGameObject;
private var impl:ICommonFlagModeModel;
public function ICommonFlagModeModelAdapt(param1:IGameObject, param2:ICommonFlagModeModel) {
super();
this.object = param1;
this.impl = param2;
}
public function initFlag(param1:CommonFlag, param2:ClientFlag) : void {
var flag:CommonFlag = param1;
var flagData:ClientFlag = param2;
try {
Model.object = this.object;
this.impl.initFlag(flag,flagData);
}
finally {
Model.popObject();
}
}
public function createBasePoint(param1:ClientTeamPoint, param2:Tanks3DSResource) : Object3D {
var result:Object3D = null;
var pointData:ClientTeamPoint = param1;
var pedestal3D:Tanks3DSResource = param2;
try {
Model.object = this.object;
result = this.impl.createBasePoint(pointData,pedestal3D);
}
finally {
Model.popObject();
}
return result;
}
public function getFlags() : Vector.<ClientFlag> {
var result:Vector.<ClientFlag> = null;
try {
Model.object = this.object;
result = this.impl.getFlags();
}
finally {
Model.popObject();
}
return result;
}
public function getPoints() : Vector.<ClientTeamPoint> {
var result:Vector.<ClientTeamPoint> = null;
try {
Model.object = this.object;
result = this.impl.getPoints();
}
finally {
Model.popObject();
}
return result;
}
public function getLocalTank() : Tank {
var result:Tank = null;
try {
Model.object = this.object;
result = this.impl.getLocalTank();
}
finally {
Model.popObject();
}
return result;
}
public function onFlagTouch(param1:CommonFlag) : void {
var flag:CommonFlag = param1;
try {
Model.object = this.object;
this.impl.onFlagTouch(flag);
}
finally {
Model.popObject();
}
}
public function onPickupTimeoutPassed(param1:CommonFlag) : void {
var flag:CommonFlag = param1;
try {
Model.object = this.object;
this.impl.onPickupTimeoutPassed(flag);
}
finally {
Model.popObject();
}
}
public function addMineProtectedZone(param1:Vector3) : void {
var position:Vector3 = param1;
try {
Model.object = this.object;
this.impl.addMineProtectedZone(position);
}
finally {
Model.popObject();
}
}
}
}
|
package _codec.projects.tanks.client.panel.model.payment.modes.android {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.payment.modes.android.PurchaseData;
public class VectorCodecPurchaseDataLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecPurchaseDataLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(PurchaseData,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.<PurchaseData> = new Vector.<PurchaseData>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = PurchaseData(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:PurchaseData = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<PurchaseData> = Vector.<PurchaseData>(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.battle.events {
public class BattleRestartEvent {
public function BattleRestartEvent() {
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.shop.indemnity {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.shop.indemnity.IndemnityCC;
public class VectorCodecIndemnityCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecIndemnityCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(IndemnityCC,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.<IndemnityCC> = new Vector.<IndemnityCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = IndemnityCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:IndemnityCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<IndemnityCC> = Vector.<IndemnityCC>(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.controller.events {
import flash.events.Event;
public class LoginViaPartnerEvent extends Event {
public static const EVENT_TYPE:String = "LoginViaPartnerEvent";
private var _partnerId:String;
public function LoginViaPartnerEvent(param1:String) {
super(EVENT_TYPE);
this._partnerId = param1;
}
public function get partnerId() : String {
return this._partnerId;
}
override public function clone() : Event {
return new LoginViaPartnerEvent(this.partnerId);
}
}
}
|
package projects.tanks.client.achievements.model {
public class Achievement {
public static const FIRST_PURCHASE:Achievement = new Achievement(0,"FIRST_PURCHASE");
public static const FIGHT_FIRST_BATTLE:Achievement = new Achievement(1,"FIGHT_FIRST_BATTLE");
public static const FIRST_REFERRAL:Achievement = new Achievement(2,"FIRST_REFERRAL");
private var _value:int;
private var _name:String;
public function Achievement(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<Achievement> {
var local1:Vector.<Achievement> = new Vector.<Achievement>();
local1.push(FIRST_PURCHASE);
local1.push(FIGHT_FIRST_BATTLE);
local1.push(FIRST_REFERRAL);
return local1;
}
public function toString() : String {
return "Achievement [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package alternativa.proplib {
public class PropLibRegistry {
private var libs:Object = {};
public function PropLibRegistry() {
super();
}
public function addLibrary(lib:PropLibrary) : void {
this.libs[lib.name] = lib;
}
public function getLibrary(libName:String) : PropLibrary {
return this.libs[libName];
}
public function get libraries() : Vector.<PropLibrary> {
var lib:PropLibrary = null;
var res:Vector.<PropLibrary> = new Vector.<PropLibrary>();
for each(lib in this.libs) {
res.push(lib);
}
return res;
}
}
}
|
package alternativa.tanks.models.battlefield.mine
{
public class UserMinesList
{
public var head:ProximityMine;
public var tail:ProximityMine;
public function UserMinesList()
{
super();
}
public function addMine(mine:ProximityMine) : void
{
if(this.head == null)
{
this.head = this.tail = mine;
}
else
{
this.tail.next = mine;
mine.prev = this.tail;
this.tail = mine;
}
}
public function removeMine(mine:ProximityMine) : void
{
if(this.head == null)
{
return;
}
if(mine == this.head)
{
if(mine == this.tail)
{
this.tail = null;
this.head = null;
}
else
{
this.head = this.head.next;
this.head.prev = null;
}
}
else if(mine == this.tail)
{
this.tail = this.tail.prev;
this.tail.next = null;
}
else
{
mine.prev.next = mine.next;
mine.next.prev = mine.prev;
}
mine.dispose();
}
public function clearMines() : void
{
while(this.head != null)
{
this.removeMine(this.head);
}
}
}
}
|
package projects.tanks.client.garage.models.item.discount {
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 DiscountCollectorModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:DiscountCollectorModelServer;
private var client:IDiscountCollectorModelBase = IDiscountCollectorModelBase(this);
private var modelId:Long = Long.getLong(1896140971,-1323660734);
public function DiscountCollectorModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new DiscountCollectorModelServer(IModel(this));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.gui.payment.forms.qiwi {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.payment.controls.ProceedButton;
import alternativa.tanks.gui.payment.forms.mobile.*;
import base.DiscreteSprite;
import controls.Label;
import controls.dropdownlist.DropDownList;
import controls.labels.MouseDisabledLabel;
import flash.events.Event;
import flash.events.MouseEvent;
import projects.tanks.client.panel.model.payment.modes.qiwi.CountryPhoneInfo;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class QiwiPhoneNumberForm extends DiscreteSprite {
[Inject]
public static var localeService:ILocaleService;
private static const PROCEED_BUTTON_WIDTH:int = 100;
private static const INPUT_WIDTH:int = 150;
private static const CODE_FIELD:String = "code";
private static const PHONE_LENGTH_FIELD:String = "phoneLength";
private const DEFAULT_COUNTRY_CODE:int = 7;
private var countryCodesLabel:Label;
internal var countryCodesList:DropDownList;
private var phoneLabel:Label;
internal var phoneInput:PhoneNumberInput;
internal var proceedButton:ProceedButton;
public function QiwiPhoneNumberForm(param1:Vector.<CountryPhoneInfo>) {
super();
this.addPhoneElement();
this.addProceedButton();
this.addCountryElement();
this.initCountryList(param1);
this.render();
}
private static function onMouseWheel(param1:MouseEvent) : void {
param1.stopImmediatePropagation();
}
private function addCountryElement() : void {
this.countryCodesLabel = new MouseDisabledLabel();
this.countryCodesLabel.text = "Код страны:";
addChild(this.countryCodesLabel);
this.countryCodesList = new DropDownList();
this.countryCodesList.width = INPUT_WIDTH;
this.countryCodesList.height = QiwiForm.HEIGHT;
addChild(this.countryCodesList);
}
private function addPhoneElement() : void {
this.phoneLabel = new MouseDisabledLabel();
this.phoneLabel.text = "Номер телефона:";
addChild(this.phoneLabel);
this.phoneInput = new PhoneNumberInput(true);
addChild(this.phoneInput);
}
private function addProceedButton() : void {
this.proceedButton = new ProceedButton();
this.proceedButton.label = localeService.getText(TanksLocale.TEXT_PAYMENT_BUTTON_PROCEED_TEXT);
this.proceedButton.width = PROCEED_BUTTON_WIDTH;
this.proceedButton.visible = false;
addChild(this.proceedButton);
}
public function initCountryList(param1:Vector.<CountryPhoneInfo>) : void {
var local2:CountryPhoneInfo = null;
var local3:String = null;
for each(local2 in param1) {
local3 = "+" + local2.code + " " + local2.name;
this.countryCodesList.addItem({
"gameName":local3,
"rang":0,
"code":local2.code,
"phoneLength":local2.phoneLength
});
}
this.countryCodesList.sortOn(CODE_FIELD,[Array.NUMERIC]);
this.countryCodesList.addEventListener(MouseEvent.MOUSE_WHEEL,onMouseWheel);
this.countryCodesList.addEventListener(Event.CHANGE,this.onCountryChanged);
this.setDefaultCountryCode();
}
private function onCountryChanged(param1:Event) : void {
this.phoneInput.setCountryCode(this.countryCodesList.selectedItem[CODE_FIELD],this.countryCodesList.selectedItem[PHONE_LENGTH_FIELD]);
}
public function setDefaultCountryCode() : void {
this.countryCodesList.selectItemByField(CODE_FIELD,this.DEFAULT_COUNTRY_CODE);
}
private function render() : void {
this.countryCodesList.x = this.phoneInput.x = QiwiForm.WIDTH - INPUT_WIDTH;
this.phoneInput.y = this.phoneInput.height + 10;
this.countryCodesLabel.y = this.phoneInput.height - this.countryCodesLabel.height >> 1;
this.phoneLabel.y = this.phoneInput.y + (this.phoneInput.height - this.phoneLabel.height >> 1);
this.proceedButton.x = QiwiForm.WIDTH - this.proceedButton.width >> 1;
this.proceedButton.y = QiwiForm.HEIGHT - this.proceedButton.height;
}
public function reset() : void {
this.phoneInput.reset();
this.proceedButton.visible = false;
}
override public function get width() : Number {
return QiwiForm.WIDTH;
}
override public function get height() : Number {
return QiwiForm.HEIGHT;
}
}
}
|
package alternativa.engine3d.core
{
import alternativa.gfx.agal.FragmentShader;
import alternativa.gfx.agal.SamplerDim;
import alternativa.gfx.agal.SamplerFilter;
import alternativa.gfx.agal.SamplerMipMap;
import alternativa.gfx.agal.SamplerRepeat;
public class ShadowAtlasFragmentShader extends FragmentShader
{
public function ShadowAtlasFragmentShader(param1:int, param2:Boolean)
{
var _loc3_:int = 0;
super();
mov(ft1,v0);
tex(ft3,ft1,fs0.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE));
if(param2)
{
sub(ft1.x,v0,fc[1]);
}
else
{
sub(ft1.y,v0,fc[1]);
}
_loc3_ = -param1;
while(_loc3_ <= param1)
{
if(_loc3_ != 0)
{
tex(ft2,ft1,fs0.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE));
add(ft3.w,ft3,ft2);
}
if(param2)
{
add(ft1.x,ft1,fc[0]);
}
else
{
add(ft1.y,ft1,fc[0]);
}
_loc3_++;
}
div(ft3.w,ft3,fc[0]);
mov(oc,ft3);
}
}
}
|
package com.lorentz.SVG.data.path
{
public class SVGArcToCommand extends SVGPathCommand
{
public var rx:Number = 0;
public var ry:Number = 0;
public var xAxisRotation:Number = 0;
public var largeArc:Boolean = false;
public var sweep:Boolean = false;
public var x:Number = 0;
public var y:Number = 0;
public var absolute:Boolean = false;
public function SVGArcToCommand(absolute:Boolean = false, rx:Number = 0, ry:Number = 0, xAxisRotation:Number = 0, largeArc:Boolean = false, sweep:Boolean = false, x:Number = 0, y:Number = 0)
{
super();
this.absolute = absolute;
this.rx = rx;
this.ry = ry;
this.xAxisRotation = xAxisRotation;
this.largeArc = largeArc;
this.sweep = sweep;
this.x = x;
this.y = y;
}
override public function get type():String {
return absolute ? "A" : "a";
}
override public function clone():Object {
var copy:SVGArcToCommand = new SVGArcToCommand(absolute);
copy.rx = rx;
copy.ry = ry;
copy.xAxisRotation = xAxisRotation;
copy.largeArc = largeArc;
copy.sweep = sweep;
copy.x = x;
copy.y = y;
return copy;
}
}
}
|
package alternativa.tanks.model.payment.modes {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
public class PayUrlAdapt implements PayUrl {
private var object:IGameObject;
private var impl:PayUrl;
public function PayUrlAdapt(param1:IGameObject, param2:PayUrl) {
super();
this.object = param1;
this.impl = param2;
}
public function forceGoToUrl(param1:PaymentRequestUrl) : void {
var url:PaymentRequestUrl = param1;
try {
Model.object = this.object;
this.impl.forceGoToUrl(url);
}
finally {
Model.popObject();
}
}
public function forceGoToOrderedUrl(param1:PaymentRequestUrl) : void {
var url:PaymentRequestUrl = param1;
try {
Model.object = this.object;
this.impl.forceGoToOrderedUrl(url);
}
finally {
Model.popObject();
}
}
}
}
|
package projects.tanks.client.partners.impl.steam {
public interface ISteamPaymentModelBase {
}
}
|
package projects.tanks.client.clans.user {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class ClanUserModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _acceptId:Long = Long.getLong(1768627069,1892741997);
private var _accept_lightClanCodec:ICodec;
private var _addId:Long = Long.getLong(18682727,195142564);
private var _add_lightClanCodec:ICodec;
private var _addInClanByNameId:Long = Long.getLong(890566910,1534882553);
private var _addInClanByName_nameCodec:ICodec;
private var _checkClanNameId:Long = Long.getLong(1690954694,-2009525540);
private var _checkClanName_nameCodec:ICodec;
private var _rejectId:Long = Long.getLong(1768627069,-1913474556);
private var _reject_lightClanCodec:ICodec;
private var _rejectAllId:Long = Long.getLong(1489758230,1514479363);
private var _revokeId:Long = Long.getLong(1768627069,-1913107221);
private var _revoke_lightClanCodec:ICodec;
private var model:IModel;
public function ClanUserModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._accept_lightClanCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._add_lightClanCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._addInClanByName_nameCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._checkClanName_nameCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._reject_lightClanCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._revoke_lightClanCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
}
public function accept(param1:IGameObject) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._accept_lightClanCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._acceptId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function add(param1:IGameObject) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._add_lightClanCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._addId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function addInClanByName(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._addInClanByName_nameCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._addInClanByNameId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function checkClanName(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._checkClanName_nameCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._checkClanNameId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function reject(param1:IGameObject) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._reject_lightClanCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._rejectId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function rejectAll() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._rejectAllId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function revoke(param1:IGameObject) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._revoke_lightClanCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._revokeId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.utils
{
import flash.utils.ByteArray;
public class XMLUtils
{
private static var buf:ByteArray = new ByteArray();
public function XMLUtils()
{
super();
}
public static function copyXMLString(s:String) : String
{
buf.position = 0;
buf.writeUTF(s);
buf.position = 0;
return buf.readUTF();
}
public static function getAttributeAsString(element:XML, attrName:String, defValue:String = null) : String
{
var attribute:XML = null;
var attributes:XMLList = element.attribute(attrName);
if(attributes.length() > 0)
{
attribute = attributes[0];
return attribute.toString();
}
return defValue;
}
public static function getAttributeAsNumber(element:XML, attrName:String, defValue:Number = NaN) : Number
{
var attributes:XMLList = element.attribute(attrName);
if(attributes.length() > 0)
{
return Number(attributes[0]);
}
return defValue;
}
}
}
|
package alternativa.tanks.models.controlpoints.sfx {
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
public class AnimatedBeam extends Mesh {
public var animationSpeed:Number;
private var a:Vertex;
private var b:Vertex;
private var c:Vertex;
private var d:Vertex;
private var e:Vertex;
private var f:Vertex;
private var g:Vertex;
private var h:Vertex;
private var i:Vertex;
private var j:Vertex;
private var k:Vertex;
private var l:Vertex;
private var unitLength:Number;
private var vOffset:Number = 0;
public function AnimatedBeam(param1:Number, param2:Number, param3:Number, param4:Number) {
super();
this.unitLength = param3;
this.animationSpeed = param4;
useShadowMap = false;
useLight = false;
shadowMapAlphaThreshold = 2;
depthMapAlphaThreshold = 2;
var local5:Number = param1 / 2;
var local6:Vector.<Number> = Vector.<Number>([-local5,0,0,local5,0,0,local5,param2,0,-local5,param2,0,-local5,param2,0,local5,param2,0,local5,param2 + 1,0,-local5,param2 + 1,0,-local5,param2 + 1,0,local5,param2 + 1,0,local5,2 * param2 + 1,0,-local5,2 * param2 + 1,0]);
var local7:Vector.<Number> = Vector.<Number>([0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,1,0,1,1,0,1]);
var local8:Vector.<int> = Vector.<int>([4,0,1,2,3,4,4,5,6,7,4,8,9,10,11]);
addVerticesAndFaces(local6,local7,local8,true);
sorting = Sorting.DYNAMIC_BSP;
this.writeVertices();
calculateFacesNormals();
this.updateV();
boundMinX = -local5;
boundMaxX = local5;
boundMinY = 0;
boundMaxY = length;
boundMinZ = 0;
boundMaxZ = 0;
}
public function setMaterials(param1:TextureMaterial, param2:TextureMaterial) : void {
var local3:Face = faceList;
local3.material = param1;
local3.next.material = param2;
local3.next.next.material = param1;
}
private function writeVertices() : void {
var local1:Vector.<Vertex> = this.vertices;
this.a = local1[0];
this.b = local1[1];
this.c = local1[2];
this.d = local1[3];
this.e = local1[4];
this.f = local1[5];
this.g = local1[6];
this.h = local1[7];
this.i = local1[8];
this.j = local1[9];
this.k = local1[10];
this.l = local1[11];
}
private function updateV() : void {
this.e.v = this.vOffset;
this.f.v = this.vOffset;
var local1:Number = (this.g.y - this.f.y) / this.unitLength + this.vOffset;
this.g.v = local1;
this.h.v = local1;
}
public function clear() : void {
setMaterialToAllFaces(null);
}
public function setTipLength(param1:Number) : void {
var local2:Number = Number(this.c.y);
this.c.y = param1;
this.d.y = param1;
this.e.y = param1;
this.f.y = param1;
this.setLength(this.k.y + param1 - local2);
}
public function resize(param1:Number, param2:Number) : void {
this.setWidth(param1);
this.setLength(param2);
}
public function setWidth(param1:Number) : void {
var local2:Number = param1 / 2;
boundMinX = -local2;
boundMaxX = local2;
this.a.x = -local2;
this.d.x = -local2;
this.e.x = -local2;
this.h.x = -local2;
this.i.x = -local2;
this.l.x = -local2;
this.b.x = local2;
this.c.x = local2;
this.f.x = local2;
this.g.x = local2;
this.j.x = local2;
this.k.x = local2;
}
public function setLength(param1:Number) : void {
if(param1 < 1 + 2 * this.c.y) {
visible = false;
} else {
visible = true;
boundMaxY = param1;
this.g.y = param1 - this.c.y;
this.h.y = this.g.y;
this.i.y = this.g.y;
this.j.y = this.g.y;
this.k.y = param1;
this.l.y = param1;
this.updateV();
}
}
public function setURange(param1:Number) : void {
this.a.u = 0.5 * (1 - param1);
this.d.u = this.a.u;
this.e.u = this.a.u;
this.h.u = this.a.u;
this.i.u = this.a.u;
this.l.u = this.a.u;
this.b.u = 0.5 * (1 + param1);
this.c.u = this.b.u;
this.f.u = this.b.u;
this.g.u = this.b.u;
this.j.u = this.b.u;
this.k.u = this.b.u;
}
public function update(param1:Number) : void {
this.vOffset += this.animationSpeed * param1;
if(this.vOffset < 0) {
this.vOffset += 1;
} else if(this.vOffset > 1) {
this.vOffset -= 1;
}
this.updateV();
}
public function setUnitLength(param1:Number) : void {
this.unitLength = param1;
this.updateV();
}
}
}
|
package alternativa.tanks.models.weapon.rocketlauncher.sfx {
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.service.settings.ISettingsService;
import alternativa.tanks.sfx.GraphicEffect;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
public class RocketSmoke extends PooledObject implements GraphicEffect {
[Inject]
public static var settings:ISettingsService;
private static const INITIAL_ALPHA:Number = 0.4;
private static const SCALE_STEP:Number = 0.02;
private static const ALPHA_STEP:Number = 0.01;
private var container:Scene3DContainer;
private var sprite:Sprite3D;
public function RocketSmoke(param1:Pool) {
super(param1);
this.sprite = new Sprite3D(100,100);
}
public function init(param1:Mesh, param2:Vector3, param3:TextureMaterial) : void {
this.sprite.material = param3;
this.sprite.rotation = Math.random() * Math.PI * 2;
this.sprite.scaleX = 1;
this.sprite.scaleY = 1;
this.sprite.scaleZ = 1;
this.sprite.alpha = INITIAL_ALPHA;
this.sprite.x = param1.x - param2.x * 40;
this.sprite.y = param1.y - param2.y * 40;
this.sprite.z = param1.z - param2.z * 40;
}
public function addedToScene(param1:Scene3DContainer) : void {
if(!settings.dust) {
return;
}
this.container = param1;
param1.addChild(this.sprite);
}
public function play(param1:int, param2:GameCamera) : Boolean {
if(!settings.dust) {
return false;
}
this.sprite.scaleX += SCALE_STEP;
this.sprite.scaleY += SCALE_STEP;
this.sprite.scaleZ += SCALE_STEP;
this.sprite.alpha -= ALPHA_STEP;
return this.sprite.alpha > 0;
}
public function destroy() : void {
if(Boolean(this.container)) {
this.container.removeChild(this.sprite);
}
this.container = null;
this.sprite.material = null;
recycle();
}
public function kill() : void {
this.sprite.alpha = 0;
}
}
}
|
package alternativa.tanks.view.battlelist.friends {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battlelist.friends.FriendsIndicator_friendsGreenClass.png")]
public class FriendsIndicator_friendsGreenClass extends BitmapAsset {
public function FriendsIndicator_friendsGreenClass() {
super();
}
}
}
|
package alternativa.tanks.battle.objects.tank {
public interface ConfigurableWeapon extends Weapon {
function updateRange(param1:Number) : void;
function setBuffedMode(param1:Boolean) : void;
}
}
|
package alternativa.tanks.controllers.battlecreate {
import flash.events.Event;
public class CheckBattleNameEvent extends Event {
public static const CHECK_NAME:String = "CheckBattleNameEvent.CHECK_NAME";
public var battleName:String;
public function CheckBattleNameEvent(param1:String, param2:String, param3:Boolean = false, param4:Boolean = false) {
super(param1,param3,param4);
this.battleName = param2;
}
}
}
|
package alternativa.tanks.models.weapon.shaft
{
import alternativa.math.Vector3;
import alternativa.tanks.vehicles.tanks.Tank;
public class AimedShotResult
{
public var aims:Array;
public var staticHitPoint:Vector3;
public var targetHitPoint:Vector3;
public function AimedShotResult()
{
this.aims = new Array();
super();
}
public function setTarget(param1:Tank, param2:Vector3) : void
{
this.targetHitPoint = param2;
this.aims.push(new Aim(param1,param2));
}
public function setStaticHitPoint(param1:Vector3) : void
{
this.staticHitPoint = param1.vClone();
}
}
}
|
package alternativa.tanks.view.battlelist.battleitem.renderer.unavailable {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battlelist.battleitem.renderer.unavailable.CellUnavailableSelected_normalLeft.png")]
public class CellUnavailableSelected_normalLeft extends BitmapAsset {
public function CellUnavailableSelected_normalLeft() {
super();
}
}
}
|
package alternativa.tanks.engine3d {
import alternativa.engine3d.materials.TextureMaterial;
import flash.display.BitmapData;
public class MaterialEntry {
public var keyData:Object;
public var texture:BitmapData;
public var material:TextureMaterial;
public var referenceCount:int;
public function MaterialEntry(param1:Object, param2:TextureMaterial) {
super();
this.keyData = param1;
this.texture = param1 as BitmapData;
this.material = param2;
}
}
}
|
package alternativa.tanks.gui.frames {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.frames.GreenFrameSkin_frame.png")]
public class GreenFrameSkin_frame extends BitmapAsset {
public function GreenFrameSkin_frame() {
super();
}
}
}
|
package mx.core {
import flash.display.BitmapData;
import flash.display.DisplayObjectContainer;
import flash.events.Event;
import flash.geom.Point;
import flash.system.ApplicationDomain;
use namespace mx_internal;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject, ILayoutDirectionElement {
private static var FlexVersionClass:Class;
private static var MatrixUtilClass:Class;
mx_internal static const VERSION:String = "4.6.0.23201";
private var layoutFeaturesClass:Class;
private var layoutFeatures:IAssetLayoutFeatures;
private var _height:Number;
private var _layoutDirection:String = "ltr";
public function BitmapAsset(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false) {
var appDomain:ApplicationDomain = null;
super(bitmapData,pixelSnapping,smoothing);
if(FlexVersionClass == null) {
appDomain = ApplicationDomain.currentDomain;
if(appDomain.hasDefinition("mx.core::FlexVersion")) {
FlexVersionClass = Class(appDomain.getDefinition("mx.core::FlexVersion"));
}
}
if(Boolean(FlexVersionClass) && FlexVersionClass["compatibilityVersion"] >= FlexVersionClass["VERSION_4_0"]) {
this.addEventListener(Event.ADDED,this.addedHandler);
}
}
override public function get x() : Number {
return this.layoutFeatures == null ? super.x : Number(this.layoutFeatures.layoutX);
}
override public function set x(value:Number) : void {
if(this.x == value) {
return;
}
if(this.layoutFeatures == null) {
super.x = value;
} else {
this.layoutFeatures.layoutX = value;
this.validateTransformMatrix();
}
}
override public function get y() : Number {
return this.layoutFeatures == null ? super.y : Number(this.layoutFeatures.layoutY);
}
override public function set y(value:Number) : void {
if(this.y == value) {
return;
}
if(this.layoutFeatures == null) {
super.y = value;
} else {
this.layoutFeatures.layoutY = value;
this.validateTransformMatrix();
}
}
override public function get z() : Number {
return this.layoutFeatures == null ? super.z : Number(this.layoutFeatures.layoutZ);
}
override public function set z(value:Number) : void {
if(this.z == value) {
return;
}
if(this.layoutFeatures == null) {
super.z = value;
} else {
this.layoutFeatures.layoutZ = value;
this.validateTransformMatrix();
}
}
override public function get width() : Number {
var p:Point = null;
if(this.layoutFeatures == null) {
return super.width;
}
if(MatrixUtilClass != null) {
p = MatrixUtilClass["transformSize"](this.layoutFeatures.layoutWidth,this._height,transform.matrix);
}
return Boolean(p) ? p.x : super.width;
}
override public function set width(value:Number) : void {
if(this.width == value) {
return;
}
if(this.layoutFeatures == null) {
super.width = value;
} else {
this.layoutFeatures.layoutWidth = value;
this.layoutFeatures.layoutScaleX = this.measuredWidth != 0 ? value / this.measuredWidth : 0;
this.validateTransformMatrix();
}
}
override public function get height() : Number {
var p:Point = null;
if(this.layoutFeatures == null) {
return super.height;
}
if(MatrixUtilClass != null) {
p = MatrixUtilClass["transformSize"](this.layoutFeatures.layoutWidth,this._height,transform.matrix);
}
return Boolean(p) ? p.y : super.height;
}
override public function set height(value:Number) : void {
if(this.height == value) {
return;
}
if(this.layoutFeatures == null) {
super.height = value;
} else {
this._height = value;
this.layoutFeatures.layoutScaleY = this.measuredHeight != 0 ? value / this.measuredHeight : 0;
this.validateTransformMatrix();
}
}
override public function get rotationX() : Number {
return this.layoutFeatures == null ? super.rotationX : Number(this.layoutFeatures.layoutRotationX);
}
override public function set rotationX(value:Number) : void {
if(this.rotationX == value) {
return;
}
if(this.layoutFeatures == null) {
super.rotationX = value;
} else {
this.layoutFeatures.layoutRotationX = value;
this.validateTransformMatrix();
}
}
override public function get rotationY() : Number {
return this.layoutFeatures == null ? super.rotationY : Number(this.layoutFeatures.layoutRotationY);
}
override public function set rotationY(value:Number) : void {
if(this.rotationY == value) {
return;
}
if(this.layoutFeatures == null) {
super.rotationY = value;
} else {
this.layoutFeatures.layoutRotationY = value;
this.validateTransformMatrix();
}
}
override public function get rotationZ() : Number {
return this.layoutFeatures == null ? super.rotationZ : Number(this.layoutFeatures.layoutRotationZ);
}
override public function set rotationZ(value:Number) : void {
if(this.rotationZ == value) {
return;
}
if(this.layoutFeatures == null) {
super.rotationZ = value;
} else {
this.layoutFeatures.layoutRotationZ = value;
this.validateTransformMatrix();
}
}
override public function get rotation() : Number {
return this.layoutFeatures == null ? super.rotation : Number(this.layoutFeatures.layoutRotationZ);
}
override public function set rotation(value:Number) : void {
if(this.rotation == value) {
return;
}
if(this.layoutFeatures == null) {
super.rotation = value;
} else {
this.layoutFeatures.layoutRotationZ = value;
this.validateTransformMatrix();
}
}
override public function get scaleX() : Number {
return this.layoutFeatures == null ? super.scaleX : Number(this.layoutFeatures.layoutScaleX);
}
override public function set scaleX(value:Number) : void {
if(this.scaleX == value) {
return;
}
if(this.layoutFeatures == null) {
super.scaleX = value;
} else {
this.layoutFeatures.layoutScaleX = value;
this.layoutFeatures.layoutWidth = Math.abs(value) * this.measuredWidth;
this.validateTransformMatrix();
}
}
override public function get scaleY() : Number {
return this.layoutFeatures == null ? super.scaleY : Number(this.layoutFeatures.layoutScaleY);
}
override public function set scaleY(value:Number) : void {
if(this.scaleY == value) {
return;
}
if(this.layoutFeatures == null) {
super.scaleY = value;
} else {
this.layoutFeatures.layoutScaleY = value;
this._height = Math.abs(value) * this.measuredHeight;
this.validateTransformMatrix();
}
}
override public function get scaleZ() : Number {
return this.layoutFeatures == null ? super.scaleZ : Number(this.layoutFeatures.layoutScaleZ);
}
override public function set scaleZ(value:Number) : void {
if(this.scaleZ == value) {
return;
}
if(this.layoutFeatures == null) {
super.scaleZ = value;
} else {
this.layoutFeatures.layoutScaleZ = value;
this.validateTransformMatrix();
}
}
[Inspectable(category="General",enumeration="ltr,rtl")]
public function get layoutDirection() : String {
return this._layoutDirection;
}
public function set layoutDirection(value:String) : void {
if(value == this._layoutDirection) {
return;
}
this._layoutDirection = value;
this.invalidateLayoutDirection();
}
public function get measuredHeight() : Number {
if(Boolean(bitmapData)) {
return bitmapData.height;
}
return 0;
}
public function get measuredWidth() : Number {
if(Boolean(bitmapData)) {
return bitmapData.width;
}
return 0;
}
public function invalidateLayoutDirection() : void {
var mirror:Boolean = false;
var p:DisplayObjectContainer = parent;
while(Boolean(p)) {
if(p is ILayoutDirectionElement) {
mirror = this._layoutDirection != null && ILayoutDirectionElement(p).layoutDirection != null && this._layoutDirection != ILayoutDirectionElement(p).layoutDirection;
if(mirror && this.layoutFeatures == null) {
this.initAdvancedLayoutFeatures();
if(this.layoutFeatures != null) {
this.layoutFeatures.mirror = mirror;
this.validateTransformMatrix();
}
} else if(!mirror && Boolean(this.layoutFeatures)) {
this.layoutFeatures.mirror = mirror;
this.validateTransformMatrix();
this.layoutFeatures = null;
}
break;
}
p = p.parent;
}
}
public function move(x:Number, y:Number) : void {
this.x = x;
this.y = y;
}
public function setActualSize(newWidth:Number, newHeight:Number) : void {
this.width = newWidth;
this.height = newHeight;
}
private function addedHandler(event:Event) : void {
this.invalidateLayoutDirection();
}
private function initAdvancedLayoutFeatures() : void {
var appDomain:ApplicationDomain = null;
var features:IAssetLayoutFeatures = null;
if(this.layoutFeaturesClass == null) {
appDomain = ApplicationDomain.currentDomain;
if(appDomain.hasDefinition("mx.core::AdvancedLayoutFeatures")) {
this.layoutFeaturesClass = Class(appDomain.getDefinition("mx.core::AdvancedLayoutFeatures"));
}
if(MatrixUtilClass == null) {
if(appDomain.hasDefinition("mx.utils::MatrixUtil")) {
MatrixUtilClass = Class(appDomain.getDefinition("mx.utils::MatrixUtil"));
}
}
}
if(this.layoutFeaturesClass != null) {
features = new this.layoutFeaturesClass();
features.layoutScaleX = this.scaleX;
features.layoutScaleY = this.scaleY;
features.layoutScaleZ = this.scaleZ;
features.layoutRotationX = this.rotationX;
features.layoutRotationY = this.rotationY;
features.layoutRotationZ = this.rotation;
features.layoutX = this.x;
features.layoutY = this.y;
features.layoutZ = this.z;
features.layoutWidth = this.width;
this._height = this.height;
this.layoutFeatures = features;
}
}
private function validateTransformMatrix() : void {
if(this.layoutFeatures != null) {
if(this.layoutFeatures.is3D) {
super.transform.matrix3D = this.layoutFeatures.computedMatrix3D;
} else {
super.transform.matrix = this.layoutFeatures.computedMatrix;
}
}
}
}
}
|
package alternativa.tanks.view.battlecreate.slider {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battlecreate.slider.SelectRankThumbSlider_bitmapArrow.png")]
public class SelectRankThumbSlider_bitmapArrow extends BitmapAsset {
public function SelectRankThumbSlider_bitmapArrow() {
super();
}
}
}
|
package _codec.projects.tanks.client.clans.panel.foreignclan {
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.clans.panel.foreignclan.ForeignClanCC;
public class VectorCodecForeignClanCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecForeignClanCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ForeignClanCC,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.<ForeignClanCC> = new Vector.<ForeignClanCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ForeignClanCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ForeignClanCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ForeignClanCC> = Vector.<ForeignClanCC>(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.sfx.shoot.hwthunder
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.materials.FillMaterial;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.objects.Mesh;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.math.Matrix3;
import alternativa.math.Matrix4;
import alternativa.math.Vector3;
import alternativa.object.ClientObject;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.sfx.IGraphicEffect;
import alternativa.tanks.utils.objectpool.ObjectPool;
import alternativa.tanks.utils.objectpool.PooledObject;
import flash.display.BlendMode;
use namespace alternativa3d;
public class HWThunderShotEffect extends PooledObject implements IGraphicEffect
{
private static const speed1:Number = 500;
private static const speed2:Number = 1000;
private static const speed3:Number = 1500;
private static const raySpeed1:Number = 1500;
private static const raySpeed2:Number = 2500;
private static const raySpeed3:Number = 1300;
private static var basePoint:Vector3 = new Vector3();
private static var direction:Vector3 = new Vector3();
private static var axis:Vector3 = new Vector3();
private static var eulerAngles:Vector3 = new Vector3();
private static var rayMaterial:FillMaterial = new FillMaterial(4294753806);
private static var turretMatrix:Matrix4 = new Matrix4();
private static var trailMatrix:Matrix3 = new Matrix3();
private static var trailMatrix2:Matrix3 = new Matrix3();
private var turret:Object3D;
private var localMuzzlePoint:Vector3;
private var sprite1:Sprite3D;
private var sprite2:Sprite3D;
private var sprite3:Sprite3D;
private var ray1:Trail;
private var ray2:Trail;
private var ray3:Trail;
private var distance1:Number = 40;
private var distance2:Number = 75;
private var distance3:Number = 80;
private var rayDistance1:Number = 0;
private var rayDistance2:Number = 0;
private var rayDistance3:Number = 0;
private var angle1:Number;
private var angle2:Number;
private var angle3:Number;
private var timeToLive:int;
public function HWThunderShotEffect(objectPool:ObjectPool)
{
super(objectPool);
this.createParticles();
}
public function init(turret:Object3D, muzzleLocalPoint:Vector3, material:Material) : void
{
this.turret = turret;
this.localMuzzlePoint = muzzleLocalPoint;
this.sprite1.material = material;
this.sprite2.material = material;
this.sprite3.material = material;
this.timeToLive = 50;
this.distance1 = 40;
this.distance2 = 75;
this.distance3 = 80;
this.rayDistance1 = 0;
this.rayDistance2 = 0;
this.rayDistance3 = 0;
this.angle1 = Math.random() * 2 * Math.PI;
this.angle2 = Math.random() * 2 * Math.PI;
this.angle3 = Math.random() * 2 * Math.PI;
}
public function addToContainer(container:Scene3DContainer) : void
{
container.addChild(this.sprite1);
container.addChild(this.sprite2);
container.addChild(this.sprite3);
container.addChild(this.ray1);
container.addChild(this.ray2);
container.addChild(this.ray3);
}
public function play(millis:int, camera:GameCamera) : Boolean
{
if(this.timeToLive < 0)
{
return false;
}
turretMatrix.setMatrix(this.turret.x,this.turret.y,this.turret.z,this.turret.rotationX,this.turret.rotationY,this.turret.rotationZ);
turretMatrix.transformVector(this.localMuzzlePoint,basePoint);
direction.x = turretMatrix.b;
direction.y = turretMatrix.f;
direction.z = turretMatrix.j;
var dt:Number = 0.001 * millis;
this.rayDistance1 += dt * raySpeed1;
this.rayDistance2 += dt * raySpeed2;
this.rayDistance3 += dt * raySpeed3;
this.setSpritePosition(this.sprite1,basePoint,direction,this.distance1);
this.setSpritePosition(this.sprite2,basePoint,direction,this.distance2);
this.setSpritePosition(this.sprite3,basePoint,direction,this.distance3);
this.setRayMatrix(this.ray1,this.angle1,basePoint,direction,this.rayDistance1,0,10);
this.setRayMatrix(this.ray2,this.angle2,basePoint,direction,this.rayDistance2,-7,0);
this.setRayMatrix(this.ray3,this.angle3,basePoint,direction,this.rayDistance3,7,0);
this.distance1 += dt * speed1;
this.distance2 += dt * speed2;
this.distance3 += dt * speed3;
this.timeToLive -= millis;
return true;
}
public function destroy() : void
{
this.sprite1.removeFromParent();
this.sprite2.removeFromParent();
this.sprite3.removeFromParent();
this.ray1.removeFromParent();
this.ray2.removeFromParent();
this.ray3.removeFromParent();
storeInPool();
}
public function kill() : void
{
this.timeToLive = -1;
}
public function get owner() : ClientObject
{
return null;
}
override protected function getClass() : Class
{
return HWThunderShotEffect;
}
private function createParticles() : void
{
this.sprite1 = this.createSprite(120);
this.sprite2 = this.createSprite(99.75);
this.sprite3 = this.createSprite(79.5);
this.ray1 = new Trail(0.8,rayMaterial);
this.ray2 = new Trail(0.75,rayMaterial);
this.ray3 = new Trail(0.82,rayMaterial);
}
private function createSprite(size:Number) : Sprite3D
{
var sprite:Sprite3D = new Sprite3D(size,size);
sprite.rotation = 2 * Math.PI * Math.random();
sprite.blendMode = BlendMode.SCREEN;
return sprite;
}
private function setSpritePosition(sprite:Sprite3D, basePoint:Vector3, dir:Vector3, distance:Number) : void
{
sprite.x = basePoint.x + dir.x * distance;
sprite.y = basePoint.y + dir.y * distance;
sprite.z = basePoint.z + dir.z * distance;
}
private function setRayMatrix(ray:Mesh, angle:Number, basePoint:Vector3, dir:Vector3, distance:Number, dx:Number, dz:Number) : void
{
trailMatrix.fromAxisAngle(Vector3.Y_AXIS,angle);
if(dir.y < -0.99999 || dir.y > 0.99999)
{
axis.x = 0;
axis.y = 0;
axis.z = 1;
angle = dir.y < 0 ? Number(Number(Math.PI)) : Number(Number(0));
}
else
{
axis.x = dir.z;
axis.y = 0;
axis.z = -dir.x;
axis.vNormalize();
angle = Math.acos(dir.y);
}
trailMatrix2.fromAxisAngle(axis,angle);
trailMatrix.append(trailMatrix2);
trailMatrix.getEulerAngles(eulerAngles);
ray.rotationX = eulerAngles.x;
ray.rotationY = eulerAngles.y;
ray.rotationZ = eulerAngles.z;
ray.x = basePoint.x + dir.x * distance + dx * trailMatrix.a + dz * trailMatrix.c;
ray.y = basePoint.y + dir.y * distance + dx * trailMatrix.e + dz * trailMatrix.g;
ray.z = basePoint.z + dir.z * distance + dx * trailMatrix.i + dz * trailMatrix.k;
}
}
}
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.core.Wrapper;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.objects.Mesh;
import flash.display.BlendMode;
use namespace alternativa3d;
class Trail extends Mesh
{
function Trail(scale:Number, material:Material)
{
super();
var h:Number = 240 * scale;
var a:Vertex = this.createVertex(-4,0,0,0,0);
var b:Vertex = this.createVertex(4,0,0,0,1);
var c:Vertex = this.createVertex(0,h,0,1,0.5);
this.createFace(a,b,c).material = material;
this.createFace(c,b,a).material = material;
calculateFacesNormals(true);
calculateBounds();
blendMode = BlendMode.SCREEN;
alpha = 0.3;
}
private function createVertex(x:Number, y:Number, z:Number, u:Number, v:Number) : Vertex
{
var newVertex:Vertex = new Vertex();
newVertex.next = vertexList;
vertexList = newVertex;
newVertex.x = x;
newVertex.y = y;
newVertex.z = z;
newVertex.u = u;
newVertex.v = v;
return newVertex;
}
private function createFace(a:Vertex, b:Vertex, c:Vertex) : Face
{
var newFace:Face = new Face();
newFace.next = faceList;
faceList = newFace;
newFace.wrapper = new Wrapper();
newFace.wrapper.vertex = a;
newFace.wrapper.next = new Wrapper();
newFace.wrapper.next.vertex = b;
newFace.wrapper.next.next = new Wrapper();
newFace.wrapper.next.next.vertex = c;
return newFace;
}
}
|
package alternativa.tanks.models.weapon.weakening {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IWeaponWeakeningModelEvents implements IWeaponWeakeningModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IWeaponWeakeningModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getDistanceWeakening() : DistanceWeakening {
var result:DistanceWeakening = null;
var i:int = 0;
var m:IWeaponWeakeningModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IWeaponWeakeningModel(this.impl[i]);
result = m.getDistanceWeakening();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf {
public class ColorInterpolator {
public var startColor:uint;
private var deltaRed:Number;
private var deltaGreen:Number;
private var deltaBlue:Number;
public function ColorInterpolator(param1:uint, param2:uint) {
super();
this.startColor = param1;
this.deltaRed = (param2 >> 16 & 0xFF) - (param1 >> 16 & 0xFF);
this.deltaGreen = (param2 >> 8 & 0xFF) - (param1 >> 8 & 0xFF);
this.deltaBlue = (param2 & 0xFF) - (param1 & 0xFF);
}
public function interpolate(param1:Number) : uint {
var local2:int = (this.startColor >> 16 & 0xFF) + param1 * this.deltaRed;
var local3:int = (this.startColor >> 8 & 0xFF) + param1 * this.deltaGreen;
var local4:int = (this.startColor & 0xFF) + param1 * this.deltaBlue;
return local2 << 16 | local3 << 8 | local4;
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.kits.paypal {
import alternativa.tanks.gui.shop.shopitems.item.base.ButtonItemSkin;
public class PayPallKitShopItemSkin extends ButtonItemSkin {
private static const normalStateClass:Class = PayPallKitShopItemSkin_normalStateClass;
private static const overStateClass:Class = PayPallKitShopItemSkin_overStateClass;
public function PayPallKitShopItemSkin() {
super();
normalState = new normalStateClass().bitmapData;
overState = new overStateClass().bitmapData;
}
}
}
|
package alternativa.tanks.models.battlefield.gui.chat
{
import alternativa.tanks.models.battlefield.common.MessageContainer;
import alternativa.tanks.models.battlefield.common.MessageLine;
import alternativa.tanks.models.battlefield.event.ChatOutputLineEvent;
import projects.tanks.client.battleservice.model.team.BattleTeamType;
public class BattleChatOutput extends MessageContainer
{
private const MAX_MESSAGES:int = 100;
private const MIN_MESSAGES:int = 5;
private var buffer:Array;
private var minimizedMode:Boolean = true;
public function BattleChatOutput()
{
this.buffer = [];
super();
}
public function addLine(messageLabel:String, userRank:int, chatLevel:int, userName:String, teamType:BattleTeamType, text:String) : void
{
if(this.minimizedMode && container.numChildren > this.MIN_MESSAGES || !this.minimizedMode && container.numChildren >= this.MAX_MESSAGES)
{
this.shiftMessages();
}
var color:uint = getTeamFontColor(teamType);
var line:BattleChatLine = new BattleChatLine(300,messageLabel,userRank,chatLevel,userName,text,color);
line.addEventListener(ChatOutputLineEvent.KILL_ME,this.onKillLine);
this.buffer.push(line);
if(this.buffer.length > this.MAX_MESSAGES)
{
this.buffer.shift();
}
pushMessage(line);
}
public function addSpectatorLine(text:String) : void
{
if(this.minimizedMode && container.numChildren > this.MIN_MESSAGES || !this.minimizedMode && container.numChildren >= this.MAX_MESSAGES)
{
this.shiftMessages();
}
var line:SpectatorMessageLine = new SpectatorMessageLine(300,text);
line.addEventListener(ChatOutputLineEvent.KILL_ME,this.onKillLine);
this.buffer.push(line);
if(this.buffer.length > this.MAX_MESSAGES)
{
this.buffer.shift();
}
pushMessage(line);
}
public function addSystemMessage(text:String) : void
{
if(this.minimizedMode && container.numChildren > this.MIN_MESSAGES || !this.minimizedMode && container.numChildren >= this.MAX_MESSAGES)
{
this.shiftMessages();
}
var line:BattleChatSystemLine = new BattleChatSystemLine(300,text);
line.addEventListener(ChatOutputLineEvent.KILL_ME,this.onKillLine);
this.buffer.push(line);
if(this.buffer.length > this.MAX_MESSAGES)
{
this.buffer.shift();
}
pushMessage(line);
}
override public function shiftMessages(deleteFromBuffer:Boolean = false) : MessageLine
{
var line:MessageLine = super.shiftMessages();
this.y += shift;
if(deleteFromBuffer)
{
this.buffer.shift();
}
return line;
}
public function maximize() : void
{
var i:int = 0;
var line:MessageLine = null;
this.minimizedMode = false;
var len:int = this.buffer.length - container.numChildren;
for(i = 0; i < container.numChildren; i++)
{
line = MessageLine(container.getChildAt(i));
line.killStop();
}
for(i = len - 1; i >= 0; i--)
{
try
{
unshiftMessage(MessageLine(this.buffer[i]));
}
catch(err:Error)
{
}
}
}
public function minimize() : void
{
var i:int = 0;
var line:MessageLine = null;
this.minimizedMode = true;
var len:int = container.numChildren - this.MIN_MESSAGES;
for(i = 0; i < len; i++)
{
this.shiftMessages();
}
for(i = 0; i < container.numChildren; i++)
{
line = MessageLine(container.getChildAt(i));
if(!line.live)
{
this.shiftMessages();
i--;
}
else
{
line.killStart();
}
}
}
public function clear() : void
{
this.buffer.length = 0;
for(var i:int = container.numChildren - 1; i >= 0; i--)
{
container.removeChildAt(i);
}
}
private function onKillLine(e:ChatOutputLineEvent) : void
{
if(this.minimizedMode && container.contains(e.line))
{
this.shiftMessages();
}
e.line.removeEventListener(ChatOutputLineEvent.KILL_ME,this.onKillLine);
}
}
}
|
package com.alternativaplatform.projects.tanks.client.models.ctf
{
public interface ICaptureTheFlagModelBase
{
}
}
|
package alternativa.tanks.gui.clanmanagement {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.components.flag.Flag;
import alternativa.tanks.loader.IModalLoaderService;
import alternativa.tanks.models.clan.info.IClanInfoModel;
import alternativa.tanks.models.clan.membersdata.ClanMembersDataService;
import alternativa.tanks.models.service.ClanService;
import alternativa.tanks.models.user.ClanUserService;
import alternativa.types.Long;
import base.DiscreteSprite;
import controls.TankWindowInner;
import controls.base.LabelBase;
import controls.base.ThreeLineBigButton;
import controls.windowinner.WindowInner;
import flash.display.Bitmap;
import flash.events.Event;
import flash.events.MouseEvent;
import forms.ColorConstants;
import forms.userlabel.UserLabel;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.clans.clan.clanflag.ClanFlag;
import projects.tanks.client.clans.clan.permissions.ClanPermission;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.AlertServiceEvent;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.IAlertService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.clan.ClanFunctionsService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.clan.ClanUserInfoService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.user.IUserInfoService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
public class ClanTopManagementPanel extends DiscreteSprite {
[Inject]
public static var userInfoService:IUserInfoService;
[Inject]
public static var userPropertiesService:IUserPropertiesService;
[Inject]
public static var clanService:ClanService;
[Inject]
public static var clanUserService:ClanUserService;
[Inject]
public static var clanUserInfoService:ClanUserInfoService;
[Inject]
public static var alertService:IAlertService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var clanFunctionsService:ClanFunctionsService;
[Inject]
public static var clanMembersService:ClanMembersDataService;
[Inject]
public static var modalLoaderService:IModalLoaderService;
private static var currentUserId:Long;
private static const MARGIN:int = 10;
public static const HEIGHT:int = 120;
private var bitmapTOIcon:Class = ClanTopManagementPanel_bitmapTOIcon;
private var TOIcon:Bitmap = new this.bitmapTOIcon();
private var inner:WindowInner;
private var clanNameLabel:LabelBase = new LabelBase();
private var clanTagLabel:LabelBase = new LabelBase();
private var clanTagText:LabelBase = new LabelBase();
private var clanCreatorLabel:UserLabel;
private var clanCreatorText:LabelBase;
private var clanFlagPic:Flag = new Flag();
private var membersCountLabel:LabelBase = new LabelBase();
private var creationDateLabel:LabelBase = new LabelBase();
private var enterOrLeaveButton:ThreeLineBigButton = new ThreeLineBigButton();
private var _width:int;
private var _height:int = 120;
public function ClanTopManagementPanel(param1:IGameObject) {
super();
var local2:IClanInfoModel = IClanInfoModel(param1.adapt(IClanInfoModel));
this.inner = new WindowInner(this._width,this._height,TankWindowInner.GREEN);
this.inner.showBlink = true;
addChild(this.inner);
this.clanNameLabel.bold = true;
this.clanNameLabel.size = 16;
var local3:String = local2.getClanName();
this.clanNameLabel.text = local3;
this.clanCreatorLabel = new UserLabel(clanService.creatorId,false);
this.clanFlagPic.setFlag(local2.getClanFlag());
this.clanTagLabel.text = "[" + local2.getClanTag() + "]";
this.setMembersCount();
this.creationDateLabel.text = localeService.getText(TanksLocale.TEXT_CLAN_CREATION_DATE_WITH_COLON) + " " + clanService.creationDate;
this.clanCreatorText = new LabelBase();
this.clanCreatorText.text = localeService.getText(TanksLocale.TEXT_CLAN_FOUNDER_WITH_COLON);
this.clanTagText.text = localeService.getText(TanksLocale.TEXT_CLAN_TAG_WITH_COLON);
this.clanTagLabel.color = ColorConstants.GREEN_LABEL;
this.inner.addChild(this.TOIcon);
this.inner.addChild(this.clanNameLabel);
this.inner.addChild(this.clanFlagPic);
this.inner.addChild(this.clanCreatorText);
this.inner.addChild(this.clanCreatorLabel);
this.inner.addChild(this.clanTagText);
this.inner.addChild(this.clanTagLabel);
this.inner.addChild(this.membersCountLabel);
this.inner.addChild(this.creationDateLabel);
var local4:Boolean = clanMembersService.getPermission(getCurrentUserId()) == ClanPermission.SUPREME_COMMANDER;
if(!local4) {
this.enterOrLeaveButton.label = localeService.getText(TanksLocale.TEXT_CLAN_LEAVE);
this.inner.addChild(this.enterOrLeaveButton);
this.enterOrLeaveButton.addEventListener(MouseEvent.CLICK,this.onLeaveClick);
}
if(local4 && local2.getUsersCount() == 1) {
this.enterOrLeaveButton.label = localeService.getText(TanksLocale.TEXT_CLAN_DISBAND);
this.inner.addChild(this.enterOrLeaveButton);
this.enterOrLeaveButton.addEventListener(MouseEvent.CLICK,this.onDissolveClick);
}
addEventListener(Event.ADDED_TO_STAGE,this.addResizeListener);
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
}
private static function getCurrentUserId() : Long {
if(currentUserId == null) {
currentUserId = userPropertiesService.userId;
}
return currentUserId;
}
public function setFlag(param1:ClanFlag) : void {
this.clanFlagPic.setFlag(param1);
}
private function onDissolveClick(param1:MouseEvent) : void {
alertService.showAlert(localeService.getText(TanksLocale.TEXT_CLAN_ALERT_DISBAND_CLAN),Vector.<String>([localeService.getText(TanksLocale.TEXT_FRIENDS_YES),localeService.getText(TanksLocale.TEXT_FRIENDS_CANCEL_BUTTON_TEXT)]));
alertService.addEventListener(AlertServiceEvent.ALERT_BUTTON_PRESSED,this.onClanDissolveConfirm);
}
private function onLeaveClick(param1:MouseEvent) : void {
alertService.showAlert(localeService.getText(TanksLocale.TEXT_CLAN_ALERT_LEAVE_CLAN),Vector.<String>([localeService.getText(TanksLocale.TEXT_FRIENDS_YES),localeService.getText(TanksLocale.TEXT_FRIENDS_CANCEL_BUTTON_TEXT)]));
alertService.addEventListener(AlertServiceEvent.ALERT_BUTTON_PRESSED,this.onClanLeavingConfirm);
}
private function onClanLeavingConfirm(param1:AlertServiceEvent) : void {
alertService.removeEventListener(AlertServiceEvent.ALERT_BUTTON_PRESSED,this.onClanLeavingConfirm);
if(param1.typeButton == localeService.getText(TanksLocale.TEXT_FRIENDS_YES)) {
this.enterOrLeaveButton.enabled = false;
modalLoaderService.show();
clanFunctionsService.leave();
}
}
private function onClanDissolveConfirm(param1:AlertServiceEvent) : void {
alertService.removeEventListener(AlertServiceEvent.ALERT_BUTTON_PRESSED,this.onClanDissolveConfirm);
if(param1.typeButton == localeService.getText(TanksLocale.TEXT_FRIENDS_YES)) {
modalLoaderService.show();
this.enterOrLeaveButton.enabled = false;
clanFunctionsService.leave();
}
}
private function addResizeListener(param1:Event) : void {
stage.addEventListener(Event.RESIZE,this.onResize);
this.onResize();
}
private function onResize(param1:Event = null) : void {
this.inner.width = this.width;
this.TOIcon.x = MARGIN;
this.TOIcon.y = MARGIN;
this.clanNameLabel.mouseEnabled = false;
this.clanNameLabel.color = 16777215;
this.clanNameLabel.x = this.TOIcon.x + this.TOIcon.width + MARGIN;
this.clanNameLabel.y = MARGIN;
this.clanFlagPic.x = this.clanNameLabel.x + this.clanNameLabel.width + 5;
this.clanFlagPic.y = this.clanNameLabel.y + 2;
this.clanCreatorText.x = this.clanNameLabel.x;
this.clanCreatorText.y = this.clanNameLabel.y + this.clanNameLabel.height;
this.clanCreatorLabel.mouseEnabled = false;
this.clanCreatorLabel.x = this.clanCreatorText.x + this.clanCreatorText.width;
this.clanCreatorLabel.y = this.clanCreatorText.y;
this.membersCountLabel.mouseEnabled = false;
this.membersCountLabel.x = this.clanNameLabel.x;
this.membersCountLabel.y = HEIGHT - this.membersCountLabel.height - MARGIN;
this.clanTagText.x = this.clanNameLabel.x;
this.clanTagText.y = this.membersCountLabel.y - this.clanTagText.height;
this.clanTagLabel.mouseEnabled = false;
this.clanTagLabel.x = this.clanTagText.x + this.clanTagText.width;
this.clanTagLabel.y = this.clanTagText.y;
this.creationDateLabel.mouseEnabled = false;
this.creationDateLabel.x = this.clanNameLabel.x;
this.creationDateLabel.y = this.clanTagText.y - this.clanTagText.height;
this.enterOrLeaveButton.x = this.width - this.enterOrLeaveButton.width - MARGIN;
this.enterOrLeaveButton.y = MARGIN;
}
private function setMembersCount() : void {
var local1:int = int(clanService.membersCount);
if(clanMembersService.getPermission(getCurrentUserId()) == ClanPermission.SUPREME_COMMANDER) {
this.enterOrLeaveButton.visible = local1 == 1;
}
this.membersCountLabel.text = localeService.getText(TanksLocale.TEXT_CLAN_NUMBER_MEMBERS_WITH_COLON) + " " + local1.toString();
}
public function userAdded() : void {
this.setMembersCount();
}
public function userRemoved() : void {
this.setMembersCount();
}
private function onRemoveFromStage(param1:Event) : void {
stage.removeEventListener(Event.RESIZE,this.onResize);
}
override public function get width() : Number {
return this._width;
}
override public function set width(param1:Number) : void {
this._width = param1;
this.onResize();
}
override public function get height() : Number {
return this._height;
}
override public function set height(param1:Number) : void {
this._height = param1;
this.onResize();
}
}
}
|
package alternativa.tanks.model.item.present {
import alternativa.types.Long;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class UserPresentAdapt implements UserPresent {
private var object:IGameObject;
private var impl:UserPresent;
public function UserPresentAdapt(param1:IGameObject, param2:UserPresent) {
super();
this.object = param1;
this.impl = param2;
}
public function getText() : String {
var result:String = null;
try {
Model.object = this.object;
result = this.impl.getText();
}
finally {
Model.popObject();
}
return result;
}
public function getPresenterId() : Long {
var result:Long = null;
try {
Model.object = this.object;
result = this.impl.getPresenterId();
}
finally {
Model.popObject();
}
return result;
}
public function getDate() : Date {
var result:Date = null;
try {
Model.object = this.object;
result = this.impl.getDate();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.gui.socialnetwork.vk {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.socialnetwork.vk.VkGroupThanksForEnteringWindow_thanksForEnteringBitmapDataClass.png")]
public class VkGroupThanksForEnteringWindow_thanksForEnteringBitmapDataClass extends BitmapAsset {
public function VkGroupThanksForEnteringWindow_thanksForEnteringBitmapDataClass() {
super();
}
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.guestform {
import flash.display.Shape;
import flash.display.Sprite;
public class BackgroundFill extends Sprite {
private var bgShape:Shape;
public function BackgroundFill() {
super();
this.bgShape = new Shape();
addChild(this.bgShape);
}
public function redraw(param1:int, param2:int) : void {
this.bgShape.graphics.clear();
this.bgShape.graphics.beginFill(0);
this.bgShape.graphics.drawRect(0,0,param1,param2);
}
}
}
|
package alternativa.resource
{
import alternativa.init.Main;
import alternativa.network.ICommandSender;
import alternativa.network.command.ControlCommand;
import alternativa.tanks.loader.ILoaderWindowService;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.utils.Dictionary;
public class BatchLoaderManager
{
private var maxActiveLoaders:int;
private var commandSender:ICommandSender;
private var numActiveLoaders:int;
private var activeLoaders:Dictionary;
private var waitingLoaders:Dictionary;
public function BatchLoaderManager(maxActiveLoaders:int, commandSender:ICommandSender)
{
this.activeLoaders = new Dictionary();
this.waitingLoaders = new Dictionary();
super();
this.maxActiveLoaders = maxActiveLoaders;
this.commandSender = commandSender;
}
public function addLoader(loader:BatchResourceLoader) : void
{
if(this.numActiveLoaders < this.maxActiveLoaders)
{
this.startLoader(loader);
}
else
{
this.waitingLoaders[loader.batchId] = loader;
}
}
private function startLoader(loader:BatchResourceLoader) : void
{
++this.numActiveLoaders;
this.activeLoaders[loader.batchId] = loader;
loader.addEventListener(Event.COMPLETE,this.onLoadingComplete);
loader.addEventListener(ErrorEvent.ERROR,this.onLoadingError);
loader.load();
}
private function onLoadingComplete(e:Event) : void
{
var loader:BatchResourceLoader = BatchResourceLoader(e.target);
loader.removeEventListener(Event.COMPLETE,this.onLoadingComplete);
loader.removeEventListener(ErrorEvent.ERROR,this.onLoadingError);
delete this.activeLoaders[loader.batchId];
--this.numActiveLoaders;
this.commandSender.sendCommand(new ControlCommand(ControlCommand.RESOURCES_LOADED,"resourcesLoaded",[loader.batchId]));
for each(loader in this.waitingLoaders)
{
delete this.waitingLoaders[loader.batchId];
this.startLoader(loader);
}
}
private function onLoadingError(e:ErrorEvent) : void
{
var loaderWindowService:ILoaderWindowService = null;
var loader:BatchResourceLoader = BatchResourceLoader(e.target);
delete this.activeLoaders[loader.batchId];
for each(loader in this.activeLoaders)
{
loader.close();
}
this.commandSender.close();
loaderWindowService = Main.osgi.getService(ILoaderWindowService) as ILoaderWindowService;
if(loaderWindowService != null)
{
loaderWindowService.hideLoaderWindow();
}
}
}
}
|
package alternativa.tanks.models.battlefield.effects.graffiti
{
import alternativa.init.Main;
import alternativa.object.ClientObject;
import alternativa.tanks.models.battlefield.BattlefieldModel;
import alternativa.tanks.models.battlefield.IBattleField;
import flash.display.DisplayObjectContainer;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.ui.Keyboard;
import flash.utils.Dictionary;
import flash.utils.Timer;
public class GraffitiModel
{
private static const COOLDOWN_TIME:int = 30;
private var seconds:int = 0;
private var battlefieldModel:BattlefieldModel;
private var guiLayer:DisplayObjectContainer;
private var menu:GraffitiMenu;
private var numGraffitis:int;
private var currId:int = 0;
private var toggle:Boolean = false;
private var graffitisByIndex:Dictionary;
private var canPut:Boolean = true;
private var countDownTimer:Timer;
public function GraffitiModel()
{
this.graffitisByIndex = new Dictionary();
super();
this.battlefieldModel = Main.osgi.getService(IBattleField) as BattlefieldModel;
this.guiLayer = Main.contentLayer;
this.menu = new GraffitiMenu();
}
public function initGraffitis(items:Array) : void
{
this.numGraffitis = items.length;
for(var i:int = 0; i < this.numGraffitis; i++)
{
this.graffitisByIndex[i] = items[i];
}
this.initButtons();
}
public function objectLoaded(object:ClientObject) : void
{
this.menu.visible = false;
this.guiLayer.addChild(this.menu);
this.guiLayer.stage.addEventListener(Event.RESIZE,this.onResize);
this.guiLayer.stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
this.guiLayer.stage.addEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
this.onResize(null);
}
public function objectUnloaded(object:ClientObject) : void
{
this.guiLayer.removeChild(this.menu);
this.guiLayer.stage.removeEventListener(Event.RESIZE,this.onResize);
this.guiLayer.stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
this.guiLayer.stage.removeEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
}
private function initButtons() : void
{
if(this.numGraffitis <= 1)
{
this.menu.lockNextButton();
this.menu.lockPrevButton();
}
else
{
this.menu.unlockNextButton();
this.menu.lockPrevButton();
}
this.menu.addEventNextClick(this.nextClick);
this.menu.addEventPrevClick(this.prevClick);
}
private function updateButtons() : void
{
if(this.currId == 0)
{
this.menu.lockPrevButton();
}
if(this.currId == 0 && this.numGraffitis > 1)
{
this.menu.lockPrevButton();
this.menu.unlockNextButton();
}
if(this.currId > 0)
{
this.menu.unlockPrevButton();
}
if(this.currId > 0 && this.currId < this.numGraffitis - 1)
{
this.menu.unlockPrevButton();
this.menu.unlockNextButton();
}
if(this.currId == this.numGraffitis - 1)
{
this.menu.lockNextButton();
}
}
private function nextClick(e:MouseEvent) : void
{
if(this.currId < this.numGraffitis - 1)
{
++this.currId;
this.menu.showPreview(this.graffitisByIndex[this.currId].id,this.graffitisByIndex[this.currId].name,this.graffitisByIndex[this.currId].count);
this.updateButtons();
}
}
private function prevClick(e:MouseEvent) : void
{
if(this.currId > 0)
{
--this.currId;
this.menu.showPreview(this.graffitisByIndex[this.currId].id,this.graffitisByIndex[this.currId].name,this.graffitisByIndex[this.currId].count);
this.updateButtons();
}
}
private function onResize(e:Event) : void
{
this.menu.x = Math.round((Main.stage.stageWidth - this.menu.width) * 0.5);
this.menu.y = Math.round((Main.stage.stageHeight - this.menu.height) * 0.5);
}
private function startCooldown() : void
{
this.countDownTimer = new Timer(1000);
this.countDownTimer.addEventListener(TimerEvent.TIMER,this.showLockTime);
this.countDownTimer.start();
}
private function showLockTime(e:TimerEvent = null) : void
{
var time:int = COOLDOWN_TIME - this.seconds;
this.menu.updateLockTime(time);
++this.seconds;
if(time <= 0)
{
this.countDownTimer.removeEventListener(TimerEvent.TIMER,this.showLockTime);
this.countDownTimer.stop();
this.seconds = 0;
this.canPut = true;
this.menu.unLockGraffiti();
if(this.menu.visible)
{
this.menu.showPreview(this.graffitisByIndex[this.currId].id,this.graffitisByIndex[this.currId].name,this.graffitisByIndex[this.currId].count);
}
}
}
private function onKeyDown(e:KeyboardEvent) : void
{
switch(e.keyCode)
{
case Keyboard.R:
if(this.toggle || this.graffitisByIndex[this.currId] == null)
{
return;
}
this.menu.openMenu(this.graffitisByIndex[this.currId]);
this.toggle = !this.toggle;
break;
}
}
private function onKeyUp(e:KeyboardEvent) : void
{
var i:* = undefined;
var newDict:Dictionary = null;
var k:* = undefined;
switch(e.keyCode)
{
case Keyboard.R:
if(!this.toggle || this.graffitisByIndex[this.currId] == null)
{
return;
}
if(!this.canPut)
{
this.menu.closeMenu();
this.toggle = !this.toggle;
return;
}
GraffitiManager.putGraffiti(this.graffitisByIndex[this.currId].id);
this.canPut = false;
this.menu.lockGraffiti();
this.startCooldown();
this.menu.closeMenu();
--this.graffitisByIndex[this.currId].count;
if(this.graffitisByIndex[this.currId].count <= 0)
{
delete this.graffitisByIndex[this.currId];
--this.numGraffitis;
this.currId = 0;
i = 0;
newDict = new Dictionary();
for(k in this.graffitisByIndex)
{
newDict[i] = this.graffitisByIndex[k];
i++;
}
this.graffitisByIndex = newDict;
}
this.toggle = !this.toggle;
break;
}
}
}
}
|
package alternativa.tanks.model.item.device {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.garage.models.item.device.ItemDevicesCC;
public class ItemDevicesGarageEvents implements ItemDevicesGarage {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function ItemDevicesGarageEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function buyDevice(param1:IGameObject, param2:int) : void {
var i:int = 0;
var m:ItemDevicesGarage = null;
var device:IGameObject = param1;
var expectedPrice:int = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ItemDevicesGarage(this.impl[i]);
m.buyDevice(device,expectedPrice);
i++;
}
}
finally {
Model.popObject();
}
}
public function insertDevice(param1:IGameObject) : void {
var i:int = 0;
var m:ItemDevicesGarage = null;
var device:IGameObject = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ItemDevicesGarage(this.impl[i]);
m.insertDevice(device);
i++;
}
}
finally {
Model.popObject();
}
}
public function removeDevice() : void {
var i:int = 0;
var m:ItemDevicesGarage = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ItemDevicesGarage(this.impl[i]);
m.removeDevice();
i++;
}
}
finally {
Model.popObject();
}
}
public function getParams() : ItemDevicesCC {
var result:ItemDevicesCC = null;
var i:int = 0;
var m:ItemDevicesGarage = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ItemDevicesGarage(this.impl[i]);
result = m.getParams();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.engine3d {
public class CachedEntityStat {
public var requestCount:int;
public var releaseCount:int;
public var createCount:int;
public var destroyCount:int;
public function CachedEntityStat() {
super();
}
public function clear() : void {
this.requestCount = 0;
this.releaseCount = 0;
this.createCount = 0;
this.destroyCount = 0;
}
}
}
|
package alternativa.gfx.agal {
public class CommonRegister extends Register {
protected static const X:int = 0;
protected static const Y:int = 1;
protected static const Z:int = 2;
protected static const W:int = 3;
public var x:Register;
public var y:Register;
public var z:Register;
public var w:Register;
public var xyz:Register;
public var xy:Register;
public var xw:Register;
public var xz:Register;
public var zw:Register;
public function CommonRegister(param1:int, param2:int) {
super();
this.index = param1;
this.emitCode = param2;
this.x = Register.get(getSwizzle(X,X,X,X),getDestMask(true,false,false,false),this);
this.y = Register.get(getSwizzle(Y,Y,Y,Y),getDestMask(false,true,false,false),this);
this.z = Register.get(getSwizzle(Z,Z,Z,Z),getDestMask(false,false,true,false),this);
this.w = Register.get(getSwizzle(W,W,W,W),getDestMask(false,false,false,true),this);
this.xyz = Register.get(getSwizzle(X,Y,Z,Z),getDestMask(true,true,true,false),this);
this.xy = Register.get(getSwizzle(X,Y,Y,Y),getDestMask(true,true,false,false),this);
this.xz = Register.get(getSwizzle(X,Z,Z,Z),getDestMask(true,false,true,false),this);
this.xw = Register.get(getSwizzle(X,W,W,W),getDestMask(true,false,false,true),this);
this.zw = Register.get(getSwizzle(Z,W,W,W),getDestMask(false,false,true,true),this);
}
}
}
|
package alternativa.tanks.model.item.upgradable {
import controls.timer.CountDownTimer;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class UpgradableItemAdapt implements UpgradableItem {
private var object:IGameObject;
private var impl:UpgradableItem;
public function UpgradableItemAdapt(param1:IGameObject, param2:UpgradableItem) {
super();
this.object = param1;
this.impl = param2;
}
public function getUpgradableItem() : UpgradableItemParams {
var result:UpgradableItemParams = null;
try {
Model.object = this.object;
result = this.impl.getUpgradableItem();
}
finally {
Model.popObject();
}
return result;
}
public function getUpgradableProperties() : Vector.<UpgradableItemPropertyValue> {
var result:Vector.<UpgradableItemPropertyValue> = null;
try {
Model.object = this.object;
result = this.impl.getUpgradableProperties();
}
finally {
Model.popObject();
}
return result;
}
public function getVisibleUpgradableProperties() : Vector.<UpgradableItemPropertyValue> {
var result:Vector.<UpgradableItemPropertyValue> = null;
try {
Model.object = this.object;
result = this.impl.getVisibleUpgradableProperties();
}
finally {
Model.popObject();
}
return result;
}
public function isUpgrading() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.isUpgrading());
}
finally {
Model.popObject();
}
return result;
}
public function speedUp() : void {
try {
Model.object = this.object;
this.impl.speedUp();
}
finally {
Model.popObject();
}
}
public function getCountDownTimer() : CountDownTimer {
var result:CountDownTimer = null;
try {
Model.object = this.object;
result = this.impl.getCountDownTimer();
}
finally {
Model.popObject();
}
return result;
}
public function traceUpgrades() : void {
try {
Model.object = this.object;
this.impl.traceUpgrades();
}
finally {
Model.popObject();
}
}
public function hasUpgradeDiscount() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.hasUpgradeDiscount());
}
finally {
Model.popObject();
}
return result;
}
public function hasSpeedUpDiscount() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.hasSpeedUpDiscount());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.engine3d.controllers {
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Object3D;
import flash.display.InteractiveObject;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.geom.Matrix3D;
import flash.geom.Point;
import flash.geom.Vector3D;
import flash.ui.Keyboard;
import flash.utils.getTimer;
public class SimpleObjectController {
public static const ACTION_FORWARD:String = "ACTION_FORWARD";
public static const ACTION_BACK:String = "ACTION_BACK";
public static const ACTION_LEFT:String = "ACTION_LEFT";
public static const ACTION_RIGHT:String = "ACTION_RIGHT";
public static const ACTION_UP:String = "ACTION_UP";
public static const ACTION_DOWN:String = "ACTION_DOWN";
public static const ACTION_PITCH_UP:String = "ACTION_PITCH_UP";
public static const ACTION_PITCH_DOWN:String = "ACTION_PITCH_DOWN";
public static const ACTION_YAW_LEFT:String = "ACTION_YAW_LEFT";
public static const ACTION_YAW_RIGHT:String = "ACTION_YAW_RIGHT";
public static const ACTION_ACCELERATE:String = "ACTION_ACCELERATE";
public static const ACTION_MOUSE_LOOK:String = "ACTION_MOUSE_LOOK";
public var speed:Number;
public var speedMultiplier:Number;
public var mouseSensitivity:Number;
public var maxPitch:Number = 1e+22;
public var minPitch:Number = -1e+22;
private var eventSource:InteractiveObject;
private var _object:Object3D;
private var _up:Boolean;
private var _down:Boolean;
private var _forward:Boolean;
private var _back:Boolean;
private var _left:Boolean;
private var _right:Boolean;
private var _accelerate:Boolean;
private var displacement:Vector3D = new Vector3D();
private var mousePoint:Point = new Point();
private var mouseLook:Boolean;
private var objectTransform:Vector.<Vector3D>;
private var time:int;
private var actionBindings:Object = {};
protected var keyBindings:Object = {};
private var _vin:Vector.<Number> = new Vector.<Number>(3);
private var _vout:Vector.<Number> = new Vector.<Number>(3);
public function SimpleObjectController(param1:InteractiveObject, param2:Object3D, param3:Number, param4:Number = 3, param5:Number = 1) {
super();
this.eventSource = param1;
this.object = param2;
this.speed = param3;
this.speedMultiplier = param4;
this.mouseSensitivity = param5;
this.actionBindings[ACTION_FORWARD] = this.moveForward;
this.actionBindings[ACTION_BACK] = this.moveBack;
this.actionBindings[ACTION_LEFT] = this.moveLeft;
this.actionBindings[ACTION_RIGHT] = this.moveRight;
this.actionBindings[ACTION_UP] = this.moveUp;
this.actionBindings[ACTION_DOWN] = this.moveDown;
this.actionBindings[ACTION_ACCELERATE] = this.accelerate;
this.setDefaultBindings();
this.enable();
}
public function enable() : void {
this.eventSource.addEventListener(KeyboardEvent.KEY_DOWN,this.onKey);
this.eventSource.addEventListener(KeyboardEvent.KEY_UP,this.onKey);
this.eventSource.addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
this.eventSource.addEventListener(MouseEvent.MOUSE_UP,this.onMouseUp);
}
public function disable() : void {
this.eventSource.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKey);
this.eventSource.removeEventListener(KeyboardEvent.KEY_UP,this.onKey);
this.eventSource.removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
this.eventSource.removeEventListener(MouseEvent.MOUSE_UP,this.onMouseUp);
this.stopMouseLook();
}
private function onMouseDown(param1:MouseEvent) : void {
this.startMouseLook();
}
private function onMouseUp(param1:MouseEvent) : void {
this.stopMouseLook();
}
public function startMouseLook() : void {
this.mousePoint.x = this.eventSource.mouseX;
this.mousePoint.y = this.eventSource.mouseY;
this.mouseLook = true;
}
public function stopMouseLook() : void {
this.mouseLook = false;
}
private function onKey(param1:KeyboardEvent) : void {
var local2:Function = this.keyBindings[param1.keyCode];
if(local2 != null) {
local2.call(this,param1.type == KeyboardEvent.KEY_DOWN);
}
}
public function get object() : Object3D {
return this._object;
}
public function set object(param1:Object3D) : void {
this._object = param1;
this.updateObjectTransform();
}
public function updateObjectTransform() : void {
if(this._object != null) {
this.objectTransform = this._object.matrix.decompose();
}
}
public function update() : void {
var local3:Number = NaN;
var local4:Number = NaN;
var local5:Vector3D = null;
var local6:Number = NaN;
var local7:Matrix3D = null;
if(this._object == null) {
return;
}
var local1:Number = this.time;
this.time = getTimer();
local1 = 0.001 * (this.time - local1);
if(local1 > 0.1) {
local1 = 0.1;
}
var local2:Boolean = false;
if(this.mouseLook) {
local3 = this.eventSource.mouseX - this.mousePoint.x;
local4 = this.eventSource.mouseY - this.mousePoint.y;
this.mousePoint.x = this.eventSource.mouseX;
this.mousePoint.y = this.eventSource.mouseY;
local5 = this.objectTransform[1];
local5.x -= local4 * Math.PI / 180 * this.mouseSensitivity;
if(local5.x > this.maxPitch) {
local5.x = this.maxPitch;
}
if(local5.x < this.minPitch) {
local5.x = this.minPitch;
}
local5.z -= local3 * Math.PI / 180 * this.mouseSensitivity;
local2 = true;
}
this.displacement.x = this._right ? 1 : (this._left ? -1 : 0);
this.displacement.y = this._forward ? 1 : (this._back ? -1 : 0);
this.displacement.z = this._up ? 1 : (this._down ? -1 : 0);
if(this.displacement.lengthSquared > 0) {
if(this._object is Camera3D) {
local6 = this.displacement.z;
this.displacement.z = this.displacement.y;
this.displacement.y = -local6;
}
this.deltaTransformVector(this.displacement);
if(this._accelerate) {
this.displacement.scaleBy(this.speedMultiplier * this.speed * local1 / this.displacement.length);
} else {
this.displacement.scaleBy(this.speed * local1 / this.displacement.length);
}
(this.objectTransform[0] as Vector3D).incrementBy(this.displacement);
local2 = true;
}
if(local2) {
local7 = new Matrix3D();
local7.recompose(this.objectTransform);
this._object.matrix = local7;
}
}
public function setObjectPos(param1:Vector3D) : void {
var local2:Vector3D = null;
if(this._object != null) {
local2 = this.objectTransform[0];
local2.x = param1.x;
local2.y = param1.y;
local2.z = param1.z;
}
}
public function setObjectPosXYZ(param1:Number, param2:Number, param3:Number) : void {
var local4:Vector3D = null;
if(this._object != null) {
local4 = this.objectTransform[0];
local4.x = param1;
local4.y = param2;
local4.z = param3;
}
}
public function lookAt(param1:Vector3D) : void {
this.lookAtXYZ(param1.x,param1.y,param1.z);
}
public function lookAtXYZ(param1:Number, param2:Number, param3:Number) : void {
if(this._object == null) {
return;
}
var local4:Vector3D = this.objectTransform[0];
var local5:Number = param1 - local4.x;
var local6:Number = param2 - local4.y;
var local7:Number = param3 - local4.z;
local4 = this.objectTransform[1];
local4.x = Math.atan2(local7,Math.sqrt(local5 * local5 + local6 * local6));
if(this._object is Camera3D) {
local4.x -= 0.5 * Math.PI;
}
local4.y = 0;
local4.z = -Math.atan2(local5,local6);
var local8:Matrix3D = this._object.matrix;
local8.recompose(this.objectTransform);
this._object.matrix = local8;
}
private function deltaTransformVector(param1:Vector3D) : void {
this._vin[0] = param1.x;
this._vin[1] = param1.y;
this._vin[2] = param1.z;
this._object.matrix.transformVectors(this._vin,this._vout);
var local2:Vector3D = this.objectTransform[0];
param1.x = this._vout[0] - local2.x;
param1.y = this._vout[1] - local2.y;
param1.z = this._vout[2] - local2.z;
}
public function moveForward(param1:Boolean) : void {
this._forward = param1;
}
public function moveBack(param1:Boolean) : void {
this._back = param1;
}
public function moveLeft(param1:Boolean) : void {
this._left = param1;
}
public function moveRight(param1:Boolean) : void {
this._right = param1;
}
public function moveUp(param1:Boolean) : void {
this._up = param1;
}
public function moveDown(param1:Boolean) : void {
this._down = param1;
}
public function accelerate(param1:Boolean) : void {
this._accelerate = param1;
}
public function bindKey(param1:uint, param2:String) : void {
var local3:Function = this.actionBindings[param2];
if(local3 != null) {
this.keyBindings[param1] = local3;
}
}
public function bindKeys(param1:Array) : void {
var local2:int = 0;
while(local2 < param1.length) {
this.bindKey(param1[local2],param1[local2 + 1]);
local2 += 2;
}
}
public function unbindKey(param1:uint) : void {
delete this.keyBindings[param1];
}
public function unbindAll() : void {
var local1:String = null;
for(local1 in this.keyBindings) {
delete this.keyBindings[local1];
}
}
public function setDefaultBindings() : void {
this.bindKey(87,ACTION_FORWARD);
this.bindKey(83,ACTION_BACK);
this.bindKey(65,ACTION_LEFT);
this.bindKey(68,ACTION_RIGHT);
this.bindKey(69,ACTION_UP);
this.bindKey(67,ACTION_DOWN);
this.bindKey(Keyboard.SHIFT,ACTION_ACCELERATE);
this.bindKey(Keyboard.UP,ACTION_FORWARD);
this.bindKey(Keyboard.DOWN,ACTION_BACK);
this.bindKey(Keyboard.LEFT,ACTION_LEFT);
this.bindKey(Keyboard.RIGHT,ACTION_RIGHT);
}
}
}
|
package org.osflash.signals.events {
import org.osflash.signals.IPrioritySignal;
public interface IEvent {
function get target() : Object;
function set target(value:Object) : void;
function get currentTarget() : Object;
function set currentTarget(value:Object) : void;
function get signal() : IPrioritySignal;
function set signal(value:IPrioritySignal) : void;
function get bubbles() : Boolean;
function set bubbles(value:Boolean) : void;
function clone() : IEvent;
}
}
|
package alternativa.tanks.help.achievements
{
import alternativa.init.Main;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.help.BubbleHelper;
import alternativa.tanks.help.HelperAlign;
import alternativa.tanks.locale.constants.TextConst;
public class UpRankHelper extends BubbleHelper
{
public function UpRankHelper()
{
super();
var localeService:ILocaleService = ILocaleService(Main.osgi.getService(ILocaleService));
text = localeService.getText(TextConst.HELP_UP_RANK_HELPER_TEXT);
arrowLehgth = int(localeService.getText(TextConst.HELP_UP_RANK_HELPER_ARROW_LENGTH));
arrowAlign = HelperAlign.TOP_LEFT;
_showLimit = 100;
}
}
}
|
package alternativa.tanks.models.statistics {
import alternativa.tanks.models.battle.gui.statistics.ShortUserInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class IStatisticsModelAdapt implements IStatisticsModel {
private var object:IGameObject;
private var impl:IStatisticsModel;
public function IStatisticsModelAdapt(param1:IGameObject, param2:IStatisticsModel) {
super();
this.object = param1;
this.impl = param2;
}
public function getBattleName() : String {
var result:String = null;
try {
Model.object = this.object;
result = this.impl.getBattleName();
}
finally {
Model.popObject();
}
return result;
}
public function userConnect(param1:ShortUserInfo) : void {
var shortUserInfo:ShortUserInfo = param1;
try {
Model.object = this.object;
this.impl.userConnect(shortUserInfo);
}
finally {
Model.popObject();
}
}
public function userDisconnect(param1:ShortUserInfo) : void {
var shortUserInfo:ShortUserInfo = param1;
try {
Model.object = this.object;
this.impl.userDisconnect(shortUserInfo);
}
finally {
Model.popObject();
}
}
public function updateUserKills(param1:Long, param2:int) : void {
var userId:Long = param1;
var userKills:int = param2;
try {
Model.object = this.object;
this.impl.updateUserKills(userId,userKills);
}
finally {
Model.popObject();
}
}
public function changeTeamScore(param1:BattleTeam, param2:int) : void {
var team:BattleTeam = param1;
var score:int = param2;
try {
Model.object = this.object;
this.impl.changeTeamScore(team,score);
}
finally {
Model.popObject();
}
}
public function turnOnTimerToRestoreBalance(param1:int) : void {
var timeToRestoreBalanceInSec:int = param1;
try {
Model.object = this.object;
this.impl.turnOnTimerToRestoreBalance(timeToRestoreBalanceInSec);
}
finally {
Model.popObject();
}
}
public function turnOffTimerToRestoreBalance() : void {
try {
Model.object = this.object;
this.impl.turnOffTimerToRestoreBalance();
}
finally {
Model.popObject();
}
}
public function notifyAboutTraining(param1:int) : void {
var durationInSec:int = param1;
try {
Model.object = this.object;
this.impl.notifyAboutTraining(durationInSec);
}
finally {
Model.popObject();
}
}
public function notifyAboutBattle(param1:int) : void {
var durationInSec:int = param1;
try {
Model.object = this.object;
this.impl.notifyAboutBattle(durationInSec);
}
finally {
Model.popObject();
}
}
public function getTimeLeftInSec() : int {
var result:int = 0;
try {
Model.object = this.object;
result = int(this.impl.getTimeLeftInSec());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.clients.fp10.TanksLauncher.service {
import flash.events.TimerEvent;
import flash.utils.Timer;
public class StatisticsCollectionService {
private static const TIMER_DELAY:int = 500;
private static const CATEGORY:String = "TanksLauncher";
private static const ACTION_LABEL_START:String = "startDownload";
private static const ACTION_LABEL_END:String = "endDownload";
private static const ACTION_LABEL_FINISH:String = "finishDownload";
private static const ACTION_LOADING_PROGRESS:String = "downloadProgress";
private static const ACTION_LOADING_ERROR:String = "loadingError";
private static const MAX_ERROR_MASSAGE_LENGTH:int = 50;
private var _trackerService:TrackerService;
private var _timer:Timer;
private var _counter:int;
public function StatisticsCollectionService() {
super();
this.init();
}
private function init() : void {
this._timer = new Timer(TIMER_DELAY);
this._timer.addEventListener(TimerEvent.TIMER,this.onTimer);
this._trackerService = new TrackerService();
}
private function onTimer(param1:TimerEvent) : void {
++this._counter;
var local2:Number = this._counter * TIMER_DELAY / 1000;
this._trackerService.trackEvent(CATEGORY,ACTION_LOADING_PROGRESS,"passed=" + local2 + " second");
}
public function start() : void {
this._trackerService.trackEvent(CATEGORY,ACTION_LOADING_PROGRESS,ACTION_LABEL_START);
this._timer.start();
}
public function finish() : void {
var local1:Number = this._counter * TIMER_DELAY / 1000;
this._trackerService.trackEvent(CATEGORY,ACTION_LOADING_PROGRESS,ACTION_LABEL_END);
this._trackerService.trackEvent(CATEGORY,ACTION_LOADING_PROGRESS,ACTION_LABEL_FINISH + "=" + local1 + " second");
this._timer.stop();
}
public function handleLoadingError(param1:String) : void {
this._timer.stop();
if(param1.length > MAX_ERROR_MASSAGE_LENGTH) {
param1 = param1.substr(0,MAX_ERROR_MASSAGE_LENGTH);
}
this._trackerService.trackEvent(CATEGORY,ACTION_LOADING_ERROR,param1);
}
}
}
|
package projects.tanks.clients.flash.resources.resource {
import flash.utils.ByteArray;
import flash.utils.Endian;
public class ParserWav {
public function ParserWav() {
super();
}
public function parse(param1:ByteArray, param2:int = 0, param3:Boolean = false) : Vector.<Number> {
var local12:int = 0;
var local13:Number = NaN;
var local14:Number = NaN;
var local15:Number = NaN;
var local16:Number = NaN;
if(param3) {
}
param1.position = 0;
param1.endian = Endian.LITTLE_ENDIAN;
var local4:ByteArray = new ByteArray();
param1.readBytes(local4,0,4);
if(local4.toString() != "RIFF") {
throw new Error("Incorrect file header.");
}
param1.position = 16;
if(param1.readUnsignedInt() != 16) {
throw new Error("Incorrect file size.");
}
if(param1.readShort() <= 0) {
throw new Error("Incorrect file format.");
}
var local5:int = param1.readShort();
if(param3) {
}
if(local5 < 1 || local5 > 2) {
throw new Error("Incorrect channels count.");
}
var local6:int = int(param1.readUnsignedInt());
if(param3) {
}
if(local6 != 22050 && local6 != 44100) {
throw new Error("Incorrect sample rate.");
}
var local7:int = int(param1.readUnsignedInt());
if(param3) {
}
var local8:int = param1.readShort();
if(param3) {
}
var local9:int = param1.readShort();
if(param3) {
}
if(local9 != 16 && local9 != 32) {
throw new Error("Incorrect bit depth.");
}
if(local8 <= 0) {
local8 = local5 * local9 / 8;
if(param3) {
}
}
param1.position += 4;
var local10:int = int(param1.readUnsignedInt());
if(param1.bytesAvailable < local10) {
local10 = int(param1.bytesAvailable);
}
param1.position = 44;
var local11:int = local10 / local5 / (local9 / 8);
if(param3) {
}
var local17:Vector.<Number> = new Vector.<Number>();
var local18:int = 0;
if(local6 == 22050) {
param2 >>= 1;
}
local12 = 0;
while(local12 < local11) {
if(local5 == 1) {
if(local9 == 16) {
local13 = param1.readShort() / 32768;
} else {
local13 = param1.readInt() / 2147483648;
}
if(local12 < param2) {
local13 *= local12 / param2;
} else if(local12 >= local11 - param2) {
local13 *= (local11 - local12 - 1) / param2;
}
local14 = local13;
} else {
if(local9 == 16) {
local13 = param1.readShort() / 32768;
local14 = param1.readShort() / 32768;
} else {
local13 = param1.readInt() / 2147483648;
local14 = param1.readInt() / 2147483648;
}
if(local12 < param2) {
local13 *= local12 / param2;
local14 *= local12 / param2;
} else if(local12 >= local11 - param2) {
local13 *= (local11 - local12 - 1) / param2;
local14 *= (local11 - local12 - 1) / param2;
}
}
if(local6 == 22050) {
if(local12 > 0) {
local17[local18] = (local15 + local13) * 0.5;
local18++;
local17[local18] = (local16 + local14) * 0.5;
local18++;
}
local15 = local13;
local16 = local14;
}
local17[local18] = local13;
local18++;
local17[local18] = local14;
local18++;
local12++;
}
if(local6 == 22050) {
local17[local18] = (local15 + local17[0]) * 0.5;
local18++;
local17[local18] = (local16 + local17[1]) * 0.5;
local18++;
}
if(param3) {
}
return local17;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapons.common.shell {
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.weapons.common.shell.ShellState;
public class VectorCodecShellStateLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecShellStateLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ShellState,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.<ShellState> = new Vector.<ShellState>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ShellState(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ShellState = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ShellState> = Vector.<ShellState>(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.gui.statistics.field.wink {
import alternativa.tanks.models.battle.gui.gui.statistics.field.IconField;
import flash.display.DisplayObject;
import flash.events.Event;
public class WinkingField extends IconField implements IWinkingField {
protected var _value:int;
protected var winkLimit:int;
private var winkManager:WinkManager;
public function WinkingField(param1:int, param2:DisplayObject, param3:WinkManager) {
super(param2);
this.winkLimit = param1;
this.winkManager = param3;
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage);
}
public function set value(param1:int) : void {
this._value = param1;
this.updateLabel();
if(this._value <= this.winkLimit) {
this.startWink();
} else {
this.stopWink();
}
}
public function startWink() : void {
if(this.winkManager != null) {
this.winkManager.addField(this);
}
}
public function stopWink() : void {
if(this.winkManager != null) {
this.winkManager.removeField(this);
}
label.visible = true;
}
public function setVisible(param1:Boolean) : void {
label.visible = param1;
}
protected function updateLabel() : void {
text = this._value.toString();
}
protected function onRemovedFromStage(param1:Event) : void {
this.stopWink();
}
}
}
|
package alternativa.tanks.model.item.container {
public interface ContainerPanelAction {
function needBuyButton() : Boolean;
function clickBuyButton() : void;
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapon.weakening {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.tankparts.weapon.weakening.WeaponWeakeningCC;
public class VectorCodecWeaponWeakeningCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecWeaponWeakeningCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(WeaponWeakeningCC,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.<WeaponWeakeningCC> = new Vector.<WeaponWeakeningCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = WeaponWeakeningCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:WeaponWeakeningCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<WeaponWeakeningCC> = Vector.<WeaponWeakeningCC>(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.gui.statistics.messages {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.messages.KillMessageOutputLine_ricochetIconClass.png")]
public class KillMessageOutputLine_ricochetIconClass extends BitmapAsset {
public function KillMessageOutputLine_ricochetIconClass() {
super();
}
}
}
|
package alternativa.tanks.gui.upgrade {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.crystalbutton.CrystalButton;
import alternativa.tanks.model.item.upgradable.UpgradableItem;
import alternativa.tanks.service.item.ItemService;
import controls.buttons.h50px.GreyBigButtonSkin;
import controls.labels.CountDownTimerLabel;
import controls.timer.CountDownTimer;
import controls.timer.CountDownTimerOnCompleteAfter;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class UpgradeButton extends CrystalButton implements CountDownTimerOnCompleteAfter {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var itemService:ItemService;
private static const MARGIN:* = 11;
private static const WIDTH:* = 120;
protected var showOnlyCaption:Boolean;
private var timerLabel:CountDownTimerLabel = new CountDownTimerLabel();
private var timer:CountDownTimer;
public function UpgradeButton() {
this.timerLabel.align = TextFormatAlign.CENTER;
this.timerLabel.autoSize = TextFieldAutoSize.NONE;
this.timerLabel.selectable = false;
this.timerLabel.height = 24;
this.timerLabel.size = 12;
this.timerLabel.visible = false;
super();
infoContainer.addChild(this.timerLabel);
crystalLabel.visible = false;
}
public function update(param1:IGameObject) : * {
this.updateUpgradeButton(param1);
this.setButtonsPosition();
}
private function setButtonsPosition() : void {
x = MARGIN + WIDTH + 15;
}
public function setUpgradeButton(param1:Boolean) : void {
setText(localeService.getText(TanksLocale.TEXT_GARAGE_UPGRADE_TEXT));
setSkin(GreyBigButtonSkin.GREY_SKIN);
setSale(param1);
this.showOnlyCaption = true;
this.show();
}
public function setUpgradedButton() : void {
setText(localeService.getText(TanksLocale.TEXT_BATTLE_UPGRADES_TEXT));
setSkin(GreyBigButtonSkin.GREY_SKIN);
setSale(false);
this.showOnlyCaption = true;
this.show();
}
public function setUpgradingButton(param1:CountDownTimer, param2:Boolean = false) : void {
this.startTimer(param1);
setSale(param2);
setText(localeService.getText(TanksLocale.TEXT_BATTLE_UPGRADES_TEXT));
this.showOnlyCaption = false;
this.show();
}
override protected function show() : void {
if(this.showOnlyCaption) {
this.timerLabel.visible = false;
showInOneRow(captionLabel);
} else {
this.timerLabel.visible = true;
showInTwoRows(captionLabel,this.timerLabel);
}
}
override public function set visible(param1:Boolean) : void {
super.visible = param1;
}
public function startTimer(param1:CountDownTimer) : void {
if(this.timer != null) {
this.timer.removeListener(CountDownTimerOnCompleteAfter,this);
}
this.timer = param1;
if(param1.getRemainingSeconds() > 0) {
this.showTime();
param1.addListener(CountDownTimerOnCompleteAfter,this);
}
}
private function updateUpgradeButton(param1:IGameObject) : void {
var local2:UpgradableItem = null;
if(param1.hasModel(UpgradableItem)) {
local2 = UpgradableItem(param1.adapt(UpgradableItem));
if(local2.isUpgrading()) {
this.setUpgradingButton(local2.getCountDownTimer(),local2.hasSpeedUpDiscount());
} else if(itemService.isFullUpgraded(param1)) {
this.setUpgradedButton();
} else {
this.setUpgradeButton(local2.hasUpgradeDiscount());
}
}
}
private function showTime() : void {
this.timerLabel.width = int(width) - 4;
this.timerLabel.visible = true;
this.timerLabel.start(this.timer);
this.resize();
}
private function resize() : void {
if(this.timerLabel.visible) {
_label.y = 8;
} else {
_label.y = 15;
}
}
public function hideTime() : void {
if(this.timer != null) {
this.timer.removeListener(CountDownTimerOnCompleteAfter,this);
this.timer = null;
}
this.timerLabel.visible = false;
this.timerLabel.stop();
this.resize();
}
public function onCompleteAfter(param1:CountDownTimer, param2:Boolean) : void {
this.hideTime();
}
}
}
|
package alternativa.osgi.catalogs {
import alternativa.osgi.service.IServiceRegisterListener;
import flash.utils.Dictionary;
public class ServiceListenersCatalog {
private var dictionary:Dictionary = new Dictionary();
private var listeners:Vector.<IServiceRegisterListener> = new Vector.<IServiceRegisterListener>();
public function ServiceListenersCatalog() {
super();
}
public function addListener(param1:IServiceRegisterListener, param2:String) : void {
var local3:Vector.<String> = this.dictionary[param1];
if(local3 == null) {
local3 = new Vector.<String>();
this.dictionary[param1] = local3;
}
if(local3.indexOf(param2) == -1) {
local3.push(param2);
}
if(this.listeners.indexOf(param1) == -1) {
this.listeners.push(param1);
}
}
public function removeListener(param1:IServiceRegisterListener, param2:String) : void {
var local3:Vector.<String> = this.dictionary[param1];
var local4:Number = Number(local3.indexOf(param2));
if(local4 >= 0) {
local3.splice(local4,1);
}
if(local3.length == 0) {
delete this.dictionary[param1];
local4 = Number(this.listeners.indexOf(param1));
this.listeners.splice(local4,1);
}
}
public function getListeners() : Vector.<IServiceRegisterListener> {
return this.listeners.concat();
}
public function getFilters(param1:IServiceRegisterListener) : Vector.<String> {
return this.dictionary[param1];
}
}
}
|
package controls.dropdownlist {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.dropdownlist.DPLBackground_bitmapBG.jpg")]
public class DPLBackground_bitmapBG extends BitmapAsset {
public function DPLBackground_bitmapBG() {
super();
}
}
}
|
package projects.tanks.clients.flash.commons.models.captcha {
import flash.events.Event;
public class RefreshCaptchaClickedEvent extends Event {
public static const CLICKED:String = "RefreshCaptchaClickedEvent.CLICKED";
public function RefreshCaptchaClickedEvent() {
super(CLICKED,true);
}
}
}
|
package alternativa.tanks.gui
{
import alternativa.init.Main;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.locale.constants.TextConst;
import controls.DefaultButton;
import controls.Label;
import controls.TankWindow;
import controls.TankWindowHeader;
import controls.TankWindowInner;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.text.TextFormatAlign;
public class AchievementCongratulationsWindow extends Sprite
{
[Embed(source="777.png")]
private static const _p:Class;
private static var bitmapData:BitmapData = new _p().bitmapData;
private var window:TankWindow;
private var inner:TankWindowInner;
private var message:Label;
private var present:Bitmap;
public var closeBtn:DefaultButton;
public function AchievementCongratulationsWindow()
{
super();
}
public function init(msg:String) : void
{
this.present = new Bitmap(bitmapData);
this.window = new TankWindow(Math.max(this.present.width + 12 * 2 + 9 * 2,300));
this.window.headerLang = ILocaleService(Main.osgi.getService(ILocaleService)).getText(TextConst.GUI_LANG);
this.window.header = TankWindowHeader.CONGRATULATIONS;
addChild(this.window);
this.inner = new TankWindowInner(0,0,TankWindowInner.GREEN);
addChild(this.inner);
this.inner.x = 12;
this.inner.y = 12;
this.message = new Label();
this.message.align = TextFormatAlign.CENTER;
this.message.wordWrap = true;
this.message.multiline = true;
this.message.size = 12;
this.message.htmlText = msg;
this.message.color = 5898034;
this.message.x = 12 * 2;
this.message.y = 12 * 2;
this.message.width = this.window.width - 12 * 4;
addChild(this.message);
if(this.message.numLines > 2)
{
this.message.align = TextFormatAlign.LEFT;
this.message.htmlText = msg;
this.message.width = this.window.width - 12 * 4;
}
this.present.x = this.window.width - this.present.width >> 1;
this.present.y = this.message.y + this.message.height + 9;
addChild(this.present);
this.closeBtn = new DefaultButton();
this.closeBtn.label = ILocaleService(Main.osgi.getService(ILocaleService)).getText(TextConst.FREE_BONUSES_WINDOW_BUTTON_CLOSE_TEXT);
addChild(this.closeBtn);
var height:int = this.present.height + this.closeBtn.height + 9 * 2 + 12 * 3;
height += this.message.height + 9;
this.window.height = height;
this.closeBtn.y = this.window.height - 9 - 35;
this.closeBtn.x = this.window.width - this.closeBtn.width >> 1;
this.inner.width = this.window.width - 12 * 2;
this.inner.height = this.window.height - 12 - 9 * 2 - 33 + 2;
}
}
}
|
package projects.tanks.client.partners.impl.rambler {
public interface IRamblerLoginModelBase {
}
}
|
package projects.tanks.client.panel.model.coin {
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 CoinInfoModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function CoinInfoModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.shaft {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
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 platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.types.Vector3d;
public class ShaftModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ShaftModelServer;
private var client:IShaftModelBase = IShaftModelBase(this);
private var modelId:Long = Long.getLong(170467452,-1685189911);
private var _activateManualTargetingId:Long = Long.getLong(741262612,-1895966548);
private var _activateManualTargeting_shooterCodec:ICodec;
private var _fireId:Long = Long.getLong(1921998262,-1791534114);
private var _fire_shooterCodec:ICodec;
private var _fire_staticHitPointCodec:ICodec;
private var _fire_targetCodec:ICodec;
private var _fire_targetHitPointCodec:ICodec;
private var _fire_impactForceCodec:ICodec;
private var _reconfigureWeaponId:Long = Long.getLong(1204032744,-1504214109);
private var _reconfigureWeapon_dischargeRateCodec:ICodec;
private var _reconfigureWeapon_fastShotEnergyCodec:ICodec;
private var _reconfigureWeapon_sniperModeLockedCodec:ICodec;
private var _stopManulaTargetingId:Long = Long.getLong(247034803,-90734157);
private var _stopManulaTargeting_shooterCodec:ICodec;
public function ShaftModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ShaftModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ShaftCC,false)));
this._activateManualTargeting_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._fire_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._fire_staticHitPointCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,true));
this._fire_targetCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,true));
this._fire_targetHitPointCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,true));
this._fire_impactForceCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._reconfigureWeapon_dischargeRateCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._reconfigureWeapon_fastShotEnergyCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._reconfigureWeapon_sniperModeLockedCodec = this._protocol.getCodec(new TypeCodecInfo(Boolean,false));
this._stopManulaTargeting_shooterCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false));
}
protected function getInitParam() : ShaftCC {
return ShaftCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._activateManualTargetingId:
this.client.activateManualTargeting(IGameObject(this._activateManualTargeting_shooterCodec.decode(param2)));
break;
case this._fireId:
this.client.fire(IGameObject(this._fire_shooterCodec.decode(param2)),Vector3d(this._fire_staticHitPointCodec.decode(param2)),IGameObject(this._fire_targetCodec.decode(param2)),Vector3d(this._fire_targetHitPointCodec.decode(param2)),Number(this._fire_impactForceCodec.decode(param2)));
break;
case this._reconfigureWeaponId:
this.client.reconfigureWeapon(Number(this._reconfigureWeapon_dischargeRateCodec.decode(param2)),Number(this._reconfigureWeapon_fastShotEnergyCodec.decode(param2)),Boolean(this._reconfigureWeapon_sniperModeLockedCodec.decode(param2)));
break;
case this._stopManulaTargetingId:
this.client.stopManulaTargeting(IGameObject(this._stopManulaTargeting_shooterCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.gui.upgrade {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.upgrade.UpgradeInfoForm_arrowClass.png")]
public class UpgradeInfoForm_arrowClass extends BitmapAsset {
public function UpgradeInfoForm_arrowClass() {
super();
}
}
}
|
package alternativa.tanks.gui {
public interface IDestroyWindow {
function destroy() : void;
}
}
|
package projects.tanks.client.panel.model.garage.resistance {
public interface IResistancesListModelBase {
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.resistance {
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.user.resistance.TankResistancesCC;
public class VectorCodecTankResistancesCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTankResistancesCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(TankResistancesCC,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.<TankResistancesCC> = new Vector.<TankResistancesCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TankResistancesCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TankResistancesCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TankResistancesCC> = Vector.<TankResistancesCC>(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.machinegun.sfx {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IMachineGunSFXModelAdapt implements IMachineGunSFXModel {
private var object:IGameObject;
private var impl:IMachineGunSFXModel;
public function IMachineGunSFXModelAdapt(param1:IGameObject, param2:IMachineGunSFXModel) {
super();
this.object = param1;
this.impl = param2;
}
public function getSfxData() : MachineGunSFXData {
var result:MachineGunSFXData = null;
try {
Model.object = this.object;
result = this.impl.getSfxData();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.init
{
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.tanks.bg.BackgroundService;
import alternativa.tanks.bg.IBackgroundService;
import alternativa.tanks.help.HelpService;
import alternativa.tanks.help.IHelpService;
import alternativa.tanks.loader.ILoaderWindowService;
import alternativa.tanks.loader.LoaderWindow;
import alternativa.tanks.model.achievement.AchievementModel;
import alternativa.tanks.model.achievement.IAchievementModel;
public class TanksServicesActivator implements IBundleActivator
{
public static var osgi:OSGi;
private var loaderWindow:LoaderWindow;
public function TanksServicesActivator()
{
super();
}
public function start(osgi:OSGi) : void
{
TanksServicesActivator.osgi = osgi;
var bgService:IBackgroundService = new BackgroundService();
osgi.registerService(IBackgroundService,bgService);
osgi.registerService(IHelpService,new HelpService());
osgi.registerService(IAchievementModel,new AchievementModel());
bgService.showBg();
this.loaderWindow = new LoaderWindow();
osgi.registerService(ILoaderWindowService,this.loaderWindow);
}
public function stop(osgi:OSGi) : void
{
osgi.unregisterService(IBackgroundService);
osgi.unregisterService(IHelpService);
osgi.unregisterService(ILoaderWindowService);
osgi.unregisterService(IAchievementModel);
this.loaderWindow = null;
TanksServicesActivator.osgi = null;
}
}
}
|
package scpacker.resource.listener
{
import flash.utils.Dictionary;
public class ResourceLoaderListener
{
public static var listeners:Vector.<Function> = new Vector.<Function>();
private static var isCalled:Dictionary = new Dictionary();
public function ResourceLoaderListener()
{
super();
}
public static function addEventListener(fun:Function) : void
{
listeners.push(fun);
}
public static function loadedComplete() : void
{
var resource:Function = null;
for each(resource in listeners)
{
resource.call();
isCalled[resource] = true;
}
}
public static function removeListener(f:Function) : void
{
var l:Function = null;
for each(l in listeners)
{
if(l == f)
{
listeners.removeAt(listeners.indexOf(l));
l = null;
}
}
}
public static function clearListeners(safely:Boolean = true) : void
{
var l:* = undefined;
for each(l in listeners)
{
if(isCalled[l])
{
isCalled[l] = null;
}
else if(safely)
{
l.call();
}
listeners.removeAt(listeners.indexOf(l));
l = null;
}
isCalled = new Dictionary();
listeners = new Vector.<Function>();
}
}
}
|
package alternativa.tanks.models.weapon.machinegun {
import alternativa.physics.collision.types.RayHit;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.WeaponObject;
import alternativa.tanks.models.weapon.common.HitInfo;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.models.weapon.machinegun.sfx.MachineGunSFXData;
import alternativa.tanks.models.weapons.common.CommonLocalWeapon;
import alternativa.tanks.models.weapons.stream.StreamWeaponCommunication;
import alternativa.tanks.models.weapons.targeting.TargetingResult;
import alternativa.tanks.models.weapons.targeting.TargetingSystem;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapons.machinegun.cc.MachineGunCC;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class MachineGunWeapon extends CommonLocalWeapon {
[Inject]
public static var battleService:BattleService;
private var gunParams:AllGlobalGunParams;
private var hitInfo:HitInfo = new HitInfo();
private var targetingSystem:TargetingSystem;
private var commonWeapon:MachineGunCommonWeapon;
private var callback:StreamWeaponCommunication;
private var target:Tank;
private var lastTarget:Tank;
private var weapon:WeaponObject;
private var hittingTime:int;
private var temperatureHittingTime:int;
private var params:MachineGunCC;
private var lastTime:int;
private var stopTime:int;
private var lastChangedTargetTime:int;
private var statusUpSpeed:Number;
private var spinUpTime:int;
private var spinDownTime:int;
private var buffed:Boolean;
public function MachineGunWeapon(param1:TargetingSystem, param2:IGameObject, param3:MachineGunCC, param4:MachineGunSFXData, param5:WeaponCommonData, param6:StreamWeaponCommunication, param7:IGameObject) {
super(true);
this.commonWeapon = new MachineGunCommonWeapon(param2,param3,param4,param5);
this.targetingSystem = param1;
this.callback = param6;
this.weapon = new WeaponObject(param7);
this.params = param3;
this.stopTime = 0;
this.lastTime = 0;
this.statusUpSpeed = 0;
this.spinUpTime = this.params.spinUpTime;
this.spinDownTime = this.params.spinDownTime;
this.buffed = false;
this.reset();
}
override public function init(param1:WeaponPlatform) : void {
super.init(param1);
this.commonWeapon.init(param1);
}
override public function activate() : void {
super.activate();
this.commonWeapon.activate();
}
override protected function start(param1:int) : void {
super.start(param1);
this.commonWeapon.start();
this.lastTime = param1;
this.hittingTime = param1 + this.spinUpTime;
this.temperatureHittingTime = this.hittingTime + this.params.temperatureHittingTime;
this.gunParams = this.commonWeapon.updateGunParams();
this.callback.fireStarted(param1);
}
override protected function stop(param1:int, param2:Boolean) : void {
var local3:Number = this.getStatus();
super.stop(param1,param2);
this.commonWeapon.stop();
var local4:int = this.commonWeapon.state * this.spinDownTime;
this.stopTime = param1 + local4;
if(local4 == 0) {
this.statusUpSpeed = 0;
} else {
this.statusUpSpeed = (1 - local3) / local4;
}
if(param2) {
this.callback.fireStopped(param1);
}
this.lastTarget = null;
this.target = null;
}
override public function runLogic(param1:int, param2:int) : void {
var local3:Boolean = false;
var local4:Number = NaN;
var local5:Boolean = false;
super.runLogic(param1,param2);
this.commonWeapon.updateCharacteristicsAndEffects(param2,isShooting());
if(isShooting()) {
this.gunParams = this.commonWeapon.updateGunParams();
local3 = this.calculateTargets();
local4 = this.commonWeapon.getPowerCoeff(param2,this.lastTime,this.hittingTime);
if(local4 > 0) {
this.commonWeapon.addRecoilForShooter(this.gunParams.direction,local4);
local5 = BattleUtils.isTurretAboveGround(this.getWeaponPlatform().getBody(),this.gunParams);
if(local5 && this.target != null && this.target.getUser() != null) {
this.commonWeapon.addImpactForTarget(this.hitInfo.body,this.hitInfo.position,this.gunParams.direction,local4);
} else {
this.target = null;
}
if(this.target != this.lastTarget || param1 > this.lastChangedTargetTime + 250) {
if(local5) {
this.callback.targetUpdate(param1,this.hitInfo.direction,this.target);
} else {
this.callback.targetsUpdateDummy(param1,this.gunParams.direction);
}
this.lastChangedTargetTime = param1;
}
}
if(local3) {
this.commonWeapon.setTargetPosition(this.hitInfo.position,this.target != null);
} else {
this.commonWeapon.clearTargetPosition();
}
}
this.lastTime = param1;
}
private function calculateTargets() : Boolean {
var local2:RayHit = null;
if(this.commonWeapon.state < 1) {
return false;
}
var local1:TargetingResult = this.targetingSystem.target(this.gunParams);
this.hitInfo.setResult(this.gunParams,local1);
this.lastTarget = this.target;
if(local1.hasTankHit()) {
local2 = local1.getSingleHit();
this.target = local2.shape.body.tank;
} else {
this.target = null;
}
return local1.hasAnyHit();
}
override public function getStatus() : Number {
if(this.buffed) {
return 1;
}
if(isShooting()) {
return Math.max(Math.min((this.temperatureHittingTime - this.lastTime) / this.params.temperatureHittingTime,1),0);
}
return 1 - Math.max(this.stopTime - this.lastTime,0) * this.statusUpSpeed;
}
override public function reset() : void {
super.reset();
this.commonWeapon.reset();
this.target = this.lastTarget = null;
}
override protected function canStart() : Boolean {
return this.lastTime >= this.stopTime;
}
override public function getWeaponPlatform() : WeaponPlatform {
return super.getWeaponPlatform();
}
override public function destroy() : void {
super.destroy();
this.callback = null;
this.params = null;
this.weapon = null;
this.targetingSystem = null;
this.commonWeapon.destroy();
}
override public function getResistanceProperty() : ItemProperty {
return ItemProperty.MACHINE_GUN_RESISTANCE;
}
override public function updateRecoilForce(param1:Number) : void {
this.commonWeapon.updateRecoilForce(param1);
}
override public function fullyRecharge() : void {
if(isShooting()) {
this.temperatureHittingTime = this.lastTime + this.params.temperatureHittingTime;
}
this.stopTime = this.lastTime;
}
public function updateSpinTimes(param1:int, param2:int) : void {
var local3:int = this.commonWeapon.getCurrentSpinUpTime();
var local4:int = param1 - local3;
this.spinUpTime = param1;
this.spinDownTime = param2;
if(isShooting()) {
this.hittingTime += local4 * (1 - this.commonWeapon.state);
}
this.temperatureHittingTime += local4;
this.commonWeapon.updateSpinTimes(param1,param2);
}
public function setBuffed(param1:Boolean) : void {
this.buffed = param1;
}
public function spin() : void {
this.commonWeapon.spin();
if(isShooting()) {
this.hittingTime = this.lastTime;
}
}
}
}
|
package alternativa.tanks.model.quest.common.gui.window.buttons.skin {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.quest.common.gui.window.buttons.skin.GreenBigButtonSkin_leftUpClass.png")]
public class GreenBigButtonSkin_leftUpClass extends BitmapAsset {
public function GreenBigButtonSkin_leftUpClass() {
super();
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class NewReferalWindow_bitmapIconMail extends BitmapAsset
{
public function NewReferalWindow_bitmapIconMail()
{
super();
}
}
}
|
package controls.rangicons
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class RangsIcon_p17 extends BitmapAsset
{
public function RangsIcon_p17()
{
super();
}
}
}
|
package alternativa.tanks.model.payment.saveprocessed {
import alternativa.osgi.OSGi;
import alternativa.tanks.gui.shop.shopitems.item.utils.FormatUtils;
import alternativa.tanks.model.payment.modes.PayMode;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import alternativa.tanks.model.payment.shop.discount.ShopDiscount;
import alternativa.tanks.model.payment.shop.item.ShopItem;
import flash.globalization.DateTimeFormatter;
import flash.globalization.DateTimeStyle;
import projects.tanks.client.tanksservices.model.logging.payment.PaymentAction;
import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.paymentactions.UserPaymentActionEvent;
import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.paymentactions.UserPaymentActionsService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.storage.IStorageService;
public class ProcessedPaymentServiceImp implements ProcessedPaymentService {
[Inject]
public static var storageService:IStorageService;
[Inject]
public static var paymentWindowService:PaymentWindowService;
private var dateFormatter:DateTimeFormatter;
private var timeFormatter:DateTimeFormatter;
public function ProcessedPaymentServiceImp() {
super();
this.dateFormatter = new DateTimeFormatter(DateTimeStyle.SHORT);
this.dateFormatter.setDateTimePattern("dd-MM-yyyy");
this.timeFormatter = new DateTimeFormatter(DateTimeStyle.SHORT);
this.timeFormatter.setDateTimePattern("HH:mm");
var local1:UserPaymentActionsService = UserPaymentActionsService(OSGi.getInstance().getService(UserPaymentActionsService));
local1.addEventListener(UserPaymentActionEvent.TYPE,this.onPaymentProcessed);
}
public function getLastProcessedPaymentInfo() : ProcessedPaymentInfo {
var local1:Object = storageService.getStorage().data.processedPayment;
return Boolean(local1) ? this.restoreProcessedPaymentInfo(local1) : null;
}
private function restoreProcessedPaymentInfo(param1:Object) : ProcessedPaymentInfo {
var local2:ProcessedPaymentInfo = new ProcessedPaymentInfo();
local2.currencyName = param1.currencyName;
local2.itemFinalPrice = param1.itemFinalPrice;
local2.itemId = param1.itemId;
local2.payModeId = param1.payModeId;
local2.payModeName = param1.payModeName;
local2.date = param1.date;
local2.time = param1.time;
return local2;
}
private function onPaymentProcessed(param1:UserPaymentActionEvent) : void {
if(param1.getPaymentAction() == PaymentAction.PROCEED) {
this.writeProcessedPayment();
}
}
private function writeProcessedPayment() : void {
var local1:ProcessedPaymentInfo = new ProcessedPaymentInfo();
var local2:ShopItem = ShopItem(paymentWindowService.getChosenItem().adapt(ShopItem));
var local3:PayMode = PayMode(paymentWindowService.getChosenPayMode().adapt(PayMode));
if(!local2 || !local3) {
return;
}
local1.currencyName = local2.getCurrencyName();
local1.itemFinalPrice = this.getFinalItemPrice(local3,local2);
local1.itemId = paymentWindowService.getChosenItem().id.toString();
local1.payModeId = paymentWindowService.getChosenPayMode().id.toString();
local1.payModeName = local3.getName();
var local4:Date = new Date();
local1.date = this.dateFormatter.format(local4);
local1.time = this.timeFormatter.format(local4);
storageService.getStorage().data.processedPayment = local1;
}
private function getFinalItemPrice(param1:PayMode, param2:ShopItem) : String {
var local3:Number = Number(param2.getPrice());
if(ShopDiscount(paymentWindowService.getChosenItem().adapt(ShopDiscount)).isEnabled()) {
local3 = Number(param2.getPriceWithDiscount());
}
if(param1.isDiscount()) {
local3 = Number(ShopDiscount(paymentWindowService.getChosenPayMode().adapt(ShopDiscount)).applyDiscount(local3));
}
return FormatUtils.valueToString(local3,param2.getCurrencyRoundingPrecision(),false);
}
}
}
|
package _codec.projects.tanks.client.panel.model.abonements {
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.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import projects.tanks.client.commons.types.ShopAbonementBonusTypeEnum;
import projects.tanks.client.commons.types.ShopCategoryEnum;
import projects.tanks.client.panel.model.abonements.ShopAbonementData;
public class CodecShopAbonementData implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_bonusType:ICodec;
private var codec_remainingTime:ICodec;
private var codec_shopCategory:ICodec;
public function CodecShopAbonementData() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_bonusType = param1.getCodec(new EnumCodecInfo(ShopAbonementBonusTypeEnum,false));
this.codec_remainingTime = param1.getCodec(new TypeCodecInfo(Long,false));
this.codec_shopCategory = param1.getCodec(new EnumCodecInfo(ShopCategoryEnum,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ShopAbonementData = new ShopAbonementData();
local2.bonusType = this.codec_bonusType.decode(param1) as ShopAbonementBonusTypeEnum;
local2.remainingTime = this.codec_remainingTime.decode(param1) as Long;
local2.shopCategory = this.codec_shopCategory.decode(param1) as ShopCategoryEnum;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:ShopAbonementData = ShopAbonementData(param2);
this.codec_bonusType.encode(param1,local3.bonusType);
this.codec_remainingTime.encode(param1,local3.remainingTime);
this.codec_shopCategory.encode(param1,local3.shopCategory);
}
}
}
|
package alternativa.utils
{
public class Task
{
private var _taskSequence:TaskSequence;
public function Task()
{
super();
}
public function run() : void
{
throw new Error("Not implemented");
}
public function set taskSequence(value:TaskSequence) : void
{
this._taskSequence = value;
}
protected final function completeTask() : void
{
this._taskSequence.taskComplete(this);
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.base {
public interface ShopButtonClickDisable {
function disableClick() : *;
}
}
|
package alternativa.tanks.models.weapon.shaft.states {
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.objects.tank.Tank;
public class ShaftTargetPoint {
private var tank:Tank;
private var globalPoint:Vector3 = new Vector3();
private var localPoint:Vector3 = new Vector3();
public function ShaftTargetPoint() {
super();
}
public function setTargetPoint(param1:Vector3, param2:Tank = null) : void {
this.globalPoint.copy(param1);
this.tank = param2;
if(this.hasTank()) {
this.localPoint.copy(param1);
BattleUtils.globalToLocal(param2.getBody(),this.localPoint);
}
}
public function hasTank() : Boolean {
return this.tank != null && this.tank.getBody() != null;
}
public function getTank() : Tank {
return this.tank;
}
public function getGlobalPoint() : Vector3 {
return this.globalPoint;
}
public function getLocalPoint() : Vector3 {
return this.localPoint;
}
public function reset() : void {
this.tank = null;
this.globalPoint.reset();
this.localPoint.reset();
}
}
}
|
package alternativa.tanks.model.payment.androidspecialoffer {
import projects.tanks.client.panel.model.shop.androidspecialoffer.offers.purchaseofupgrades.AndroidPurchaseOfUpgradesModelBase;
import projects.tanks.client.panel.model.shop.androidspecialoffer.offers.purchaseofupgrades.IAndroidPurchaseOfUpgradesModelBase;
[ModelInfo]
public class AndroidPurchaseOfUpgradesModel extends AndroidPurchaseOfUpgradesModelBase implements IAndroidPurchaseOfUpgradesModelBase {
public function AndroidPurchaseOfUpgradesModel() {
super();
}
}
}
|
package alternativa.tanks.models.weapon.ricochet {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.collision.CollisionDetector;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.scene3d.BattleScene3D;
import alternativa.tanks.engine3d.AnimatedSprite3D;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.shared.MarginalCollider;
import alternativa.tanks.models.weapon.splash.Splash;
import alternativa.tanks.models.weapon.weakening.DistanceWeakening;
import alternativa.tanks.models.weapons.shell.Shell;
import alternativa.tanks.models.weapons.shell.states.DummyShellStates;
import alternativa.tanks.models.weapons.shell.states.ShellStates;
import alternativa.tanks.physics.CollisionGroup;
import alternativa.tanks.sfx.AnimatedLightEffect;
import alternativa.tanks.sfx.AnimatedSpriteEffect;
import alternativa.tanks.sfx.ExternalObject3DPositionProvider;
import alternativa.tanks.sfx.SFXUtils;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.sfx.Sound3DEffect;
import alternativa.tanks.sfx.StaticObject3DPositionProvider;
import alternativa.tanks.utils.objectpool.ObjectPool;
import alternativa.tanks.utils.objectpool.Pool;
import flash.media.Sound;
import projects.tanks.client.battlefield.models.tankparts.weapon.ricochet.RicochetCC;
public class RicochetShot extends Shell {
public static const SPRITE_SIZE:Number = 300;
public static const EXPLOSION_SPRITE_SIZE:Number = 266;
public static const TRAIL_WIDTH:Number = 100;
private static const BUMP_FLASH_SPRITE_SIZE:Number = 80;
private static const TRAIL_LENGTH:Number = 300;
private static const NUM_RADIAL_RAYS:int = 6;
private static const staticHitNormal:Vector3 = new Vector3();
private static const barrelDirection:Vector3 = new Vector3();
private static const staticHitPoint:Vector3 = new Vector3();
private var sfxData:RicochetSFXData;
private var callback:RicochetWeaponCallback;
private var impactPoints:Vector.<Vector3>;
private var ricochetInitParams:RicochetCC;
private var sprite:AnimatedSprite3D;
private var weakening:DistanceWeakening;
private var ricochetCount:int;
private var tailTrail:TailTrail;
private var impactForce:Number;
private var lightingEffect:AnimatedLightEffect;
private var lightEffectPositionProvider:ExternalObject3DPositionProvider;
private var splash:Splash;
public function RicochetShot(param1:Pool) {
super(param1);
this.sprite = new AnimatedSprite3D(SPRITE_SIZE,SPRITE_SIZE);
this.sprite.looped = true;
this.tailTrail = new TailTrail(TRAIL_WIDTH,TRAIL_LENGTH);
this.impactPoints = new Vector.<Vector3>();
}
override protected function createShellStates() : ShellStates {
return DummyShellStates.INSTANCE;
}
public function init(param1:Number, param2:RicochetCC, param3:RicochetSFXData, param4:DistanceWeakening, param5:RicochetWeaponCallback, param6:Splash) : void {
this.impactForce = param1;
this.ricochetInitParams = param2;
this.sfxData = param3;
this.weakening = param4;
this.callback = param5;
this.splash = param6;
this.sprite.rotation = 2 * Math.PI * Math.random();
this.sprite.setAnimationData(param3.shotAnimation);
this.sprite.setFrameIndex(this.sprite.getNumFrames() * Math.random());
this.tailTrail.setMaterialToAllFaces(param3.tailTrailMaterial);
this.ricochetCount = 0;
this.impactPoints.length = 0;
this.lightingEffect = AnimatedLightEffect(battleService.getObjectPool().getObject(AnimatedLightEffect));
this.lightEffectPositionProvider = ExternalObject3DPositionProvider(battleService.getObjectPool().getObject(ExternalObject3DPositionProvider));
this.lightingEffect.init(this.lightEffectPositionProvider,param3.shellLightAnimation,AnimatedLightEffect.DEFAULT_MAX_DISTANCE,true);
}
override public function addToGame(param1:AllGlobalGunParams, param2:Vector3, param3:Body, param4:Boolean, param5:int) : void {
super.addToGame(param1,param2,param3,param4,param5);
var local6:BattleScene3D = battleService.getBattleScene3D();
local6.addObject(this.sprite);
local6.addObject(this.tailTrail);
local6.addObjectToExclusion(this.tailTrail);
local6.addGraphicEffect(this.lightingEffect);
}
override protected function update(param1:Number) : void {
var local4:Body = null;
var local5:Number = NaN;
var local6:Number = NaN;
var local7:int = 0;
var local8:Vector3 = null;
var local9:Boolean = false;
var local10:Number = NaN;
if(totalDistance >= this.ricochetInitParams.shotDistance) {
this.destroy();
return;
}
var local2:CollisionDetector = battleService.getBattleRunner().getCollisionDetector();
var local3:Number = this.ricochetInitParams.shellSpeed * param1;
prevPosition.copy(currPosition);
while(local3 > 0) {
local5 = -1;
local6 = local3;
if(local2.raycast(currPosition,flightDirection,CollisionGroup.WEAPON,local3,this,_rayHit)) {
local4 = _rayHit.shape.body;
local5 = _rayHit.t;
if(BattleUtils.isTankBody(local4)) {
this.impactPoints.push(_rayHit.position.clone().add(_rayHit.normal));
this.handleTargetHit(local4,_rayHit.position,flightDirection,totalDistance + local5,this.impactPoints);
return;
}
local6 = local5;
staticHitPoint.copy(_rayHit.position);
staticHitNormal.copy(_rayHit.normal);
}
local7 = 0;
while(local7 < NUM_RADIAL_RAYS) {
local8 = radialPoints[local7];
if(local2.raycast(local8,flightDirection,CollisionGroup.WEAPON,local6,this,_rayHit)) {
local4 = _rayHit.shape.body;
_hitPoint.copy(currPosition).addScaled(_rayHit.t,flightDirection);
local9 = BattleUtils.isTankBody(local4) && !this.thickRaycast(currPosition,_hitPoint);
if(local9) {
this.impactPoints.push(_hitPoint.clone());
this.handleTargetHit(local4,_hitPoint,flightDirection,totalDistance + _rayHit.t,this.impactPoints);
return;
}
}
local8.addScaled(local6,flightDirection);
local7++;
}
if(local5 > -1) {
totalDistance += local5;
local3 -= local5;
if(this.ricochetCount >= this.ricochetInitParams.maxRicochetCount) {
local10 = this.weakening.getImpactCoeff(totalDistance);
this.impactPoints.push(staticHitPoint.clone());
this.handleStaticHit(staticHitNormal,local10,local4);
return;
}
++this.ricochetCount;
currPosition.addScaled(local5,flightDirection);
this.reflectTrajectory(staticHitNormal);
this.createBumpEffects(currPosition);
this.impactPoints.push(currPosition.clone());
} else {
totalDistance += local3;
currPosition.addScaled(local3,flightDirection);
local3 = 0;
}
}
}
private function handleStaticHit(param1:Vector3, param2:Number = 1, param3:Body = null) : void {
var local4:Vector3 = this.impactPoints[this.impactPoints.length - 1];
local4.addScaled(0.1,param1);
var local5:Boolean = Boolean(this.splash.applySplashForce(local4,param2,param3));
this.createExplosionEffect(local4);
if(Boolean(this.callback) && local5) {
this.callback.onStaticHit(getShotId(),this.impactPoints);
}
this.destroy();
}
private function thickRaycast(param1:Vector3, param2:Vector3) : Boolean {
return MarginalCollider.segmentWithStaticIntersection(param1,param2);
}
private function reflectTrajectory(param1:Vector3) : void {
currPosition.addScaled(0.1,param1);
flightDirection.addScaled(-2 * flightDirection.dot(param1),param1);
initRadialPoints(currPosition,flightDirection);
}
override public function render(param1:int, param2:int) : void {
this.sprite.x = interpolatedPosition.x;
this.sprite.y = interpolatedPosition.y;
this.sprite.z = interpolatedPosition.z;
this.sprite.update(param2 / 1000);
var local3:Number = this.weakening.getImpactCoeff(totalDistance);
var local4:Number = SPRITE_SIZE * local3;
this.sprite.width = local4;
this.sprite.height = local4;
this.sprite.rotation -= 0.003 * param2;
var local5:Vector3 = battleService.getBattleScene3D().getCamera().position;
SFXUtils.alignObjectPlaneToView(this.tailTrail,interpolatedPosition,flightDirection,local5);
var local6:Number = currPosition.x - local5.x;
var local7:Number = currPosition.y - local5.y;
var local8:Number = currPosition.z - local5.z;
var local9:Number = local6 * local6 + local7 * local7 + local8 * local8;
if(local9 > 0.00001) {
local9 = 1 / Math.sqrt(local9);
local6 *= local9;
local7 *= local9;
local8 *= local9;
}
var local10:Number = local6 * flightDirection.x + local7 * flightDirection.y + local8 * flightDirection.z;
if(local10 < 0) {
local10 = -local10;
}
if(local10 > 0.5) {
this.tailTrail.alpha = 2 * (1 - local10) * local3;
} else {
this.tailTrail.alpha = local3;
}
this.lightEffectPositionProvider.setPosition(interpolatedPosition);
}
override protected function destroy() : void {
var local1:BattleScene3D = null;
super.destroy();
local1 = battleService.getBattleScene3D();
local1.removeObject(this.sprite);
this.sprite.material = null;
local1.removeObject(this.tailTrail);
this.tailTrail.setMaterialToAllFaces(null);
local1.removeObjectFromExclusion(this.tailTrail);
shooterBody = null;
this.ricochetInitParams = null;
this.sfxData = null;
this.weakening = null;
this.callback = null;
this.lightingEffect.kill();
this.lightingEffect = null;
this.lightEffectPositionProvider = null;
}
override public function considerBody(param1:Body) : Boolean {
return super.considerBody(param1) || this.ricochetCount > 0;
}
private function createExplosionEffect(param1:Vector3) : void {
var local2:ObjectPool = battleService.getObjectPool();
var local3:StaticObject3DPositionProvider = StaticObject3DPositionProvider(local2.getObject(StaticObject3DPositionProvider));
var local4:int = 50;
local3.init(param1,local4);
var local5:AnimatedSpriteEffect = AnimatedSpriteEffect(local2.getObject(AnimatedSpriteEffect));
var local6:Number = Math.random() * Math.PI * 2;
var local7:int = 0;
local5.init(EXPLOSION_SPRITE_SIZE,EXPLOSION_SPRITE_SIZE,this.sfxData.explosionAnimation,local6,local3,0.5,0.5,null,local7);
battleService.addGraphicEffect(local5);
this.addSoundEffect(this.sfxData.explosionSound,param1);
this.createExplosionLightEffect(param1);
}
private function createExplosionLightEffect(param1:Vector3) : void {
var local2:AnimatedLightEffect = AnimatedLightEffect(battleService.getObjectPool().getObject(AnimatedLightEffect));
var local3:StaticObject3DPositionProvider = StaticObject3DPositionProvider(battleService.getObjectPool().getObject(StaticObject3DPositionProvider));
local3.init(param1,50);
local2.init(local3,this.sfxData.hitLightAnimation);
battleService.addGraphicEffect(local2);
}
private function createRicochetLightEffect(param1:Vector3) : void {
var local2:AnimatedLightEffect = AnimatedLightEffect(battleService.getObjectPool().getObject(AnimatedLightEffect));
var local3:StaticObject3DPositionProvider = StaticObject3DPositionProvider(battleService.getObjectPool().getObject(StaticObject3DPositionProvider));
local3.init(param1,50);
local2.init(local3,this.sfxData.ricochetLightAnimation);
battleService.addGraphicEffect(local2);
}
private function addSoundEffect(param1:Sound, param2:Vector3) : void {
var local3:Number = NaN;
var local4:Sound3D = null;
var local5:Sound3DEffect = null;
if(param1 != null) {
local3 = 0.8;
local4 = Sound3D.create(param1,local3);
local5 = Sound3DEffect.create(param2,local4);
battleService.addSound3DEffect(local5);
}
}
private function handleTargetHit(param1:Body, param2:Vector3, param3:Vector3, param4:Number, param5:Vector.<Vector3>) : void {
this.createExplosionEffect(param2);
var local6:Number = this.weakening.getImpactCoeff(param4);
var local7:Tank = param1.tank;
local7.applyWeaponHit(param2,param3,local6 * this.impactForce);
this.splash.applySplashForce(param2,local6,param1);
this.onTargetHit(param1,param5);
this.destroy();
}
private function onTargetHit(param1:Body, param2:Vector.<Vector3>) : void {
if(Boolean(this.callback)) {
this.callback.onTargetHit(getShotId(),param1,param2);
}
}
private function createBumpEffects(param1:Vector3) : void {
var local2:ObjectPool = battleService.getObjectPool();
var local3:StaticObject3DPositionProvider = StaticObject3DPositionProvider(local2.getObject(StaticObject3DPositionProvider));
var local4:int = 50;
local3.init(param1,local4);
var local5:AnimatedSpriteEffect = AnimatedSpriteEffect(local2.getObject(AnimatedSpriteEffect));
local5.init(BUMP_FLASH_SPRITE_SIZE,BUMP_FLASH_SPRITE_SIZE,this.sfxData.ricochetFlashAnimation,Math.random() * Math.PI * 2,local3,0.5,0.5);
battleService.addGraphicEffect(local5);
this.addSoundEffect(this.sfxData.ricochetSound,param1);
this.createRicochetLightEffect(param1);
}
override protected function checkIfBarrelIntersectsWithObstacle() : Boolean {
var local1:CollisionDetector = battleService.getBattleRunner().getCollisionDetector();
barrelDirection.diff(currPosition,barrelOrigin);
var local2:Number = barrelDirection.length();
barrelDirection.normalize();
return this.doRaycastTests(barrelDirection,local2,local1);
}
private function doRaycastTests(param1:Vector3, param2:Number, param3:CollisionDetector) : Boolean {
if(param3.raycast(barrelOrigin,param1,CollisionGroup.WEAPON,param2,this,_rayHit)) {
this.impactPoints.push(_rayHit.position.clone());
if(BattleUtils.isTankBody(_rayHit.shape.body)) {
this.handleTargetHit(_rayHit.shape.body,_rayHit.position,param1,0,this.impactPoints);
return true;
}
if(this.ricochetCount >= this.ricochetInitParams.maxRicochetCount) {
this.handleStaticHit(_rayHit.normal);
return true;
}
++this.ricochetCount;
currPosition.copy(_rayHit.position);
this.reflectTrajectory(_rayHit.normal);
this.createBumpEffects(_rayHit.position);
return false;
}
return this.checkIfRadialPointsIntersectWithTarget(param1,param2,param3);
}
private function checkIfRadialPointsIntersectWithTarget(param1:Vector3, param2:Number, param3:CollisionDetector) : Boolean {
var local5:Vector3 = null;
var local6:Body = null;
initRadialPoints(barrelOrigin,param1);
var local4:int = 0;
while(local4 < NUM_RADIAL_RAYS) {
local5 = radialPoints[local4];
if(param3.raycast(local5,flightDirection,CollisionGroup.WEAPON,param2,this,_rayHit)) {
local6 = _rayHit.shape.body;
if(BattleUtils.isTankBody(local6)) {
_hitPoint.copy(barrelOrigin).addScaled(_rayHit.t,param1);
this.impactPoints.push(_hitPoint.clone());
this.handleTargetHit(local6,_hitPoint,param1,0,this.impactPoints);
return true;
}
}
local4++;
}
return false;
}
override protected function getRadius() : Number {
return this.ricochetInitParams.shellRadius;
}
override protected function getNumRadialRays() : int {
return NUM_RADIAL_RAYS;
}
}
}
|
package alternativa.math
{
import flash.geom.Vector3D;
public class Quaternion
{
private static var _q:Quaternion = new Quaternion();
public var w:Number;
public var x:Number;
public var y:Number;
public var z:Number;
public function Quaternion(w:Number = 1, x:Number = 0, y:Number = 0, z:Number = 0)
{
super();
this.w = w;
this.x = x;
this.y = y;
this.z = z;
}
public static function multiply(q1:Quaternion, q2:Quaternion, result:Quaternion) : void
{
result.w = q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z;
result.x = q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y;
result.y = q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z;
result.z = q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x;
}
public static function createFromAxisAngle(axis:Vector3, angle:Number) : Quaternion
{
var q:Quaternion = new Quaternion();
q.setFromAxisAngle(axis,angle);
return q;
}
public static function createFromAxisAngleComponents(x:Number, y:Number, z:Number, angle:Number) : Quaternion
{
var q:Quaternion = new Quaternion();
q.setFromAxisAngleComponents(x,y,z,angle);
return q;
}
public function reset(w:Number = 1, x:Number = 0, y:Number = 0, z:Number = 0) : Quaternion
{
this.w = w;
this.x = x;
this.y = y;
this.z = z;
return this;
}
public function normalize() : Quaternion
{
var d:Number = this.w * this.w + this.x * this.x + this.y * this.y + this.z * this.z;
if(d == 0)
{
this.w = 1;
}
else
{
d = 1 / Math.sqrt(d);
this.w *= d;
this.x *= d;
this.y *= d;
this.z *= d;
}
return this;
}
public function toMatrix4(param1:Matrix4) : Quaternion
{
var _loc2_:Number = NaN;
var _loc4_:Number = NaN;
var _loc6_:Number = NaN;
var _loc8_:Number = NaN;
var _loc5_:Number = NaN;
var _loc7_:Number = NaN;
_loc2_ = NaN;
_loc4_ = NaN;
_loc6_ = NaN;
_loc8_ = NaN;
_loc2_ = 2 * this.x * this.x;
var _loc3_:Number = 2 * this.y * this.y;
_loc4_ = 2 * this.z * this.z;
_loc5_ = 2 * this.x * this.y;
_loc6_ = 2 * this.y * this.z;
_loc7_ = 2 * this.z * this.x;
_loc8_ = 2 * this.w * this.x;
var _loc9_:Number = 2 * this.w * this.y;
var _loc10_:Number = 2 * this.w * this.z;
param1.a = 1 - _loc3_ - _loc4_;
param1.b = _loc5_ - _loc10_;
param1.c = _loc7_ + _loc9_;
param1.e = _loc5_ + _loc10_;
param1.f = 1 - _loc2_ - _loc4_;
param1.g = _loc6_ - _loc8_;
param1.i = _loc7_ - _loc9_;
param1.j = _loc6_ + _loc8_;
param1.k = 1 - _loc2_ - _loc3_;
return this;
}
public function prepend(q:Quaternion) : Quaternion
{
var ww:Number = this.w * q.w - this.x * q.x - this.y * q.y - this.z * q.z;
var xx:Number = this.w * q.x + this.x * q.w + this.y * q.z - this.z * q.y;
var yy:Number = this.w * q.y + this.y * q.w + this.z * q.x - this.x * q.z;
var zz:Number = this.w * q.z + this.z * q.w + this.x * q.y - this.y * q.x;
this.w = ww;
this.x = xx;
this.y = yy;
this.z = zz;
return this;
}
public function append(q:Quaternion) : Quaternion
{
var ww:Number = q.w * this.w - q.x * this.x - q.y * this.y - q.z * this.z;
var xx:Number = q.w * this.x + q.x * this.w + q.y * this.z - q.z * this.y;
var yy:Number = q.w * this.y + q.y * this.w + q.z * this.x - q.x * this.z;
var zz:Number = q.w * this.z + q.z * this.w + q.x * this.y - q.y * this.x;
this.w = ww;
this.x = xx;
this.y = yy;
this.z = zz;
return this;
}
public function rotateByVector(v:Vector3) : Quaternion
{
var ww:Number = -v.x * this.x - v.y * this.y - v.z * this.z;
var xx:Number = v.x * this.w + v.y * this.z - v.z * this.y;
var yy:Number = v.y * this.w + v.z * this.x - v.x * this.z;
var zz:Number = v.z * this.w + v.x * this.y - v.y * this.x;
this.w = ww;
this.x = xx;
this.y = yy;
this.z = zz;
return this;
}
public function addScaledVector(v:Vector3, scale:Number) : Quaternion
{
var vx:Number = v.x * scale;
var vy:Number = v.y * scale;
var vz:Number = v.z * scale;
var ww:Number = -this.x * vx - this.y * vy - this.z * vz;
var xx:Number = vx * this.w + vy * this.z - vz * this.y;
var yy:Number = vy * this.w + vz * this.x - vx * this.z;
var zz:Number = vz * this.w + vx * this.y - vy * this.x;
this.w += 0.5 * ww;
this.x += 0.5 * xx;
this.y += 0.5 * yy;
this.z += 0.5 * zz;
var d:Number = this.w * this.w + this.x * this.x + this.y * this.y + this.z * this.z;
if(d == 0)
{
this.w = 1;
}
else
{
d = 1 / Math.sqrt(d);
this.w *= d;
this.x *= d;
this.y *= d;
this.z *= d;
}
return this;
}
public function toMatrix3(m:Matrix3) : Quaternion
{
var xx2:Number = NaN;
var yy2:Number = NaN;
var yz2:Number = NaN;
var wy2:Number = NaN;
var wz2:Number = NaN;
xx2 = 2 * this.x * this.x;
yy2 = 2 * this.y * this.y;
var zz2:Number = 2 * this.z * this.z;
var xy2:Number = 2 * this.x * this.y;
yz2 = 2 * this.y * this.z;
var zx2:Number = 2 * this.z * this.x;
var wx2:Number = 2 * this.w * this.x;
wy2 = 2 * this.w * this.y;
wz2 = 2 * this.w * this.z;
m.a = 1 - yy2 - zz2;
m.b = xy2 - wz2;
m.c = zx2 + wy2;
m.e = xy2 + wz2;
m.f = 1 - xx2 - zz2;
m.g = yz2 - wx2;
m.i = zx2 - wy2;
m.j = yz2 + wx2;
m.k = 1 - xx2 - yy2;
return this;
}
public function length() : Number
{
return Math.sqrt(this.w * this.w + this.x * this.x + this.y * this.y + this.z * this.z);
}
public function lengthSqr() : Number
{
return this.w * this.w + this.x * this.x + this.y * this.y + this.z * this.z;
}
public function setFromAxisAngle(axis:Vector3, angle:Number) : Quaternion
{
this.w = Math.cos(0.5 * angle);
var k:Number = Math.sin(0.5 * angle) / Math.sqrt(axis.x * axis.x + axis.y * axis.y + axis.z * axis.z);
this.x = axis.x * k;
this.y = axis.y * k;
this.z = axis.z * k;
return this;
}
public function setFromAxisAngleComponents(x:Number, y:Number, z:Number, angle:Number) : Quaternion
{
this.w = Math.cos(0.5 * angle);
var k:Number = Math.sin(0.5 * angle) / Math.sqrt(x * x + y * y + z * z);
this.x = x * k;
this.y = y * k;
this.z = z * k;
return this;
}
public function toAxisVector(v:Vector3 = null) : Vector3
{
var angle:Number = NaN;
var coeff:Number = NaN;
if(this.w < -1 || this.w > 1)
{
this.normalize();
}
if(v == null)
{
v = new Vector3();
}
if(this.w > -1 && this.w < 1)
{
if(this.w == 0)
{
v.x = this.x;
v.y = this.y;
v.z = this.z;
}
else
{
angle = 2 * Math.acos(this.w);
coeff = 1 / Math.sqrt(1 - this.w * this.w);
v.x = this.x * coeff * angle;
v.y = this.y * coeff * angle;
v.z = this.z * coeff * angle;
}
}
else
{
v.x = 0;
v.y = 0;
v.z = 0;
}
return v;
}
public function getEulerAngles(angles:Vector3) : Vector3
{
var qi2:Number = 2 * this.x * this.x;
var qj2:Number = 2 * this.y * this.y;
var qk2:Number = 2 * this.z * this.z;
var qij:Number = 2 * this.x * this.y;
var qjk:Number = 2 * this.y * this.z;
var qki:Number = 2 * this.z * this.x;
var qri:Number = 2 * this.w * this.x;
var qrj:Number = 2 * this.w * this.y;
var qrk:Number = 2 * this.w * this.z;
var aa:Number = 1 - qj2 - qk2;
var bb:Number = qij - qrk;
var ee:Number = qij + qrk;
var ff:Number = 1 - qi2 - qk2;
var ii:Number = qki - qrj;
var jj:Number = qjk + qri;
var kk:Number = 1 - qi2 - qj2;
if(-1 < ii && ii < 1)
{
if(angles == null)
{
angles = new Vector3(Math.atan2(jj,kk),-Math.asin(ii),Math.atan2(ee,aa));
}
else
{
angles.x = Math.atan2(jj,kk);
angles.y = -Math.asin(ii);
angles.z = Math.atan2(ee,aa);
}
}
else if(angles == null)
{
angles = new Vector3(0,0.5 * (ii <= -1 ? Math.PI : -Math.PI),Math.atan2(-bb,ff));
}
else
{
angles.x = 0;
angles.y = ii <= -1 ? Number(Number(Math.PI)) : Number(Number(-Math.PI));
angles.y *= 0.5;
angles.z = Math.atan2(-bb,ff);
}
return angles;
}
public function setFromEulerAnglesXYZ(x:Number, y:Number, z:Number) : void
{
this.setFromAxisAngleComponents(1,0,0,x);
_q.setFromAxisAngleComponents(0,1,0,y);
this.append(_q);
this.normalize();
_q.setFromAxisAngleComponents(0,0,1,z);
this.append(_q);
this.normalize();
}
public function conjugate() : void
{
this.x = -this.x;
this.y = -this.y;
this.z = -this.z;
}
public function nlerp(q1:Quaternion, q2:Quaternion, t:Number) : Quaternion
{
var d:Number = 1 - t;
this.w = q1.w * d + q2.w * t;
this.x = q1.x * d + q2.x * t;
this.y = q1.y * d + q2.y * t;
this.z = q1.z * d + q2.z * t;
d = this.w * this.w + this.x * this.x + this.y * this.y + this.z * this.z;
if(d == 0)
{
this.w = 1;
}
else
{
d = 1 / Math.sqrt(d);
this.w *= d;
this.x *= d;
this.y *= d;
this.z *= d;
}
return this;
}
public function subtract(q:Quaternion) : Quaternion
{
this.w -= q.w;
this.x -= q.x;
this.y -= q.y;
this.z -= q.z;
return this;
}
public function diff(q1:Quaternion, q2:Quaternion) : Quaternion
{
this.w = q2.w - q1.w;
this.x = q2.x - q1.x;
this.y = q2.y - q1.y;
this.z = q2.z - q1.z;
return this;
}
public function copy(q:Quaternion) : Quaternion
{
this.w = q.w;
this.x = q.x;
this.y = q.y;
this.z = q.z;
return this;
}
public function toVector3D(result:Vector3D) : Vector3D
{
result.x = this.x;
result.y = this.y;
result.z = this.z;
result.w = this.w;
return result;
}
public function clone() : Quaternion
{
return new Quaternion(this.w,this.x,this.y,this.z);
}
public function toString() : String
{
return "[" + this.w + ", " + this.x + ", " + this.y + ", " + this.z + "]";
}
public function slerp(a:Quaternion, b:Quaternion, t:Number) : Quaternion
{
var k1:Number = NaN;
var k2:Number = NaN;
var theta:Number = NaN;
var sine:Number = NaN;
var beta:Number = NaN;
var alpha:Number = NaN;
var flip:Number = 1;
var cosine:Number = a.w * b.w + a.x * b.x + a.y * b.y + a.z * b.z;
if(cosine < 0)
{
cosine = -cosine;
flip = -1;
}
if(1 - cosine < 0.001)
{
k1 = 1 - t;
k2 = t * flip;
this.w = a.w * k1 + b.w * k2;
this.x = a.x * k1 + b.x * k2;
this.y = a.y * k1 + b.y * k2;
this.z = a.z * k1 + b.z * k2;
this.normalize();
}
else
{
theta = Math.acos(cosine);
sine = Math.sin(theta);
beta = Math.sin((1 - t) * theta) / sine;
alpha = Math.sin(t * theta) / sine * flip;
this.w = a.w * beta + b.w * alpha;
this.x = a.x * beta + b.x * alpha;
this.y = a.y * beta + b.y * alpha;
this.z = a.z * beta + b.z * alpha;
}
return this;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.bonus.battle.goldbonus {
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.bonus.battle.bonusregions.BonusRegionData;
import projects.tanks.client.battlefield.models.bonus.battle.goldbonus.GoldBonusCC;
public class CodecGoldBonusCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_regionsData:ICodec;
public function CodecGoldBonusCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_regionsData = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(BonusRegionData,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:GoldBonusCC = new GoldBonusCC();
local2.regionsData = this.codec_regionsData.decode(param1) as Vector.<BonusRegionData>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:GoldBonusCC = GoldBonusCC(param2);
this.codec_regionsData.encode(param1,local3.regionsData);
}
}
}
|
package projects.tanks.client.battlefield.models.map {
import platform.client.fp10.core.resource.types.SoundResource;
import projects.tanks.client.battlefield.types.Vector3d;
import projects.tanks.clients.flash.resources.resource.MapResource;
public class BattleMapCC {
private var _dustParams:DustParams;
private var _dynamicShadowParams:DynamicShadowParams;
private var _environmentSound:SoundResource;
private var _fogParams:FogParams;
private var _gravity:Number;
private var _mapResource:MapResource;
private var _skyBoxRevolutionAxis:Vector3d;
private var _skyBoxRevolutionSpeed:Number;
private var _skyboxSides:SkyboxSides;
private var _ssaoColor:int;
public function BattleMapCC(param1:DustParams = null, param2:DynamicShadowParams = null, param3:SoundResource = null, param4:FogParams = null, param5:Number = 0, param6:MapResource = null, param7:Vector3d = null, param8:Number = 0, param9:SkyboxSides = null, param10:int = 0) {
super();
this._dustParams = param1;
this._dynamicShadowParams = param2;
this._environmentSound = param3;
this._fogParams = param4;
this._gravity = param5;
this._mapResource = param6;
this._skyBoxRevolutionAxis = param7;
this._skyBoxRevolutionSpeed = param8;
this._skyboxSides = param9;
this._ssaoColor = param10;
}
public function get dustParams() : DustParams {
return this._dustParams;
}
public function set dustParams(param1:DustParams) : void {
this._dustParams = param1;
}
public function get dynamicShadowParams() : DynamicShadowParams {
return this._dynamicShadowParams;
}
public function set dynamicShadowParams(param1:DynamicShadowParams) : void {
this._dynamicShadowParams = param1;
}
public function get environmentSound() : SoundResource {
return this._environmentSound;
}
public function set environmentSound(param1:SoundResource) : void {
this._environmentSound = param1;
}
public function get fogParams() : FogParams {
return this._fogParams;
}
public function set fogParams(param1:FogParams) : void {
this._fogParams = param1;
}
public function get gravity() : Number {
return this._gravity;
}
public function set gravity(param1:Number) : void {
this._gravity = param1;
}
public function get mapResource() : MapResource {
return this._mapResource;
}
public function set mapResource(param1:MapResource) : void {
this._mapResource = param1;
}
public function get skyBoxRevolutionAxis() : Vector3d {
return this._skyBoxRevolutionAxis;
}
public function set skyBoxRevolutionAxis(param1:Vector3d) : void {
this._skyBoxRevolutionAxis = param1;
}
public function get skyBoxRevolutionSpeed() : Number {
return this._skyBoxRevolutionSpeed;
}
public function set skyBoxRevolutionSpeed(param1:Number) : void {
this._skyBoxRevolutionSpeed = param1;
}
public function get skyboxSides() : SkyboxSides {
return this._skyboxSides;
}
public function set skyboxSides(param1:SkyboxSides) : void {
this._skyboxSides = param1;
}
public function get ssaoColor() : int {
return this._ssaoColor;
}
public function set ssaoColor(param1:int) : void {
this._ssaoColor = param1;
}
public function toString() : String {
var local1:String = "BattleMapCC [";
local1 += "dustParams = " + this.dustParams + " ";
local1 += "dynamicShadowParams = " + this.dynamicShadowParams + " ";
local1 += "environmentSound = " + this.environmentSound + " ";
local1 += "fogParams = " + this.fogParams + " ";
local1 += "gravity = " + this.gravity + " ";
local1 += "mapResource = " + this.mapResource + " ";
local1 += "skyBoxRevolutionAxis = " + this.skyBoxRevolutionAxis + " ";
local1 += "skyBoxRevolutionSpeed = " + this.skyBoxRevolutionSpeed + " ";
local1 += "skyboxSides = " + this.skyboxSides + " ";
local1 += "ssaoColor = " + this.ssaoColor + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.client.battleselect.model.buyabonement {
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 BuyProAbonementModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:BuyProAbonementModelServer;
private var client:IBuyProAbonementModelBase = IBuyProAbonementModelBase(this);
private var modelId:Long = Long.getLong(1781362325,1040106191);
public function BuyProAbonementModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new BuyProAbonementModelServer(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;
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.