code
stringlengths
57
237k
package alternativa.tanks.gui.shop.shopitems.item.kits.newbie { import alternativa.tanks.gui.shop.shopitems.item.base.ButtonItemSkin; public class NewbieKitShopItemSkin extends ButtonItemSkin { private static const normalStateClass:Class = NewbieKitShopItemSkin_normalStateClass; private static const overStateClass:Class = NewbieKitShopItemSkin_overStateClass; public function NewbieKitShopItemSkin() { super(); normalState = new normalStateClass().bitmapData; overState = new overStateClass().bitmapData; } } }
package alternativa.tanks.models.weapon.flamethrower { import alternativa.physics.Body; import alternativa.tanks.models.weapon.shared.ITargetValidator; import alternativa.tanks.vehicles.tanks.Tank; public class FlamethrowerTargetValidator implements ITargetValidator { public function FlamethrowerTargetValidator() { super(); } public function isValidTarget(targetBody:Body) : Boolean { var tank:Tank = targetBody as Tank; return tank != null && tank.tankData.health > 0; } } }
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 FirstPurchaseHelper extends BubbleHelper { public function FirstPurchaseHelper() { super(); var localeService:ILocaleService = ILocaleService(Main.osgi.getService(ILocaleService)); text = localeService.getText(TextConst.HELP_FIRST_PURCHASE_HELPER_TEXT); arrowLehgth = int(localeService.getText(TextConst.HELP_FIRST_PURCHASE_HELPER_ARROW_LENGTH)); arrowAlign = HelperAlign.TOP_LEFT; _showLimit = 100; } } }
package alternativa.tanks.model.quest.common.gui.greenpanel { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.model.quest.common.gui.greenpanel.GreenPanelBitmaps_LEFT_LINE_BITMAP.png")] public class GreenPanelBitmaps_LEFT_LINE_BITMAP extends BitmapAsset { public function GreenPanelBitmaps_LEFT_LINE_BITMAP() { super(); } } }
package alternativa.tanks.gui.friends { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.friends.FriendsWindowStateBigButton_friendsClass.png")] public class FriendsWindowStateBigButton_friendsClass extends BitmapAsset { public function FriendsWindowStateBigButton_friendsClass() { super(); } } }
package alternativa.tanks.view.events { import flash.events.Event; public class SendChangeUidAndPasswordEvent extends Event { public static const EVENT_TYPE:String = "SendChangeUidAndPasswordEvent.EVENT_TYPE"; private var _uid:String; private var _password:String; public function SendChangeUidAndPasswordEvent(param1:String, param2:String) { super(EVENT_TYPE); this._uid = param1; this._password = param2; } public function get uid() : String { return this._uid; } public function get password() : String { return this._password; } override public function clone() : Event { return new SendChangeUidAndPasswordEvent(this._uid,this._password); } } }
package alternativa.tanks.controllers.mainview { import flash.events.Event; public class MatchmakingGroupEvent extends Event { public static const CREATE:String = "MatchmakingGroupEvent.CREATE"; public static const LEAVE:String = "MatchmakingGroupEvent.LEAVE"; public function MatchmakingGroupEvent(param1:String) { super(param1); } override public function clone() : Event { return new MatchmakingGroupEvent(type); } } }
package alternativa.tanks.model.item.category { import projects.tanks.client.commons.types.ItemViewCategoryEnum; [ModelInterface] public interface IItemViewCategory { function getViewCategory() : ItemViewCategoryEnum; } }
package controls { public class Money { public function Money() { super(); } public static function numToString(param1:Number, param2:Boolean = true) : String { var local3:Vector.<String> = new Vector.<String>(); var local4:String = param2 ? String(int(param1)) : String(Math.round(param1)); var local5:int = local4.length - int(local4.length / 3) * 3; if(local5 > 0) { local4 = (local5 == 1 ? " " : " ") + local4; } var local6:int = 0; while(local6 < local4.length) { local3.push(local4.substr(local6,3)); local6 += 3; } local4 = local3.join(" "); if(local5 > 0) { local4 = local4.substr(3 - local5); } return local4 + (param2 ? param1.toFixed(10).substr(-11,3) : ""); } } }
package controls.rangicons { import mx.core.BitmapAsset; [ExcludeClass] public class RangIcon_p24 extends BitmapAsset { public function RangIcon_p24() { super(); } } }
package alternativa.tanks.models.effects.common.bonuscommon { public class BattleBonusState { public var pivotZ:Number = 0; public var angleX:Number = 0; public var angleZ:Number = 0; public function BattleBonusState() { super(); } public function interpolate(s1:BattleBonusState, s2:BattleBonusState, t:Number) : void { this.pivotZ = s1.pivotZ + t * (s2.pivotZ - s1.pivotZ); this.angleX = s1.angleX + t * (s2.angleX - s1.angleX); this.angleZ = s1.angleZ + t * (s2.angleZ - s1.angleZ); } public function copy(src:BattleBonusState) : void { this.pivotZ = src.pivotZ; this.angleX = src.angleX; this.angleZ = src.angleZ; } } }
package projects.tanks.client.battlefield.models.tankparts.sfx.freeze { import platform.client.fp10.core.resource.types.MultiframeTextureResource; import platform.client.fp10.core.resource.types.SoundResource; import platform.client.fp10.core.resource.types.TextureResource; import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity; public class FreezeSFXCC { private var _buffedShardsTextureResource:TextureResource; private var _lightingSFXEntity:LightingSFXEntity; private var _particleSpeed:Number; private var _particleTextureResource:MultiframeTextureResource; private var _planeTextureResource:MultiframeTextureResource; private var _shotSoundResource:SoundResource; public function FreezeSFXCC(param1:TextureResource = null, param2:LightingSFXEntity = null, param3:Number = 0, param4:MultiframeTextureResource = null, param5:MultiframeTextureResource = null, param6:SoundResource = null) { super(); this._buffedShardsTextureResource = param1; this._lightingSFXEntity = param2; this._particleSpeed = param3; this._particleTextureResource = param4; this._planeTextureResource = param5; this._shotSoundResource = param6; } public function get buffedShardsTextureResource() : TextureResource { return this._buffedShardsTextureResource; } public function set buffedShardsTextureResource(param1:TextureResource) : void { this._buffedShardsTextureResource = param1; } public function get lightingSFXEntity() : LightingSFXEntity { return this._lightingSFXEntity; } public function set lightingSFXEntity(param1:LightingSFXEntity) : void { this._lightingSFXEntity = param1; } public function get particleSpeed() : Number { return this._particleSpeed; } public function set particleSpeed(param1:Number) : void { this._particleSpeed = param1; } public function get particleTextureResource() : MultiframeTextureResource { return this._particleTextureResource; } public function set particleTextureResource(param1:MultiframeTextureResource) : void { this._particleTextureResource = param1; } public function get planeTextureResource() : MultiframeTextureResource { return this._planeTextureResource; } public function set planeTextureResource(param1:MultiframeTextureResource) : void { this._planeTextureResource = param1; } public function get shotSoundResource() : SoundResource { return this._shotSoundResource; } public function set shotSoundResource(param1:SoundResource) : void { this._shotSoundResource = param1; } public function toString() : String { var local1:String = "FreezeSFXCC ["; local1 += "buffedShardsTextureResource = " + this.buffedShardsTextureResource + " "; local1 += "lightingSFXEntity = " + this.lightingSFXEntity + " "; local1 += "particleSpeed = " + this.particleSpeed + " "; local1 += "particleTextureResource = " + this.particleTextureResource + " "; local1 += "planeTextureResource = " + this.planeTextureResource + " "; local1 += "shotSoundResource = " + this.shotSoundResource + " "; return local1 + "]"; } } }
package alternativa.tanks.engine3d { import flash.display.BitmapData; public interface MutableTextureRegistry { function getTexture(param1:BitmapData, param2:Boolean = true) : BitmapData; function addTextureChangeHandler(param1:Function) : void; function clear() : void; } }
package _codec.projects.tanks.client.panel.model.quest.weekly { 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.EnumCodecInfo; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.resource.types.ImageResource; import projects.tanks.client.panel.model.quest.common.specification.QuestLevel; import projects.tanks.client.panel.model.quest.showing.QuestPrizeInfo; import projects.tanks.client.panel.model.quest.weekly.WeeklyQuestInfo; public class CodecWeeklyQuestInfo implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_description:ICodec; private var codec_finishCriteria:ICodec; private var codec_image:ICodec; private var codec_level:ICodec; private var codec_prizes:ICodec; private var codec_progress:ICodec; private var codec_questId:ICodec; public function CodecWeeklyQuestInfo() { super(); } public function init(param1:IProtocol) : void { this.codec_description = param1.getCodec(new TypeCodecInfo(String,false)); this.codec_finishCriteria = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_image = param1.getCodec(new TypeCodecInfo(ImageResource,false)); this.codec_level = param1.getCodec(new EnumCodecInfo(QuestLevel,false)); this.codec_prizes = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(QuestPrizeInfo,false),false,1)); this.codec_progress = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_questId = param1.getCodec(new TypeCodecInfo(Long,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:WeeklyQuestInfo = new WeeklyQuestInfo(); local2.description = this.codec_description.decode(param1) as String; local2.finishCriteria = this.codec_finishCriteria.decode(param1) as int; local2.image = this.codec_image.decode(param1) as ImageResource; local2.level = this.codec_level.decode(param1) as QuestLevel; local2.prizes = this.codec_prizes.decode(param1) as Vector.<QuestPrizeInfo>; local2.progress = this.codec_progress.decode(param1) as int; local2.questId = this.codec_questId.decode(param1) as Long; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:WeeklyQuestInfo = WeeklyQuestInfo(param2); this.codec_description.encode(param1,local3.description); this.codec_finishCriteria.encode(param1,local3.finishCriteria); this.codec_image.encode(param1,local3.image); this.codec_level.encode(param1,local3.level); this.codec_prizes.encode(param1,local3.prizes); this.codec_progress.encode(param1,local3.progress); this.codec_questId.encode(param1,local3.questId); } } }
package projects.tanks.clients.fp10.libraries.tanksservices.service.probattle { import flash.events.IEventDispatcher; public interface IUserProBattleService extends IEventDispatcher { function hasAbonement() : Boolean; function setAbonementRemainingTimeSec(param1:int) : void; } }
package alternativa.tanks.utils { public class ShiftUtils { public function ShiftUtils() { super(); } public static function rotateRight(param1:int, param2:int) : int { var local3:int = param1 << 32 - param2; return (param1 >>> param2) + local3; } public static function rotateLeft(param1:int, param2:int) : int { var local3:int = param1 >>> 32 - param2; return (param1 << param2) + local3; } } }
package controls.scroller.blue { import mx.core.BitmapAsset; [ExcludeClass] public class ScrollSkinBlue_thumbTop extends BitmapAsset { public function ScrollSkinBlue_thumbTop() { super(); } } }
package projects.tanks.client.battlefield.models.battle.pointbased { 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 PointBasedBattleModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _ballTouchedId:Long = Long.getLong(425450659,1548963791); private var _ballTouched_flagIdCodec:ICodec; private var _dropFlagCommandId:Long = Long.getLong(853121217,-1921212032); private var model:IModel; public function PointBasedBattleModelServer(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._ballTouched_flagIdCodec = this.protocol.getCodec(new TypeCodecInfo(int,false)); } public function ballTouched(param1:int) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._ballTouched_flagIdCodec.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._ballTouchedId,this.protocolBuffer); var local3:IGameObject = Model.object; var local4:ISpace = local3.space; local4.commandSender.sendCommand(local2); this.protocolBuffer.optionalMap.clear(); } public function dropFlagCommand() : 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._dropFlagCommandId,this.protocolBuffer); var local2:IGameObject = Model.object; var local3:ISpace = local2.space; local3.commandSender.sendCommand(local1); this.protocolBuffer.optionalMap.clear(); } } }
package alternativa.tanks.battle.utils { import alternativa.tanks.battle.BattleRunnerProvider; import alternativa.tanks.battle.DeferredAction; import alternativa.tanks.battle.LogicUnit; public class LogicUnitDeferredAction extends BattleRunnerProvider implements DeferredAction { private var logicUnit:LogicUnit; private var add:Boolean; public function LogicUnitDeferredAction(param1:LogicUnit, param2:Boolean) { super(); this.logicUnit = param1; this.add = param2; } public function execute() : void { if(this.add) { getBattleRunner().addLogicUnit(this.logicUnit); } else { getBattleRunner().removeLogicUnit(this.logicUnit); } } } }
package alternativa.tanks.battle.utils { public class Queue { private var head:QueueItem; private var tail:QueueItem; private var size:int; public function Queue() { super(); } public function put(param1:*) : void { ++this.size; var local2:QueueItem = QueueItem.create(param1); if(this.tail == null) { this.head = local2; this.tail = local2; } else { this.tail.next = local2; this.tail = local2; } } public function pop() : * { if(this.head == null) { return null; } --this.size; var local1:* = this.head.data; var local2:QueueItem = this.head; this.head = this.head.next; local2.destroy(); return local1; } public function getSize() : int { return this.size; } } }
package projects.tanks.clients.flash.commons.services.layout.event { import flash.events.Event; import projects.tanks.client.commons.models.layout.LayoutState; import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.LobbyLayoutServiceEvents; public class LobbyLayoutServiceEvent extends Event { public static const BEGIN_LAYOUT_SWITCH:String = LobbyLayoutServiceEvents.BEGIN_LAYOUT_SWITCH; public static const END_LAYOUT_SWITCH:String = LobbyLayoutServiceEvents.END_LAYOUT_SWITCH; public var state:LayoutState; public function LobbyLayoutServiceEvent(param1:String, param2:LayoutState) { super(param1); this.state = param2; } } }
package alternativa.tanks.gui.clanmanagement { import alternativa.tanks.utils.LinksInterceptor; import controls.base.LabelBase; import flash.events.TextEvent; import flash.net.URLRequest; import flash.net.navigateToURL; public class ClanDescriptionText extends LabelBase { public function ClanDescriptionText() { super(); } override public function set text(param1:String) : void { var local2:LinksInterceptor = new LinksInterceptor(new Vector.<String>()); var local3:String = local2.checkLinks(param1); var local4:Boolean = local2.htmlFlag; if(local4) { super.htmlText = local3; } else { super.text = local3; } correctCursorBehaviour = false; selectable = true; addEventListener(TextEvent.LINK,this.onTextLink); } private function onTextLink(param1:TextEvent) : void { var local2:String = param1.text; navigateToURL(new URLRequest(local2),"_blank"); } } }
package alternativa.tanks.models.weapon.railgun { import flash.display.BitmapData; public class ChargingTextureEntry { public var texture:BitmapData; public var referenceCount:int; public function ChargingTextureEntry() { super(); } } }
package alternativa.tanks.model.entrancealert { import alternativa.init.Main; import alternativa.model.IModel; import alternativa.object.ClientObject; import alternativa.service.IModelService; import alternativa.tanks.gui.EntranceAlertWindow; import alternativa.tanks.model.panel.IPanel; import flash.display.DisplayObjectContainer; import flash.events.Event; import flash.events.MouseEvent; import projects.tanks.client.panel.model.entrancealert.EntranceAlertModelBase; import projects.tanks.client.panel.model.entrancealert.IEntranceAlertModelBase; public class EntranceAlertModel extends EntranceAlertModelBase implements IEntranceAlertModelBase { private var panelModel:IPanel; private var dialogsLayer:DisplayObjectContainer; private var window:EntranceAlertWindow; public function EntranceAlertModel() { super(); this.dialogsLayer = Main.dialogsLayer; var modelRegister:IModelService = Main.osgi.getService(IModelService) as IModelService; this.panelModel = (modelRegister.getModelsByInterface(IPanel) as Vector.<IModel>)[0] as IPanel; } public function showAlert(clientObject:ClientObject) : void { this.panelModel.blur(); this.window = new EntranceAlertWindow(); this.dialogsLayer.addChild(this.window); this.window.closeButton.addEventListener(MouseEvent.CLICK,this.closeWindow); this.alignWindow(null); Main.stage.addEventListener(Event.RESIZE,this.alignWindow); } private function alignWindow(e:Event) : void { this.window.x = Math.round((Main.stage.stageWidth - this.window.width) * 0.5); this.window.y = Math.round((Main.stage.stageHeight - this.window.height) * 0.5); } private function closeWindow(e:MouseEvent = null) : void { this.panelModel.unblur(); this.dialogsLayer.removeChild(this.window); } } }
package alternativa.tanks.model.challenge { import alternativa.init.Main; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.locale.constants.TextConst; import alternativa.tanks.model.challenge.greenpanel.GreenPanel; import alternativa.tanks.model.challenge.server.ChallengeServerData; import controls.Label; import controls.TankWindowInner; import flash.display.Bitmap; import flash.display.Sprite; public class SpecialChallengePanel extends Sprite { [Embed(source="794.png")] private static const noQuestBitmap:Class; private var bitmap:Bitmap; private var innerWindow:TankWindowInner; private var panel:GreenPanel; private var task:Label; private var taskValue:Label; private var progressLabel:Label; private var prize:Label; private var prizeValue:Label; private var innerWidth:int; private var innerHeight:int; public function SpecialChallengePanel(width:int, height:int) { this.bitmap = new Bitmap(new noQuestBitmap().bitmapData); this.innerWindow = new TankWindowInner(0,0,TankWindowInner.GREEN); this.panel = new GreenPanel(250,90); this.task = new Label(); this.taskValue = new Label(); this.progressLabel = new Label(); this.prize = new Label(); this.prizeValue = new Label(); super(); this.innerWidth = width; this.innerHeight = height; this.createPanel(); this.addPanel(); } private function createPanel() : void { this.innerWindow.width = this.innerWidth; this.innerWindow.height = this.innerHeight; addChild(this.innerWindow); } private function addPanel() : void { this.bitmap.x = this.innerWindow.width / 2 - this.bitmap.width / 2; this.bitmap.y = 5; this.innerWindow.addChild(this.bitmap); this.panel.x = 10; this.panel.y = 125; this.innerWindow.addChild(this.panel); this.task.color = 5898034; this.task.text = ILocaleService(Main.osgi.getService(ILocaleService)).getText(TextConst.CHALLENGES_WINDOW_LABEL_CHALLENGE_TEXT); this.task.x = 5; this.task.y = 5; this.panel.addChild(this.task); this.taskValue.color = 16777215; this.taskValue.x = 5; this.taskValue.y = 20; this.panel.addChild(this.taskValue); this.progressLabel.color = 16777215; this.progressLabel.x = this.panel.width - this.progressLabel.width - 5; this.progressLabel.y = 20; this.panel.addChild(this.progressLabel); this.prize.color = 5898034; this.prize.text = ILocaleService(Main.osgi.getService(ILocaleService)).getText(TextConst.CHALLENGES_WINDOW_LABEL_PRIZE_TEXT); this.prize.x = 5; this.prize.y = 55; this.panel.addChild(this.prize); this.prizeValue.color = 16777215; this.prizeValue.x = 5; this.prizeValue.y = 80; this.panel.addChild(this.prizeValue); } public function setChallegneData(quest:ChallengeServerData) : void { var prize:String = null; this.taskValue.text = quest.description; this.progressLabel.text = quest.progress + "/" + quest.target_progress; this.progressLabel.x = this.panel.width - this.progressLabel.width - 5; this.prize.y = 55; this.prizeValue.text = ""; this.prizeValue.y = 80; var countPrizes:int = quest.prizes.length; for each(prize in quest.prizes) { this.prizeValue.text += prize + "\n"; } this.prize.y -= countPrizes * (this.prize.height - 9); this.prizeValue.y = this.prize.y + 15; } } }
package _codec.projects.tanks.client.panel.model.shop.specialkit { 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.panel.model.shop.specialkit.ShopKitText; import projects.tanks.client.panel.model.shop.specialkit.SpecialKitPackageCC; public class CodecSpecialKitPackageCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_crystalsAmount:ICodec; private var codec_everySupplyAmount:ICodec; private var codec_goldAmount:ICodec; private var codec_itemsCount:ICodec; private var codec_premiumDurationInDays:ICodec; private var codec_showPremiumIcon:ICodec; private var codec_texts:ICodec; private var codec_withAdditionalItem:ICodec; public function CodecSpecialKitPackageCC() { super(); } public function init(param1:IProtocol) : void { this.codec_crystalsAmount = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_everySupplyAmount = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_goldAmount = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_itemsCount = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_premiumDurationInDays = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_showPremiumIcon = param1.getCodec(new TypeCodecInfo(Boolean,false)); this.codec_texts = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(ShopKitText,false),false,1)); this.codec_withAdditionalItem = param1.getCodec(new TypeCodecInfo(Boolean,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:SpecialKitPackageCC = new SpecialKitPackageCC(); local2.crystalsAmount = this.codec_crystalsAmount.decode(param1) as int; local2.everySupplyAmount = this.codec_everySupplyAmount.decode(param1) as int; local2.goldAmount = this.codec_goldAmount.decode(param1) as int; local2.itemsCount = this.codec_itemsCount.decode(param1) as int; local2.premiumDurationInDays = this.codec_premiumDurationInDays.decode(param1) as int; local2.showPremiumIcon = this.codec_showPremiumIcon.decode(param1) as Boolean; local2.texts = this.codec_texts.decode(param1) as Vector.<ShopKitText>; local2.withAdditionalItem = this.codec_withAdditionalItem.decode(param1) as Boolean; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:SpecialKitPackageCC = SpecialKitPackageCC(param2); this.codec_crystalsAmount.encode(param1,local3.crystalsAmount); this.codec_everySupplyAmount.encode(param1,local3.everySupplyAmount); this.codec_goldAmount.encode(param1,local3.goldAmount); this.codec_itemsCount.encode(param1,local3.itemsCount); this.codec_premiumDurationInDays.encode(param1,local3.premiumDurationInDays); this.codec_showPremiumIcon.encode(param1,local3.showPremiumIcon); this.codec_texts.encode(param1,local3.texts); this.codec_withAdditionalItem.encode(param1,local3.withAdditionalItem); } } }
package projects.tanks.client.panel.model.payment.modes.paypal { import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl; public interface IPayPalPaymentModelBase { function receiveErrorUrl(param1:PaymentRequestUrl) : void; function receivePaymentUrl(param1:PaymentRequestUrl) : void; } }
package alternativa.gfx.core { import alternativa.gfx.alternativagfx; import flash.display.BitmapData; import flash.display.Stage; import flash.display.Stage3D; import flash.display3D.Context3D; import flash.display3D.Context3DProgramType; import flash.events.Event; import flash.events.EventDispatcher; import flash.geom.Rectangle; import flash.utils.Dictionary; use namespace alternativagfx; [Event(name="context3DCreate",type="flash.events.Event")] public class Device extends EventDispatcher { private static const RESOURCE_NOT_AVAILABLE_ERROR:String = "Resource is not available."; private var _stage:Stage; private var _renderMode:String; private var _profile:String; private var _x:int; private var _y:int; private var _width:int; private var _height:int; private var _antiAlias:int; private var _enableDepthAndStencil:Boolean; private var _enableErrorChecking:Boolean; private var _stage3D:Stage3D; private var _available:Boolean = true; private var _renderState:RenderState = new RenderState(); private var configured:Boolean = false; private var backBufferWidth:int = -1; private var backBufferHeight:int = -1; private var backBufferAntiAlias:int = -1; private var backBufferEnableDepthAndStencil:Boolean = false; private var resourcesToUpload:Dictionary = new Dictionary(); public function Device(param1:Stage, param2:String = "auto", param3:String = "baseline") { super(); this._stage = param1; this._renderMode = param2; this._profile = param3; this._stage3D = this._stage.stage3Ds[0]; this._x = this._stage3D.x; this._y = this._stage3D.y; this._width = param1.stageWidth; this._height = param1.stageHeight; this._antiAlias = 0; this._enableDepthAndStencil = true; this._enableErrorChecking = false; this._stage3D.addEventListener(Event.CONTEXT3D_CREATE,this.onContext3DCreate); if(this._stage3D.requestContext3D.length > 1) { this._stage3D.requestContext3D(param2,param3); } else { this._stage3D.requestContext3D(param2); } } private function onContext3DCreate(param1:Event) : void { var local3:* = undefined; var local5:TextureResource = null; var local6:VertexBufferResource = null; this.configured = false; this.backBufferWidth = -1; this.backBufferHeight = -1; this.backBufferAntiAlias = -1; this.backBufferEnableDepthAndStencil = false; var local2:Context3D = this._stage3D.context3D; local2.enableErrorChecking = this._enableErrorChecking; for(local3 in this.resourcesToUpload) { this.uploadResource(local3); delete this.resourcesToUpload[local3]; } local2.setBlendFactors(this._renderState.blendSourceFactor,this._renderState.blendDestinationFactor); local2.setColorMask(this._renderState.colorMaskRed,this._renderState.colorMaskGreen,this._renderState.colorMaskBlue,this._renderState.colorMaskAlpha); local2.setCulling(this._renderState.culling); local2.setDepthTest(this._renderState.depthTestMask,this._renderState.depthTestPassCompareMode); if(this._renderState.program != null) { if(!this._renderState.program.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this.prepareResource(local2,this._renderState.program); local2.setProgram(this._renderState.program.alternativagfx::program); } if(this._renderState.renderTarget != null) { if(!this._renderState.renderTarget.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this.prepareResource(local2,this._renderState.renderTarget); local2.setRenderToTexture(this._renderState.renderTarget.texture,this._renderState.renderTargetEnableDepthAndStencil,this._renderState.renderTargetAntiAlias,this._renderState.renderTargetSurfaceSelector); } if(this._renderState.scissor) { local2.setScissorRectangle(this._renderState.scissorRectangle); } else { local2.setScissorRectangle(null); } local2.setStencilActions(this._renderState.stencilActionTriangleFace,this._renderState.stencilActionCompareMode,this._renderState.stencilActionOnBothPass,this._renderState.stencilActionOnDepthFail,this._renderState.stencilActionOnDepthPassStencilFail); local2.setStencilReferenceValue(this._renderState.stencilReferenceValue,this._renderState.stencilReadMask,this._renderState.stencilWriteMask); var local4:int = 0; while(local4 < 8) { local5 = this._renderState.textures[local4]; if(local5 != null) { if(!local5.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this.prepareResource(local2,local5); local2.setTextureAt(local4,local5.texture); } local6 = this._renderState.vertexBuffers[local4]; if(local6 != null) { if(!local6.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this.prepareResource(local2,local6); local2.setVertexBufferAt(local4,local6.alternativagfx::buffer,this._renderState.vertexBuffersOffsets[local4],this._renderState.vertexBuffersFormats[local4]); } local4++; } local2.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,this._renderState.vertexConstants,128); local2.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,this._renderState.fragmentConstants,28); dispatchEvent(new Event(Event.CONTEXT3D_CREATE)); } public function dispose() : void { var local1:* = undefined; this._stage3D.removeEventListener(Event.CONTEXT3D_CREATE,this.onContext3DCreate); if(this._stage3D.context3D != null) { this._stage3D.context3D.dispose(); } for(local1 in this.resourcesToUpload) { delete this.resourcesToUpload[local1]; } this._renderState = new RenderState(); this._available = false; } public function reset() : void { var local1:* = undefined; if(this._stage3D.context3D != null) { this._stage3D.context3D.dispose(); } else { for(local1 in this.resourcesToUpload) { delete this.resourcesToUpload[local1]; } } this._renderState = new RenderState(); } public function get available() : Boolean { return this._available; } public function get ready() : Boolean { return this._stage3D.context3D != null; } public function get stage() : Stage { return this._stage; } public function get stage3DIndex() : int { return 0; } public function get renderMode() : String { return this._renderMode; } public function get profile() : String { return this._profile; } public function get x() : int { return this._x; } public function set x(param1:int) : void { this._x = param1; } public function get y() : int { return this._y; } public function set y(param1:int) : void { this._y = param1; } public function get width() : int { return this._width; } public function set width(param1:int) : void { this._width = param1; } public function get height() : int { return this._height; } public function set height(param1:int) : void { this._height = param1; } public function get antiAlias() : int { return this._antiAlias; } public function set antiAlias(param1:int) : void { if(param1 != 0 && param1 != 2 && param1 != 4 && param1 != 16) { throw new Error("Invalid antialiasing value."); } this._antiAlias = param1; } public function get enableDepthAndStencil() : Boolean { return this._enableDepthAndStencil; } public function set enableDepthAndStencil(param1:Boolean) : void { this._enableDepthAndStencil = param1; } public function get enableErrorChecking() : Boolean { return this._enableErrorChecking; } public function set enableErrorChecking(param1:Boolean) : void { this._enableErrorChecking = param1; var local2:Context3D = this._stage3D.context3D; if(local2 != null && local2.enableErrorChecking != this._enableErrorChecking) { local2.enableErrorChecking = this._enableErrorChecking; } } public function uploadResource(param1:Resource) : void { if(!param1.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } var local2:Context3D = this._stage3D.context3D; if(local2 != null) { if(!param1.isCreated(local2)) { param1.alternativagfx::create(local2); } param1.alternativagfx::upload(); } else { this.resourcesToUpload[param1] = true; } } private function prepareResource(param1:Context3D, param2:Resource) : void { if(!param2.isCreated(param1)) { param2.alternativagfx::create(param1); param2.alternativagfx::upload(); } } public function setBlendFactors(param1:String, param2:String) : void { var local3:Context3D = null; if(param1 != this._renderState.blendSourceFactor || param2 != this._renderState.blendDestinationFactor) { this._renderState.blendSourceFactor = param1; this._renderState.blendDestinationFactor = param2; local3 = this._stage3D.context3D; if(local3 != null) { local3.setBlendFactors(param1,param2); } } } public function setColorMask(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean) : void { var local5:Context3D = null; if(param1 != this._renderState.colorMaskRed || param2 != this._renderState.colorMaskGreen || param3 != this._renderState.colorMaskBlue || param4 != this._renderState.colorMaskAlpha) { this._renderState.colorMaskRed = param1; this._renderState.colorMaskGreen = param2; this._renderState.colorMaskBlue = param3; this._renderState.colorMaskAlpha = param4; local5 = this._stage3D.context3D; if(local5 != null) { local5.setColorMask(param1,param2,param3,param4); } } } public function setCulling(param1:String) : void { var local2:Context3D = null; if(param1 != this._renderState.culling) { this._renderState.culling = param1; local2 = this._stage3D.context3D; if(local2 != null) { local2.setCulling(param1); } } } public function setDepthTest(param1:Boolean, param2:String) : void { var local3:Context3D = null; if(param1 != this._renderState.depthTestMask || param2 != this._renderState.depthTestPassCompareMode) { this._renderState.depthTestMask = param1; this._renderState.depthTestPassCompareMode = param2; local3 = this._stage3D.context3D; if(local3 != null) { local3.setDepthTest(param1,param2); } } } public function setProgram(param1:ProgramResource) : void { var local2:Context3D = null; if(param1 != this._renderState.program) { if(!param1.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this._renderState.program = param1; local2 = this._stage3D.context3D; if(local2 != null) { this.prepareResource(local2,param1); local2.setProgram(param1.alternativagfx::program); } } } public function setRenderToBackBuffer() : void { var local1:Context3D = null; if(this._renderState.renderTarget != null) { this._renderState.renderTarget = null; local1 = this._stage3D.context3D; if(local1 != null) { local1.setRenderToBackBuffer(); } } } public function setRenderToTexture(param1:TextureResource, param2:Boolean = false, param3:int = 0, param4:int = 0) : void { var local5:Context3D = null; if(param1 != this._renderState.renderTarget || param2 != this._renderState.renderTargetEnableDepthAndStencil || param3 != this._renderState.renderTargetAntiAlias || param4 != this._renderState.renderTargetSurfaceSelector) { if(param1 != null && !param1.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this._renderState.renderTarget = param1; this._renderState.renderTargetEnableDepthAndStencil = param2; this._renderState.renderTargetAntiAlias = param3; this._renderState.renderTargetSurfaceSelector = param4; local5 = this._stage3D.context3D; if(local5 != null) { if(param1 != null) { this.prepareResource(local5,param1); local5.setRenderToTexture(param1.texture,param2,param3,param4); } else { local5.setRenderToBackBuffer(); } } } } public function setScissorRectangle(param1:Rectangle) : void { var local2:Context3D = this._stage3D.context3D; if(param1 != null) { if(this._renderState.scissor) { if(param1.x != this._renderState.scissorRectangle.x || param1.y != this._renderState.scissorRectangle.y || param1.width != this._renderState.scissorRectangle.width || param1.height != this._renderState.scissorRectangle.height) { this._renderState.scissorRectangle.x = param1.x; this._renderState.scissorRectangle.y = param1.y; this._renderState.scissorRectangle.width = param1.width; this._renderState.scissorRectangle.height = param1.height; if(local2 != null) { local2.setScissorRectangle(param1); } } } else { this._renderState.scissor = true; this._renderState.scissorRectangle.x = param1.x; this._renderState.scissorRectangle.y = param1.y; this._renderState.scissorRectangle.width = param1.width; this._renderState.scissorRectangle.height = param1.height; if(local2 != null) { local2.setScissorRectangle(param1); } } } else { this._renderState.scissor = false; if(local2 != null) { local2.setScissorRectangle(null); } } } public function setStencilActions(param1:String = "frontAndBack", param2:String = "always", param3:String = "keep", param4:String = "keep", param5:String = "keep") : void { var local6:Context3D = null; if(param1 != this._renderState.stencilActionTriangleFace || param2 != this._renderState.stencilActionCompareMode || param3 != this._renderState.stencilActionOnBothPass || param4 != this._renderState.stencilActionOnDepthFail || param5 != this._renderState.stencilActionOnDepthPassStencilFail) { this._renderState.stencilActionTriangleFace = param1; this._renderState.stencilActionCompareMode = param2; this._renderState.stencilActionOnBothPass = param3; this._renderState.stencilActionOnDepthFail = param4; this._renderState.stencilActionOnDepthPassStencilFail = param5; local6 = this._stage3D.context3D; if(local6 != null) { local6.setStencilActions(param1,param2,param3,param4,param5); } } } public function setStencilReferenceValue(param1:uint, param2:uint = 255, param3:uint = 255) : void { var local4:Context3D = null; if(param1 != this._renderState.stencilReferenceValue || param2 != this._renderState.stencilReadMask || param3 != this._renderState.stencilWriteMask) { this._renderState.stencilReferenceValue = param1; this._renderState.stencilReadMask = param2; this._renderState.stencilWriteMask = param3; local4 = this._stage3D.context3D; if(local4 != null) { local4.setStencilReferenceValue(param1,param2,param3); } } } public function setTextureAt(param1:int, param2:TextureResource) : void { var local3:Context3D = null; if(param2 != this._renderState.textures[param1]) { if(param2 != null && !param2.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this._renderState.textures[param1] = param2; local3 = this._stage3D.context3D; if(local3 != null) { if(param2 != null) { this.prepareResource(local3,param2); local3.setTextureAt(param1,param2.texture); } else { local3.setTextureAt(param1,null); } } } } public function setVertexBufferAt(param1:int, param2:VertexBufferResource, param3:int = 0, param4:String = "float4") : void { var local5:Context3D = null; if(param2 != this._renderState.vertexBuffers[param1] || param3 != this._renderState.vertexBuffersOffsets[param1] || param4 != this._renderState.vertexBuffersFormats[param1]) { if(param2 != null && !param2.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } this._renderState.vertexBuffers[param1] = param2; this._renderState.vertexBuffersOffsets[param1] = param3; this._renderState.vertexBuffersFormats[param1] = param4; local5 = this._stage3D.context3D; if(local5 != null) { if(param2 != null) { this.prepareResource(local5,param2); local5.setVertexBufferAt(param1,param2.alternativagfx::buffer,param3,param4); } else { local5.setVertexBufferAt(param1,null); } } } } public function setProgramConstantsFromVector(param1:String, param2:int, param3:Vector.<Number>, param4:int = -1, param5:Boolean = true) : void { var local6:Context3D = null; var local11:Boolean = false; var local12:Number = NaN; var local7:int = 0; var local8:int = param2 << 2; var local9:int = param4 < 0 ? int(param3.length) : param4 << 2; var local10:Vector.<Number> = param1 == "vertex" ? this._renderState.vertexConstants : this._renderState.fragmentConstants; if(param5) { local11 = false; while(local7 < local9) { local12 = param3[local7]; if(local12 != local10[local8]) { local10[local8] = local12; local11 = true; } local7++; local8++; } if(local11) { local6 = this._stage3D.context3D; if(local6 != null) { local6.setProgramConstantsFromVector(param1,param2,param3,param4); } } } else { while(local7 < local9) { local10[local8] = param3[local7]; local7++; local8++; } local6 = this._stage3D.context3D; if(local6 != null) { local6.setProgramConstantsFromVector(param1,param2,param3,param4); } } } public function clear(param1:Number = 0, param2:Number = 0, param3:Number = 0, param4:Number = 1, param5:Number = 1, param6:uint = 0, param7:uint = 4294967295) : void { var local9:int = 0; var local10:int = 0; var local11:int = 0; var local12:int = 0; var local13:int = 0; var local8:Context3D = this._stage3D.context3D; if(local8 != null) { if(!this.configured) { local9 = 50; local10 = this._width; local11 = this._height; if(this._profile == "baselineConstrained") { local12 = this._x; local13 = this._y; if(local12 < 0) { local12 = 0; } if(local13 < 0) { local13 = 0; } if(local12 + local10 > this.stage.stageWidth) { local10 = this.stage.stageWidth - local12; } if(local13 + local11 > this.stage.stageHeight) { local11 = this.stage.stageHeight - local13; } if(local12 != this._stage3D.x || local13 != this._stage3D.y || local10 != this.backBufferWidth || local11 != this.backBufferHeight || this._enableDepthAndStencil != this.backBufferEnableDepthAndStencil) { local8.configureBackBuffer(local9,local9,0,this._enableDepthAndStencil); this._stage3D.x = local12; this._stage3D.y = local13; local8.configureBackBuffer(local10,local11,0,this._enableDepthAndStencil); this.backBufferWidth = local10; this.backBufferHeight = local11; this.backBufferAntiAlias = this._antiAlias; this.backBufferEnableDepthAndStencil = this._enableDepthAndStencil; } } else { if(this._stage3D.x != this._x) { this._stage3D.x = this._x; } if(this._stage3D.y != this._y) { this._stage3D.y = this._y; } if(local10 < local9) { local10 = local9; } if(local11 < local9) { local11 = local9; } if(local10 != this.backBufferWidth || local11 != this.backBufferHeight || this._antiAlias != this.backBufferAntiAlias || this._enableDepthAndStencil != this.backBufferEnableDepthAndStencil) { local8.configureBackBuffer(local10,local11,this._antiAlias,this._enableDepthAndStencil); this.backBufferWidth = local10; this.backBufferHeight = local11; this.backBufferAntiAlias = this._antiAlias; this.backBufferEnableDepthAndStencil = this._enableDepthAndStencil; } } this.configured = true; } local8.clear(param1,param2,param3,param4,param5,param6,param7); } } public function drawToBitmapData(param1:BitmapData) : void { var local2:Context3D = this._stage3D.context3D; if(local2 != null) { local2.drawToBitmapData(param1); } } public function drawTriangles(param1:IndexBufferResource, param2:int = 0, param3:int = -1) : void { if(!param1.available) { throw new Error(RESOURCE_NOT_AVAILABLE_ERROR); } var local4:Context3D = this._stage3D.context3D; if(local4 != null) { this.prepareResource(local4,param1); try { local4.drawTriangles(param1.alternativagfx::buffer,param2,param3); } catch(e:Error) { } } } public function present() : void { this._renderState.renderTarget = null; var local1:Context3D = this._stage3D.context3D; if(local1 != null) { local1.present(); } this.configured = false; } } }
package alternativa.tanks.controller.commands.captcha { import alternativa.tanks.controller.events.CheckCaptchaAnswerEvent; import alternativa.tanks.controller.events.LoginEvent; import alternativa.tanks.service.ICaptchaService; import org.robotlegs.mvcs.Command; import projects.tanks.client.commons.models.captcha.CaptchaLocation; public class CheckLoginFormCaptchaCommand extends Command { [Inject] public var captchaService:ICaptchaService; [Inject] public var event:LoginEvent; public function CheckLoginFormCaptchaCommand() { super(); } override public function execute() : void { var local1:LoginEvent = new LoginEvent(LoginEvent.LOGIN_AFTER_CAPTCHA_CHECKED,this.event.callsign,this.event.password,this.event.rememberMe,this.event.captchaAnswer); if(this.captchaService.loginCaptchaEnabled) { dispatch(new CheckCaptchaAnswerEvent(this.event.captchaAnswer,CaptchaLocation.LOGIN_FORM,local1)); } else { dispatch(local1); } } } }
package alternativa.osgi.catalogs { import alternativa.osgi.ServiceParamNames; import flash.utils.Dictionary; public class ServicesCatalog { protected var _namedServicesDictionary:Dictionary; protected var _nullParamsServiceDictionary:Dictionary; public function ServicesCatalog() { super(); this._namedServicesDictionary = new Dictionary(); this._nullParamsServiceDictionary = new Dictionary(); } public function getService(param1:Class, param2:String) : Object { var local3:String = null; var local4:NamedServicesCatalog = null; if(param2) { local3 = this.getNameByFilter(param2); if(local3 != null) { local4 = this._namedServicesDictionary[param1]; if(local4 != null) { return local4.getService(local3); } } return null; } return this._nullParamsServiceDictionary[param1]; } public function getNameByFilter(param1:String) : String { var local4:String = null; if(param1 == null) { return null; } var local2:RegExp = / /gi; param1 = param1.replace(local2,""); var local3:int = int(param1.indexOf("name=")); if(local3 != -1) { local4 = param1.substr(local3 + 5,param1.length - local3 - 5); local3 = int(local4.indexOf(")")); if(local3 != -1) { return local4.substr(0,local3); } return local4; } return null; } public function addService(param1:Class, param2:Object, param3:Dictionary) : void { var local4:String = null; var local5:NamedServicesCatalog = null; if(param3 == null) { if(this._nullParamsServiceDictionary[param1] != null) { throw new ArgumentError("Service " + param1 + " without parameters is already registered"); } this._nullParamsServiceDictionary[param1] = param2; } else { local4 = param3[ServiceParamNames.PARAM_NAME]; if(local4 == null) { throw new ArgumentError("Invalid params. You can only use the parameter \'name\'"); } local5 = this._namedServicesDictionary[param1]; if(local5 == null) { local5 = new NamedServicesCatalog(param1); this._namedServicesDictionary[param1] = local5; } local5.addService(local4,param2); } } public function removeService(param1:Class, param2:Dictionary) : Object { var local3:String = null; var local4:NamedServicesCatalog = null; var local5:Object = null; if(param2 != null) { local3 = param2[ServiceParamNames.PARAM_NAME]; if(local3 != null) { local4 = this._namedServicesDictionary[param1]; if(local4 != null) { return local4.removeService(local3); } } return null; } local5 = this._nullParamsServiceDictionary[param1]; delete this._nullParamsServiceDictionary[param1]; return local5; } public function get serviceList() : Vector.<Object> { var local2:Object = null; var local3:NamedServicesCatalog = null; var local4:Vector.<Object> = null; var local5:int = 0; var local6:int = 0; var local1:Vector.<Object> = new Vector.<Object>(); for each(local2 in this._nullParamsServiceDictionary) { local1.push(local2); } for each(local3 in this._namedServicesDictionary) { local4 = local3.serviceList; local5 = 0; local6 = int(local4.length); while(local5 < local6) { local2 = local4[local5]; if(local1.indexOf(local2) == -1) { local1.push(local2); } local5++; } } return local1; } public function getServicesInfo() : Vector.<ServiceInfo> { var local2:Object = null; var local3:NamedServicesCatalog = null; var local4:Vector.<ServiceInfo> = null; var local5:int = 0; var local6:int = 0; var local1:Vector.<ServiceInfo> = new Vector.<ServiceInfo>(); for each(local2 in this._nullParamsServiceDictionary) { local1.push(new ServiceInfo(local2,null)); } for each(local3 in this._namedServicesDictionary) { local4 = local3.getServicesInfo(); local5 = 0; local6 = int(local4.length); while(local5 < local6) { local1.push(local4[local5]); local5++; } } return local1; } } }
package alternativa.tanks.sfx.drone { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class DroneSFXEvents implements DroneSFX { private var object:IGameObject; private var impl:Vector.<Object>; public function DroneSFXEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getSfxData() : DroneSFXData { var result:DroneSFXData = null; var i:int = 0; var m:DroneSFX = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = DroneSFX(this.impl[i]); result = m.getSfxData(); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.controller.commands.goto_ { import alternativa.tanks.controller.events.PartnersEvent; import alternativa.tanks.controller.events.showform.ShowPartnersFormEvent; import alternativa.tanks.model.EntranceServerParamsModel; import alternativa.tanks.model.RegistrationBackgroundModel; import alternativa.tanks.service.ICaptchaService; import org.robotlegs.mvcs.Command; public class GoToPartnerLoginCommand extends Command { [Inject] public var backgroundModel:RegistrationBackgroundModel; [Inject] public var serverParamsModel:EntranceServerParamsModel; [Inject] public var event:PartnersEvent; [Inject] public var captchaService:ICaptchaService; public function GoToPartnerLoginCommand() { super(); } override public function execute() : void { var local1:Boolean = this.serverParamsModel.loginCaptchaEnabled || Boolean(this.captchaService.loginCaptchaEnabled); dispatch(new ShowPartnersFormEvent(ShowPartnersFormEvent.LOGIN_FORM,this.backgroundModel.backgroundImage,false,local1)); } } }
package alternativa.tanks.view.events { import flash.events.Event; public class SendRestoreEmailMessageEvent extends Event { public static const SEND:String = "RESTORE_EMAIL"; private var _emailAddress:String; public function SendRestoreEmailMessageEvent(param1:String) { super(SEND); this._emailAddress = param1; } public function get emailAddress() : String { return this._emailAddress; } override public function clone() : Event { return new SendRestoreEmailMessageEvent(this._emailAddress); } } }
package projects.tanks.clients.fp10.Prelauncher.makeup { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_youtubeIcon.png")] public class MakeUp_youtubeIcon extends BitmapAsset { public function MakeUp_youtubeIcon() { super(); } } }
package controls.base { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.base.TankInput_rightClass.png")] public class TankInput_rightClass extends BitmapAsset { public function TankInput_rightClass() { super(); } } }
package controls.rangicons { import mx.core.BitmapAsset; [ExcludeClass] public class RangIcon_p5 extends BitmapAsset { public function RangIcon_p5() { super(); } } }
package alternativa.tanks.model.quest.challenge.gui { import alternativa.osgi.service.locale.ILocaleService; import base.DiscreteSprite; import controls.Label; import flash.display.Bitmap; import flash.display.BitmapData; import flash.geom.Point; import forms.ColorConstants; import projects.tanks.clients.fp10.libraries.TanksLocale; public class ChallengesProgressView extends DiscreteSprite { [Inject] public static var localeService:ILocaleService; private static const progressBarBgClass:Class = ChallengesProgressView_progressBarBgClass; private static const progressBarBgBitmapData:BitmapData = new progressBarBgClass().bitmapData; private static const progressBarFillBgClass:Class = ChallengesProgressView_progressBarFillBgClass; private static const progressBarFillBgBitmapData:BitmapData = new progressBarFillBgClass().bitmapData; private static const starClass:Class = ChallengesProgressView_starClass; private static const starBitmapData:BitmapData = new starClass().bitmapData; private var point:Point = new Point(); private var fillBitmap:Bitmap = new Bitmap(); private var label:* = new Label(); public function ChallengesProgressView() { super(); addChild(new Bitmap(progressBarBgBitmapData)); addChild(this.fillBitmap); var local1:Bitmap = new Bitmap(starBitmapData); local1.x = 5; local1.y = 6; addChild(local1); this.label.bold = true; this.label.color = ColorConstants.GREEN_LABEL; this.label.x = local1.x + local1.width + 5; this.label.y = 3; addChild(this.label); } public function setProgress(param1:int, param2:int, param3:int) : void { this.label.text = localeService.getText(TanksLocale.TEXT_CHALLENGE_STARS) + " " + param2 + "/" + param3; if(param1 == 0) { this.fillBitmap.bitmapData = null; return; } if(param1 == 100) { this.fillBitmap.bitmapData = progressBarFillBgBitmapData; return; } var local4:Number = progressBarBgBitmapData.width * param1 / 100; var local5:BitmapData = new BitmapData(local4,progressBarBgBitmapData.height); local5.copyPixels(progressBarFillBgBitmapData,local5.rect,this.point); this.fillBitmap.bitmapData = local5; } } }
package alternativa.tanks.model.challenge.greenpanel.gray { import mx.core.BitmapAsset; [ExcludeClass] public class GrayPacket_left_line extends BitmapAsset { public function GrayPacket_left_line() { super(); } } }
package platform.client.models.commons.periodtime { 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 TimePeriodModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:TimePeriodModelServer; private var client:ITimePeriodModelBase = ITimePeriodModelBase(this); private var modelId:Long = Long.getLong(1870140649,1080360405); public function TimePeriodModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new TimePeriodModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(TimePeriodModelCC,false))); } protected function getInitParam() : TimePeriodModelCC { return TimePeriodModelCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { var local3:* = param1; switch(false ? 0 : 0) { } } override public function get id() : Long { return this.modelId; } } }
package _codec.projects.tanks.client.panel.model.shop.lootbox { 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.lootbox.LootBoxPackageCC; public class VectorCodecLootBoxPackageCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecLootBoxPackageCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(LootBoxPackageCC,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.<LootBoxPackageCC> = new Vector.<LootBoxPackageCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = LootBoxPackageCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:LootBoxPackageCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<LootBoxPackageCC> = Vector.<LootBoxPackageCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package projects.tanks.client.battlefield.models.ultimate.effects.juggernaut { 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 JuggernautUltimateModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function JuggernautUltimateModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.tanks.model.payment.shop.lootboxandpaint { import alternativa.tanks.gui.shop.shopitems.item.base.ButtonItemSkin; import alternativa.tanks.gui.shop.shopitems.item.base.ShopItemButton; import alternativa.tanks.gui.shop.shopitems.item.kits.SpecialKitIcons; import alternativa.tanks.gui.shop.shopitems.item.utils.FormatUtils; import controls.base.LabelBase; import controls.labels.MouseDisabledLabel; import flash.display.Bitmap; import flash.text.TextFieldAutoSize; import forms.ColorConstants; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.panel.model.shop.lootboxandpaintkit.LootboxAndPaintCC; public class LootboxAndPaintButton extends ShopItemButton { private static const SIDE_PADDING:int = 25; private static const TOP_PADDING:int = 10; private var crystalIcon:Bitmap = new Bitmap(SpecialKitIcons.crystal); private var lootbooxIcon:Bitmap; private var paintIcon:Bitmap = null; private var lastXPosition:int; private var crystalCount:int; private var lootboxCount:int; public function LootboxAndPaintButton(param1:IGameObject, param2:LootboxAndPaintCC) { this.crystalCount = param2.crystalCount; this.lootboxCount = param2.lootboxCount; if(param2.paintPreview != null) { this.paintIcon = new Bitmap(param2.paintPreview.data); } this.lootbooxIcon = new Bitmap(param2.lootBoxPreview.data); var local3:ButtonItemSkin = new ButtonItemSkin(); local3.normalState = param2.button.data; local3.overState = param2.buttonOver.data; super(param1,local3); } override protected function initOldPriceParams() : void { super.initOldPriceParams(); strikeoutLineThickness = 3; oldPriceLabelSize = 35; } override protected function initLabels() : void { this.addCrystalsAndPriceLabels(); this.lastXPosition = this.crystalIcon.x + this.crystalIcon.width + 40; this.addLootbox(); this.addPaint(); } private function addCrystalsAndPriceLabels() : void { var local1:LabelBase = new LabelBase(); local1.text = FormatUtils.valueToString(this.crystalCount,0,false); local1.color = ColorConstants.SHOP_CRYSTALS_TEXT_LABEL_COLOR; local1.autoSize = TextFieldAutoSize.LEFT; local1.size = 75; local1.x = SIDE_PADDING; local1.y = TOP_PADDING; local1.bold = true; local1.mouseEnabled = false; addChild(local1); this.crystalIcon.x = local1.x + local1.width + 5; this.crystalIcon.y = local1.y + 20; addChild(this.crystalIcon); addPriceLabel(); priceLabel.size = 35; priceLabel.x = local1.x; priceLabel.y = local1.y + local1.height - 12; } private function addLootbox() : void { if(this.lootboxCount < 1) { return; } this.lootbooxIcon.x = this.lastXPosition; this.lastXPosition += this.lootbooxIcon.width + 10; this.lootbooxIcon.y = TOP_PADDING; addChild(this.lootbooxIcon); var local1:LabelBase = new MouseDisabledLabel(); local1.text = "+" + this.lootboxCount; local1.x = this.lootbooxIcon.x + this.lootbooxIcon.width - 80; local1.y = this.lootbooxIcon.y + this.lootbooxIcon.height - 40; local1.color = ColorConstants.WHITE; local1.autoSize = TextFieldAutoSize.LEFT; local1.size = 45; local1.bold = true; addChild(local1); } private function addPaint() : void { if(this.paintIcon == null) { return; } this.paintIcon.x = this.lastXPosition; this.paintIcon.y = TOP_PADDING + 10; this.lastXPosition += this.paintIcon.width; addChild(this.paintIcon); } override public function get widthInCells() : int { return 3; } override protected function initPreview() : void { } override protected function setPreview() : void { } override protected function align() : void { if(hasDiscount()) { oldPriceSprite.x = SIDE_PADDING; priceLabel.x = oldPriceSprite.x + oldPriceSprite.width + 10; oldPriceSprite.y = priceLabel.y; } } } }
package alternativa.init { import alternativa.osgi.CommonBundleActivator; import alternativa.tanks.models.battlefield.StatisticsModel; import alternativa.tanks.models.battlefield.gui.chat.ChatModel; import alternativa.tanks.models.battlefield.inventory.InventoryItemModel; import alternativa.tanks.models.battlefield.inventory.InventoryModel; import alternativa.tanks.models.effectsvisualization.EffectsVisualizationModel; public class BattlefieldGUIActivator extends CommonBundleActivator { public function BattlefieldGUIActivator() { super(); } override public function start(osgi:OSGi) : void { registerModel(new ChatModel(),osgi); registerModel(new StatisticsModel(),osgi); registerModel(new InventoryModel(),osgi); registerModel(new InventoryItemModel(),osgi); registerModel(new EffectsVisualizationModel(),osgi); } } }
package scpacker.resource.images { public class MultiframeResourceData { public var fps:int; public var numFrames:int; public var widthFrame:Number; public var heigthFrame:Number; public function MultiframeResourceData() { super(); } } }
package alternativa.tanks.gui.skins { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.model.item.skins.AvailableSkins; import controls.base.DefaultButtonBase; import fl.containers.ScrollPane; import fl.controls.ScrollPolicy; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import forms.ColorConstants; import forms.base.BaseFormWithInner; import platform.client.fp10.core.type.IGameObject; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.IDialogsService; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow; import utils.ScrollStyleUtils; public class ItemSkinsWindow extends DialogWindow { [Inject] public static var localeService:ILocaleService; [Inject] public static var dialogService:IDialogsService; private static const WINDOW_WIDTH:int = 509; private static const WINDOW_HEIGHT:int = 450; private static const VERTICAL_MARGIN:int = 8; private static const HORIZONTAL_MARGIN:int = 12; private static const MIN_DEVICE_PANEL_HEIGHT:int = 110; private var baseForm:BaseFormWithInner = new BaseFormWithInner(WINDOW_WIDTH,WINDOW_HEIGHT,24); private var scrollContainer:Sprite = new Sprite(); private var scrollPane:ScrollPane = new ScrollPane(); private var closeButton:DefaultButtonBase = new DefaultButtonBase(); private var descriptions:Vector.<SkinDescription> = new Vector.<SkinDescription>(); private var scrollPaneBottomPadding:Sprite = new Sprite(); private var item:IGameObject; private var onCloseCallback:Function; public function ItemSkinsWindow(param1:IGameObject, param2:Function) { super(); this.item = param1; this.onCloseCallback = param2; this.addWindow(); this.addScrollPane(); this.addCloseButton(); this.addSkinsPanel(); this.scrollPane.update(); dialogService.addDialog(this); this.updateAll(null); } private function addWindow() : void { this.baseForm.inner.showBlink = false; this.baseForm.window.setHeaderId(TanksLocale.TEXT_HEADER_DEVICES); this.baseForm.setHeight(WINDOW_HEIGHT); addChild(this.baseForm); } private function addScrollPane() : void { this.scrollPane.y = 10; ScrollStyleUtils.setGreenStyle(this.scrollPane); this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; this.scrollPane.verticalScrollPolicy = ScrollPolicy.AUTO; this.scrollPane.source = this.scrollContainer; this.scrollPane.focusEnabled = false; this.scrollPane.setSize(WINDOW_WIDTH,WINDOW_HEIGHT - 20); this.baseForm.inner.addChild(this.scrollPane); } private function addCloseButton() : void { this.closeButton.label = localeService.getText(TanksLocale.TEXT_GARAGE_CLOSE_TEXT); this.closeButton.addEventListener(MouseEvent.CLICK,this.onMouseClick); this.baseForm.window.addChild(this.closeButton); } private function addSkinsPanel() : void { var local4:Number = NaN; var local1:Vector.<IGameObject> = AvailableSkins(this.item.adapt(AvailableSkins)).getSkins(); var local2:int = 6; local2 += Math.max(this.createSkinDescription(this.item,local2).height,MIN_DEVICE_PANEL_HEIGHT) + 12; var local3:int = 0; while(local3 < local1.length) { local4 = Number(this.createSkinDescription(local1[local3],local2).height); local2 += Math.max(local4,MIN_DEVICE_PANEL_HEIGHT); local2 += 12; local3++; } this.fitToContent(local2); } private function fitToContent(param1:int) : void { this.baseForm.setHeight(Math.min(param1 + 12,WINDOW_HEIGHT)); this.fixScrollPaneBottomPadding(param1); this.alignCloseButton(); dialogService.centerDialog(this); } private function fixScrollPaneBottomPadding(param1:int) : void { this.scrollPaneBottomPadding = new Sprite(); this.scrollContainer.addChild(this.scrollPaneBottomPadding); this.scrollPaneBottomPadding.graphics.lineStyle(1,ColorConstants.WHITE,0); this.scrollPaneBottomPadding.graphics.beginFill(ColorConstants.WHITE,0); this.scrollPaneBottomPadding.graphics.drawRect(0,0,1,15); this.scrollPaneBottomPadding.graphics.endFill(); this.scrollPaneBottomPadding.x = 0; this.scrollPaneBottomPadding.y = param1; } private function createSkinDescription(param1:IGameObject, param2:int) : SkinDescription { var local3:SkinDescription = new SkinDescription(this.item,param1); local3.y = param2; this.scrollContainer.addChild(local3); this.descriptions.push(local3); local3.addEventListener(Event.CHANGE,this.updateAll); return local3; } private function updateAll(param1:Event) : void { var local2:SkinDescription = null; for each(local2 in this.descriptions) { local2.update(); } if(param1 != null) { dispatchEvent(param1); } } private function alignCloseButton() : void { this.closeButton.y = this.baseForm.window.height - 5 - this.closeButton.height - VERTICAL_MARGIN; this.closeButton.x = this.baseForm.window.width - this.closeButton.width - HORIZONTAL_MARGIN; } private function onMouseClick(param1:MouseEvent) : void { this.close(); } override protected function cancelKeyPressed() : void { this.close(); } public function close() : void { var local1:SkinDescription = null; this.removeEvents(); for each(local1 in this.descriptions) { local1.destroy(); } dialogService.removeDialog(this); this.onCloseCallback(); } protected function removeEvents() : void { this.closeButton.removeEventListener(MouseEvent.CLICK,this.onMouseClick); } override public function get width() : Number { return this.baseForm.window.width; } override public function get height() : Number { return this.baseForm.window.height; } } }
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank01.png")] public class PremiumRankBitmaps_bitmapBigRank01 extends BitmapAsset { public function PremiumRankBitmaps_bitmapBigRank01() { super(); } } }
package projects.tanks.client.panel.model.entrancealert { import scpacker.Base; public class EntranceAlertModelBase extends Base { public function EntranceAlertModelBase() { super(); } } }
package alternativa.tanks.controller.events.socialnetwork { import flash.events.Event; public class ExternalLoginEvent extends Event { public static const CHECK_CAPTCHA_AND_LOGIN:String = "ExternalLoginEvent.CHECK_CAPTCHA_AND_LOGIN"; public static const LOGIN_AFTER_CAPTCHA_CHECKED:String = "ExternalLoginEvent.LOGIN_AFTER_CAPTCHA_CHECKED"; private var _callsign:String; private var _password:String; private var _captchaAnswer:String; public function ExternalLoginEvent(param1:String, param2:String, param3:String, param4:String) { super(param1); this._callsign = param2; this._password = param3; this._captchaAnswer = param4; } public function get callsign() : String { return this._callsign; } public function get password() : String { return this._password; } public function get captchaAnswer() : String { return this._captchaAnswer; } override public function clone() : Event { return new ExternalLoginEvent(type,this.callsign,this.password,this.captchaAnswer); } } }
package alternativa.tanks.model.item.availabledevices { [ModelInterface] public interface AvailableDevices { function loadDevices() : void; } }
package alternativa.tanks.models.weapon.shaft { import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.RayIntersectionData; import alternativa.math.Matrix3; import alternativa.math.Matrix4; import alternativa.math.Vector3; import alternativa.osgi.service.display.IDisplay; import alternativa.physics.Body; import alternativa.tanks.battle.BattleRunnerProvider; import alternativa.tanks.battle.BattleService; import alternativa.tanks.battle.LogicUnit; import alternativa.tanks.battle.PhysicsInterpolator; import alternativa.tanks.battle.objects.tank.LocalWeapon; import alternativa.tanks.battle.objects.tank.Tank; import alternativa.tanks.battle.objects.tank.Weapon; import alternativa.tanks.battle.objects.tank.WeaponMount; import alternativa.tanks.battle.objects.tank.WeaponPlatform; import alternativa.tanks.battle.objects.tank.tankskin.TankSkin; import alternativa.tanks.battle.scene3d.BattleScene3D; import alternativa.tanks.battle.scene3d.CameraFovCalculator; import alternativa.tanks.battle.scene3d.Object3DNames; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.models.tank.speedcharacteristics.SpeedCharacteristics; import alternativa.tanks.models.weapon.AllGlobalGunParams; import alternativa.tanks.models.weapon.WeaponForces; import alternativa.tanks.models.weapon.angles.verticals.VerticalAngles; import alternativa.tanks.models.weapon.laser.LaserPointer; import alternativa.tanks.models.weapon.shaft.cameracontrollers.AimingActivationCameraController; import alternativa.tanks.models.weapon.shaft.cameracontrollers.AimingCameraController; import alternativa.tanks.models.weapon.shaft.sfx.Indicator; import alternativa.tanks.models.weapon.shaft.states.IShaftState; import alternativa.tanks.models.weapon.shaft.states.ITransitionHandler; import alternativa.tanks.models.weapon.shaft.states.IdleState; import alternativa.tanks.models.weapon.shaft.states.ManualTargetingActivationState; import alternativa.tanks.models.weapon.shaft.states.ManualTargetingState; import alternativa.tanks.models.weapon.shaft.states.ReadyToShootState; import alternativa.tanks.models.weapon.shaft.states.ShaftTargetPoint; import alternativa.tanks.models.weapon.shaft.states.Transition; import alternativa.tanks.models.weapon.shaft.states.transitionhandlers.ManualTargetingActivationStopHandler; import alternativa.tanks.models.weapon.shaft.states.transitionhandlers.ManualTargetingActivationTriggerReleaseHandler; import alternativa.tanks.models.weapon.shaft.states.transitionhandlers.ManualTargetingStopHandler; import alternativa.tanks.models.weapon.shaft.states.transitionhandlers.QuickShotHandler; import alternativa.tanks.models.weapon.weakening.DistanceWeakening; import alternativa.tanks.models.weapons.targeting.TargetingResult; import alternativa.tanks.models.weapons.targeting.TargetingSystem; import alternativa.tanks.physics.CollisionGroup; import alternativa.tanks.utils.EncryptedNumber; import alternativa.tanks.utils.EncryptedNumberImpl; import alternativa.tanks.utils.MathUtils; import alternativa.tanks.utils.SetControllerForTemporaryItems; import alternativa.utils.removeDisplayObject; import flash.display.BitmapData; import flash.display.DisplayObjectContainer; import flash.geom.Point; import flash.geom.Vector3D; import flash.utils.Dictionary; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.tankparts.weapon.shaft.ShaftCC; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; import projects.tanks.client.garage.models.item.properties.ItemProperty; public class ShaftWeapon extends BattleRunnerProvider implements Weapon, LocalWeapon, LogicUnit, PhysicsInterpolator { [Inject] public static var display:IDisplay; [Inject] public static var battleService:BattleService; private static const MAX_DIRECTION_DELTA:Number = MathUtils.toRadians(15); private static const MAX_SPOT_SCALE:Number = 8; private static const MIN_SPOT_SCALE:Number = 1; private static const MAX_SPOT_DISTANCE:Number = 5000; private static const MIN_SPOT_DISTANCE:Number = 50; private static const SPOT_SCALE_DISTANCE:Number = MAX_SPOT_DISTANCE - MIN_SPOT_DISTANCE; private static const SPOT_SCALE:Number = MAX_SPOT_SCALE - MIN_SPOT_SCALE; private static const SWITCH_INTERVAL:int = 200; private static const INDICATOR_SHIFT:Number = 9; private static const _origin:Vector3 = new Vector3(); private static const _direction:Vector3 = new Vector3(); private static const _m:Matrix4 = new Matrix4(); private static const _m3:Matrix3 = new Matrix3(); private static const _p:Vector3 = new Vector3(); private static const _barrelOrigin:Vector3 = new Vector3(); private static const _closestBarrelOrigin:Vector3 = new Vector3(); private static const gunParams:AllGlobalGunParams = new AllGlobalGunParams(); private static const _aimDirection:Vector3 = new Vector3(); private static const _targetPoint:ShaftTargetPoint = new ShaftTargetPoint(); private static const INDICATOR_OFFSET:int = 75; private var laser:LaserPointer; private var callback:IShaftWeaponCallback; private var effects:ShaftEffects; private var targetingSystem:TargetingSystem; private var shaftData:ShaftCC; private var weaponForces:WeaponForces; private var triggerPulled:Boolean = false; private var object3DToTank:Dictionary = new Dictionary(); private var weaponPlatform:WeaponPlatform; private var states:Dictionary; private var currentState:IShaftState; private var transitions:Vector.<Transition>; private var energy:EncryptedNumber = new EncryptedNumberImpl(); private var energyChangeRate:EncryptedNumber = new EncryptedNumberImpl(); private var energyMode:ShaftEnergyMode = ShaftEnergyMode.RECHARGE; private var aimingActivationEnergy:Number = 0; private var deactivationTask:ShaftDeactivationTask; private var enabled:Boolean; private var reloadTimeMS:int; private var reloadFinishTime:int; private var team:BattleTeam; private var exclusionSetController:SetControllerForTemporaryItems; private var exclusionSet:Dictionary; private var speedCharacteristics:SpeedCharacteristics; private var weakening:DistanceWeakening; private var reticleDisplay:ReticleDisplay; private var titleIndicator:Indicator = new Indicator(); private var shaftObject:ShaftObject; private var normalTurnAcceleration:Number = 0; private var aimingActivationCameraController:AimingActivationCameraController; private var aimingCameraController:AimingCameraController; private var skinAlphaInterpolator:LinearInterpolator = new LinearInterpolator(); private var indicatorAlphaInterpolator:LinearInterpolator = new LinearInterpolator(); private var indicatorInterpolatorX:LinearInterpolator = new LinearInterpolator(); private var indicatorInterpolatorY:LinearInterpolator = new LinearInterpolator(); private var rangeInterpolator:LinearInterpolator = new LinearInterpolator(); private var verticalAngles:VerticalAngles; private var aimingListener:ShaftAimingStateListener; private var aimingType:ShaftAimingType = ShaftAimingType.DIRECTIONAL; private var prevElevation:Number = 0; private var elevation:Number = 0; private var targetElevation:Number = 0; private var interpolatedElevation:Number = 0; private var prevElevationDirection:Number = 0; private var elevationDirection:Number = 0; private var elevationSpeed:Number = 0; private var isElevationPaused:Boolean = false; private var targetDirection:Number = 0; private var aimingModeSpeedMultiplier:Number = 1; private var isChargingEffectActive:Boolean = false; private var aimedModeLocked:Boolean = false; private var stunned:Boolean = false; private var stunStatus:Number = 0; public function ShaftWeapon(param1:ShaftObject, param2:IShaftWeaponCallback, param3:ShaftCC, param4:VerticalAngles, param5:WeaponForces, param6:Dictionary, param7:IGameObject, param8:TargetingSystem, param9:DistanceWeakening) { super(); this.shaftObject = param1; this.laser = param1.laser(); this.reloadTimeMS = param1.getReloadTimeMS(); this.callback = param2; this.effects = param1.getEffects(); this.targetingSystem = param8; this.shaftData = param3; this.verticalAngles = param4; this.weaponForces = param5; this.object3DToTank = param6; this.speedCharacteristics = SpeedCharacteristics(param7.adapt(SpeedCharacteristics)); this.weakening = param9; var local10:BattleScene3D = battleService.getBattleScene3D(); this.deactivationTask = new ShaftDeactivationTask(local10); this.exclusionSet = local10.getShaftRaycastExcludedObjects(); this.exclusionSetController = new SetControllerForTemporaryItems(this.exclusionSet); this.energy.setNumber(param3.maxEnergy); var local11:uint = uint(this.shaftObject.laser().getLaserPointerRedColor()); this.reticleDisplay = new ReticleDisplay(param3.reticleImage,local11); this.rangeInterpolator.setInterval(param3.shrubsHidingRadiusMin,param3.shrubsHidingRadiusMax); } private static function getClosestBarrelOrigin(param1:Vector3, param2:Vector.<Vector3>, param3:Vector3) : void { var local6:Number = NaN; _barrelOrigin.copy(param2[0]); _barrelOrigin.y = 0; param3.copy(_barrelOrigin); var local4:Number = param1.distanceToSquared(_barrelOrigin); var local5:int = 1; while(local5 < param2.length) { _barrelOrigin.copy(param2[local5]); _barrelOrigin.y = 0; local6 = param1.distanceToSquared(_barrelOrigin); if(local6 < local4) { local4 = local6; param3.copy(_barrelOrigin); } local5++; } } public function getAimingModeEnergyFraction() : Number { return (this.aimingActivationEnergy - this.getEnergy()) / this.getMaxEnergy(); } public function setAimingListener(param1:ShaftAimingStateListener) : void { this.aimingListener = param1; } private function get weaponMount() : WeaponMount { return this.weaponPlatform.getWeaponMount(); } public function startIdleState() : void { this.setEnergyMode(ShaftEnergyMode.RECHARGE); this.weaponPlatform.getWeaponMount().setMaxTurnSpeed(this.speedCharacteristics.getMaxTurretTurnSpeed(),false); this.weaponPlatform.getWeaponMount().setTurnAcceleration(this.normalTurnAcceleration); battleService.activateFollowCamera(); } public function startAimingActivation() : void { this.weaponPlatform.stopMovement(); this.weaponPlatform.lockMovement(true); this.weaponPlatform.enableTurretSound(false); this.weaponMount.setTurnAcceleration(this.shaftData.targetingAcceleration); this.weaponMount.setMaxTurnSpeed(this.shaftData.horizontalTargetingSpeed * this.speedCharacteristics.getTurretRotationCoefficient(),false); this.aimingActivationEnergy = this.getEnergy(); this.setEnergyMode(ShaftEnergyMode.DRAIN); battleService.getBattleScene3D().setCameraController(this.aimingActivationCameraController); this.skinAlphaInterpolator.setInterval(this.weaponPlatform.getSkin().getHullAlpha(),0); this.initTitleIndicator(); this.isChargingEffectActive = true; this.effects.createManualModeEffects(this.weaponPlatform.getTurret3D()); } public function setAimingActivationProgress(param1:Number) : void { this.setIndicatorPosition(this.indicatorInterpolatorX.interpolate(param1),this.indicatorInterpolatorY.interpolate(param1)); this.titleIndicator.alpha = this.indicatorAlphaInterpolator.interpolate(param1); var local2:Number = this.skinAlphaInterpolator.interpolate(param1); this.weaponPlatform.getSkin().setAlpha(local2); } public function getAimDirection(param1:Vector3) : void { this.weaponPlatform.getAllGunParams(gunParams); _m3.fromAxisAngle(gunParams.elevationAxis,this.interpolatedElevation); _m3.transformVector(gunParams.direction,param1); } public function init(param1:WeaponPlatform) : void { this.weaponPlatform = param1; this.aimingActivationCameraController = new AimingActivationCameraController(param1,this.shaftData.targetingTransitionTime,this.shaftData.initialFOV); this.aimingCameraController = new AimingCameraController(this,param1,this.shaftData.initialFOV,this.shaftData.minimumFOV); this.deactivationTask.setSkin(param1.getSkin()); this.team = this.getTank().teamType; this.normalTurnAcceleration = param1.getWeaponMount().getTurnAcceleration(); this.initStateMachine(); } public function destroy() : void { this.shaftObject = null; this.laser = null; this.callback = null; this.effects = null; this.targetingSystem = null; this.shaftData = null; this.weaponForces = null; this.object3DToTank = null; this.speedCharacteristics = null; this.weakening = null; this.currentState.exit(); this.deactivationTask.stop(); } public function activate() : void { getBattleRunner().addLogicUnit(this); getBattleRunner().addPhysicsInterpolator(this); } public function deactivate() : void { getBattleRunner().removeLogicUnit(this); getBattleRunner().removePhysicsInterpolator(this); } public function enable() : void { if(!this.enabled) { this.enabled = true; this.currentState.enter(battleService.getPhysicsTime()); } } public function disable(param1:Boolean) : void { if(this.enabled) { this.enabled = false; this.processEvent(ShaftEventType.STOP,param1); } } public function reset() : void { var local1:int = int(battleService.getPhysicsTime()); if(this.currentState != this.states[ShaftState.IDLE]) { this.currentState.exit(); this.currentState = this.states[ShaftState.IDLE]; } var local2:BattleTeam = this.getTank().teamType; if(this.team != local2) { this.team = local2; this.reticleDisplay.changeLaserSpotColor(this.getColorForTeam(this.team)); } this.currentState.enter(local1); this.doSetEnergyMode(ShaftEnergyMode.RECHARGE,this.shaftData.maxEnergy,local1); } private function getTank() : Tank { return this.weaponPlatform.getBody().tank; } public function getStatus() : Number { return this.stunned ? this.stunStatus : this.getEnergy() / this.shaftData.maxEnergy; } public function pullTrigger() : void { this.triggerPulled = true; if(this.enabled) { this.currentState.processEvent(ShaftEventType.TRIGGER_PULL,null); } } public function releaseTrigger() : void { this.triggerPulled = false; if(this.enabled) { this.currentState.processEvent(ShaftEventType.TRIGGER_RELEASE,null); } } public function runLogic(param1:int, param2:int) : void { var local3:Number = NaN; if(this.enabled) { this.currentState.update(param1,param2); } if(!this.stunned) { local3 = MathUtils.clamp(this.energy.getNumber() + this.energyChangeRate.getNumber() * 0.001 * param2,0,this.shaftData.maxEnergy); this.energy.setNumber(local3); } } public function interpolatePhysicsState(param1:Number, param2:int) : void { this.interpolatedElevation = this.prevElevation + param1 * (this.elevation - this.prevElevation); } public function isTriggerPulled() : Boolean { return this.triggerPulled; } private function setEnergyMode(param1:ShaftEnergyMode) : void { var local2:Number = NaN; if(param1 != this.energyMode) { local2 = this.getEnergy(); this.doSetEnergyMode(param1,local2,battleService.getPhysicsTime()); } } public function processEvent(param1:ShaftEventType, param2:* = undefined) : void { var local3:Transition = null; for each(local3 in this.transitions) { if(local3.eventType == param1 && local3.state == this.currentState) { this.currentState.exit(); if(local3.handler != null) { local3.handler.execute(param2); } this.currentState = local3.newState; this.currentState.enter(battleService.getPhysicsTime()); return; } } throw new TransitionNotFoundError(this.currentState,param1); } public function getEnergy() : Number { return this.energy.getNumber(); } public function setIndicatorPosition(param1:int, param2:int) : void { this.titleIndicator.x = param1 + INDICATOR_SHIFT; this.titleIndicator.y = param2; } private function getColorForTeam(param1:BattleTeam) : uint { switch(param1) { case BattleTeam.BLUE: return this.shaftObject.laser().getLaserPointerBlueColor(); case BattleTeam.RED: return this.shaftObject.laser().getLaserPointerRedColor(); default: return this.shaftObject.laser().getLaserPointerRedColor(); } } public function startAimingState() : void { this.setEnergyMode(ShaftEnergyMode.DRAIN); this.elevationSpeed = 0; this.prevElevationDirection = 0; this.elevationDirection = 0; this.prevElevation = 0; this.elevation = 0; this.interpolatedElevation = 0; this.targetElevation = 0; this.targetDirection = this.weaponMount.getTurretInterpolatedDirection(); this.updateAimingModeSpeedMultiplier(1); this.deactivationTask.stop(); this.callback.onManualTargetingStart(); this.callback.enteredInManualMode(); var local1:BattleScene3D = battleService.getBattleScene3D(); local1.enableObjectHiding(); local1.hidableGraphicObjects.setCenterAndRadius(this.weaponPlatform.getBody().state.position,0); battleService.getBattleScene3D().setCameraController(this.aimingCameraController); if(this.aimingListener != null) { this.aimingListener.onAimingStart(); } } public function updateAimingState(param1:int, param2:int) : void { var local3:Number = 0.001 * param2; var local4:Number = this.getEnergy(); if(local4 == 0 && this.isChargingEffectActive) { this.isChargingEffectActive = false; this.effects.fadeChargingEffect(); } var local5:Number = this.getAimingModeEnergyFraction(); this.updateAimingModeSpeedMultiplier(local5); this.updateLaserPointer(); this.hideObjectsInRange(this.rangeInterpolator.interpolate(local5)); switch(this.aimingType) { case ShaftAimingType.DIRECTIONAL: this.updateDirectionalAiming(local3); break; case ShaftAimingType.MOUSE: this.updateMouseAiming(local3); } this.effects.playTargetingSound(this.elevationSpeed != 0 || Boolean(this.weaponMount.isRotating())); } private function updateLaserPointer() : void { var local1:GameCamera = null; var local2:Number = NaN; this.getAimDirection(_aimDirection); if(this.calculateTargetPoint(_aimDirection,_targetPoint)) { local1 = battleService.getBattleScene3D().getCamera(); local2 = Vector3.distanceBetween(local1.position,_targetPoint.getGlobalPoint()); this.setLaserPointerScale(this.calculateSpotScale(local2)); } else { this.setLaserPointerScale(MIN_SPOT_SCALE); } if(_targetPoint.hasTank()) { this.getLaser().aimAtTank(_targetPoint.getTank(),_targetPoint.getLocalPoint()); } else { this.getLaser().updateDirection(_aimDirection); } _targetPoint.reset(); } private function calculateSpotScale(param1:Number) : Number { if(param1 < MIN_SPOT_DISTANCE) { return MAX_SPOT_SCALE; } if(param1 > MAX_SPOT_DISTANCE) { return MIN_SPOT_SCALE; } var local2:Number = param1 - MIN_SPOT_DISTANCE; return (1 - local2 / SPOT_SCALE_DISTANCE) * SPOT_SCALE + MIN_SPOT_SCALE; } private function updateDirectionalAiming(param1:Number) : void { var local3:Number = NaN; if(this.prevElevationDirection != this.elevationDirection) { this.prevElevationDirection = this.elevationDirection; this.elevationSpeed = 0; } this.prevElevation = this.elevation; var local2:Number = this.elevationSpeed * param1; this.elevation = MathUtils.clamp(this.elevation + local2,-this.verticalAngles.getAngleDown(),this.verticalAngles.getAngleUp()); if(this.elevationDirection > 0 && this.elevation == this.verticalAngles.getAngleUp() || this.elevationDirection < 0 && this.elevation == -this.verticalAngles.getAngleDown()) { this.elevationSpeed = 0; } else { local3 = this.getCurrentMaxElevationSpeed(); this.elevationSpeed = MathUtils.clamp(this.elevationSpeed + this.elevationDirection * this.shaftData.targetingAcceleration * param1,-local3,local3); } } private function updateMouseAiming(param1:Number) : void { var local2:Number = NaN; this.prevElevation = this.elevation; if(this.isElevationPaused) { this.elevationSpeed = 0; this.elevationDirection = 0; } else { local2 = this.targetElevation - this.elevation; if(local2 == 0) { this.elevationSpeed = 0; return; } this.elevationDirection = MathUtils.sign(local2); if(this.elevationDirection != this.prevElevationDirection) { this.prevElevationDirection = this.elevationDirection; this.elevationSpeed = 0; } this.elevation = MathUtils.moveValueTowards(this.elevation,this.targetElevation,this.elevationSpeed * param1); this.elevationSpeed = MathUtils.moveValueTowards(this.elevationSpeed,this.getCurrentMaxElevationSpeed(),this.shaftData.targetingAcceleration * param1); } } private function getCurrentMaxElevationSpeed() : Number { return this.aimingModeSpeedMultiplier * this.speedCharacteristics.getTurretRotationCoefficient() * this.shaftData.verticalTargetingSpeed; } private function updateAimingModeSpeedMultiplier(param1:Number) : void { this.aimingModeSpeedMultiplier = this.calculateAimingModelSpeedMultiplier(param1); this.weaponMount.setMaxTurnSpeed(this.aimingModeSpeedMultiplier * this.speedCharacteristics.getTurretRotationCoefficient() * this.shaftData.horizontalTargetingSpeed,false); } private function calculateAimingModelSpeedMultiplier(param1:Number) : Number { var local2:Number = this.shaftData.rotationCoeffT1; if(param1 < local2) { return 1; } var local3:Number = this.shaftData.rotationCoeffT2; var local4:Number = this.shaftData.rotationCoeffKmin; if(param1 < local3) { return 1 - (1 - local4) * (param1 - local2) / (local3 - local2); } return local4; } public function stopAiming() : void { removeDisplayObject(this.titleIndicator); this.isElevationPaused = false; this.weaponPlatform.lockMovement(false); this.weaponPlatform.enableTurretSound(true); battleService.activateFollowCamera(); battleService.getBattleScene3D().disableObjectHiding(); this.weaponPlatform.showTitle(); var local1:Number = Number(battleService.getBattleView().getWidth()); var local2:Number = Number(battleService.getBattleView().getHeight()); this.deactivationTask.setTargetFov(CameraFovCalculator.getCameraFov(local1,local2)); this.deactivationTask.start(); this.effects.playTargetingSound(false); this.effects.stopManualTargetingEffects(); this.getLaser().hideLaser(); if(this.aimingListener != null) { this.aimingListener.onAimingStop(); } } public function setAimingType(param1:ShaftAimingType) : void { if(this.aimingType != param1) { this.aimingType = param1; this.prevElevationDirection = 0; this.elevationDirection = 0; this.elevationSpeed = 0; switch(param1) { case ShaftAimingType.DIRECTIONAL: break; case ShaftAimingType.MOUSE: this.targetElevation = this.interpolatedElevation; this.targetDirection = this.weaponPlatform.getWeaponMount().getTurretInterpolatedDirection(); } } this.aimingCameraController.setAimingType(param1); } public function setElevationDirecton(param1:Number) : void { this.elevationDirection = param1; } public function isBarrelOriginInsideStaticGeometry() : Boolean { var local3:Object3D = null; this.weaponPlatform.getAllGunParams(gunParams); var local1:Vector3 = this.weaponPlatform.getBody().state.position; _direction.diff(gunParams.barrelOrigin,local1); var local2:RayIntersectionData = battleService.getBattleScene3D().raycast(local1,_direction,battleService.getExcludedObjects3D()); if(local2 != null && local2.time <= 1) { local3 = local2.object; return local3.name == Object3DNames.STATIC; } return false; } public function getMaxEnergy() : Number { return this.shaftData.maxEnergy; } public function hideObjectsInRange(param1:Number) : void { var local2:BattleScene3D = battleService.getBattleScene3D(); local2.hidableGraphicObjects.setCenterAndRadius(this.weaponPlatform.getBody().state.position,param1); } public function performAimedShot() : void { var local3:Number = NaN; var local1:int = int(battleService.getPhysicsTime()); this.effects.stopManualTargetingEffects(); this.weaponPlatform.getAllGunParams(gunParams); this.getAimDirection(_aimDirection); var local2:AimedShotResult = this.getAimedShotTargets(gunParams,_aimDirection); this.effects.createHitMark(gunParams.barrelOrigin,local2.staticHitPoint); this.createMandatoryShotEffects(gunParams); this.effects.createHitPointsGraphicEffects(local2.staticHitPoint,local2.targetHitPoint,gunParams.muzzlePosition,gunParams.direction,_aimDirection); if(local2.target != null) { local3 = this.aimingActivationEnergy - this.getEnergy(); this.applyImpactForceToTarget(local2.target,local2.targetHitPoint,this.getAimedShotImpactForce(local3),_aimDirection); } this.reloadFinishTime = battleService.getPhysicsTime() + this.reloadTimeMS; this.callback.onAimedShot(local1,local2.staticHitPoint,local2.target,local2.targetHitPoint); this.doSetEnergyMode(ShaftEnergyMode.RECHARGE,Math.min(this.getEnergy(),this.shaftData.maxEnergy - this.shaftData.minAimedShotEnergy),local1); if(this.aimingListener != null) { this.aimingListener.onAimedShot(); } } private function getAimedShotTargets(param1:AllGlobalGunParams, param2:Vector3) : AimedShotResult { var local4:RayIntersectionData = null; var local5:Object3D = null; var local6:Vector3 = null; var local7:Tank = null; this.addTankSkinToExclusionSet(this.weaponPlatform.getSkin()); var local3:AimedShotResult = new AimedShotResult(); _origin.copy(param1.barrelOrigin); while(true) { local4 = battleService.getBattleScene3D().raycast(_origin,param2,this.exclusionSet); if(local4 == null) { break; } local5 = local4.object; local6 = _origin.clone().addScaled(local4.time + 0.1,param2); if(local5.name == Object3DNames.STATIC) { local3.setStaticHitPoint(local6); break; } if(local5.name == Object3DNames.TANK_PART) { local7 = this.object3DToTank[local5]; if(this.isValidHit(local7,local5,local6)) { local3.setTarget(local7.getBody(),local6); break; } this.addTankSkinToExclusionSet(local7.getSkin()); } else { this.exclusionSetController.addTemporaryItem(local5); } _origin.copy(local6); } this.exclusionSetController.deleteAllTemporaryItems(); return local3; } private function isValidHit(param1:Tank, param2:Object3D, param3:Vector3) : Boolean { var local4:TankSkin = param1.getSkin(); if(local4.getTurret3D() == param2) { _m.setMatrix(param2.x,param2.y,param2.z,param2.rotationX,param2.rotationY,param2.rotationZ); _m.transformVectorInverse(param3,_p); getClosestBarrelOrigin(_p,local4.getTurretDescriptor().muzzles,_closestBarrelOrigin); _m.transformVector(_closestBarrelOrigin,_p); _p.subtract(param3); if(getBattleRunner().getCollisionDetector().hasStaticHit(param3,_p,CollisionGroup.STATIC,1)) { return false; } } return local4.getHullAlpha() == 1; } public function performQuickShotDuringAimingActivation() : void { this.stopAiming(); this.performQuickShot(this.aimingActivationEnergy); this.onTargetingModeStop(); } public function performQuickShot(param1:Number) : void { var local4:TargetingResult = null; var local5:Body = null; var local6:Vector3 = null; var local7:Vector3 = null; var local8:Number = NaN; var local2:int = int(battleService.getPhysicsTime()); var local3:Number = param1 < 0 ? this.getEnergy() : param1; if(local3 >= this.shaftData.fastShotEnergy) { local3 -= this.shaftData.fastShotEnergy; this.weaponPlatform.getAllGunParams(gunParams); if(!this.isBarrelOriginInsideStaticGeometry()) { local8 = this.shaftObject.commonData().getImpactForce(); local4 = this.targetingSystem.target(gunParams); if(local4.hasAnyHit()) { local6 = local4.getSingleHit().position.clone(); } if(local4.hasStaticHit()) { local7 = local4.getStaticHit().position.clone(); } if(local4.hasTankHit()) { local5 = local4.getSingleHit().shape.body; local8 *= this.weakening.getImpactCoeff(local4.getSingleHit().t); } this.effects.createHitPointsGraphicEffects(local7,local6,gunParams.muzzlePosition,gunParams.direction,local4.getDirection()); this.applyImpactForceToTarget(local5,local6,local8,local4.getDirection()); this.effects.createHitMark(gunParams.barrelOrigin,local7); } this.createMandatoryShotEffects(gunParams); this.effects.createMuzzleFlashEffect(this.weaponPlatform.getLocalMuzzlePosition(),this.weaponPlatform.getTurret3D()); this.reloadFinishTime = battleService.getPhysicsTime() + this.reloadTimeMS; this.callback.onQuickShot(local2,local7,local5,local6); } this.doSetEnergyMode(ShaftEnergyMode.RECHARGE,local3,local2); } public function canShoot() : Boolean { return battleService.getPhysicsTime() >= this.reloadFinishTime; } public function onTargetingModeStop() : void { this.callback.onManualTargetingStop(); } private function addTankSkinToExclusionSet(param1:TankSkin) : void { this.exclusionSetController.addTemporaryItem(param1.getHullMesh()); this.exclusionSetController.addTemporaryItem(param1.getTurret3D()); } private function initStateMachine() : void { this.states = new Dictionary(); this.states[ShaftState.IDLE] = new IdleState(this); this.states[ShaftState.READY_TO_SHOOT] = new ReadyToShootState(this,SWITCH_INTERVAL); this.states[ShaftState.MANUAL_TARGETING_ACTIVATION] = new ManualTargetingActivationState(this,this.shaftData.targetingTransitionTime); this.states[ShaftState.MANUAL_TARGETING] = new ManualTargetingState(this,this.shaftData.afterShotPause); this.currentState = this.states[ShaftState.IDLE]; this.transitions = Vector.<Transition>([this.createTransition(ShaftState.IDLE,ShaftEventType.READY_TO_SHOOT,ShaftState.READY_TO_SHOOT,null),this.createTransition(ShaftState.IDLE,ShaftEventType.STOP,ShaftState.IDLE,null),this.createTransition(ShaftState.READY_TO_SHOOT,ShaftEventType.TRIGGER_RELEASE,ShaftState.IDLE,new QuickShotHandler(this)),this.createTransition(ShaftState.READY_TO_SHOOT,ShaftEventType.SWITCH,ShaftState.MANUAL_TARGETING_ACTIVATION,null),this.createTransition(ShaftState.READY_TO_SHOOT,ShaftEventType.STOP,ShaftState.IDLE,null),this.createTransition(ShaftState.MANUAL_TARGETING_ACTIVATION,ShaftEventType.SWITCH,ShaftState.MANUAL_TARGETING,null),this.createTransition(ShaftState.MANUAL_TARGETING_ACTIVATION,ShaftEventType.TRIGGER_RELEASE,ShaftState.IDLE,new ManualTargetingActivationTriggerReleaseHandler(this)),this.createTransition(ShaftState.MANUAL_TARGETING_ACTIVATION,ShaftEventType.STOP,ShaftState.IDLE,new ManualTargetingActivationStopHandler(this)),this.createTransition(ShaftState .MANUAL_TARGETING,ShaftEventType.EXIT,ShaftState.IDLE,null),this.createTransition(ShaftState.MANUAL_TARGETING,ShaftEventType.STOP,ShaftState.IDLE,new ManualTargetingStopHandler(this))]); } private function createTransition(param1:ShaftState, param2:ShaftEventType, param3:ShaftState, param4:ITransitionHandler) : Transition { return new Transition(param2,this.states[param1],this.states[param3],param4); } private function doSetEnergyMode(param1:ShaftEnergyMode, param2:Number, param3:int) : void { this.energyMode = param1; this.energy.setNumber(param2); switch(param1) { case ShaftEnergyMode.RECHARGE: this.energyChangeRate.setNumber(this.shaftData.chargeRate); break; case ShaftEnergyMode.DRAIN: this.energyChangeRate.setNumber(-this.shaftData.dischargeRate); this.callback.onBeginEnergyDrain(param3); } } private function createMandatoryShotEffects(param1:AllGlobalGunParams) : void { this.effects.createShotSoundEffect(param1.muzzlePosition); this.weaponPlatform.getBody().addWorldForceScaled(param1.muzzlePosition,param1.direction,-this.weaponForces.getRecoilForce()); this.weaponPlatform.addDust(); } private function applyImpactForceToTarget(param1:Body, param2:Vector3, param3:Number, param4:Vector3) : void { if(param1 != null) { param1.tank.applyWeaponHit(param2,param4,param3); } } private function getAimedShotImpactForce(param1:Number) : Number { var local2:Number = this.shaftObject.commonData().getImpactForce(); return local2 + (this.weaponForces.getImpactForce() - local2) * param1 / this.shaftData.maxEnergy; } public function setLaserPointerScale(param1:Number) : void { this.reticleDisplay.setLaserPointerScale(param1); } private function calculateTargetPoint(param1:Vector3, param2:ShaftTargetPoint) : Boolean { var local4:RayIntersectionData = null; var local5:Object3D = null; var local6:Tank = null; var local3:GameCamera = battleService.getBattleScene3D().getCamera(); _origin.copy(local3.position); this.addTankSkinToExclusionSet(this.weaponPlatform.getSkin()); param2.reset(); while(true) { local4 = battleService.getBattleScene3D().raycast(_origin,param1,this.exclusionSet); if(local4 == null) { break; } local5 = local4.object; if(local5.name == Object3DNames.STATIC) { _origin.addScaled(local4.time,param1); param2.setTargetPoint(_origin); this.exclusionSetController.deleteAllTemporaryItems(); return true; } if(local5.name == Object3DNames.TANK_PART) { _origin.addScaled(local4.time,param1); local6 = this.object3DToTank[local5]; if(this.isValidHit(local6,local5,_origin)) { param2.setTargetPoint(_origin,local6); this.exclusionSetController.deleteAllTemporaryItems(); return true; } } this.exclusionSetController.addTemporaryItem(local4.object); } this.exclusionSetController.deleteAllTemporaryItems(); return false; } private function initTitleIndicator() : void { var local1:DisplayObjectContainer = battleService.getBattleView().getParentDisplayContainer(); var local2:Tank = this.getTank(); local2.hideTitle(); var local3:BitmapData = local2.getTitleTexture(); this.titleIndicator.bitmapData = local3; local1.addChild(this.titleIndicator); var local4:GameCamera = battleService.getBattleScene3D().getCamera(); var local5:Vector3D = new Vector3D(); local2.readTitlePosition(local5); local5 = local4.projectGlobal(local5); var local6:Point = new Point(); var local7:Point = new Point(); local6.x = local5.x + battleService.getBattleView().getX(); local6.y = local5.y + battleService.getBattleView().getY() - local3.height; this.titleIndicator.x = local6.x; this.titleIndicator.y = local6.y; local7.x = display.stage.stageWidth >> 1; local7.y = (display.stage.stageHeight >> 1) + INDICATOR_OFFSET; this.indicatorInterpolatorX.setInterval(local6.x,local7.x); this.indicatorInterpolatorY.setInterval(local6.y,local7.y); this.titleIndicator.alpha = 0; } public function getResistanceProperty() : ItemProperty { return ItemProperty.SHAFT_RESISTANCE; } public function getLaser() : LaserPointer { return this.laser; } public function getTargetDirection() : Number { return this.targetDirection; } public function getTargetElevation() : Number { return this.targetElevation; } public function getInterpolatedElevation() : Number { return this.interpolatedElevation; } public function changeTargetElevation(param1:Number) : void { this.targetElevation = MathUtils.clamp(this.targetElevation + param1,-this.verticalAngles.getAngleDown(),this.verticalAngles.getAngleUp()); var local2:Number = this.targetElevation - this.elevation; if(Math.abs(local2) > MAX_DIRECTION_DELTA) { this.targetElevation = this.elevation + MathUtils.sign(local2) * MAX_DIRECTION_DELTA; } } public function changeTargetDirection(param1:Number) : void { this.targetDirection = MathUtils.clampAngle(this.targetDirection + param1); var local2:Number = Number(this.weaponPlatform.getWeaponMount().getTurretPhysicsDirection()); var local3:Number = MathUtils.clampAngleDelta(this.targetDirection,local2); if(Math.abs(local3) > MAX_DIRECTION_DELTA) { this.targetDirection = MathUtils.clampAngle(local2 + MathUtils.sign(local3) * MAX_DIRECTION_DELTA); } } public function getReticleDisplay() : ReticleDisplay { return this.reticleDisplay; } public function pauseElevation(param1:Boolean) : void { this.isElevationPaused = param1; } public function reconfigure(param1:Number, param2:Number, param3:Boolean) : void { this.shaftData.dischargeRate = param1; this.shaftData.fastShotEnergy = param2; this.aimedModeLocked = param3; } public function stun() : void { if((this.currentState is ManualTargetingState || this.currentState is ManualTargetingActivationState) && this.canShoot()) { this.stunStatus = 1; this.energy.setNumber(this.getMaxEnergy()); } else { this.stunStatus = this.getStatus(); } this.stunned = true; } public function calm(param1:int) : void { this.reloadFinishTime += param1; this.stunned = false; } public function updateRecoilForce(param1:Number) : void { this.weaponForces.setRecoilForce(param1); } public function fullyRecharge() : void { this.energy.setNumber(this.shaftData.maxEnergy); this.reloadFinishTime = battleService.getPhysicsTime(); this.stunStatus = 1; } public function weaponReloadTimeChanged(param1:int, param2:int) : void { this.reloadTimeMS = param2; } public function isAimedModeLocked() : Boolean { return this.aimedModeLocked; } } }
package fonts { import flash.text.TextFormat; public class TanksFontService { private static var textFormat:TextFormat = new TextFormat("Tahoma"); private static var embedFonts:Boolean = false; public function TanksFontService() { super(); } public static function getTextFormat(param1:int) : TextFormat { return new TextFormat(textFormat.font,param1,textFormat.color,textFormat.bold,textFormat.italic,textFormat.underline,textFormat.url,textFormat.target,textFormat.align,textFormat.leftMargin,textFormat.rightMargin,textFormat.indent,textFormat.leading); } public static function isEmbedFonts() : Boolean { return embedFonts; } public static function setTextFormat(param1:TextFormat, param2:Boolean) : void { TanksFontService.textFormat = param1; TanksFontService.embedFonts = param2; } } }
package projects.tanks.client.clans.clan { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class ClanModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ClanModelServer; private var client:IClanModelBase = IClanModelBase(this); private var modelId:Long = Long.getLong(454139398,-2069165154); private var _alreadyInAcceptedId:Long = Long.getLong(1925555464,-742779729); private var _alreadyInAccepted_uidCodec:ICodec; private var _alreadyInClanId:Long = Long.getLong(680200609,-1147294464); private var _alreadyInClan_uidCodec:ICodec; private var _alreadyInClanIncomingId:Long = Long.getLong(1659309065,-71192762); private var _alreadyInClanIncoming_uidCodec:ICodec; private var _alreadyInClanIncoming_userIdCodec:ICodec; private var _alreadyInClanOutgoingId:Long = Long.getLong(1659309105,-102307188); private var _alreadyInClanOutgoing_uidCodec:ICodec; private var _alreadyInUserOutgoingId:Long = Long.getLong(1767156062,-1193480447); private var _alreadyInUserOutgoing_uidCodec:ICodec; private var _alreadyInUserOutgoing_idCodec:ICodec; private var _maxMembersId:Long = Long.getLong(615510449,-291351864); private var _userExistId:Long = Long.getLong(1820972193,-1147714599); private var _userLowRankId:Long = Long.getLong(1902588706,-1770274302); private var _userNotExistId:Long = Long.getLong(1149292226,-49512386); public function ClanModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ClanModelServer(IModel(this)); this._alreadyInAccepted_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._alreadyInClan_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._alreadyInClanIncoming_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._alreadyInClanIncoming_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false)); this._alreadyInClanOutgoing_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._alreadyInUserOutgoing_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._alreadyInUserOutgoing_idCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._alreadyInAcceptedId: this.client.alreadyInAccepted(String(this._alreadyInAccepted_uidCodec.decode(param2))); break; case this._alreadyInClanId: this.client.alreadyInClan(String(this._alreadyInClan_uidCodec.decode(param2))); break; case this._alreadyInClanIncomingId: this.client.alreadyInClanIncoming(String(this._alreadyInClanIncoming_uidCodec.decode(param2)),Long(this._alreadyInClanIncoming_userIdCodec.decode(param2))); break; case this._alreadyInClanOutgoingId: this.client.alreadyInClanOutgoing(String(this._alreadyInClanOutgoing_uidCodec.decode(param2))); break; case this._alreadyInUserOutgoingId: this.client.alreadyInUserOutgoing(String(this._alreadyInUserOutgoing_uidCodec.decode(param2)),Long(this._alreadyInUserOutgoing_idCodec.decode(param2))); break; case this._maxMembersId: this.client.maxMembers(); break; case this._userExistId: this.client.userExist(); break; case this._userLowRankId: this.client.userLowRank(); break; case this._userNotExistId: this.client.userNotExist(); } } override public function get id() : Long { return this.modelId; } } }
package _codec.projects.tanks.client.battlefield.models.user.tank.commands { 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.tank.commands.MoveCommand; public class VectorCodecMoveCommandLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecMoveCommandLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(MoveCommand,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.<MoveCommand> = new Vector.<MoveCommand>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = MoveCommand(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:MoveCommand = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<MoveCommand> = Vector.<MoveCommand>(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.panel.clanpanel { import alternativa.types.Long; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class IClanPanelModelEvents implements IClanPanelModel { private var object:IGameObject; private var impl:Vector.<Object>; public function IClanPanelModelEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function sendInviteToClan(param1:Long) : void { var i:int = 0; var m:IClanPanelModel = null; var userId:Long = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = IClanPanelModel(this.impl[i]); m.sendInviteToClan(userId); i++; } } finally { Model.popObject(); } } } }
package projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties { import flash.events.Event; public class UserPropertiesServiceEvent extends Event { public static const UPDATE_RANK:String = "UserPropertiesServiceEvent.UPDATE_RANK"; public static const UPDATE_SCORE:String = "UserPropertiesServiceEvent.UPDATE_SCORE"; public static const ON_INIT_USER_PROPERTIES:String = "UserPropertiesServiceEvent.ON_INIT_USER_PROPERTIES"; public var userProperties:UserProperties; public function UserPropertiesServiceEvent(param1:String, param2:UserProperties = null) { super(param1); this.userProperties = param2; } } }
package _codec.projects.tanks.client.battleservice.model.map.params { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import projects.tanks.client.battleservice.model.map.params.MapTheme; public class CodecMapTheme implements ICodec { public function CodecMapTheme() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:MapTheme = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = MapTheme.SUMMER; break; case 1: local2 = MapTheme.WINTER; break; case 2: local2 = MapTheme.DAY; break; case 3: local2 = MapTheme.NIGHT; break; case 4: local2 = MapTheme.SUMMER_DAY; break; case 5: local2 = MapTheme.SUMMER_NIGHT; break; case 6: local2 = MapTheme.WINTER_DAY; break; case 7: local2 = MapTheme.WINTER_NIGHT; break; case 8: local2 = MapTheme.SPACE; } return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:int = int(param2.value); param1.writer.writeInt(local3); } } }
package projects.tanks.client.garage.models.premium { public interface IPremiumInDepotModelBase { } }
package _codec.projects.tanks.client.garage.models.item.mobilelootbox.lootbox { 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.garage.models.item.mobilelootbox.lootbox.MobileLoot; public class VectorCodecMobileLootLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecMobileLootLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(MobileLoot,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.<MobileLoot> = new Vector.<MobileLoot>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = MobileLoot(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:MobileLoot = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<MobileLoot> = Vector.<MobileLoot>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package projects.tanks.client.commons.types { public class ShopCategoryEnum { public static const CRYSTALS:ShopCategoryEnum = new ShopCategoryEnum(0,"CRYSTALS"); public static const COINS:ShopCategoryEnum = new ShopCategoryEnum(1,"COINS"); public static const PREMIUM:ShopCategoryEnum = new ShopCategoryEnum(2,"PREMIUM"); public static const GOLD_BOXES:ShopCategoryEnum = new ShopCategoryEnum(3,"GOLD_BOXES"); public static const PAINTS:ShopCategoryEnum = new ShopCategoryEnum(4,"PAINTS"); public static const KITS:ShopCategoryEnum = new ShopCategoryEnum(5,"KITS"); public static const OTHERS:ShopCategoryEnum = new ShopCategoryEnum(6,"OTHERS"); public static const LOOT_BOXES:ShopCategoryEnum = new ShopCategoryEnum(7,"LOOT_BOXES"); public static const NO_CATEGORY:ShopCategoryEnum = new ShopCategoryEnum(8,"NO_CATEGORY"); private var _value:int; private var _name:String; public function ShopCategoryEnum(param1:int, param2:String) { super(); this._value = param1; this._name = param2; } public static function get values() : Vector.<ShopCategoryEnum> { var local1:Vector.<ShopCategoryEnum> = new Vector.<ShopCategoryEnum>(); local1.push(CRYSTALS); local1.push(COINS); local1.push(PREMIUM); local1.push(GOLD_BOXES); local1.push(PAINTS); local1.push(KITS); local1.push(OTHERS); local1.push(LOOT_BOXES); local1.push(NO_CATEGORY); return local1; } public function toString() : String { return "ShopCategoryEnum [" + this._name + "]"; } public function get value() : int { return this._value; } public function get name() : String { return this._name; } } }
package _codec.projects.tanks.client.panel.model.shop.specialkit { 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.specialkit.ShopKitText; public class VectorCodecShopKitTextLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecShopKitTextLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ShopKitText,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.<ShopKitText> = new Vector.<ShopKitText>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ShopKitText(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ShopKitText = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ShopKitText> = Vector.<ShopKitText>(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 assets.slider { import flash.display.BitmapData; [Embed(source="/_assets/assets.slider.slider_THUMB_CENTER.png")] public dynamic class slider_THUMB_CENTER extends BitmapData { public function slider_THUMB_CENTER(param1:int = 30, param2:int = 30) { super(param1,param2); } } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_shaftFireRateClass.png")] public class ItemInfoPanelBitmaps_shaftFireRateClass extends BitmapAsset { public function ItemInfoPanelBitmaps_shaftFireRateClass() { super(); } } }
package alternativa.tanks.model.payment.modes.gate2shop { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class Gate2ShopPaymentEvents implements Gate2ShopPayment { private var object:IGameObject; private var impl:Vector.<Object>; public function Gate2ShopPaymentEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function emailInputRequired() : Boolean { var result:Boolean = false; var i:int = 0; var m:Gate2ShopPayment = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Gate2ShopPayment(this.impl[i]); result = Boolean(m.emailInputRequired()); i++; } } finally { Model.popObject(); } return result; } public function registerEmailAndGetPaymentUrl(param1:String) : void { var i:int = 0; var m:Gate2ShopPayment = null; var email:String = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Gate2ShopPayment(this.impl[i]); m.registerEmailAndGetPaymentUrl(email); i++; } } finally { Model.popObject(); } } } }
package alternativa.tanks.battle.events.reload { public class ReloadDeactivateEvent { public function ReloadDeactivateEvent() { super(); } } }
package projects.tanks.client.clans.clan { 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 ClanModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _acceptId:Long = Long.getLong(604314745,-105798717); private var _accept_userIdCodec:ICodec; private var _addId:Long = Long.getLong(1902342915,677739462); private var _add_userIdCodec:ICodec; private var _addInClanByUidId:Long = Long.getLong(1703252332,-1020199032); private var _addInClanByUid_uidCodec:ICodec; private var _checkUidId:Long = Long.getLong(925885936,795088419); private var _checkUid_uidCodec:ICodec; private var _rejectId:Long = Long.getLong(604314746,382952026); private var _reject_userIdCodec:ICodec; private var _rejectAllId:Long = Long.getLong(1362304089,-1090734311); private var _removeUserFromClanId:Long = Long.getLong(537442486,-138480918); private var _removeUserFromClan_userIdCodec:ICodec; private var _revokeId:Long = Long.getLong(604314746,383319361); private var _revoke_userIdCodec:ICodec; private var _userLeavesClanId:Long = Long.getLong(1199890940,823346440); private var model:IModel; public function ClanModelServer(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_userIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); this._add_userIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); this._addInClanByUid_uidCodec = this.protocol.getCodec(new TypeCodecInfo(String,false)); this._checkUid_uidCodec = this.protocol.getCodec(new TypeCodecInfo(String,false)); this._reject_userIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); this._removeUserFromClan_userIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); this._revoke_userIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); } public function accept(param1:Long) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._accept_userIdCodec.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:Long) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._add_userIdCodec.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 addInClanByUid(param1:String) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._addInClanByUid_uidCodec.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._addInClanByUidId,this.protocolBuffer); var local3:IGameObject = Model.object; var local4:ISpace = local3.space; local4.commandSender.sendCommand(local2); this.protocolBuffer.optionalMap.clear(); } public function checkUid(param1:String) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._checkUid_uidCodec.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._checkUidId,this.protocolBuffer); var local3:IGameObject = Model.object; var local4:ISpace = local3.space; local4.commandSender.sendCommand(local2); this.protocolBuffer.optionalMap.clear(); } public function reject(param1:Long) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._reject_userIdCodec.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 removeUserFromClan(param1:Long) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._removeUserFromClan_userIdCodec.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._removeUserFromClanId,this.protocolBuffer); var local3:IGameObject = Model.object; var local4:ISpace = local3.space; local4.commandSender.sendCommand(local2); this.protocolBuffer.optionalMap.clear(); } public function revoke(param1:Long) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._revoke_userIdCodec.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(); } public function userLeavesClan() : 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._userLeavesClanId,this.protocolBuffer); var local2:IGameObject = Model.object; var local3:ISpace = local2.space; local3.commandSender.sendCommand(local1); this.protocolBuffer.optionalMap.clear(); } } }
package com.alternativaplatform.projects.tanks.client.commons.types { public class ItemProperty { public static var DAMAGE:ItemProperty = new ItemProperty(); public static var DAMAGE_PER_SECOND:ItemProperty = new ItemProperty(); public static var AIMING_ERROR:ItemProperty = new ItemProperty(); public static var CONE_ANGLE:ItemProperty = new ItemProperty(); public static var SHOT_AREA:ItemProperty = new ItemProperty(); public static var SHOT_FREQUENCY:ItemProperty = new ItemProperty(); public static var SHOT_RANGE:ItemProperty = new ItemProperty(); public static var TURN_SPEED:ItemProperty = new ItemProperty(); public static var MECH_RESISTANCE:ItemProperty = new ItemProperty(); public static var PLASMA_RESISTANCE:ItemProperty = new ItemProperty(); public static var RAIL_RESISTANCE:ItemProperty = new ItemProperty(); public static var TERMINATOR_RESISTANCE:ItemProperty = new ItemProperty(); public static var MINE_RESISTANCE:ItemProperty = new ItemProperty(); public static var CRITICAL_CHANCE:ItemProperty = new ItemProperty(); public static var HEATING_TIME:ItemProperty = new ItemProperty(); public static var VAMPIRE_RESISTANCE:ItemProperty = new ItemProperty(); public static var ARMOR:ItemProperty = new ItemProperty(); public static var TURRET_TURN_SPEED:ItemProperty = new ItemProperty(); public static var FIRE_RESISTANCE:ItemProperty = new ItemProperty(); public static var THUNDER_RESISTANCE:ItemProperty = new ItemProperty(); public static var FREEZE_RESISTANCE:ItemProperty = new ItemProperty(); public static var RICOCHET_RESISTANCE:ItemProperty = new ItemProperty(); public static var HEALING_RADUIS:ItemProperty = new ItemProperty(); public static var HEAL_RATE:ItemProperty = new ItemProperty(); public static var VAMPIRE_RATE:ItemProperty = new ItemProperty(); public static var SPEED:ItemProperty = new ItemProperty(); public static var SHAFT_DAMAGE:ItemProperty = new ItemProperty(); public static var SHAFT_FIRE_RATE:ItemProperty = new ItemProperty(); public static var SHAFT_RESISTANCE:ItemProperty = new ItemProperty(); public function ItemProperty() { super(); } } }
package alternativa.tanks.sfx.drone { [ModelInterface] public interface DroneSFX { function getSfxData() : DroneSFXData; } }
package projects.tanks.client.panel.model.shop.discount { public interface IShopDiscountModelBase { } }
package alternativa.tanks.models.tank.engine { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.tankparts.engine.EngineCC; public class EngineEvents implements Engine { private var object:IGameObject; private var impl:Vector.<Object>; public function EngineEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getCC() : EngineCC { var result:EngineCC = null; var i:int = 0; var m:Engine = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Engine(this.impl[i]); result = m.getCC(); i++; } } finally { Model.popObject(); } return result; } } }
package controls.lifeindicator { import mx.core.BitmapAsset; [ExcludeClass] public class LineCharge_bitmapRight extends BitmapAsset { public function LineCharge_bitmapRight() { super(); } } }
package alternativa.tanks.model.payment.shop.discount { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class ShopDiscountAdapt implements ShopDiscount { private var object:IGameObject; private var impl:ShopDiscount; public function ShopDiscountAdapt(param1:IGameObject, param2:ShopDiscount) { super(); this.object = param1; this.impl = param2; } public function isEnabled() : Boolean { var result:Boolean = false; try { Model.object = this.object; result = Boolean(this.impl.isEnabled()); } finally { Model.popObject(); } return result; } public function applyDiscount(param1:Number) : Number { var result:Number = NaN; var price:Number = param1; try { Model.object = this.object; result = Number(this.impl.applyDiscount(price)); } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.engine3d { public class MaterialType { public static const MAP:MaterialType = new MaterialType(); public static const TANK:MaterialType = new MaterialType(); public static const EFFECT:MaterialType = new MaterialType(); public function MaterialType() { super(); } } }
package projects.tanks.client.panel.model.friends { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; 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 FriendsLoaderModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _showId:Long = Long.getLong(1683335473,-895192523); private var model:IModel; public function FriendsLoaderModelServer(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()); } public function show() : 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._showId,this.protocolBuffer); var local2:IGameObject = Model.object; var local3:ISpace = local2.space; local3.commandSender.sendCommand(local1); this.protocolBuffer.optionalMap.clear(); } } }
package alternativa.physics { public class PhysicsMaterial { public static const DEFAULT_MATERIAL:PhysicsMaterial = new PhysicsMaterial(); public var restitution:Number; public var friction:Number; public function PhysicsMaterial(param1:Number = 0, param2:Number = 0.3) { super(); this.restitution = param1; this.friction = param2; } } }
package alternativa.tanks.models.weapon.healing { import alternativa.math.Matrix3; import alternativa.math.Vector3; import alternativa.physics.Body; import alternativa.physics.altphysics; import alternativa.physics.collision.ICollisionDetector; import alternativa.physics.collision.types.RayIntersection; import alternativa.tanks.models.tank.TankData; import alternativa.tanks.physics.CollisionGroup; import alternativa.tanks.physics.TanksCollisionDetector; import flash.geom.Matrix3D; import flash.utils.Dictionary; import projects.tanks.client.battleservice.model.team.BattleTeamType; use namespace altphysics; public class HealingGunTargetSystem { private const collisionGroup:int = 16; private const LOCKING_RANGE_DELTA:Number = 50; private const angleWeight:Number = 0.6; private const distanceWeight:Number = 0.4; private var _xAxis:Vector3; private var matrix:Matrix3; private var rotationMatrix:Matrix3; private var intersection:RayIntersection; private var staticIntersection:RayIntersection; private var predicate:GunPredicate; private var rayDir:Vector3; private var vin:Vector.<Number>; private var vout:Vector.<Number>; private var stvin:Vector3; private var stvout:Vector3; private var hitPointsTargets:Array; private var hitPointsArray:Array; private var hitPoints:Array; private var checkedTargets:Dictionary; private var bestTarget:TankData; private var maxTargetPriority:Number; private var shooterTeamType:BattleTeamType; private var muzzlePosGlobal:Vector3; public function HealingGunTargetSystem() { this._xAxis = new Vector3(); this.matrix = new Matrix3(); this.rotationMatrix = new Matrix3(); this.intersection = new RayIntersection(); this.staticIntersection = new RayIntersection(); this.predicate = new GunPredicate(); this.rayDir = new Vector3(); this.vin = Vector.<Number>([0,0,0]); this.vout = Vector.<Number>([0,0,0]); this.stvin = new Vector3(0,0,0); this.stvout = new Vector3(0,0,0); this.hitPointsTargets = []; this.hitPointsArray = []; this.hitPoints = []; this.checkedTargets = new Dictionary(); this.muzzlePosGlobal = new Vector3(); super(); } public function getTarget(healerData:TankData, gunData:HealingGunData, barrelLength:Number, barrelOrigin:Vector3, gunDir:Vector3, xAxis:Vector3, numRays:int, numSteps:Number, collisionDetector:TanksCollisionDetector, tankDatas:Dictionary) : TankData { var key:* = undefined; var targetBody:Body = null; if(collisionDetector.intersectRayWithStatic(barrelOrigin,gunDir,CollisionGroup.STATIC,barrelLength,null,this.intersection)) { return null; } this.muzzlePosGlobal.x = barrelOrigin.x + barrelLength * gunDir.x; this.muzzlePosGlobal.y = barrelOrigin.y + barrelLength * gunDir.y; this.muzzlePosGlobal.z = barrelOrigin.z + barrelLength * gunDir.z; this.bestTarget = null; this.maxTargetPriority = 0; this.shooterTeamType = healerData.teamType; var lockingRangeSqr:Number = gunData.maxRadius.value - this.LOCKING_RANGE_DELTA; lockingRangeSqr *= lockingRangeSqr; this._xAxis.x = xAxis.x; this._xAxis.y = xAxis.y; this._xAxis.z = xAxis.z; this.predicate.healer = healerData.tank; if(collisionDetector.intersectRay(this.muzzlePosGlobal,gunDir,this.collisionGroup,gunData.maxRadius.value,this.predicate,this.intersection)) { targetBody = this.intersection.primitive.body; if(targetBody != null) { this.checkTarget(targetBody,tankDatas,gunData,lockingRangeSqr,this.muzzlePosGlobal,gunDir,collisionDetector); } } this.rotationMatrix.fromAxisAngle(gunDir,Math.PI / numSteps); var angleStep:Number = gunData.lockAngle.value / numRays; for(var i:int = 0; i < numSteps; i++) { this.checkSector(gunData,lockingRangeSqr,this.muzzlePosGlobal,gunDir,this._xAxis,numRays,angleStep,collisionDetector,tankDatas,0); this.checkSector(gunData,lockingRangeSqr,this.muzzlePosGlobal,gunDir,this._xAxis,numRays,-angleStep,collisionDetector,tankDatas,numSteps); this._xAxis.vTransformBy3(this.rotationMatrix); } var target:TankData = this.bestTarget; this.bestTarget = null; this.predicate.healer = null; for(key in this.checkedTargets) { delete this.checkedTargets[key]; } this.hitPoints = []; this.hitPointsTargets = []; this.hitPointsArray = []; return target; } public function validateTarget(healerData:TankData, targetData:TankData, gunData:HealingGunData, gunDir:Vector3, barrelOrigin:Vector3, barrelLength:Number, collisionDetector:TanksCollisionDetector) : Boolean { var dx:Number = NaN; var dy:Number = NaN; var dz:Number = NaN; var d:Number = NaN; var body:Body = null; if(collisionDetector.intersectRayWithStatic(barrelOrigin,gunDir,CollisionGroup.STATIC,barrelLength,null,this.intersection)) { return false; } this.muzzlePosGlobal.x = barrelOrigin.x + barrelLength * gunDir.x; this.muzzlePosGlobal.y = barrelOrigin.y + barrelLength * gunDir.y; this.muzzlePosGlobal.z = barrelOrigin.z + barrelLength * gunDir.z; targetData.tank.skin.turretMesh.matrix.transformVectors(this.vin,this.vout); dx = this.vout[0] - this.muzzlePosGlobal.x; dy = this.vout[1] - this.muzzlePosGlobal.y; dz = this.vout[2] - this.muzzlePosGlobal.z; d = dx * dx + dy * dy + dz * dz; if(d > gunData.maxRadius.value * gunData.maxRadius.value) { return false; } this.rayDir.x = dx; this.rayDir.y = dy; this.rayDir.z = dz; d = 1 / Math.sqrt(d); dx *= d; dy *= d; dz *= d; var cos:Number = dx * gunDir.x + dy * gunDir.y + dz * gunDir.z; if(cos < gunData.maxAngleCos.value) { return false; } this.predicate.healer = healerData.tank; if(collisionDetector.intersectRay(this.muzzlePosGlobal,this.rayDir,CollisionGroup.WEAPON,1,this.predicate,this.intersection)) { this.predicate.healer = null; body = this.intersection.primitive.body; if(body == null || body != targetData.tank) { return false; } } return true; } private function checkSector(gunData:HealingGunData, lockingRangeSqr:Number, rayOrigin:Vector3, gunDir:Vector3, xAxis:Vector3, raysNum:int, angleStep:Number, collisionDetector:ICollisionDetector, tanks:Dictionary, step:int) : void { var targetBody:Body = null; var angle:Number = 0; for(var i:int = 1; i <= raysNum; i++) { angle += angleStep; this.matrix.fromAxisAngle(xAxis,angle); this.matrix.transformVector(gunDir,this.rayDir); if(collisionDetector.intersectRay(rayOrigin,this.rayDir,this.collisionGroup,gunData.maxRadius.value,this.predicate,this.intersection)) { targetBody = this.intersection.primitive.body; if(targetBody != null) { this.checkTarget(targetBody,tanks,gunData,lockingRangeSqr,rayOrigin,gunDir,collisionDetector); } } } } private function checkTarget(targetBody:Body, tanks:Dictionary, gunData:HealingGunData, lockingRangeSqr:Number, rayOrigin:Vector3, gunDir:Vector3, collisionDetector:ICollisionDetector) : void { if(this.checkedTargets[targetBody] != null) { return; } this.checkedTargets[targetBody] = true; var targetData:TankData = tanks[targetBody]; if(targetData == null || !targetData.enabled) { return; } var matrix:Matrix3D = targetData.tank.skin.turretMesh.matrix; matrix.transformVectors(this.vin,this.vout); var dx:Number = this.vout[0] - rayOrigin.x; var dy:Number = this.vout[1] - rayOrigin.y; var dz:Number = this.vout[2] - rayOrigin.z; var d:Number = dx * dx + dy * dy + dz * dz; if(d > lockingRangeSqr) { return; } var distanceSqr:Number = d; d = 1 / Math.sqrt(d); dx *= d; dy *= d; dz *= d; var angleCos:Number = dx * gunDir.x + dy * gunDir.y + dz * gunDir.z; if(angleCos <= gunData.maxAngleCos.value) { return; } this.rayDir.x = dx; this.rayDir.y = dy; this.rayDir.z = dz; if(collisionDetector.intersectRay(rayOrigin,this.rayDir,this.collisionGroup,gunData.maxRadius.value,this.predicate,this.intersection)) { if(this.intersection.primitive.body != targetBody) { return; } } var priority:Number = this.getBaseTargetPriority(targetData) + this.distanceWeight * (lockingRangeSqr - distanceSqr) / lockingRangeSqr + this.angleWeight * angleCos; if(priority > this.maxTargetPriority) { this.maxTargetPriority = priority; this.bestTarget = targetData; } } private function getBaseTargetPriority(targetData:TankData) : Number { if(this.shooterTeamType == BattleTeamType.NONE) { return 1; } if(this.shooterTeamType == targetData.teamType) { return targetData.health == 10000 ? Number(1) : Number(3); } return 2; } } } import alternativa.physics.Body; import alternativa.physics.collision.IRayCollisionPredicate; class GunPredicate implements IRayCollisionPredicate { public var healer:Body; function GunPredicate() { super(); } public function considerBody(body:Body) : Boolean { return this.healer != body; } }
package assets.button { import flash.display.BitmapData; [Embed(source="/_assets/assets.button.bigbutton_OFF_CENTER.png")] public dynamic class bigbutton_OFF_CENTER extends BitmapData { public function bigbutton_OFF_CENTER(param1:int = 201, param2:int = 50) { super(param1,param2); } } }
package platform.client.fp10.core.service.errormessage.errors { import platform.client.fp10.core.resource.Resource; public class ResourceError implements ErrorType { private var resource:Resource; private var errorText:String; public function ResourceError(param1:Resource, param2:String) { super(); this.errorText = param2; this.resource = param1; } public function getMessage() : String { return "Fatal error. Resource id: " + this.resource.id + ", resource version: " + this.resource.version + " " + this.errorText; } } }
package alternativa.tanks.gui { import alternativa.init.Main; import alternativa.osgi.service.locale.ILocaleService; import alternativa.osgi.service.storage.IStorageService; import alternativa.tanks.locale.constants.TextConst; import controls.DefaultButton; import controls.Label; import controls.Slider; import controls.TankCheckBox; import controls.TankInput; import controls.TankWindow; import controls.TankWindowHeader; import controls.TankWindowInner; import flash.display.Sprite; import flash.events.Event; import flash.events.FocusEvent; import flash.events.MouseEvent; import flash.geom.Point; import flash.text.AntiAliasType; import forms.events.SliderEvent; import scpacker.gui.GTanksLoaderWindow; import scpacker.gui.IGTanksLoader; public class SettingsWindow extends Sprite { private static const buttonSize:Point = new Point(104,33); private static const FIRST_COLUMN_X:int = 21; private static const SECOND_COLUMN_X:int = 109; private static const windowMargin:int = 12; private static const margin:int = 8; private var passwordInput:TankInput; private var passwordConfirmInput:TankInput; private var emailInput:TankInput; private var realNameInput:TankInput; private var idNumberInput:TankInput; private var volumeLevel:Slider; private var volumeLabel:Label; private var passLabel:Label; private var repPassLabel:Label; private var emailLabel:Label; private var performanceLabel:Label; private var accountLabel:Label; private var controlLabel:Label; private var antiAddictionLabel:Label; private var realNameLabel:Label; private var idNumberLabel:Label; private var _bgSound:TankCheckBox; private var _showFPS:TankCheckBox; private var _adaptiveFPS:TankCheckBox; private var _sendNews:TankCheckBox; private var _showSkyBox:TankCheckBox; private var _showBattleChat:TankCheckBox; private var _inverseBackDriving:TankCheckBox; private var cbMipMapping:TankCheckBox; private var useNewLoader:TankCheckBox; private var _showShadowsTank:TankCheckBox; private var _useFog:TankCheckBox; private var _softParticle:TankCheckBox; private var _dust:TankCheckBox; private var _shadows:TankCheckBox; private var _defferedLighting:TankCheckBox; private var _nyLighting:TankCheckBox; private var _tracksAnimation:TankCheckBox; private var _damageAnimation:TankCheckBox; private var _useOldTextures:TankCheckBox; private var _useSSAO:TankCheckBox; private var _coloredFPS:TankCheckBox; private var window:TankWindow; private var soundInner:TankWindowInner; private var performanceInner:TankWindowInner; private var accountInner:TankWindowInner; private var controlInner:TankWindowInner; private var antiAddictionInner:TankWindowInner; private var windowSize:Point; public var confirmEmailButton:DefaultButton; private var cancelButton:DefaultButton; private var switchButton:DefaultButton; private var okButton:DefaultButton; private var changePasswordButton:DefaultButton; public var state:int; public const STATE_EMAIL_UNDEFINED:int = 0; public const STATE_EMAIL_UNCONFIRMED:int = 1; public const STATE_EMAIL_CHANGE:int = 2; public var isPasswordChangeDisabled:Boolean = false; public function SettingsWindow(mail:String, emailConfirmed:Boolean, antiAddictionEnabled:Boolean, realName:String, idNumber:String) { var localeService:ILocaleService = null; super(); localeService = ILocaleService(Main.osgi.getService(ILocaleService)); if(emailConfirmed) { this.state = this.STATE_EMAIL_CHANGE; this.isPasswordChangeDisabled = true; } else if(mail != "" && mail != null) { this.state = this.STATE_EMAIL_UNCONFIRMED; this.isPasswordChangeDisabled = true; } else { this.state = this.STATE_EMAIL_UNDEFINED; } this.windowSize = new Point(444,550 + (!!antiAddictionEnabled ? 110 : 50) + (!this.isPasswordChangeDisabled ? 30 : 0)); var inputWidth:int = 120; this.window = new TankWindow(this.windowSize.x,this.windowSize.y); this.window.headerLang = localeService.getText(TextConst.GUI_LANG); this.window.header = TankWindowHeader.SETTINGS; addChild(this.window); this.soundInner = new TankWindowInner(0,0,TankWindowInner.TRANSPARENT); addChild(this.soundInner); this.soundInner.x = windowMargin; this.soundInner.y = windowMargin; this.soundInner.width = this.windowSize.x - windowMargin * 2; this.performanceInner = new TankWindowInner(0,0,TankWindowInner.TRANSPARENT); addChild(this.performanceInner); this.performanceInner.x = windowMargin; this.performanceInner.width = this.windowSize.x - windowMargin * 2; this.accountInner = new TankWindowInner(0,0,TankWindowInner.TRANSPARENT); addChild(this.accountInner); this.accountInner.x = windowMargin; this.accountInner.width = this.windowSize.x - windowMargin * 2; this.controlInner = new TankWindowInner(0,0,TankWindowInner.TRANSPARENT); addChild(this.controlInner); this.controlInner.x = windowMargin; this.controlInner.width = this.windowSize.x - windowMargin * 2; this._bgSound = this.createCheckBox(localeService.getText(TextConst.SETTINGS_BACKGROUND_SOUND_CHECKBOX_LABEL_TEXT)); addChild(this._bgSound); this._bgSound.x = this.windowSize.x - windowMargin - this._bgSound.width - margin; this._bgSound.y = this.soundInner.y + margin; this.volumeLabel = new Label(); addChild(this.volumeLabel); this.volumeLabel.text = localeService.getText(TextConst.SETTINGS_SOUND_VOLUME_LABEL_TEXT); this.volumeLabel.x = SECOND_COLUMN_X - margin - this.volumeLabel.textWidth; this.volumeLevel = new Slider(); addChild(this.volumeLevel); this.volumeLevel.maxValue = 100; this.volumeLevel.minValue = 0; this.volumeLevel.tickInterval = 5; this.volumeLevel.x = SECOND_COLUMN_X; this.volumeLevel.y = this.soundInner.y + margin; this.volumeLevel.width = this.windowSize.x - windowMargin - margin - SECOND_COLUMN_X - this._bgSound.width - margin; this.volumeLevel.addEventListener(SliderEvent.CHANGE_VALUE,this.onChangeVolume); this.soundInner.height = margin * 2 + this.volumeLevel.height; this.volumeLabel.y = this.soundInner.y + Math.round((this.soundInner.height - this.volumeLabel.textHeight) * 0.5) - 2; this.performanceLabel = new Label(); this.performanceLabel.antiAliasType = AntiAliasType.ADVANCED; this.performanceLabel.sharpness = -100; this.performanceLabel.thickness = 100; this.performanceLabel.text = localeService.getText(TextConst.SETTINGS_PERFORMANCE_HEADER_LABEL_TEXT); this.performanceLabel.textColor = 0; addChild(this.performanceLabel); this.performanceLabel.x = windowMargin; this.performanceLabel.y = this.soundInner.y + this.soundInner.height + windowMargin; this.performanceInner.y = this.performanceLabel.y + this.performanceLabel.textHeight + 5; this._showFPS = this.createCheckBox(localeService.getText(TextConst.SETTINGS_SHOW_FPS_CHECKBOX_LABEL_TEXT)); addChild(this._showFPS); this._showFPS.x = FIRST_COLUMN_X; this._showFPS.y = this.performanceInner.y + margin + 1; this._adaptiveFPS = this.createCheckBox(localeService.getText(TextConst.SETTINGS_ENABLE_ADAPTIVE_FPS_CHECKBOX_LABEL_TEXT)); addChild(this._adaptiveFPS); this._adaptiveFPS.x = this._showFPS.x + 252; this._adaptiveFPS.y = this._showFPS.y + this._showFPS.height + margin; this._coloredFPS = this.createCheckBox(localeService.getText(TextConst.SETTINGS_COLORED_FPS)); addChild(this._coloredFPS); this._coloredFPS.x = this._showFPS.x; this._coloredFPS.y = this._showFPS.y + this._showFPS.height + margin; this._showSkyBox = this.createCheckBox(localeService.getText(TextConst.SETTINGS_SHOW_SKYBOX_CHECKBOX_LABEL_TEXT)); this._showSkyBox.type = TankCheckBox.CHECK_SIGN; addChild(this._showSkyBox); this._showSkyBox.x = this._adaptiveFPS.x; this._showSkyBox.y = this._showFPS.y; this.useNewLoader = this.createCheckBox(localeService.getText(TextConst.SETTINGS_USE_NEW_LOADER_CHECKBOX_LABEL_TEXT)); addChild(this.useNewLoader); this.useNewLoader.x = this._showSkyBox.x; this.useNewLoader.y = this._adaptiveFPS.y + this._adaptiveFPS.height + margin; this.useNewLoader.addEventListener(MouseEvent.CLICK,function(e:MouseEvent):void { IStorageService(Main.osgi.getService(IStorageService)).getStorage().setProperty("use_new_loader",useNewLoader.checked); Main.osgi.registerService(IGTanksLoader,new GTanksLoaderWindow(useNewLoader.checked)); GTanksLoaderWindow(Main.osgi.getService(IGTanksLoader)).hideLoaderWindow(); }); this.useNewLoader.checked = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_new_loader"]; this._showBattleChat = this.createCheckBox(localeService.getText(TextConst.SETTINGS_SHOW_BATTLE_CHAT_CHECKBOX_LABEL_TEXT)); addChild(this._showBattleChat); this._showBattleChat.x = FIRST_COLUMN_X; this._showBattleChat.y = this._adaptiveFPS.y + this._adaptiveFPS.height + margin; this._useFog = this.createCheckBox(localeService.getText(TextConst.SETTINGS_FOG_CHECKBOX_LABEL_TEXT)); this._useFog.x = this._showBattleChat.x; this._useFog.y = this._showBattleChat.y + this._useFog.height * 2 + 15; this._useFog.checked = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["fog"]; addChild(this._useFog); this._defferedLighting = this.createCheckBox(localeService.getText(TextConst.SETTINGS_DYNAMIC_LIGHTS_CHECKBOX_LABEL_TEXT)); this._defferedLighting.x = this.useNewLoader.x; this._defferedLighting.y = this._showBattleChat.y + this._useFog.height * 2 + 15; addChild(this._defferedLighting); this._nyLighting = this.createCheckBox("Night mode"); this._nyLighting.x = this.useNewLoader.x - 125; this._nyLighting.y = this._showBattleChat.y + this._useFog.height * 2 + 15; this._nyLighting.addEventListener(MouseEvent.CLICK,function(e:MouseEvent):void { IStorageService(Main.osgi.getService(IStorageService)).getStorage().setProperty("night_mode",_nyLighting.checked); }); this._nyLighting.checked = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["night_mode"]; addChild(this._nyLighting); this._shadows = this.createCheckBox(localeService.getText(TextConst.SETTINGS_DYNAMIC_SHADOWS_CHECKBOX_LABEL_TEXT)); this._shadows.x = this._useFog.x; this._shadows.y = this._useFog.y + this._shadows.height + 6; this._shadows.enabled = false; addChild(this._shadows); this._showShadowsTank = this.createCheckBox(localeService.getText(TextConst.SETTINGS_TANK_SHADOWS_CHECKBOX_LABEL_TEXT)); this._showShadowsTank.x = this.useNewLoader.x; this._showShadowsTank.y = this.useNewLoader.y + this.useNewLoader.height - 3; addChild(this._showShadowsTank); this.cbMipMapping = this.createCheckBox(localeService.getText(TextConst.SETTINGS_MIPMAPPING_LABEL_TEXT)); this.cbMipMapping.x = FIRST_COLUMN_X; this.cbMipMapping.y = this._showBattleChat.y + this._showBattleChat.height + margin; addChild(this.cbMipMapping); this._softParticle = this.createCheckBox(localeService.getText(TextConst.SETTINGS_SOFT_PARTICLES_CHECKBOX_LABEL_TEXT)); this._softParticle.x = this.useNewLoader.x; this._softParticle.y = this.cbMipMapping.y + this._shadows.height * 2 + 13; this._softParticle.addEventListener(MouseEvent.CLICK,function(e:MouseEvent):void { IStorageService(Main.osgi.getService(IStorageService)).getStorage().setProperty("soft_particle",_softParticle.checked); Main.osgi.registerService(IGTanksLoader,new GTanksLoaderWindow(useNewLoader.checked)); GTanksLoaderWindow(Main.osgi.getService(IGTanksLoader)).hideLoaderWindow(); _dust.visible = _softParticle.checked; }); this._softParticle.checked = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["soft_particle"]; addChild(this._softParticle); this._dust = this.createCheckBox(localeService.getText(TextConst.SETTINGS_DUST_CHECKBOX_LABEL_TEXT)); this._dust.x = this._softParticle.x; this._dust.y = this._softParticle.y + this._dust.height + 6; this._dust.visible = this._softParticle.checked; addChild(this._dust); this._tracksAnimation = this.createCheckBox(localeService.getText(TextConst.SETTINGS_TRACKS_CHECKBOX_LABEL_TEXT)); this._tracksAnimation.x = this._useFog.x; this._tracksAnimation.y = this._softParticle.y + this._dust.height + 6; addChild(this._tracksAnimation); this._damageAnimation = this.createCheckBox(localeService.getText(TextConst.SETTINGS_DAMAGE_CHECKBOX_LABEL_TEXT)); this._damageAnimation.x = this._useFog.x; this._damageAnimation.y = this._dust.y + this._dust.height + 6; this._damageAnimation.checked = true; addChild(this._damageAnimation); this._useOldTextures = this.createCheckBox(localeService.getText(TextConst.SETTINGS_OLD_TEXTURES_LABEL_TEXT)); this._useOldTextures.x = this._softParticle.x; this._useOldTextures.y = this._dust.y + this._dust.height + 6; this._useOldTextures.addEventListener(MouseEvent.CLICK,function(e:MouseEvent):void { IStorageService(Main.osgi.getService(IStorageService)).getStorage().setProperty("use_old_textures",_useOldTextures.checked); }); this._useOldTextures.checked = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_old_textures"]; addChild(this._useOldTextures); this._useSSAO = this.createCheckBox("SSAO"); this._useSSAO.x = this._softParticle.x - 100; this._useSSAO.y = this._dust.y + this._dust.height + 6; this._useSSAO.addEventListener(MouseEvent.CLICK,function(e:MouseEvent):void { IStorageService(Main.osgi.getService(IStorageService)).getStorage().setProperty("use_ssao",_useSSAO.checked); }); this._useSSAO.checked = IStorageService(Main.osgi.getService(IStorageService)).getStorage().data["use_ssao"]; addChild(this._useSSAO); this.performanceInner.height = this._shadows.y + 2 * margin; this.accountLabel = new Label(); this.accountLabel.antiAliasType = AntiAliasType.ADVANCED; this.accountLabel.sharpness = -100; this.accountLabel.thickness = 100; this.accountLabel.text = localeService.getText(TextConst.SETTINGS_ACCOUNT_HEADER_LABEL_TEXT); this.accountLabel.textColor = 0; addChild(this.accountLabel); this.accountLabel.x = windowMargin; this.accountLabel.y = this.performanceInner.y + this.performanceInner.height + windowMargin; this.accountInner.y = this.accountLabel.y + this.accountLabel.textHeight + 5; if(!this.isPasswordChangeDisabled) { this.passwordInput = new TankInput(); this.passwordInput.hidden = true; addChild(this.passwordInput); this.passwordInput.width = inputWidth; this.passwordInput.x = SECOND_COLUMN_X; this.passwordInput.y = this.accountInner.y + margin; this.passwordInput.addEventListener(Event.CHANGE,this.checkPasswordConfirmation); this.passwordInput.maxChars = 35; this.passLabel = new Label(); addChild(this.passLabel); this.passLabel.text = localeService.getText(TextConst.SETTINGS_NEW_PASSWORD_LABEL_TEXT); this.passLabel.x = SECOND_COLUMN_X - margin - this.passLabel.textWidth; this.passLabel.y = this.passwordInput.y + Math.round((this.passwordInput.height - this.passLabel.textHeight) * 0.5) - 2; this.repPassLabel = new Label(); addChild(this.repPassLabel); this.repPassLabel.text = localeService.getText(TextConst.SETTINGS_REENTER_PASSWORD_LABEL_TEXT); this.repPassLabel.x = this.passwordInput.x + this.passwordInput.width + 7; this.repPassLabel.y = this.passLabel.y; this.passwordConfirmInput = new TankInput(); addChild(this.passwordConfirmInput); this.passwordConfirmInput.hidden = true; this.passwordConfirmInput.x = this.repPassLabel.x + this.repPassLabel.textWidth + margin; this.passwordConfirmInput.width = this.accountInner.x + this.accountInner.width - this.passwordConfirmInput.x - 10; this.passwordConfirmInput.y = this.passwordInput.y; this.passwordConfirmInput.addEventListener(Event.CHANGE,this.checkPasswordConfirmation); this.passwordConfirmInput.maxChars = 35; this.emailLabel = new Label(); addChild(this.emailLabel); this.emailLabel.text = localeService.getText(TextConst.SETTINGS_EMAIL_LABEL_TEXT); this.emailLabel.x = this.passLabel.x; this.emailLabel.y = this.passwordConfirmInput.y + this.passwordConfirmInput.height + windowMargin + 6; this.emailInput = new TankInput(); addChild(this.emailInput); this.emailInput.textField.text = mail; this.emailInput.x = this.emailLabel.x + this.emailLabel.textWidth + margin; this.emailInput.y = this.passwordConfirmInput.y + this.passwordConfirmInput.height + windowMargin; if(this.state == this.STATE_EMAIL_UNCONFIRMED) { this.confirmEmailButton = new DefaultButton(); addChild(this.confirmEmailButton); this.confirmEmailButton.width = 160; this.confirmEmailButton.label = localeService.getText(TextConst.SETTINGS_BUTTON_RESEND_CONFIRMATION_TEXT); this.confirmEmailButton.x = this.windowSize.x - windowMargin - margin - this.confirmEmailButton.width; this.confirmEmailButton.y = this.passwordConfirmInput.y + this.passwordConfirmInput.height + windowMargin; this.confirmEmailButton.addEventListener(MouseEvent.CLICK,this.onComfirmClick); this.emailInput.width = this.confirmEmailButton.x - windowMargin - this.emailInput.x; } else { this.emailInput.width = this.windowSize.x - windowMargin - margin - this.emailInput.x; } this.accountInner.height = margin * 2 + this.passwordInput.height + buttonSize.y + windowMargin - 1; } else { this.changePasswordButton = new DefaultButton(); this.changePasswordButton.width = 210; this.accountInner.height = buttonSize.y * 2; addChild(this.changePasswordButton); this.changePasswordButton.label = localeService.getText(TextConst.SETTINGS_BUTTON_CHANGE_PASSWORD_TEXT); this.changePasswordButton.x = (this.windowSize.x - this.changePasswordButton.width) / 2; this.changePasswordButton.y = this.accountInner.y + (this.accountInner.height - this.changePasswordButton.height) / 2; this.changePasswordButton.addEventListener(MouseEvent.CLICK,this.onChangePasswordClick); } if(antiAddictionEnabled) { this.antiAddictionInner = new TankWindowInner(0,0,TankWindowInner.TRANSPARENT); addChild(this.antiAddictionInner); this.antiAddictionInner.x = windowMargin; this.antiAddictionInner.width = this.windowSize.x - windowMargin * 2; this.antiAddictionLabel = new Label(); this.antiAddictionLabel.antiAliasType = AntiAliasType.ADVANCED; this.antiAddictionLabel.sharpness = -100; this.antiAddictionLabel.thickness = 100; this.antiAddictionLabel.text = "防沉迷验证登记"; this.antiAddictionLabel.textColor = 0; addChild(this.antiAddictionLabel); this.antiAddictionLabel.x = windowMargin; this.antiAddictionLabel.y = this.accountInner.y + this.accountInner.height + windowMargin; this.antiAddictionInner.y = this.antiAddictionLabel.y + this.antiAddictionLabel.textHeight + 5; this.realNameLabel = new Label(); addChild(this.realNameLabel); this.realNameLabel.text = "您的真实姓名:"; this.realNameLabel.x = SECOND_COLUMN_X - margin - this.realNameLabel.textWidth; this.realNameInput = new TankInput(); addChild(this.realNameInput); this.realNameInput.width = this.antiAddictionInner.width - margin * 4 - this.realNameLabel.width; this.realNameInput.x = SECOND_COLUMN_X; this.realNameInput.y = this.antiAddictionInner.y + margin; this.realNameLabel.y = this.realNameInput.y + Math.round((this.realNameInput.height - this.realNameLabel.textHeight) * 0.5) - 2; this.idNumberLabel = new Label(); addChild(this.idNumberLabel); this.idNumberLabel.text = "身份证号码:"; this.idNumberLabel.x = SECOND_COLUMN_X - this.idNumberLabel.width - 5; this.idNumberLabel.y = this.realNameInput.y + this.realNameInput.height + windowMargin + 6; this.idNumberInput = new TankInput(); addChild(this.idNumberInput); this.idNumberInput.textField.text = mail; this.idNumberInput.x = this.realNameInput.x; this.idNumberInput.y = this.realNameInput.y + this.realNameInput.height + windowMargin; this.idNumberInput.width = this.antiAddictionInner.width - margin * 4 - this.realNameLabel.width; this.antiAddictionInner.height = margin * 4 + 2 * this.realNameInput.height; this.idNumberInput.textField.text = idNumber != null && idNumber != "null" ? idNumber : ""; this.realNameInput.textField.text = realName != null && realName != "null" ? realName : ""; this.idNumberInput.addEventListener(FocusEvent.FOCUS_OUT,this.validateAddictionID); this.idNumberInput.addEventListener(FocusEvent.FOCUS_IN,this.restoreInput); } this.controlLabel = new Label(); this.controlLabel.antiAliasType = AntiAliasType.ADVANCED; this.controlLabel.sharpness = -100; this.controlLabel.thickness = 100; this.controlLabel.text = localeService.getText(TextConst.SETTINGS_CONTROL_HEADER_LABEL_TEXT); this.controlLabel.textColor = 0; addChild(this.controlLabel); this.controlLabel.x = windowMargin; this.controlLabel.y = !!antiAddictionEnabled ? Number(this.antiAddictionInner.y + this.antiAddictionInner.height + windowMargin) : Number(this.accountInner.y + this.accountInner.height + windowMargin); this.controlInner.y = this.controlLabel.y + this.controlLabel.textHeight + 5; this._inverseBackDriving = this.createCheckBox(localeService.getText(TextConst.SETTINGS_INVERSE_TURN_CONTROL_CHECKBOX_LABEL_TEXT)); addChild(this._inverseBackDriving); this._inverseBackDriving.x = FIRST_COLUMN_X; this._inverseBackDriving.y = this.controlInner.y + margin + 1; this.controlInner.height = margin * 2 + this._showFPS.height + 1; this.okButton = new DefaultButton(); addChild(this.okButton); this.okButton.label = localeService.getText(TextConst.SETTINGS_BUTTON_SAVE_TEXT); this.okButton.x = this.windowSize.x - buttonSize.x * 2 - 1 - margin; this.okButton.y = this.windowSize.y - buttonSize.y - margin; this.okButton.addEventListener(MouseEvent.CLICK,this.onOkClick); this.cancelButton = new DefaultButton(); addChild(this.cancelButton); this.cancelButton.label = localeService.getText(TextConst.SETTINGS_BUTTON_CANCEL_TEXT); this.cancelButton.x = this.windowSize.x - buttonSize.x - margin + 5; this.cancelButton.y = this.windowSize.y - buttonSize.y - margin; this.cancelButton.addEventListener(MouseEvent.CLICK,this.onCancelClick); this.switchButton = new DefaultButton(); this.switchButton.label = "Управление"; this.switchButton.x = this.windowSize.x - buttonSize.x - margin + 5; this.switchButton.y = this.soundInner.y + this.soundInner.height; this.switchButton.addEventListener(MouseEvent.CLICK,this.onCancelClick); this._sendNews = this.createCheckBox(localeService.getText(TextConst.SETTINGS_SEND_NEWS_CHECKBOX_LABEL_TEXT)); this._sendNews.x = FIRST_COLUMN_X; this._sendNews.y = this.cancelButton.y - Math.round((buttonSize.y - this._sendNews.height) * 0.5) + 4; } public function get useShadows() : Boolean { return this._shadows.checked; } public function set useShadows(v:Boolean) : void { this._shadows.checked = v; } public function get useDefferedLighting() : Boolean { return this._defferedLighting.checked; } public function set useDefferedLighting(v:Boolean) : * { this._defferedLighting.checked = v; } public function get useAnimatedTracks() : Boolean { return this._tracksAnimation.checked; } public function set useAnimatedTracks(v:Boolean) : * { this._tracksAnimation.checked = v; } public function get useAnimatedDamage() : Boolean { return this._damageAnimation.checked; } public function set useAnimatedDamage(v:Boolean) : * { this._damageAnimation.checked = v; } public function get useOldTextures() : Boolean { return this._useOldTextures.checked; } public function set useOldTextures(v:Boolean) : * { this._useOldTextures.checked = v; } public function get useDust() : Boolean { return this._dust.checked; } public function set useDust(v:Boolean) : void { this._dust.checked = v; } public function get useSoftParticle() : Boolean { return this._softParticle.checked; } public function get useFog() : Boolean { return this._useFog.checked; } public function get bgSound() : Boolean { return this._bgSound.checked; } public function get showShadowsTank() : Boolean { return this._showShadowsTank.checked; } public function set showShadowsTank(value:Boolean) : void { this._showShadowsTank.checked = value; } public function set bgSound(value:Boolean) : void { this._bgSound.checked = value; } public function get showFPS() : Boolean { return this._showFPS.checked; } public function set showFPS(value:Boolean) : void { this._showFPS.checked = value; } public function get adaptiveFPS() : Boolean { return this._adaptiveFPS.checked; } public function set adaptiveFPS(value:Boolean) : void { this._adaptiveFPS.checked = value; } public function get coloredFPS() : Boolean { return this._coloredFPS.checked; } public function set coloredFPS(value:Boolean) : void { this._coloredFPS.checked = value; } public function get sendNews() : Boolean { return this._sendNews.checked; } public function set sendNews(value:Boolean) : void { this._sendNews.checked = value; } public function get showSkyBox() : Boolean { return this._showSkyBox.checked; } public function set showSkyBox(value:Boolean) : void { this._showSkyBox.checked = value; } public function get showBattleChat() : Boolean { return this._showBattleChat.checked; } public function set showBattleChat(value:Boolean) : void { this._showBattleChat.checked = value; } public function get inverseBackDriving() : Boolean { return this._inverseBackDriving.checked; } public function set inverseBackDriving(value:Boolean) : void { this._inverseBackDriving.checked = value; } public function get enableMipMapping() : Boolean { return this.cbMipMapping.checked; } public function set enableMipMapping(value:Boolean) : void { this.cbMipMapping.checked = value; } private function restoreInput(event:FocusEvent) : void { var trgt:TankInput = event.currentTarget as TankInput; trgt.validValue = true; } private function validateAddictionID(event:FocusEvent) : void { var l:int = 0; if(this.idNumberInput != null) { l = this.idNumberInput.value.length; this.idNumberInput.validValue = l == 18 || this.trimString(this.idNumberInput.value).length == 0; } } private function onChangePasswordClick(event:MouseEvent) : void { this.changePasswordButton.enable = false; dispatchEvent(new SettingsWindowEvent(SettingsWindowEvent.CHANGE_PASSWORD)); } private function onChangeVolume(e:SliderEvent) : void { dispatchEvent(new SettingsWindowEvent(SettingsWindowEvent.CHANGE_VOLUME)); } public function set visibleDustButton(v:Boolean) : void { this._dust.visible = v; } private function onComfirmClick(e:MouseEvent) : void { this.confirmEmailButton.enable = false; } private function onCancelClick(e:MouseEvent) : void { dispatchEvent(new SettingsWindowEvent(SettingsWindowEvent.CANCEL_SETTINGS)); } private function onOkClick(e:MouseEvent) : void { dispatchEvent(new SettingsWindowEvent(SettingsWindowEvent.ACCEPT_SETTINGS)); } private function checkPasswordConfirmation(e:Event) : void { if(this.passwordInput.value.length > 0 && this.passwordConfirmInput.value.length > 0 && this.passwordConfirmInput.value != this.passwordInput.value) { this.okButton.enable = false; this.passwordConfirmInput.validValue = false; } else { this.okButton.enable = true; this.passwordConfirmInput.validValue = true; } } public function get password() : String { if(this.isPasswordChangeDisabled) { return ""; } var p:String = ""; if(this.passwordInput.textField.text != "" && this.passwordInput.textField.text != null) { if(this.passwordInput.textField.text == this.passwordConfirmInput.textField.text) { p = this.passwordInput.textField.text; } } return p; } public function get email() : String { if(this.isPasswordChangeDisabled) { return ""; } return this.emailInput.textField.text; } public function get emailNoticeValue() : Boolean { return this._sendNews.checked; } public function get volume() : Number { return this.volumeLevel.value / 100; } public function set volume(value:Number) : void { this.volumeLevel.value = value * 100; } public function get realName() : String { if(this.realNameInput != null && this.realNameInput.value != null && this.trimString(this.realNameInput.value).length > 0) { return this.realNameInput.value; } return ""; } public function get idNumber() : String { if(this.idNumberInput != null && this.idNumberInput.value != null && this.trimString(this.idNumberInput.value).length > 0) { return this.idNumberInput.value; } return ""; } private function trimString(str:String) : String { if(str.charAt(0) == " ") { str = this.trimString(str.substring(1)); } if(str.charAt(str.length - 1) == " ") { str = this.trimString(str.substring(0,str.length - 1)); } return str; } private function createCheckBox(labelText:String) : TankCheckBox { var cb:TankCheckBox = new TankCheckBox(); cb.type = TankCheckBox.CHECK_SIGN; cb.label = labelText; return cb; } } }
package projects.tanks.clients.fp10.Prelauncher { import flash.html.HTMLLoader; public class Alert { private static var htmlLoader:HTMLLoader; private static const html:String = "<!DOCTYPE html><html lang=\'en\'><head><meta charset=\'utf-8\'>" + "<title>Tanki Online</title><script></script></head><body></body></html>"; public function Alert() { super(); } public static function showMessage(message:String) : void { if(htmlLoader == null) { htmlLoader = new HTMLLoader(); htmlLoader.loadString(html); } htmlLoader.window.alert(message); } } }
package _codec.projects.tanks.client.garage.models.item.rarity { 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 projects.tanks.client.garage.models.item.rarity.ItemRarityCC; import projects.tanks.client.garage.models.item.rarity.Rarity; public class CodecItemRarityCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_rarity:ICodec; public function CodecItemRarityCC() { super(); } public function init(param1:IProtocol) : void { this.codec_rarity = param1.getCodec(new EnumCodecInfo(Rarity,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:ItemRarityCC = new ItemRarityCC(); local2.rarity = this.codec_rarity.decode(param1) as Rarity; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:ItemRarityCC = ItemRarityCC(param2); this.codec_rarity.encode(param1,local3.rarity); } } }
package alternativa.tanks.models.battle.gui.chat { [ModelInterface] public interface IBattleChat { function getChat() : BattleChat; } }
package alternativa.tanks.physics { import alternativa.math.Vector3; import alternativa.physics.Body; import alternativa.physics.collision.CollisionShape; import alternativa.physics.collision.primitives.CollisionBox; public class TankBody { public var id:int; public var body:Body; public var tankCollisionBox:CollisionBox; public var staticShapes:Vector.<CollisionShape> = new Vector.<CollisionShape>(); public var hasContactsWithStatic:Boolean; public var penetratedBodies:Vector.<Body> = new Vector.<Body>(); public var wasContactWithStatic:Boolean; public var additionForcesSum:Vector3 = new Vector3(); public var previousUpVelocity:Number = 0; private var soaringChecker:SoaringChecker; public function TankBody(param1:Body) { super(); this.body = param1; } public function onTankInited() : void { this.soaringChecker = new SoaringChecker(this); } public function hasContactsWithOtherBodies() : Boolean { return this.penetratedBodies.length > 0; } public function destroy() : void { this.soaringChecker = null; this.body = null; this.staticShapes = null; this.penetratedBodies = null; } public function updateSoaring() : void { this.soaringChecker.updateSoaring(); } public function isSoaring() : Boolean { return this.soaringChecker.isSoaring(); } public function isJumpBegin() : Boolean { return this.soaringChecker.isJumpBegin(); } public function isJumpEnd() : Boolean { return this.soaringChecker.isJumpEnd(); } public function isElasticStaticCollisionWhenSoaring() : Boolean { return this.soaringChecker.isElasticStaticCollisionWhenSoaring(); } } }
package _codec.projects.tanks.client.tanksservices.model.logging.gamescreen { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.EnumCodecInfo; import projects.tanks.client.tanksservices.model.logging.gamescreen.GameScreen; public class VectorCodecGameScreenLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecGameScreenLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new EnumCodecInfo(GameScreen,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.<GameScreen> = new Vector.<GameScreen>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = GameScreen(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:GameScreen = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<GameScreen> = Vector.<GameScreen>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package _codec.projects.tanks.client.panel.model.shop.price { 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.price.ShopItemCC; public class VectorCodecShopItemCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecShopItemCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ShopItemCC,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.<ShopItemCC> = new Vector.<ShopItemCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ShopItemCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ShopItemCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ShopItemCC> = Vector.<ShopItemCC>(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.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 DepthRendererLightFragmentShader extends FragmentShader { public function DepthRendererLightFragmentShader(param1:int) { super(); div(ft4,v0,v0.z); mul(ft4,ft4,fc[4]); add(ft4,ft4,fc[4]); tex(ft0,ft4,fs0.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); mul(ft0.zw,ft0,fc[6]); cos(ft1,ft0); sin(ft2,ft0); mul(ft1.x,ft1.w,ft1.z); mul(ft1.y,ft2.w,ft1.z); neg(ft1.z,ft2); dp3(ft2.z,ft0,fc[0]); mul(ft2.xy,ft4,fc[1]); sub(ft2.xy,ft2,fc[2]); mul(ft2.xy,ft2,ft2.z); mul(ft2.xy,ft2,fc[3]); if(param1 == 0) { sub(ft3,v1,ft2); dp3(ft3.w,ft3,ft3); sqt(ft3.w,ft3); div(ft3.xyz,ft3,ft3.w); sub(ft3.w,v1,ft3); mul(ft3.w,ft3,v2); sat(ft3.w,ft3); mul(ft3.w,ft3,ft3); dp3(ft2.w,ft3,ft1); max(ft2.w,ft2,fc[4]); mul(ft3.w,ft3,ft2); mul(ft0.xyz,v2,ft3.w); } else { if(param1 == 1) { sub(ft3,v1,ft2); dp3(ft3.w,ft3,ft3); sqt(ft3.w,ft3); div(ft3.xyz,ft3,ft3.w); sub(ft3.w,v3.x,ft3); mul(ft3.w,ft3,v3.y); sat(ft3.w,ft3); mul(ft3.w,ft3,ft3); dp3(ft4.w,ft3,ft1); max(ft4.w,ft4,fc[4]); mul(ft3.w,ft3,ft4); dp3(ft4.w,ft3,v2); neg(ft4.w,ft4); sub(ft4.w,ft4,v3.z); mul(ft4.w,ft4,v3); sat(ft4.w,ft4); mul(ft4.w,ft4,ft4); mul(ft3.w,ft3,ft4); } else if(param1 == 2) { sub(ft4,ft2,v1); dp3(ft4.w,ft4,v2); mul(ft4.xyz,v2,ft4.w); add(ft4.xyz,v1,ft4); abs(ft4.w,ft4); sub(ft4.w,v3.z,ft4); mul(ft4.w,ft4,v3); sat(ft4.w,ft4); mul(ft4.w,ft4,ft4); sub(ft3,ft4,ft2); dp3(ft3.w,ft3,ft3); sqt(ft3.w,ft3); div(ft3.xyz,ft3,ft3.w); sub(ft3.w,v3.x,ft3); mul(ft3.w,ft3,v3.y); sat(ft3.w,ft3); mul(ft3.w,ft3,ft3); mul(ft3.w,ft3,ft4); dp3(ft4.w,ft3,ft1); max(ft4.w,ft4,fc[4]); mul(ft3.w,ft3,ft4); } mul(ft0.xyz,v4,ft3.w); } mov(oc,ft0); } } }
package projects.tanks.client.panel.model.coin { public class CoinInfoCC { private var _coins:int; private var _enabled:Boolean; public function CoinInfoCC(param1:int = 0, param2:Boolean = false) { super(); this._coins = param1; this._enabled = param2; } public function get coins() : int { return this._coins; } public function set coins(param1:int) : void { this._coins = param1; } public function get enabled() : Boolean { return this._enabled; } public function set enabled(param1:Boolean) : void { this._enabled = param1; } public function toString() : String { var local1:String = "CoinInfoCC ["; local1 += "coins = " + this.coins + " "; local1 += "enabled = " + this.enabled + " "; return local1 + "]"; } } }
package projects.tanks.clients.fp10.Prelauncher.makeup { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_forumActiveIconMakeUp.png")] public class MakeUp_forumActiveIconMakeUp extends BitmapAsset { public function MakeUp_forumActiveIconMakeUp() { super(); } } }
package alternativa.tanks.model.item.skins { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class MountShotSkinAdapt implements MountShotSkin { private var object:IGameObject; private var impl:MountShotSkin; public function MountShotSkinAdapt(param1:IGameObject, param2:MountShotSkin) { super(); this.object = param1; this.impl = param2; } public function getMountedSkin() : IGameObject { var result:IGameObject = null; try { Model.object = this.object; result = this.impl.getMountedSkin(); } finally { Model.popObject(); } return result; } public function mount(param1:IGameObject) : void { var skin:IGameObject = param1; try { Model.object = this.object; this.impl.mount(skin); } finally { Model.popObject(); } } } }
package alternativa.protocol.type { public class Float { public function Float() { super(); } } }
package forms.ranks { import flash.display.Bitmap; import flash.display.BitmapData; public class DefaultRanksBitmaps { private static const bitmapSmallRank01:Class = DefaultRanksBitmaps_bitmapSmallRank01; private static const bitmapBigRank01:Class = DefaultRanksBitmaps_bitmapBigRank01; private static const bitmapSmallRank02:Class = DefaultRanksBitmaps_bitmapSmallRank02; private static const bitmapBigRank02:Class = DefaultRanksBitmaps_bitmapBigRank02; private static const bitmapSmallRank03:Class = DefaultRanksBitmaps_bitmapSmallRank03; private static const bitmapBigRank03:Class = DefaultRanksBitmaps_bitmapBigRank03; private static const bitmapSmallRank04:Class = DefaultRanksBitmaps_bitmapSmallRank04; private static const bitmapBigRank04:Class = DefaultRanksBitmaps_bitmapBigRank04; private static const bitmapSmallRank05:Class = DefaultRanksBitmaps_bitmapSmallRank05; private static const bitmapBigRank05:Class = DefaultRanksBitmaps_bitmapBigRank05; private static const bitmapSmallRank06:Class = DefaultRanksBitmaps_bitmapSmallRank06; private static const bitmapBigRank06:Class = DefaultRanksBitmaps_bitmapBigRank06; private static const bitmapSmallRank07:Class = DefaultRanksBitmaps_bitmapSmallRank07; private static const bitmapBigRank07:Class = DefaultRanksBitmaps_bitmapBigRank07; private static const bitmapSmallRank08:Class = DefaultRanksBitmaps_bitmapSmallRank08; private static const bitmapBigRank08:Class = DefaultRanksBitmaps_bitmapBigRank08; private static const bitmapSmallRank09:Class = DefaultRanksBitmaps_bitmapSmallRank09; private static const bitmapBigRank09:Class = DefaultRanksBitmaps_bitmapBigRank09; private static const bitmapSmallRank10:Class = DefaultRanksBitmaps_bitmapSmallRank10; private static const bitmapBigRank10:Class = DefaultRanksBitmaps_bitmapBigRank10; private static const bitmapSmallRank11:Class = DefaultRanksBitmaps_bitmapSmallRank11; private static const bitmapBigRank11:Class = DefaultRanksBitmaps_bitmapBigRank11; private static const bitmapSmallRank12:Class = DefaultRanksBitmaps_bitmapSmallRank12; private static const bitmapBigRank12:Class = DefaultRanksBitmaps_bitmapBigRank12; private static const bitmapSmallRank13:Class = DefaultRanksBitmaps_bitmapSmallRank13; private static const bitmapBigRank13:Class = DefaultRanksBitmaps_bitmapBigRank13; private static const bitmapSmallRank14:Class = DefaultRanksBitmaps_bitmapSmallRank14; private static const bitmapBigRank14:Class = DefaultRanksBitmaps_bitmapBigRank14; private static const bitmapSmallRank15:Class = DefaultRanksBitmaps_bitmapSmallRank15; private static const bitmapBigRank15:Class = DefaultRanksBitmaps_bitmapBigRank15; private static const bitmapSmallRank16:Class = DefaultRanksBitmaps_bitmapSmallRank16; private static const bitmapBigRank16:Class = DefaultRanksBitmaps_bitmapBigRank16; private static const bitmapSmallRank17:Class = DefaultRanksBitmaps_bitmapSmallRank17; private static const bitmapBigRank17:Class = DefaultRanksBitmaps_bitmapBigRank17; private static const bitmapSmallRank18:Class = DefaultRanksBitmaps_bitmapSmallRank18; private static const bitmapBigRank18:Class = DefaultRanksBitmaps_bitmapBigRank18; private static const bitmapSmallRank19:Class = DefaultRanksBitmaps_bitmapSmallRank19; private static const bitmapBigRank19:Class = DefaultRanksBitmaps_bitmapBigRank19; private static const bitmapSmallRank20:Class = DefaultRanksBitmaps_bitmapSmallRank20; private static const bitmapBigRank20:Class = DefaultRanksBitmaps_bitmapBigRank20; private static const bitmapSmallRank21:Class = DefaultRanksBitmaps_bitmapSmallRank21; private static const bitmapBigRank21:Class = DefaultRanksBitmaps_bitmapBigRank21; private static const bitmapSmallRank22:Class = DefaultRanksBitmaps_bitmapSmallRank22; private static const bitmapBigRank22:Class = DefaultRanksBitmaps_bitmapBigRank22; private static const bitmapSmallRank23:Class = DefaultRanksBitmaps_bitmapSmallRank23; private static const bitmapBigRank23:Class = DefaultRanksBitmaps_bitmapBigRank23; private static const bitmapSmallRank24:Class = DefaultRanksBitmaps_bitmapSmallRank24; private static const bitmapBigRank24:Class = DefaultRanksBitmaps_bitmapBigRank24; private static const bitmapSmallRank25:Class = DefaultRanksBitmaps_bitmapSmallRank25; private static const bitmapBigRank25:Class = DefaultRanksBitmaps_bitmapBigRank25; private static const bitmapSmallRank26:Class = DefaultRanksBitmaps_bitmapSmallRank26; private static const bitmapBigRank26:Class = DefaultRanksBitmaps_bitmapBigRank26; private static const bitmapSmallRank27:Class = DefaultRanksBitmaps_bitmapSmallRank27; private static const bitmapBigRank27:Class = DefaultRanksBitmaps_bitmapBigRank27; private static const bitmapSmallRank28:Class = DefaultRanksBitmaps_bitmapSmallRank28; private static const bitmapBigRank28:Class = DefaultRanksBitmaps_bitmapBigRank28; private static const bitmapSmallRank29:Class = DefaultRanksBitmaps_bitmapSmallRank29; private static const bitmapBigRank29:Class = DefaultRanksBitmaps_bitmapBigRank29; private static const bitmapSmallRank30:Class = DefaultRanksBitmaps_bitmapSmallRank30; private static const bitmapBigRank30:Class = DefaultRanksBitmaps_bitmapBigRank30; private static const bitmapSmallRank31:Class = DefaultRanksBitmaps_bitmapSmallRank31; private static const bitmapBigRank31:Class = DefaultRanksBitmaps_bitmapBigRank31; public static const smallRanks:Vector.<BitmapData> = new Vector.<BitmapData>(); public static const bigRanks:Vector.<BitmapData> = new Vector.<BitmapData>(); smallRanks.push(Bitmap(new bitmapSmallRank01()).bitmapData,Bitmap(new bitmapSmallRank02()).bitmapData,Bitmap(new bitmapSmallRank03()).bitmapData,Bitmap(new bitmapSmallRank04()).bitmapData,Bitmap(new bitmapSmallRank05()).bitmapData,Bitmap(new bitmapSmallRank06()).bitmapData,Bitmap(new bitmapSmallRank07()).bitmapData,Bitmap(new bitmapSmallRank08()).bitmapData,Bitmap(new bitmapSmallRank09()).bitmapData,Bitmap(new bitmapSmallRank10()).bitmapData,Bitmap(new bitmapSmallRank11()).bitmapData,Bitmap(new bitmapSmallRank12()).bitmapData,Bitmap(new bitmapSmallRank13()).bitmapData,Bitmap(new bitmapSmallRank14()).bitmapData,Bitmap(new bitmapSmallRank15()).bitmapData,Bitmap(new bitmapSmallRank16()).bitmapData,Bitmap(new bitmapSmallRank17()).bitmapData,Bitmap(new bitmapSmallRank18()).bitmapData,Bitmap(new bitmapSmallRank19()).bitmapData,Bitmap(new bitmapSmallRank20()).bitmapData,Bitmap(new bitmapSmallRank21()).bitmapData,Bitmap(new bitmapSmallRank22()).bitmapData,Bitmap(new bitmapSmallRank23()).bitmapData ,Bitmap(new bitmapSmallRank24()).bitmapData,Bitmap(new bitmapSmallRank25()).bitmapData,Bitmap(new bitmapSmallRank26()).bitmapData,Bitmap(new bitmapSmallRank27()).bitmapData,Bitmap(new bitmapSmallRank28()).bitmapData,Bitmap(new bitmapSmallRank29()).bitmapData,Bitmap(new bitmapSmallRank30()).bitmapData,Bitmap(new bitmapSmallRank31()).bitmapData); bigRanks.push(Bitmap(new bitmapBigRank01()).bitmapData,Bitmap(new bitmapBigRank02()).bitmapData,Bitmap(new bitmapBigRank03()).bitmapData,Bitmap(new bitmapBigRank04()).bitmapData,Bitmap(new bitmapBigRank05()).bitmapData,Bitmap(new bitmapBigRank06()).bitmapData,Bitmap(new bitmapBigRank07()).bitmapData,Bitmap(new bitmapBigRank08()).bitmapData,Bitmap(new bitmapBigRank09()).bitmapData,Bitmap(new bitmapBigRank10()).bitmapData,Bitmap(new bitmapBigRank11()).bitmapData,Bitmap(new bitmapBigRank12()).bitmapData,Bitmap(new bitmapBigRank13()).bitmapData,Bitmap(new bitmapBigRank14()).bitmapData,Bitmap(new bitmapBigRank15()).bitmapData,Bitmap(new bitmapBigRank16()).bitmapData,Bitmap(new bitmapBigRank17()).bitmapData,Bitmap(new bitmapBigRank18()).bitmapData,Bitmap(new bitmapBigRank19()).bitmapData,Bitmap(new bitmapBigRank20()).bitmapData,Bitmap(new bitmapBigRank21()).bitmapData,Bitmap(new bitmapBigRank22()).bitmapData,Bitmap(new bitmapBigRank23()).bitmapData,Bitmap(new bitmapBigRank24()).bitmapData,Bitmap(new bitmapBigRank25()) .bitmapData,Bitmap(new bitmapBigRank26()).bitmapData,Bitmap(new bitmapBigRank27()).bitmapData,Bitmap(new bitmapBigRank28()).bitmapData,Bitmap(new bitmapBigRank29()).bitmapData,Bitmap(new bitmapBigRank30()).bitmapData,Bitmap(new bitmapBigRank31()).bitmapData); public function DefaultRanksBitmaps() { super(); } } }
package projects.tanks.client.clans.space.createclan { public interface IClanCreateModelBase { function alreadyInClan() : void; function correctName() : void; function correctTag() : void; function nameIsIncorrect() : void; function notUniqueName() : void; function notUniqueTag() : void; function otherError() : void; function tagIsIncorrect() : void; } }
package alternativa.tanks.models.weapon.healing { import alternativa.engine3d.core.Object3D; import alternativa.math.Matrix3; import alternativa.math.Vector3; import alternativa.physics.Body; import alternativa.physics.collision.types.RayHit; import alternativa.tanks.battle.BattleRunnerProvider; import alternativa.tanks.battle.BattleUtils; import alternativa.tanks.battle.LogicUnit; import alternativa.tanks.battle.objects.tank.LocalWeapon; import alternativa.tanks.battle.objects.tank.Tank; import alternativa.tanks.battle.objects.tank.Weapon; import alternativa.tanks.battle.objects.tank.WeaponPlatform; import alternativa.tanks.models.weapon.AllGlobalGunParams; import alternativa.tanks.models.weapon.BasicGlobalGunParams; import alternativa.tanks.models.weapon.healing.targeting.IsisDirectionCalculator; import alternativa.tanks.models.weapon.healing.targeting.IsisTargetPriorityCalculator; import alternativa.tanks.models.weapon.shared.SimpleWeaponController; import alternativa.tanks.models.weapons.targeting.TargetingResult; import alternativa.tanks.models.weapons.targeting.TargetingSystem; import alternativa.tanks.models.weapons.targeting.priority.TargetingPriorityCalculator; import alternativa.tanks.models.weapons.targeting.processor.SingleTargetDirectionProcessor; import alternativa.tanks.utils.EncryptedInt; import alternativa.tanks.utils.EncryptedIntImpl; import flash.utils.getTimer; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.tankparts.weapon.healing.IsisCC; import projects.tanks.client.battlefield.models.tankparts.weapon.healing.IsisState; import projects.tanks.client.garage.models.item.properties.ItemProperty; public class LocalHealingGun extends BattleRunnerProvider implements Weapon, LocalWeapon, HealingGun, LogicUnit { private static const MINIMAL_UPDATE_HIT_TIME_MS:int = 250; private static const thousand:EncryptedInt = new EncryptedIntImpl(1000); private static const allGunParams:AllGlobalGunParams = new AllGlobalGunParams(); private static const basicGunParams:BasicGlobalGunParams = new BasicGlobalGunParams(); private static const localHitPoint:Vector3 = new Vector3(); private static const bonusDirection:Vector3 = new Vector3(); private static const rotationMatrix:Matrix3 = new Matrix3(); private var controller:SimpleWeaponController; private var weaponPlatform:WeaponPlatform; private var callback:HealingGunCallback; private var effects:HealingGunEffects; private var targetingSystem:TargetingSystem; private var isisCC:IsisCC; private var shooting:Boolean; private var triggerPulled:Boolean; private var enabled:Boolean; private var baseTime:int; private var state:IsisState; private var nextTickTime:EncryptedInt = new EncryptedIntImpl(); private var numTicksLeft:EncryptedInt = new EncryptedIntImpl(); private var currentTarget:Body; private var currentRayHit:RayHit; private var updateHitTime:int; private var isisTargetPriorityCalculator:IsisTargetPriorityCalculator; private var isisDirectionCalculator:IsisDirectionCalculator; private var singleTargetDirectionProcessor:SingleTargetDirectionProcessor; private var stunStatus:Number; private var stunned:Boolean; public function LocalHealingGun(param1:IGameObject, param2:IsisCC, param3:SimpleWeaponController, param4:HealingGunEffects, param5:HealingGunCallback) { super(); this.isisTargetPriorityCalculator = new IsisTargetPriorityCalculator(param2); this.isisDirectionCalculator = new IsisDirectionCalculator(param2.coneAngle); this.singleTargetDirectionProcessor = new SingleTargetDirectionProcessor(param1,param2.radius); this.targetingSystem = new TargetingSystem(this.isisDirectionCalculator,this.singleTargetDirectionProcessor,new TargetingPriorityCalculator(this.isisTargetPriorityCalculator)); this.targetingSystem.getProcessor().setShotFromMuzzle(); this.controller = param3; this.callback = param5; this.effects = param4; this.isisCC = param2; } private static function getEffectType(param1:Tank, param2:Tank) : IsisState { return param1.isSameTeam(param2.teamType) ? IsisState.HEALING : IsisState.DAMAGING; } public function init(param1:WeaponPlatform) : void { this.weaponPlatform = param1; this.effects.init(param1.getTurret3D(),param1.getLocalMuzzlePosition()); this.controller.init(); this.controller.setWeapon(this); } public function destroy() : void { this.targetingSystem = null; this.effects = null; this.callback = null; this.deactivate(); this.controller.destroy(); } public function activate() : void { getBattleRunner().addLogicUnit(this); } public function deactivate() : void { this.disable(false); getBattleRunner().removeLogicUnit(this); } public function enable() : void { if(!this.enabled) { this.enabled = true; this.triggerPulled = this.controller.isTriggerPulled(); } } public function disable(param1:Boolean) : void { if(this.enabled) { this.enabled = false; this.stop(getBattleRunner().getPhysicsTime(),param1); } } public function reset() : void { this.isisTargetPriorityCalculator.resetTarget(); this.currentTarget = null; this.shooting = false; this.triggerPulled = false; this.baseTime = 0; this.numTicksLeft.setInt(0); this.nextTickTime.setInt(0); this.state = IsisState.OFF; } public function getStatus() : Number { var local1:Number = NaN; if(this.stunned) { return this.stunStatus; } if(this.shooting) { local1 = this.getCurrentEnergyInShootingMode(getTimer(),this.state); } else { local1 = this.getCurrentEnergyInIdleMode(getTimer()); } return local1 / this.isisCC.capacity; } public function runLogic(param1:int, param2:int) : void { if(this.enabled) { if(this.shooting) { this.runLogicForShootingMode(param1); } else { this.runLogicForIdleMode(param1); } } } private function runLogicForShootingMode(param1:int) : void { var local2:Body = null; if(this.triggerPulled) { this.weaponPlatform.getAllGunParams(allGunParams); if(BattleUtils.isTurretAboveGround(this.weaponPlatform.getBody(),allGunParams)) { this.currentRayHit = this.target(); local2 = Boolean(this.currentRayHit) ? this.currentRayHit.shape.body : null; } else { this.currentRayHit = null; local2 = null; } if(local2 != this.currentTarget) { this.currentTarget = local2; this.changeTargetAndNotifyCallback(param1); } else if(this.currentTarget != null) { if(this.updateHitTime + MINIMAL_UPDATE_HIT_TIME_MS <= param1) { this.updateHit(param1); } this.setupEffectsForTarget(); } this.tryToTick(param1); this.tryToStop(param1); } else { this.stop(param1,true); } } private function tryToStop(param1:int) : void { if(this.numTicksLeft.getInt() == 0 && this.getCurrentEnergyInShootingMode(param1,this.state) <= 0) { this.stop(param1,true); } } private function tryToTick(param1:int) : void { if(this.numTicksLeft.getInt() > 0) { if(param1 >= this.nextTickTime.getInt()) { this.numTicksLeft.setInt(this.numTicksLeft.getInt() - 1); this.tick(param1); } } } private function tryToResumeShooting() : void { if(!this.triggerPulled && this.controller.isTriggerPulled()) { this.pullTrigger(); } } private function runLogicForIdleMode(param1:int) : void { if(this.triggerPulled) { this.start(param1); } } public function pullTrigger() : void { if(this.enabled) { this.triggerPulled = true; } } public function releaseTrigger() : void { this.triggerPulled = false; } public function onTargetLost(param1:Tank) : void { if(param1 != null) { if(this.currentTarget == param1.getBody()) { this.currentTarget = null; this.changeTarget(getBattleRunner().getPhysicsTime()); } } } private function changeTargetAndNotifyCallback(param1:int) : void { this.changeTarget(param1); this.updateHit(param1); } private function updateHit(param1:int) : void { this.updateHitTime = param1; this.callback.updateHit(param1,this.currentRayHit); } private function changeTarget(param1:int) : void { var local3:Tank = null; var local2:IsisState = this.state; if(this.currentTarget == null) { this.state = IsisState.IDLE; } else { local3 = this.weaponPlatform.getBody().tank; if(getEffectType(local3,this.currentTarget.tank) == IsisState.HEALING) { this.state = IsisState.HEALING; } else { this.state = IsisState.DAMAGING; } } this.baseTime = this.getBaseTimeInShootingMode(param1,this.getCurrentEnergyInShootingMode(param1,local2),this.state); if(this.currentTarget == null) { this.loseTarget(); } else { this.onNewTarget(param1); } } private function loseTarget() : void { this.effects.setLocalEffectsType(IsisState.IDLE); this.isisTargetPriorityCalculator.resetTarget(); this.numTicksLeft.setInt(0); } private function onNewTarget(param1:int) : void { this.calculateNumTicks(param1); this.setNextTickTime(param1); this.setupEffectsForTarget(); } private function setupEffectsForTarget() : void { var local1:Tank = this.currentTarget.tank; var local2:Tank = this.weaponPlatform.getBody().tank; localHitPoint.copy(this.currentRayHit.position); BattleUtils.globalToLocal(this.currentTarget,localHitPoint); this.effects.setLocalEffectsType(getEffectType(local2,local1),local1,localHitPoint); } private function setNextTickTime(param1:int) : void { this.nextTickTime.setInt(param1 + this.isisCC.checkPeriodMsec); } private function calculateNumTicks(param1:int) : void { var local4:* = undefined; var local5:* = undefined; var local2:Number = this.getCurrentEnergyInShootingMode(param1,this.state); var local3:int = this.getEnergyDrainRate(this.state); if(local3 > 0) { local4 = this.getTicks(this.isisCC.capacity,local3); local5 = this.getTicks(local2,local3); this.numTicksLeft.setInt(Math.min(local5,local4)); } else { this.numTicksLeft.setInt(int.MAX_VALUE); } } private function getTicks(param1:Number, param2:Number) : Number { if(param2 <= 0) { return int.MAX_VALUE; } return param1 * thousand.getInt() / param2 / this.isisCC.checkPeriodMsec; } private function getEnergyDrainRate(param1:IsisState) : int { switch(param1) { case IsisState.DAMAGING: return this.isisCC.dischargeDamageRate; case IsisState.HEALING: return this.isisCC.dischargeHealingRate; case IsisState.IDLE: return this.isisCC.dischargeIdleRate; default: return 0; } } private function tick(param1:int) : void { this.nextTickTime.setInt(param1 + this.isisCC.checkPeriodMsec); this.weaponPlatform.getBasicGunParams(basicGunParams); this.callback.onTick(param1,this.currentRayHit); } private function start(param1:int) : void { if(!this.shooting) { this.shooting = true; this.currentRayHit = this.target(); this.currentTarget = Boolean(this.currentRayHit) ? this.currentRayHit.shape.body : null; this.baseTime = this.getBaseTimeInShootingMode(param1,this.getCurrentEnergyInIdleMode(param1),this.state); this.changeTargetAndNotifyCallback(param1); } } private function stop(param1:int, param2:Boolean) : void { if(this.shooting) { this.isisTargetPriorityCalculator.resetTarget(); this.currentTarget = null; this.triggerPulled = false; this.shooting = false; this.baseTime = this.getBaseTimeInIdleMode(param1,this.getCurrentEnergyInShootingMode(param1,this.state)); this.numTicksLeft.setInt(0); this.effects.stopEffects(); if(param2) { this.callback.stop(param1); } } } private function getCurrentEnergyInIdleMode(param1:int) : Number { var local2:Number = this.isisCC.capacity; var local3:Number = this.isisCC.chargeRate * (param1 - this.baseTime) / thousand.getInt(); return local3 > local2 ? local2 : local3; } private function getCurrentEnergyInShootingMode(param1:int, param2:IsisState) : Number { var local4:Number = NaN; var local3:int = this.getEnergyDrainRate(param2); if(local3 > 0) { local4 = this.isisCC.capacity - local3 * (param1 - this.baseTime) / thousand.getInt(); return local4 < 0 ? 0 : Math.min(local4,this.isisCC.capacity); } return this.isisCC.capacity; } private function getBaseTime(param1:int, param2:int) : int { if(this.shooting) { return this.getBaseTimeInShootingMode(param1,param2,this.state); } return param1 - param2 / this.isisCC.chargeRate * 1000; } private function getBaseTimeInIdleMode(param1:int, param2:Number) : int { return param1 - param2 / this.isisCC.chargeRate * thousand.getInt(); } private function getBaseTimeInShootingMode(param1:int, param2:Number, param3:IsisState) : int { var local4:int = this.getEnergyDrainRate(param3); if(local4 > 0) { return param1 - (this.isisCC.capacity - param2) / local4 * thousand.getInt(); } return getTimer(); } private function target() : RayHit { var local2:RayHit = null; var local3:Tank = null; this.weaponPlatform.getAllGunParams(allGunParams); if(this.currentTarget != null) { this.initTurretRotationMatrix(); bonusDirection.transform3(rotationMatrix); this.isisDirectionCalculator.setBonusDirection(bonusDirection); } else { this.isisDirectionCalculator.resetBonusDirection(); } var local1:TargetingResult = this.targetingSystem.target(allGunParams); this.calculateLocalBonusDirection(local1); if(local1.hasTankHit()) { local2 = local1.getSingleHit(); local3 = local2.shape.body.tank; if(local3.health == 0) { return null; } this.isisTargetPriorityCalculator.setTarget(local3); return local1.getSingleHit(); } return null; } private function calculateLocalBonusDirection(param1:TargetingResult) : void { bonusDirection.copy(param1.getDirection()); this.initTurretRotationMatrix(); bonusDirection.transformTransposed3(rotationMatrix); } private function initTurretRotationMatrix() : void { var local1:Object3D = this.weaponPlatform.getTurret3D(); rotationMatrix.setRotationMatrix(local1.rotationX,local1.rotationY,local1.rotationZ); } public function getResistanceProperty() : ItemProperty { return ItemProperty.ISIS_RESISTANCE; } public function addEnergy(param1:int) : void { var local2:int = 0; var local4:int = 0; var local5:* = undefined; var local6:* = undefined; var local3:int = getTimer(); if(this.shooting) { local4 = this.getEnergyDrainRate(this.state); if(local4 > 0) { local2 = param1 / local4 * 1000; this.baseTime = Math.min(this.baseTime + local2,local3); if(this.currentRayHit != null) { local5 = this.getTicks(this.isisCC.capacity,local4); local6 = this.getTicks(param1,local4); this.numTicksLeft.setInt(Math.min(local6,local5)); } } else { this.baseTime = local3; this.numTicksLeft.setInt(this.currentTarget == null ? 0 : int.MAX_VALUE); } } else { local2 = param1 / this.isisCC.chargeRate * 1000; this.baseTime -= local2; } } public function reconfigure(param1:Number, param2:Number, param3:Number, param4:Number) : void { this.isisCC.dischargeDamageRate = param1; this.isisCC.dischargeHealingRate = param2; this.isisCC.dischargeIdleRate = param3; this.singleTargetDirectionProcessor.updateMaxDistance(param4); var local5:int = getTimer(); if(this.shooting) { this.baseTime = this.getBaseTimeInShootingMode(local5,this.getCurrentEnergyInShootingMode(local5,this.state),this.state); } else { this.baseTime = this.getBaseTimeInIdleMode(local5,this.getCurrentEnergyInIdleMode(local5)); } this.addEnergy(this.isisCC.capacity); this.tryToResumeShooting(); } public function setBuffedMode(param1:Boolean) : void { this.effects.setBuffedMode(param1); } public function updateRecoilForce(param1:Number) : void { } public function fullyRecharge() : void { } public function weaponReloadTimeChanged(param1:int, param2:int) : void { } public function stun() : void { this.stop(getBattleRunner().getPhysicsTime(),true); this.triggerPulled = false; this.stunStatus = this.getStatus(); this.stunned = true; } public function calm(param1:int) : void { this.triggerPulled = this.controller.isTriggerPulled(); this.baseTime = this.getBaseTime(getTimer(),this.stunStatus * this.isisCC.capacity); this.stunned = false; } } }
package alternativa.tanks.services.mipmapping { import alternativa.utils.TextureMaterialRegistry; public interface MipMappingService { function isMipMappingEnabled() : Boolean; function setMipMapping(param1:Boolean) : void; function toggleMipMapping() : void; function addMaterialRegistry(param1:TextureMaterialRegistry) : void; } }
package _codec.projects.tanks.client.clans.clan.permissions { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.EnumCodecInfo; import projects.tanks.client.clans.clan.permissions.ClanPermission; public class VectorCodecClanPermissionLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecClanPermissionLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new EnumCodecInfo(ClanPermission,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.<ClanPermission> = new Vector.<ClanPermission>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ClanPermission(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ClanPermission = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ClanPermission> = Vector.<ClanPermission>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package alternativa.tanks.model.quest.weekly { import alternativa.tanks.model.quest.common.MissionsWindowsService; import alternativa.tanks.model.quest.common.gui.window.events.QuestGetPrizeEvent; import alternativa.types.Long; import platform.client.fp10.core.model.ObjectLoadPostListener; import platform.client.fp10.core.model.ObjectUnloadPostListener; import projects.tanks.client.panel.model.quest.QuestTypeEnum; import projects.tanks.client.panel.model.quest.weekly.IWeeklyQuestShowingModelBase; import projects.tanks.client.panel.model.quest.weekly.WeeklyQuestInfo; import projects.tanks.client.panel.model.quest.weekly.WeeklyQuestShowingModelBase; [ModelInfo] public class WeeklyQuestShowingModel extends WeeklyQuestShowingModelBase implements IWeeklyQuestShowingModelBase, ObjectLoadPostListener, ObjectUnloadPostListener { [Inject] public static var missionsWindowsService:MissionsWindowsService; [Inject] public static var weeklyQuestsService:WeeklyQuestsService; public function WeeklyQuestShowingModel() { super(); } public function objectLoadedPost() : void { weeklyQuestsService.addEventListener(QuestGetPrizeEvent.GET_QUEST_PRIZE,getFunctionWrapper(this.onQuestGetPrize)); weeklyQuestsService.addEventListener(WeeklyQuestEvent.REQUEST_DATA,getFunctionWrapper(this.onDataRequest)); weeklyQuestsService.setTimeToNextQuest(getInitParam().timeToNextQuest); if(getInitParam().hasNewQuests && !missionsWindowsService.isWindowOpen()) { missionsWindowsService.openInTab(QuestTypeEnum.WEEKLY); } } private function onQuestGetPrize(param1:QuestGetPrizeEvent) : void { server.givePrize(param1.questId); } private function onDataRequest(param1:WeeklyQuestEvent) : void { server.openWindow(); } public function openWeeklyQuest(param1:Vector.<WeeklyQuestInfo>) : void { weeklyQuestsService.questInfoChanged(param1); missionsWindowsService.openInTab(QuestTypeEnum.WEEKLY); } public function prizeGiven(param1:Long) : void { weeklyQuestsService.takePrize(param1); } public function objectUnloadedPost() : void { weeklyQuestsService.removeEventListener(QuestGetPrizeEvent.GET_QUEST_PRIZE,getFunctionWrapper(this.onQuestGetPrize)); weeklyQuestsService.removeEventListener(WeeklyQuestEvent.REQUEST_DATA,getFunctionWrapper(this.onDataRequest)); } } }
package com.alternativaplatform.projects.tanks.client.warfare.models.sfx.shoot.plasma { public interface IPlasmaShootSFXModelBase { } }
package _codec.projects.tanks.client.entrance.model.entrance.entrance { 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.entrance.EntranceModelCC; public class VectorCodecEntranceModelCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecEntranceModelCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(EntranceModelCC,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.<EntranceModelCC> = new Vector.<EntranceModelCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = EntranceModelCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:EntranceModelCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<EntranceModelCC> = Vector.<EntranceModelCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package projects.tanks.clients.flash.commons.models.detach { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class DetachEvents implements Detach { private var object:IGameObject; private var impl:Vector.<Object>; public function DetachEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function detach() : void { var i:int = 0; var m:Detach = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Detach(this.impl[i]); m.detach(); i++; } } finally { Model.popObject(); } } } }
package controls.scroller.blue { import mx.core.BitmapAsset; [ExcludeClass] public class ScrollSkinBlue_trackBottom extends BitmapAsset { public function ScrollSkinBlue_trackBottom() { super(); } } }
package projects.tanks.client.panel.model.bonus.showing.info { import platform.client.fp10.core.resource.types.LocalizedImageResource; public class BonusInfoCC { private var _bottomText:String; private var _image:LocalizedImageResource; private var _topText:String; public function BonusInfoCC(param1:String = null, param2:LocalizedImageResource = null, param3:String = null) { super(); this._bottomText = param1; this._image = param2; this._topText = param3; } public function get bottomText() : String { return this._bottomText; } public function set bottomText(param1:String) : void { this._bottomText = param1; } public function get image() : LocalizedImageResource { return this._image; } public function set image(param1:LocalizedImageResource) : void { this._image = param1; } public function get topText() : String { return this._topText; } public function set topText(param1:String) : void { this._topText = param1; } public function toString() : String { var local1:String = "BonusInfoCC ["; local1 += "bottomText = " + this.bottomText + " "; local1 += "image = " + this.image + " "; local1 += "topText = " + this.topText + " "; return local1 + "]"; } } }