code
stringlengths
57
237k
package alternativa.tanks.models.battle.gui.inventory { import alternativa.osgi.OSGi; import alternativa.osgi.service.display.IDisplay; import alternativa.tanks.battle.BattleService; import alternativa.tanks.battle.events.BattleEventDispatcher; import alternativa.tanks.battle.events.BattleEventSupport; import alternativa.tanks.battle.events.BattleFinishEvent; import alternativa.tanks.battle.events.EffectActivatedEvent; import alternativa.tanks.battle.events.EffectStoppedEvent; import alternativa.tanks.battle.events.InventorySlotReadyToUseEvent; import alternativa.tanks.battle.events.LocalTankActivationEvent; import alternativa.tanks.battle.events.LocalTankKilledEvent; import alternativa.tanks.models.inventory.IInventoryModel; import alternativa.tanks.models.inventory.InventoryItemType; import alternativa.tanks.models.inventory.InventoryLock; import alternativa.tanks.models.tank.ITankModel; import alternativa.tanks.service.settings.keybinding.GameActionEnum; import alternativa.tanks.services.battlegui.BattleGUIService; import alternativa.tanks.services.battlegui.BattleGUIServiceEvent; import alternativa.tanks.services.battleinput.BattleInputLockEvent; import alternativa.tanks.services.battleinput.BattleInputService; import alternativa.tanks.services.battleinput.GameActionListener; import alternativa.tanks.services.tankregistry.TankUsersRegistry; import controls.InventoryIcon; import flash.display.DisplayObjectContainer; import flash.display.Sprite; import flash.events.Event; import flash.utils.Dictionary; import flash.utils.getTimer; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectLoadPostListener; import platform.client.fp10.core.model.ObjectUnloadListener; import platform.client.fp10.core.registry.ModelRegistry; import projects.tanks.client.battlefield.models.battle.gui.inventory.IInventoryModelBase; import projects.tanks.client.battlefield.models.battle.gui.inventory.InventoryModelBase; import projects.tanks.clients.fp10.libraries.tanksservices.service.battle.IBattleInfoService; [ModelInfo] public class InventoryModel extends InventoryModelBase implements IInventoryModelBase, ObjectLoadListener, ObjectLoadPostListener, ObjectUnloadListener, IInventoryPanel, IInventoryModel, GameActionListener { [Inject] public static var display:IDisplay; [Inject] public static var battleEventDispatcher:BattleEventDispatcher; [Inject] public static var battleInputService:BattleInputService; [Inject] public static var battleGuiService:BattleGUIService; [Inject] public static var battleInfoService:IBattleInfoService; [Inject] public static var tankUsersRegistry:TankUsersRegistry; [Inject] public static var battleService:BattleService; [Inject] public static var inventorySoundService:InventorySoundService; [Inject] public static var modelRegistry:ModelRegistry; public static const PANEL_OFFSET_Y:int = 50; public static const GAP_BETWEEN_ITEM:int = 10; private var container:DisplayObjectContainer; private var inventorySlots:Dictionary; private var slotIndexByGameAction:Dictionary = new Dictionary(); private var battleEventSupport:BattleEventSupport; private var iconWithGapSize:int; public function InventoryModel() { super(); this.battleEventSupport = new BattleEventSupport(battleEventDispatcher); this.battleEventSupport.addEventHandler(LocalTankActivationEvent,this.onLocalTankActivationEvent); this.battleEventSupport.addEventHandler(BattleFinishEvent,this.onBattleFinish); this.battleEventSupport.addEventHandler(LocalTankKilledEvent,this.onLocalTankKilled); this.battleEventSupport.addEventHandler(EffectActivatedEvent,this.onEffectActivatedEvent); this.battleEventSupport.addEventHandler(EffectStoppedEvent,this.onEffectStoppedEvent); this.battleEventSupport.addEventHandler(InventorySlotReadyToUseEvent,this.onInventorySlotReadyToUseEvent); } private function onEffectActivatedEvent(param1:EffectActivatedEvent) : void { var local2:ITankModel = null; var local3:InventoryPanelSlot = null; if(!this.isSpecialEffect(param1.effectId)) { local2 = ITankModel(tankUsersRegistry.getUser(param1.userId).adapt(ITankModel)); if(local2.isLocal()) { local3 = this.inventorySlots[param1.effectId]; local3.activeAfterDeath = param1.activeAfterDeath; } } } private function isSpecialEffect(param1:int) : Boolean { return param1 <= 0; } private function onEffectStoppedEvent(param1:EffectStoppedEvent) : void { var local2:InventoryPanelSlot = null; if(!this.isSpecialEffect(param1.effectId)) { if(ITankModel(tankUsersRegistry.getUser(param1.userId).adapt(ITankModel)).isLocal()) { local2 = this.inventorySlots[param1.effectId]; if(local2.activeAfterDeath) { local2.activeAfterDeath = false; } } } } private function onBattleFinish(param1:BattleFinishEvent) : void { this.lockItems(InventoryLock.PLAYER_INACTIVE,true); this.lockItem(InventoryItemType.MINE,InventoryLock.FORCED,false); } private function onLocalTankKilled(param1:Object) : void { this.lockItemsAfterDeath(); } public function lockItemsAfterDeath() : void { var local1:InventoryPanelSlot = null; for each(local1 in this.inventorySlots) { if(!local1.activeAfterDeath) { local1.setLockMask(InventoryLock.PLAYER_INACTIVE,true); } } } [Obfuscation(rename="false")] public function objectLoaded() : void { this.container = new Sprite(); this.container.visible = false; battleGuiService.resetPositionXInventory(); battleGuiService.getGuiContainer().addChild(this.container); this.battleEventSupport.activateHandlers(); this.bindKeys(); } public function objectLoadedPost() : void { this.initSlots(); OSGi.getInstance().registerService(IInventoryPanel,this); } private function initSlots() : void { if(this.isDisableInventoryInBattle()) { return; } this.iconWithGapSize = GAP_BETWEEN_ITEM + new InventoryIcon(InventoryIcon.EMPTY).width; this.inventorySlots = new Dictionary(); if(!battleInfoService.withoutSupplies || !battleInfoService.withoutBonuses) { this.createSlot(InventoryItemType.FIRST_AID); this.createSlot(InventoryItemType.ARMOR); this.createSlot(InventoryItemType.DAMAGE); this.createSlot(InventoryItemType.NITRO); this.createSlot(InventoryItemType.MINE); this.createSlot(InventoryItemType.GOLD); this.inventorySlots[InventoryItemType.GOLD].getCanvas().visible = false; } this.createSlot(InventoryItemType.BATTERY); this.onResize(); this.container.visible = true; battleInputService.addEventListener(BattleInputLockEvent.INPUT_LOCKED,this.onInputLocked); battleInputService.addEventListener(BattleInputLockEvent.INPUT_UNLOCKED,this.onInputUnlocked); display.stage.addEventListener(Event.RESIZE,this.onResize,false,-1); battleGuiService.addEventListener(BattleGUIServiceEvent.ON_CHANGE_POSITION_DEFAULT_LAYOUT,this.onChangePositionDefaultLayout); display.stage.addEventListener(Event.ENTER_FRAME,this.onEnterFrame); } private function isDisableInventoryInBattle() : Boolean { return Boolean(battleInfoService.withoutSupplies) && Boolean(battleInfoService.withoutBonuses) && Boolean(battleInfoService.withoutDrones) || Boolean(battleInfoService.isSpectatorMode()); } private function createSlot(param1:int) : void { var local2:* = new InventoryPanelSlot(param1); this.inventorySlots[param1] = local2; this.container.addChild(local2.getCanvas()); } private function onChangePositionDefaultLayout(param1:BattleGUIServiceEvent) : void { this.onResize(); } [Obfuscation(rename="false")] public function objectUnloaded() : void { var local1:* = undefined; OSGi.getInstance().unregisterService(IInventoryPanel); if(this.inventorySlots != null) { battleGuiService.removeEventListener(BattleGUIServiceEvent.ON_CHANGE_POSITION_DEFAULT_LAYOUT,this.onChangePositionDefaultLayout); display.stage.removeEventListener(Event.ENTER_FRAME,this.onEnterFrame); display.stage.removeEventListener(Event.RESIZE,this.onResize); battleInputService.removeEventListener(BattleInputLockEvent.INPUT_LOCKED,this.onInputLocked); battleInputService.removeEventListener(BattleInputLockEvent.INPUT_UNLOCKED,this.onInputUnlocked); for(local1 in this.inventorySlots) { this.clearSlot(int(local1)); } battleInputService.removeGameActionListener(this); this.inventorySlots = null; } battleGuiService.getGuiContainer().removeChild(this.container); this.container = null; this.battleEventSupport.deactivateHandlers(); } public function assignItemToSlot(param1:InventoryItem, param2:int) : void { if(this.getActiveSlotsCount() == 0) { battleInputService.addGameActionListener(this); } var local3:InventoryPanelSlot = this.inventorySlots[param2]; local3.inventoryItem = param1; this.updateSlotCounter(local3); } public function itemUpdateCount(param1:InventoryItem) : void { var local2:InventoryPanelSlot = null; for each(local2 in this.inventorySlots) { if(local2.inventoryItem == param1) { this.updateSlotCounter(local2); } } } private function updateSlotCounter(param1:InventoryPanelSlot) : void { var local2:Boolean = false; param1.updateCounter(); if(param1.getSlotNumber() == InventoryItemType.GOLD) { local2 = param1.getInventoryCount() > 0; if(param1.getCanvas().visible == local2) { return; } param1.getCanvas().visible = local2; this.onResize(); } } public function lockItem(param1:int, param2:int, param3:Boolean) : void { var local4:InventoryPanelSlot = null; var local5:InventoryItem = null; for each(local4 in this.inventorySlots) { local5 = local4.inventoryItem; if(local5 != null && local5.getId() == param1) { local4.setLockMask(param2,param3); } } } public function lockItems(param1:int, param2:Boolean) : void { var local3:InventoryPanelSlot = null; for each(local3 in this.inventorySlots) { local3.setLockMask(param1,param2); } } public function lockItemsByMask(param1:Vector.<int>, param2:int, param3:Boolean) : void { var local4:InventoryPanelSlot = null; var local5:InventoryItem = null; for each(local4 in this.inventorySlots) { local5 = local4.inventoryItem; if(local5 != null && param1.indexOf(local5.getId()) != -1) { local4.setLockMask(param2,param3); } } } private function onResize(param1:Event = null) : void { var local2:int = this.getPanelWidth(); var local3:int = display.stage.stageWidth - local2 >> 1; var local4:int = local3 + local2 + GAP_BETWEEN_ITEM; var local5:int = int(battleGuiService.getPositionXDefaultLayout()); if(local4 > local5) { local3 = local5 - local2 - GAP_BETWEEN_ITEM; } this.container.x = local3; this.container.y = display.stage.stageHeight - PANEL_OFFSET_Y; battleGuiService.setPositionXInventory(local3); } private function getPanelWidth() : int { var local2:InventoryPanelSlot = null; var local1:int = 0; for each(local2 in this.inventorySlots) { local2.getCanvas().x = local1 * this.iconWithGapSize; if(local2.getCanvas().visible) { local1++; } } return local1 * this.iconWithGapSize - GAP_BETWEEN_ITEM; } public function onGameAction(param1:GameActionEnum, param2:Boolean) : void { if(!param2) { return; } var local3:* = this.slotIndexByGameAction[param1]; if(local3 == null) { return; } var local4:InventoryPanelSlot = this.inventorySlots[int(local3)]; if(local4.isLocked()) { if(local4.getSlotNumber() == InventoryItemType.FIRST_AID) { inventorySoundService.playNotReadySound(); } } else if(local4.inventoryItem != null && local4.inventoryItem.count > 0 && local4.cooldownItem.canActivate()) { local4.inventoryItem.requestActivation(); } else { inventorySoundService.playNotReadySound(); } } private function getActiveSlotsCount() : int { var local2:InventoryPanelSlot = null; var local1:int = 0; for each(local2 in this.inventorySlots) { if(local2.inventoryItem != null) { local1++; } } return local1; } private function clearSlot(param1:int) : void { var local2:InventoryPanelSlot = this.inventorySlots[param1]; local2.destroy(); } private function onEnterFrame(param1:Event) : void { var local3:InventoryPanelSlot = null; var local2:int = getTimer(); for each(local3 in this.inventorySlots) { local3.update(local2); } } private function bindKeys() : void { this.slotIndexByGameAction[GameActionEnum.USE_FIRS_AID] = InventoryItemType.FIRST_AID; this.slotIndexByGameAction[GameActionEnum.USE_DOUBLE_ARMOR] = InventoryItemType.ARMOR; this.slotIndexByGameAction[GameActionEnum.USE_DOUBLE_DAMAGE] = InventoryItemType.DAMAGE; this.slotIndexByGameAction[GameActionEnum.USE_NITRO] = InventoryItemType.NITRO; this.slotIndexByGameAction[GameActionEnum.USE_MINE] = InventoryItemType.MINE; this.slotIndexByGameAction[GameActionEnum.DROP_GOLD_BOX] = InventoryItemType.GOLD; } private function onInputLocked(param1:BattleInputLockEvent) : void { this.lockItems(InventoryLock.GUI,true); } private function onInputUnlocked(param1:BattleInputLockEvent) : void { this.lockItems(InventoryLock.GUI,false); } private function onLocalTankActivationEvent(param1:Object) : void { var local2:InventoryPanelSlot = null; for each(local2 in this.inventorySlots) { if(!local2.activeAfterDeath) { local2.setLockMask(InventoryLock.PLAYER_INACTIVE,false); } } } public function changeEffectTime(param1:int, param2:int, param3:Boolean, param4:Boolean) : void { var local5:InventoryPanelSlot = this.inventorySlots[param1]; if(!this.isSpecialEffect(param1)) { if(param4) { local5.startInfiniteEffect(param3); } else { local5.changeEffectTime(param2,param3); } } } public function activateCooldown(param1:int, param2:int) : void { var local3:InventoryPanelSlot = null; if(!this.isSpecialEffect(param1)) { local3 = this.inventorySlots[param1]; local3.activateCooldown(param2); } } public function activateDependedCooldown(param1:int, param2:int) : void { var local3:InventoryPanelSlot = null; if(!this.isSpecialEffect(param1)) { local3 = this.inventorySlots[param1]; local3.activateDependedCooldown(param2); } } public function showInventory() : void { if(this.container != null && this.container.numChildren > 0) { this.onResize(); this.container.visible = true; } } public function stopEffect(param1:int) : void { var local2:InventoryPanelSlot = null; if(!this.isSpecialEffect(param1)) { local2 = this.inventorySlots[param1]; local2.stopEffect(); } } private function onInventorySlotReadyToUseEvent(param1:InventorySlotReadyToUseEvent) : void { var local2:InventoryPanelSlot = this.inventorySlots[param1.slotIndex]; local2.startReadyIndicator(); } public function setCooldownDuration(param1:int, param2:int) : void { InventoryPanelSlot(this.inventorySlots[param1]).setCooldownDuration(param2); } public function setVisible(param1:int, param2:Boolean, param3:Boolean) : void { if(this.inventorySlots != null) { InventoryPanelSlot(this.inventorySlots[param1]).getCanvas().visible = param2; this.onResize(); } } public function setEffectInfinite(param1:int, param2:Boolean) : void { var local3:InventoryPanelSlot = this.inventorySlots[param1]; if(local3 != null) { this.changeEffectTime(param1,getTimer(),true,param2); } } public function ready(param1:int) : void { InventoryPanelSlot(this.inventorySlots[param1]).ready(); } } }
package projects.tanks.clients.fp10.Prelauncher.makeup { import flash.display.Bitmap; import flash.text.Font; import projects.tanks.clients.fp10.Prelauncher.Locale; import projects.tanks.clients.fp10.Prelauncher.controls.toppanel.TopPanelButton; import projects.tanks.clients.fp10.Prelauncher.locales.Locales; public class MakeUp { private static var myriadProFont:Class = MakeUp_myriadProFont; private static var myriadProBoldFont:Class = MakeUp_myriadProBoldFont; private static var gameIconMakeUp:Class = MakeUp_gameIconMakeUp; private static var gameActiveIconMakeUp:Class = MakeUp_gameActiveIconMakeUp; private static var materialsIconMakeUp:Class = MakeUp_materialsIconMakeUp; private static var materialsActiveIconMakeUp:Class = MakeUp_materialsActiveIconMakeUp; private static var tournamentsIconMakeUp:Class = MakeUp_tournamentsIconMakeUp; private static var tournamentsActiveIconMakeUp:Class = MakeUp_tournamentsActiveIconMakeUp; private static var forumIconMakeUp:Class = MakeUp_forumIconMakeUp; private static var forumActiveIconMakeUp:Class = MakeUp_forumActiveIconMakeUp; private static var wikiIconMakeUp:Class = MakeUp_wikiIconMakeUp; private static var wikiActiveIconMakeUp:Class = MakeUp_wikiActiveIconMakeUp; private static var ratingsIconMakeUp:Class = MakeUp_ratingsIconMakeUp; private static var ratingsActiveIconMakeUp:Class = MakeUp_ratingsActiveIconMakeUp; private static var helpIconMakeUp:Class = MakeUp_helpIconMakeUp; private static var helpActiveIconMakeUp:Class = MakeUp_helpActiveIconMakeUp; private static var logoMakeUp:Class = MakeUp_logoMakeUp; private static var chineseLogoMakeUp:Class = MakeUp_chineseLogoMakeUp; private static var buttonGreen:Class = MakeUp_buttonGreen; private static var buttonGreenOver:Class = MakeUp_buttonGreenOver; private static var buttonRed:Class = MakeUp_buttonRed; private static var buttonRedOver:Class = MakeUp_buttonRedOver; private static var dropGreen:Class = MakeUp_dropGreen; private static var dropWhite:Class = MakeUp_dropWhite; private static var vkIcon:Class = MakeUp_vkIcon; private static var facebookIcon:Class = MakeUp_facebookIcon; private static var twitterIcon:Class = MakeUp_twitterIcon; private static var twitchIcon:Class = MakeUp_twitchIcon; private static var youtubeIcon:Class = MakeUp_youtubeIcon; private static var instIcon:Class = MakeUp_instIcon; private static var okIcon:Class = MakeUp_okIcon; private static var gplusIcon:Class = MakeUp_gplusIcon; public function MakeUp() { super(); } public static function getStartButtonMakeUp() : Bitmap { return new buttonGreen(); } public static function getActiveStartButtonMakeUp() : Bitmap { return new buttonGreenOver(); } public static function getExitButtonMakeUp() : Bitmap { return new buttonRed(); } public static function getActiveExitButtonMakeUp() : Bitmap { return new buttonRedOver(); } public static function getDropGreenMakeUp() : Bitmap { return new dropGreen(); } public static function getDropMakeUp() : Bitmap { return new dropWhite(); } public static function getLogoMakeUp(locale:Locale) : Bitmap { if(locale.name == Locales.CN) { return new chineseLogoMakeUp(); } return new logoMakeUp(); } public static function getIconMakeUp(type:String) : Bitmap { switch(type) { case TopPanelButton.GAME: return new gameIconMakeUp(); case TopPanelButton.MATERIALS: return new materialsIconMakeUp(); case TopPanelButton.TOURNAMENTS: return new tournamentsIconMakeUp(); case TopPanelButton.FORUM: return new forumIconMakeUp(); case TopPanelButton.WIKI: return new wikiIconMakeUp(); case TopPanelButton.RATINGS: return new ratingsIconMakeUp(); case TopPanelButton.HELP: return new helpIconMakeUp(); default: return null; } } public static function getActiveIconMakeUp(type:String) : Bitmap { switch(type) { case TopPanelButton.GAME: return new gameActiveIconMakeUp(); case TopPanelButton.MATERIALS: return new materialsActiveIconMakeUp(); case TopPanelButton.TOURNAMENTS: return new tournamentsActiveIconMakeUp(); case TopPanelButton.FORUM: return new forumActiveIconMakeUp(); case TopPanelButton.WIKI: return new wikiActiveIconMakeUp(); case TopPanelButton.RATINGS: return new ratingsActiveIconMakeUp(); case TopPanelButton.HELP: return new helpActiveIconMakeUp(); default: return null; } } public static function getVKIcon() : Bitmap { return new vkIcon(); } public static function getFacebookIcon() : Bitmap { return new facebookIcon(); } public static function getTwitterIcon() : Bitmap { return new twitterIcon(); } public static function getYoutubeIcon() : Bitmap { return new youtubeIcon(); } public static function getInstagramIcon() : Bitmap { return new instIcon(); } public static function getOKIcon() : Bitmap { return new okIcon(); } public static function getGooglePlusIcon() : Bitmap { return new gplusIcon(); } public static function getTwitchIcon() : Bitmap { return new twitchIcon(); } private static function hasEmbeddedFont(fontName:String) : Boolean { var font:Font = null; var fonts:Array = Font.enumerateFonts(); for each(font in fonts) { if(font.fontName == fontName) { return true; } } return false; } public static function getFont(locale:Locale) : String { if(locale.name == Locales.CN) { return "Arial"; } if(hasEmbeddedFont("Myriad Pro")) { return "Myriad Pro"; } return "Embedded Myriad Pro Bold"; } } }
package com.lorentz.SVG.data { import flash.geom.Point; public class MarkerPlace { public var position:Point; public var angle:Number; public var type:String; public var strokeWidth:Number; public function MarkerPlace(position:Point, angle:Number, type:String, strokeWidth:Number = 0) { this.position = position; this.angle = angle; this.type = type; this.strokeWidth = strokeWidth; } public function averageAngle(otherAngle:Number):void { angle = (angle + otherAngle) * 0.5; } } }
package alternativa.engine3d.core { import alternativa.engine3d.alternativa3d; import flash.events.Event; import flash.geom.Vector3D; use namespace alternativa3d; public class MouseEvent3D extends Event { public static const CLICK:String = "click3D"; public static const DOUBLE_CLICK:String = "doubleClick3D"; public static const MOUSE_DOWN:String = "mouseDown3D"; public static const MOUSE_UP:String = "mouseUp3D"; public static const MOUSE_OVER:String = "mouseOver3D"; public static const MOUSE_OUT:String = "mouseOut3D"; public static const ROLL_OVER:String = "rollOver3D"; public static const ROLL_OUT:String = "rollOut3D"; public static const MOUSE_MOVE:String = "mouseMove3D"; public static const MOUSE_WHEEL:String = "mouseWheel3D"; public var ctrlKey:Boolean; public var altKey:Boolean; public var shiftKey:Boolean; public var buttonDown:Boolean; public var delta:int; public var relatedObject:Object3D; public var localOrigin:Vector3D; public var localDirection:Vector3D; alternativa3d var _target:Object3D; alternativa3d var _currentTarget:Object3D; alternativa3d var _bubbles:Boolean; alternativa3d var _eventPhase:uint = 3; alternativa3d var stop:Boolean = false; alternativa3d var stopImmediate:Boolean = false; public function MouseEvent3D(param1:String, param2:Boolean = true, param3:Object3D = null, param4:Boolean = false, param5:Boolean = false, param6:Boolean = false, param7:Boolean = false, param8:int = 0) { this.localOrigin = new Vector3D(); this.localDirection = new Vector3D(); super(param1,param2); this.relatedObject = param3; this.altKey = param4; this.ctrlKey = param5; this.shiftKey = param6; this.buttonDown = param7; this.delta = param8; } alternativa3d function calculateLocalRay(param1:Number, param2:Number, param3:Object3D, param4:Camera3D) : void { var _loc7_:Number = NaN; var _loc8_:Number = NaN; var _loc9_:Number = NaN; var _loc10_:Number = NaN; var _loc11_:Number = NaN; param4.calculateRay(this.localOrigin,this.localDirection,param1,param2); param3.composeMatrix(); var _loc5_:Object3D = param3; while(_loc5_._parent != null) { _loc5_ = _loc5_._parent; _loc5_.composeMatrix(); param3.appendMatrix(_loc5_); } param3.invertMatrix(); var _loc6_:Number = this.localOrigin.x; _loc7_ = this.localOrigin.y; _loc8_ = this.localOrigin.z; _loc9_ = this.localDirection.x; _loc10_ = this.localDirection.y; _loc11_ = this.localDirection.z; this.localOrigin.x = param3.ma * _loc6_ + param3.mb * _loc7_ + param3.mc * _loc8_ + param3.md; this.localOrigin.y = param3.me * _loc6_ + param3.mf * _loc7_ + param3.mg * _loc8_ + param3.mh; this.localOrigin.z = param3.mi * _loc6_ + param3.mj * _loc7_ + param3.mk * _loc8_ + param3.ml; this.localDirection.x = param3.ma * _loc9_ + param3.mb * _loc10_ + param3.mc * _loc11_; this.localDirection.y = param3.me * _loc9_ + param3.mf * _loc10_ + param3.mg * _loc11_; this.localDirection.z = param3.mi * _loc9_ + param3.mj * _loc10_ + param3.mk * _loc11_; } override public function get bubbles() : Boolean { return this._bubbles; } override public function get eventPhase() : uint { return this._eventPhase; } override public function get target() : Object { return this._target; } override public function get currentTarget() : Object { return this._currentTarget; } override public function stopPropagation() : void { this.stop = true; } override public function stopImmediatePropagation() : void { this.stopImmediate = true; } override public function clone() : Event { return new MouseEvent3D(type,this._bubbles,this.relatedObject,this.altKey,this.ctrlKey,this.shiftKey,this.buttonDown,this.delta); } override public function toString() : String { return formatToString("MouseEvent3D","type","bubbles","eventPhase","relatedObject","altKey","ctrlKey","shiftKey","buttonDown","delta"); } } }
package assets.cellrenderer.battlelist { import flash.display.MovieClip; [Embed(source="/_assets/assets.swf", symbol="symbol565")] public dynamic class SportBattleItemIcon extends MovieClip { public function SportBattleItemIcon() { super(); } } }
package alternativa.tanks.models.battle.gui.inventory { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_firstAidGrayIconClass.png")] public class HudInventoryIcon_firstAidGrayIconClass extends BitmapAsset { public function HudInventoryIcon_firstAidGrayIconClass() { super(); } } }
package projects.tanks.client.commons.models.clienthalt { 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 ServerHaltModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ServerHaltModelServer; private var client:IServerHaltModelBase = IServerHaltModelBase(this); private var modelId:Long = Long.getLong(1670604947,523994521); private var _haltServerId:Long = Long.getLong(617627221,751287008); private var _haltServer_timeLeftInSecCodec:ICodec; public function ServerHaltModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ServerHaltModelServer(IModel(this)); this._haltServer_timeLeftInSecCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._haltServerId: this.client.haltServer(int(this._haltServer_timeLeftInSecCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.battleselect.model.battle.param { 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 BattleParamInfoModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:BattleParamInfoModelServer; private var client:IBattleParamInfoModelBase = IBattleParamInfoModelBase(this); private var modelId:Long = Long.getLong(1462665762,397983152); public function BattleParamInfoModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new BattleParamInfoModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(BattleParamInfoCC,false))); } protected function getInitParam() : BattleParamInfoCC { return BattleParamInfoCC(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 forms.payment { import alternativa.init.Main; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.locale.constants.TextConst; import assets.Diamond; import controls.statassets.StatHeaderButton; import flash.display.Sprite; public class PaymentListHeader extends Sprite { private static var _withSMSText:Boolean = false; private const headers:Array = ["Number","Cost","Crystals"]; private var number:StatHeaderButton; private var smsText:StatHeaderButton; private var cost:StatHeaderButton; private var crystals:StatHeaderButton; private var cr:Diamond; protected var _width:int = 800; public function PaymentListHeader() { this.number = new StatHeaderButton(); this.smsText = new StatHeaderButton(false); this.cost = new StatHeaderButton(); this.crystals = new StatHeaderButton(); this.cr = new Diamond(); super(); var localeService:ILocaleService = Main.osgi.getService(ILocaleService) as ILocaleService; this.number.height = this.cost.height = this.smsText.height = this.crystals.height = 18; this.number.label = localeService.getText(TextConst.PAYMENT_SMSNUMBERS_NUMBER_HEADER_LABEL_TEXT); this.smsText.label = localeService.getText(TextConst.PAYMENT_SMSNUMBERS_SMSTEXT_HEADER_LABEL_TEXT); this.cost.label = localeService.getText(TextConst.PAYMENT_SMSNUMBERS_COST_HEADER_LABEL_TEXT); addChild(this.number); addChild(this.smsText); this.smsText.visible = _withSMSText; addChild(this.cost); addChild(this.crystals); addChild(this.cr); this.number.width = 70; this.cost.x = 72; this.cr.y = 5; this.draw(); } public function set withSMSText(value:Boolean) : void { _withSMSText = value; this.draw(); } override public function set width(w:Number) : void { this._width = Math.floor(w); this.draw(); } private function draw() : void { var subwidth:int = !!_withSMSText ? int(int(60)) : int(int((this._width - 70) / 2)); this.smsText.visible = _withSMSText; this.cost.x = 72; if(_withSMSText) { this.smsText.x = 72; this.smsText.width = this._width - 170; this.cost.x = 72 + this.smsText.width + 2; } this.cost.width = subwidth; this.crystals.x = this.cost.x + this.cost.width + 2; this.crystals.width = int(this._width - this.crystals.x - 3); this.cr.x = this.crystals.x + this.crystals.width - this.cr.width - 3; } } }
package alternativa.tanks.gui.payment.forms.leogaming { public class LeogamingPhonePaymentState { public static const PHONE:* = new LeogamingPhonePaymentState(0); public static const CONFIRM:* = new LeogamingPhonePaymentState(1); public static const WAIT:* = new LeogamingPhonePaymentState(2); private var state:int = 0; public function LeogamingPhonePaymentState(param1:int) { super(); this.state = param1; } } }
package alternativa.tanks.display { import flash.utils.getTimer; public class Flash { private static const SHOW:int = 1; private static const FADE:int = 2; private static const DONE:int = 3; private var maxOffset:uint; private var flashDuration:int; private var fadeDuration:int; private var state:int = 3; private var startTime:int; public function Flash(param1:uint, param2:int, param3:int) { super(); this.maxOffset = param1; this.flashDuration = param2; this.fadeDuration = param3; } public static function getDefault() : Flash { return new Flash(255,100,300); } public function isActive() : Boolean { return this.state != DONE; } public function init() : void { this.startTime = getTimer(); this.state = SHOW; } public function getColorOffset(param1:int) : uint { var local2:uint = 0; switch(this.state) { case SHOW: if(param1 < this.startTime + this.flashDuration) { local2 = this.maxOffset * (param1 - this.startTime) / this.flashDuration; } else { local2 = this.maxOffset; this.startTime += this.flashDuration + this.fadeDuration; this.state = FADE; } break; case FADE: if(param1 < this.startTime) { local2 = this.maxOffset * (this.startTime - param1) / this.fadeDuration; } else { this.state = DONE; local2 = 0; } } return local2; } } }
package alternativa.tanks.gui.frames { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.frames.GreenFrameSkin_corner_frame.png")] public class GreenFrameSkin_corner_frame extends BitmapAsset { public function GreenFrameSkin_corner_frame() { super(); } } }
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank25.png")] public class PremiumRankBitmaps_bitmapBigRank25 extends BitmapAsset { public function PremiumRankBitmaps_bitmapBigRank25() { super(); } } }
package alternativa.tanks.models.battle.battlefield.keyboard { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_incendiarybeltIconClass.png")] public class DeviceIcons_incendiarybeltIconClass extends BitmapAsset { public function DeviceIcons_incendiarybeltIconClass() { super(); } } }
package alternativa.tanks.models.battle.battlefield.keyboard { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_modifiedcarriageIconClass.png")] public class DeviceIcons_modifiedcarriageIconClass extends BitmapAsset { public function DeviceIcons_modifiedcarriageIconClass() { super(); } } }
package projects.tanks.clients.fp10.libraries.tanksservices.service.logging.settings { import flash.events.Event; public class UserSettingsChangedEvent extends Event { public static const TYPE:String = "UserSettingsChangedEvent"; private var _settings:int; public function UserSettingsChangedEvent(param1:int) { this._settings = param1; super(TYPE); } public function getSettings() : int { return this._settings; } } }
package alternativa.tanks.servermodels { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class IEntranceAdapt implements IEntrance { private var object:IGameObject; private var impl:IEntrance; public function IEntranceAdapt(param1:IGameObject, param2:IEntrance) { super(); this.object = param1; this.impl = param2; } public function currentState(param1:ILeavableEntranceState) : void { var state:ILeavableEntranceState = param1; try { Model.object = this.object; this.impl.currentState(state); } finally { Model.popObject(); } } public function decideWhereToGoAfterStandAloneCaptcha(param1:ILeavableEntranceState, param2:Boolean) : void { var captchaModel:ILeavableEntranceState = param1; var confirmEmail:Boolean = param2; try { Model.object = this.object; this.impl.decideWhereToGoAfterStandAloneCaptcha(captchaModel,confirmEmail); } finally { Model.popObject(); } } public function antiAddiction() : Boolean { var result:Boolean = false; try { Model.object = this.object; result = Boolean(this.impl.antiAddiction()); } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.model.payment.shop { import alternativa.tanks.gui.shop.shopitems.item.details.ShopItemDetails; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class ShopItemDetailsViewEvents implements ShopItemDetailsView { private var object:IGameObject; private var impl:Vector.<Object>; public function ShopItemDetailsViewEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getDetailsView() : ShopItemDetails { var result:ShopItemDetails = null; var i:int = 0; var m:ShopItemDetailsView = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = ShopItemDetailsView(this.impl[i]); result = m.getDetailsView(); i++; } } finally { Model.popObject(); } return result; } public function isDetailedViewRequired() : Boolean { var result:Boolean = false; var i:int = 0; var m:ShopItemDetailsView = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = ShopItemDetailsView(this.impl[i]); result = Boolean(m.isDetailedViewRequired()); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.calculators { public class CalculatorHelper { public function CalculatorHelper() { super(); } public static function toCrystals(param1:Number) : int { return int(param1 + 1e-8); } public static function toMoney(param1:Number) : Number { return Math.ceil(param1 * 100 - 1e-8) * 0.01; } } }
package alternativa { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.ClientLog; import alternativa.osgi.service.clientlog.DeprecatedClientLogWrapper; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.osgi.service.command.CommandService; import alternativa.osgi.service.command.impl.CommandServiceImpl; import alternativa.osgi.service.command.impl.DefaultCommands; import alternativa.osgi.service.command.impl.OSGiCommands; import alternativa.osgi.service.console.Console; import alternativa.osgi.service.console.ConsoleLogTarget; import alternativa.osgi.service.console.IConsole; import alternativa.osgi.service.display.Display; import alternativa.osgi.service.display.IDisplay; import alternativa.osgi.service.dump.DumpService; import alternativa.osgi.service.dump.IDumpService; import alternativa.osgi.service.launcherparams.ILauncherParams; import alternativa.osgi.service.logging.LogService; import alternativa.osgi.service.logging.Logger; import alternativa.osgi.service.network.INetworkService; import alternativa.osgi.service.network.NetworkService; import alternativa.startup.ConnectionParameters; import alternativa.startup.IClientConfigurator; import flash.display.DisplayObjectContainer; import flash.display.Stage; import flash.events.KeyboardEvent; import flash.ui.Keyboard; public class ClientConfigurator implements IClientConfigurator { protected var osgi:OSGi; private var console:IConsole; private var conAlignShortcutH:KeyboardShortcut; private var conAlignShortcutV:KeyboardShortcut; private var commandService:CommandServiceImpl; private var logService:LogService; public function ClientConfigurator() { super(); } public function start(param1:DisplayObjectContainer, param2:ILauncherParams, param3:ConnectionParameters, param4:Vector.<String>) : void { this.osgi = OSGi.getInstance(); this.commandService = new CommandServiceImpl(); this.osgi.registerService(CommandService,this.commandService); this.initClientLog(); this.storeStartupLog(param4); this.initConsole(param1.stage,param2); this.osgi.registerService(ILauncherParams,param2); this.osgi.registerService(IDisplay,new Display(param1)); this.osgi.registerService(INetworkService,new NetworkService(param3)); var local5:IDumpService = new DumpService(this.osgi); this.osgi.registerService(IDumpService,local5); this.registerCommand(this.osgi,this.commandService); } private function registerCommand(param1:OSGi, param2:CommandService) : void { new DefaultCommands(param2); new OSGiCommands(param1,param2); } private function initClientLog() : void { this.logService = LogService(this.osgi.getService(LogService)); this.osgi.registerService(IClientLog,new ClientLog(this.logService)); OSGi.clientLog = new DeprecatedClientLogWrapper(this.logService); } private function storeStartupLog(param1:Vector.<String>) : void { var local4:String = null; var local2:LogService = LogService(this.osgi.getService(LogService)); var local3:Logger = local2.getLogger("startup"); for each(local4 in param1) { local3.info(local4); } } private function initConsole(param1:Stage, param2:ILauncherParams) : void { if(Boolean(this.console)) { return; } this.console = this.createConsole(param1); this.osgi.registerService(IConsole,this.console); this.logService.addLogTarget(new ConsoleLogTarget(this.commandService,this.console,param2)); var local3:String = param2.getParameter("console"); if(Boolean(local3)) { this.configureConsole(param1,this.console,local3); } } protected function createConsole(param1:Stage) : IConsole { return new Console(this.commandService,param1,50,100,1,1); } private function configureConsole(param1:Stage, param2:IConsole, param3:String) : void { var local6:String = null; var local7:Array = null; var local4:Array = param3.split(","); var local5:Object = {}; for each(local6 in local4) { local7 = local6.split(":"); local5[local7[0]] = local7[1]; } if(local5["show"] != null) { param2.show(); } if(local5["ha"] != null) { param2.horizontalAlignment = int(local5["ha"]); } if(local5["va"] != null) { param2.vericalAlignment = int(local5["va"]); } if(local5["w"] != null) { param2.width = int(local5["w"]); } if(local5["h"] != null) { param2.height = int(local5["h"]); } if(local5["alpha"] != null) { param2.executeCommand("con_alpha " + local5["alpha"]); } this.conAlignShortcutH = this.parseShortcut(local5["hsw"],Keyboard.LEFT,false,true,true); this.conAlignShortcutV = this.parseShortcut(local5["vsw"],Keyboard.UP,false,true,true); param1.addEventListener(KeyboardEvent.KEY_DOWN,this.onKey,true); } private function parseShortcut(param1:String, param2:int, param3:Boolean, param4:Boolean, param5:Boolean) : KeyboardShortcut { if(param1 == null) { return new KeyboardShortcut(param2,param3,param4,param5); } return new KeyboardShortcut(parseInt(param1),param1.indexOf("a") > -1,param1.indexOf("c") > -1,param1.indexOf("s") > -1); } private function onKey(param1:KeyboardEvent) : void { switch(param1.keyCode) { case this.conAlignShortcutH.keyCode: if(this.conAlignShortcutH.altKey == param1.altKey && this.conAlignShortcutH.shiftKey == param1.shiftKey && this.conAlignShortcutH.ctrlKey == param1.ctrlKey) { if(this.console.horizontalAlignment == 1) { this.console.horizontalAlignment = 2; } else { this.console.horizontalAlignment = 1; } } break; case this.conAlignShortcutV.keyCode: if(this.conAlignShortcutV.altKey == param1.altKey && this.conAlignShortcutV.shiftKey == param1.shiftKey && this.conAlignShortcutV.ctrlKey == param1.ctrlKey) { if(this.console.vericalAlignment == 1) { this.console.vericalAlignment = 2; } else { this.console.vericalAlignment = 1; } } } } } } class KeyboardShortcut { public var keyCode:int; public var altKey:Boolean; public var ctrlKey:Boolean; public var shiftKey:Boolean; public function KeyboardShortcut(param1:int, param2:Boolean, param3:Boolean, param4:Boolean) { super(); this.keyCode = param1; this.altKey = param2; this.ctrlKey = param3; this.shiftKey = param4; } }
package projects.tanks.clients.tankslauncershared.dishonestprogressbar { import mx.core.BitmapAsset; [Embed(source="/_assets/projects.tanks.clients.tankslauncershared.dishonestprogressbar.DishonestProgressBar_bgdLeftClass.png")] public class DishonestProgressBar_bgdLeftClass extends BitmapAsset { public function DishonestProgressBar_bgdLeftClass() { super(); } } }
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 DepthRendererSSAOFragmentShader extends FragmentShader { public function DepthRendererSSAOFragmentShader(param1:int) { super(); tex(ft0,v0,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,v2,ft2.z); tex(ft3,v1,fs1.dim(SamplerDim.D2).repeat(SamplerRepeat.WRAP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); mul(ft3.z,ft3,fc[1]); mul(ft3,ft3.z,ft3); var local2:int = 0; while(local2 < param1) { if(local2 > 0) { if(local2 % 2 > 0) { dp3(ft6,ft3,fc[4]); dp3(ft6.y,ft3,fc[5]); } else { dp3(ft3.x,ft6,fc[4]); dp3(ft3.y,ft6,fc[5]); } } if(local2 % 2 > 0) { div(ft4,ft6,fc[3]); } else { div(ft4,ft3,fc[3]); } div(ft4,ft4,ft2.z); div(ft4,ft4,fc[1]); add(ft4,v0,ft4); min(ft5,ft4,fc[6]); tex(ft5,ft5,fs0.dim(SamplerDim.D2).repeat(SamplerRepeat.CLAMP).filter(SamplerFilter.NEAREST).mipmap(SamplerMipMap.NONE)); dp3(ft5.z,ft5,fc[0]); mul(ft5.xy,ft4,fc[1]); sub(ft5.xy,ft5,fc[2]); mul(ft5.xy,ft5,ft5.z); sub(ft5,ft5,ft2); mul(ft5,ft5,fc[3]); dp3(ft5.w,ft5,ft5); sqt(ft5.w,ft5); div(ft5.xyz,ft5,ft5.w); mul(ft5.w,ft5,fc[3]); sub(ft5.w,fc[1],ft5); max(ft5.w,ft5,fc[4]); dp3(ft5.z,ft5,ft1); sub(ft5.z,ft5,fc[2]); max(ft5.z,ft5,fc[0]); mul(ft5.w,ft5,ft5.z); if(local2 == 0) { mov(ft0.w,ft5); } else { add(ft0.w,ft0,ft5); } local2++; } mul(ft0.w,ft0,fc[2]); mov(oc,ft0); } } }
package projects.tanks.client.users.model.switchbattleinvite { public interface INotificationEnabledModelBase { } }
package projects.tanks.client.panel.model.shop.indemnity { public class IndemnityCC { private var _indemnitySize:int; public function IndemnityCC(param1:int = 0) { super(); this._indemnitySize = param1; } public function get indemnitySize() : int { return this._indemnitySize; } public function set indemnitySize(param1:int) : void { this._indemnitySize = param1; } public function toString() : String { var local1:String = "IndemnityCC ["; local1 += "indemnitySize = " + this.indemnitySize + " "; return local1 + "]"; } } }
package _codec.projects.tanks.client.panel.model.payment.modes.pricerange { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.panel.model.payment.modes.pricerange.PriceRangeCC; public class VectorCodecPriceRangeCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecPriceRangeCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(PriceRangeCC,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.<PriceRangeCC> = new Vector.<PriceRangeCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = PriceRangeCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:PriceRangeCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<PriceRangeCC> = Vector.<PriceRangeCC>(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.resultwindow { import flash.display.BitmapData; [Embed(source="/_assets/assets.resultwindow.bres_NORMAL_RED_TL.png")] public dynamic class bres_NORMAL_RED_TL extends BitmapData { public function bres_NORMAL_RED_TL(param1:int = 4, param2:int = 4) { super(param1,param2); } } }
package alternativa.tanks.help { public final class HelperAlign { public static const NONE:int = 0; public static const TOP_LEFT:int = 9; public static const TOP_CENTER:int = 17; public static const TOP_RIGHT:int = 33; public static const MIDDLE_LEFT:int = 10; public static const MIDDLE_CENTER:int = 18; public static const MIDDLE_RIGHT:int = 34; public static const BOTTOM_LEFT:int = 12; public static const BOTTOM_CENTER:int = 20; public static const BOTTOM_RIGHT:int = 36; public static const TOP_MASK:int = 1; public static const MIDDLE_MASK:int = 2; public static const BOTTOM_MASK:int = 4; public static const LEFT_MASK:int = 8; public static const CENTER_MASK:int = 16; public static const RIGHT_MASK:int = 32; public function HelperAlign() { super(); } public static function stringOf(align:int) : String { var s:String = null; switch(align) { case 0: s = "NONE"; break; case 9: s = "TOP_LEFT"; break; case 17: s = "TOP_CENTER"; break; case 33: s = "TOP_RIGHT"; break; case 10: s = "MIDDLE_LEFT"; break; case 18: s = "MIDDLE_CENTER"; break; case 34: s = "MIDDLE_RIGHT"; break; case 12: s = "BOTTOM_LEFT"; break; case 20: s = "BOTTOM_CENTER"; break; case 36: s = "BOTTOM_RIGHT"; } return s; } } }
package projects.tanks.client.garage.skins.shot { import platform.client.fp10.core.type.IGameObject; public class AvailableShotSkinsCC { private var _skins:Vector.<IGameObject>; public function AvailableShotSkinsCC(param1:Vector.<IGameObject> = null) { super(); this._skins = param1; } public function get skins() : Vector.<IGameObject> { return this._skins; } public function set skins(param1:Vector.<IGameObject>) : void { this._skins = param1; } public function toString() : String { var local1:String = "AvailableShotSkinsCC ["; local1 += "skins = " + this.skins + " "; return local1 + "]"; } } }
package _codec.projects.tanks.client.battleselect.model.matchmaking.group.notify { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.EnumCodecInfo; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import projects.tanks.client.battleselect.model.matchmaking.group.notify.MountItemsUserData; import projects.tanks.client.commons.types.ItemCategoryEnum; public class CodecMountItemsUserData implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_id:ICodec; private var codec_itemCategory:ICodec; private var codec_modification:ICodec; private var codec_name:ICodec; private var codec_upgradeLevel:ICodec; public function CodecMountItemsUserData() { super(); } public function init(param1:IProtocol) : void { this.codec_id = param1.getCodec(new TypeCodecInfo(Long,false)); this.codec_itemCategory = param1.getCodec(new EnumCodecInfo(ItemCategoryEnum,false)); this.codec_modification = param1.getCodec(new TypeCodecInfo(int,false)); this.codec_name = param1.getCodec(new TypeCodecInfo(String,false)); this.codec_upgradeLevel = param1.getCodec(new TypeCodecInfo(int,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:MountItemsUserData = new MountItemsUserData(); local2.id = this.codec_id.decode(param1) as Long; local2.itemCategory = this.codec_itemCategory.decode(param1) as ItemCategoryEnum; local2.modification = this.codec_modification.decode(param1) as int; local2.name = this.codec_name.decode(param1) as String; local2.upgradeLevel = this.codec_upgradeLevel.decode(param1) as int; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:MountItemsUserData = MountItemsUserData(param2); this.codec_id.encode(param1,local3.id); this.codec_itemCategory.encode(param1,local3.itemCategory); this.codec_modification.encode(param1,local3.modification); this.codec_name.encode(param1,local3.name); this.codec_upgradeLevel.encode(param1,local3.upgradeLevel); } } }
package alternativa.tanks.model.garage.upgrade { import alternativa.osgi.service.clientlog.IClientLog; import alternativa.tanks.gui.GarageWindowEvent; import alternativa.tanks.gui.IGarageWindow; import alternativa.tanks.gui.ItemInfoPanel; import alternativa.tanks.gui.upgrade.ItemPropertyUpgradeEvent; import alternativa.tanks.model.item.upgradable.UpgradableItem; import alternativa.tanks.model.item.upgradable.UpgradableItemParams; import alternativa.tanks.service.garage.GarageService; import alternativa.tanks.service.item.ItemService; import alternativa.tanks.service.money.IMoneyService; import alternativa.tanks.service.upgradingitems.UpgradingItemsService; import controls.timer.CountDownTimer; import controls.timer.CountDownTimerOnCompleteBefore; import flash.events.Event; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectLoadPostListener; import platform.client.fp10.core.model.ObjectUnloadListener; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.garage.models.garage.upgrade.IUpgradeGarageItemModelBase; import projects.tanks.client.garage.models.garage.upgrade.UpgradeGarageItemModelBase; import projects.tanks.clients.flash.commons.services.layout.event.LobbyLayoutServiceEvent; import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService; [ModelInfo] public class UpgradeGarageItemModel extends UpgradeGarageItemModelBase implements IUpgradeGarageItemModelBase, UpgradeGarageItem, ObjectLoadPostListener, CountDownTimerOnCompleteBefore, ObjectUnloadListener, ObjectLoadListener, FlushUpgrades { [Inject] public static var upgradingItemsService:UpgradingItemsService; [Inject] public static var moneyService:IMoneyService; [Inject] public static var garageService:GarageService; [Inject] public static var itemService:ItemService; [Inject] public static var clientLog:IClientLog; [Inject] public static var lobbyLayoutService:ILobbyLayoutService; private var garageWindow:IGarageWindow; private var itemInfoPanel:ItemInfoPanel; private var selectedTimer:CountDownTimer; private var selectedItem:IGameObject; private var delayUpgrades:DelayUpgrades; public function UpgradeGarageItemModel() { super(); } public function objectLoaded() : void { this.selectedTimer = null; this.delayUpgrades = new DelayUpgrades(FlushUpgrades(object.adapt(FlushUpgrades))); lobbyLayoutService.addEventListener(LobbyLayoutServiceEvent.BEGIN_LAYOUT_SWITCH,this.onBeginLayoutSwitch); } private function onBeginLayoutSwitch(param1:LobbyLayoutServiceEvent) : void { if(this.delayUpgrades.isDelayed()) { this.delayUpgrades.flushToServer(); } } public function objectLoadedPost() : void { this.garageWindow = garageService.getView(); this.itemInfoPanel = this.garageWindow.getItemInfoPanel(); this.itemInfoPanel.addEventListener(ItemPropertyUpgradeEvent.SPEED_UP,getFunctionWrapper(this.onSpeedUp)); this.itemInfoPanel.addEventListener(ItemPropertyUpgradeEvent.UPGRADE_STARTED,getFunctionWrapper(this.onUpgradeStarted)); this.itemInfoPanel.addEventListener(ItemPropertyUpgradeEvent.FLUSH_UPGRADES,getFunctionWrapper(this.onFlushUpgrades)); this.garageWindow.addEventListener(GarageWindowEvent.STORE_ITEM_SELECTED,getFunctionWrapper(this.onStoreListSelect)); this.garageWindow.addEventListener(GarageWindowEvent.WAREHOUSE_ITEM_SELECTED,getFunctionWrapper(this.onDepotListSelect)); } public function objectUnloaded() : void { lobbyLayoutService.removeEventListener(LobbyLayoutServiceEvent.BEGIN_LAYOUT_SWITCH,this.onBeginLayoutSwitch); this.itemInfoPanel.removeEventListener(ItemPropertyUpgradeEvent.SPEED_UP,getFunctionWrapper(this.onSpeedUp)); this.itemInfoPanel.removeEventListener(ItemPropertyUpgradeEvent.UPGRADE_STARTED,getFunctionWrapper(this.onUpgradeStarted)); this.itemInfoPanel.removeEventListener(ItemPropertyUpgradeEvent.FLUSH_UPGRADES,getFunctionWrapper(this.onFlushUpgrades)); this.garageWindow.removeEventListener(GarageWindowEvent.STORE_ITEM_SELECTED,getFunctionWrapper(this.onStoreListSelect)); this.garageWindow.removeEventListener(GarageWindowEvent.WAREHOUSE_ITEM_SELECTED,getFunctionWrapper(this.onDepotListSelect)); this.deselectTimer(); this.delayUpgrades = null; this.garageWindow = null; this.itemInfoPanel = null; } public function isUpgradesEnabled() : Boolean { return true; } public function itemAlreadyUpgraded(param1:int) : void { moneyService.changeCrystals(param1); } private function onSpeedUp(param1:ItemPropertyUpgradeEvent) : void { var local2:UpgradableItemParams = itemService.getUpgradableItemParams(this.selectedItem); if(local2.getInitialSpeedUpPrice() == param1.getPrice() && this.delayUpgrades.isDelayedItem(this.selectedItem)) { this.delayUpgrades.speedUp(param1.getPrice()); } else { this.delayUpgrades.flushToServer(); server.speedUp(this.selectedItem,param1.getPrice()); } moneyService.spend(param1.getPrice()); param1.getTimer().stop(); } private function onUpgradeStarted(param1:ItemPropertyUpgradeEvent) : void { var local2:UpgradableItemParams = itemService.getUpgradableItemParams(this.selectedItem); this.delayUpgrades.startUpgrade(this.selectedItem,param1.getPrice(),local2.getTimeInSeconds()); local2.startUpgrade(param1.getTimer()); moneyService.spend(param1.getPrice()); this.selectTimer(param1.getTimer()); upgradingItemsService.add(itemService.getGarageItemInfo(this.selectedItem),param1.getTimer()); } public function onCompleteBefore(param1:CountDownTimer, param2:Boolean) : void { var local3:UpgradableItem = null; if(this.selectedTimer == param1) { local3 = UpgradableItem(this.selectedItem.adapt(UpgradableItem)); this.selectedTimer = null; local3.speedUp(); upgradingItemsService.remove(this.selectedItem); if(!param2) { upgradingItemsService.informServerAboutUpgradedItem(this.selectedItem); } this.garageWindow.getItemInfoPanel().itemUpgraded(); if(local3.getUpgradableItem().isFullUpgraded()) { this.garageWindow.itemFullUpgraded(this.selectedItem); } } } private function selectTimer(param1:CountDownTimer) : void { this.deselectTimer(); if(param1 != null) { this.selectedTimer = param1; this.selectedTimer.addListener(CountDownTimerOnCompleteBefore,this); } } private function deselectTimer() : void { if(this.selectedTimer != null) { this.selectedTimer.removeListener(CountDownTimerOnCompleteBefore,this); this.selectedTimer = null; } } private function onDepotListSelect(param1:GarageWindowEvent) : void { this.onItemSelected(param1.item,true); } private function onStoreListSelect(param1:GarageWindowEvent) : void { this.onItemSelected(param1.item,false); } private function onItemSelected(param1:IGameObject, param2:Boolean) : void { if(this.selectedItem != param1) { this.deselectTimer(); this.selectedItem = param1; if(param2) { if(this.selectedItem.hasModel(UpgradableItem)) { this.selectTimer(UpgradableItem(this.selectedItem.adapt(UpgradableItem)).getCountDownTimer()); } } } } private function onFlushUpgrades(param1:Event) : void { if(this.delayUpgrades.isDelayed()) { this.delayUpgrades.flushToServer(); } } public function flushToServer(param1:DelayUpgrades, param2:IGameObject) : void { var local3:int = 0; if(param1.isDelayed()) { local3 = param1.getNumLevels(); if(local3 > 0) { server.instantUpgrade(param2,local3,param1.getPrice()); } if(param1.isUpgradeStarted()) { server.upgradeItem(param2,param1.getStartUpgradePrice(),param1.getUpgradeTime()); } } } } }
package projects.tanks.client.panel.model { public interface IPanelModelBase { } }
package projects.tanks.client.partners.impl.asiasoft { public interface IAsiasoftPaymentModelBase { function proceedToPayment() : void; function showAccountBalance(param1:int, param2:Boolean) : void; } }
package alternativa.tanks.service.referrals.notification { import flash.events.Event; public class NewReferralsNotifierServiceEvent extends Event { public static const NEW_REFERRALS_COUNT_UPDATED:String = "NewReferralsNotifierServiceEvent.NEW_REFERRALS_COUNT_UPDATED"; public static const REFERRAL_ADDED:String = "NewReferralsNotifierServiceEvent.REFERRAL_ADDED"; public static const REQUEST_NEW_REFERRALS_COUNT:String = "NewReferralsNotifierServiceEvent.REQUEST_NEW_REFERRALS_COUNT"; public static const RESET_NEW_REFERRALS_COUNT:String = "NewReferralsNotifierServiceEvent.RESET_NEW_REFERRALS_COUNT"; public function NewReferralsNotifierServiceEvent(param1:String) { super(param1); } } }
package projects.tanks.client.battlefield.models.user.bossstate { public class BossRelationRole { public static const VICTIM:BossRelationRole = new BossRelationRole(0,"VICTIM"); public static const INCARNATION:BossRelationRole = new BossRelationRole(1,"INCARNATION"); public static const BOSS:BossRelationRole = new BossRelationRole(2,"BOSS"); private var _value:int; private var _name:String; public function BossRelationRole(param1:int, param2:String) { super(); this._value = param1; this._name = param2; } public static function get values() : Vector.<BossRelationRole> { var local1:Vector.<BossRelationRole> = new Vector.<BossRelationRole>(); local1.push(VICTIM); local1.push(INCARNATION); local1.push(BOSS); return local1; } public function toString() : String { return "BossRelationRole [" + this._name + "]"; } public function get value() : int { return this._value; } public function get name() : String { return this._name; } } }
package alternativa.tanks.models.battle.statistics.targetingmode { import alternativa.tanks.battle.events.BattleEventDispatcher; import alternativa.tanks.battle.events.BattleEventListener; import alternativa.tanks.battle.events.TankAddedToBattleEvent; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectUnloadListener; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.statistics.targetingmode.ITargetingStatisticsModelBase; import projects.tanks.client.battlefield.models.statistics.targetingmode.TargetingStatisticsModelBase; [ModelInfo] public class TargetingStatisticsModel extends TargetingStatisticsModelBase implements ITargetingStatisticsModelBase, ObjectLoadListener, ObjectUnloadListener, BattleEventListener { [Inject] public static var battleEventDispatcher:BattleEventDispatcher; private var gameObject:IGameObject; private var spawned:Boolean; public function TargetingStatisticsModel() { super(); } [Obfuscation(rename="false")] public function objectLoaded() : void { battleEventDispatcher.addBattleEventListener(TankAddedToBattleEvent,this); this.gameObject = object; this.spawned = false; } [Obfuscation(rename="false")] public function objectUnloaded() : void { battleEventDispatcher.removeBattleEventListener(TankAddedToBattleEvent,this); this.gameObject = null; } public function handleBattleEvent(param1:Object) : void { var local2:TankAddedToBattleEvent = param1 as TankAddedToBattleEvent; if(local2 != null && local2.isLocal) { this.spawned = true; } } } }
package alternativa.tanks.controller.events { import flash.events.Event; public class InviteCheckResultEvent extends Event { public static const INVITE_CODE_IS_UNBOUND:String = "INVITE_CODE_IS_UNBOUND"; public static const INVITE_CODE_DOES_NOT_EXIST:String = "INVITE_CODE_DOES_NOT_EXIST"; private var _uid:String; public function InviteCheckResultEvent(param1:String, param2:String = null) { this._uid = param2; super(param1); } public function get uid() : String { return this._uid; } } }
package alternativa.tanks.model.payment.modes.gate2shop { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class Gate2ShopPaymentAdapt implements Gate2ShopPayment { private var object:IGameObject; private var impl:Gate2ShopPayment; public function Gate2ShopPaymentAdapt(param1:IGameObject, param2:Gate2ShopPayment) { super(); this.object = param1; this.impl = param2; } public function emailInputRequired() : Boolean { var result:Boolean = false; try { Model.object = this.object; result = Boolean(this.impl.emailInputRequired()); } finally { Model.popObject(); } return result; } public function registerEmailAndGetPaymentUrl(param1:String) : void { var email:String = param1; try { Model.object = this.object; this.impl.registerEmailAndGetPaymentUrl(email); } finally { Model.popObject(); } } } }
package projects.tanks.client.clans.clan.block { 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 ClanBlockModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function ClanBlockModelServer(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.rulesupdate { import alternativa.tanks.gui.RulesUpdateAlert; import platform.client.fp10.core.model.ObjectLoadListener; import projects.tanks.client.panel.model.rulesupdate.showing.IRulesUpdateShowingModelBase; import projects.tanks.client.panel.model.rulesupdate.showing.RulesUpdateShowingModelBase; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.IDialogsService; [ModelInfo] public class RulesUpdateShowingModel extends RulesUpdateShowingModelBase implements IRulesUpdateShowingModelBase, ObjectLoadListener { [Inject] public static var dialogService:IDialogsService; private var alert:RulesUpdateAlert; public function RulesUpdateShowingModel() { super(); } public function objectLoaded() : void { if(getInitParam().showAcceptRulesAlert) { this.alert = new RulesUpdateAlert(getInitParam().topText,getInitParam().bottomText,getFunctionWrapper(this.onRulesAccept)); dialogService.addDialog(this.alert); } } private function onRulesAccept() : void { dialogService.removeDialog(this.alert); server.userAcceptedRules(); } } }
package alternativa.tanks.model.item.container.lootboxes { import alternativa.tanks.model.garage.passtoshop.PassToShopService; import alternativa.tanks.model.item.container.ContainerPanelAction; import alternativa.tanks.model.item.container.gui.ContainerPanel; import alternativa.tanks.model.item.container.gui.opening.ContainerEvent; import alternativa.tanks.model.item.container.gui.opening.ContainerOpenDialog; import alternativa.tanks.model.item.container.resource.ContainerResource; import alternativa.tanks.model.item.countable.ICountableItem; import alternativa.tanks.model.item.info.ItemActionPanel; import flash.display.DisplayObjectContainer; import flash.events.IEventDispatcher; import platform.client.fp10.core.model.ObjectLoadPostListener; import projects.tanks.client.commons.types.ShopCategoryEnum; import projects.tanks.client.garage.models.item.container.ContainerGivenItem; import projects.tanks.client.garage.models.item.container.lootbox.ILootBoxModelBase; import projects.tanks.client.garage.models.item.container.lootbox.LootBoxModelBase; import projects.tanks.client.garage.models.item.container.resources.ContainerResourceCC; import projects.tanks.clients.flash.commons.services.payment.PaymentDisplayService; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.IDialogsService; [ModelInfo] public class LootBoxModel extends LootBoxModelBase implements ILootBoxModelBase, ObjectLoadPostListener, ItemActionPanel, ContainerPanelAction { [Inject] public static var paymentService:PaymentDisplayService; [Inject] public static var passToShop:PassToShopService; [Inject] public static var dialogService:IDialogsService; private var lootBoxDialog:ContainerOpenDialog; public function LootBoxModel() { super(); } public function objectLoadedPost() : void { var local1:ContainerPanel = new ContainerPanel(this,getFunctionWrapper(this.openContainerDialog)); local1.setOpenButtonEnabled(this.getContainersCount() > 0); putData(ContainerPanel,local1); } private function getContainersCount() : int { return ICountableItem(object.adapt(ICountableItem)).getCount(); } public function openSuccessful(param1:Vector.<ContainerGivenItem>) : void { this.lootBoxDialog.openLoots(param1); this.getPanel().setOpenButtonEnabled(this.getContainersCount() > 0); } public function updateCount(param1:int) : void { } public function updateActionElements(param1:DisplayObjectContainer, param2:IEventDispatcher) : void { var local3:ContainerPanel = this.getPanel(); local3.updateActionElements(param1); local3.setOpenButtonEnabled(this.getContainersCount() > 0); } private function getPanel() : ContainerPanel { return getData(ContainerPanel) as ContainerPanel; } public function handleDoubleClickOnItemPreview() : void { if(passToShop.isPassToShopEnabled()) { paymentService.openPaymentAt(ShopCategoryEnum.LOOT_BOXES); } } public function needBuyButton() : Boolean { return true; } public function clickBuyButton() : void { paymentService.openPaymentAt(ShopCategoryEnum.LOOT_BOXES); } public function openContainerDialog() : void { this.lootBoxDialog = new ContainerOpenDialog(this.getResources(),this.getContainersCount(),false); this.lootBoxDialog.addEventListener(ContainerEvent.OPEN,getFunctionWrapper(this.onOpenContainer),false,0,true); dialogService.enqueueDialog(this.lootBoxDialog); } private function getResources() : ContainerResourceCC { return ContainerResource(object.adapt(ContainerResource)).getResources(); } private function onOpenContainer(param1:ContainerEvent) : void { this.lootBoxDialog.removeEventListener(ContainerEvent.OPEN,getFunctionWrapper(this.onOpenContainer)); server.open(param1.count); } } }
package alternativa.engine3d.animation.keys { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.animation.AnimationState; use namespace alternativa3d; public class NumberTrack extends Track { private static var temp:NumberKey = new NumberKey(); alternativa3d var keyList:NumberKey; public var property:String; public function NumberTrack(param1:String, param2:String) { super(); this.property = param2; this.object = param1; } override alternativa3d function get keyFramesList() : Keyframe { return this.alternativa3d::keyList; } override alternativa3d function set keyFramesList(param1:Keyframe) : void { this.alternativa3d::keyList = NumberKey(param1); } public function addKey(param1:Number, param2:Number = 0) : Keyframe { var local3:NumberKey = new NumberKey(); local3.alternativa3d::_time = param1; local3.value = param2; alternativa3d::addKeyToList(local3); return local3; } override alternativa3d function blend(param1:Number, param2:Number, param3:AnimationState) : void { var local4:NumberKey = null; if(this.property == null) { return; } var local5:NumberKey = this.alternativa3d::keyList; while(local5 != null && local5.alternativa3d::_time < param1) { local4 = local5; local5 = local5.alternativa3d::next; } if(local4 != null) { if(local5 != null) { temp.interpolate(local4,local5,(param1 - local4.alternativa3d::_time) / (local5.alternativa3d::_time - local4.alternativa3d::_time)); param3.addWeightedNumber(this.property,temp.alternativa3d::_value,param2); } else { param3.addWeightedNumber(this.property,local4.alternativa3d::_value,param2); } } else if(local5 != null) { param3.addWeightedNumber(this.property,local5.alternativa3d::_value,param2); } } override alternativa3d function createKeyFrame() : Keyframe { return new NumberKey(); } override alternativa3d function interpolateKeyFrame(param1:Keyframe, param2:Keyframe, param3:Keyframe, param4:Number) : void { NumberKey(param1).interpolate(NumberKey(param2),NumberKey(param3),param4); } override public function slice(param1:Number, param2:Number = 1.7976931348623157e+308) : Track { var local3:NumberTrack = new NumberTrack(object,this.property); alternativa3d::sliceImplementation(local3,param1,param2); return local3; } } }
package com.lorentz.SVG.parser { public class VisitDefinition { public function VisitDefinition(node:XML, onComplete:Function = null){ this.node = node; this.onComplete = onComplete; } public var node:XML; public var onComplete:Function; } }
package alternativa.tanks.models.tank { import alternativa.tanks.battle.objects.tank.Tank; [ModelInterface] public interface InitTankPart { function initTankPart(param1:Tank) : void; } }
package alternativa.tanks.gui.device.list { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.device.list.DeviceBorder_topClass.png")] public class DeviceBorder_topClass extends BitmapAsset { public function DeviceBorder_topClass() { super(); } } }
package _codec.projects.tanks.client.panel.model.donationalert.types { 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 alternativa.types.Long; import projects.tanks.client.panel.model.donationalert.types.DonationData; import projects.tanks.client.panel.model.donationalert.types.GoodInfoData; public class CodecDonationData implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_goods:ICodec; private var codec_time:ICodec; public function CodecDonationData() { super(); } public function init(param1:IProtocol) : void { this.codec_goods = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(GoodInfoData,false),false,1)); this.codec_time = param1.getCodec(new TypeCodecInfo(Long,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:DonationData = new DonationData(); local2.goods = this.codec_goods.decode(param1) as Vector.<GoodInfoData>; local2.time = this.codec_time.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:DonationData = DonationData(param2); this.codec_goods.encode(param1,local3.goods); this.codec_time.encode(param1,local3.time); } } }
package alternativa.tanks.view.icons { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.view.icons.BattleParamsCheckButtonIcons_privateClass.png")] public class BattleParamsCheckButtonIcons_privateClass extends BitmapAsset { public function BattleParamsCheckButtonIcons_privateClass() { super(); } } }
package alternativa.tanks.models.battlefield.effects.levelup.rangs { import mx.core.BitmapAsset; [ExcludeClass] public class BigRangIcon_rang_21 extends BitmapAsset { public function BigRangIcon_rang_21() { super(); } } }
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapSmallRank10.png")] public class PremiumRankBitmaps_bitmapSmallRank10 extends BitmapAsset { public function PremiumRankBitmaps_bitmapSmallRank10() { super(); } } }
package alternativa.tanks.models.sfx { import flash.utils.Dictionary; public class LightDataManager { private static var data:Dictionary = new Dictionary(); private static var colors:Dictionary = new Dictionary(); public function LightDataManager() { super(); } public static function init(json_:String) : void { var item:Object = null; var turretId:String = null; var animations:Vector.<LightingEffectRecord> = null; var anim:Object = null; var json:Object = JSON.parse(json_); var items:Array = json.data; for each(item in items) { if(item.turret.split("_")[0] == "bonus") { colors[item.turret] = item.color; } else { turretId = item.turret; animations = new Vector.<LightingEffectRecord>(); for each(anim in item.animation) { animations.push(new LightingEffectRecord(anim.attenuationBegin,anim.attenuationEnd,anim.color,anim.intensity,anim.time)); } data[turretId] = new LightAnimation(animations); } } } public static function getLightDataMuzzle(turretId:String) : LightAnimation { return data[turretId + "_muzzle"]; } public static function getLightDataShot(turretId:String) : LightAnimation { return data[turretId + "_shot"]; } public static function getLightDataExplosion(turretId:String) : LightAnimation { return data[turretId + "_explosion"]; } public static function getLightData(turretId:String, effectName:String) : LightAnimation { return data[turretId + "_" + effectName]; } public static function getBonusLightColor(bonusId:String) : uint { return colors[bonusId]; } } }
package alternativa.tanks.models.weapon.shared { import alternativa.math.Matrix3; import alternativa.math.Vector3; import alternativa.physics.Body; import alternativa.physics.collision.types.RayHit; import alternativa.tanks.physics.CollisionGroup; import alternativa.tanks.physics.TanksCollisionDetector; import alternativa.tanks.utils.EncryptedNumber; import alternativa.tanks.utils.EncryptedNumberImpl; import flash.utils.Dictionary; public class ConicAreaTargetingSystem { private static const COLLISION_GROUP:int = CollisionGroup.WEAPON; private static const origin:Vector3 = new Vector3(); private var range:EncryptedNumber; private var halfConeAngle:EncryptedNumber; private var numRays:int; private var numSteps:int; private var collisionDetector:TanksCollisionDetector; private var targetValidator:ConicAreaTargetValidator; private const _xAxis:Vector3 = new Vector3(); private const matrix:Matrix3 = new Matrix3(); private const rotationMatrix:Matrix3 = new Matrix3(); private const rayHit:RayHit = new RayHit(); private const collisionFilter:ConicTargetingCollisionFilter = new ConicTargetingCollisionFilter(); private const rayDirection:Vector3 = new Vector3(); private const muzzlePosition:Vector3 = new Vector3(); private var distanceByTarget:Dictionary; private var hitPointByTarget:Dictionary; public function ConicAreaTargetingSystem(param1:Number, param2:Number, param3:int, param4:int, param5:TanksCollisionDetector, param6:ConicAreaTargetValidator) { super(); this.range = new EncryptedNumberImpl(param1); this.halfConeAngle = new EncryptedNumberImpl(0.5 * param2); this.numRays = param3; this.numSteps = param4; this.collisionDetector = param5; this.targetValidator = param6; } public function getTargets(param1:Body, param2:Number, param3:Number, param4:Vector3, param5:Vector3, param6:Vector3, param7:Vector.<Body>, param8:Vector.<Number>, param9:Vector.<Vector3>) : void { var local16:* = undefined; var local17:Number = NaN; this.collisionFilter.shooter = param1; this.distanceByTarget = new Dictionary(); this.hitPointByTarget = new Dictionary(); var local10:Number = param3 * param2; var local11:Number = param2 - local10; if(this.collisionDetector.raycast(param4,param5,COLLISION_GROUP,param2,this.collisionFilter,this.rayHit) && this.rayHit.shape.body.tank == null) { return; } this._xAxis.copy(param6); this.muzzlePosition.copy(param4).addScaled(local10,param5); var local12:Number = this.range.getNumber() + local11; this.processRay(this.muzzlePosition,param5,local12); this.rotationMatrix.fromAxisAngle(param5,Math.PI / this.numSteps); var local13:Number = this.halfConeAngle.getNumber() / this.numRays; var local14:int = 0; while(local14 < this.numSteps) { this.processSector(this.muzzlePosition,param5,this._xAxis,local12,this.numRays,local13); this.processSector(this.muzzlePosition,param5,this._xAxis,local12,this.numRays,-local13); this._xAxis.transform3(this.rotationMatrix); local14++; } var local15:int = 0; for(local16 in this.distanceByTarget) { param7[local15] = local16; local17 = this.distanceByTarget[local16] - local11; if(local17 < 0) { local17 = 0; } param8[local15] = local17; param9[local15] = this.hitPointByTarget[local16]; local15++; } param7.length = local15; param8.length = local15; this.collisionFilter.shooter = null; this.collisionFilter.clearInvalidTargets(); this.distanceByTarget = null; } private function processSector(param1:Vector3, param2:Vector3, param3:Vector3, param4:Number, param5:int, param6:Number) : void { var local7:Number = 0; var local8:int = 0; while(local8 < param5) { local7 += param6; this.matrix.fromAxisAngle(param3,local7); this.matrix.transformVector(param2,this.rayDirection); this.processRay(param1,this.rayDirection,param4); local8++; } } private function processRay(param1:Vector3, param2:Vector3, param3:Number) : void { var local5:Body = null; var local6:Number = NaN; origin.copy(param1); var local4:Number = 0; if(this.collisionDetector.raycast(origin,param2,COLLISION_GROUP,param3,this.collisionFilter,this.rayHit)) { local5 = this.rayHit.shape.body; if(local5.tank != null && !MarginalCollider.segmentWithStaticIntersection(origin,this.rayHit.position)) { origin.addScaled(this.rayHit.t,param2); local4 += this.rayHit.t; if(this.targetValidator.isValidTarget(local5)) { this.collisionFilter.addTarget(local5); local6 = Number(this.distanceByTarget[local5]); if(isNaN(local6) || local6 > local4) { this.distanceByTarget[local5] = local4; this.hitPointByTarget[local5] = this.rayHit.position.clone(); } } else { this.collisionFilter.addInvalidTarget(local5); } } } this.collisionFilter.clearTargets(); } public function updateRange(param1:Number) : void { this.range.setNumber(param1); } } }
package _codec.projects.tanks.client.battlefield.models.bonus.bonus.battlebonuses.crystal { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.bonus.bonus.battlebonuses.crystal.BattleGoldBonusCC; public class VectorCodecBattleGoldBonusCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecBattleGoldBonusCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(BattleGoldBonusCC,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.<BattleGoldBonusCC> = new Vector.<BattleGoldBonusCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = BattleGoldBonusCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:BattleGoldBonusCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<BattleGoldBonusCC> = Vector.<BattleGoldBonusCC>(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.bonus.bonus.common { 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 BonusCommonModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:BonusCommonModelServer; private var client:IBonusCommonModelBase = IBonusCommonModelBase(this); private var modelId:Long = Long.getLong(2087671478,1672369054); public function BonusCommonModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new BonusCommonModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(BonusCommonCC,false))); } protected function getInitParam() : BonusCommonCC { return BonusCommonCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { var local3:* = param1; switch(false ? 0 : 0) { } } override public function get id() : Long { return this.modelId; } } }
package alternativa.tanks.models.battle.ctf { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.ctf.CTFHudIndicators_flagOutOfBaseRed.png")] public class CTFHudIndicators_flagOutOfBaseRed extends BitmapAsset { public function CTFHudIndicators_flagOutOfBaseRed() { super(); } } }
package controls.rangicons { import mx.core.BitmapAsset; [ExcludeClass] public class RangIcon_p18 extends BitmapAsset { public function RangIcon_p18() { super(); } } }
package alternativa.osgi.service.console { import alternativa.osgi.service.command.CommandService; import alternativa.osgi.service.command.FormattedOutput; import alternativa.osgi.service.console.variables.ConsoleVar; import alternativa.utils.CircularStringBuffer; import alternativa.utils.ICircularStringBuffer; import alternativa.utils.IStringBufferIterator; import flash.display.Graphics; import flash.display.Sprite; import flash.display.Stage; import flash.events.Event; import flash.events.KeyboardEvent; import flash.events.MouseEvent; import flash.events.TextEvent; import flash.system.System; import flash.text.TextField; import flash.text.TextFieldType; import flash.text.TextFormat; import flash.ui.Keyboard; import flash.utils.setTimeout; public class Console implements IConsole { private static const DEFAULT_BG_COLOR:uint = 16777215; private static const DEFAULT_FONT_COLOR:uint = 0; private static const DEFAULT_TEXT_FORMAT:TextFormat = new TextFormat("Courier New",12,DEFAULT_FONT_COLOR); private static const INPUT_HEIGHT:int = 20; private static const LINE_SPLITTER:RegExp = /\n|\r|\n\r/; private static const TOKENIZER:RegExp = /(?:[^"\s]+)|(?:"[^"]*")/g; private var stage:Stage; private var container:Sprite = new Sprite(); private var outputContainer:Sprite; private var input:TextField; private var textFields:Vector.<TextField> = new Vector.<TextField>(); private var charWidth:int; private var charHeight:int; private var hSpacing:int = 0; private var preventInput:Boolean; private var visible:Boolean; private var commandHistory:Array = []; private var commandHistoryIndex:int = 0; private var variables:Object = {}; private var numPageLines:int; private var lineWidth:int; private var topPageLine:int; private var buffer:ICircularStringBuffer; private var _widthPercent:int; private var _heightPercent:int; private var align:int; private var consoleBackgroundColor:uint = 16777215; private var consoleForegroundColor:uint = 0; private var _alpha:Number = 1; private var filter:String; private var commandService:CommandService; private var lastException:Error; public function Console(param1:CommandService, param2:Stage, param3:int, param4:int, param5:int, param6:int) { super(); this.commandService = param1; this.stage = param2; this.buffer = new CircularStringBuffer(4000); this.calcTextMetrics(param2); this.initInput(); this.initOutput(); this.setSize(param3,param4); this.horizontalAlignment = param5; this.vericalAlignment = param6; param2.addEventListener(KeyboardEvent.KEY_UP,this.onKeyUp); param2.addEventListener(Event.RESIZE,this.onResize); param1.registerCommand("console","hide","Спрятать консоль",[],this.onHide); param1.registerCommand("console","copy","Скопировать содержимое консоли в буфер обмена",[],this.copyConsoleContent); param1.registerCommand("cmd","clear","Очистить консоль",[],this.clearConsole); param1.registerCommand("cmd","e","Показать последний exception",[],this.showException); param1.registerCommand("console","height","Установить высоту консоли",[int],this.onConsoleHeight); param1.registerCommand("console","width","Установить ширину консоли",[int],this.onConsoleWidth); param1.registerCommand("console","halign","Выравнивание по горизонтали",[int],this.onHorizontalAlign); param1.registerCommand("console","valign","Выравнивание по вертикали",[int],this.onVerticalAlign); param1.registerCommand("console","alpha","Установить прозрачность консоли",[Number],this.onAlpha); param1.registerCommand("console","bg","Установить цвет фона",[uint],this.onBackgroundColor); param1.registerCommand("console","fg","Установить цвет шрифта",[uint],this.onForegroundColor); param1.registerCommand("vars","list","Посмотреть список переменных",[],this.showVarsList); param1.registerCommand("vars","show","Посмотреть переменную",[String],this.showVar); param1.registerCommand("vars","set","Установить значение переменной",[String,String],this.setVar); } private function setVar(param1:FormattedOutput, param2:String, param3:String) : void { var local5:String = null; var local6:String = null; var local4:ConsoleVar = this.variables[param2]; if(local4 != null) { local5 = local4.toString(); local6 = local4.acceptInput(param3); if(local6 == null) { param1.addText("New value " + local4.toString() + ", old value=" + local5); return; } throw new ConsoleVarChangeError(param2,param3,local6); } throw new ConsoleVarNotFoundError(param2); } private function showVar(param1:FormattedOutput, param2:String) : void { var local3:ConsoleVar = this.variables[param2]; if(local3 != null) { param1.addText(local3.toString()); return; } throw new ConsoleVarNotFoundError(param2); } private function showVarsList(param1:FormattedOutput) : void { var local2:String = null; for(local2 in this.variables) { param1.addText(local2); } } private function showException(param1:FormattedOutput) : void { if(Boolean(this.lastException)) { param1.addText(this.lastException.getStackTrace()); } } public function addVariable(param1:ConsoleVar) : void { this.variables[param1.getName()] = param1; } public function removeVariable(param1:String) : void { delete this.variables[param1]; } public function set horizontalAlignment(param1:int) : void { param1 = this.clamp(param1,1,3); this.align = this.align & ~3 | param1; this.updateAlignment(); } public function get horizontalAlignment() : int { return this.align & 3; } public function set vericalAlignment(param1:int) : void { param1 = this.clamp(param1,1,3); this.align = this.align & ~0x0C | param1 << 2; this.updateAlignment(); } public function get vericalAlignment() : int { return this.align >> 2 & 3; } public function addText(param1:String) : void { var local2:Boolean = this.buffer.size - this.topPageLine <= this.numPageLines; var local3:int = this.addLine(param1); if(local2) { this.scrollOutput(local3); } } public function addPrefixedText(param1:String, param2:String) : void { var local3:Boolean = this.buffer.size - this.topPageLine <= this.numPageLines; var local4:int = this.addPrefixedLine(param1,param2); if(local3) { this.scrollOutput(local4); } } public function addLines(param1:Vector.<String>) : void { var local3:int = 0; var local4:String = null; var local2:Boolean = this.buffer.size - this.topPageLine <= this.numPageLines; for each(local4 in param1) { local3 += this.addLine(local4); } if(local2) { this.scrollOutput(local3); } } public function addPrefixedLines(param1:String, param2:Vector.<String>) : void { var local4:int = 0; var local5:String = null; var local3:Boolean = this.buffer.size - this.topPageLine <= this.numPageLines; for each(local5 in param2) { local4 += this.addPrefixedLine(param1,local5); } if(local3) { this.scrollOutput(local4); } } public function show() : void { if(this.visible) { return; } this.stage.addChild(this.container); this.stage.focus = this.input; this.visible = true; this.onResize(null); this.scrollOutput(0); } public function hide() : void { if(this.stage == null) { return; } if(this.visible) { this.stage.removeChild(this.container); this.stage.focus = this.stage; this.visible = false; } } public function isVisible() : Boolean { return this.visible; } public function setSize(param1:int, param2:int) : void { param1 = this.clamp(param1,1,100); param2 = this.clamp(param2,1,100); if(param1 == this._widthPercent && param2 == this._heightPercent) { return; } this._widthPercent = param1; this._heightPercent = param2; this.updateSize(); this.updateAlignment(); } public function set width(param1:int) : void { this.setSize(param1,this._heightPercent); } public function get width() : int { return this._widthPercent; } public function set height(param1:int) : void { this.setSize(this._widthPercent,param1); } public function get height() : int { return this._heightPercent; } public function hideDelayed(param1:uint) : void { setTimeout(this.hide,param1); } public function executeCommand(param1:String) : void { var len:int; var text:String = param1; if(Boolean(text.match(/^\s*$/))) { return; } len = int(this.commandHistory.length); if(len == 0 || this.commandHistory[len - 1] != text) { this.commandHistory.push(text); } this.commandHistoryIndex = len + 1; try { this.commandService.execute(text,this); } catch(e:Error) { addText(e.message); lastException = e; } } public function set alpha(param1:Number) : void { this._alpha = param1; this.updateSize(); } public function get alpha() : Number { return this._alpha; } private function calcTextMetrics(param1:Stage) : void { var local2:TextField = new TextField(); local2.defaultTextFormat = DEFAULT_TEXT_FORMAT; local2.text = "j"; param1.addChild(local2); this.charWidth = local2.textWidth; this.charHeight = local2.textHeight + 4; param1.removeChild(local2); } private function initInput() : void { this.input = new TextField(); this.input.defaultTextFormat = DEFAULT_TEXT_FORMAT; this.input.height = INPUT_HEIGHT; this.input.type = TextFieldType.INPUT; this.input.background = true; this.input.backgroundColor = DEFAULT_BG_COLOR; this.input.border = true; this.input.borderColor = DEFAULT_FONT_COLOR; this.input.addEventListener(KeyboardEvent.KEY_DOWN,this.onInputKeyDown); this.input.addEventListener(KeyboardEvent.KEY_UP,this.onInputKeyUp); this.input.addEventListener(TextEvent.TEXT_INPUT,this.onTextInput); this.container.addChild(this.input); } private function initOutput() : void { this.outputContainer = new Sprite(); this.outputContainer.addEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel); this.container.addChild(this.outputContainer); } private function resizeOutput(param1:int, param2:int) : void { this.numPageLines = param2 / (this.charHeight + this.hSpacing); this.lineWidth = param1 / this.charWidth - 1; this.updateTextFields(param1); this.scrollOutput(0); var local3:Graphics = this.outputContainer.graphics; local3.clear(); local3.beginFill(this.consoleBackgroundColor,this._alpha); local3.drawRect(0,0,param1,param2); local3.endFill(); } private function updateTextFields(param1:int) : void { var local4:TextField = null; while(this.textFields.length > this.numPageLines) { this.outputContainer.removeChild(this.textFields.pop()); } while(this.textFields.length < this.numPageLines) { this.createTextField(); } var local2:int = this.charHeight + this.hSpacing; var local3:int = 0; while(local3 < this.textFields.length) { local4 = this.textFields[local3]; local4.y = local3 * local2; local4.width = param1; local3++; } } private function createTextField() : void { var local1:TextField = new TextField(); local1.height = this.charHeight; local1.defaultTextFormat = DEFAULT_TEXT_FORMAT; local1.tabEnabled = false; local1.selectable = true; this.outputContainer.addChild(local1); this.textFields.push(local1); } private function scrollOutput(param1:int) : void { this.topPageLine += param1; if(this.topPageLine + this.numPageLines > this.buffer.size) { this.topPageLine = this.buffer.size - this.numPageLines; } if(this.topPageLine < 0) { this.topPageLine = 0; } this.updateOutput(); } private function updateOutput() : void { if(this.container.parent != null) { this.printPage(); } } private function printPage() : void { var local2:int = 0; var local1:IStringBufferIterator = this.buffer.getIterator(this.topPageLine); while(local2 < this.numPageLines && Boolean(local1.hasNext())) { TextField(this.textFields[local2++]).text = local1.getNext(); } while(local2 < this.numPageLines) { TextField(this.textFields[local2++]).text = ""; } } private function onInputKeyDown(param1:KeyboardEvent) : void { if(this.isToggleKey(param1)) { this.preventInput = true; } switch(param1.keyCode) { case Keyboard.ENTER: this.processInput(); break; case Keyboard.ESCAPE: if(this.input.text != "") { this.input.text = ""; } else { this.hideDelayed(50); } break; case Keyboard.UP: this.historyUp(); break; case Keyboard.DOWN: this.historyDown(); break; case Keyboard.PAGE_UP: this.scrollOutput(-this.numPageLines); break; case Keyboard.PAGE_DOWN: this.scrollOutput(this.numPageLines); } param1.stopPropagation(); } private function onInputKeyUp(param1:KeyboardEvent) : void { if(!this.isToggleKey(param1)) { param1.stopPropagation(); } } private function onTextInput(param1:TextEvent) : void { if(this.preventInput) { param1.preventDefault(); this.preventInput = false; } } private function isToggleKey(param1:KeyboardEvent) : Boolean { return param1.keyCode == 75 && param1.ctrlKey && param1.shiftKey; } private function processInput() : void { this.scrollOutput(this.buffer.size); var local1:String = this.input.text; this.input.text = ""; this.addText("> " + local1); this.executeCommand(local1); } private function historyUp() : void { if(this.commandHistoryIndex == 0) { return; } --this.commandHistoryIndex; var local1:String = this.commandHistory[this.commandHistoryIndex]; this.input.text = local1 == null ? "" : local1; } private function historyDown() : void { ++this.commandHistoryIndex; if(this.commandHistoryIndex >= this.commandHistory.length) { this.commandHistoryIndex = this.commandHistory.length; this.input.text = ""; } else { this.input.text = this.commandHistory[this.commandHistoryIndex]; } } private function onKeyUp(param1:KeyboardEvent) : void { if(this.isToggleKey(param1)) { if(this.visible) { this.hide(); } else { this.show(); } } } private function onResize(param1:Event) : void { this.updateSize(); this.updateAlignment(); } private function addLine(param1:String) : int { var local2:int = 0; var local4:String = null; var local5:int = 0; var local3:Array = param1.split(LINE_SPLITTER); for each(local4 in local3) { if(!(Boolean(this.filter) && local4.indexOf(this.filter) < 0)) { local5 = 0; while(local5 < local4.length) { this.buffer.add(local4.substr(local5,this.lineWidth)); local2++; local5 += this.lineWidth; } } } return local2; } private function addPrefixedLine(param1:String, param2:String) : int { var local3:int = 0; var local6:String = null; var local7:int = 0; var local4:Array = param2.split(LINE_SPLITTER); var local5:int = this.lineWidth - param1.length; for each(local6 in local4) { if(!(Boolean(this.filter) && local6.indexOf(this.filter) < 0)) { local7 = 0; while(local7 < local6.length) { this.buffer.add(param1 + local6.substr(local7,local5)); local3++; local7 += local5; } } } return local3; } private function onMouseWheel(param1:MouseEvent) : void { this.scrollOutput(-param1.delta); } private function clamp(param1:int, param2:int, param3:int) : int { if(param1 < param2) { return param2; } if(param1 > param3) { return param3; } return param1; } private function updateSize() : void { var local1:int = 0.01 * this._heightPercent * this.stage.stageHeight; var local2:int = 0.01 * this._widthPercent * this.stage.stageWidth; var local3:int = local1 - INPUT_HEIGHT; this.resizeOutput(local2,local3); this.input.y = local3; this.input.width = local2; } private function updateAlignment() : void { var local1:int = this.align & 3; switch(local1) { case 1: this.container.x = 0; break; case 2: this.container.x = this.stage.stageWidth - this.container.width; break; case 3: this.container.x = this.stage.stageWidth - this.container.width >> 1; } var local2:int = this.align >> 2 & 3; switch(local2) { case 1: this.container.y = 0; break; case 2: this.container.y = this.stage.stageHeight - this.container.height; break; case 3: this.container.y = this.stage.stageHeight - this.container.height >> 1; } } private function onHide(param1:FormattedOutput) : void { this.hideDelayed(100); } private function copyConsoleContent(param1:FormattedOutput) : void { var local2:IStringBufferIterator = this.buffer.getIterator(0); var local3:String = "Console content:\r\n"; while(local2.hasNext()) { local3 += local2.getNext() + "\r\n"; } System.setClipboard(local3); this.addText("Content has been copied to clipboard"); } private function clearConsole(param1:FormattedOutput) : void { this.buffer.clear(); this.scrollOutput(0); } private function onHorizontalAlign(param1:FormattedOutput, param2:int) : void { this.horizontalAlignment = param2; } private function onVerticalAlign(param1:FormattedOutput, param2:int) : void { this.vericalAlignment = param2; } private function onConsoleWidth(param1:FormattedOutput, param2:int) : void { this.setSize(param2,this._heightPercent); } private function onConsoleHeight(param1:FormattedOutput, param2:int) : void { this.setSize(this._widthPercent,param2); } private function onAlpha(param1:FormattedOutput, param2:Number) : void { this.alpha = param2; } private function onBackgroundColor(param1:FormattedOutput, param2:uint) : void { this.updateSize(); this.input.backgroundColor = param2; param1.addText("Background color set to " + param2); } private function onForegroundColor(param1:FormattedOutput, param2:uint) : void { var local3:TextField = null; DEFAULT_TEXT_FORMAT.color = param2; this.input.textColor = param2; this.input.defaultTextFormat = DEFAULT_TEXT_FORMAT; for each(local3 in this.textFields) { local3.textColor = param2; local3.defaultTextFormat = DEFAULT_TEXT_FORMAT; } param1.addText("Foreground color set to " + param2); } private function printVars(param1:IConsole, param2:Array) : void { this.printVariables(param2[0],false); } private function printVarsValues(param1:IConsole, param2:Array) : void { this.printVariables(param2[0],true); } private function printVariables(param1:String, param2:Boolean) : void { var local4:String = null; var local5:ConsoleVar = null; var local6:String = null; var local3:Array = []; for(local4 in this.variables) { if(param1 == null || param1 == "" || local4.indexOf(param1) == 0) { local5 = this.variables[local4]; local3.push(param2 ? local4 + " = " + local5.toString() : local4); } } if(local3.length > 0) { local3.sort(); for each(local6 in local3) { this.addText(local6); } } } public function setCommandHandler(param1:String, param2:Function) : void { } public function removeCommandHandler(param1:String) : void { } } }
package alternativa.tanks.view.mainview.grouplist { import alternativa.tanks.view.mainview.grouplist.header.GroupHeader; import alternativa.tanks.view.mainview.grouplist.item.GroupUsersDataProvider; import alternativa.tanks.view.mainview.grouplist.item.GroupUsersListRenderer; import alternativa.types.Long; import controls.dropdownlist.DeleteEvent; import fl.controls.List; import flash.display.Sprite; import projects.tanks.client.battleselect.model.matchmaking.group.notify.MatchmakingUserData; import projects.tanks.client.battleselect.model.matchmaking.group.notify.MountItemsUserData; import projects.tanks.clients.fp10.libraries.tanksservices.service.matchmakinggroup.MatchmakingGroupService; import utils.ScrollStyleUtils; public class GroupList extends Sprite { [Inject] public static var matchmakingGroupService:MatchmakingGroupService; private var header:GroupHeader = new GroupHeader(); private var dataProvider:GroupUsersDataProvider; private var list:List; private var _width:Number; private var _height:Number; public function GroupList() { super(); this.init(); addChild(this.header); } public function resize(param1:Number, param2:Number) : void { this._width = param1; this._height = param2; this.header.width = this._width; this.list.y = 20; this.list.height = this._height - 20; var local3:Boolean = this.list.verticalScrollBar.visible > 0; this.list.width = local3 ? this._width + 7 : this._width - 1; } private function init() : void { this.list = new List(); this.list.rowHeight = 20; this.list.setStyle("cellRenderer",GroupUsersListRenderer); this.list.focusEnabled = true; this.list.selectable = false; ScrollStyleUtils.setGreenStyle(this.list); this.dataProvider = new GroupUsersDataProvider(); this.list.dataProvider = this.dataProvider; addEventListener(DeleteEvent.REMOVED,this.onUserDeleteClick); addChild(this.list); } private function onUserDeleteClick(param1:DeleteEvent) : void { var local2:Long = param1.data.id; matchmakingGroupService.removeUserFromGroup(local2); } public function addUser(param1:MatchmakingUserData) : void { this.dataProvider.addUser(param1); this.resize(this._width,this._height); } public function removeUser(param1:Long) : void { this.dataProvider.removeUser(param1); this.resize(this._width,this._height); } public function showUserReady(param1:Long) : void { this.dataProvider.setUserReady(param1); } public function showUserNotReady(param1:Long) : void { this.dataProvider.setUserNotReady(param1); } public function updateMountedItem(param1:MountItemsUserData) : void { this.dataProvider.updateMountedItem(param1); } public function isEveryoneReady() : Boolean { return this.dataProvider.isEveryoneReady(); } public function fillMembersList(param1:Vector.<MatchmakingUserData>) : void { var local2:MatchmakingUserData = null; for each(local2 in param1) { this.dataProvider.addUser(local2); } this.resize(this._width,this._height); } public function removeAllUsers() : void { this.dataProvider.removeAllUsers(); this.resize(this._width,this._height); } } }
package alternativa.tanks.models.tank.armor { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class ArmorEvents implements Armor { private var object:IGameObject; private var impl:Vector.<Object>; public function ArmorEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getMaxHealth() : int { var result:int = 0; var i:int = 0; var m:Armor = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = Armor(this.impl[i]); result = int(m.getMaxHealth()); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.model.shop.items.base { import alternativa.tanks.model.shop.event.ShopItemChosen; import controls.base.LabelBase; import flash.events.MouseEvent; public class ShopItemBase extends ButtonItemBase { protected static const WIDTH:int = 279; protected static const HEIGHT:int = 143; protected var itemId:String; public function ShopItemBase(itemId:String, param2:ButtonItemSkin) { this.itemId = itemId; addEventListener(MouseEvent.CLICK,this.onMouseClick); super(param2); } protected function fixChineseCurrencyLabelRendering(param1:LabelBase) : void { } private function onMouseClick(param1:MouseEvent) : void { dispatchEvent(new ShopItemChosen(this.itemId,gridPosition)); } override public function get width() : Number { return WIDTH; } override public function get height() : Number { return HEIGHT; } override public function destroy() : void { super.destroy(); removeEventListener(MouseEvent.CLICK,this.onMouseClick); } public function activateDisabledFilter() : void { alpha = 0.9; } } }
package alternativa.tanks.model.item.drone { import alternativa.tanks.service.battery.BatteriesService; import platform.client.fp10.core.model.ObjectLoadListener; import projects.tanks.client.garage.models.item.drone.HasBatteriesNotifyModelBase; import projects.tanks.client.garage.models.item.drone.IHasBatteriesNotifyModelBase; [ModelInfo] public class HasBatteriesNotifyModel extends HasBatteriesNotifyModelBase implements IHasBatteriesNotifyModelBase, ObjectLoadListener { [Inject] public static var batteryService:BatteriesService; public function HasBatteriesNotifyModel() { super(); } public function objectLoaded() : void { batteryService.setHasBatteries(getInitParam().hasBatteries); } public function setHasBatteries(param1:Boolean) : void { batteryService.setHasBatteries(param1); } } }
package alternativa.tanks.model.bonus.showing.detach { import flash.events.Event; import platform.client.fp10.core.type.IGameObject; import projects.tanks.clients.flash.commons.models.detach.Detach; public class BonusDetach { private var object:IGameObject; public function BonusDetach(param1:IGameObject) { super(); this.object = param1; } public function detach(param1:Event = null) : void { Detach(this.object.adapt(Detach)).detach(); } } }
package alternativa.tanks.services.spectatorservice { public interface SpectatorService { function getUserTitlesVisible() : Boolean; function setUserTitlesVisible(param1:Boolean) : void; } }
package alternativa.tanks.models.battle.tdm { import alternativa.physics.Body; import alternativa.tanks.battle.TeamDMTargetEvaluator; import alternativa.tanks.battle.objects.tank.Tank; import alternativa.tanks.models.weapon.shared.RailgunTargetEvaluator; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; public class TDMRailgunTargetEvaluator implements RailgunTargetEvaluator, TeamDMTargetEvaluator { private var localTeamType:BattleTeam; public function TDMRailgunTargetEvaluator() { super(); } public function setLocalTeamType(param1:BattleTeam) : void { this.localTeamType = param1; } public function getHitEfficiency(param1:Body) : Number { var local2:Tank = param1.tank; if(local2.health <= 0) { return 0; } if(local2.isSameTeam(this.localTeamType)) { return 0; } return 1; } public function isFriendly(param1:Body) : Boolean { var local2:Tank = param1.tank; return local2.isSameTeam(this.localTeamType); } } }
package _codec.projects.tanks.client.garage.models.item.itempersonaldiscount { 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.itempersonaldiscount.ItemPersonalDiscountCC; public class VectorCodecItemPersonalDiscountCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecItemPersonalDiscountCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(ItemPersonalDiscountCC,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.<ItemPersonalDiscountCC> = new Vector.<ItemPersonalDiscountCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = ItemPersonalDiscountCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:ItemPersonalDiscountCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<ItemPersonalDiscountCC> = Vector.<ItemPersonalDiscountCC>(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.entrance.model.users.antiaddiction { public class ChangeIdNumberResult { public static const OK:ChangeIdNumberResult = new ChangeIdNumberResult(0,"OK"); public static const ID_IS_ALREADY_CORRECT:ChangeIdNumberResult = new ChangeIdNumberResult(1,"ID_IS_ALREADY_CORRECT"); public static const ID_IS_INCORRECT:ChangeIdNumberResult = new ChangeIdNumberResult(2,"ID_IS_INCORRECT"); public static const NAME_IS_INCORRECT:ChangeIdNumberResult = new ChangeIdNumberResult(3,"NAME_IS_INCORRECT"); private var _value:int; private var _name:String; public function ChangeIdNumberResult(param1:int, param2:String) { super(); this._value = param1; this._name = param2; } public static function get values() : Vector.<ChangeIdNumberResult> { var local1:Vector.<ChangeIdNumberResult> = new Vector.<ChangeIdNumberResult>(); local1.push(OK); local1.push(ID_IS_ALREADY_CORRECT); local1.push(ID_IS_INCORRECT); local1.push(NAME_IS_INCORRECT); return local1; } public function toString() : String { return "ChangeIdNumberResult [" + this._name + "]"; } public function get value() : int { return this._value; } public function get name() : String { return this._name; } } }
package alternativa.tanks.models.weapon.shared.shot { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class WeaponReloadTimeChangedListenerEvents implements WeaponReloadTimeChangedListener { private var object:IGameObject; private var impl:Vector.<Object>; public function WeaponReloadTimeChangedListenerEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function weaponReloadTimeChanged(param1:int, param2:int) : void { var i:int = 0; var m:WeaponReloadTimeChangedListener = null; var previousReloadTime:int = param1; var actualReloadTime:int = param2; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = WeaponReloadTimeChangedListener(this.impl[i]); m.weaponReloadTimeChanged(previousReloadTime,actualReloadTime); i++; } } finally { Model.popObject(); } } } }
package alternativa.tanks.loader { import mx.core.BitmapAsset; [ExcludeClass] public class LoaderWindow_bitmapWindowBig extends BitmapAsset { public function LoaderWindow_bitmapWindowBig() { super(); } } }
package alternativa.proplib.objects { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Face; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.loaders.Parser3DS; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.Mesh; import alternativa.engine3d.objects.Occluder; import alternativa.proplib.utils.TextureByteDataMap; import alternativa.utils.ByteArrayMap; import alternativa.utils.textureutils.TextureByteData; import flash.utils.ByteArray; public class PropMesh extends PropObject { public static const DEFAULT_TEXTURE:String = "$$$_DEFAULT_TEXTURE_$$$"; public static var threshold:Number = 0.01; public static var occluderDistanceThreshold:Number = 0.01; public static var occluderAngleThreshold:Number = 0.01; public static var occluderConvexThreshold:Number = 0.01; public static var occluderUvThreshold:int = 1; public static var meshDistanceThreshold:Number = 0.001; public static var meshUvThreshold:Number = 0.001; public static var meshAngleThreshold:Number = 0.001; public static var meshConvexThreshold:Number = 0.01; public var textures:TextureByteDataMap; public var occluders:Vector.<Occluder>; public function PropMesh(modelData:ByteArray, objectName:String, textureFiles:Object, files:ByteArrayMap, imageMap:TextureByteDataMap) { super(PropObjectType.MESH); this.parseModel(modelData,objectName,textureFiles,files,imageMap); } private function parseModel(modelData:ByteArray, objectName:String, textureFiles:Object, files:ByteArrayMap, imageMap:TextureByteDataMap) : void { var textureName:* = null; var textureFileName:String = null; var textureByteData:TextureByteData = null; var mesh:Mesh = this.processObjects(modelData,objectName); this.initMesh(mesh); this.object = mesh; var defaultTextureFileName:String = this.getTextureFileName(mesh); if(defaultTextureFileName == null && textureFiles == null) { throw new Error("PropMesh: no textures found"); } if(textureFiles == null) { textureFiles = {}; } if(defaultTextureFileName != null) { textureFiles[PropMesh.DEFAULT_TEXTURE] = defaultTextureFileName; } this.textures = new TextureByteDataMap(); for(textureName in textureFiles) { textureFileName = textureFiles[textureName]; if(imageMap == null) { textureByteData = new TextureByteData(files.getValue(textureFileName),null); } else { textureByteData = imageMap.getValue(textureFileName); } this.textures.putValue(textureName,textureByteData); } } private function processObjects(modelData:ByteArray, objectName:String) : Mesh { var currObject:Object3D = null; var currObjectName:String = null; modelData.position = 0; var parser:Parser3DS = new Parser3DS(); parser.parse(modelData); var objects:Vector.<Object3D> = parser.objects; var numObjects:int = objects.length; var mesh:Mesh = null; for(var i:int = 0; i < numObjects; i++) { currObject = objects[i]; currObjectName = currObject.name.toLowerCase(); if(currObjectName.indexOf("occl") == 0) { this.addOccluder(Mesh(currObject)); } else if(objectName == currObjectName) { mesh = Mesh(currObject); } } return mesh != null ? mesh : Mesh(objects[0]); } private function getTextureFileName(mesh:Mesh) : String { var material:TextureMaterial = null; var face:Face = mesh.alternativa3d::faceList; while(face != null) { material = face.material as TextureMaterial; if(material != null) { return material.diffuseMapURL; } face = face.alternativa3d::next; } return null; } private function addOccluder(mesh:Mesh) : void { mesh.weldVertices(occluderDistanceThreshold,occluderUvThreshold); mesh.weldFaces(occluderAngleThreshold,occluderUvThreshold,occluderConvexThreshold); var occluder:Occluder = new Occluder(); occluder.createForm(mesh); occluder.x = mesh.x; occluder.y = mesh.y; occluder.z = mesh.z; occluder.rotationX = mesh.rotationX; occluder.rotationY = mesh.rotationY; occluder.rotationZ = mesh.rotationZ; if(this.occluders == null) { this.occluders = new Vector.<Occluder>(); } this.occluders.push(occluder); } private function initMesh(mesh:Mesh) : void { mesh.weldVertices(meshDistanceThreshold,meshUvThreshold); mesh.weldFaces(meshAngleThreshold,meshUvThreshold,meshConvexThreshold); mesh.threshold = threshold; } override public function traceProp() : void { var textureName:* = null; var textureData:TextureByteData = null; super.traceProp(); for(textureName in this.textures) { textureData = this.textures[textureName]; } } } }
package forms { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.CloseOrBackButton_closeButtonClass.png")] public class CloseOrBackButton_closeButtonClass extends BitmapAsset { public function CloseOrBackButton_closeButtonClass() { super(); } } }
package alternativa.tanks.model.payment.shop.kit { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.panel.model.shop.kitpackage.KitPackageItemInfo; public class KitPackageAdapt implements KitPackage { private var object:IGameObject; private var impl:KitPackage; public function KitPackageAdapt(param1:IGameObject, param2:KitPackage) { super(); this.object = param1; this.impl = param2; } public function getName() : String { var result:String = null; try { Model.object = this.object; result = this.impl.getName(); } finally { Model.popObject(); } return result; } public function getItemInfos() : Vector.<KitPackageItemInfo> { var result:Vector.<KitPackageItemInfo> = null; try { Model.object = this.object; result = this.impl.getItemInfos(); } finally { Model.popObject(); } return result; } } }
package alternativa.osgi.service.mainContainer { import alternativa.init.OSGi; import alternativa.osgi.service.console.IConsoleService; import alternativa.osgi.service.focus.IFocusListener; import alternativa.osgi.service.focus.IFocusService; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.DisplayObjectContainer; import flash.display.Sprite; import flash.display.Stage; import flash.events.TimerEvent; import flash.geom.ColorTransform; import flash.utils.Timer; public class MainContainerService implements IMainContainerService, IFocusListener { private var _stage:Stage; private var mainContainerParentSprite:DisplayObjectContainer; private var _mainContainer:DisplayObjectContainer; private var _backgroundLayer:DisplayObjectContainer; private var _contentLayer:DisplayObjectContainer; private var _contentUILayer:DisplayObjectContainer; private var _systemLayer:DisplayObjectContainer; private var _systemUILayer:DisplayObjectContainer; private var _dialogsLayer:DisplayObjectContainer; private var _noticesLayer:DisplayObjectContainer; private var _cursorLayer:DisplayObjectContainer; private var haltDelay:int = 1000; private var haltDelayTimer:Timer; private var haltAnimTimer:Timer; private var screenShotContainer:Sprite; private var screenShot:Bitmap; public function MainContainerService(s:Stage, container:DisplayObjectContainer) { super(); this._stage = s; this._mainContainer = container; this.mainContainerParentSprite = this._mainContainer.parent; this._backgroundLayer = this.addLayerSprite(); this._contentLayer = this.addLayerSprite(); this._contentUILayer = this.addLayerSprite(); this._systemLayer = this.addLayerSprite(); this._systemUILayer = this.addLayerSprite(); this._dialogsLayer = this.addLayerSprite(); this._noticesLayer = this.addLayerSprite(); this._cursorLayer = this.addLayerSprite(); (OSGi.osgi.getService(IFocusService) as IFocusService).addFocusListener(this); this.haltDelayTimer = new Timer(this.haltDelay,1); this.haltDelayTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.startHaltAnim); this.haltAnimTimer = new Timer(100,10); this.haltAnimTimer.addEventListener(TimerEvent.TIMER,this.onTimerTick); this.haltAnimTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onTimerComplete); } private function addLayerSprite() : Sprite { var sprite:Sprite = null; sprite = new Sprite(); sprite.mouseEnabled = true; sprite.tabEnabled = true; sprite.focusRect = false; this.mainContainer.addChild(sprite); return sprite; } public function focusIn(focusedObject:Object) : void { } public function focusOut(exfocusedObject:Object) : void { } public function deactivate() : void { } public function activate() : void { } private function startHaltAnim(e:TimerEvent) : void { this.haltDelayTimer.stop(); var bd:BitmapData = new BitmapData(this._stage.stageWidth,this._stage.stageHeight,false,2829082); bd.draw(this._stage); this.screenShotContainer = new Sprite(); this.screenShotContainer.mouseEnabled = true; this.screenShotContainer.tabEnabled = true; this.mainContainerParentSprite.addChild(this.screenShotContainer); this.screenShot = new Bitmap(bd); this.screenShotContainer.addChild(this.screenShot); this.haltAnimTimer.reset(); this.haltAnimTimer.start(); } private function onTimerTick(e:TimerEvent) : void { var consoleService:IConsoleService = OSGi.osgi.getService(IConsoleService) as IConsoleService; consoleService.writeToConsoleChannel("OSGI","MainContainerService onTimerTick"); var k:Number = 1 - 0.6 * (this.haltAnimTimer.currentCount / this.haltAnimTimer.repeatCount); this.screenShotContainer.transform.colorTransform = new ColorTransform(k,k,k,1); } private function onTimerComplete(e:TimerEvent) : void { this.haltAnimTimer.stop(); this._stage.frameRate = 0.1; var consoleService:IConsoleService = OSGi.osgi.getService(IConsoleService) as IConsoleService; consoleService.writeToConsoleChannel("OSGI","MainContainerService onTimerComplete"); } public function get stage() : Stage { return this._stage; } public function get mainContainer() : DisplayObjectContainer { return this._mainContainer; } public function get backgroundLayer() : DisplayObjectContainer { return this._backgroundLayer; } public function get contentLayer() : DisplayObjectContainer { return this._contentLayer; } public function get contentUILayer() : DisplayObjectContainer { return this._contentUILayer; } public function get systemLayer() : DisplayObjectContainer { return this._systemLayer; } public function get systemUILayer() : DisplayObjectContainer { return this._systemUILayer; } public function get dialogsLayer() : DisplayObjectContainer { return this._dialogsLayer; } public function get noticesLayer() : DisplayObjectContainer { return this._noticesLayer; } public function get cursorLayer() : DisplayObjectContainer { return this._cursorLayer; } } }
package assets.slider { import flash.display.BitmapData; [Embed(source="/_assets/assets.slider.slider_TRACK_CENTER.png")] public dynamic class slider_TRACK_CENTER extends BitmapData { public function slider_TRACK_CENTER(param1:int = 30, param2:int = 30) { super(param1,param2); } } }
package projects.tanks.client.battlefield.models.battle.battlefield.billboard.billboardimage { 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 BillboardImageModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function BillboardImageModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package alternativa.tanks.models.tank { import alternativa.tanks.battle.objects.tank.Tank; import platform.client.fp10.core.type.IGameObject; public interface LocalTankInfoService { function isLocalTankLoaded() : Boolean; function getLocalTankObject() : IGameObject; function getLocalTankObjectOrNull() : IGameObject; function getLocalTank() : Tank; } }
package projects.tanks.client.garage.models.item.drone { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class DroneModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:DroneModelServer; private var client:IDroneModelBase = IDroneModelBase(this); private var modelId:Long = Long.getLong(627088635,-688861677); public function DroneModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new DroneModelServer(IModel(this)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { var local3:* = param1; switch(false ? 0 : 0) { } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.panel.model.shopabonement { 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 ActiveShopAbonementsModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function ActiveShopAbonementsModelServer(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.gui { import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.model.bonus.showing.detach.BonusDetach; import assets.icons.GarageItemBackground; import controls.TankWindowInner; import controls.base.DefaultButtonBase; import controls.base.LabelBase; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Sprite; import flash.events.MouseEvent; import flash.geom.Point; import forms.TankWindowWithHeader; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.panel.model.bonus.showing.items.BonusItemCC; import projects.tanks.clients.fp10.libraries.TanksLocale; import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow; public class RepatriateBonusWindow extends DialogWindow { [Inject] public static var localeService:ILocaleService; private static const WINDOW_MARGIN:int = 12; private static const MARGIN:int = 9; private static const BUTTON_SIZE:Point = new Point(104,33); private static const SPACE:int = 8; private var inner:TankWindowInner; private var closeButton:DefaultButtonBase; private var messageLabel:LabelBase; private var windowSize:Point; private var windowWidth:int = 450; private var itemsContainer:Sprite; private var _gameObject:IGameObject; public function RepatriateBonusWindow(param1:IGameObject, param2:BitmapData, param3:String, param4:Vector.<BonusItemCC>) { var local6:int = 0; var local7:TankWindowWithHeader = null; var local11:PreviewBonusItem = null; var local12:int = 0; var local13:int = 0; super(); this._gameObject = param1; var local5:GarageItemBackground = new GarageItemBackground(GarageItemBackground.ENGINE_NORMAL); if(param4.length == 1) { local6 = 1; } else if(param4.length <= 4) { local6 = 2; } else if(param4.length <= 6) { local6 = 3; } else { local6 = 4; } this.itemsContainer = new Sprite(); this.windowWidth = local5.width + WINDOW_MARGIN * 2 + MARGIN * 2 + (local5.width + SPACE) * (local6 - 1); this.messageLabel = new LabelBase(); this.messageLabel.wordWrap = true; this.messageLabel.multiline = true; this.messageLabel.text = param3; this.messageLabel.size = 12; this.messageLabel.color = 5898034; this.messageLabel.x = WINDOW_MARGIN * 2; this.messageLabel.y = 110 + WINDOW_MARGIN * 2; this.messageLabel.width = this.windowWidth - WINDOW_MARGIN * 4; this.windowSize = new Point(this.windowWidth,110 + this.messageLabel.height + BUTTON_SIZE.y + WINDOW_MARGIN * 3 + MARGIN * 3); local7 = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_WELCOME_BACK,this.windowSize.x,this.windowSize.y); addChild(local7); this.inner = new TankWindowInner(0,0,TankWindowInner.GREEN); addChild(this.inner); this.inner.x = WINDOW_MARGIN; this.inner.y = WINDOW_MARGIN; this.inner.width = this.windowSize.x - WINDOW_MARGIN * 2; this.inner.height = this.windowSize.y - WINDOW_MARGIN - MARGIN * 2 - BUTTON_SIZE.y + 2; var local8:Bitmap = new Bitmap(param2); local8.y = WINDOW_MARGIN * 2; local8.x = this.inner.width - local8.width >> 1; this.inner.addChild(local8); addChild(this.messageLabel); addChild(this.itemsContainer); var local9:int = int(param4.length / local6) + 1; var local10:int = 0; while(local10 < param4.length) { local5 = new GarageItemBackground(GarageItemBackground.ENGINE_NORMAL); this.itemsContainer.addChild(local5); local11 = new PreviewBonusItem(param4[local10].resource,local5.width,local5.height); this.itemsContainer.addChild(local11); if(int(local10 / local6) + 1 == local9) { local12 = param4.length - (local9 - 1) * local6; local13 = (local6 - local12) * (local5.width + SPACE >> 1); local5.x = int(local10 % local6) * (local5.width + SPACE) + local13; } else { local5.x = int(local10 % local6) * (local5.width + SPACE); } local5.y = (local5.height + SPACE) * int(local10 / local6); local11.x = local5.x; local11.y = local5.y; local10++; } this.windowSize.y += this.itemsContainer.height; this.closeButton = new DefaultButtonBase(); addChild(this.closeButton); this.closeButton.label = localeService.getText(TanksLocale.TEXT_FREE_BONUSES_WINDOW_BUTTON_CLOSE_TEXT); this.closeButton.y = this.windowSize.y - MARGIN - BUTTON_SIZE.y - 2; this.placeItems(); local7.height = this.windowSize.y; local7.width = this.windowSize.x; this.closeButton.addEventListener(MouseEvent.CLICK,this.onCloseBonusClick); dialogService.enqueueDialog(this); } private function placeItems() : void { this.messageLabel.width = this.windowWidth - WINDOW_MARGIN * 4; this.itemsContainer.y = this.messageLabel.y + this.messageLabel.height + WINDOW_MARGIN; this.itemsContainer.x = this.windowSize.x - this.itemsContainer.width >> 1; this.inner.width = this.windowSize.x - WINDOW_MARGIN * 2; this.inner.height = this.windowSize.y - WINDOW_MARGIN - MARGIN * 2 - BUTTON_SIZE.y + 2; this.closeButton.x = this.windowSize.x - BUTTON_SIZE.x >> 1; } private function onCloseBonusClick(param1:MouseEvent = null) : void { this.destroy(); } public function destroy() : void { var local1:BonusDetach = null; this.closeButton.removeEventListener(MouseEvent.CLICK,this.onCloseBonusClick); dialogService.removeDialog(this); if(this._gameObject != null) { local1 = new BonusDetach(this._gameObject); local1.detach(); this._gameObject = null; } } override protected function cancelKeyPressed() : void { this.onCloseBonusClick(); } override protected function confirmationKeyPressed() : void { this.onCloseBonusClick(); } } }
package projects.tanks.client.panel.model.newbiesabonement { public interface INewbiesAbonementShowInfoModelBase { function showInfoWindow(param1:int, param2:int, param3:int) : void; } }
package projects.tanks.clients.fp10.libraries.tanksservices.service.layout { public class LobbyLayoutServiceEvents { public static const BEGIN_LAYOUT_SWITCH:String = "LobbyLayoutServiceEvent.BEGIN_LAYOUT_SWITCH"; public static const END_LAYOUT_SWITCH:String = "LobbyLayoutServiceEvent.END_LAYOUT_SWITCH"; public function LobbyLayoutServiceEvents() { super(); } } }
package alternativa.tanks.gui.shopitems.item.kits.description { import projects.tanks.client.panel.model.shop.kitpackage.KitPackageItemInfo; public class KitsData { public var info:Vector.<KitPackageItemInfo>; public var discount:int; public function KitsData(kitInfo:Vector.<KitPackageItemInfo>, sale:int) { super(); this.info = kitInfo; this.discount = sale; } } }
package projects.tanks.client.panel.model.shop.kitview { 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 KitViewResourceModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function KitViewResourceModelServer(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.gui.friends.list.renderer.background { import alternativa.tanks.gui.friends.list.ClanMembersList; public class RendererBackGroundClanMembersList extends RendererBackGroundAcceptedList { public function RendererBackGroundClanMembersList(param1:Boolean, param2:Boolean = false) { super(param1,param2); } override protected function isScroll() : Boolean { return ClanMembersList.scrollOn; } } }
package controls.buttons.h30px { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.buttons.h30px.H30ButtonSkin_disableRightClass.png")] public class H30ButtonSkin_disableRightClass extends BitmapAsset { public function H30ButtonSkin_disableRightClass() { super(); } } }
package controls.resultassets { import assets.resultwindow.bres_SELECTED_GREEN_PIXEL; import assets.resultwindow.bres_SELECTED_GREEN_TL; import controls.statassets.StatLineBase; public class ResultWindowGreenSelected extends StatLineBase { public function ResultWindowGreenSelected() { super(); tl = new bres_SELECTED_GREEN_TL(1,1); px = new bres_SELECTED_GREEN_PIXEL(1,1); frameColor = 5898034; } } }
package alternativa.tanks.models.battlefield.mine { import alternativa.console.ConsoleVarFloat; import alternativa.engine3d.core.Sorting; import alternativa.engine3d.materials.Material; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.Mesh; import alternativa.init.Main; import alternativa.math.Vector3; import alternativa.model.IModel; import alternativa.model.IObjectLoadListener; import alternativa.object.ClientObject; import alternativa.osgi.service.dump.IDumpService; import alternativa.osgi.service.dump.dumper.IDumper; import alternativa.physics.Contact; import alternativa.physics.collision.ICollisionDetector; import alternativa.physics.collision.primitives.CollisionBox; import alternativa.physics.collision.primitives.CollisionSphere; import alternativa.physics.collision.types.RayIntersection; import alternativa.resource.StubBitmapData; import alternativa.service.IModelService; import alternativa.service.IResourceService; import alternativa.tanks.engine3d.MaterialSequence; import alternativa.tanks.engine3d.MaterialType; import alternativa.tanks.models.battlefield.BattlefieldData; import alternativa.tanks.models.battlefield.BattlefieldModel; import alternativa.tanks.models.battlefield.IBattleField; import alternativa.tanks.models.battlefield.IBattlefieldPlugin; import alternativa.tanks.models.ctf.CTFModel; import alternativa.tanks.models.dom.DOMModel; import alternativa.tanks.models.dom.IDOMModel; import alternativa.tanks.models.inventory.IInventory; import alternativa.tanks.models.inventory.InventoryItemType; import alternativa.tanks.models.inventory.InventoryLock; import alternativa.tanks.models.tank.ITank; import alternativa.tanks.models.tank.TankData; import alternativa.tanks.models.weapon.WeaponConst; import alternativa.tanks.physics.CollisionGroup; import alternativa.tanks.services.materialregistry.IMaterialRegistry; import alternativa.tanks.services.objectpool.IObjectPoolService; import alternativa.tanks.sfx.AnimatedSpriteEffect; import alternativa.tanks.sfx.Sound3D; import alternativa.tanks.sfx.Sound3DEffect; import alternativa.tanks.sfx.SoundOptions; import com.alternativaplatform.projects.tanks.client.models.battlefield.mine.BattleMine; import com.alternativaplatform.projects.tanks.client.models.battlefield.mine.BattleMinesModelBase; import com.alternativaplatform.projects.tanks.client.models.battlefield.mine.IBattleMinesModelBase; import com.alternativaplatform.projects.tanks.client.models.ctf.ICaptureTheFlagModelBase; import flash.display.BitmapData; import flash.media.Sound; import flash.utils.Dictionary; import projects.tanks.client.battleservice.model.team.BattleTeamType; import scpacker.networking.INetworker; import scpacker.networking.Network; import scpacker.resource.ResourceType; import scpacker.resource.ResourceUtil; import scpacker.resource.SoundResource; import scpacker.resource.images.ImageResource; public class BattleMinesModel extends BattleMinesModelBase implements IBattleMinesModelBase, IObjectLoadListener, IBattlefieldPlugin, IDumper { private static var objectPoolService:IObjectPoolService = IObjectPoolService(Main.osgi.getService(IObjectPoolService)); private static const MAIN_EXPLOSION_FRAME_WIDTH:int = 300; private static const IDLE_EXPLOSION_FRAME_WIDTH:int = 100; private static const DECAL_RADIUS:Number = 200; private static var mainExplosionScale:ConsoleVarFloat = new ConsoleVarFloat("mine_main_scale",3,0.1,10); private static var idleExplosionScale:ConsoleVarFloat = new ConsoleVarFloat("mine_idle_scale",3,0.1,10); private static var mainExplosionFPS:ConsoleVarFloat = new ConsoleVarFloat("mine_main_fps",30,1,50); private static var idleExplosionFPS:ConsoleVarFloat = new ConsoleVarFloat("mine_idle_fps",30,1,50); private static var materialRegistry:IMaterialRegistry; [Embed(source="890.png")] private static const DECAL:Class; private var battlefieldModel:IBattleField; private var ctfModel:CTFModel; private var domModel:DOMModel; private var inventoryModel:IInventory; private var tankModel:ITank; private var bfData:BattlefieldData; private var mineModelData:MineModelData; private var minesByUser:Dictionary; private var minesOnFieldById:Dictionary; private var mineProximityRadius:Number; private var deferredMines:Vector.<BattleMine>; private var redMineMaterial:TextureMaterial; private var blueMineMaterial:TextureMaterial; private var friendlyMineMaterial:TextureMaterial; private var enemyMineMaterial:TextureMaterial; private var referenceMesh:Mesh; private var mainExplosionSequence:MaterialSequence; private var mainExplosionFrameSize:FrameSize; private var idleExplosionSequence:MaterialSequence; private var idleExplosionFrameSize:FrameSize; private var mineArmedSound:Sound; private var explosionSound:Sound; private var deactivationSound:Sound; private var impactForce:Number; private var minDistanceFromBaseSquared:Number; private var rayDirection:Vector3; private var intersection:RayIntersection; private var contact:Contact; private const projectionOrigin:Vector3 = new Vector3(); private var explosionMarkMaterial:TextureMaterial; public function BattleMinesModel() { this.mineModelData = new MineModelData(); this.minesByUser = new Dictionary(); this.minesOnFieldById = new Dictionary(); this.mainExplosionFrameSize = new FrameSize(); this.idleExplosionFrameSize = new FrameSize(); this.rayDirection = new Vector3(0,0,-1); this.intersection = new RayIntersection(); this.contact = new Contact(0); super(); _interfaces.push(IModel,IBattleMinesModelBase,IObjectLoadListener); MineExplosionCameraEffect.initVars(); IDumpService(Main.osgi.getService(IDumpService)).registerDumper(this); this.explosionMarkMaterial = new TextureMaterial(new DECAL().bitmapData); } public function initObject(clientObject:ClientObject, activationSoundId:String, activationTimeMsec:int, blueMineTextureId:String, deactivationSoundId:String, enemyMineTextureId:String, explosionSoundId:String, farVisibilityRadius:Number, friendlyMineTextureId:String, idleExplosionTextureId:String, impactForce:Number, mainExplosionTextureId:String, minDistanceFromBase:Number, modelId:String, nearVisibilityRadius:Number, radius:Number, redMineTextureId:String) : void { materialRegistry = IMaterialRegistry(Main.osgi.getService(IMaterialRegistry)); this.mineModelData.armingDuration = activationTimeMsec; this.mineModelData.armedFlashDuration = 100; this.mineModelData.armedFlashFadeDuration = 300; this.mineModelData.flashChannelOffset = 204; this.mineModelData.farRadius = farVisibilityRadius * 100; this.mineModelData.nearRadius = nearVisibilityRadius * 100; this.mineProximityRadius = radius * 100; this.impactForce = impactForce; this.minDistanceFromBaseSquared = minDistanceFromBase * minDistanceFromBase * 10000; var resourceService:IResourceService = IResourceService(Main.osgi.getService(IResourceService)); this.mineArmedSound = this.getSound(activationSoundId,resourceService); this.explosionSound = this.getSound(explosionSoundId,resourceService); this.deactivationSound = this.getSound(deactivationSoundId,resourceService); this.initReferenceMesh(Mesh(ResourceUtil.getResource(ResourceType.MODEL,modelId).mesh)); var initParams:InitParams = new InitParams(blueMineTextureId,redMineTextureId,enemyMineTextureId,friendlyMineTextureId,idleExplosionTextureId,mainExplosionTextureId); clientObject.putParams(BattleMinesModel,initParams); } public function initMines(clientObject:ClientObject, mines:Array) : void { if(mines != null) { this.deferredMines = Vector.<BattleMine>(mines); } } public function objectLoaded(clientObject:ClientObject) : void { var modelService:IModelService = IModelService(Main.osgi.getService(IModelService)); this.battlefieldModel = IBattleField(modelService.getModelsByInterface(IBattleField)[0]); this.ctfModel = CTFModel(Main.osgi.getService(ICaptureTheFlagModelBase)); this.domModel = DOMModel(Main.osgi.getService(IDOMModel)); this.inventoryModel = IInventory(modelService.getModelsByInterface(IInventory)[0]); this.tankModel = ITank(modelService.getModelsByInterface(ITank)[0]); this.bfData = this.battlefieldModel.getBattlefieldData(); this.battlefieldModel.addPlugin(this); var resourceService:IResourceService = IResourceService(Main.osgi.getService(IResourceService)); var initParams:InitParams = InitParams(clientObject.getParams(BattleMinesModel)); this.mainExplosionSequence = this.getExplosionMaterialSequence(initParams.mainExplosionTextureId,MAIN_EXPLOSION_FRAME_WIDTH,1,resourceService,this.mainExplosionFrameSize); this.idleExplosionSequence = this.getExplosionMaterialSequence(initParams.idleExplosionTextureId,IDLE_EXPLOSION_FRAME_WIDTH,1,resourceService,this.idleExplosionFrameSize); this.redMineMaterial = this.getTextureMaterial(initParams.redMineTextureId,1,resourceService); this.blueMineMaterial = this.getTextureMaterial(initParams.blueMineTextureId,1,resourceService); this.friendlyMineMaterial = this.getTextureMaterial(initParams.friendlyMineTextureId,1,resourceService); this.enemyMineMaterial = this.getTextureMaterial(initParams.enemyMineTextureId,1,resourceService); var bfModel:BattlefieldModel = BattlefieldModel(Main.osgi.getService(IBattleField)); if(bfModel.blacklist.indexOf(this.redMineMaterial.getTextureResource()) == -1) { bfModel.blacklist.push(this.redMineMaterial.getTextureResource()); } if(bfModel.blacklist.indexOf(this.blueMineMaterial.getTextureResource()) == -1) { bfModel.blacklist.push(this.blueMineMaterial.getTextureResource()); } if(bfModel.blacklist.indexOf(this.friendlyMineMaterial.getTextureResource()) == -1) { bfModel.blacklist.push(this.friendlyMineMaterial.getTextureResource()); } if(bfModel.blacklist.indexOf(this.enemyMineMaterial.getTextureResource()) == -1) { bfModel.blacklist.push(this.enemyMineMaterial.getTextureResource()); } } public function objectUnloaded(clientObject:ClientObject) : void { this.removeAllMines(); this.battlefieldModel.removePlugin(this); this.battlefieldModel = null; this.ctfModel = null; this.domModel = null; this.tankModel = null; this.inventoryModel = null; this.bfData = null; this.mineArmedSound = null; this.mainExplosionSequence = null; this.idleExplosionSequence = null; this.redMineMaterial = null; this.blueMineMaterial = null; this.friendlyMineMaterial = null; this.enemyMineMaterial = null; } public function putMine(clientObject:ClientObject, id:String, x:Number, y:Number, z:Number, userId:String) : void { var ownerData:TankData = null; var pos:Vector3 = null; var ownerObject:ClientObject = clientObject; if(ownerObject != null) { ownerData = this.tankModel.getTankData(ownerObject); } if(ownerData == null || ownerData.tank == null) { if(this.deferredMines == null) { this.deferredMines = new Vector.<BattleMine>(); } this.deferredMines.push(new BattleMine(false,id,userId,x,y,z)); } else { pos = new Vector3(x,y,z); this.addMine(id,this.mineProximityRadius,pos,userId,ownerData.teamType,this.getMineMaterial(ownerData),false); } } public function activateMine(clientObject:ClientObject, id:String) : void { var battleMine:BattleMine = null; var mine:ProximityMine = this.minesOnFieldById[id]; if(mine != null) { mine.arm(); this.addSound3DEffect(this.mineArmedSound,mine.position,0.3); } else { for each(battleMine in this.deferredMines) { if(battleMine.mineId == id) { battleMine.activated = true; return; } } } } public function removeMines(clientObject:ClientObject, ownerId:String) : void { var currMine:ProximityMine = null; var userMines:UserMinesList = this.minesByUser[ownerId]; if(userMines == null) { return; } var mine:ProximityMine = userMines.head; while(mine != null) { currMine = mine; mine = mine.next; this.addExplosionEffect(currMine.position,this.idleExplosionSequence.materials,this.idleExplosionFrameSize,idleExplosionScale.value,idleExplosionFPS.value,0.5,0.9); this.addSound3DEffect(this.deactivationSound,currMine.position,0.1); this.removeMine(currMine,userMines); } } public function explodeMine(clientObject:ClientObject, id:String, userId:String) : void { var tankData:TankData = null; var mine:ProximityMine = this.minesOnFieldById[id]; if(mine == null) { return; } var userMines:UserMinesList = this.minesByUser[mine.ownerId]; if(userMines == null) { return; } this.addExplosionEffect(mine.position,this.mainExplosionSequence.materials,this.mainExplosionFrameSize,mainExplosionScale.value,mainExplosionFPS.value,0.5,0.772); this.addSound3DEffect(this.explosionSound,mine.position,0.5); this.addExplosionDecal(mine); var userObject:ClientObject = clientObject; if(userObject != null) { tankData = this.tankModel.getTankData(userObject); if(tankData != null && tankData.tank != null) { tankData.tank.addWorldForceScaled(mine.position,mine.normal,WeaponConst.BASE_IMPACT_FORCE * this.impactForce); } } this.removeMine(mine,userMines); } private function addExplosionDecal(mine:ProximityMine) : void { this.projectionOrigin.vCopy(mine.position); this.projectionOrigin.vAddScaled(100,mine.normal); this.battlefieldModel.addDecal(mine.position,this.projectionOrigin,DECAL_RADIUS,this.explosionMarkMaterial); } public function get battlefieldPluginName() : String { return "mines"; } public function startBattle() : void { } public function restartBattle() : void { } public function finishBattle() : void { this.removeAllMines(); } public function tick(param1:int, param2:int, param3:Number, param4:Number) : void { var _loc6_:* = undefined; var _loc7_:UserMinesList = null; var _loc8_:ProximityMine = null; var _loc9_:ProximityMine = null; var _loc10_:Vector3 = null; var _loc11_:Vector3 = null; var _loc12_:Boolean = false; var _loc5_:TankData = TankData.localTankData; for(_loc6_ in this.minesByUser) { _loc7_ = this.minesByUser[_loc6_]; _loc8_ = _loc7_.head; while(_loc8_ != null) { _loc9_ = _loc8_; _loc8_ = _loc8_.next; if(_loc5_ != null) { if(_loc9_.canExplode(_loc5_) && !_loc9_.hitCommandSent && this.mineIntersects(_loc9_,_loc5_,this.bfData.collisionDetector,this.contact)) { _loc9_.hitCommandSent = true; _loc10_ = _loc5_.tank.state.pos; this.hitCommand(this.bfData.bfObject,_loc9_.id,_loc10_.x,_loc10_.y,_loc10_.z); } } _loc9_.update(param1,param2,_loc5_); } } if(this.ctfModel != null && _loc5_ != null && _loc5_.enabled) { _loc11_ = _loc5_.tank.state.pos; _loc12_ = this.ctfModel.isPositionInFlagProximity(_loc11_,this.minDistanceFromBaseSquared,BattleTeamType.BLUE) || this.ctfModel.isPositionInFlagProximity(_loc11_,this.minDistanceFromBaseSquared,BattleTeamType.RED); this.inventoryModel.lockItem(InventoryItemType.MINE,InventoryLock.FORCED,_loc12_); } if(this.domModel != null && _loc5_ != null && _loc5_.enabled) { _loc11_ = _loc5_.tank.state.pos; _loc12_ = this.domModel.isPositionInPointProximity(_loc11_,this.minDistanceFromBaseSquared); this.inventoryModel.lockItem(InventoryItemType.MINE,InventoryLock.FORCED,_loc12_); } } private function hitCommand(bfObject:ClientObject, mineId:String, x:Number, y:Number, z:Number) : void { Network(Main.osgi.getService(INetworker)).send("battle;mine_hit;" + mineId); } public function addUser(clientObject:ClientObject) : void { } public function removeUser(clientObject:ClientObject) : void { } public function addUserToField(clientObject:ClientObject) : void { var battleMine:BattleMine = null; var i:int = 0; var pos:Vector3 = null; var ownerObject:ClientObject = null; var ownerTankData:TankData = null; var tankData:TankData = this.tankModel.getTankData(clientObject); if(tankData.local) { if(this.deferredMines != null) { for(i = 0; i < this.deferredMines.length; i++) { battleMine = this.deferredMines[i]; ownerObject = clientObject; if(ownerObject != null) { ownerTankData = this.tankModel.getTankData(ownerObject); if(ownerTankData != null && ownerTankData.tank != null) { this.deferredMines.splice(i,1); i--; pos = new Vector3(battleMine.x,battleMine.y,battleMine.z); this.addMine(battleMine.mineId,this.mineProximityRadius,pos,battleMine.ownerId,ownerTankData.teamType,this.getMineMaterial(ownerTankData),battleMine.activated); } } } } } else if(this.deferredMines != null) { for(i = 0; i < this.deferredMines.length; i++) { battleMine = this.deferredMines[i]; if(battleMine.ownerId == clientObject.id) { this.deferredMines.splice(i,1); i--; pos = new Vector3(battleMine.x,battleMine.y,battleMine.z); this.addMine(battleMine.mineId,this.mineProximityRadius,pos,battleMine.ownerId,tankData.teamType,this.getMineMaterial(tankData),battleMine.activated); } } } } public function removeUserFromField(clientObject:ClientObject) : void { } public function get dumperName() : String { return "mines"; } public function dump(params:Vector.<String>) : String { var mine:ProximityMine = null; var result:String = "=== Mines ===\n"; if(this.deferredMines != null) { result += "Deferred:\n" + this.deferredMines.join("\n") + "\n"; } result += "On field:\n"; for each(mine in this.minesOnFieldById) { result += mine + "\n"; } return result; } private function addExplosionEffect(position:Vector3, materials:Vector.<Material>, frameSize:FrameSize, scale:Number, fps:Number, originX:Number, originY:Number) : void { var explosion:AnimatedSpriteEffect = AnimatedSpriteEffect(objectPoolService.objectPool.getObject(AnimatedSpriteEffect)); explosion.init(scale * frameSize.width,scale * frameSize.height,materials,position,0,50,fps,false,originX,originY); this.battlefieldModel.addGraphicEffect(explosion); } private function addMine(mineId:String, proximityRadius:Number, position:Vector3, ownerId:String, teamType:BattleTeamType, material:Material, armed:Boolean) : void { if(!this.bfData.collisionDetector.intersectRayWithStatic(position,this.rayDirection,CollisionGroup.STATIC,10000000000,null,this.intersection)) { return; } var userMines:UserMinesList = this.minesByUser[ownerId]; if(userMines == null) { userMines = new UserMinesList(); this.minesByUser[ownerId] = userMines; } var mine:ProximityMine = ProximityMine.create(mineId,ownerId,proximityRadius,this.referenceMesh,material,teamType,this.mineModelData); userMines.addMine(mine); this.minesOnFieldById[mineId] = mine; mine.setPosition(this.intersection.pos,this.intersection.normal); mine.addToContainer(this.bfData.viewport.getMapContainer()); if(armed) { mine.arm(); } } private function removeAllMines() : void { var key:* = undefined; var userMines:UserMinesList = null; for(key in this.minesByUser) { userMines = this.minesByUser[key]; userMines.clearMines(); delete this.minesByUser[key]; } for(key in this.minesOnFieldById) { delete this.minesOnFieldById[key]; } this.deferredMines = null; } private function initReferenceMesh(resourse:Mesh) : void { this.referenceMesh = resourse; if(this.referenceMesh.sorting != Sorting.DYNAMIC_BSP) { this.referenceMesh.sorting = Sorting.DYNAMIC_BSP; this.referenceMesh.calculateFacesNormals(true); this.referenceMesh.optimizeForDynamicBSP(); } } private function mineIntersects(mine:ProximityMine, tankData:TankData, collisionDetector:ICollisionDetector, contact:Contact) : Boolean { if(tankData.tank == null) { return false; } var cb:CollisionBox = tankData.tank.mainCollisionBox; var mcp:CollisionSphere = CollisionSphere(mine.collisionPrimitive); return collisionDetector.getContact(cb,mcp,contact); } private function removeMine(mine:ProximityMine, userMines:UserMinesList) : void { delete this.minesOnFieldById[mine.id]; userMines.removeMine(mine); } private function getSound(soundResourceId:String, resourceService:IResourceService) : Sound { if(soundResourceId == null) { return null; } var soundResource:SoundResource = ResourceUtil.getResource(ResourceType.SOUND,soundResourceId) as SoundResource; if(soundResource == null) { return null; } return soundResource.sound; } private function addSound3DEffect(sound:Sound, position:Vector3, volume:Number) : void { if(sound == null) { return; } var sound3d:Sound3D = Sound3D.create(sound,SoundOptions.nearRadius,SoundOptions.farRadius,SoundOptions.farDelimiter,volume); this.battlefieldModel.addSound3DEffect(Sound3DEffect.create(objectPoolService.objectPool,null,position,sound3d,0)); } private function getExplosionMaterialSequence(resourceId:String, frameWidth:int, mipMapResolution:Number, resourceService:IResourceService, frameSize:FrameSize) : MaterialSequence { var texture:BitmapData = null; var imageResource:ImageResource = null; if(resourceId != null) { imageResource = ResourceUtil.getResource(ResourceType.IMAGE,resourceId) as ImageResource; if(imageResource != null) { texture = imageResource.bitmapData as BitmapData; } } if(texture == null) { texture = new StubBitmapData(16711680); frameWidth = texture.width; } frameSize.width = frameWidth; frameSize.height = texture.height; return materialRegistry.materialSequenceRegistry.getSequence(MaterialType.EFFECT,texture,frameWidth,mipMapResolution); } private function getTextureMaterial(resourceId:String, mipMapResolution:Number, resourceRegister:IResourceService) : TextureMaterial { var texture:BitmapData = null; var imageResource:ImageResource = null; if(resourceId != null) { imageResource = ResourceUtil.getResource(ResourceType.IMAGE,resourceId) as ImageResource; if(imageResource != null) { texture = imageResource.bitmapData as BitmapData; } } if(texture == null) { texture = new StubBitmapData(16711680); } return materialRegistry.textureMaterialRegistry.getMaterial(MaterialType.EFFECT,texture,mipMapResolution,false); } private function getMineMaterial(ownerData:TankData) : Material { switch(ownerData.teamType) { case BattleTeamType.NONE: return ownerData == TankData.localTankData ? this.friendlyMineMaterial : this.enemyMineMaterial; case BattleTeamType.BLUE: return this.blueMineMaterial; case BattleTeamType.RED: return this.redMineMaterial; default: return this.enemyMineMaterial; } } } } class InitParams { public var blueMineTextureId:String; public var redMineTextureId:String; public var enemyMineTextureId:String; public var friendlyMineTextureId:String; public var idleExplosionTextureId:String; public var mainExplosionTextureId:String; function InitParams(blueMineTextureId:String, redMineTextureId:String, enemyMineTextureId:String, friendlyMineTextureId:String, idleExplosionTextureId:String, mainExplosionTextureId:String) { super(); this.blueMineTextureId = blueMineTextureId; this.redMineTextureId = redMineTextureId; this.enemyMineTextureId = enemyMineTextureId; this.friendlyMineTextureId = friendlyMineTextureId; this.idleExplosionTextureId = idleExplosionTextureId; this.mainExplosionTextureId = mainExplosionTextureId; } } class FrameSize { public var width:int; public var height:int; function FrameSize() { super(); } }
package alternativa.tanks.models.controlpoints.hud.panel { import alternativa.tanks.display.Flash; import alternativa.tanks.display.SquareSectorIndicator; import alternativa.tanks.models.controlpoints.hud.KeyPoint; import controls.Label; import flash.display.Sprite; import flash.geom.ColorTransform; import flash.utils.getTimer; import projects.tanks.client.battlefield.models.battle.cp.ControlPointState; public class KeyPointHUDIndicator extends Sprite { private static const SIZE:int = 36; private static const FONT_COLOR_RED:uint = 16742221; private static const FONT_COLOR_BLUE:uint = 4760319; private static const FONT_COLOR_NEUTRAL:uint = 16777215; private static const BG_COLOR_RED:uint = 9249024; private static const BG_COLOR_BLUE:uint = 16256; private var point:KeyPoint; private var label:Label; private var progressIndicator:SquareSectorIndicator; private var pointState:ControlPointState = ControlPointState.NEUTRAL; private var score:Number = 0; private const flash:Flash = Flash.getDefault(); public function KeyPointHUDIndicator(param1:KeyPoint) { super(); this.point = param1; this.createProgressIndicator(); this.createLabel(); this.update(); } public static function getColor(param1:ControlPointState) : uint { switch(param1) { case ControlPointState.BLUE: return FONT_COLOR_BLUE; case ControlPointState.RED: return FONT_COLOR_RED; default: return FONT_COLOR_NEUTRAL; } } private function createProgressIndicator() : void { this.progressIndicator = new SquareSectorIndicator(SIZE,0,0,0); addChild(this.progressIndicator); } private function createLabel() : void { this.label = new Label(); this.label.size = 18; this.label.bold = true; this.label.color = getColor(this.point.getCaptureState()); this.label.text = this.point.getName(); } public function getLabel() : Label { return this.label; } public function update() : void { this.updatePointState(); this.updateScore(); } private function setColorOffset(param1:uint) : void { var local2:ColorTransform = this.progressIndicator.transform.colorTransform; local2.redOffset = param1; local2.greenOffset = param1; local2.blueOffset = param1; this.progressIndicator.transform.colorTransform = local2; } private function updatePointState() : void { if(this.pointState != this.point.getCaptureState()) { this.pointState = this.point.getCaptureState(); this.label.color = this.getLabelColor(); if(this.pointState != ControlPointState.NEUTRAL) { this.flash.init(); } } if(this.flash.isActive()) { this.setColorOffset(this.flash.getColorOffset(getTimer())); } } private function getLabelColor() : uint { switch(this.pointState) { case ControlPointState.BLUE: return FONT_COLOR_BLUE; case ControlPointState.RED: return FONT_COLOR_RED; default: return FONT_COLOR_NEUTRAL; } } private function updateScore() : void { if(this.score != this.point.getClientProgress()) { this.score = this.point.getClientProgress(); if(this.score < 0) { this.progressIndicator.setColor(BG_COLOR_RED,1); } else if(this.score > 0) { this.progressIndicator.setColor(BG_COLOR_BLUE,1); } else { this.progressIndicator.setColor(0,0); } this.progressIndicator.setProgress(Math.abs(this.score) / 100); } } [Obfuscation(rename="false")] override public function get width() : Number { return SIZE; } [Obfuscation(rename="false")] override public function get height() : Number { return SIZE; } } }
package alternativa.tanks.service.money { public interface IMoneyService { function addListener(param1:IMoneyListener) : void; function removeListener(param1:IMoneyListener) : void; function get crystal() : int; function init(param1:int) : void; function setServerCrystals(param1:int) : void; function changeCrystals(param1:int) : void; function checkEnough(param1:int) : Boolean; function spend(param1:int) : void; } }
package projects.tanks.client.panel.model.payment.loader { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class ShopItemLoaderForAndroidModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ShopItemLoaderForAndroidModelServer; private var client:IShopItemLoaderForAndroidModelBase = IShopItemLoaderForAndroidModelBase(this); private var modelId:Long = Long.getLong(1896396405,832327381); private var _specialOfferLoadedId:Long = Long.getLong(1261138148,-697586738); public function ShopItemLoaderForAndroidModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ShopItemLoaderForAndroidModelServer(IModel(this)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._specialOfferLoadedId: this.client.specialOfferLoaded(); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.panel.model.payment.modes.qiwi { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl; public class QiwiPaymentModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:QiwiPaymentModelServer; private var client:IQiwiPaymentModelBase = IQiwiPaymentModelBase(this); private var modelId:Long = Long.getLong(1394146469,-1218623146); private var _errorId:Long = Long.getLong(151939955,1064142569); private var _receiveUrlId:Long = Long.getLong(890818873,-1142094667); private var _receiveUrl_urlCodec:ICodec; public function QiwiPaymentModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new QiwiPaymentModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(QiwiPaymentCC,false))); this._receiveUrl_urlCodec = this._protocol.getCodec(new TypeCodecInfo(PaymentRequestUrl,false)); } protected function getInitParam() : QiwiPaymentCC { return QiwiPaymentCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._errorId: this.client.error(); break; case this._receiveUrlId: this.client.receiveUrl(PaymentRequestUrl(this._receiveUrl_urlCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.battlefield.models.battle.battlefield.facilities { import alternativa.osgi.OSGi; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; public class BattleFacilitiesModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:BattleFacilitiesModelServer; private var client:IBattleFacilitiesModelBase = IBattleFacilitiesModelBase(this); private var modelId:Long = Long.getLong(1359795587,1519810047); public function BattleFacilitiesModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new BattleFacilitiesModelServer(IModel(this)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { var local3:* = param1; switch(false ? 0 : 0) { } } override public function get id() : Long { return this.modelId; } } }
package _codec.projects.tanks.client.battlefield.models.user.speedcharacteristics { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Float; import projects.tanks.client.battlefield.models.user.speedcharacteristics.SpeedCharacteristicsCC; public class CodecSpeedCharacteristicsCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_baseAcceleration:ICodec; private var codec_baseSpeed:ICodec; private var codec_baseTurnSpeed:ICodec; private var codec_baseTurretRotationSpeed:ICodec; private var codec_currentAcceleration:ICodec; private var codec_currentSpeed:ICodec; private var codec_currentTurnSpeed:ICodec; private var codec_currentTurretRotationSpeed:ICodec; private var codec_reverseAcceleration:ICodec; private var codec_reverseTurnAcceleration:ICodec; private var codec_sideAcceleration:ICodec; private var codec_turnAcceleration:ICodec; private var codec_turnStabilizationAcceleration:ICodec; public function CodecSpeedCharacteristicsCC() { super(); } public function init(param1:IProtocol) : void { this.codec_baseAcceleration = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_baseSpeed = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_baseTurnSpeed = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_baseTurretRotationSpeed = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_currentAcceleration = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_currentSpeed = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_currentTurnSpeed = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_currentTurretRotationSpeed = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_reverseAcceleration = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_reverseTurnAcceleration = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_sideAcceleration = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_turnAcceleration = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_turnStabilizationAcceleration = param1.getCodec(new TypeCodecInfo(Float,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:SpeedCharacteristicsCC = new SpeedCharacteristicsCC(); local2.baseAcceleration = this.codec_baseAcceleration.decode(param1) as Number; local2.baseSpeed = this.codec_baseSpeed.decode(param1) as Number; local2.baseTurnSpeed = this.codec_baseTurnSpeed.decode(param1) as Number; local2.baseTurretRotationSpeed = this.codec_baseTurretRotationSpeed.decode(param1) as Number; local2.currentAcceleration = this.codec_currentAcceleration.decode(param1) as Number; local2.currentSpeed = this.codec_currentSpeed.decode(param1) as Number; local2.currentTurnSpeed = this.codec_currentTurnSpeed.decode(param1) as Number; local2.currentTurretRotationSpeed = this.codec_currentTurretRotationSpeed.decode(param1) as Number; local2.reverseAcceleration = this.codec_reverseAcceleration.decode(param1) as Number; local2.reverseTurnAcceleration = this.codec_reverseTurnAcceleration.decode(param1) as Number; local2.sideAcceleration = this.codec_sideAcceleration.decode(param1) as Number; local2.turnAcceleration = this.codec_turnAcceleration.decode(param1) as Number; local2.turnStabilizationAcceleration = this.codec_turnStabilizationAcceleration.decode(param1) as Number; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:SpeedCharacteristicsCC = SpeedCharacteristicsCC(param2); this.codec_baseAcceleration.encode(param1,local3.baseAcceleration); this.codec_baseSpeed.encode(param1,local3.baseSpeed); this.codec_baseTurnSpeed.encode(param1,local3.baseTurnSpeed); this.codec_baseTurretRotationSpeed.encode(param1,local3.baseTurretRotationSpeed); this.codec_currentAcceleration.encode(param1,local3.currentAcceleration); this.codec_currentSpeed.encode(param1,local3.currentSpeed); this.codec_currentTurnSpeed.encode(param1,local3.currentTurnSpeed); this.codec_currentTurretRotationSpeed.encode(param1,local3.currentTurretRotationSpeed); this.codec_reverseAcceleration.encode(param1,local3.reverseAcceleration); this.codec_reverseTurnAcceleration.encode(param1,local3.reverseTurnAcceleration); this.codec_sideAcceleration.encode(param1,local3.sideAcceleration); this.codec_turnAcceleration.encode(param1,local3.turnAcceleration); this.codec_turnStabilizationAcceleration.encode(param1,local3.turnStabilizationAcceleration); } } }
package _codec.projects.tanks.client.tanksservices.model.logging.battlelist { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import projects.tanks.client.tanksservices.model.logging.battlelist.BattleSelectAction; public class CodecBattleSelectAction implements ICodec { public function CodecBattleSelectAction() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:BattleSelectAction = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = BattleSelectAction.SELECT_BATTLE; break; case 1: local2 = BattleSelectAction.CHOOSE_MODE; break; case 2: local2 = BattleSelectAction.CREATE_BATTLE; break; case 3: local2 = BattleSelectAction.ENTER_TO_BATTLE; break; case 4: local2 = BattleSelectAction.COPY_BATTLE_LINK; } 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 alternativa.models.object3ds { import alternativa.object.ClientObject; import alternativa.resource.Tanks3DSResource; public interface IObject3DS { function getResource3DS(param1:ClientObject) : Tanks3DSResource; } }
package alternativa.tanks.battle.events.death { import platform.client.fp10.core.type.IGameObject; public class TankSuicideEvent { public var victim:IGameObject; public function TankSuicideEvent(param1:IGameObject) { super(); this.victim = param1; } } }
package _codec.projects.tanks.client.battlefield.models.map { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Float; import platform.client.fp10.core.resource.types.MultiframeTextureResource; import projects.tanks.client.battlefield.models.map.DustParams; public class CodecDustParams implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_alpha:ICodec; private var codec_density:ICodec; private var codec_dustFarDistance:ICodec; private var codec_dustNearDistance:ICodec; private var codec_dustParticle:ICodec; private var codec_dustSize:ICodec; public function CodecDustParams() { super(); } public function init(param1:IProtocol) : void { this.codec_alpha = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_density = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_dustFarDistance = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_dustNearDistance = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_dustParticle = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false)); this.codec_dustSize = param1.getCodec(new TypeCodecInfo(Float,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:DustParams = new DustParams(); local2.alpha = this.codec_alpha.decode(param1) as Number; local2.density = this.codec_density.decode(param1) as Number; local2.dustFarDistance = this.codec_dustFarDistance.decode(param1) as Number; local2.dustNearDistance = this.codec_dustNearDistance.decode(param1) as Number; local2.dustParticle = this.codec_dustParticle.decode(param1) as MultiframeTextureResource; local2.dustSize = this.codec_dustSize.decode(param1) as Number; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:DustParams = DustParams(param2); this.codec_alpha.encode(param1,local3.alpha); this.codec_density.encode(param1,local3.density); this.codec_dustFarDistance.encode(param1,local3.dustFarDistance); this.codec_dustNearDistance.encode(param1,local3.dustNearDistance); this.codec_dustParticle.encode(param1,local3.dustParticle); this.codec_dustSize.encode(param1,local3.dustSize); } } }
package alternativa.tanks.model.item.present { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.resource.types.ImageResource; import platform.client.fp10.core.type.IGameObject; public class PresentImageEvents implements PresentImage { private var object:IGameObject; private var impl:Vector.<Object>; public function PresentImageEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getImage() : ImageResource { var result:ImageResource = null; var i:int = 0; var m:PresentImage = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = PresentImage(this.impl[i]); result = m.getImage(); i++; } } finally { Model.popObject(); } return result; } } }
package controls { import controls.slider.SliderThumb; import controls.slider.SliderTrack; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import forms.events.SliderEvent; public class Slider extends Sprite { protected var track:SliderTrack = new SliderTrack(); protected var thumb:SliderThumb = new SliderThumb(); protected var _thumb_width:int = 30; protected var curThumbX:int; protected var trgt:Sprite; public var _width:int; protected var _minValue:Number = 0; protected var _maxValue:Number = 100; protected var _value:Number = 0; protected var _tick:Number = 10; public function Slider() { super(); addChild(this.track); addChild(this.thumb); this.thumb.width = this._thumb_width; addEventListener(Event.ADDED_TO_STAGE,this.ConfigUI); addEventListener(Event.REMOVED_FROM_STAGE,this.UnConfigUI); } protected function UnConfigUI(param1:Event) : void { stage.removeEventListener(MouseEvent.MOUSE_UP,this.onMouseUp); stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.dragThumb); } protected function ConfigUI(param1:Event) : void { this.thumb.addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown); stage.addEventListener(MouseEvent.MOUSE_UP,this.onMouseUp); } protected function onMouseDown(param1:MouseEvent) : void { this.trgt = Sprite(param1.currentTarget); stage.addEventListener(MouseEvent.MOUSE_MOVE,this.dragThumb); this.curThumbX = this.trgt.mouseX; } protected function onMouseUp(param1:MouseEvent) : void { if(param1 != null) { stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.dragThumb); } this.trgt = null; } protected function dragThumb(param1:MouseEvent) : void { var local2:Number = NaN; this.thumb.x += this.thumb.mouseX - this.curThumbX; if(this.thumb.x < 0) { this.thumb.x = 0; } if(this.thumb.x > this._width - this._thumb_width) { this.thumb.x = this._width - this._thumb_width; } local2 = this._minValue + this.thumb.x * (this._maxValue - this._minValue) / (width - this._thumb_width); this._value = local2; dispatchEvent(new SliderEvent(local2)); } override public function set width(param1:Number) : void { this._width = int(param1); this.track.width = this._width; } public function get minValue() : Number { return this._minValue; } public function set minValue(param1:Number) : void { this._minValue = param1; this.track.minValue = this._minValue; } public function get maxValue() : Number { return this._maxValue; } public function set maxValue(param1:Number) : void { this._maxValue = param1; this.track.maxValue = this._maxValue; } public function get value() : Number { return this._value; } public function set value(param1:Number) : void { this._value = param1; this.setThumb(); } public function set tickInterval(param1:Number) : void { this._tick = param1; this.track.tickInterval = this._tick; } protected function setThumb() : void { this.thumb.x = int((this._value - this._minValue) * (this._width - this._thumb_width) / (this._maxValue - this._minValue)); } } }
package alternativa.tanks.model.shop.items.crystallitem { import mx.core.BitmapAsset; [ExcludeClass] public class CrystalPackageItemIcons_crystalsPackage1Class extends BitmapAsset { public function CrystalPackageItemIcons_crystalsPackage1Class() { super(); } } }
package controls.cellrenderer { import flash.display.Bitmap; import flash.display.BitmapData; public class CellNormal extends CellRendererDefault { [Embed(source="872.png")] private static const normalLeft:Class; private static const normalLeftData:BitmapData = Bitmap(new normalLeft()).bitmapData; [Embed(source="1108.png")] private static const normalCenter:Class; private static const normalCenterData:BitmapData = Bitmap(new normalCenter()).bitmapData; [Embed(source="866.png")] private static const normalRight:Class; private static const normalRightData:BitmapData = Bitmap(new normalRight()).bitmapData; public function CellNormal() { super(); bmpLeft = normalLeftData; bmpCenter = normalCenterData; bmpRight = normalRightData; } } }
package alternativa.tanks.gui.payment.controls { import controls.base.LabelBase; import flash.display.Sprite; import flash.text.TextFieldAutoSize; import flash.text.TextFormatAlign; public class OrderingLine extends Sprite { protected var _width:Number; protected var descriptionLabel:LabelBase; protected var crystalsLabel:LabelBase; public function OrderingLine(param1:int, param2:String, param3:int) { super(); this.descriptionLabel = this.createLabel(param2); addChild(this.descriptionLabel); this.crystalsLabel = this.createLabel(param3.toString()); addChild(this.crystalsLabel); this.crystalsLabel.x = param1 - this.crystalsLabel.width; } private function createLabel(param1:String) : LabelBase { var local2:LabelBase = new LabelBase(); local2.autoSize = TextFieldAutoSize.LEFT; local2.wordWrap = false; local2.multiline = true; local2.align = TextFormatAlign.LEFT; local2.text = param1; local2.size = 12; local2.color = 5898034; return local2; } } }
package alternativa.init { import alternativa.model.IModel; import alternativa.osgi.bundle.IBundleActivator; import alternativa.service.IModelService; import alternativa.tanks.models.battlefield.BattlefieldModel; import alternativa.tanks.models.battlefield.mine.BattleMinesModel; import alternativa.tanks.models.ctf.CTFModel; import alternativa.tanks.models.tank.TankModel; import alternativa.tanks.models.tank.explosion.TankExplosionModel; public class BattlefieldModelActivator implements IBundleActivator { public var models:Vector.<IModel>; public var bm:BattlefieldModel; public function BattlefieldModelActivator() { this.models = new Vector.<IModel>(); super(); } public function start(_osgi:OSGi) : void { var modelsRegister:IModelService = _osgi.getService(IModelService) as IModelService; this.addModel(modelsRegister,this.bm = new BattlefieldModel()); this.addModel(modelsRegister,new TankModel()); this.addModel(modelsRegister,new TankExplosionModel()); this.addModel(modelsRegister,new CTFModel()); this.addModel(modelsRegister,new BattleMinesModel()); } public function stop(_osgi:OSGi) : void { var model:IModel = null; var modelRegister:IModelService = _osgi.getService(IModelService) as IModelService; while(this.models.length > 0) { model = this.models.pop(); modelRegister.remove(model.id); } } private function addModel(modelsRegister:IModelService, model:IModel) : void { modelsRegister.add(model); this.models.push(model); } } }