code
stringlengths
57
237k
package alternativa.tanks.models.battle.battlefield { [ModelInterface] public interface BattleModel { function getBattleType() : BattleType; } }
package alternativa.tanks.models.weapon.shaft { import alternativa.math.Vector3; import alternativa.physics.Body; import alternativa.tanks.battle.objects.tank.Tank; import alternativa.tanks.battle.objects.tank.Weapon; import alternativa.tanks.battle.objects.tank.WeaponMount; import alternativa.tanks.battle.objects.tank.WeaponPlatform; import alternativa.tanks.models.tank.speedcharacteristics.SpeedCharacteristics; import alternativa.tanks.models.weapon.AllGlobalGunParams; import alternativa.tanks.models.weapon.WeaponConst; import alternativa.tanks.models.weapon.laser.LaserPointer; import alternativa.tanks.utils.EncryptedNumber; import alternativa.tanks.utils.EncryptedNumberImpl; import projects.tanks.client.battlefield.models.tankparts.weapon.shaft.ShaftCC; import projects.tanks.client.garage.models.item.properties.ItemProperty; public class RemoteShaftWeapon implements Weapon { private static const allGunParams:AllGlobalGunParams = new AllGlobalGunParams(); private static const shotDirection:Vector3 = new Vector3(); private var effects:ShaftEffects; private var shaftCC:ShaftCC; private var weaponPlatform:WeaponPlatform; private var turnSpeedModificationTask:TurnSpeedModificationTask; private var speedCharacteristics:SpeedCharacteristics; private var turret:WeaponMount; private var recoilForce:EncryptedNumber; private var laser:LaserPointer; public function RemoteShaftWeapon(param1:Number, param2:ShaftCC, param3:ShaftEffects, param4:WeaponMount, param5:SpeedCharacteristics, param6:LaserPointer) { super(); this.recoilForce = new EncryptedNumberImpl(param1); this.shaftCC = param2; this.effects = param3; this.turret = param4; this.speedCharacteristics = param5; this.laser = param6; } private static function getShotDirection(param1:Vector3, param2:Vector3, param3:Vector3) : Vector3 { if(param2 != null) { return shotDirection.diff(param2,param1).normalize(); } if(param3 == null) { param3 = allGunParams.direction; } return shotDirection.diff(param3,param1).normalize(); } public function init(param1:WeaponPlatform) : void { this.weaponPlatform = param1; } public function destroy() : void { this.effects.destroy(); } public function activate() : void { } public function deactivate() : void { this.stopManualTargeting(); } public function enable() : void { } public function disable(param1:Boolean) : void { this.stopManualTargeting(); } public function reset() : void { this.stopManualTargeting(); } public function getStatus() : Number { return 0; } public function startManualTargeting() : void { if(this.turnSpeedModificationTask == null) { this.effects.createManualModeEffects(this.weaponPlatform.getTurret3D()); this.turnSpeedModificationTask = new TurnSpeedModificationTask(this.shaftCC,this.turret,this.speedCharacteristics); this.turnSpeedModificationTask.start(); } } public function stopManualTargeting() : void { if(this.turnSpeedModificationTask != null) { this.turnSpeedModificationTask.stop(); this.turnSpeedModificationTask = null; } this.effects.stopManualTargetingEffects(); this.laser.hideLaser(); } public function showShotEffects(param1:Vector3, param2:Body, param3:Vector3, param4:Number) : void { var local5:Vector3 = null; this.weaponPlatform.getAllGunParams(allGunParams); this.weaponPlatform.getBody().addWorldForceScaled(allGunParams.muzzlePosition,allGunParams.direction,-this.recoilForce.getNumber()); this.weaponPlatform.addDust(); this.effects.createMuzzleFlashEffect(this.weaponPlatform.getLocalMuzzlePosition(),this.weaponPlatform.getTurret3D()); this.effects.createShotSoundEffect(allGunParams.muzzlePosition); this.effects.createHitMark(allGunParams.barrelOrigin,param1); if(param1 != null || param3 != null) { local5 = getShotDirection(allGunParams.barrelOrigin,param1,param3); this.effects.createHitPointsGraphicEffects(param1,param3,allGunParams.muzzlePosition,allGunParams.direction,local5); this.applyImpactForce(param2,param3,local5,param4); } } private function applyImpactForce(param1:Body, param2:Vector3, param3:Vector3, param4:Number) : void { var local5:Number = NaN; var local6:Tank = null; if(param1 == null) { return; } if(Vector3.isFiniteVector(param3)) { local5 = param4 * WeaponConst.BASE_IMPACT_FORCE.getNumber(); if(param1 != null && param1.tank != null) { if(Vector3.isFiniteVector(param2)) { local6 = param1.tank; local6.applyWeaponHit(param2,param3,local5); } } } } public function getResistanceProperty() : ItemProperty { return ItemProperty.SHAFT_RESISTANCE; } public function updateRecoilForce(param1:Number) : void { this.recoilForce.setNumber(param1); } public function fullyRecharge() : void { } public function weaponReloadTimeChanged(param1:int, param2:int) : void { } public function stun() : void { } public function calm(param1:int) : void { } } }
package alternativa.engine3d.loaders { import alternativa.engine3d.loaders.events.LoaderErrorEvent; import alternativa.engine3d.loaders.events.LoaderEvent; import alternativa.engine3d.loaders.events.LoaderProgressEvent; import alternativa.engine3d.materials.TextureMaterial; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.BitmapDataChannel; import flash.display.BlendMode; import flash.display.Loader; import flash.events.ErrorEvent; import flash.events.Event; import flash.events.EventDispatcher; import flash.events.IOErrorEvent; import flash.events.ProgressEvent; import flash.events.SecurityErrorEvent; import flash.geom.Matrix; import flash.geom.Point; import flash.net.URLRequest; import flash.system.LoaderContext; [Event(name="loaderError",type="alternativa.engine3d.loaders.events.LoaderErrorEvent")] [Event(name="complete",type="flash.events.Event")] [Event(name="partComplete",type="alternativa.engine3d.loaders.events.LoaderEvent")] [Event(name="partOpen",type="alternativa.engine3d.loaders.events.LoaderEvent")] public class MaterialLoader extends EventDispatcher { private static var stub:BitmapData; private var loader:Loader; private var context:LoaderContext; private var materials:Vector.<TextureMaterial>; private var urls:Vector.<String>; private var filesTotal:int; private var filesLoaded:int; private var diffuse:BitmapData; private var currentURL:String; private var index:int; public function MaterialLoader() { super(); } public function load(param1:Vector.<TextureMaterial>, param2:LoaderContext = null) : void { var local5:TextureMaterial = null; this.context = param2; this.materials = param1; this.urls = new Vector.<String>(); var local3:int = 0; var local4:int = 0; while(local3 < param1.length) { local5 = param1[local3]; var local6:* = local4++; this.urls[local6] = local5.diffuseMapURL; ++this.filesTotal; if(local5.opacityMapURL != null) { var local7:* = local4++; this.urls[local7] = local5.opacityMapURL; ++this.filesTotal; } else { local7 = local4++; this.urls[local7] = null; } local3++; } this.filesLoaded = 0; this.index = -1; this.loadNext(null); } public function close() : void { this.destroyLoader(); this.materials = null; this.urls = null; this.diffuse = null; this.currentURL = null; this.context = null; } private function destroyLoader() : void { if(this.loader != null) { this.loader.unload(); this.loader.contentLoaderInfo.removeEventListener(Event.OPEN,this.onPartOpen); this.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.loadNext); this.loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.onFileProgress); this.loader.contentLoaderInfo.removeEventListener(IOErrorEvent.DISK_ERROR,this.loadNext); this.loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,this.loadNext); this.loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR,this.loadNext); this.loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR,this.loadNext); this.loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR,this.loadNext); this.loader = null; } } private function loadNext(param1:Event) : void { var local2:TextureMaterial = null; if(this.index >= 0) { if(this.index % 2 == 0) { if(param1 is ErrorEvent) { this.diffuse = this.getStub(); this.onFileError((param1 as ErrorEvent).text); } else { this.diffuse = (this.loader.content as Bitmap).bitmapData; } ++this.filesLoaded; } else { local2 = this.materials[this.index - 1 >> 1]; if(param1 == null) { local2.texture = this.diffuse; } else { if(param1 is ErrorEvent) { local2.texture = this.diffuse; this.onFileError((param1 as ErrorEvent).text); } else { local2.texture = this.merge(this.diffuse,(this.loader.content as Bitmap).bitmapData); } ++this.filesLoaded; } this.onPartComplete(this.index - 1 >> 1,local2); this.diffuse = null; } this.destroyLoader(); } if(++this.index >= this.urls.length) { this.close(); if(hasEventListener(Event.COMPLETE)) { dispatchEvent(new Event(Event.COMPLETE)); } } else { this.currentURL = this.urls[this.index]; if(this.currentURL != null && (this.diffuse == null || this.diffuse != stub)) { this.loader = new Loader(); if(this.index % 2 == 0) { this.loader.contentLoaderInfo.addEventListener(Event.OPEN,this.onPartOpen); } this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadNext); this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.onFileProgress); this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.DISK_ERROR,this.loadNext); this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this.loadNext); this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR,this.loadNext); this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR,this.loadNext); this.loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.loadNext); this.loader.load(new URLRequest(this.currentURL),this.context); } else { this.loadNext(null); } } } private function onPartOpen(param1:Event) : void { if(hasEventListener(LoaderEvent.PART_OPEN)) { dispatchEvent(new LoaderEvent(LoaderEvent.PART_OPEN,this.urls.length >> 1,this.index >> 1,this.materials[this.index >> 1])); } } private function onPartComplete(param1:int, param2:TextureMaterial) : void { if(hasEventListener(LoaderEvent.PART_COMPLETE)) { dispatchEvent(new LoaderEvent(LoaderEvent.PART_COMPLETE,this.urls.length >> 1,param1,param2)); } } private function onFileProgress(param1:ProgressEvent) : void { if(hasEventListener(LoaderProgressEvent.LOADER_PROGRESS)) { dispatchEvent(new LoaderProgressEvent(LoaderProgressEvent.LOADER_PROGRESS,this.filesTotal,this.filesLoaded,(this.filesLoaded + param1.bytesLoaded / param1.bytesTotal) / this.filesTotal,param1.bytesLoaded,param1.bytesTotal)); } } private function onFileError(param1:String) : void { dispatchEvent(new LoaderErrorEvent(LoaderErrorEvent.LOADER_ERROR,this.currentURL,param1)); } private function merge(param1:BitmapData, param2:BitmapData) : BitmapData { var local3:BitmapData = new BitmapData(param1.width,param1.height); local3.copyPixels(param1,param1.rect,new Point()); if(param1.width != param2.width || param1.height != param2.height) { param1.draw(param2,new Matrix(param1.width / param2.width,0,0,param1.height / param2.height),null,BlendMode.NORMAL,null,true); param2.dispose(); param2 = param1; } else { param1.dispose(); } local3.copyChannel(param2,param2.rect,new Point(),BitmapDataChannel.RED,BitmapDataChannel.ALPHA); param2.dispose(); return local3; } private function getStub() : BitmapData { var local1:uint = 0; var local2:uint = 0; var local3:uint = 0; if(stub == null) { local1 = 20; stub = new BitmapData(local1,local1,false,0); local2 = 0; while(local2 < local1) { local3 = 0; while(local3 < local1) { stub.setPixel(Boolean(local2 % 2) ? int(local3) : local3 + 1,local2,16711935); local3 += 2; } local2++; } } return stub; } } }
package platform.client.fp10.core.osgi { import alternativa.osgi.OSGi; import alternativa.osgi.bundle.IBundleActivator; import alternativa.osgi.service.display.IDisplay; import alternativa.osgi.service.launcherparams.ILauncherParams; import alternativa.osgi.service.logging.LogService; import alternativa.osgi.service.network.INetworkService; import alternativa.protocol.IProtocol; import alternativa.types.Long; import flash.utils.setTimeout; import platform.client.fp10.core.CoreCommands; import platform.client.fp10.core.logging.serverlog.ServerLogTarget; import platform.client.fp10.core.logging.serverlog.UncaughtErrorServerLog; import platform.client.fp10.core.logging.serverlog.UncaughtErrorServerLogImpl; import platform.client.fp10.core.network.command.ControlCommand; import platform.client.fp10.core.network.command.SpaceCommand; import platform.client.fp10.core.network.connection.ConnectionConnectParameters; import platform.client.fp10.core.network.connection.ConnectionInitializers; import platform.client.fp10.core.network.connection.ControlConnectionSender; import platform.client.fp10.core.network.connection.IConnection; import platform.client.fp10.core.network.connection.protection.PrimitiveProtectionContext; import platform.client.fp10.core.protocol.codec.ControlRootCodec; import platform.client.fp10.core.protocol.codec.DateCodec; import platform.client.fp10.core.protocol.codec.GameObjectCodec; import platform.client.fp10.core.protocol.codec.SpaceRootCodec; import platform.client.fp10.core.registry.GameTypeRegistry; import platform.client.fp10.core.registry.ModelRegistry; import platform.client.fp10.core.registry.ResourceRegistry; import platform.client.fp10.core.registry.SpaceRegistry; import platform.client.fp10.core.registry.impl.GameTypeRegistryImpl; import platform.client.fp10.core.registry.impl.ModelsRegistryImpl; import platform.client.fp10.core.registry.impl.ResourceRegistryImpl; import platform.client.fp10.core.registry.impl.SpaceRegistryImpl; import platform.client.fp10.core.resource.IResourceLoader; import platform.client.fp10.core.resource.IResourceLocalStorageInternal; import platform.client.fp10.core.resource.ResourceLoader; import platform.client.fp10.core.resource.ResourceLocalStorage; import platform.client.fp10.core.resource.ResourceTimer; import platform.client.fp10.core.resource.ResourceType; import platform.client.fp10.core.resource.types.ImageResource; import platform.client.fp10.core.resource.types.LocalizedImageResource; import platform.client.fp10.core.resource.types.MultiframeTextureResource; import platform.client.fp10.core.resource.types.SWFLibraryResource; import platform.client.fp10.core.resource.types.SoundResource; import platform.client.fp10.core.resource.types.TextureResource; import platform.client.fp10.core.service.IResourceTimer; import platform.client.fp10.core.service.address.AddressService; import platform.client.fp10.core.service.address.impl.AddressServiceFakeImpl; import platform.client.fp10.core.service.address.impl.AddressServiceImpl; import platform.client.fp10.core.service.errormessage.IErrorMessageService; import platform.client.fp10.core.service.errormessage.impl.MessageBoxService; import platform.client.fp10.core.service.loadingprogress.ILoadingProgressService; import platform.client.fp10.core.service.localstorage.IResourceLocalStorage; import platform.client.fp10.core.service.serverlog.impl.ServerLogPanel; import platform.client.fp10.core.service.transport.ITransportService; import platform.client.fp10.core.service.transport.impl.TransportService; import platform.client.fp10.core.type.IGameObject; public class ClientActivator implements IBundleActivator { private var osgi:OSGi; private var controlChannelConnection:IConnection; public function ClientActivator() { super(); } public function start(param1:OSGi) : void { this.osgi = param1; this.registerCodecs(); this.registerServices(); this.registerResources(); setTimeout(this.completeInitialization,0); } public function stop(param1:OSGi) : void { } private function registerCodecs() : void { var local1:IProtocol = IProtocol(this.osgi.getService(IProtocol)); local1.registerCodecForType(ControlCommand,new ControlRootCodec()); local1.registerCodecForType(SpaceCommand,new SpaceRootCodec()); local1.registerCodecForType(IGameObject,new GameObjectCodec()); local1.registerCodecForType(Date,new DateCodec()); } private function registerServices() : void { this.osgi.registerService(GameTypeRegistry,new GameTypeRegistryImpl()); this.osgi.registerService(SpaceRegistry,new SpaceRegistryImpl()); this.osgi.registerService(ModelRegistry,new ModelsRegistryImpl(this.osgi)); this.osgi.registerServiceMulti([IResourceLocalStorage,IResourceLocalStorageInternal],new ResourceLocalStorage(this.osgi)); this.osgi.registerService(IResourceLoader,new ResourceLoader(this.osgi)); this.osgi.registerServiceMulti([ResourceRegistry,ILoadingProgressService],new ResourceRegistryImpl(this.osgi)); this.osgi.registerService(IErrorMessageService,new MessageBoxService(this.osgi)); var local1:ILauncherParams = ILauncherParams(this.osgi.getService(ILauncherParams)); this.osgi.registerService(AddressService,Boolean(local1.getParameter("noswfaddress")) ? new AddressServiceFakeImpl() : new AddressServiceImpl()); this.osgi.registerService(IResourceTimer,new ResourceTimer(this.osgi)); this.osgi.registerService(ITransportService,new TransportService()); } private function registerResources() : void { var local1:ResourceRegistry = ResourceRegistry(this.osgi.getService(ResourceRegistry)); local1.registerTypeClasses(ResourceType.SWF_LIBRARY,SWFLibraryResource); local1.registerTypeClasses(ResourceType.IMAGE,ImageResource); local1.registerTypeClasses(ResourceType.LOCALIZED_IMAGE,LocalizedImageResource); local1.registerTypeClasses(ResourceType.MULTIFRAME_IMAGE,MultiframeTextureResource); local1.registerTypeClasses(ResourceType.SOUND,SoundResource); local1.registerTypeClasses(ResourceType.TEXTURE,TextureResource); } private function createConnection() : void { var local1:IProtocol = IProtocol(this.osgi.getService(IProtocol)); var local2:ITransportService = ITransportService(this.osgi.getService(ITransportService)); var local3:INetworkService = INetworkService(this.osgi.getService(INetworkService)); var local4:ConnectionInitializers = new ConnectionInitializers(local1,new ControlRootCodec(),local2.controlCommandHandler,local3.secure,Long.ZERO,PrimitiveProtectionContext.INSTANCE); this.controlChannelConnection = local2.createConnection(local4); } private function setupServerLog() : void { var local4:ServerLogTarget = null; var local5:IDisplay = null; var local1:LogService = LogService(this.osgi.getService(LogService)); var local2:ILauncherParams = ILauncherParams(this.osgi.getService(ILauncherParams)); var local3:String = local2.getParameter("log_to_server"); if(Boolean(local3)) { local4 = new ServerLogTarget(new ControlConnectionSender(),local3); local1.addLogTarget(local4); if(Boolean(local2.getParameter("show_server_logs"))) { local5 = IDisplay(this.osgi.getService(IDisplay)); local4.setLogPanel(new ServerLogPanel(local5.stage)); } } } private function completeInitialization() : void { this.registerCommmands(); this.createConnection(); this.setupServerLog(); this.connectToServer(); this.setupUncaughtErrorLogSender(); } private function registerCommmands() : void { new CoreCommands(); } private function connectToServer() : void { var local1:INetworkService = INetworkService(this.osgi.getService(INetworkService)); this.controlChannelConnection.connect(new ConnectionConnectParameters(local1.controlServerAddress,local1.controlServerPorts)); } private function setupUncaughtErrorLogSender() : void { this.osgi.registerService(UncaughtErrorServerLog,new UncaughtErrorServerLogImpl(new ControlConnectionSender())); } } }
package alternativa.tanks.models.weapon.healing { import alternativa.physics.collision.types.RayHit; [ModelInterface] public interface HealingGunCallback { function updateHit(param1:int, param2:RayHit) : void; function stop(param1:int) : void; function onTick(param1:int, param2:RayHit) : void; } }
package forms.ranks { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank28.png")] public class DefaultRanksBitmaps_bitmapBigRank28 extends BitmapAsset { public function DefaultRanksBitmaps_bitmapBigRank28() { super(); } } }
package alternativa.tanks.view.battlelist.battleitem { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.view.battlelist.battleitem.BattleTypeIcon_privateClass.png")] public class BattleTypeIcon_privateClass extends BitmapAsset { public function BattleTypeIcon_privateClass() { super(); } } }
package projects.tanks.client.battlefield.models.tankparts.sfx.shoot.smoky { 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 SmokyShootSFXModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:SmokyShootSFXModelServer; private var client:ISmokyShootSFXModelBase = ISmokyShootSFXModelBase(this); private var modelId:Long = Long.getLong(407046073,1894066655); public function SmokyShootSFXModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new SmokyShootSFXModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(SmokyShootSFXCC,false))); } protected function getInitParam() : SmokyShootSFXCC { return SmokyShootSFXCC(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 { import controls.panel.BaseButton; [Embed(source="/_assets/assets.swf", symbol="symbol96")] public dynamic class MainPanelChangeButton extends BaseButton { public function MainPanelChangeButton() { super(); } } }
package alternativa.tanks.services.ping { public interface PingService { function getPing() : Number; function setPing(param1:Number) : void; } }
package alternativa.tanks.model.useremailandpassword { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class PasswordServiceAdapt implements PasswordService { private var object:IGameObject; private var impl:PasswordService; public function PasswordServiceAdapt(param1:IGameObject, param2:PasswordService) { super(); this.object = param1; this.impl = param2; } public function checkIsPasswordSet(param1:Function) : void { var callback:Function = param1; try { Model.object = this.object; this.impl.checkIsPasswordSet(callback); } finally { Model.popObject(); } } public function checkPassword(param1:String, param2:Function) : void { var password:String = param1; var callback:Function = param2; try { Model.object = this.object; this.impl.checkPassword(password,callback); } finally { Model.popObject(); } } public function setPassword(param1:String) : void { var password:String = param1; try { Model.object = this.object; this.impl.setPassword(password); } finally { Model.popObject(); } } public function updatePassword(param1:String, param2:String) : void { var oldPassword:String = param1; var newPassword:String = param2; try { Model.object = this.object; this.impl.updatePassword(oldPassword,newPassword); } finally { Model.popObject(); } } } }
package alternativa.tanks.battle.events.reload { public class ReloadScheduledEvent { public var suicideDelayMS:int; public function ReloadScheduledEvent(param1:int) { super(); this.suicideDelayMS = param1; } } }
package alternativa.tanks.models.battle.gui.drone { import alternativa.tanks.battle.objects.tank.Tank; import projects.tanks.client.battlefield.models.user.tank.TankLogicState; [ModelInterface] public interface IDroneModel { function initDrones(param1:Tank, param2:Boolean, param3:TankLogicState) : void; function canOverheal() : Boolean; } }
package projects.tanks.client.partners.impl.facebook.payment { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.OptionalMap; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import flash.utils.ByteArray; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.network.command.SpaceCommand; import platform.client.fp10.core.type.IGameObject; import platform.client.fp10.core.type.ISpace; public class FacebookPaymentModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var _getPaymentTransactionId:Long = Long.getLong(740608133,1049378955); private var _getPaymentTransaction_shopItemIdCodec:ICodec; private var model:IModel; public function FacebookPaymentModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); this._getPaymentTransaction_shopItemIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false)); } public function getPaymentTransaction(param1:Long) : void { ByteArray(this.protocolBuffer.writer).position = 0; ByteArray(this.protocolBuffer.writer).length = 0; this._getPaymentTransaction_shopItemIdCodec.encode(this.protocolBuffer,param1); ByteArray(this.protocolBuffer.writer).position = 0; if(Model.object == null) { throw new Error("Execute method without model context."); } var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._getPaymentTransactionId,this.protocolBuffer); var local3:IGameObject = Model.object; var local4:ISpace = local3.space; local4.commandSender.sendCommand(local2); this.protocolBuffer.optionalMap.clear(); } } }
package projects.tanks.client.battleservice.model.statistics { import alternativa.types.Long; public interface IStatisticsModelBase { function fundChange(param1:int) : void; function onRankChanged(param1:Long, param2:int, param3:Boolean) : void; function resetBattleName() : void; function roundFinish(param1:Boolean, param2:Vector.<UserReward>, param3:int) : void; function roundStart(param1:int, param2:Boolean) : void; function roundStop() : void; function setBattleName(param1:String) : void; function statusProbablyCheaterChanged(param1:Long, param2:Boolean) : void; } }
package controls.statassets { import assets.stat.hall_HEADER; import flash.display.BitmapData; public class StatLineHeader extends StatLineBase { protected var _selected:Boolean = false; public function StatLineHeader() { super(); tl = new hall_HEADER(1,1); px = new BitmapData(1,1,false,5898034); } public function set selected(param1:Boolean) : void { this._selected = param1; this.draw(); } override protected function draw() : void { super.draw(); } } }
package alternativa.tanks.service.fps { import alternativa.osgi.service.display.IDisplay; import flash.events.Event; import flash.utils.getTimer; public class FPSServiceImpl implements FPSService { [Inject] public static var dispay:IDisplay; private var fps:Number; private var frameTime:Number; private var lastTime:int; private var numFrames:int; private var deactiave:Boolean; private var starting:Boolean; public function FPSServiceImpl() { super(); } public function start() : void { this.setFps(dispay.stage.frameRate); dispay.stage.addEventListener(Event.ENTER_FRAME,this.onEnterFrame); dispay.stage.addEventListener(Event.DEACTIVATE,this.onDeactivate); this.deactiave = false; this.starting = true; } private function onActivate(param1:Event) : void { if(param1.target == dispay.stage) { dispay.stage.removeEventListener(Event.ACTIVATE,this.onActivate); this.deactiave = false; this.starting = true; } } private function onDeactivate(param1:Event) : void { if(param1.target == dispay.stage) { dispay.stage.addEventListener(Event.ACTIVATE,this.onActivate); this.deactiave = true; } } private function onEnterFrame(param1:Event) : void { if(this.deactiave) { return; } if(this.starting) { this.lastTime = getTimer(); this.numFrames = 0; this.starting = false; return; } var local2:int = getTimer(); ++this.numFrames; if(local2 - this.lastTime > 2000) { this.setFps(1000 * this.numFrames / (local2 - this.lastTime)); this.lastTime = local2; this.numFrames = 0; } } private function setFps(param1:Number) : void { this.fps = param1; this.frameTime = 1000 / param1; } public function getFps() : Number { return this.fps; } public function getFrameTimeMS() : Number { return this.frameTime; } } }
package projects.tanks.client.clans.clan.clanfriends { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.CollectionCodecInfo; import alternativa.protocol.info.TypeCodecInfo; import alternativa.types.Long; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; public class ClanFriendsModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:ClanFriendsModelServer; private var client:IClanFriendsModelBase = IClanFriendsModelBase(this); private var modelId:Long = Long.getLong(1889621503,1893984398); private var _onUserAddId:Long = Long.getLong(2135860306,-1585042188); private var _onUserAdd_idCodec:ICodec; private var _onUserRemoveId:Long = Long.getLong(526095397,633372847); private var _onUserRemove_idCodec:ICodec; private var _userJoinClanId:Long = Long.getLong(489547868,-896284526); private var _userJoinClan_usersIdCodec:ICodec; public function ClanFriendsModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new ClanFriendsModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ClanFriendsCC,false))); this._onUserAdd_idCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false)); this._onUserRemove_idCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false)); this._userJoinClan_usersIdCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Long,false),false,1)); } protected function getInitParam() : ClanFriendsCC { return ClanFriendsCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._onUserAddId: this.client.onUserAdd(Long(this._onUserAdd_idCodec.decode(param2))); break; case this._onUserRemoveId: this.client.onUserRemove(Long(this._onUserRemove_idCodec.decode(param2))); break; case this._userJoinClanId: this.client.userJoinClan(this._userJoinClan_usersIdCodec.decode(param2) as Vector.<Long>); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.battlefield.models.battle.jgr.killstreak { 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; public class KillStreakModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:KillStreakModelServer; private var client:IKillStreakModelBase = IKillStreakModelBase(this); private var modelId:Long = Long.getLong(1192985770,445553764); private var _killStreakAchivedId:Long = Long.getLong(966829750,1086968099); private var _killStreakAchived_indexCodec:ICodec; public function KillStreakModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new KillStreakModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(KillStreakCC,false))); this._killStreakAchived_indexCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); } protected function getInitParam() : KillStreakCC { return KillStreakCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._killStreakAchivedId: this.client.killStreakAchived(int(this._killStreakAchived_indexCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package projects.tanks.client.panel.model.payment { public class CrystalsPaymentCC { private var _accountId:String; private var _calculatorEnabled:Boolean; private var _crystalCost:Number; private var _defaultAmountOfCrystals:int; private var _greaterMaximumCrystalsMessage:String; private var _greaterMaximumMoneyMessage:String; private var _lessMinimumCrystalsMessage:String; private var _lessMinimumMoneyMessage:String; private var _manualDescription:String; private var _paymentPackages:Vector.<PaymentPackage>; public function CrystalsPaymentCC(param1:String = null, param2:Boolean = false, param3:Number = 0, param4:int = 0, param5:String = null, param6:String = null, param7:String = null, param8:String = null, param9:String = null, param10:Vector.<PaymentPackage> = null) { super(); this._accountId = param1; this._calculatorEnabled = param2; this._crystalCost = param3; this._defaultAmountOfCrystals = param4; this._greaterMaximumCrystalsMessage = param5; this._greaterMaximumMoneyMessage = param6; this._lessMinimumCrystalsMessage = param7; this._lessMinimumMoneyMessage = param8; this._manualDescription = param9; this._paymentPackages = param10; } public function get accountId() : String { return this._accountId; } public function set accountId(param1:String) : void { this._accountId = param1; } public function get calculatorEnabled() : Boolean { return this._calculatorEnabled; } public function set calculatorEnabled(param1:Boolean) : void { this._calculatorEnabled = param1; } public function get crystalCost() : Number { return this._crystalCost; } public function set crystalCost(param1:Number) : void { this._crystalCost = param1; } public function get defaultAmountOfCrystals() : int { return this._defaultAmountOfCrystals; } public function set defaultAmountOfCrystals(param1:int) : void { this._defaultAmountOfCrystals = param1; } public function get greaterMaximumCrystalsMessage() : String { return this._greaterMaximumCrystalsMessage; } public function set greaterMaximumCrystalsMessage(param1:String) : void { this._greaterMaximumCrystalsMessage = param1; } public function get greaterMaximumMoneyMessage() : String { return this._greaterMaximumMoneyMessage; } public function set greaterMaximumMoneyMessage(param1:String) : void { this._greaterMaximumMoneyMessage = param1; } public function get lessMinimumCrystalsMessage() : String { return this._lessMinimumCrystalsMessage; } public function set lessMinimumCrystalsMessage(param1:String) : void { this._lessMinimumCrystalsMessage = param1; } public function get lessMinimumMoneyMessage() : String { return this._lessMinimumMoneyMessage; } public function set lessMinimumMoneyMessage(param1:String) : void { this._lessMinimumMoneyMessage = param1; } public function get manualDescription() : String { return this._manualDescription; } public function set manualDescription(param1:String) : void { this._manualDescription = param1; } public function get paymentPackages() : Vector.<PaymentPackage> { return this._paymentPackages; } public function set paymentPackages(param1:Vector.<PaymentPackage>) : void { this._paymentPackages = param1; } public function toString() : String { var local1:String = "CrystalsPaymentCC ["; local1 += "accountId = " + this.accountId + " "; local1 += "calculatorEnabled = " + this.calculatorEnabled + " "; local1 += "crystalCost = " + this.crystalCost + " "; local1 += "defaultAmountOfCrystals = " + this.defaultAmountOfCrystals + " "; local1 += "greaterMaximumCrystalsMessage = " + this.greaterMaximumCrystalsMessage + " "; local1 += "greaterMaximumMoneyMessage = " + this.greaterMaximumMoneyMessage + " "; local1 += "lessMinimumCrystalsMessage = " + this.lessMinimumCrystalsMessage + " "; local1 += "lessMinimumMoneyMessage = " + this.lessMinimumMoneyMessage + " "; local1 += "manualDescription = " + this.manualDescription + " "; local1 += "paymentPackages = " + this.paymentPackages + " "; return local1 + "]"; } } }
package forms.battlelist { import alternativa.init.Main; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.locale.constants.TextConst; import assets.icons.BattleInfoIcons; import assets.icons.InputCheckIcon; import controls.NumStepper; import controls.RedButton; import controls.TankCheckBox; import controls.TankCombo; import controls.TankInput; import controls.TankWindow; import controls.TankWindowHeader; import controls.TypeBattleButton; import controls.slider.SelectRank; import flash.display.Sprite; import flash.events.Event; import flash.events.FocusEvent; import flash.events.MouseEvent; import flash.events.TimerEvent; import flash.utils.Dictionary; import flash.utils.Timer; import forms.events.BattleListEvent; import forms.events.LoginFormEvent; import forms.events.SliderEvent; public class CreateBattleForm extends Sprite { public static const NAMEGAME_STATE_OFF:int = 0; public static const NAMEGAME_STATE_PROGRESS:int = 1; public static const NAMEGAME_STATE_VALID:int = 2; public static const NAMEGAME_STATE_INVALID:int = 3; private var mainBackground:TankWindow; public var mapsCombo:TankCombo; public var nameGame:TankInput; public var nameGameCheckIcon:InputCheckIcon; public var themeCombo:TankCombo; private var dmCheck:TypeBattleButton; private var tdmCheck:TypeBattleButton; private var ctfCheck:TypeBattleButton; private var domCheck:TypeBattleButton; private var ab:TankCheckBox; private var ff:TankCheckBox; private var privateCheck:TankCheckBox; private var hrModeCheck:TankCheckBox; private var payCheck:TankCheckBox; private var inventoryCheck:TankCheckBox; private var players:NumStepper; private var minutes:NumStepper; private var kills:NumStepper; private var flags:NumStepper; private var points:NumStepper; public var info:BattleInfo; private var selectRang:SelectRank; private var _currentRang:int = 1; private var delayTimer:Timer; private var autoname:Boolean = true; private var startButton:RedButton; private var MAP_NAME_LABEL:String = ""; private var MAP_TYPE_LABEL:String = ""; private var MAP_THEME_LABEL:String = ""; private var BUTTON_DEATHMATCH:String = ""; private var BUTTON_TEAM_DEATHMATCH:String = ""; private var BUTTON_CAPTURE_THE_FLAG:String = ""; private var BUTTON_START:String = ""; private var STEPPER_MAX_PLAYERS:String = ""; private var STEPPER_MAX_TEAM_SIZE:String = ""; private var STEPPER_TIME_LIMIT:String = ""; private var STEPPER_KILLS_LIMIT:String = ""; private var STEPPER_FLAG_LIMIT:String = ""; private var CHECKBOX_AUTOBALANCE:String = ""; private var CHECKBOX_FRIENDLY_FIRE:String = ""; private var CHECKBOX_PRIVATE_BATTLE:String = ""; private var CHECKBOX_PAY_BATTLE:String = ""; private var CHECKBOX_HR_MODE:String = ""; private var CHECKBOX_BONUS:String = ""; private var COST_LABEL:String = ""; private var costLabel:TankInput; private var _haveSubscribe:Boolean; private var noSubscribeAlert:NoSubScribeAlert; private var searchTimer:Timer; private var mapsarr:Array; private var mapsThemes:Dictionary; private var _nameGameState:int = 0; private var maxP:int = 0; private var ctfEnable:Boolean = false; private var tdmEnable:Boolean = false; private var domEnable:Boolean = false; private var typeGame:String = "DM"; public function CreateBattleForm(haveSubscribe:Boolean) { this.mapsCombo = new TankCombo(); this.themeCombo = new TankCombo(); this.dmCheck = new TypeBattleButton(); this.tdmCheck = new TypeBattleButton(); this.ctfCheck = new TypeBattleButton(); this.domCheck = new TypeBattleButton(); this.ab = new TankCheckBox(); this.ff = new TankCheckBox(); this.privateCheck = new TankCheckBox(); this.hrModeCheck = new TankCheckBox(); this.payCheck = new TankCheckBox(); this.inventoryCheck = new TankCheckBox(); this.players = new NumStepper(); this.minutes = new NumStepper(); this.kills = new NumStepper(); this.flags = new NumStepper(); this.points = new NumStepper(10); this.info = new BattleInfo(); this.selectRang = new SelectRank(); this.startButton = new RedButton(); this.costLabel = new TankInput(); this.noSubscribeAlert = new NoSubScribeAlert(); this.searchTimer = new Timer(1200); this.mapsarr = new Array(); this.mapsThemes = new Dictionary(); super(); addEventListener(Event.ADDED_TO_STAGE,this.ConfigUI); addEventListener(Event.ADDED_TO_STAGE,this.addResizeListener); addEventListener(Event.REMOVED_FROM_STAGE,this.removeResizeListener); this._haveSubscribe = haveSubscribe; } public function get gameName() : String { return this.nameGame.value; } public function set gameName(value:String) : void { removeEventListener(LoginFormEvent.TEXT_CHANGED,this.checkName); this.nameGame.value = value; addEventListener(LoginFormEvent.TEXT_CHANGED,this.checkName); this.nameGameState = NAMEGAME_STATE_OFF; this.calculatePayment(); } public function set maps(array:Array) : void { var item:BattleMap = null; var theme:String = null; this.mapsarr = array; this.mapsCombo.clear(); this.mapsThemes = new Dictionary(); for(var i:int = 0; i < array.length; i++) { item = array[i] as BattleMap; theme = item.themeName; if(this._currentRang <= item.maxRank) { if(this.mapsThemes[item.gameName] == null) { this.mapsThemes[item.gameName] = new Dictionary(); this.mapsCombo.addItem({ "gameName":item.gameName, "id":item.id, "preview":item.preview, "minRank":item.minRank, "maxRank":item.maxRank, "rang":(this._currentRang >= item.minRank ? 0 : item.minRank), "maxP":item.maxPeople, "ctf":item.ctf, "tdm":item.tdm, "dom":item.dom, "hr":item.hr }); } this.mapsThemes[item.gameName][theme] = item.id; } } this.mapsCombo.sortOn(["rang","gameName"],[Array.NUMERIC,null]); var itemm:Object = this.mapsCombo.selectedItem; var min:int = itemm.minRank < 1 ? int(1) : int(itemm.minRank); var max:int = itemm.maxRank > 30 ? int(30) : int(itemm.maxRank); this.info.setUp("","",0,0,0,0,0); this.selectRang.maxValue = max; this.selectRang.minValue = min; if(this.selectRang.minRang < this.selectRang.minValue) { this.selectRang.minRang = this.selectRang.minValue; } if(this.selectRang.maxRang > this.selectRang.maxValue) { this.selectRang.maxRang = this.selectRang.maxValue; } this.players.maxValue = this.players.value = !this.dmCheck.enable ? int(itemm.maxP) : int(int(itemm.maxP / 2)); this.maxP = itemm.maxP; this.ctfEnable = itemm.ctf; this.tdmEnable = itemm.tdm; this.domEnable = itemm.dom; this.ctfCheck.visible = this.ctfEnable; this.hrModeCheck.visible = itemm.hr; this.hrModeCheck.checked = false; this.tdmCheck.visible = this.tdmEnable; if(!this.ctfEnable && !this.deathMatch) { this.dmCheck.enable = true; this.tdmCheck.enable = false; this.ctfCheck.enable = true; this.domCheck.enable = true; this.ff.visible = true; this.ab.visible = true; this.players.maxValue = int(this.maxP / 2); this.players.minValue = 1; this.players.value = int(this.maxP / 2); this.players.label = this.STEPPER_MAX_TEAM_SIZE; this.flags.visible = false; this.kills.visible = true; this.points.visible = false; } else if(this.ctfEnable) { this.flags.visible = this.ctfEnable && !this.ctfCheck.enable; this.kills.visible = !this.flags.visible && !this.points.visible; this.points.visible = false; } else if(this.domEnable) { this.flags.visible = false; this.kills.visible = false; this.points.visible = true; } if(stage != null) { this.onResize(null); } this.updateThemesCombo(this.mapsCombo.selectedItem); this.mapsCombo.dispatchEvent(new Event(Event.CHANGE)); } public function set currentRang(value:int) : void { this._currentRang = this.selectRang.currentRang = value; this.selectRang.minRang = this._currentRang - 2; this.selectRang.maxRang = this._currentRang + 2; this.maps = this.mapsarr; this.onChange(null); } public function get mapName() : String { return this.mapsCombo.selectedItem.gameName; } public function get mapID() : Object { return this.themeCombo.selectedItem.id; } public function get deathMatch() : Boolean { return !this.dmCheck.enable; } public function get autoBalance() : Boolean { return this.ab.checked; } public function get friendlyFire() : Boolean { return this.ff.checked; } public function get PrivateBattle() : Boolean { return this.privateCheck.checked; } public function get HrMode() : Boolean { return this.hrModeCheck.checked; } public function get PayBattle() : Boolean { return this.payCheck.checked; } public function get inventoryBattle() : Boolean { return this.payCheck.checked && this.inventoryCheck.checked; } public function get CaptureTheFlag() : Boolean { return !this.ctfCheck.enable; } public function get Team() : Boolean { return !this.tdmCheck.enable; } public function get DOM() : Boolean { return !this.domCheck.enable; } public function get time() : int { return this.minutes.value * 60; } public function get numPlayers() : int { return this.players.value; } public function get numKills() : int { return this.kills.value; } public function get numFlags() : int { return this.flags.value; } public function get numPoints() : int { return this.points.value; } public function get haveSubscribe() : Boolean { return this._haveSubscribe; } public function set haveSubscribe(value:Boolean) : void { this._haveSubscribe = value; this.onPayCheckClick(); } private function addResizeListener(e:Event) : void { this.autoname = true; this.startButton.enable = false; this.nameGame.textField.addEventListener(FocusEvent.FOCUS_IN,this.checkAutoName); this.nameGame.textField.addEventListener(FocusEvent.FOCUS_OUT,this.checkAutoName); addEventListener(LoginFormEvent.TEXT_CHANGED,this.checkName); stage.addEventListener(Event.RESIZE,this.onResize); this.onResize(null); } private function removeResizeListener(e:Event) : void { stage.removeEventListener(Event.RESIZE,this.onResize); removeEventListener(LoginFormEvent.TEXT_CHANGED,this.checkName); this.nameGame.textField.removeEventListener(FocusEvent.FOCUS_IN,this.checkAutoName); this.nameGame.textField.removeEventListener(FocusEvent.FOCUS_OUT,this.checkAutoName); } public function get minRang() : int { return this.selectRang.minRang; } public function get maxRang() : int { return this.selectRang.maxRang; } private function ConfigUI(e:Event) : void { var localeService:ILocaleService = Main.osgi.getService(ILocaleService) as ILocaleService; this.MAP_NAME_LABEL = localeService.getText(TextConst.BATTLE_CREATE_PANEL_MAP_NAME_LABEL); this.MAP_TYPE_LABEL = localeService.getText(TextConst.BATTLE_CREATE_PANEL_MAP_TYPE_LABEL); this.MAP_THEME_LABEL = localeService.getText(TextConst.BATTLE_CREATE_PANEL_MAP_THEME_LABEL); this.BUTTON_DEATHMATCH = localeService.getText(TextConst.BATTLE_CREATE_PANEL_BUTTON_DEATHMATCH); this.BUTTON_TEAM_DEATHMATCH = localeService.getText(TextConst.BATTLE_CREATE_PANEL_BUTTON_TEAM_DEATHMATCH); this.BUTTON_CAPTURE_THE_FLAG = localeService.getText(TextConst.BATTLE_CREATE_PANEL_BUTTON_CAPTURE_THE_FLAG); this.BUTTON_START = localeService.getText(TextConst.BATTLE_CREATE_PANEL_BUTTON_START); this.STEPPER_MAX_PLAYERS = localeService.getText(TextConst.BATTLE_CREATE_PANEL_STEPPER_MAX_PLAYERS); this.STEPPER_MAX_TEAM_SIZE = localeService.getText(TextConst.BATTLE_CREATE_PANEL_STEPPER_MAX_TEAM_SIZE); this.STEPPER_TIME_LIMIT = localeService.getText(TextConst.BATTLE_CREATE_PANEL_STEPPER_TIME_LIMIT); this.STEPPER_KILLS_LIMIT = localeService.getText(TextConst.BATTLE_CREATE_PANEL_STEPPER_KILLS_LIMIT); this.STEPPER_FLAG_LIMIT = localeService.getText(TextConst.BATTLE_CREATE_PANEL_STEPPER_FLAG_LIMIT); this.CHECKBOX_AUTOBALANCE = localeService.getText(TextConst.BATTLE_CREATE_PANEL_CHECKBOX_AUTOBALANCE); this.CHECKBOX_FRIENDLY_FIRE = localeService.getText(TextConst.BATTLE_CREATE_PANEL_CHECKBOX_FRIENDLY_FIRE); this.CHECKBOX_PRIVATE_BATTLE = localeService.getText(TextConst.BATTLE_CREATE_PANEL_CHECKBOX_PRIVATE_BATTLE); this.CHECKBOX_PAY_BATTLE = localeService.getText(TextConst.BATTLE_CREATE_PANEL_CHECKBOX_PAY_BATTLE); this.CHECKBOX_HR_MODE = localeService.getText(TextConst.BATTLE_CREATE_PANEL_CHECKBOX_HR_MODE); this.CHECKBOX_BONUS = localeService.getText(TextConst.BATTLE_CREATE_PANEL_CHECKBOX_BONUS_BATTLE); this.COST_LABEL = localeService.getText(TextConst.BATTLE_CREATE_PANEL_LABEL_COST_BATTLE) + ": "; removeEventListener(Event.ADDED_TO_STAGE,this.ConfigUI); this.mainBackground = new TankWindow(); this.mainBackground.headerLang = localeService.getText(TextConst.GUI_LANG); this.mainBackground.header = TankWindowHeader.CREATE_BATTLE; addChild(this.mainBackground); this.nameGame = new TankInput(); this.nameGameCheckIcon = new InputCheckIcon(); this.searchTimer.addEventListener(TimerEvent.TIMER,this.updateByTime); this.nameGame.label = this.MAP_NAME_LABEL; this.nameGame.x = this.nameGame.width - this.nameGame.textField.width + 10; this.nameGame.y = 11; this.nameGameCheckIcon.y = 18; this.nameGame.maxChars = 25; addChild(this.nameGame); addChild(this.nameGameCheckIcon); this.nameGameState = NAMEGAME_STATE_OFF; addChild(this.ab); addChild(this.ff); addChild(this.privateCheck); addChild(this.hrModeCheck); addChild(this.payCheck); this.payCheck.type = TankCheckBox.PAY; this.payCheck.label = this.CHECKBOX_PAY_BATTLE; this.payCheck.addEventListener(MouseEvent.CLICK,this.onPayCheckClick); this.payCheck.visible = true; addChild(this.inventoryCheck); this.inventoryCheck.type = TankCheckBox.INVENTORY; this.inventoryCheck.label = this.CHECKBOX_BONUS; this.inventoryCheck.visible = false; addChild(this.players); this.players.icon = BattleInfoIcons.PLAYERS; this.players.addEventListener(Event.CHANGE,this.calculatePayment); addChild(this.minutes); this.minutes.label = this.STEPPER_TIME_LIMIT; this.minutes.icon = BattleInfoIcons.TIME_LIMIT; this.minutes.addEventListener(Event.CHANGE,this.calculatePayment); addChild(this.kills); this.kills.label = this.STEPPER_KILLS_LIMIT; this.kills.icon = BattleInfoIcons.KILL_LIMIT; this.kills.addEventListener(Event.CHANGE,this.calculatePayment); addChild(this.flags); this.flags.label = this.STEPPER_FLAG_LIMIT; this.flags.icon = BattleInfoIcons.CTF; this.flags.visible = false; this.flags.addEventListener(Event.CHANGE,this.calculatePayment); addChild(this.points); this.points.label = localeService.getText(TextConst.BATTLE_STAT_SCORE); this.points.icon = 100; this.points.visible = false; this.points.addEventListener(Event.CHANGE,this.calculatePayment); this.minutes.minValue = 0; this.minutes.maxValue = 999; this.minutes.value = 15; this.kills.minValue = 0; this.kills.maxValue = 999; this.flags.minValue = 0; this.flags.maxValue = 999; this.points.minValue = 0; this.points.maxValue = 999; this.players.label = this.STEPPER_MAX_PLAYERS; this.startButton.x = 320; addChild(this.startButton); addChild(this.info); this.info.x = 11; this.info.y = 81; addChild(this.selectRang); this.selectRang.x = 11; this.selectRang.minValue = 1; this.selectRang.maxValue = 30; this.selectRang.tickInterval = 1; this.selectRang.addEventListener(SliderEvent.CHANGE_VALUE,this.onSliderChangeValue); this.dmCheck.label = this.BUTTON_DEATHMATCH; this.tdmCheck.label = this.BUTTON_TEAM_DEATHMATCH; this.tdmCheck.enable = true; this.ctfCheck.label = this.BUTTON_CAPTURE_THE_FLAG; this.ctfCheck.enable = true; this.domCheck.label = "DOM"; this.domCheck.enable = true; addChild(this.dmCheck); addChild(this.tdmCheck); addChild(this.ctfCheck); addChild(this.domCheck); this.dmCheck.enable = false; this.ab.checked = true; this.ff.checked = false; this.ff.visible = false; this.ab.visible = false; this.dmCheck.addEventListener(MouseEvent.CLICK,this.triggerTypeGame); this.tdmCheck.addEventListener(MouseEvent.CLICK,this.triggerTypeGame); this.ctfCheck.addEventListener(MouseEvent.CLICK,this.triggerTypeGame); this.domCheck.addEventListener(MouseEvent.CLICK,this.triggerTypeGame); this.ab.type = TankCheckBox.AUTO_BALANCE; this.ab.label = this.CHECKBOX_AUTOBALANCE; this.ff.type = TankCheckBox.FRIENDLY_FIRE; this.ff.label = this.CHECKBOX_FRIENDLY_FIRE; this.privateCheck.type = TankCheckBox.INVITE_ONLY; this.privateCheck.label = this.CHECKBOX_PRIVATE_BATTLE; this.hrModeCheck.type = TankCheckBox.CHECK_SIGN; this.hrModeCheck.label = this.CHECKBOX_HR_MODE; this.startButton.label = this.BUTTON_START; this.startButton.addEventListener(MouseEvent.CLICK,this.startGame); this.mapsCombo.label = this.MAP_TYPE_LABEL; this.mapsCombo.y = 46; this.mapsCombo.x = this.nameGame.width - this.nameGame.textField.width + 10; addChild(this.mapsCombo); this.themeCombo.y = 46; this.themeCombo.label = this.MAP_THEME_LABEL; addChild(this.themeCombo); addChild(this.noSubscribeAlert); this.noSubscribeAlert.visible = false; visible = true; this.calculatePayment(); this.mapsCombo.addEventListener(Event.CHANGE,this.onChange); this.onChange(null); this.mapsCombo.height = 270; } public function set nameGameState(value:int) : void { this._nameGameState = value; if(value == NAMEGAME_STATE_OFF) { this.nameGameCheckIcon.visible = false; Main.writeVarsToConsoleChannel("BATTLE SELECT","NameChechIcon OFF"); } else { Main.writeVarsToConsoleChannel("BATTLE SELECT","NameChechIcon ON"); this.nameGameCheckIcon.visible = true; this.nameGameCheckIcon.gotoAndStop(value); } } public function get nameGameState() : int { return this._nameGameState; } private function onPayCheckClick(e:MouseEvent = null) : void { if(!this._haveSubscribe) { this.payCheck.checked = false; } this.inventoryCheck.visible = this.payCheck.checked && this._haveSubscribe; this.noSubscribeAlert.visible = !this._haveSubscribe; this.payCheck.visible = this._haveSubscribe; this.inventoryCheck.checked = !this.payCheck.checked; this.calculatePayment(); } private function calculatePayment(e:Event = null) : void { if(this.payCheck.checked) { this.startButton.enable = this._haveSubscribe && this.nameGame.validValue && this.nameGameState == NAMEGAME_STATE_OFF; } else { this.startButton.enable = ((!this.dmCheck.enable || !this.tdmCheck.enable) && (this.time > 0 || this.numKills > 0) || !this.ctfCheck.enable && (this.time > 0 || this.numFlags > 0) || !this.domCheck.enable && (this.time > 0 || this.numPoints > 0)) && this.nameGame.validValue && this.nameGameState == NAMEGAME_STATE_OFF; } this.costLabel.value = Boolean(this.COST_LABEL + this._haveSubscribe) ? "yes" : "no"; this.onResize(null); } private function checkName(e:LoginFormEvent) : void { this.nameGame.validValue = this.nameGame.textField.length > 0; this.startButton.enable = false; if(e != null) { this.searchTimer.stop(); this.searchTimer.start(); } } private function setAutoName() : void { var item:Object = this.mapsCombo.selectedItem; var aname:String = item.gameName + " " + this.typeGame; if(this.autoname) { this.gameName = aname; this.nameGame.validValue = true; this.calculatePayment(); } else { this.checkName(null); } } private function checkAutoName(e:FocusEvent = null) : void { if(e.type == FocusEvent.FOCUS_IN) { this.nameGameState = NAMEGAME_STATE_OFF; this.startButton.enable = this.nameGame.textField.length > 0; if(this.autoname) { this.gameName = ""; this.autoname = false; this.checkName(null); } this.nameGameState = NAMEGAME_STATE_OFF; } if(e.type == FocusEvent.FOCUS_OUT) { if(this.nameGame.textField.length == 0) { this.autoname = true; this.setAutoName(); } } } private function updateThemesCombo(selectedMap:Object) : void { var themeName:* = null; var themes:Dictionary = this.mapsThemes[selectedMap.gameName]; var length:int = 0; if(themes != null) { this.themeCombo.clear(); for(themeName in themes) { length++; this.themeCombo.addItem({ "gameName":themeName, "id":themes[themeName], "rang":0 }); } this.themeCombo.visible = length > 1; } this.themeCombo.sortOn(["gameName"],Array.DESCENDING); this.themeCombo.dispatchEvent(new Event(Event.CHANGE)); this.themeCombo.height = 35 + length * 20; this.themeCombo.listWidth -= 5; } private function onChange(e:Event) : void { var item:Object = this.mapsCombo.selectedItem; var min:int = item.minRank < 1 ? int(1) : int(item.minRank); var max:int = item.maxRank > 30 ? int(30) : int(item.maxRank); this.info.setUp("","",0,0,0,0,0); this.selectRang.maxValue = max; this.selectRang.minValue = min; if(this.selectRang.minRang < this.selectRang.minValue) { this.selectRang.minRang = this.selectRang.minValue; } if(this.selectRang.maxRang > this.selectRang.maxValue) { this.selectRang.maxRang = this.selectRang.maxValue; } this.players.maxValue = this.players.value = !this.dmCheck.enable ? int(item.maxP) : int(int(item.maxP / 2)); this.maxP = item.maxP; this.ctfEnable = item.ctf; this.ctfCheck.visible = this.ctfEnable; this.tdmEnable = item.tdm; this.ctfCheck.visible = this.ctfEnable; this.tdmCheck.visible = this.tdmEnable; this.domEnable = item.dom; this.hrModeCheck.visible = item.hr; this.hrModeCheck.checked = false; this.domCheck.visible = this.domEnable; if(!this.tdmEnable) { this.triggerTypeGame(); } if(!this.ctfEnable && !this.deathMatch) { this.dmCheck.enable = true; this.tdmCheck.enable = false; this.ctfCheck.enable = true; this.ff.visible = true; this.ab.visible = true; this.players.maxValue = int(this.maxP / 2); this.players.minValue = 1; this.players.value = int(this.maxP / 2); this.players.label = this.STEPPER_MAX_TEAM_SIZE; this.flags.visible = false; this.kills.visible = true; this.points.visible = false; } else if(this.ctfEnable) { this.flags.visible = this.ctfEnable && !this.ctfCheck.enable; this.kills.visible = !this.flags.visible; this.points.visible = false; } else if(this.domEnable) { this.flags.visible = false; this.kills.visible = false; this.points.visible = true; } this.updateThemesCombo(item); this.onResize(null); this.setAutoName(); this.calculatePayment(); } private function startGame(e:MouseEvent) : void { dispatchEvent(new BattleListEvent(BattleListEvent.START_CREATED_GAME)); } private function triggerTypeGame(e:MouseEvent = null) : void { var trgt:TypeBattleButton = null; if(e != null) { trgt = e.currentTarget as TypeBattleButton; } Main.writeVarsToConsoleChannel("BATTLE SELECT","Create Battle type %1",e); if(trgt == this.dmCheck || e == null) { this.dmCheck.enable = false; this.tdmCheck.enable = true; this.ctfCheck.enable = true; this.domCheck.enable = true; this.ff.visible = false; this.ab.visible = false; this.players.maxValue = this.maxP; this.players.minValue = 2; this.players.value = this.maxP; this.typeGame = "DM"; this.players.label = this.STEPPER_MAX_PLAYERS; this.flags.visible = false; this.kills.visible = true; this.points.visible = false; } else if(trgt == this.tdmCheck) { this.dmCheck.enable = true; this.tdmCheck.enable = false; this.ctfCheck.enable = true; this.domCheck.enable = true; this.ff.visible = true; this.ab.visible = true; this.players.maxValue = int(this.maxP / 2); this.players.minValue = 1; this.players.value = int(this.maxP / 2); this.players.label = this.STEPPER_MAX_TEAM_SIZE; this.typeGame = "TDM"; this.flags.visible = false; this.kills.visible = true; this.points.visible = false; } else if(trgt == this.ctfCheck) { this.dmCheck.enable = true; this.ctfCheck.enable = false; this.tdmCheck.enable = true; this.domCheck.enable = true; this.ff.visible = true; this.ab.visible = true; this.players.maxValue = int(this.maxP / 2); this.players.minValue = 1; this.players.value = int(this.maxP / 2); this.players.label = this.STEPPER_MAX_TEAM_SIZE; this.flags.visible = true; this.kills.visible = false; this.points.visible = false; this.typeGame = "CTF"; } else { this.dmCheck.enable = true; this.ctfCheck.enable = true; this.tdmCheck.enable = true; this.domCheck.enable = false; this.ff.visible = true; this.ab.visible = true; this.players.maxValue = int(this.maxP / 2); this.players.minValue = 1; this.players.value = int(this.maxP / 2); this.players.label = this.STEPPER_MAX_TEAM_SIZE; this.flags.visible = false; this.kills.visible = false; this.points.visible = true; this.typeGame = "DOM"; } this.onResize(null); this.setAutoName(); stage.focus = null; this.calculatePayment(); } private function onResize(e:Event) : void { var numSpace:int = 0; if(stage == null) { return; } var minWidth:int = int(Math.max(1000,stage.stageWidth)); this.mainBackground.width = minWidth / 3; this.mainBackground.height = Math.max(stage.stageHeight - 60,530); this.x = this.mainBackground.width * 2; this.y = 60; this.nameGame.width = this.mainBackground.width - this.nameGame._label.textWidth - 35; this.nameGameCheckIcon.x = this.mainBackground.width - this.nameGameCheckIcon.width - 11; var countOfThemes:int = this.amountOfThemesForMap(this.mapsCombo.selectedItem.gameName); if(countOfThemes > 1) { this.mapsCombo.width = int(this.mainBackground.width / 2 - this.mapsCombo.x - 11); this.themeCombo.x = this.mainBackground.width / 2 + this.mapsCombo.x; this.themeCombo.width = int(this.mainBackground.width / 2 - this.mapsCombo.x - 11); } else { this.mapsCombo.width = this.mainBackground.width - this.nameGame._label.textWidth - 35; } this.info.width = this.mainBackground.width - 22; this.info.height = int(this.mainBackground.height - 415); this.selectRang.y = this.info.height + 86; this.selectRang.width = this.info.width; this.dmCheck.x = 11; this.dmCheck.y = this.selectRang.y + 35; var countEnable:int = 1; if(this.domEnable) { countEnable++; } if(this.ctfEnable) { countEnable++; } if(this.tdmEnable) { countEnable++; } this.dmCheck.width = int(this.info.width / countEnable - 2.5); this.tdmCheck.x = this.dmCheck.width + 16; this.tdmCheck.y = this.dmCheck.y; this.tdmCheck.width = this.dmCheck.width; this.ctfCheck.x = !!this.tdmEnable ? Number(this.tdmCheck.width + this.tdmCheck.x + 5) : Number(this.dmCheck.width + 16); this.ctfCheck.y = this.dmCheck.y; this.ctfCheck.width = this.dmCheck.width; this.domCheck.x = !!this.ctfEnable ? Number(this.ctfCheck.x + this.ctfCheck.width + 5) : (!!this.tdmEnable ? Number(this.tdmCheck.width + this.tdmCheck.x + 16) : Number(this.dmCheck.width + 16)); this.domCheck.y = this.dmCheck.y; this.domCheck.width = this.dmCheck.width; this.flags.y = this.kills.y = this.minutes.y = this.players.y = this.dmCheck.y + 80; numSpace = int((this.mainBackground.width - this.players.width - this.minutes.width - this.kills.width) / 4); this.players.x = numSpace; this.minutes.x = this.players.width + numSpace * 2; this.kills.x = this.players.width + this.minutes.width + numSpace * 3; this.flags.x = this.players.width + this.minutes.width + numSpace * 3; this.points.x = this.players.width + this.minutes.width + numSpace * 3; this.ff.y = this.ab.y = this.players.y + 45; this.noSubscribeAlert.x = numSpace; this.noSubscribeAlert.width = this.mainBackground.width - numSpace * 2; numSpace = int((this.mainBackground.width - this.ab.width - this.ff.width) / 3); this.ab.x = numSpace; this.ff.x = numSpace * 2 + this.ab.width; this.privateCheck.x = 11; this.privateCheck.y = this.mainBackground.height - 42; this.startButton.x = this.mainBackground.width - this.startButton.width - 11; this.startButton.y = this.mainBackground.height - 42; this.payCheck.x = this.ab.x; this.payCheck.y = this.ab.y + 40; this.inventoryCheck.x = this.ff.x; this.inventoryCheck.y = this.ff.y + 40; this.hrModeCheck.x = this.ab.x; this.hrModeCheck.y = this.payCheck.y + 40; this.noSubscribeAlert.y = this.payCheck.y; if(this.delayTimer == null) { this.delayTimer = new Timer(200,1); this.delayTimer.addEventListener(TimerEvent.TIMER,this.resizeList); } this.delayTimer.reset(); this.delayTimer.start(); } private function resizeList(e:TimerEvent) : void { var numSpace:int = 0; var minWidth:int = stage != null ? int(int(Math.max(1000,stage.stageWidth))) : int(100); this.mainBackground.width = minWidth / 3; this.mainBackground.height = stage != null ? Number(Math.max(stage.stageHeight - 60,530)) : Number(530); this.x = this.mainBackground.width * 2; this.y = 60; this.nameGame.width = this.mainBackground.width - this.nameGame._label.textWidth - 35; var countOfThemes:int = this.amountOfThemesForMap(this.mapsCombo.selectedItem.gameName); if(countOfThemes > 1) { this.mapsCombo.width = int(this.mainBackground.width / 2 - this.mapsCombo.x - 11); this.themeCombo.x = this.mainBackground.width / 2 + this.mapsCombo.x; this.themeCombo.width = int(this.mainBackground.width / 2 - this.mapsCombo.x - 11); } else { this.mapsCombo.width = this.mainBackground.width - this.nameGame._label.textWidth - 35; } this.info.width = this.mainBackground.width - 22; this.info.height = int(this.mainBackground.height - 415); this.selectRang.y = this.info.height + 86; this.selectRang.width = this.info.width; this.dmCheck.x = 11; this.dmCheck.y = this.selectRang.y + 35; var countEnable:int = 1; if(this.domEnable) { countEnable++; } if(this.ctfEnable) { countEnable++; } if(this.tdmEnable) { countEnable++; } this.dmCheck.width = int(this.info.width / countEnable - 2.5); this.tdmCheck.x = this.dmCheck.width + 16; this.tdmCheck.y = this.dmCheck.y; this.tdmCheck.width = this.dmCheck.width; this.ctfCheck.x = !!this.tdmEnable ? Number(this.tdmCheck.width + this.tdmCheck.x + 5) : Number(this.dmCheck.width + 16); this.ctfCheck.y = this.dmCheck.y; this.ctfCheck.width = this.dmCheck.width; this.domCheck.x = !!this.ctfEnable ? Number(this.ctfCheck.x + this.ctfCheck.width + 5) : (!!this.tdmEnable ? Number(this.tdmCheck.width + this.tdmCheck.x + 16) : Number(this.dmCheck.width + 16)); this.domCheck.y = this.dmCheck.y; this.domCheck.width = this.dmCheck.width; this.flags.y = this.kills.y = this.minutes.y = this.players.y = this.points.y = this.dmCheck.y + 80; numSpace = int((this.mainBackground.width - this.players.width - this.minutes.width - this.kills.width) / 4); this.players.x = numSpace; this.minutes.x = this.players.width + numSpace * 2; this.kills.x = this.players.width + this.minutes.width + numSpace * 3; this.flags.x = this.players.width + this.minutes.width + numSpace * 3; this.ff.y = this.ab.y = this.players.y + 45; this.noSubscribeAlert.x = numSpace; this.noSubscribeAlert.width = this.mainBackground.width - numSpace * 2; numSpace = int((this.mainBackground.width - this.ab.width - this.ff.width) / 3); this.ab.x = numSpace; this.ff.x = numSpace * 2 + this.ab.width; this.privateCheck.x = 11; this.privateCheck.y = this.mainBackground.height - 42; this.payCheck.x = this.ab.x; this.payCheck.y = this.ab.y + 40; this.inventoryCheck.x = this.ff.x; this.inventoryCheck.y = this.ff.y + 40; this.hrModeCheck.x = this.ab.x; this.hrModeCheck.y = this.payCheck.y + 40; this.noSubscribeAlert.y = this.payCheck.y; this.startButton.x = this.mainBackground.width - this.startButton.width - 11; this.startButton.y = this.mainBackground.height - 42; } public function hide() : void { this.dmCheck.removeEventListener(MouseEvent.CLICK,this.triggerTypeGame); this.tdmCheck.removeEventListener(MouseEvent.CLICK,this.triggerTypeGame); this.ctfCheck.removeEventListener(MouseEvent.CLICK,this.triggerTypeGame); this.startButton.removeEventListener(MouseEvent.CLICK,this.startGame); this.delayTimer.removeEventListener(TimerEvent.TIMER,this.resizeList); } private function onSliderChangeValue(e:SliderEvent) : void { } private function amountOfThemesForMap(mapName:String) : int { var themeName:* = null; if(this.mapsThemes[mapName] == null) { return 0; } var amount:int = 0; for(themeName in this.mapsThemes[mapName]) { amount++; } return amount; } private function updateByTime(e:TimerEvent) : void { this.nameGameState = NAMEGAME_STATE_PROGRESS; this.startButton.enable = false; dispatchEvent(new BattleListEvent(BattleListEvent.NEW_BATTLE_NAME_ADDED)); this.searchTimer.stop(); } } }
package projects.tanks.clients.fp10.TanksLauncherErrorScreen { import flash.text.Font; import flash.text.TextFormat; import projects.tanks.clients.tankslauncershared.service.Locale; public class TankFont { private static const MyriadPro:Class = TankFont_MyriadPro; public function TankFont() { super(); Font.registerFont(MyriadPro); } public static function getLocaleTextFormat(locale:String, size:int) : TextFormat { if(locale == Locale.CN) { return new TextFormat("simsun",size); } return new TextFormat("MyriadPro",size); } public static function needEmbedFont(locale:String) : Boolean { return locale != Locale.CN; } } }
package projects.tanks.client.battlefield.models.tankparts.weapon.splash { 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 SplashModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:SplashModelServer; private var client:ISplashModelBase = ISplashModelBase(this); private var modelId:Long = Long.getLong(520601216,-983741199); public function SplashModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new SplashModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(SplashCC,false))); } protected function getInitParam() : SplashCC { return SplashCC(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.gui.clanchat { import alternativa.tanks.gui.chat.ChatLineHighlightNormal; import controls.TankWindowInner; import controls.base.LabelBase; import controls.statassets.StatLineBase; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Sprite; import flash.text.TextFormatAlign; import forms.ColorConstants; import forms.userlabel.ChatUserLabel; import projects.tanks.client.chat.models.chat.chat.ChatAddressMode; import projects.tanks.client.chat.types.MessageType; import projects.tanks.client.chat.types.UserStatus; import projects.tanks.clients.flash.commons.services.datetime.DateFormatter; public class ChatOutputLine extends Sprite { private static const SYSTEM_MESSAGE_COLOR:uint = 8454016; private static const WARNING_MESSAGE_COLOR:uint = 16776960; private static const DEFAULT_MESSAGE_COLOR:uint = ColorConstants.WHITE; private static const UID_COLOR_WITHOUT_LIGHT:uint = 1244928; private static const UID_COLOR_WITH_LIGHT:uint = 5898034; private static const PRIVATE_MESSAGE_MARK:String = "→"; private static const PUBLIC_MESSAGE_MARK:String = "—"; private var _output:LabelBase; private var _timePassed:LabelBase; private var _userName:String; private var _userNameTo:String; private var _sourceUserLabel:ChatUserLabel; private var _targetUserLabel:ChatUserLabel; private var _arrowLabel:LabelBase; private var _light:Boolean = false; private var _self:Boolean = false; private var _namesWidth:int = 0; private var _messageType:MessageType; private var _showIP:Boolean; private var _width:int; private var _background:Bitmap; public var addressMode:ChatAddressMode; public function ChatOutputLine(param1:int, param2:UserStatus, param3:UserStatus, param4:ChatAddressMode, param5:String, param6:Date, param7:MessageType, param8:Boolean, param9:String) { super(); this._width = param1; this._messageType = param7; this.addressMode = param4; mouseEnabled = false; this._background = new Bitmap(); addChild(this._background); if(param7 == MessageType.USER) { this._timePassed = new LabelBase(); this._timePassed.text = DateFormatter.formatTimeForChatToLocalized(param6); addChild(this._timePassed); } if(param2.userId != null) { this._userName = param2.uid; this._sourceUserLabel = new ClanChatUserLabel(param2,param9); addChild(this._sourceUserLabel); this._sourceUserLabel.setUidColor(UID_COLOR_WITHOUT_LIGHT); this.updateSourceUserLabel(param3.userId == null); } if(param3.userId != null) { this._userNameTo = param3.uid; this._targetUserLabel = new ClanChatUserLabel(param3,param9); addChild(this._targetUserLabel); this._targetUserLabel.setUidColor(UID_COLOR_WITHOUT_LIGHT); this._arrowLabel = new LabelBase(); addChild(this._arrowLabel); this._arrowLabel.text = param4 == ChatAddressMode.PRIVATE ? PRIVATE_MESSAGE_MARK : PUBLIC_MESSAGE_MARK; this._arrowLabel.color = param4 == ChatAddressMode.PRIVATE ? DEFAULT_MESSAGE_COLOR : UID_COLOR_WITHOUT_LIGHT; this.updateTargetUserLabel(); } this._output = new LabelBase(); this._output.color = this.getMessageColor(this._messageType); this._output.multiline = true; this._output.wordWrap = true; this._output.correctCursorBehaviour = false; this._output.selectable = true; if(this._messageType != MessageType.USER) { this._output.align = TextFormatAlign.CENTER; } addChild(this._output); if(this._namesWidth > this._width / 2) { this._output.y = 15; this._output.x = 0; this._output.width = this._timePassed == null ? this._width - 5 : this._width - this._timePassed.width - 15; } else { this._output.x = this._namesWidth + 3; this._output.y = 0; this._output.width = this._timePassed == null ? this._namesWidth - 8 : this._namesWidth - this._timePassed.width - 18; } if(param8) { this._output.htmlText = param5; } else { this._output.text = param5; } } private function updateSourceUserLabel(param1:Boolean) : void { var local2:String = ""; if(param1) { local2 += ":"; } if(local2.length != 0) { this._sourceUserLabel.setAdditionalText(local2); } if(param1) { this._namesWidth = this._sourceUserLabel.width + 2; } else { this._namesWidth = this._sourceUserLabel.width + 6; } } private function updateTargetUserLabel() : void { this._targetUserLabel.setAdditionalText(":"); this._targetUserLabel.x = this._sourceUserLabel.x + this._sourceUserLabel.width + 14; this._namesWidth += this._targetUserLabel.width + 11; this._arrowLabel.x = this._sourceUserLabel.x + this._sourceUserLabel.width - 1; } override public function set width(param1:Number) : void { var local2:BitmapData = null; var local4:StatLineBase = null; var local3:int = 0; this._width = int(param1); if(this._sourceUserLabel != null) { this._sourceUserLabel.x = this._timePassed == null ? 0 : this._timePassed.width + 5; } if(this._targetUserLabel != null) { this._targetUserLabel.x = this._sourceUserLabel.x + this._sourceUserLabel.width + 14; this._arrowLabel.x = this._sourceUserLabel.x + this._sourceUserLabel.width - 1; } if(this._namesWidth > this._width / 2 && this._output.text.length * 8 > this._width - this._namesWidth) { this._output.y = 19; this._output.x = this._timePassed == null ? 0 : this._timePassed.width; this._output.width = this._timePassed == null ? this._width - 5 : this._width - this._timePassed.width - 5; local3 = 21; } else { this._output.x = this._timePassed == null ? this._namesWidth : this._timePassed.width + this._namesWidth + 5; this._output.y = 0; this._output.width = this._timePassed == null ? this._width - this._namesWidth - 5 : this._width - this._timePassed.width - this._namesWidth - 5; this._output.height = 20; } this._background.bitmapData = new BitmapData(1,Math.max(int(this._output.textHeight + 7.5 + local3),19),true,0); if(this._light || this._self) { local4 = new ChatLineHighlightNormal(); local4.width = this._width; local4.height = Math.max(int(this._output.textHeight + 5.5 + local3),19); local4.y = 2; local4.graphics.beginFill(0,0); local4.graphics.drawRect(0,0,2,2); local4.graphics.endFill(); local2 = new BitmapData(local4.width,local4.height + 2,true,0); local2.draw(local4); this._background.bitmapData = local2; } } public function set light(param1:Boolean) : void { var local2:uint = 0; if(this._messageType != MessageType.USER) { return; } this._light = param1; if(this._light) { local2 = UID_COLOR_WITH_LIGHT; } else { local2 = UID_COLOR_WITHOUT_LIGHT; } if(this._sourceUserLabel != null) { this._sourceUserLabel.setUidColor(local2); } if(this._targetUserLabel != null) { this._targetUserLabel.setUidColor(local2); } this.width = this._width; } public function set self(param1:Boolean) : void { var local2:uint = 0; var local3:uint = 0; if(this._messageType != MessageType.USER) { return; } this._self = param1; if(this._self) { local3 = TankWindowInner.GREEN; local2 = TankWindowInner.GREEN; } else { local2 = UID_COLOR_WITHOUT_LIGHT; local3 = DEFAULT_MESSAGE_COLOR; } if(this._sourceUserLabel != null) { this._sourceUserLabel.setUidColor(local2,this._self); } if(this._targetUserLabel != null) { this._targetUserLabel.setUidColor(local2); } this._output.color = local3; this.width = this._width; } public function set showIP(param1:Boolean) : void { this._showIP = param1; if(this._sourceUserLabel != null) { this.updateSourceUserLabel(this._targetUserLabel == null); } if(this._targetUserLabel != null) { this.updateTargetUserLabel(); } this.width = this._width; } public function get userName() : String { return this._userName; } public function get userNameTo() : String { return this._userNameTo; } private function getMessageColor(param1:MessageType) : uint { switch(param1) { case MessageType.SYSTEM: return SYSTEM_MESSAGE_COLOR; case MessageType.WARNING: return WARNING_MESSAGE_COLOR; default: return DEFAULT_MESSAGE_COLOR; } } } }
package alternativa.engine3d.lights { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.Canvas; import alternativa.engine3d.core.Debug; import alternativa.engine3d.core.Light3D; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.Vertex; use namespace alternativa3d; public class TubeLight extends Light3D { public var length:Number; public var attenuationBegin:Number; public var attenuationEnd:Number; public var falloff:Number; public function TubeLight(param1:uint, param2:Number, param3:Number, param4:Number, param5:Number) { super(); this.color = param1; this.length = param2; this.attenuationBegin = param3; this.attenuationEnd = param4; this.falloff = param5; calculateBounds(); } public function lookAt(param1:Number, param2:Number, param3:Number) : void { var local4:Number = NaN; local4 = param1 - this.x; var local5:Number = param2 - this.y; var local6:Number = param3 - this.z; rotationX = Math.atan2(local6,Math.sqrt(local4 * local4 + local5 * local5)) - Math.PI / 2; rotationY = 0; rotationZ = -Math.atan2(local4,local5); } override public function clone() : Object3D { var local1:TubeLight = new TubeLight(color,this.length,this.attenuationBegin,this.attenuationEnd,this.falloff); local1.clonePropertiesFrom(this); return local1; } override alternativa3d function drawDebug(param1:Camera3D, param2:Canvas) : void { var local4:Canvas = null; var local5:Number = NaN; var local6:Number = NaN; var local7:Number = NaN; var local8:int = 0; var local9:Number = NaN; var local10:Number = NaN; var local11:Number = NaN; var local12:Number = NaN; var local13:Number = NaN; var local14:Number = NaN; var local15:Number = NaN; var local16:Number = NaN; var local17:Number = NaN; var local18:Number = NaN; var local19:Number = NaN; var local20:Number = NaN; var local21:Number = NaN; var local22:Number = NaN; var local23:Number = NaN; var local24:Number = NaN; var local25:Number = NaN; var local26:Number = NaN; var local27:Number = NaN; var local28:Number = NaN; var local29:Number = NaN; var local30:Number = NaN; var local31:Number = NaN; var local32:Number = NaN; var local33:Number = NaN; var local34:Number = NaN; var local35:Number = NaN; var local36:Number = NaN; var local37:Number = NaN; var local38:Number = NaN; var local39:Number = NaN; var local40:Number = NaN; var local41:Number = NaN; var local42:Number = NaN; var local43:Number = NaN; var local44:Number = NaN; var local45:Number = NaN; var local46:Number = NaN; var local47:Number = NaN; var local48:Number = NaN; var local49:Number = NaN; var local50:Number = NaN; var local51:Number = NaN; var local52:Number = NaN; var local53:Number = NaN; var local54:Number = NaN; var local55:Number = NaN; var local56:Number = NaN; var local3:int = int(param1.alternativa3d::checkInDebug(this)); if(local3 > 0) { local4 = param2.alternativa3d::getChildCanvas(true,false); if(Boolean(local3 & Debug.LIGHTS) && alternativa3d::ml > param1.nearClipping) { local5 = (color >> 16 & 0xFF) * intensity; local6 = (color >> 8 & 0xFF) * intensity; local7 = (color & 0xFF) * intensity; local8 = ((local5 > 255 ? 255 : local5) << 16) + ((local6 > 255 ? 255 : local6) << 8) + (local7 > 255 ? 255 : local7); local9 = alternativa3d::md + alternativa3d::ma * this.attenuationBegin; local10 = alternativa3d::mh + alternativa3d::me * this.attenuationBegin; local11 = alternativa3d::ml + alternativa3d::mi * this.attenuationBegin; local12 = alternativa3d::md + (alternativa3d::ma * this.attenuationBegin + alternativa3d::mb * this.attenuationBegin) * 0.9; local13 = alternativa3d::mh + (alternativa3d::me * this.attenuationBegin + alternativa3d::mf * this.attenuationBegin) * 0.9; local14 = alternativa3d::ml + (alternativa3d::mi * this.attenuationBegin + alternativa3d::mj * this.attenuationBegin) * 0.9; local15 = alternativa3d::md + alternativa3d::mb * this.attenuationBegin; local16 = alternativa3d::mh + alternativa3d::mf * this.attenuationBegin; local17 = alternativa3d::ml + alternativa3d::mj * this.attenuationBegin; local18 = alternativa3d::md - (alternativa3d::ma * this.attenuationBegin - alternativa3d::mb * this.attenuationBegin) * 0.9; local19 = alternativa3d::mh - (alternativa3d::me * this.attenuationBegin - alternativa3d::mf * this.attenuationBegin) * 0.9; local20 = alternativa3d::ml - (alternativa3d::mi * this.attenuationBegin - alternativa3d::mj * this.attenuationBegin) * 0.9; local21 = alternativa3d::md - alternativa3d::ma * this.attenuationBegin; local22 = alternativa3d::mh - alternativa3d::me * this.attenuationBegin; local23 = alternativa3d::ml - alternativa3d::mi * this.attenuationBegin; local24 = alternativa3d::md - (alternativa3d::ma * this.attenuationBegin + alternativa3d::mb * this.attenuationBegin) * 0.9; local25 = alternativa3d::mh - (alternativa3d::me * this.attenuationBegin + alternativa3d::mf * this.attenuationBegin) * 0.9; local26 = alternativa3d::ml - (alternativa3d::mi * this.attenuationBegin + alternativa3d::mj * this.attenuationBegin) * 0.9; local27 = alternativa3d::md - alternativa3d::mb * this.attenuationBegin; local28 = alternativa3d::mh - alternativa3d::mf * this.attenuationBegin; local29 = alternativa3d::ml - alternativa3d::mj * this.attenuationBegin; local30 = alternativa3d::md + (alternativa3d::ma * this.attenuationBegin - alternativa3d::mb * this.attenuationBegin) * 0.9; local31 = alternativa3d::mh + (alternativa3d::me * this.attenuationBegin - alternativa3d::mf * this.attenuationBegin) * 0.9; local32 = alternativa3d::ml + (alternativa3d::mi * this.attenuationBegin - alternativa3d::mj * this.attenuationBegin) * 0.9; local33 = alternativa3d::md + alternativa3d::mc * this.length + alternativa3d::ma * this.attenuationBegin; local34 = alternativa3d::mh + alternativa3d::mg * this.length + alternativa3d::me * this.attenuationBegin; local35 = alternativa3d::ml + alternativa3d::mk * this.length + alternativa3d::mi * this.attenuationBegin; local36 = alternativa3d::md + alternativa3d::mc * this.length + (alternativa3d::ma * this.attenuationBegin + alternativa3d::mb * this.attenuationBegin) * 0.9; local37 = alternativa3d::mh + alternativa3d::mg * this.length + (alternativa3d::me * this.attenuationBegin + alternativa3d::mf * this.attenuationBegin) * 0.9; local38 = alternativa3d::ml + alternativa3d::mk * this.length + (alternativa3d::mi * this.attenuationBegin + alternativa3d::mj * this.attenuationBegin) * 0.9; local39 = alternativa3d::md + alternativa3d::mc * this.length + alternativa3d::mb * this.attenuationBegin; local40 = alternativa3d::mh + alternativa3d::mg * this.length + alternativa3d::mf * this.attenuationBegin; local41 = alternativa3d::ml + alternativa3d::mk * this.length + alternativa3d::mj * this.attenuationBegin; local42 = alternativa3d::md + alternativa3d::mc * this.length - (alternativa3d::ma * this.attenuationBegin - alternativa3d::mb * this.attenuationBegin) * 0.9; local43 = alternativa3d::mh + alternativa3d::mg * this.length - (alternativa3d::me * this.attenuationBegin - alternativa3d::mf * this.attenuationBegin) * 0.9; local44 = alternativa3d::ml + alternativa3d::mk * this.length - (alternativa3d::mi * this.attenuationBegin - alternativa3d::mj * this.attenuationBegin) * 0.9; local45 = alternativa3d::md + alternativa3d::mc * this.length - alternativa3d::ma * this.attenuationBegin; local46 = alternativa3d::mh + alternativa3d::mg * this.length - alternativa3d::me * this.attenuationBegin; local47 = alternativa3d::ml + alternativa3d::mk * this.length - alternativa3d::mi * this.attenuationBegin; local48 = alternativa3d::md + alternativa3d::mc * this.length - (alternativa3d::ma * this.attenuationBegin + alternativa3d::mb * this.attenuationBegin) * 0.9; local49 = alternativa3d::mh + alternativa3d::mg * this.length - (alternativa3d::me * this.attenuationBegin + alternativa3d::mf * this.attenuationBegin) * 0.9; local50 = alternativa3d::ml + alternativa3d::mk * this.length - (alternativa3d::mi * this.attenuationBegin + alternativa3d::mj * this.attenuationBegin) * 0.9; local51 = alternativa3d::md + alternativa3d::mc * this.length - alternativa3d::mb * this.attenuationBegin; local52 = alternativa3d::mh + alternativa3d::mg * this.length - alternativa3d::mf * this.attenuationBegin; local53 = alternativa3d::ml + alternativa3d::mk * this.length - alternativa3d::mj * this.attenuationBegin; local54 = alternativa3d::md + alternativa3d::mc * this.length + (alternativa3d::ma * this.attenuationBegin - alternativa3d::mb * this.attenuationBegin) * 0.9; local55 = alternativa3d::mh + alternativa3d::mg * this.length + (alternativa3d::me * this.attenuationBegin - alternativa3d::mf * this.attenuationBegin) * 0.9; local56 = alternativa3d::ml + alternativa3d::mk * this.length + (alternativa3d::mi * this.attenuationBegin - alternativa3d::mj * this.attenuationBegin) * 0.9; if(local11 > param1.nearClipping && local14 > param1.nearClipping && local17 > param1.nearClipping && local20 > param1.nearClipping && local23 > param1.nearClipping && local26 > param1.nearClipping && local29 > param1.nearClipping && local32 > param1.nearClipping && local35 > param1.nearClipping && local38 > param1.nearClipping && local41 > param1.nearClipping && local44 > param1.nearClipping && local47 > param1.nearClipping && local50 > param1.nearClipping && local53 > param1.nearClipping && local56 > param1.nearClipping) { local4.alternativa3d::gfx.lineStyle(1,local8); local4.alternativa3d::gfx.moveTo(local9 * param1.alternativa3d::viewSizeX / local11,local10 * param1.alternativa3d::viewSizeY / local11); local4.alternativa3d::gfx.curveTo(local12 * param1.alternativa3d::viewSizeX / local14,local13 * param1.alternativa3d::viewSizeY / local14,local15 * param1.alternativa3d::viewSizeX / local17,local16 * param1.alternativa3d::viewSizeY / local17); local4.alternativa3d::gfx.curveTo(local18 * param1.alternativa3d::viewSizeX / local20,local19 * param1.alternativa3d::viewSizeY / local20,local21 * param1.alternativa3d::viewSizeX / local23,local22 * param1.alternativa3d::viewSizeY / local23); local4.alternativa3d::gfx.curveTo(local24 * param1.alternativa3d::viewSizeX / local26,local25 * param1.alternativa3d::viewSizeY / local26,local27 * param1.alternativa3d::viewSizeX / local29,local28 * param1.alternativa3d::viewSizeY / local29); local4.alternativa3d::gfx.curveTo(local30 * param1.alternativa3d::viewSizeX / local32,local31 * param1.alternativa3d::viewSizeY / local32,local9 * param1.alternativa3d::viewSizeX / local11,local10 * param1.alternativa3d::viewSizeY / local11); local4.alternativa3d::gfx.moveTo(local33 * param1.alternativa3d::viewSizeX / local35,local34 * param1.alternativa3d::viewSizeY / local35); local4.alternativa3d::gfx.curveTo(local36 * param1.alternativa3d::viewSizeX / local38,local37 * param1.alternativa3d::viewSizeY / local38,local39 * param1.alternativa3d::viewSizeX / local41,local40 * param1.alternativa3d::viewSizeY / local41); local4.alternativa3d::gfx.curveTo(local42 * param1.alternativa3d::viewSizeX / local44,local43 * param1.alternativa3d::viewSizeY / local44,local45 * param1.alternativa3d::viewSizeX / local47,local46 * param1.alternativa3d::viewSizeY / local47); local4.alternativa3d::gfx.curveTo(local48 * param1.alternativa3d::viewSizeX / local50,local49 * param1.alternativa3d::viewSizeY / local50,local51 * param1.alternativa3d::viewSizeX / local53,local52 * param1.alternativa3d::viewSizeY / local53); local4.alternativa3d::gfx.curveTo(local54 * param1.alternativa3d::viewSizeX / local56,local55 * param1.alternativa3d::viewSizeY / local56,local33 * param1.alternativa3d::viewSizeX / local35,local34 * param1.alternativa3d::viewSizeY / local35); local4.alternativa3d::gfx.moveTo(local9 * param1.alternativa3d::viewSizeX / local11,local10 * param1.alternativa3d::viewSizeY / local11); local4.alternativa3d::gfx.lineTo(local33 * param1.alternativa3d::viewSizeX / local35,local34 * param1.alternativa3d::viewSizeY / local35); local4.alternativa3d::gfx.moveTo(local15 * param1.alternativa3d::viewSizeX / local17,local16 * param1.alternativa3d::viewSizeY / local17); local4.alternativa3d::gfx.lineTo(local39 * param1.alternativa3d::viewSizeX / local41,local40 * param1.alternativa3d::viewSizeY / local41); local4.alternativa3d::gfx.moveTo(local21 * param1.alternativa3d::viewSizeX / local23,local22 * param1.alternativa3d::viewSizeY / local23); local4.alternativa3d::gfx.lineTo(local45 * param1.alternativa3d::viewSizeX / local47,local46 * param1.alternativa3d::viewSizeY / local47); local4.alternativa3d::gfx.moveTo(local27 * param1.alternativa3d::viewSizeX / local29,local28 * param1.alternativa3d::viewSizeY / local29); local4.alternativa3d::gfx.lineTo(local51 * param1.alternativa3d::viewSizeX / local53,local52 * param1.alternativa3d::viewSizeY / local53); } local9 = alternativa3d::md - alternativa3d::mc * this.falloff + alternativa3d::ma * this.attenuationEnd; local10 = alternativa3d::mh - alternativa3d::mg * this.falloff + alternativa3d::me * this.attenuationEnd; local11 = alternativa3d::ml - alternativa3d::mk * this.falloff + alternativa3d::mi * this.attenuationEnd; local12 = alternativa3d::md - alternativa3d::mc * this.falloff + (alternativa3d::ma * this.attenuationEnd + alternativa3d::mb * this.attenuationEnd) * 0.9; local13 = alternativa3d::mh - alternativa3d::mg * this.falloff + (alternativa3d::me * this.attenuationEnd + alternativa3d::mf * this.attenuationEnd) * 0.9; local14 = alternativa3d::ml - alternativa3d::mk * this.falloff + (alternativa3d::mi * this.attenuationEnd + alternativa3d::mj * this.attenuationEnd) * 0.9; local15 = alternativa3d::md - alternativa3d::mc * this.falloff + alternativa3d::mb * this.attenuationEnd; local16 = alternativa3d::mh - alternativa3d::mg * this.falloff + alternativa3d::mf * this.attenuationEnd; local17 = alternativa3d::ml - alternativa3d::mk * this.falloff + alternativa3d::mj * this.attenuationEnd; local18 = alternativa3d::md - alternativa3d::mc * this.falloff - (alternativa3d::ma * this.attenuationEnd - alternativa3d::mb * this.attenuationEnd) * 0.9; local19 = alternativa3d::mh - alternativa3d::mg * this.falloff - (alternativa3d::me * this.attenuationEnd - alternativa3d::mf * this.attenuationEnd) * 0.9; local20 = alternativa3d::ml - alternativa3d::mk * this.falloff - (alternativa3d::mi * this.attenuationEnd - alternativa3d::mj * this.attenuationEnd) * 0.9; local21 = alternativa3d::md - alternativa3d::mc * this.falloff - alternativa3d::ma * this.attenuationEnd; local22 = alternativa3d::mh - alternativa3d::mg * this.falloff - alternativa3d::me * this.attenuationEnd; local23 = alternativa3d::ml - alternativa3d::mk * this.falloff - alternativa3d::mi * this.attenuationEnd; local24 = alternativa3d::md - alternativa3d::mc * this.falloff - (alternativa3d::ma * this.attenuationEnd + alternativa3d::mb * this.attenuationEnd) * 0.9; local25 = alternativa3d::mh - alternativa3d::mg * this.falloff - (alternativa3d::me * this.attenuationEnd + alternativa3d::mf * this.attenuationEnd) * 0.9; local26 = alternativa3d::ml - alternativa3d::mk * this.falloff - (alternativa3d::mi * this.attenuationEnd + alternativa3d::mj * this.attenuationEnd) * 0.9; local27 = alternativa3d::md - alternativa3d::mc * this.falloff - alternativa3d::mb * this.attenuationEnd; local28 = alternativa3d::mh - alternativa3d::mg * this.falloff - alternativa3d::mf * this.attenuationEnd; local29 = alternativa3d::ml - alternativa3d::mk * this.falloff - alternativa3d::mj * this.attenuationEnd; local30 = alternativa3d::md - alternativa3d::mc * this.falloff + (alternativa3d::ma * this.attenuationEnd - alternativa3d::mb * this.attenuationEnd) * 0.9; local31 = alternativa3d::mh - alternativa3d::mg * this.falloff + (alternativa3d::me * this.attenuationEnd - alternativa3d::mf * this.attenuationEnd) * 0.9; local32 = alternativa3d::ml - alternativa3d::mk * this.falloff + (alternativa3d::mi * this.attenuationEnd - alternativa3d::mj * this.attenuationEnd) * 0.9; local33 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) + alternativa3d::ma * this.attenuationEnd; local34 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) + alternativa3d::me * this.attenuationEnd; local35 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) + alternativa3d::mi * this.attenuationEnd; local36 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) + (alternativa3d::ma * this.attenuationEnd + alternativa3d::mb * this.attenuationEnd) * 0.9; local37 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) + (alternativa3d::me * this.attenuationEnd + alternativa3d::mf * this.attenuationEnd) * 0.9; local38 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) + (alternativa3d::mi * this.attenuationEnd + alternativa3d::mj * this.attenuationEnd) * 0.9; local39 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) + alternativa3d::mb * this.attenuationEnd; local40 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) + alternativa3d::mf * this.attenuationEnd; local41 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) + alternativa3d::mj * this.attenuationEnd; local42 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) - (alternativa3d::ma * this.attenuationEnd - alternativa3d::mb * this.attenuationEnd) * 0.9; local43 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) - (alternativa3d::me * this.attenuationEnd - alternativa3d::mf * this.attenuationEnd) * 0.9; local44 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) - (alternativa3d::mi * this.attenuationEnd - alternativa3d::mj * this.attenuationEnd) * 0.9; local45 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) - alternativa3d::ma * this.attenuationEnd; local46 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) - alternativa3d::me * this.attenuationEnd; local47 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) - alternativa3d::mi * this.attenuationEnd; local48 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) - (alternativa3d::ma * this.attenuationEnd + alternativa3d::mb * this.attenuationEnd) * 0.9; local49 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) - (alternativa3d::me * this.attenuationEnd + alternativa3d::mf * this.attenuationEnd) * 0.9; local50 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) - (alternativa3d::mi * this.attenuationEnd + alternativa3d::mj * this.attenuationEnd) * 0.9; local51 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) - alternativa3d::mb * this.attenuationEnd; local52 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) - alternativa3d::mf * this.attenuationEnd; local53 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) - alternativa3d::mj * this.attenuationEnd; local54 = alternativa3d::md + alternativa3d::mc * (this.length + this.falloff) + (alternativa3d::ma * this.attenuationEnd - alternativa3d::mb * this.attenuationEnd) * 0.9; local55 = alternativa3d::mh + alternativa3d::mg * (this.length + this.falloff) + (alternativa3d::me * this.attenuationEnd - alternativa3d::mf * this.attenuationEnd) * 0.9; local56 = alternativa3d::ml + alternativa3d::mk * (this.length + this.falloff) + (alternativa3d::mi * this.attenuationEnd - alternativa3d::mj * this.attenuationEnd) * 0.9; if(local11 > param1.nearClipping && local14 > param1.nearClipping && local17 > param1.nearClipping && local20 > param1.nearClipping && local23 > param1.nearClipping && local26 > param1.nearClipping && local29 > param1.nearClipping && local32 > param1.nearClipping && local35 > param1.nearClipping && local38 > param1.nearClipping && local41 > param1.nearClipping && local44 > param1.nearClipping && local47 > param1.nearClipping && local50 > param1.nearClipping && local53 > param1.nearClipping && local56 > param1.nearClipping) { local4.alternativa3d::gfx.lineStyle(1,local8); local4.alternativa3d::gfx.moveTo(local9 * param1.alternativa3d::viewSizeX / local11,local10 * param1.alternativa3d::viewSizeY / local11); local4.alternativa3d::gfx.curveTo(local12 * param1.alternativa3d::viewSizeX / local14,local13 * param1.alternativa3d::viewSizeY / local14,local15 * param1.alternativa3d::viewSizeX / local17,local16 * param1.alternativa3d::viewSizeY / local17); local4.alternativa3d::gfx.curveTo(local18 * param1.alternativa3d::viewSizeX / local20,local19 * param1.alternativa3d::viewSizeY / local20,local21 * param1.alternativa3d::viewSizeX / local23,local22 * param1.alternativa3d::viewSizeY / local23); local4.alternativa3d::gfx.curveTo(local24 * param1.alternativa3d::viewSizeX / local26,local25 * param1.alternativa3d::viewSizeY / local26,local27 * param1.alternativa3d::viewSizeX / local29,local28 * param1.alternativa3d::viewSizeY / local29); local4.alternativa3d::gfx.curveTo(local30 * param1.alternativa3d::viewSizeX / local32,local31 * param1.alternativa3d::viewSizeY / local32,local9 * param1.alternativa3d::viewSizeX / local11,local10 * param1.alternativa3d::viewSizeY / local11); local4.alternativa3d::gfx.moveTo(local33 * param1.alternativa3d::viewSizeX / local35,local34 * param1.alternativa3d::viewSizeY / local35); local4.alternativa3d::gfx.curveTo(local36 * param1.alternativa3d::viewSizeX / local38,local37 * param1.alternativa3d::viewSizeY / local38,local39 * param1.alternativa3d::viewSizeX / local41,local40 * param1.alternativa3d::viewSizeY / local41); local4.alternativa3d::gfx.curveTo(local42 * param1.alternativa3d::viewSizeX / local44,local43 * param1.alternativa3d::viewSizeY / local44,local45 * param1.alternativa3d::viewSizeX / local47,local46 * param1.alternativa3d::viewSizeY / local47); local4.alternativa3d::gfx.curveTo(local48 * param1.alternativa3d::viewSizeX / local50,local49 * param1.alternativa3d::viewSizeY / local50,local51 * param1.alternativa3d::viewSizeX / local53,local52 * param1.alternativa3d::viewSizeY / local53); local4.alternativa3d::gfx.curveTo(local54 * param1.alternativa3d::viewSizeX / local56,local55 * param1.alternativa3d::viewSizeY / local56,local33 * param1.alternativa3d::viewSizeX / local35,local34 * param1.alternativa3d::viewSizeY / local35); local4.alternativa3d::gfx.moveTo(local9 * param1.alternativa3d::viewSizeX / local11,local10 * param1.alternativa3d::viewSizeY / local11); local4.alternativa3d::gfx.lineTo(local33 * param1.alternativa3d::viewSizeX / local35,local34 * param1.alternativa3d::viewSizeY / local35); local4.alternativa3d::gfx.moveTo(local15 * param1.alternativa3d::viewSizeX / local17,local16 * param1.alternativa3d::viewSizeY / local17); local4.alternativa3d::gfx.lineTo(local39 * param1.alternativa3d::viewSizeX / local41,local40 * param1.alternativa3d::viewSizeY / local41); local4.alternativa3d::gfx.moveTo(local21 * param1.alternativa3d::viewSizeX / local23,local22 * param1.alternativa3d::viewSizeY / local23); local4.alternativa3d::gfx.lineTo(local45 * param1.alternativa3d::viewSizeX / local47,local46 * param1.alternativa3d::viewSizeY / local47); local4.alternativa3d::gfx.moveTo(local27 * param1.alternativa3d::viewSizeX / local29,local28 * param1.alternativa3d::viewSizeY / local29); local4.alternativa3d::gfx.lineTo(local51 * param1.alternativa3d::viewSizeX / local53,local52 * param1.alternativa3d::viewSizeY / local53); } } if(Boolean(local3 & Debug.BOUNDS)) { Debug.alternativa3d::drawBounds(param1,local4,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ,10092288); } } } override alternativa3d function updateBounds(param1:Object3D, param2:Object3D = null) : void { var local3:Vertex = null; if(param2 != null) { local3 = alternativa3d::boundVertexList; local3.x = -this.attenuationEnd; local3.y = -this.attenuationEnd; local3.z = -this.falloff; local3 = local3.alternativa3d::next; local3.x = this.attenuationEnd; local3.y = -this.attenuationEnd; local3.z = -this.falloff; local3 = local3.alternativa3d::next; local3.x = -this.attenuationEnd; local3.y = this.attenuationEnd; local3.z = -this.falloff; local3 = local3.alternativa3d::next; local3.x = this.attenuationEnd; local3.y = this.attenuationEnd; local3.z = -this.falloff; local3 = local3.alternativa3d::next; local3.x = -this.attenuationEnd; local3.y = -this.attenuationEnd; local3.z = this.length + this.falloff; local3 = local3.alternativa3d::next; local3.x = this.attenuationEnd; local3.y = -this.attenuationEnd; local3.z = this.length + this.falloff; local3 = local3.alternativa3d::next; local3.x = -this.attenuationEnd; local3.y = this.attenuationEnd; local3.z = this.length + this.falloff; local3 = local3.alternativa3d::next; local3.x = this.attenuationEnd; local3.y = this.attenuationEnd; local3.z = this.length + this.falloff; local3 = alternativa3d::boundVertexList; while(local3 != null) { local3.alternativa3d::cameraX = param2.alternativa3d::ma * local3.x + param2.alternativa3d::mb * local3.y + param2.alternativa3d::mc * local3.z + param2.alternativa3d::md; local3.alternativa3d::cameraY = param2.alternativa3d::me * local3.x + param2.alternativa3d::mf * local3.y + param2.alternativa3d::mg * local3.z + param2.alternativa3d::mh; local3.alternativa3d::cameraZ = param2.alternativa3d::mi * local3.x + param2.alternativa3d::mj * local3.y + param2.alternativa3d::mk * local3.z + param2.alternativa3d::ml; if(local3.alternativa3d::cameraX < param1.boundMinX) { param1.boundMinX = local3.alternativa3d::cameraX; } if(local3.alternativa3d::cameraX > param1.boundMaxX) { param1.boundMaxX = local3.alternativa3d::cameraX; } if(local3.alternativa3d::cameraY < param1.boundMinY) { param1.boundMinY = local3.alternativa3d::cameraY; } if(local3.alternativa3d::cameraY > param1.boundMaxY) { param1.boundMaxY = local3.alternativa3d::cameraY; } if(local3.alternativa3d::cameraZ < param1.boundMinZ) { param1.boundMinZ = local3.alternativa3d::cameraZ; } if(local3.alternativa3d::cameraZ > param1.boundMaxZ) { param1.boundMaxZ = local3.alternativa3d::cameraZ; } local3 = local3.alternativa3d::next; } } else { if(-this.attenuationEnd < param1.boundMinX) { param1.boundMinX = -this.attenuationEnd; } if(this.attenuationEnd > param1.boundMaxX) { param1.boundMaxX = this.attenuationEnd; } if(-this.attenuationEnd < param1.boundMinY) { param1.boundMinY = -this.attenuationEnd; } if(this.attenuationEnd > param1.boundMaxY) { param1.boundMaxY = this.attenuationEnd; } if(-this.falloff < param1.boundMinZ) { param1.boundMinZ = -this.falloff; } if(this.length + this.falloff > param1.boundMaxZ) { param1.boundMaxZ = this.length + this.falloff; } } } } }
package projects.tanks.client.battlefield.models.inventory.sfx { import platform.client.fp10.core.resource.types.SoundResource; public class InventorySfxCC { private var _daOffSound:SoundResource; private var _daOnSound:SoundResource; private var _ddOffSound:SoundResource; private var _ddOnSound:SoundResource; private var _healingSound:SoundResource; private var _nitroOffSound:SoundResource; private var _nitroOnSound:SoundResource; private var _notReadySound:SoundResource; private var _readySound:SoundResource; public function InventorySfxCC(param1:SoundResource = null, param2:SoundResource = null, param3:SoundResource = null, param4:SoundResource = null, param5:SoundResource = null, param6:SoundResource = null, param7:SoundResource = null, param8:SoundResource = null, param9:SoundResource = null) { super(); this._daOffSound = param1; this._daOnSound = param2; this._ddOffSound = param3; this._ddOnSound = param4; this._healingSound = param5; this._nitroOffSound = param6; this._nitroOnSound = param7; this._notReadySound = param8; this._readySound = param9; } public function get daOffSound() : SoundResource { return this._daOffSound; } public function set daOffSound(param1:SoundResource) : void { this._daOffSound = param1; } public function get daOnSound() : SoundResource { return this._daOnSound; } public function set daOnSound(param1:SoundResource) : void { this._daOnSound = param1; } public function get ddOffSound() : SoundResource { return this._ddOffSound; } public function set ddOffSound(param1:SoundResource) : void { this._ddOffSound = param1; } public function get ddOnSound() : SoundResource { return this._ddOnSound; } public function set ddOnSound(param1:SoundResource) : void { this._ddOnSound = param1; } public function get healingSound() : SoundResource { return this._healingSound; } public function set healingSound(param1:SoundResource) : void { this._healingSound = param1; } public function get nitroOffSound() : SoundResource { return this._nitroOffSound; } public function set nitroOffSound(param1:SoundResource) : void { this._nitroOffSound = param1; } public function get nitroOnSound() : SoundResource { return this._nitroOnSound; } public function set nitroOnSound(param1:SoundResource) : void { this._nitroOnSound = param1; } public function get notReadySound() : SoundResource { return this._notReadySound; } public function set notReadySound(param1:SoundResource) : void { this._notReadySound = param1; } public function get readySound() : SoundResource { return this._readySound; } public function set readySound(param1:SoundResource) : void { this._readySound = param1; } public function toString() : String { var local1:String = "InventorySfxCC ["; local1 += "daOffSound = " + this.daOffSound + " "; local1 += "daOnSound = " + this.daOnSound + " "; local1 += "ddOffSound = " + this.ddOffSound + " "; local1 += "ddOnSound = " + this.ddOnSound + " "; local1 += "healingSound = " + this.healingSound + " "; local1 += "nitroOffSound = " + this.nitroOffSound + " "; local1 += "nitroOnSound = " + this.nitroOnSound + " "; local1 += "notReadySound = " + this.notReadySound + " "; local1 += "readySound = " + this.readySound + " "; return local1 + "]"; } } }
package { import alternativa.init.BattleSelectModelActivator; import alternativa.init.ChatModelActivator; import alternativa.init.ClansModelActivator; import alternativa.init.CommonsActivator; import alternativa.init.PanelModelActivator; import alternativa.init.TanksFontsActivator; import alternativa.init.TanksServicesActivator; import alternativa.init.UserModelActivator; import alternativa.osgi.OSGi; import alternativa.osgi.bundle.IBundleActivator; import init.TanksFormsActivator; import platform.client.core.general.pushnotification.osgi.Activator; import platform.client.core.general.resource.osgi.Activator; import platform.client.core.general.socialnetwork.osgi.Activator; import platform.client.core.general.spaces.osgi.Activator; import platform.client.fp10.core.osgi.ClientActivator; import platform.client.models.commons.osgi.Activator; import platform.clients.fp10.commonsflash.Activator; import platform.clients.fp10.libraries.alternativaclientflash.Activator; import platform.clients.fp10.libraries.alternativapartners.osgi.PartnersActivator; import platform.clients.fp10.libraries.alternativapartnersflash.Activator; import platform.clients.fp10.models.alternativaspacesmodelsflash.Activator; import platform.loading.init.SpacesModelsActivator; import projects.tanks.client.achievements.osgi.Activator; import projects.tanks.client.battleselect.osgi.Activator; import projects.tanks.client.battleservice.osgi.Activator; import projects.tanks.client.chat.osgi.Activator; import projects.tanks.client.clans.osgi.Activator; import projects.tanks.client.commons.osgi.Activator; import projects.tanks.client.entrance.osgi.Activator; import projects.tanks.client.panel.osgi.Activator; import projects.tanks.client.partners.osgi.Activator; import projects.tanks.client.tanksservices.osgi.Activator; import projects.tanks.client.users.osgi.Activator; import projects.tanks.clients.flash.commons.osgi.Activator; import projects.tanks.clients.flash.commonsflash.Activator; import projects.tanks.clients.fp10.libraries.tanksservicesflash.Activator; import projects.tanks.clients.fp10.models.clansmodelflash.Activator; import projects.tanks.clients.fp10.models.tanksbattleselectmodelflash.Activator; import projects.tanks.clients.fp10.models.tankschatmodelflash.Activator; import projects.tanks.clients.fp10.models.tankspanelmodelflash.Activator; import projects.tanks.clients.fp10.models.tankspartnersmodel.init.PartnersModelActivator; import projects.tanks.clients.fp10.models.tankspartnersmodelflash.Activator; import projects.tanks.clients.fp10.models.tanksusermodelflash.Activator; import projects.tanks.clients.fp10.tanksformsflash.Activator; public class EntranceActivator implements IBundleActivator { public function EntranceActivator() { super(); } public function start(param1:OSGi) : void { new ClientActivator().start(param1); new platform.clients.fp10.libraries.alternativaclientflash.Activator().start(param1); new platform.client.core.general.resource.osgi.Activator().start(param1); new platform.client.core.general.spaces.osgi.Activator().start(param1); new platform.client.core.general.pushnotification.osgi.Activator().start(param1); new SpacesModelsActivator().start(param1); new platform.clients.fp10.models.alternativaspacesmodelsflash.Activator().start(param1); new projects.tanks.client.chat.osgi.Activator().start(param1); new platform.client.core.general.socialnetwork.osgi.Activator().start(param1); new projects.tanks.client.battleservice.osgi.Activator().start(param1); new projects.tanks.client.tanksservices.osgi.Activator().start(param1); new PartnersActivator().start(param1); new platform.clients.fp10.libraries.alternativapartnersflash.Activator().start(param1); new TanksFontsActivator().start(param1); new projects.tanks.client.users.osgi.Activator().start(param1); new projects.tanks.client.commons.osgi.Activator().start(param1); new platform.client.models.commons.osgi.Activator().start(param1); new TanksServicesActivator().start(param1); new projects.tanks.clients.fp10.libraries.tanksservicesflash.Activator().start(param1); new TanksFormsActivator().start(param1); new projects.tanks.clients.fp10.tanksformsflash.Activator().start(param1); new projects.tanks.clients.flash.commons.osgi.Activator().start(param1); new projects.tanks.clients.flash.commonsflash.Activator().start(param1); new projects.tanks.client.achievements.osgi.Activator().start(param1); new projects.tanks.client.panel.osgi.Activator().start(param1); new PanelModelActivator().start(param1); new projects.tanks.clients.fp10.models.tankspanelmodelflash.Activator().start(param1); new projects.tanks.client.partners.osgi.Activator().start(param1); new projects.tanks.client.entrance.osgi.Activator().start(param1); new PartnersModelActivator().start(param1); new projects.tanks.clients.fp10.models.tankspartnersmodelflash.Activator().start(param1); new UserModelActivator().start(param1); new projects.tanks.clients.fp10.models.tanksusermodelflash.Activator().start(param1); new CommonsActivator().start(param1); new platform.clients.fp10.commonsflash.Activator().start(param1); new ChatModelActivator().start(param1); new projects.tanks.clients.fp10.models.tankschatmodelflash.Activator().start(param1); new projects.tanks.client.clans.osgi.Activator().start(param1); new ClansModelActivator().start(param1); new projects.tanks.clients.fp10.models.clansmodelflash.Activator().start(param1); new projects.tanks.client.battleselect.osgi.Activator().start(param1); new BattleSelectModelActivator().start(param1); new projects.tanks.clients.fp10.models.tanksbattleselectmodelflash.Activator().start(param1); } public function stop(param1:OSGi) : void { } } }
package alternativa.tanks { import alternativa.engine3d.core.Clipping; import alternativa.engine3d.core.Sorting; import alternativa.engine3d.objects.Mesh; public class Polygon extends Mesh { public function Polygon(vertices:Vector.<Number>, uv:Vector.<Number>, twoSided:Boolean) { super(); var numVertices:int = vertices.length / 3; var indices:Vector.<int> = new Vector.<int>(numVertices + 1); indices[0] = numVertices; for(var i:int = 0; i < numVertices; i++) { indices[i + 1] = i; } addVerticesAndFaces(vertices,uv,indices,true); if(!twoSided) { } calculateFacesNormals(); calculateBounds(); sorting = Sorting.DYNAMIC_BSP; clipping = Clipping.FACE_CLIPPING; } } }
package _codec.projects.tanks.client.battleservice { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battleservice.BattleRoundParameters; public class CodecBattleRoundParameters implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_reArmorEnabled:ICodec; public function CodecBattleRoundParameters() { super(); } public function init(param1:IProtocol) : void { this.codec_reArmorEnabled = param1.getCodec(new TypeCodecInfo(Boolean,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:BattleRoundParameters = new BattleRoundParameters(); local2.reArmorEnabled = this.codec_reArmorEnabled.decode(param1) as Boolean; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:BattleRoundParameters = BattleRoundParameters(param2); this.codec_reArmorEnabled.encode(param1,local3.reArmorEnabled); } } }
package platform.client.fp10.core.registry.impl { import alternativa.osgi.OSGi; import alternativa.osgi.service.logging.LogService; import alternativa.osgi.service.logging.Logger; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.types.Long; import flash.utils.Dictionary; import platform.client.fp10.core.model.IModel; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.registry.ModelRegistry; import platform.client.fp10.core.type.IGameObject; public class ModelsRegistryImpl implements ModelRegistry { [Inject] public static var protocol:IProtocol; private var logger:Logger; private var modelById:Dictionary; private var modelByMethod:Dictionary; private var model2constructorCodec:Dictionary; private var _models:Vector.<IModel>; private var class2Adapt:Dictionary = new Dictionary(); private var class2Events:Dictionary = new Dictionary(); public function ModelsRegistryImpl(param1:OSGi) { super(); var local2:LogService = LogService(param1.getService(LogService)); this.logger = local2.getLogger("modelsreg"); this.modelById = new Dictionary(); this.modelByMethod = new Dictionary(); this.model2constructorCodec = new Dictionary(); this._models = new Vector.<IModel>(); } public function register(param1:Long, param2:Long) : void { this.modelByMethod[param2] = param1; } public function registerModelConstructorCodec(param1:Long, param2:ICodec) : void { this.model2constructorCodec[param1] = param2; } public function unregisterModelsParamsStruct(param1:Long) : void { delete this.model2constructorCodec[param1]; } public function getModelConstructorCodec(param1:Long) : ICodec { return this.model2constructorCodec[param1]; } public function add(param1:IModel) : void { this._models.push(param1); var local2:Long = param1.id; this.modelById[local2] = param1; } public function invoke(param1:IGameObject, param2:Long, param3:ProtocolBuffer) : void { var local4:Long = Long(this.modelByMethod[param2]); var local5:Model = Model(this.modelById[local4]); if(local5 != null) { Model.object = param1; local5.invoke(param2,param3); Model.popObject(); } } public function getModel(param1:Long) : IModel { return this.modelById[param1]; } public function get models() : Vector.<IModel> { return this._models; } public function registerAdapt(param1:Class, param2:Class) : void { this.class2Adapt[param1] = param2; } public function registerEvents(param1:Class, param2:Class) : void { this.class2Events[param1] = param2; } public function getAdaptClass(param1:Class) : Class { var local2:Class = this.class2Adapt[param1]; if(local2 == null) { throw new Error("Proxy class not found for specified interface: " + param1); } return local2; } public function getEventsClass(param1:Class) : Class { var local2:Class = this.class2Events[param1]; if(local2 == null) { throw new Error("Proxy class not found for specified interface: " + param1); } return local2; } } }
package assets.combo { import flash.display.BitmapData; [Embed(source="/_assets/assets.combo.combo_DOWN_CENTER.png")] public dynamic class combo_DOWN_CENTER extends BitmapData { public function combo_DOWN_CENTER(param1:int = 175, param2:int = 31) { super(param1,param2); } } }
package platform.client.fp10.core.registry.impl { import alternativa.osgi.OSGi; import alternativa.osgi.service.logging.LogService; import alternativa.osgi.service.logging.Logger; import alternativa.protocol.IProtocol; import alternativa.types.Long; import flash.utils.Dictionary; import platform.client.fp10.core.registry.ResourceRegistry; import platform.client.fp10.core.resource.ILockableResource; import platform.client.fp10.core.resource.IResourceLoader; import platform.client.fp10.core.resource.IResourceLoadingListener; import platform.client.fp10.core.resource.Resource; import platform.client.fp10.core.resource.ResourceLogChannel; import platform.client.fp10.core.resource.ResourcePriority; import platform.client.fp10.core.service.loadingprogress.ILoadingProgressListener; import platform.client.fp10.core.service.loadingprogress.ILoadingProgressService; public class ResourceRegistryImpl implements ResourceRegistry, ILoadingProgressService { [Inject] public static var resourceLoader:IResourceLoader; private var _lock:int; private var protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); private var resourceGetterCodec:ResourceGetterCodec; private var resourceById:Dictionary = new Dictionary(); private var _resources:Vector.<Resource> = new Vector.<Resource>(); private var packetListeners:ProgressListeners = new ProgressListeners(); private var lockedResources:Vector.<ILockableResource> = new Vector.<ILockableResource>(); private var logger:Logger; private var type2class:Vector.<Class> = new Vector.<Class>(512,true); public function ResourceRegistryImpl(param1:OSGi) { super(); this.resourceGetterCodec = new ResourceGetterCodec(this); this.resourceGetterCodec.init(this.protocol); var local2:LogService = LogService(param1.getService(LogService)); this.logger = local2.getLogger(ResourceLogChannel.NAME); } public function registerTypeClasses(param1:int, param2:Class) : void { this.protocol.registerCodecForType(param2,this.resourceGetterCodec); this.type2class[param1] = param2; } public function getResourceClass(param1:int) : Class { return this.type2class[param1]; } public function isRegistered(param1:Long) : Boolean { return this.resourceById[param1] != null; } public function registerResource(param1:Resource) : void { this.resourceById[param1.id] = param1; this._resources.push(param1); } public function unregisterResource(param1:Long) : void { var local2:Resource = this.resourceById[param1]; if(local2 == null) { return; } delete this.resourceById[param1]; this._resources.splice(this._resources.indexOf(local2),1); } public function getResource(param1:Long) : Resource { return this.resourceById[param1]; } public function get resources() : Vector.<Resource> { return this._resources; } public function loadLazyResource(param1:Resource, param2:IResourceLoadingListener) : void { if(!param1.isLoaded) { resourceLoader.loadResource(param1,param2,ResourcePriority.LAZY); } } public function removeLazyListener(param1:Resource, param2:IResourceLoadingListener) : void { resourceLoader.removeResourceListener(param1,param2); } public function addLazyListener(param1:Resource, param2:IResourceLoadingListener) : void { resourceLoader.addResourceListener(param1,param2); } public function onPacketLoadingStart() : void { this.packetListeners.onLoadingStart(); } public function onPacketLoadingStop() : void { this.packetListeners.onLoadingStop(); } public function addPacketListener(param1:ILoadingProgressListener) : void { this.packetListeners.addListener(param1); } public function removePacketListener(param1:ILoadingProgressListener) : void { this.packetListeners.removeListener(param1); } public function isTypeClassRegistered(param1:int) : Boolean { return this.type2class[param1] != null; } public function isLocked() : Boolean { return this._lock > 0; } public function addLockedResource(param1:ILockableResource) : void { this.lockedResources.push(param1); } public function stopLoadingResources() : void { ++this._lock; } public function continueLoadingResources() : void { var local1:ILockableResource = null; --this._lock; if(this._lock == 0) { for each(local1 in this.lockedResources) { local1.unlockResourceLoading(); } this.lockedResources.length = 0; } } } } 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.registry.ResourceRegistry; import platform.client.fp10.core.resource.Resource; import platform.client.fp10.core.service.loadingprogress.ILoadingProgressListener; class ResourceGetterCodec implements ICodec { private var resourceRegistry:ResourceRegistry; private var longCodec:ICodec; public function ResourceGetterCodec(param1:ResourceRegistry) { super(); this.resourceRegistry = param1; } public function init(param1:IProtocol) : void { this.longCodec = param1.getCodec(new TypeCodecInfo(Long,false)); } public function encode(param1:ProtocolBuffer, param2:Object) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:Long = Long(this.longCodec.decode(param1)); var local3:Resource = this.resourceRegistry.getResource(local2); if(local3 == null) { throw new Error("Resource " + local2 + " not found"); } return local3; } } class ProgressListeners { public var listeners:Vector.<ILoadingProgressListener> = new Vector.<ILoadingProgressListener>(); private var added:Vector.<ILoadingProgressListener> = new Vector.<ILoadingProgressListener>(); private var removed:Vector.<ILoadingProgressListener> = new Vector.<ILoadingProgressListener>(); private var locked:Boolean; public function ProgressListeners() { super(); } public function addListener(param1:ILoadingProgressListener) : void { var local2:int = 0; if(this.locked) { local2 = int(this.removed.indexOf(param1)); if(local2 > -1) { this.removeByIndex(local2,this.removed); } else if(this.listeners.indexOf(param1) < 0 && this.added.indexOf(param1) < 0) { this.added.push(param1); } } else if(this.listeners.indexOf(param1) < 0) { this.listeners.push(param1); } } public function removeListener(param1:ILoadingProgressListener) : void { var local2:int = 0; if(this.locked) { local2 = int(this.added.indexOf(param1)); if(local2 > -1) { this.removeByIndex(local2,this.added); } else if(this.listeners.indexOf(param1) > -1 && this.removed.indexOf(param1) < 0) { this.removed.push(param1); } } else { local2 = int(this.listeners.indexOf(param1)); if(local2 > -1) { this.removeByIndex(local2,this.listeners); } } } public function onLoadingStart() : void { var local1:ILoadingProgressListener = null; this.lock(); for each(local1 in this.listeners) { local1.onLoadingStart(); } this.unlock(); } public function onLoadingStop() : void { var local1:ILoadingProgressListener = null; this.lock(); for each(local1 in this.listeners) { local1.onLoadingStop(); } this.unlock(); } private function lock() : void { this.locked = true; } private function unlock() : void { var local1:ILoadingProgressListener = null; this.locked = false; if(this.removed.length > 0) { for each(local1 in this.removed) { this.removeByIndex(this.listeners.indexOf(local1),this.listeners); } this.removed.length = 0; } if(this.added.length > 0) { for each(local1 in this.added) { this.listeners.push(local1); } this.added.length = 0; } } private function removeByIndex(param1:int, param2:Vector.<ILoadingProgressListener>) : void { var local3:uint = param2.length; param2[param1] = param2[--local3]; param2.length = local3; } }
package projects.tanks.client.panel.model.challenge.rewarding { public class Tier { private var _battlePassItem:TierItem; private var _freeItem:TierItem; private var _needShowBattlePassItem:Boolean; private var _stars:int; public function Tier(param1:TierItem = null, param2:TierItem = null, param3:Boolean = false, param4:int = 0) { super(); this._battlePassItem = param1; this._freeItem = param2; this._needShowBattlePassItem = param3; this._stars = param4; } public function get battlePassItem() : TierItem { return this._battlePassItem; } public function set battlePassItem(param1:TierItem) : void { this._battlePassItem = param1; } public function get freeItem() : TierItem { return this._freeItem; } public function set freeItem(param1:TierItem) : void { this._freeItem = param1; } public function get needShowBattlePassItem() : Boolean { return this._needShowBattlePassItem; } public function set needShowBattlePassItem(param1:Boolean) : void { this._needShowBattlePassItem = param1; } public function get stars() : int { return this._stars; } public function set stars(param1:int) : void { this._stars = param1; } public function toString() : String { var local1:String = "Tier ["; local1 += "battlePassItem = " + this.battlePassItem + " "; local1 += "freeItem = " + this.freeItem + " "; local1 += "needShowBattlePassItem = " + this.needShowBattlePassItem + " "; local1 += "stars = " + this.stars + " "; return local1 + "]"; } } }
package projects.tanks.clients.tankslauncershared.dishonestprogressbar { import mx.core.BitmapAsset; [Embed(source="/_assets/projects.tanks.clients.tankslauncershared.dishonestprogressbar.DishonestProgressBar_blickClass.jpg")] public class DishonestProgressBar_blickClass extends BitmapAsset { public function DishonestProgressBar_blickClass() { super(); } } }
package projects.tanks.client.panel.model.payment.modes.braintree { import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl; public interface IBraintreePaymentModelBase { function receiveUrl(param1:PaymentRequestUrl) : void; } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapRateOfFire.png")] public class ItemInfoPanelBitmaps_bitmapRateOfFire extends BitmapAsset { public function ItemInfoPanelBitmaps_bitmapRateOfFire() { super(); } } }
package utils.tweener.easing { public class Expo { public function Expo() { super(); } public static function easeIn(param1:Number, param2:Number, param3:Number, param4:Number) : Number { return param1 == 0 ? param2 : param3 * Math.pow(2,10 * (param1 / param4 - 1)) + param2 - param3 * 0.001; } public static function easeOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number { return param1 == param4 ? param2 + param3 : param3 * (-Math.pow(2,-10 * param1 / param4) + 1) + param2; } public static function easeInOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number { if(param1 == 0) { return param2; } if(param1 == param4) { return param2 + param3; } param1 = param1 / (param4 * 0.5); if(param1 < 1) { return param3 * 0.5 * Math.pow(2,10 * (param1 - 1)) + param2; } return param3 * 0.5 * (-Math.pow(2,-10 * --param1) + 2) + param2; } } }
package _codec.projects.tanks.client.panel.model.quest.notifier { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.codec.OptionalCodecDecorator; import alternativa.protocol.impl.LengthCodecHelper; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.panel.model.quest.notifier.QuestNotifierCC; public class VectorCodecQuestNotifierCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecQuestNotifierCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(QuestNotifierCC,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.<QuestNotifierCC> = new Vector.<QuestNotifierCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = QuestNotifierCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:QuestNotifierCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<QuestNotifierCC> = Vector.<QuestNotifierCC>(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 controls.buttons.h50px { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.buttons.h50px.GreyBigButtonSkin_leftUpClass.png")] public class GreyBigButtonSkin_leftUpClass extends BitmapAsset { public function GreyBigButtonSkin_leftUpClass() { super(); } } }
package alternativa.tanks.gui.communication.tabs.clanchat { import flash.events.Event; public class ClanChatTabNewMessageEvent extends Event { public static const NEW_MESSAGE:String = "ClanChatTabNewMessageEvent.NEW_MESSAGE"; public function ClanChatTabNewMessageEvent() { super(NEW_MESSAGE,true); } } }
package alternativa.physics { import alternativa.math.Vector3; public class ContactPoint { public var pos:Vector3; public var penetration:Number; public var feature1:int; public var feature2:int; public var normalVel:Number; public var minSepVel:Number; public var velByUnitImpulseN:Number; public var angularInertia1:Number; public var angularInertia2:Number; public var r1:Vector3; public var r2:Vector3; public var accumImpulseN:Number; public var satisfied:Boolean; public function ContactPoint() { this.pos = new Vector3(); this.r1 = new Vector3(); this.r2 = new Vector3(); super(); } public function copyFrom(cp:ContactPoint) : void { this.pos.vCopy(cp.pos); this.penetration = cp.penetration; this.feature1 = cp.feature1; this.feature2 = cp.feature2; this.r1.vCopy(cp.r1); this.r2.vCopy(cp.r2); } public function destroy() : * { this.pos = null; this.r1 = null; this.r2 = null; } } }
package alternativa.tanks.models.battle.gui.inventory { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_damageColorIconClass.png")] public class HudInventoryIcon_damageColorIconClass extends BitmapAsset { public function HudInventoryIcon_damageColorIconClass() { super(); } } }
package alternativa.tanks.models.weapon.railgun { import alternativa.engine3d.core.Face; import alternativa.engine3d.core.Sorting; import alternativa.engine3d.core.Vertex; import alternativa.engine3d.materials.Material; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.Mesh; internal class ShotTrail extends Mesh { private var a:Vertex; private var b:Vertex; private var c:Vertex; private var d:Vertex; private var face:Face; private var bottomV:Number; private var distanceV:Number; public function ShotTrail() { super(); this.a = addVertex(-1,1,0); this.b = addVertex(-1,0,0); this.c = addVertex(1,0,0); this.d = addVertex(1,1,0); this.face = addQuadFace(this.a,this.b,this.c,this.d); calculateFacesNormals(); sorting = Sorting.DYNAMIC_BSP; softAttenuation = 80; shadowMapAlphaThreshold = 2; depthMapAlphaThreshold = 2; useShadowMap = false; useLight = false; } public function init(param1:Number, param2:Number, param3:Material, param4:Number) : void { var local5:Number = param1 * 0.5; this.a.x = -local5; this.a.y = param2; this.a.u = 0; this.b.x = -local5; this.b.y = 0; this.b.u = 0; this.c.x = local5; this.c.y = 0; this.c.u = 1; this.d.x = local5; this.d.y = param2; this.d.u = 1; boundMinX = -local5; boundMinY = 0; boundMinZ = 0; boundMaxX = local5; boundMaxY = param2; boundMaxZ = 0; this.face.material = param3; var local6:TextureMaterial = param3 as TextureMaterial; if(local6 != null && local6.texture != null) { this.bottomV = param2 / (param1 * local6.texture.height / local6.texture.width); this.distanceV = param4 / param1; } else { this.bottomV = 1; this.distanceV = 0; } } public function clear() : void { this.face.material = null; } public function update(param1:Number) : void { var local2:Number = this.distanceV * param1; this.a.v = local2; this.b.v = this.bottomV + local2; this.c.v = this.bottomV + local2; this.d.v = local2; } } }
package projects.tanks.client.panel.model.shop.onetimepurchase { 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 ShopItemOneTimePurchaseModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function ShopItemOneTimePurchaseModelServer(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 com.lorentz.SVG.data.filters { import flash.filters.BitmapFilter; import flash.filters.BitmapFilterQuality; import flash.filters.BlurFilter; public class SVGGaussianBlur implements ISVGFilter { public var stdDeviationX:Number = 0; public var stdDeviationY:Number = 0; public function getFlashFilter():BitmapFilter { return new BlurFilter(stdDeviationX * 2, stdDeviationY * 2, BitmapFilterQuality.HIGH); } public function clone():Object { var c:SVGGaussianBlur = new SVGGaussianBlur(); c.stdDeviationX = stdDeviationX; c.stdDeviationY = stdDeviationY; return c; } } }
package alternativa.tanks.model.challenge.greenpanel.gray { import flash.display.BitmapData; import utils.FlipBitmapDataUtils; public class GrayPacket { [Embed(source="942.png")] private static const bg:Class; [Embed(source="819.png")] private static const left_botom_corner:Class; [Embed(source="935.png")] private static const left_line:Class; [Embed(source="834.png")] private static const left_top:Class; [Embed(source="980.png")] private static const top_line:Class; public static const _dailyQuestPanelBackground:BitmapData = new bg().bitmapData; public static const _bottomLeftCorner:BitmapData = new left_botom_corner().bitmapData; public static const _leftLine:BitmapData = new left_line().bitmapData; public static const _topLeftCorner:BitmapData = new left_top().bitmapData; public static const _topCenterLine:BitmapData = new top_line().bitmapData; public static const _topRightCorner:BitmapData = FlipBitmapDataUtils.flipH(_topLeftCorner); public static const _bottomCenterLine:BitmapData = FlipBitmapDataUtils.flipW(_topCenterLine); public static const _dailyQuestPanelRightLine:BitmapData = FlipBitmapDataUtils.flipH(_leftLine); public static const _bottomRightCorner:BitmapData = FlipBitmapDataUtils.flipH(_bottomLeftCorner); public function GrayPacket() { super(); } } }
package alternativa.tanks.locale.model { import alternativa.model.IModel; import alternativa.model.IObjectLoadListener; import alternativa.object.ClientObject; import com.alternativaplatform.client.models.core.users.model.localized.ILocalizedModelBase; import com.alternativaplatform.client.models.core.users.model.localized.LocalizedModelBase; public class LocaleModel extends LocalizedModelBase implements ILocalizedModelBase, IObjectLoadListener { public function LocaleModel() { super(); _interfaces.push(IModel); _interfaces.push(ILocalizedModelBase); _interfaces.push(IObjectLoadListener); } public function objectLoaded(object:ClientObject) : void { } public function objectUnloaded(object:ClientObject) : void { } } }
package alternativa.tanks.sfx { import alternativa.math.Vector3; import alternativa.object.ClientObject; import alternativa.tanks.camera.GameCamera; import alternativa.tanks.engine3d.AnimatedSprite3D; import alternativa.tanks.engine3d.TextureAnimation; import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer; import alternativa.tanks.utils.objectpool.ObjectPool; import alternativa.tanks.utils.objectpool.PooledObject; import flash.geom.ColorTransform; public class LimitedDistanceAnimatedSpriteEffect extends PooledObject implements IGraphicEffect { private static const effectPosition:Vector3 = new Vector3(); public var sprite:AnimatedSprite3D; private var currentFrame:Number; private var framesPerMs:Number; private var loopsCount:int; private var positionProvider:Object3DPositionProvider; private var fallOffStart:Number; private var distanceToDisable:Number; private var alphaMultiplier:Number; private var container:Scene3DContainer; public function LimitedDistanceAnimatedSpriteEffect(param1:ObjectPool) { super(param1); this.sprite = new AnimatedSprite3D(1,1); } public function init(param1:Number, param2:Number, param3:TextureAnimation, param4:Number, param5:Object3DPositionProvider, param6:Number = 0.5, param7:Number = 0.5, param8:ColorTransform = null, param9:Number = 130, param10:String = "normal", param11:Number = 1000000, param12:Number = 1000000, param13:Number = 1, param14:Boolean = false) : void { this.alphaMultiplier = param13; this.initSprite(param1,param2,param4,param6,param7,param8,param3,param9,param10); this.fallOffStart = param11; this.distanceToDisable = param12; param5.initPosition(this.sprite); this.framesPerMs = 0.001 * param3.fps; this.positionProvider = param5; this.currentFrame = 0; this.loopsCount = 1; this.sprite.useShadowMap = param14; this.sprite.useLight = param14; this.sprite.softAttenuation = 80; } public function addToContainer(param1:Scene3DContainer) : void { this.container = param1; param1.addChild(this.sprite); } public function play(param1:int, param2:GameCamera) : Boolean { this.sprite.setFrameIndex(this.currentFrame); this.currentFrame += param1 * this.framesPerMs; this.positionProvider.updateObjectPosition(this.sprite,param2,param1); if(this.loopsCount > 0 && this.currentFrame >= this.sprite.getNumFrames()) { --this.loopsCount; if(this.loopsCount == 0) { return false; } this.currentFrame -= this.sprite.getNumFrames(); } effectPosition.x = this.sprite.x; effectPosition.y = this.sprite.y; effectPosition.z = this.sprite.z; var _loc3_:Number = effectPosition.distanceTo(param2.pos); if(_loc3_ > this.distanceToDisable) { this.sprite.visible = false; } else { this.sprite.visible = true; if(_loc3_ > this.fallOffStart) { this.sprite.alpha = this.alphaMultiplier * (this.distanceToDisable - _loc3_) / (this.distanceToDisable - this.fallOffStart); } else { this.sprite.alpha = this.alphaMultiplier; } } return true; } public function destroy() : void { this.container.removeChild(this.sprite); this.container = null; this.sprite.clear(); this.positionProvider.destroy(); this.positionProvider = null; } public function kill() : void { this.loopsCount = 1; this.currentFrame = this.sprite.getNumFrames(); } private function initSprite(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number, param6:ColorTransform, param7:TextureAnimation, param8:Number, param9:String) : void { this.sprite.width = param1; this.sprite.height = param2; this.sprite.rotation = param3; this.sprite.originX = param4; this.sprite.originY = param5; this.sprite.blendMode = param9; this.sprite.colorTransform = param6; this.sprite.softAttenuation = param8; this.sprite.setAnimationData(param7); } public function get owner() : ClientObject { return null; } } }
package alternativa.protocol { public class CompressionType { public static var NONE:CompressionType = new CompressionType(); public static var DEFLATE:CompressionType = new CompressionType(); public static var DEFLATE_AUTO:CompressionType = new CompressionType(); public function CompressionType() { super(); } } }
package scpacker.gui { import flash.display.Bitmap; public class GTanksI implements GTanksLoaderImages { [Embed(source="905.png")] private static const coldload1:Class; [Embed(source="904.png")] private static const coldload2:Class; [Embed(source="903.png")] private static const coldload3:Class; [Embed(source="902.png")] private static const coldload4:Class; [Embed(source="900.png")] private static const coldload5:Class; [Embed(source="899.png")] private static const coldload6:Class; [Embed(source="898.png")] private static const coldload7:Class; [Embed(source="897.png")] private static const coldload8:Class; [Embed(source="896.png")] private static const coldload9:Class; [Embed(source="813.png")] private static const coldload10:Class; [Embed(source="812.png")] private static const coldload11:Class; [Embed(source="815.png")] private static const coldload12:Class; [Embed(source="814.png")] private static const coldload13:Class; [Embed(source="808.png")] private static const coldload14:Class; [Embed(source="809.png")] private static const coldload15:Class; [Embed(source="810.png")] private static const coldload16:Class; [Embed(source="811.png")] private static const coldload17:Class; private static var items:Array = new Array(coldload1,coldload2,coldload3,coldload4,coldload5,coldload6,coldload7,coldload8,coldload9,coldload10,coldload11,coldload12,coldload13,coldload14,coldload15,coldload16,coldload17); private var prev:int; public function GTanksI() { super(); } public function getRandomPict() : Bitmap { var r:int = 0; while((r = Math.random() * items.length) == this.prev) { } return new Bitmap(new items[r]().bitmapData); } } }
package alternativa.tanks.model { import flash.utils.getTimer; public class PingService { private static var ping:int; private static var reqTime:int; private static var resTime:int; public function PingService() { super(); } public static function setReqTime() : void { reqTime = getTimer(); } public static function getResTime() : int { return resTime; } public static function setPing() : void { ping = getTimer() - reqTime; resTime = getTimer(); } public static function getPing() : int { return ping; } } }
package alternativa.tanks.battle.objects.tank.tankskin { import alternativa.tanks.battle.events.BattleEventListener; import alternativa.tanks.battle.objects.tank.skintexturesregistry.TankSkinTextureRegistry; public class TankSkinTextureRegistryCleaner implements BattleEventListener { private var registry:TankSkinTextureRegistry; public function TankSkinTextureRegistryCleaner(param1:TankSkinTextureRegistry) { super(); this.registry = param1; } public function handleBattleEvent(param1:Object) : void { this.registry.clear(); } } }
package alternativa.tanks.model.chat { import alternativa.tanks.service.settings.ISettingsService; import alternativa.tanks.service.settings.SettingEnum; import alternativa.tanks.service.settings.SettingsServiceEvent; import platform.client.fp10.core.type.AutoClosable; public class ChatSettingsTracker implements AutoClosable { [Inject] public static var settingsService:ISettingsService; private var chat:ShowChat; public function ChatSettingsTracker(param1:ShowChat) { super(); this.chat = param1; param1.setShowChat(settingsService.showChat); settingsService.addEventListener(SettingsServiceEvent.SETTINGS_CHANGED,this.onSettingsAccepted); } private function onSettingsAccepted(param1:SettingsServiceEvent) : void { if(param1.getSetting() == SettingEnum.SHOW_CHAT) { this.chat.setShowChat(settingsService.showChat); } } public function close() : void { this.chat = null; settingsService.removeEventListener(SettingsServiceEvent.SETTINGS_CHANGED,this.onSettingsAccepted); } } }
package _codec.projects.tanks.client.battlefield.models.bonus.bonus.battlebonuses.crystal { 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 platform.client.fp10.core.resource.types.SoundResource; import platform.client.fp10.core.resource.types.TextureResource; import projects.tanks.client.battlefield.models.bonus.bonus.battlebonuses.crystal.BattleGoldBonusCC; public class CodecBattleGoldBonusCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_sound:ICodec; private var codec_sprite:ICodec; public function CodecBattleGoldBonusCC() { super(); } public function init(param1:IProtocol) : void { this.codec_sound = param1.getCodec(new TypeCodecInfo(SoundResource,false)); this.codec_sprite = param1.getCodec(new TypeCodecInfo(TextureResource,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:BattleGoldBonusCC = new BattleGoldBonusCC(); local2.sound = this.codec_sound.decode(param1) as SoundResource; local2.sprite = this.codec_sprite.decode(param1) as TextureResource; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:BattleGoldBonusCC = BattleGoldBonusCC(param2); this.codec_sound.encode(param1,local3.sound); this.codec_sprite.encode(param1,local3.sprite); } } }
package projects.tanks.client.battleselect.model.battle.entrance { 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 BattleEntranceModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:BattleEntranceModelServer; private var client:IBattleEntranceModelBase = IBattleEntranceModelBase(this); private var modelId:Long = Long.getLong(124040719,-2122162804); private var _enterToBattleFailedId:Long = Long.getLong(1427344653,-225635033); private var _equipmentNotMatchConstraintsId:Long = Long.getLong(1971172597,1526425495); private var _fightFailedServerIsHaltingId:Long = Long.getLong(1465029547,1591202968); public function BattleEntranceModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new BattleEntranceModelServer(IModel(this)); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._enterToBattleFailedId: this.client.enterToBattleFailed(); break; case this._equipmentNotMatchConstraintsId: this.client.equipmentNotMatchConstraints(); break; case this._fightFailedServerIsHaltingId: this.client.fightFailedServerIsHalting(); } } override public function get id() : Long { return this.modelId; } } }
package alternativa.tanks.models.battle.gui.gui.statistics.table { import controls.Label; import controls.statassets.BlackRoundRect; public class BattleNamePlate extends BlackRoundRect { private static const FONT_SIZE:int = 18; private static const PADDING:int = 3; private var label:Label; public function BattleNamePlate(param1:String) { super(); this.label = new Label(); this.label.size = FONT_SIZE; this.label.text = param1; addChild(this.label); this.label.y = PADDING; height = 2 * PADDING + this.label.height; } public function setBattleName(param1:String) : * { this.label.text = param1; this.updateLabelPosition(); } [Obfuscation(rename="false")] override public function set width(param1:Number) : void { super.width = param1; this.updateLabelPosition(); } private function updateLabelPosition() : void { this.label.x = int(width - this.label.width) >> 1; } } }
package projects.tanks.clients.flash.commons.models.captcha { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.commons.models.captcha.CaptchaLocation; public class IServerCaptchaEvents implements IServerCaptcha { private var object:IGameObject; private var impl:Vector.<Object>; public function IServerCaptchaEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function bindFacade(param1:CaptchaClientFacade) : void { var i:int = 0; var m:IServerCaptcha = null; var captchaFacade:CaptchaClientFacade = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = IServerCaptcha(this.impl[i]); m.bindFacade(captchaFacade); i++; } } finally { Model.popObject(); } } public function unbindFacade() : void { var i:int = 0; var m:IServerCaptcha = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = IServerCaptcha(this.impl[i]); m.unbindFacade(); i++; } } finally { Model.popObject(); } } public function checkCaptcha(param1:String, param2:CaptchaLocation) : void { var i:int = 0; var m:IServerCaptcha = null; var answer:String = param1; var location:CaptchaLocation = param2; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = IServerCaptcha(this.impl[i]); m.checkCaptcha(answer,location); i++; } } finally { Model.popObject(); } } public function getNewCaptcha(param1:CaptchaLocation) : void { var i:int = 0; var m:IServerCaptcha = null; var location:CaptchaLocation = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = IServerCaptcha(this.impl[i]); m.getNewCaptcha(location); i++; } } finally { Model.popObject(); } } } }
package projects.tanks.clients.fp10.libraries.tanksservices.model.listener { import alternativa.types.Long; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; import projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.UserInfoConsumer; public class UserNotifierEvents implements UserNotifier { private var object:IGameObject; private var impl:Vector.<Object>; public function UserNotifierEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getDataConsumer(param1:Long) : UserInfoConsumer { var result:UserInfoConsumer = null; var i:int = 0; var m:UserNotifier = null; var userId:Long = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = UserNotifier(this.impl[i]); result = m.getDataConsumer(userId); i++; } } finally { Model.popObject(); } return result; } public function hasDataConsumer(param1:Long) : Boolean { var result:Boolean = false; var i:int = 0; var m:UserNotifier = null; var userId:Long = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = UserNotifier(this.impl[i]); result = Boolean(m.hasDataConsumer(userId)); i++; } } finally { Model.popObject(); } return result; } public function subcribe(param1:Long, param2:UserInfoConsumer) : void { var i:int = 0; var m:UserNotifier = null; var userId:Long = param1; var consumer:UserInfoConsumer = param2; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = UserNotifier(this.impl[i]); m.subcribe(userId,consumer); i++; } } finally { Model.popObject(); } } public function refresh(param1:Long, param2:UserInfoConsumer) : void { var i:int = 0; var m:UserNotifier = null; var userId:Long = param1; var consumer:UserInfoConsumer = param2; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = UserNotifier(this.impl[i]); m.refresh(userId,consumer); i++; } } finally { Model.popObject(); } } public function unsubcribe(param1:Vector.<Long>) : void { var i:int = 0; var m:UserNotifier = null; var usersId:Vector.<Long> = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = UserNotifier(this.impl[i]); m.unsubcribe(usersId); i++; } } finally { Model.popObject(); } } public function getCurrentUserId() : Long { var result:Long = null; var i:int = 0; var m:UserNotifier = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = UserNotifier(this.impl[i]); result = m.getCurrentUserId(); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.tanks.models.weapon.common { import platform.client.fp10.core.type.IGameObject; [ModelInterface] public interface WeaponBuffListener { function weaponBuffStateChanged(param1:IGameObject, param2:Boolean, param3:Number) : void; } }
package projects.tanks.client.clans.user.incoming { import alternativa.types.Long; public interface IClanUserIncomingModelBase { function onAdding(param1:Long) : void; function onRemoved(param1:Long) : void; } }
package projects.tanks.client.panel.model.challenge.stars { public interface IStarsInfoModelBase { function setStars(param1:int) : void; } }
package alternativa.tanks.service.notificationcategories { import flash.events.EventDispatcher; import projects.tanks.client.commons.types.ItemViewCategoryEnum; import projects.tanks.client.panel.model.garage.GarageItemInfo; import projects.tanks.clients.fp10.libraries.tanksservices.service.storage.IStorageService; public class NotificationGarageCategoriesService extends EventDispatcher implements INotificationGarageCategoriesService { [Inject] public static var storageService:IStorageService; private static const NEW_ITEM_NOTIFICATION_SHARED_KEY:String = "NEW_ITEM_NOTIFICATION_IN_CATEGORY"; public function NotificationGarageCategoriesService() { super(); } public function notifyAboutAvailableItems(param1:Vector.<GarageItemInfo>) : void { var local4:ItemViewCategoryEnum = null; var local2:int = int(param1.length); var local3:int = 0; while(local3 < local2) { local4 = param1[local3].itemViewCategory; if(!this.isNeedShowNewItemNotification(local4)) { this.markAsNeedShowNewItemNotification(local4); } local3++; } dispatchEvent(new NotificationGarageCategoriesEvent(NotificationGarageCategoriesEvent.NOTIFICATION_CHANGE)); } private function markAsNeedShowNewItemNotification(param1:ItemViewCategoryEnum) : void { storageService.getStorage().data[this.getNewItemNotificationSharedKey(param1)] = true; } public function categoryShowed(param1:ItemViewCategoryEnum) : void { storageService.getStorage().data[this.getNewItemNotificationSharedKey(param1)] = false; } public function isNeedShowNewItemNotification(param1:ItemViewCategoryEnum) : Boolean { var local2:Boolean = false; var local3:String = this.getNewItemNotificationSharedKey(param1); if(storageService.getStorage().data.hasOwnProperty(local3)) { local2 = Boolean(storageService.getStorage().data[local3]); } return local2; } private function getNewItemNotificationSharedKey(param1:ItemViewCategoryEnum) : String { return NEW_ITEM_NOTIFICATION_SHARED_KEY + param1.value; } public function notifyAboutNewItemsInCategory(param1:ItemViewCategoryEnum) : void { this.markAsNeedShowNewItemNotification(param1); } } }
package projects.tanks.client.battlefield.models.tankparts.weapon.angles.verticals.autoaiming { 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; import projects.tanks.client.battlefield.models.tankparts.weapon.angles.verticals.VerticalAnglesCC; public class WeaponVerticalAnglesModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:WeaponVerticalAnglesModelServer; private var client:IWeaponVerticalAnglesModelBase = IWeaponVerticalAnglesModelBase(this); private var modelId:Long = Long.getLong(1835454872,-194543840); public function WeaponVerticalAnglesModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new WeaponVerticalAnglesModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(VerticalAnglesCC,false))); } protected function getInitParam() : VerticalAnglesCC { return VerticalAnglesCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { var local3:* = param1; switch(false ? 0 : 0) { } } override public function get id() : Long { return this.modelId; } } }
package _codec.projects.tanks.client.panel.model.bonus.showing.info { 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.bonus.showing.info.BonusInfoCC; public class VectorCodecBonusInfoCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecBonusInfoCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(BonusInfoCC,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.<BonusInfoCC> = new Vector.<BonusInfoCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = BonusInfoCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:BonusInfoCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<BonusInfoCC> = Vector.<BonusInfoCC>(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 controls { import flash.display.MovieClip; [Embed(source="/_assets/assets.swf", symbol="symbol1317")] public class StepperButton extends MovieClip { public function StepperButton() { super(); gotoAndStop(1); } } }
package controls.timer { import assets.icons.BattleInfoIcons; import controls.labels.CountDownTimerLabel; import flash.display.Sprite; import flash.events.Event; import utils.TimeFormatter; public class CountDownTimerWithIcon extends Sprite { private var timerLabel:CountDownTimerLabel = new CountDownTimerLabel(); private var icon:BattleInfoIcons; private var rightX:int; public function CountDownTimerWithIcon(param1:Boolean = true) { super(); this.icon = new BattleInfoIcons(); this.icon.type = BattleInfoIcons.TIME_LIMIT; addChild(this.icon); addChild(this.timerLabel); if(param1) { this.timerLabel.addEventListener(Event.CHANGE,this.onChange); } else { this.timerLabel.x = this.icon.width + 3; } } private function onChange(param1:Event) : void { this.align(); } private function align() : void { this.icon.x = this.rightX - this.timerLabel.width - this.icon.width - 3; this.timerLabel.x = this.rightX - this.timerLabel.width; } public function start(param1:CountDownTimer) : void { this.timerLabel.start(param1); } public function stop() : void { this.timerLabel.stop(); } public function setTime(param1:int) : void { this.stop(); this.timerLabel.text = TimeFormatter.format(param1); this.align(); } public function setRightX(param1:int) : void { this.rightX = param1; this.align(); } } }
package alternativa.tanks.models.battlefield.gui.statistics.field { import mx.core.BitmapAsset; [ExcludeClass] public class IconField_dom extends BitmapAsset { public function IconField_dom() { super(); } } }
package alternativa.tanks.models.tank.event { import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class LocalTankUnloadListenerEvents implements LocalTankUnloadListener { private var object:IGameObject; private var impl:Vector.<Object>; public function LocalTankUnloadListenerEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function localTankUnloaded(param1:Boolean) : void { var i:int = 0; var m:LocalTankUnloadListener = null; var resetTank:Boolean = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = LocalTankUnloadListener(this.impl[i]); m.localTankUnloaded(resetTank); i++; } } finally { Model.popObject(); } } } }
package alternativa.tanks.gui.clanmanagement.clanmemberlist { import alternativa.types.Long; public interface ISearchInput { function onUidExist() : void; function onUidNotExist() : void; function onAlreadyInAccepted(param1:String) : void; function onAlreadyInOutgoing(param1:String) : void; function onAlreadyInIncoming(param1:Long, param2:String) : void; function onUserLowRank(param1:String) : void; function onAlreadyInClan(param1:String) : void; function onRestrictionOnJoin(param1:String) : void; function clanBlocked(param1:String) : void; function incomingRequestDisabled(param1:String) : void; } }
package _codec.projects.tanks.client.garage.models.item.temporary { 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.temporary.TemporaryItemCC; public class VectorCodecTemporaryItemCCLevel1 implements ICodec { private var elementCodec:ICodec; private var optionalElement:Boolean; public function VectorCodecTemporaryItemCCLevel1(param1:Boolean) { super(); this.optionalElement = param1; } public function init(param1:IProtocol) : void { this.elementCodec = param1.getCodec(new TypeCodecInfo(TemporaryItemCC,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.<TemporaryItemCC> = new Vector.<TemporaryItemCC>(local2,true); var local4:int = 0; while(local4 < local2) { local3[local4] = TemporaryItemCC(this.elementCodec.decode(param1)); local4++; } return local3; } public function encode(param1:ProtocolBuffer, param2:Object) : void { var local4:TemporaryItemCC = null; if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:Vector.<TemporaryItemCC> = Vector.<TemporaryItemCC>(param2); var local5:int = int(local3.length); LengthCodecHelper.encodeLength(param1,local5); var local6:int = 0; while(local6 < local5) { this.elementCodec.encode(param1,local3[local6]); local6++; } } } }
package alternativa.physics { import alternativa.math.Matrix3; import alternativa.math.Vector3; import alternativa.physics.collision.ICollisionDetector; import alternativa.physics.collision.KdTreeCollisionDetector; import alternativa.physics.constraints.Constraint; use namespace altphysics; public class PhysicsScene { private static var lastBodyId:int; public const MAX_CONTACTS:int = 1000; public var penResolutionSteps:int = 10; public var allowedPenetration:Number = 0.01; public var maxPenResolutionSpeed:Number = 0.5; public var collisionIterations:int = 4; public var contactIterations:int = 4; public var usePrediction:Boolean = false; public var freezeSteps:int = 10; public var linSpeedFreezeLimit:Number = 1; public var angSpeedFreezeLimit:Number = 0.01; public var staticSeparationIterations:int = 10; public var staticSeparationSteps:int = 10; public var maxAngleMove:Number = 10; public var useStaticSeparation:Boolean = false; public var _gravity:Vector3; public var _gravityMagnitude:Number = 9.8; public var collisionDetector:ICollisionDetector; public var bodies:BodyList; altphysics var contacts:Contact; altphysics var constraints:Vector.<Constraint>; altphysics var constraintsNum:int; public var timeStamp:int; public var time:int; private var borderContact:Contact; private var _r:Vector3; private var _t:Vector3; private var _v:Vector3; private var _v1:Vector3; private var _v2:Vector3; public var _staticCD:KdTreeCollisionDetector; public function PhysicsScene() { this._gravity = new Vector3(0,0,-9.8); this.bodies = new BodyList(); this.constraints = new Vector.<Constraint>(); this._r = new Vector3(); this._t = new Vector3(); this._v = new Vector3(); this._v1 = new Vector3(); this._v2 = new Vector3(); super(); this.contacts = new Contact(0); var contact:Contact = this.contacts; for(var i:int = 1; i < this.MAX_CONTACTS; i++) { contact.next = new Contact(i); contact = contact.next; } this.collisionDetector = new KdTreeCollisionDetector(); this._staticCD = this.collisionDetector as KdTreeCollisionDetector; } public function get gravity() : Vector3 { return this._gravity.vClone(); } public function set gravity(value:Vector3) : void { this._gravity.vCopy(value); this._gravityMagnitude = this._gravity.vLength(); } public function addBody(body:Body) : void { body.id = lastBodyId++; body.world = this; this.bodies.append(body); } public function removeBody(body:Body) : void { if(this.bodies.remove(body)) { body.world = null; } } public function addConstraint(c:Constraint) : void { var _loc2_:* = this.constraintsNum++; this.constraints[_loc2_] = c; c.world = this; } public function removeConstraint(c:Constraint) : Boolean { var idx:int = this.constraints.indexOf(c); if(idx < 0) { return false; } this.constraints.splice(idx,1); --this.constraintsNum; c.world = null; return true; } private function applyForces(dt:Number) : void { var body:Body = null; body = null; var item:BodyListItem = this.bodies.head; while(item != null) { body = item.body; body.beforePhysicsStep(dt); body.calcAccelerations(); if(body.movable && !body.frozen) { body.accel.x += this._gravity.x; body.accel.y += this._gravity.y; body.accel.z += this._gravity.z; } item = item.next; } } private function detectCollisions(dt:Number) : void { var b2:Body = null; var cp:ContactPoint = null; var bPos:Vector3 = null; var body:Body = null; var b1:Body = null; b2 = null; var j:int = 0; cp = null; bPos = null; var item:BodyListItem = this.bodies.head; while(item != null) { body = item.body; if(!body.frozen) { body.contactsNum = 0; body.saveState(); if(this.usePrediction) { body.integrateVelocity(dt); body.integratePosition(dt); } body.calcDerivedData(); } item = item.next; } this.borderContact = this.collisionDetector.getAllContacts(this.contacts); var contact:Contact = this.contacts; while(contact != this.borderContact) { b1 = contact.body1; b2 = contact.body2; for(j = 0; j < contact.pcount; j++) { cp = contact.points[j]; bPos = b1.state.pos; cp.r1.x = cp.pos.x - bPos.x; cp.r1.y = cp.pos.y - bPos.y; cp.r1.z = cp.pos.z - bPos.z; if(b2 != null) { bPos = b2.state.pos; cp.r2.x = cp.pos.x - bPos.x; cp.r2.y = cp.pos.y - bPos.y; cp.r2.z = cp.pos.z - bPos.z; } } contact = contact.next; } if(this.usePrediction) { item = this.bodies.head; while(item != null) { body = item.body; if(!body.frozen) { body.restoreState(); body.calcDerivedData(); } item = item.next; } } } private function preProcessContacts(dt:Number) : void { var b1:Body = null; var b2:Body = null; var j:int = 0; var cp:ContactPoint = null; var constraint:Constraint = null; var contact:Contact = this.contacts; while(contact != this.borderContact) { b1 = contact.body1; b2 = contact.body2; if(b1.frozen) { b1.frozen = false; b1.freezeCounter = 0; } if(b2 != null && b2.frozen) { b2.frozen = false; b2.freezeCounter = 0; } contact.restitution = b1.material.restitution; if(b2 != null && b2.material.restitution < contact.restitution) { contact.restitution = b2.material.restitution; } contact.friction = b1.material.friction; if(b2 != null && b2.material.friction < contact.friction) { contact.friction = b2.material.friction; } for(j = 0; j < contact.pcount; j++) { cp = contact.points[j]; cp.accumImpulseN = 0; cp.velByUnitImpulseN = 0; if(b1.movable) { cp.angularInertia1 = this._v.vCross2(cp.r1,contact.normal).vTransformBy3(b1.invInertiaWorld).vCross(cp.r1).vDot(contact.normal); cp.velByUnitImpulseN += b1.invMass + cp.angularInertia1; } if(b2 != null && b2.movable) { cp.angularInertia2 = this._v.vCross2(cp.r2,contact.normal).vTransformBy3(b2.invInertiaWorld).vCross(cp.r2).vDot(contact.normal); cp.velByUnitImpulseN += b2.invMass + cp.angularInertia2; } this.calcSepVelocity(b1,b2,cp,this._v); cp.normalVel = this._v.vDot(contact.normal); if(cp.normalVel < 0) { cp.normalVel = -contact.restitution * cp.normalVel; } cp.minSepVel = cp.penetration > this.allowedPenetration ? Number(Number((cp.penetration - this.allowedPenetration) / (this.penResolutionSteps * dt))) : Number(Number(0)); if(cp.minSepVel > this.maxPenResolutionSpeed) { cp.minSepVel = this.maxPenResolutionSpeed; } } contact = contact.next; } for(var i:int = 0; i < this.constraintsNum; i++) { constraint = this.constraints[i]; constraint.preProcess(dt); } } private function processContacts(dt:Number, forceInelastic:Boolean) : void { var i:int = 0; var contact:Contact = null; var constraint:Constraint = null; var iterNum:int = !!forceInelastic ? int(int(this.contactIterations)) : int(int(this.collisionIterations)); var forwardLoop:Boolean = false; for(var iter:int = 0; iter < iterNum; iter++) { forwardLoop = !forwardLoop; contact = this.contacts; while(contact != this.borderContact) { this.resolveContact(contact,forceInelastic,forwardLoop); contact = contact.next; } for(i = 0; i < this.constraintsNum; i++) { constraint = this.constraints[i]; constraint.apply(dt); } } } private function resolveContact(contactInfo:Contact, forceInelastic:Boolean, forwardLoop:Boolean) : void { var i:int = 0; var b1:Body = contactInfo.body1; var b2:Body = contactInfo.body2; var normal:Vector3 = contactInfo.normal; if(forwardLoop) { for(i = 0; i < contactInfo.pcount; this.resolveContactPoint(i,b1,b2,contactInfo,normal,forceInelastic),i++) { } } else { for(i = contactInfo.pcount - 1; i >= 0; this.resolveContactPoint(i,b1,b2,contactInfo,normal,forceInelastic),i--) { } } } private function resolveContactPoint(idx:int, b1:Body, b2:Body, contact:Contact, normal:Vector3, forceInelastic:Boolean) : void { var cnormal:Vector3 = null; var r:Vector3 = null; var m:Matrix3 = null; var xx:Number = NaN; var yy:Number = NaN; var zz:Number = NaN; var minSpeVel:Number = NaN; var cp:ContactPoint = contact.points[idx]; if(!forceInelastic) { cp.satisfied = true; } var newVel:Number = 0; this.calcSepVelocity(b1,b2,cp,this._v); cnormal = contact.normal; var sepVel:Number = this._v.x * cnormal.x + this._v.y * cnormal.y + this._v.z * cnormal.z; if(forceInelastic) { minSpeVel = !!this.useStaticSeparation ? Number(Number(0)) : Number(Number(cp.minSepVel)); if(sepVel < minSpeVel) { cp.satisfied = false; } else if(cp.satisfied) { return; } newVel = minSpeVel; } else { newVel = cp.normalVel; } var deltaVel:Number = newVel - sepVel; var impulse:Number = deltaVel / cp.velByUnitImpulseN; var accumImpulse:Number = cp.accumImpulseN + impulse; if(accumImpulse < 0) { accumImpulse = 0; } var deltaImpulse:Number = accumImpulse - cp.accumImpulseN; cp.accumImpulseN = accumImpulse; if(b1.movable) { b1.applyRelPosWorldImpulse(cp.r1,normal,deltaImpulse); } if(b2 != null && b2.movable) { b2.applyRelPosWorldImpulse(cp.r2,normal,-deltaImpulse); } this.calcSepVelocity(b1,b2,cp,this._v); var tanSpeedByUnitImpulse:Number = 0; var dot:Number = this._v.x * cnormal.x + this._v.y * cnormal.y + this._v.z * cnormal.z; this._v.x -= dot * cnormal.x; this._v.y -= dot * cnormal.y; this._v.z -= dot * cnormal.z; var tanSpeed:Number = this._v.vLength(); if(tanSpeed < 0.001) { return; } this._t.x = -this._v.x; this._t.y = -this._v.y; this._t.z = -this._v.z; this._t.vNormalize(); if(b1.movable) { r = cp.r1; m = b1.invInertiaWorld; this._v.x = r.y * this._t.z - r.z * this._t.y; this._v.y = r.z * this._t.x - r.x * this._t.z; this._v.z = r.x * this._t.y - r.y * this._t.x; xx = m.a * this._v.x + m.b * this._v.y + m.c * this._v.z; yy = m.e * this._v.x + m.f * this._v.y + m.g * this._v.z; zz = m.i * this._v.x + m.j * this._v.y + m.k * this._v.z; this._v.x = yy * r.z - zz * r.y; this._v.y = zz * r.x - xx * r.z; this._v.z = xx * r.y - yy * r.x; tanSpeedByUnitImpulse += b1.invMass + this._v.x * this._t.x + this._v.y * this._t.y + this._v.z * this._t.z; } if(b2 != null && b2.movable) { r = cp.r2; m = b2.invInertiaWorld; this._v.x = r.y * this._t.z - r.z * this._t.y; this._v.y = r.z * this._t.x - r.x * this._t.z; this._v.z = r.x * this._t.y - r.y * this._t.x; xx = m.a * this._v.x + m.b * this._v.y + m.c * this._v.z; yy = m.e * this._v.x + m.f * this._v.y + m.g * this._v.z; zz = m.i * this._v.x + m.j * this._v.y + m.k * this._v.z; this._v.x = yy * r.z - zz * r.y; this._v.y = zz * r.x - xx * r.z; this._v.z = xx * r.y - yy * r.x; tanSpeedByUnitImpulse += b2.invMass + this._v.x * this._t.x + this._v.y * this._t.y + this._v.z * this._t.z; } var tanImpulse:Number = tanSpeed / tanSpeedByUnitImpulse; var max:Number = contact.friction * cp.accumImpulseN; if(max < 0) { if(tanImpulse < max) { tanImpulse = max; } } else if(tanImpulse > max) { tanImpulse = max; } if(b1.movable) { b1.applyRelPosWorldImpulse(cp.r1,this._t,tanImpulse); } if(b2 != null && b2.movable) { b2.applyRelPosWorldImpulse(cp.r2,this._t,-tanImpulse); } } private function calcSepVelocity(body1:Body, body2:Body, cp:ContactPoint, result:Vector3) : void { var rot:Vector3 = body1.state.rotation; var v:Vector3 = cp.r1; var x:Number = rot.y * v.z - rot.z * v.y; var y:Number = rot.z * v.x - rot.x * v.z; var z:Number = rot.x * v.y - rot.y * v.x; v = body1.state.velocity; result.x = v.x + x; result.y = v.y + y; result.z = v.z + z; if(body2 != null) { rot = body2.state.rotation; v = cp.r2; x = rot.y * v.z - rot.z * v.y; y = rot.z * v.x - rot.x * v.z; z = rot.x * v.y - rot.y * v.x; v = body2.state.velocity; result.x -= v.x + x; result.y -= v.y + y; result.z -= v.z + z; } } private function intergateVelocities(dt:Number) : void { var item:BodyListItem = this.bodies.head; while(item != null) { item.body.integrateVelocity(dt); item = item.next; } } private function integratePositions(dt:Number) : void { var body:Body = null; var item:BodyListItem = this.bodies.head; while(item != null) { body = item.body; if(body.movable && !body.frozen) { body.integratePosition(dt); } item = item.next; } } private function performStaticSeparation() : void { var iterNum:int = this.staticSeparationIterations; } private function resolveInterpenetration(contact:Contact) : void { var worstCp:ContactPoint = null; var cp:ContactPoint = null; var i:int = 0; var maxPen:Number = NaN; var j:int = 0; contact.satisfied = true; for(var step:int = 0; step < this.staticSeparationSteps; step++) { worstCp = contact.points[0]; for(i = 1; i < contact.pcount; i++) { cp = contact.points[i]; cp.satisfied = false; if(cp.penetration > worstCp.penetration) { worstCp = cp; } } if(worstCp.penetration <= this.allowedPenetration) { break; } this.separateContactPoint(worstCp,contact); maxPen = 0; for(i = 1; i < contact.pcount; i++) { for(j = 0; j < contact.pcount; j++) { cp = contact.points[j]; if(!cp.satisfied) { if(cp.penetration > maxPen) { maxPen = cp.penetration; worstCp = cp; } } } if(maxPen <= this.allowedPenetration) { break; } this.separateContactPoint(worstCp,contact); } } } private function separateContactPoint(cp:ContactPoint, contact:Contact) : void { } private function postPhysics() : void { var body:Body = null; var item:BodyListItem = this.bodies.head; while(item != null) { body = item.body; body.clearAccumulators(); body.calcDerivedData(); if(body.canFreeze) { if(body.state.velocity.vLength() < this.linSpeedFreezeLimit && body.state.rotation.vLength() < this.angSpeedFreezeLimit) { if(!body.frozen) { ++body.freezeCounter; if(body.freezeCounter >= this.freezeSteps) { body.frozen = true; } } } else { body.freezeCounter = 0; body.frozen = false; } } item = item.next; } } public function update(delta:int) : void { ++this.timeStamp; this.time += delta; var dt:Number = 0.001 * delta; this.applyForces(dt); this.detectCollisions(dt); this.preProcessContacts(dt); this.processContacts(dt,false); this.intergateVelocities(dt); this.processContacts(dt,true); this.integratePositions(dt); this.postPhysics(); } public function destroy() : * { var buf:Contact = null; if(this.contacts != null) { while(this.contacts.next != null) { buf = this.contacts; this.contacts.destroy(); this.contacts = null; this.contacts = buf.next; } this.contacts = null; } } } }
package alternativa.tanks.service.panel { import flash.events.Event; public class PanelInitedEvent extends Event { public static const TYPE:String = "PanelInitedEvent"; public function PanelInitedEvent() { super(TYPE); } } }
package alternativa.tanks.models.battle.battlefield { import alternativa.osgi.service.console.variables.ConsoleVarFloat; import alternativa.osgi.service.console.variables.ConsoleVarString; public class LightingCommands { private var shadowLightColorVar:ConsoleVarString; private var shadowShadowColorVar:ConsoleVarString; private var shadowAngleXVar:ConsoleVarFloat; private var shadowAngleZVar:ConsoleVarFloat; private var fogColorVar:ConsoleVarString; private var notify:Function; public function LightingCommands(param1:uint, param2:uint, param3:Number, param4:Number, param5:uint, param6:Function) { super(); this.shadowLightColorVar = new ConsoleVarString("DynamicShadowLightColor",String(param1),this.updateLightColor); this.shadowShadowColorVar = new ConsoleVarString("DynamicShadowShadowColor",String(param2),this.updateShadowColor); this.shadowAngleXVar = new ConsoleVarFloat("DynamicShadowAngleX",param3,-180,180,this.updateAngleX); this.shadowAngleZVar = new ConsoleVarFloat("DynamicShadowAngleZ",param4,-180,180,this.updateAngleZ); this.fogColorVar = new ConsoleVarString("FogColor",String(param5),this.updateFog); this.notify = param6; } public function destroy() : void { this.shadowLightColorVar.destroy(); this.shadowShadowColorVar.destroy(); this.shadowAngleXVar.destroy(); this.shadowAngleZVar.destroy(); this.fogColorVar.destroy(); } private function doNotify() : void { this.notify(uint(this.shadowLightColorVar.value),uint(this.shadowShadowColorVar.value),this.shadowAngleXVar.value,this.shadowAngleZVar.value,uint(this.fogColorVar.value)); } private function updateShadowColor(param1:String) : void { this.doNotify(); } private function updateLightColor(param1:String) : void { this.doNotify(); } private function updateAngleX(param1:Number) : void { this.doNotify(); } private function updateAngleZ(param1:Number) : void { this.doNotify(); } private function updateFog(param1:String) : void { this.doNotify(); } } }
package alternativa.tanks.model.garage.resistance { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.model.garage.resistance.ResistancesIcons_bitmapshaftResistance_x2.png")] public class ResistancesIcons_bitmapshaftResistance_x2 extends BitmapAsset { public function ResistancesIcons_bitmapshaftResistance_x2() { super(); } } }
package controls { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/controls.VKButton_releaseBitmapVK.png")] public class VKButton_releaseBitmapVK extends BitmapAsset { public function VKButton_releaseBitmapVK() { super(); } } }
package alternativa.tanks.gui { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.AntiAddictionWindow_Watches3Hours.png")] public class AntiAddictionWindow_Watches3Hours extends BitmapAsset { public function AntiAddictionWindow_Watches3Hours() { super(); } } }
package alternativa.tanks.battle.objects.tank.tankskin.materialfactory { import alternativa.osgi.service.display.IDisplay; import flash.display.BitmapData; import flash.display.Sprite; import flash.events.MouseEvent; public class DebugBitmapLayer { [Inject] public static var display:IDisplay; private static var isShowing:Boolean = false; private static var queue:Vector.<BitmapData> = new Vector.<BitmapData>(); private static var canvas:Sprite = new Sprite(); public function DebugBitmapLayer() { super(); } public static function show(param1:BitmapData) : void { queue.push(param1); if(!isShowing) { isShowing = true; doShow(queue.shift()); } } private static function doShow(param1:BitmapData) : void { canvas.graphics.clear(); canvas.graphics.beginFill(11141120); canvas.graphics.drawRect(0,0,150,150); canvas.graphics.endFill(); canvas.graphics.beginBitmapFill(param1); canvas.graphics.drawRect(0,0,param1.width,param1.height); canvas.graphics.endFill(); canvas.addEventListener(MouseEvent.CLICK,onMouseClick); display.stage.addChild(canvas); } private static function onMouseClick(param1:MouseEvent) : void { canvas.removeEventListener(MouseEvent.CLICK,onMouseClick); isShowing = false; display.stage.removeChild(canvas); if(queue.length > 0) { isShowing = true; doShow(queue.shift()); } } } }
package forms.buttons { import mx.core.BitmapAsset; [ExcludeClass] public class MainPanelGoldenButton_overBtn extends BitmapAsset { public function MainPanelGoldenButton_overBtn() { super(); } } }
package scpacker.test.usertitles { import alternativa.math.Vector3; import alternativa.physics.collision.types.RayIntersection; import alternativa.tanks.display.usertitle.UserTitle; import alternativa.tanks.models.battlefield.IBattleField; import alternativa.tanks.models.tank.TankData; import alternativa.tanks.physics.CollisionGroup; import alternativa.tanks.physics.TanksCollisionDetector; import alternativa.tanks.vehicles.tanks.Tank; import projects.tanks.client.battleservice.model.team.BattleTeamType; public class DefaultUserTitlesRender implements UserTitlesRender { private var titleShowDistance:Number = 7000; private var titleHideDistance:Number = 7050; private var battlefield:IBattleField; public var localUserData:TankData; private var point:Vector3; private var rayOrigin:Vector3; private var rayVector:Vector3; private var rayIntersection:RayIntersection; public function DefaultUserTitlesRender() { this.point = new Vector3(); this.rayOrigin = new Vector3(); this.rayVector = new Vector3(); this.rayIntersection = new RayIntersection(); super(); } public function updateTitle(tankData:TankData, cameraPos:Vector3) : void { var pos:Vector3 = null; var dx:Number = NaN; var dy:Number = NaN; var dz:Number = NaN; var distance:Number = NaN; var tank:Tank = tankData.tank; if(tankData.health <= 0) { tankData.tank.title.hide(); } else if(!tankData.local && TankData.localTankData != null) { if(!this.isSameTeam(TankData.localTankData.teamType,tankData.teamType)) { pos = tank.state.pos; dx = pos.x - cameraPos.x; dy = pos.y - cameraPos.y; dz = pos.z - cameraPos.z; distance = Math.sqrt(dx * dx + dy * dy + dz * dz); if(distance >= this.titleHideDistance || this.isTankInvisible(tankData,cameraPos)) { tank.title.hide(); } else if(distance < this.titleShowDistance) { tank.title.show(); } } else { tank.title.show(); } } } private function isSameTeam(teamType1:BattleTeamType, teamType2:BattleTeamType) : Boolean { return teamType1 != BattleTeamType.NONE && teamType1 == teamType2; } private function isTankInvisible(tankData:TankData, cameraPos:Vector3) : Boolean { var collisionDetector:TanksCollisionDetector = this.battlefield.getBattlefieldData().collisionDetector; var points:Vector.<Vector3> = tankData.tank.visibilityPoints; var len:int = points.length; for(var i:int = 0; i < len; i++) { this.point.vCopy(points[i]); if(this.isTankPointVisible(this.point,tankData,cameraPos,collisionDetector)) { return false; } } return true; } private function isTankPointVisible(point:Vector3, tankData:TankData, cameraPos:Vector3, collisionDetector:TanksCollisionDetector) : Boolean { point.vTransformBy3(tankData.tank.baseMatrix); point.vAdd(tankData.tank.state.pos); this.rayOrigin.copyFrom(cameraPos); this.rayVector.vDiff(point,this.rayOrigin); return !collisionDetector.intersectRayWithStatic(this.rayOrigin,this.rayVector,CollisionGroup.STATIC,1,null,this.rayIntersection); } public function configurateTitle(tankData:TankData) : void { if(TankData.localTankData == null || TankData.localTankData.teamType == null) { return; } var configFlags:int = UserTitle.BIT_LABEL | UserTitle.BIT_EFFECTS; if(this.isSameTeam(tankData.teamType,TankData.localTankData.teamType)) { configFlags |= UserTitle.BIT_HEALTH; } var title:UserTitle = tankData.tank.title; title.setLabelText(tankData.userName); title.setRank(tankData.userRank); title.setTeamType(tankData.teamType); title.setHealth(tankData.health); title.setConfiguration(configFlags); } public function setBattlefield(model:IBattleField) : void { this.battlefield = model; } public function setLocalData(model:TankData) : void { this.localUserData = model; } public function render() : void { } } }
package alternativa.tanks.models.statistics.team { import alternativa.osgi.service.display.IDisplay; import alternativa.tanks.battle.events.BattleEventDispatcher; import alternativa.tanks.battle.events.BattleEventSupport; import alternativa.tanks.battle.events.TankAddedToBattleEvent; import alternativa.tanks.battle.events.TankLoadedEvent; import alternativa.tanks.gui.battle.BattleFinishTeamNotification; import alternativa.tanks.models.battle.battlefield.event.BattleRenameEvent; import alternativa.tanks.models.battle.battlefield.event.ContinueBattleEvent; import alternativa.tanks.models.battle.gui.gui.statistics.table.StatisticsTable; import alternativa.tanks.models.battle.gui.statistics.ClientUserInfo; import alternativa.tanks.models.battle.gui.statistics.ClientUserStat; import alternativa.tanks.models.battle.gui.statistics.ShortUserInfo; import alternativa.tanks.models.battle.gui.statistics.StatisticsVectorUtils; import alternativa.tanks.models.continuebattle.ContinueBattle; import alternativa.tanks.models.statistics.IClientUserInfo; import alternativa.tanks.models.statistics.IStatisticRound; import alternativa.tanks.models.statistics.IStatisticsModel; import alternativa.tanks.service.settings.keybinding.GameActionEnum; import alternativa.tanks.services.battlegui.BattleGUIService; import alternativa.tanks.services.battleinput.BattleInputService; import alternativa.tanks.services.battleinput.GameActionListener; import alternativa.types.Long; import alternativa.utils.removeDisplayObject; import flash.utils.Dictionary; import forms.ChangeTeamAlert; import platform.client.fp10.core.model.ObjectLoadListener; import platform.client.fp10.core.model.ObjectLoadPostListener; import platform.client.fp10.core.model.ObjectUnloadListener; import projects.tanks.client.battleservice.model.battle.team.BattleTeam; import projects.tanks.client.battleservice.model.statistics.UserInfo; import projects.tanks.client.battleservice.model.statistics.UserReward; import projects.tanks.client.battleservice.model.statistics.UserStat; import projects.tanks.client.battleservice.model.statistics.team.IStatisticsTeamModelBase; import projects.tanks.client.battleservice.model.statistics.team.StatisticsTeamModelBase; import projects.tanks.clients.flash.commons.models.challenge.ChallengeInfoService; import projects.tanks.clients.flash.commons.services.notification.INotificationService; import projects.tanks.clients.flash.commons.services.serverhalt.IServerHaltService; import projects.tanks.clients.fp10.libraries.tanksservices.service.battle.IBattleInfoService; import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService; import projects.tanks.clients.fp10.libraries.tanksservices.service.premium.BattleUserPremiumService; import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService; [ModelInfo] public class StatisticsTeamModel extends StatisticsTeamModelBase implements IStatisticsTeamModelBase, ObjectLoadListener, ObjectLoadPostListener, ObjectUnloadListener, IClientUserInfo, IStatisticRound, GameActionListener { [Inject] public static var display:IDisplay; [Inject] public static var lobbyLayoutService:ILobbyLayoutService; [Inject] public static var serverHaltService:IServerHaltService; [Inject] public static var userPropertiesService:IUserPropertiesService; [Inject] public static var battleEventDispatcher:BattleEventDispatcher; [Inject] public static var battleGUIService:BattleGUIService; [Inject] public static var battleInputService:BattleInputService; [Inject] public static var notificationService:INotificationService; [Inject] public static var battleInfoService:IBattleInfoService; [Inject] public static var challengeInfoService:ChallengeInfoService; [Inject] public static var battlePremiumService:BattleUserPremiumService; private var battleEventSupport:BattleEventSupport; private var statisticsTable:StatisticsTable; private var redClientUsersStat:Vector.<ClientUserStat>; private var blueClientUsersStat:Vector.<ClientUserStat>; private var clientUsersInfo:Dictionary; private var localUserTeam:BattleTeam; private var localUserTankTeamType:BattleTeam; private var scoreRed:int; private var scoreBlue:int; private var usersCount:int; public function StatisticsTeamModel() { super(); this.battleEventSupport = new BattleEventSupport(battleEventDispatcher); this.battleEventSupport.addEventHandler(TankAddedToBattleEvent,this.onTankAddedToBattle); this.battleEventSupport.addEventHandler(TankLoadedEvent,this.onTankLoaded); this.battleEventSupport.addEventHandler(BattleRenameEvent,this.onBattleRename); } private static function showChangeTeamAlert(param1:BattleTeam) : void { var local2:ChangeTeamAlert = new ChangeTeamAlert(3,param1 == BattleTeam.RED ? int(ChangeTeamAlert.RED) : int(ChangeTeamAlert.BLUE)); local2.x = display.stage.stageWidth - local2.width >> 1; local2.y = display.stage.stageHeight - local2.height >> 1; battleGUIService.getGuiContainer().addChild(local2); } private static function createUsersInfo(param1:Vector.<UserInfo>, param2:Vector.<UserInfo>) : Dictionary { var local4:UserInfo = null; var local5:UserInfo = null; var local6:ClientUserInfo = null; var local3:Dictionary = new Dictionary(); for each(local4 in param1) { local3[local4.user] = StatisticsVectorUtils.createClientUserInfo(local4,BattleTeam.RED); } for each(local5 in param2) { local3[local5.user] = StatisticsVectorUtils.createClientUserInfo(local5,BattleTeam.BLUE); } for each(local6 in local3) { local6.loaded = true; } return local3; } private static function updateBattleTeam(param1:Vector.<ClientUserStat>, param2:BattleTeam) : void { var local5:ClientUserStat = null; var local3:int = int(param1.length); var local4:int = 0; while(local4 < local3) { local5 = param1[local4]; if(local5 == null) { break; } local5.teamType = param2; local4++; } } private function onBattleRename(param1:BattleRenameEvent) : void { this.statisticsTable.setBattleName(param1.name); } private function onTankAddedToBattle(param1:TankAddedToBattleEvent) : void { if(param1.tank.getUser().id == userPropertiesService.userId) { if(param1.tank.teamType != this.localUserTankTeamType) { this.localUserTankTeamType = param1.tank.teamType; showChangeTeamAlert(this.localUserTankTeamType); } } } private function onTankLoaded(param1:TankLoadedEvent) : void { var local2:ClientUserStat = this.getUserStat(param1.tank.getUser().id); local2.loaded = true; this.statisticsTable.updatePlayerTeam(local2); } [Obfuscation(rename="false")] public function objectLoaded() : void { this.localUserTankTeamType = BattleTeam.NONE; var local1:Vector.<UserInfo> = getInitParam().usersInfoRed.slice(); local1 = local1.concat(getInitParam().usersInfoBlue); battlePremiumService.setUsersPremium(local1); this.clientUsersInfo = createUsersInfo(getInitParam().usersInfoRed,getInitParam().usersInfoBlue); this.usersCount = getInitParam().usersInfoRed.length + getInitParam().usersInfoBlue.length; this.redClientUsersStat = StatisticsVectorUtils.createUsersStat(this.clientUsersInfo,getInitParam().usersInfoRed); this.blueClientUsersStat = StatisticsVectorUtils.createUsersStat(this.clientUsersInfo,getInitParam().usersInfoBlue); var local2:IStatisticsModel = IStatisticsModel(object.adapt(IStatisticsModel)); this.statisticsTable = new StatisticsTable(local2.getBattleName(),true); this.statisticsTable.addEventListener(ContinueBattleEvent.EXIT,getFunctionWrapper(this.onExit)); this.statisticsTable.addEventListener(ContinueBattleEvent.CONTINUE,getFunctionWrapper(this.onContinue)); battleGUIService.getTabContainer().addChild(this.statisticsTable); } [Obfuscation(rename="false")] public function objectLoadedPost() : void { this.changeTeamScore(BattleTeam.RED,getInitParam().redScore); this.changeTeamScore(BattleTeam.BLUE,getInitParam().blueScore); this.updateLocalUserTeam(); this.battleEventSupport.activateHandlers(); battleInputService.addGameActionListener(this); } private function updateLocalUserTeam() : void { var local1:ClientUserStat = this.getUserStat(userPropertiesService.userId); if(local1 != null) { this.localUserTeam = local1.teamType; } } public function onGameAction(param1:GameActionEnum, param2:Boolean) : void { if(param1 == GameActionEnum.SHOW_BATTLE_STATS_TABLE) { if(param2) { this.showScores(); } else { this.hideScores(); } } } private function showScores() : void { if(battleInfoService.running) { this.statisticsTable.showTeam(false,userPropertiesService.userId,this.redClientUsersStat,this.blueClientUsersStat,false,0,this.localUserTeam,false); } } private function hideScores() : void { if(battleInfoService.running) { this.statisticsTable.hide(); } } [Obfuscation(rename="false")] public function objectUnloaded() : void { this.battleEventSupport.deactivateHandlers(); battleInputService.removeGameActionListener(this); this.statisticsTable.hide(); this.statisticsTable.removeEventListener(ContinueBattleEvent.EXIT,getFunctionWrapper(this.onExit)); this.statisticsTable.removeEventListener(ContinueBattleEvent.CONTINUE,getFunctionWrapper(this.onContinue)); removeDisplayObject(this.statisticsTable); this.statisticsTable = null; this.redClientUsersStat = null; this.blueClientUsersStat = null; this.clientUsersInfo = null; this.localUserTankTeamType = null; this.usersCount = 0; battlePremiumService.removeUsersPremium(); } [Obfuscation(rename="false")] public function changeTeamScore(param1:BattleTeam, param2:int) : void { if(param1 == BattleTeam.RED) { this.scoreRed = param2; } if(param1 == BattleTeam.BLUE) { this.scoreBlue = param2; } var local3:IStatisticsModel = IStatisticsModel(object.adapt(IStatisticsModel)); local3.changeTeamScore(param1,param2); } [Obfuscation(rename="false")] public function userConnect(param1:Long, param2:Vector.<UserInfo>, param3:BattleTeam) : void { var local4:UserInfo = StatisticsVectorUtils.getUserInfo(param1,param2); this.clientUsersInfo[param1] = StatisticsVectorUtils.createClientUserInfo(local4,param3); ++this.usersCount; battlePremiumService.setUsersPremium(param2); if(param3 == BattleTeam.RED) { this.redClientUsersStat = StatisticsVectorUtils.createUsersStat(this.clientUsersInfo,param2); if(battleInfoService.running) { this.statisticsTable.updatePlayersTeam(this.redClientUsersStat,param3); } } if(param3 == BattleTeam.BLUE) { this.blueClientUsersStat = StatisticsVectorUtils.createUsersStat(this.clientUsersInfo,param2); if(battleInfoService.running) { this.statisticsTable.updatePlayersTeam(this.blueClientUsersStat,param3); } } } [Obfuscation(rename="false")] public function userDisconnect(param1:Long) : void { var local2:ClientUserInfo = this.clientUsersInfo[param1]; var local3:IStatisticsModel = IStatisticsModel(object.adapt(IStatisticsModel)); local3.userDisconnect(local2.getShortUserInfo()); if(battleInfoService.running) { this.statisticsTable.removePlayer(param1,local2.teamType); } if(local2.teamType == BattleTeam.RED) { this.redClientUsersStat = StatisticsVectorUtils.deleteUserStat(this.redClientUsersStat,param1); } if(local2.teamType == BattleTeam.BLUE) { this.blueClientUsersStat = StatisticsVectorUtils.deleteUserStat(this.blueClientUsersStat,param1); } delete this.clientUsersInfo[param1]; --this.usersCount; battlePremiumService.resetUserPremium(param1); } [Obfuscation(rename="false")] public function changeUserStat(param1:UserStat, param2:BattleTeam) : void { var local3:ClientUserStat = null; if(param2 == BattleTeam.RED) { local3 = StatisticsVectorUtils.changeUserStat(this.redClientUsersStat,param1); } if(param2 == BattleTeam.BLUE) { local3 = StatisticsVectorUtils.changeUserStat(this.blueClientUsersStat,param1); } var local4:IStatisticsModel = IStatisticsModel(object.adapt(IStatisticsModel)); local4.updateUserKills(param1.user,param1.kills); this.statisticsTable.updatePlayerTeam(local3); } [Obfuscation(rename="false")] public function refreshUsersStat(param1:Vector.<UserStat>, param2:BattleTeam) : void { if(param2 == BattleTeam.RED) { this.redClientUsersStat = StatisticsVectorUtils.refreshUsersStat(this.clientUsersInfo,param1); this.statisticsTable.updatePlayersTeam(this.redClientUsersStat,param2); } if(param2 == BattleTeam.BLUE) { this.blueClientUsersStat = StatisticsVectorUtils.refreshUsersStat(this.clientUsersInfo,param1); this.statisticsTable.updatePlayersTeam(this.blueClientUsersStat,param2); } } [Obfuscation(rename="false")] public function swapTeam(param1:Vector.<UserStat>, param2:Vector.<UserStat>) : void { this.redClientUsersStat = StatisticsVectorUtils.refreshUsersStat(this.clientUsersInfo,param1); this.blueClientUsersStat = StatisticsVectorUtils.refreshUsersStat(this.clientUsersInfo,param2); updateBattleTeam(this.redClientUsersStat,BattleTeam.RED); updateBattleTeam(this.blueClientUsersStat,BattleTeam.BLUE); this.updateLocalUserTeam(); this.statisticsTable.updatePlayersTeam(this.redClientUsersStat,BattleTeam.RED); this.statisticsTable.updatePlayersTeam(this.blueClientUsersStat,BattleTeam.BLUE); } public function getShortUserInfo(param1:Long) : ShortUserInfo { var local2:ClientUserInfo = this.clientUsersInfo[param1]; if(local2 != null) { return local2.getShortUserInfo(); } return null; } public function isLoaded(param1:Long) : Boolean { var local2:ClientUserInfo = this.clientUsersInfo[param1]; return local2 != null && local2.loaded; } private function getUserStat(param1:Long) : ClientUserStat { var local2:ClientUserStat = StatisticsVectorUtils.getClientUserStat(this.redClientUsersStat,param1); if(local2 == null) { local2 = StatisticsVectorUtils.getClientUserStat(this.blueClientUsersStat,param1); } return local2; } public function suspiciousnessChanged(param1:Long, param2:Boolean) : void { var local3:ClientUserStat = this.getUserStat(param1); if(local3 != null) { local3.suspicious = param2; this.statisticsTable.updatePlayerTeam(local3); } } public function rankChanged(param1:Long, param2:int) : void { var local3:ClientUserStat = this.getUserStat(param1); local3.rank = param2; this.statisticsTable.updatePlayerTeam(local3); } public function roundStart() : void { this.statisticsTable.hide(); this.changeTeamScore(BattleTeam.RED,0); this.changeTeamScore(BattleTeam.BLUE,0); } public function roundStop() : void { this.statisticsTable.hide(); } public function roundFinish(param1:Boolean, param2:Boolean, param3:int, param4:Vector.<UserReward>) : void { var local5:Boolean = false; var local6:UserReward = null; var local7:int = 0; this.statisticsTable.hide(); StatisticsVectorUtils.updateReward(this.redClientUsersStat,param4); StatisticsVectorUtils.updateReward(this.blueClientUsersStat,param4); if(param2) { local5 = param1 && Boolean(challengeInfoService.isInTime()); this.statisticsTable.showTeam(param1,userPropertiesService.userId,this.redClientUsersStat,this.blueClientUsersStat,true,!!serverHaltService.isServerHalt ? -1 : param3,this.localUserTeam,local5); } if(param2 && Boolean(lobbyLayoutService.isWindowOpenOverBattle()) && !battleInfoService.isSpectatorMode()) { local6 = StatisticsVectorUtils.getRewardById(userPropertiesService.userId,param4); local7 = local6.reward + local6.newbiesAbonementBonusReward + local6.premiumBonusReward; notificationService.addNotification(new BattleFinishTeamNotification(this.isYourTeamVictory(),this.isYourTeamDefeat(),this.getLocalUserPlace(),this.getYourTeamPlaces(),local7,local6.starsReward,local5)); } } private function isYourTeamVictory() : Boolean { if(this.localUserTeam == BattleTeam.RED) { return this.scoreRed > this.scoreBlue; } if(this.localUserTeam == BattleTeam.BLUE) { return this.scoreBlue > this.scoreRed; } return false; } private function isYourTeamDefeat() : Boolean { if(this.localUserTeam == BattleTeam.RED) { return this.scoreBlue > this.scoreRed; } if(this.localUserTeam == BattleTeam.BLUE) { return this.scoreRed > this.scoreBlue; } return false; } private function getYourTeamPlaces() : int { if(this.localUserTeam == BattleTeam.RED) { return this.redClientUsersStat.length; } if(this.localUserTeam == BattleTeam.BLUE) { return this.blueClientUsersStat.length; } return 0; } private function getLocalUserPlace() : int { var local1:int = 0; if(this.localUserTeam == BattleTeam.RED) { local1 = StatisticsVectorUtils.getUserPosition(this.redClientUsersStat,userPropertiesService.userId); } else if(this.localUserTeam == BattleTeam.BLUE) { local1 = StatisticsVectorUtils.getUserPosition(this.blueClientUsersStat,userPropertiesService.userId); } return local1 + 1; } private function onExit(param1:ContinueBattleEvent) : void { if(!lobbyLayoutService.isSwitchInProgress()) { if(!battleInfoService.running) { lobbyLayoutService.exitFromBattleWithoutNotify(); } else { lobbyLayoutService.exitFromBattle(); } } } private function onContinue(param1:ContinueBattleEvent) : void { ContinueBattle(object.adapt(ContinueBattle)).continueBattle(); } public function getUsersCount() : int { return this.usersCount; } } }
package _codec.projects.tanks.client.battlefield.models.ultimate.effects.hunter { import alternativa.osgi.OSGi; import alternativa.osgi.service.clientlog.IClientLog; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.TypeCodecInfo; import projects.tanks.client.battlefield.models.ultimate.effects.hunter.TankStunCC; public class CodecTankStunCC implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_stunned:ICodec; public function CodecTankStunCC() { super(); } public function init(param1:IProtocol) : void { this.codec_stunned = param1.getCodec(new TypeCodecInfo(Boolean,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:TankStunCC = new TankStunCC(); local2.stunned = this.codec_stunned.decode(param1) as Boolean; return local2; } public function encode(param1:ProtocolBuffer, param2:Object) : void { if(param2 == null) { throw new Error("Object is null. Use @ProtocolOptional annotation."); } var local3:TankStunCC = TankStunCC(param2); this.codec_stunned.encode(param1,local3.stunned); } } }
package projects.tanks.client.garage.models.garage { import alternativa.osgi.OSGi; import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import alternativa.protocol.info.CollectionCodecInfo; import alternativa.protocol.info.EnumCodecInfo; 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 platform.client.fp10.core.type.IGameObject; import projects.tanks.client.commons.types.ItemViewCategoryEnum; public class GarageModelBase extends Model { private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol)); protected var server:GarageModelServer; private var client:IGarageModelBase = IGarageModelBase(this); private var modelId:Long = Long.getLong(1718746868,-1910730614); private var _initDepotId:Long = Long.getLong(930502521,-307520123); private var _initDepot_itemsOnDepotCodec:ICodec; private var _initMarketId:Long = Long.getLong(1219192892,689165557); private var _initMarket_itemsOnMarketCodec:ICodec; private var _initMountedId:Long = Long.getLong(859726007,514386313); private var _initMounted_mountedItemsCodec:ICodec; private var _reloadGarageId:Long = Long.getLong(933245382,1068161023); private var _reloadGarage_messageCodec:ICodec; private var _reloadGarage_totalCrystalsCodec:ICodec; private var _removeDepotItemId:Long = Long.getLong(1177280707,-1253059324); private var _removeDepotItem_itemCodec:ICodec; private var _selectId:Long = Long.getLong(1672979457,540290587); private var _select_itemToSelectCodec:ICodec; private var _selectFirstItemInDepotId:Long = Long.getLong(450776038,1263898393); private var _showCategoryId:Long = Long.getLong(939753622,116528378); private var _showCategory_viewCategoryCodec:ICodec; private var _unmountDroneId:Long = Long.getLong(952716796,14349239); private var _updateDepotItemId:Long = Long.getLong(2006024142,-2135822943); private var _updateDepotItem_itemCodec:ICodec; private var _updateDepotItem_countCodec:ICodec; private var _updateMountedItemsId:Long = Long.getLong(1235090973,1845524944); private var _updateMountedItems_mountedItemsCodec:ICodec; private var _updateTemporaryItemId:Long = Long.getLong(1589955723,815412220); private var _updateTemporaryItem_itemCodec:ICodec; private var _updateTemporaryItem_remainingTimeSecondsCodec:ICodec; public function GarageModelBase() { super(); this.initCodecs(); } protected function initCodecs() : void { this.server = new GarageModelServer(IModel(this)); var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry)); local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(GarageModelCC,false))); this._initDepot_itemsOnDepotCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),false,1)); this._initMarket_itemsOnMarketCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),false,1)); this._initMounted_mountedItemsCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),false,1)); this._reloadGarage_messageCodec = this._protocol.getCodec(new TypeCodecInfo(String,false)); this._reloadGarage_totalCrystalsCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); this._removeDepotItem_itemCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._select_itemToSelectCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._showCategory_viewCategoryCodec = this._protocol.getCodec(new EnumCodecInfo(ItemViewCategoryEnum,false)); this._updateDepotItem_itemCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._updateDepotItem_countCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); this._updateMountedItems_mountedItemsCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),false,1)); this._updateTemporaryItem_itemCodec = this._protocol.getCodec(new TypeCodecInfo(IGameObject,false)); this._updateTemporaryItem_remainingTimeSecondsCodec = this._protocol.getCodec(new TypeCodecInfo(int,false)); } protected function getInitParam() : GarageModelCC { return GarageModelCC(initParams[Model.object]); } override public function invoke(param1:Long, param2:ProtocolBuffer) : void { switch(param1) { case this._initDepotId: this.client.initDepot(this._initDepot_itemsOnDepotCodec.decode(param2) as Vector.<IGameObject>); break; case this._initMarketId: this.client.initMarket(this._initMarket_itemsOnMarketCodec.decode(param2) as Vector.<IGameObject>); break; case this._initMountedId: this.client.initMounted(this._initMounted_mountedItemsCodec.decode(param2) as Vector.<IGameObject>); break; case this._reloadGarageId: this.client.reloadGarage(String(this._reloadGarage_messageCodec.decode(param2)),int(this._reloadGarage_totalCrystalsCodec.decode(param2))); break; case this._removeDepotItemId: this.client.removeDepotItem(IGameObject(this._removeDepotItem_itemCodec.decode(param2))); break; case this._selectId: this.client.select(IGameObject(this._select_itemToSelectCodec.decode(param2))); break; case this._selectFirstItemInDepotId: this.client.selectFirstItemInDepot(); break; case this._showCategoryId: this.client.showCategory(ItemViewCategoryEnum(this._showCategory_viewCategoryCodec.decode(param2))); break; case this._unmountDroneId: this.client.unmountDrone(); break; case this._updateDepotItemId: this.client.updateDepotItem(IGameObject(this._updateDepotItem_itemCodec.decode(param2)),int(this._updateDepotItem_countCodec.decode(param2))); break; case this._updateMountedItemsId: this.client.updateMountedItems(this._updateMountedItems_mountedItemsCodec.decode(param2) as Vector.<IGameObject>); break; case this._updateTemporaryItemId: this.client.updateTemporaryItem(IGameObject(this._updateTemporaryItem_itemCodec.decode(param2)),int(this._updateTemporaryItem_remainingTimeSecondsCodec.decode(param2))); } } override public function get id() : Long { return this.modelId; } } }
package _codec.projects.tanks.client.entrance.model.entrance.emailconfirm { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import projects.tanks.client.entrance.model.entrance.emailconfirm.ConfirmEmailStatus; public class CodecConfirmEmailStatus implements ICodec { public function CodecConfirmEmailStatus() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:ConfirmEmailStatus = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = ConfirmEmailStatus.OK_EXISTS; break; case 1: local2 = ConfirmEmailStatus.OK; break; case 2: local2 = ConfirmEmailStatus.ERROR; } 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 assets.cellrenderer.battlelist { import flash.display.MovieClip; [Embed(source="/_assets/assets.swf", symbol="symbol932")] public class Abris extends MovieClip { public function Abris() { super(); } } }
package alternativa.engine3d.core { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.materials.Material; import flash.geom.Point; import flash.geom.Vector3D; use namespace alternativa3d; public class Face { alternativa3d static var collector:Face; public var material:Material; public var smoothingGroups:uint = 0; alternativa3d var normalX:Number; alternativa3d var normalY:Number; alternativa3d var normalZ:Number; alternativa3d var offset:Number; alternativa3d var wrapper:Wrapper; alternativa3d var next:Face; alternativa3d var processNext:Face; alternativa3d var processNegative:Face; alternativa3d var processPositive:Face; alternativa3d var distance:Number; alternativa3d var geometry:VG; public var id:Object; public function Face() { super(); } alternativa3d static function create() : Face { var local1:Face = null; if(alternativa3d::collector != null) { local1 = alternativa3d::collector; alternativa3d::collector = local1.alternativa3d::next; local1.alternativa3d::next = null; return local1; } return new Face(); } alternativa3d function create() : Face { var local1:Face = null; if(alternativa3d::collector != null) { local1 = alternativa3d::collector; alternativa3d::collector = local1.alternativa3d::next; local1.alternativa3d::next = null; return local1; } return new Face(); } public function get normal() : Vector3D { var local1:Wrapper = this.alternativa3d::wrapper; var local2:Vertex = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; var local3:Vertex = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; var local4:Vertex = local1.alternativa3d::vertex; var local5:Number = local3.x - local2.x; var local6:Number = local3.y - local2.y; var local7:Number = local3.z - local2.z; var local8:Number = local4.x - local2.x; var local9:Number = local4.y - local2.y; var local10:Number = local4.z - local2.z; var local11:Number = local10 * local6 - local9 * local7; var local12:Number = local8 * local7 - local10 * local5; var local13:Number = local9 * local5 - local8 * local6; var local14:Number = local11 * local11 + local12 * local12 + local13 * local13; if(local14 > 0.001) { local14 = 1 / Math.sqrt(local14); local11 *= local14; local12 *= local14; local13 *= local14; } return new Vector3D(local11,local12,local13,local2.x * local11 + local2.y * local12 + local2.z * local13); } public function get vertices() : Vector.<Vertex> { var local1:Vector.<Vertex> = new Vector.<Vertex>(); var local2:int = 0; var local3:Wrapper = this.alternativa3d::wrapper; while(local3 != null) { local1[local2] = local3.alternativa3d::vertex; local2++; local3 = local3.alternativa3d::next; } return local1; } public function getUV(param1:Vector3D) : Point { var local2:Vertex = this.alternativa3d::wrapper.alternativa3d::vertex; var local3:Vertex = this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::vertex; var local4:Vertex = this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::vertex; var local5:Number = local3.x - local2.x; var local6:Number = local3.y - local2.y; var local7:Number = local3.z - local2.z; var local8:Number = local3.u - local2.u; var local9:Number = local3.v - local2.v; var local10:Number = local4.x - local2.x; var local11:Number = local4.y - local2.y; var local12:Number = local4.z - local2.z; var local13:Number = local4.u - local2.u; var local14:Number = local4.v - local2.v; var local15:Number = -this.alternativa3d::normalX * local11 * local7 + local10 * this.alternativa3d::normalY * local7 + this.alternativa3d::normalX * local6 * local12 - local5 * this.alternativa3d::normalY * local12 - local10 * local6 * this.alternativa3d::normalZ + local5 * local11 * this.alternativa3d::normalZ; var local16:Number = (-this.alternativa3d::normalY * local12 + local11 * this.alternativa3d::normalZ) / local15; var local17:Number = (this.alternativa3d::normalX * local12 - local10 * this.alternativa3d::normalZ) / local15; var local18:Number = (-this.alternativa3d::normalX * local11 + local10 * this.alternativa3d::normalY) / local15; var local19:Number = (local2.x * this.alternativa3d::normalY * local12 - this.alternativa3d::normalX * local2.y * local12 - local2.x * local11 * this.alternativa3d::normalZ + local10 * local2.y * this.alternativa3d::normalZ + this.alternativa3d::normalX * local11 * local2.z - local10 * this.alternativa3d::normalY * local2.z) / local15; var local20:Number = (this.alternativa3d::normalY * local7 - local6 * this.alternativa3d::normalZ) / local15; var local21:Number = (-this.alternativa3d::normalX * local7 + local5 * this.alternativa3d::normalZ) / local15; var local22:Number = (this.alternativa3d::normalX * local6 - local5 * this.alternativa3d::normalY) / local15; var local23:Number = (this.alternativa3d::normalX * local2.y * local7 - local2.x * this.alternativa3d::normalY * local7 + local2.x * local6 * this.alternativa3d::normalZ - local5 * local2.y * this.alternativa3d::normalZ - this.alternativa3d::normalX * local6 * local2.z + local5 * this.alternativa3d::normalY * local2.z) / local15; var local24:Number = local8 * local16 + local13 * local20; var local25:Number = local8 * local17 + local13 * local21; var local26:Number = local8 * local18 + local13 * local22; var local27:Number = local8 * local19 + local13 * local23 + local2.u; var local28:Number = local9 * local16 + local14 * local20; var local29:Number = local9 * local17 + local14 * local21; var local30:Number = local9 * local18 + local14 * local22; var local31:Number = local9 * local19 + local14 * local23 + local2.v; return new Point(local24 * param1.x + local25 * param1.y + local26 * param1.z + local27,local28 * param1.x + local29 * param1.y + local30 * param1.z + local31); } public function toString() : String { return "[Face " + this.id + "]"; } alternativa3d function calculateBestSequenceAndNormal() : void { var local1:Wrapper = null; var local2:Vertex = null; var local3:Vertex = null; var local4:Vertex = null; var local5:Number = NaN; var local6:Number = NaN; var local7:Number = NaN; var local8:Number = NaN; var local9:Number = NaN; var local10:Number = NaN; var local11:Number = NaN; var local12:Number = NaN; var local13:Number = NaN; var local14:Number = NaN; var local15:Number = NaN; var local16:Wrapper = null; var local17:Wrapper = null; var local18:Wrapper = null; var local19:Wrapper = null; var local20:Wrapper = null; if(this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::next != null) { local15 = -1e+22; local1 = this.alternativa3d::wrapper; while(local1 != null) { local19 = local1.alternativa3d::next != null ? local1.alternativa3d::next : this.alternativa3d::wrapper; local20 = local19.alternativa3d::next != null ? local19.alternativa3d::next : this.alternativa3d::wrapper; local2 = local1.alternativa3d::vertex; local3 = local19.alternativa3d::vertex; local4 = local20.alternativa3d::vertex; local5 = local3.x - local2.x; local6 = local3.y - local2.y; local7 = local3.z - local2.z; local8 = local4.x - local2.x; local9 = local4.y - local2.y; local10 = local4.z - local2.z; local11 = local10 * local6 - local9 * local7; local12 = local8 * local7 - local10 * local5; local13 = local9 * local5 - local8 * local6; local14 = local11 * local11 + local12 * local12 + local13 * local13; if(local14 > local15) { local15 = local14; local16 = local1; } local1 = local1.alternativa3d::next; } if(local16 != this.alternativa3d::wrapper) { local17 = this.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::next; while(local17.alternativa3d::next != null) { local17 = local17.alternativa3d::next; } local18 = this.alternativa3d::wrapper; while(local18.alternativa3d::next != local16 && local18.alternativa3d::next != null) { local18 = local18.alternativa3d::next; } local17.alternativa3d::next = this.alternativa3d::wrapper; local18.alternativa3d::next = null; this.alternativa3d::wrapper = local16; } } local1 = this.alternativa3d::wrapper; local2 = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; local3 = local1.alternativa3d::vertex; local1 = local1.alternativa3d::next; local4 = local1.alternativa3d::vertex; local5 = local3.x - local2.x; local6 = local3.y - local2.y; local7 = local3.z - local2.z; local8 = local4.x - local2.x; local9 = local4.y - local2.y; local10 = local4.z - local2.z; local11 = local10 * local6 - local9 * local7; local12 = local8 * local7 - local10 * local5; local13 = local9 * local5 - local8 * local6; local14 = local11 * local11 + local12 * local12 + local13 * local13; if(local14 > 0) { local14 = 1 / Math.sqrt(local14); local11 *= local14; local12 *= local14; local13 *= local14; this.alternativa3d::normalX = local11; this.alternativa3d::normalY = local12; this.alternativa3d::normalZ = local13; } this.alternativa3d::offset = local2.x * local11 + local2.y * local12 + local2.z * local13; } } }
package projects.tanks.client.users.model.friends.accepted { 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 FriendsAcceptedModelServer { private var protocol:IProtocol; private var protocolBuffer:ProtocolBuffer; private var model:IModel; public function FriendsAcceptedModelServer(param1:IModel) { super(); this.model = param1; var local2:ByteArray = new ByteArray(); this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol)); this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap()); } } }
package _codec.projects.tanks.client.battlefield.models.bonus.bonus { import alternativa.protocol.ICodec; import alternativa.protocol.IProtocol; import alternativa.protocol.ProtocolBuffer; import projects.tanks.client.battlefield.models.bonus.bonus.BonusesType; public class CodecBonusesType implements ICodec { public function CodecBonusesType() { super(); } public function init(param1:IProtocol) : void { } public function decode(param1:ProtocolBuffer) : Object { var local2:BonusesType = null; var local3:int = int(param1.reader.readInt()); switch(local3) { case 0: local2 = BonusesType.CRYSTAL; break; case 1: local2 = BonusesType.NITRO; break; case 2: local2 = BonusesType.ARMOR_UP; break; case 3: local2 = BonusesType.FIRST_AID; break; case 4: local2 = BonusesType.DAMAGE_UP; break; case 5: local2 = BonusesType.RECHARGE; break; case 6: local2 = BonusesType.GOLD; } 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.osgi { import alternativa.osgi.bundle.IBundleActivator; import alternativa.osgi.bundle.IBundleDescriptor; import alternativa.osgi.catalogs.ServiceInfo; import alternativa.osgi.catalogs.ServiceListenersCatalog; import alternativa.osgi.catalogs.ServicesCatalog; import alternativa.osgi.service.IServiceRegisterListener; import alternativa.osgi.service.clientlog.IClientLogBase; import alternativa.osgi.service.logging.LogService; import alternativa.osgi.service.logging.Logger; import alternativa.osgi.service.logging.impl.LogServiceImpl; import flash.net.SharedObject; import flash.utils.Dictionary; public class OSGi { public static var clientLog:IClientLogBase; private static var instance:OSGi; private var bundleDescriptors:Object = {}; private var services:ServicesCatalog = new ServicesCatalog(); private var serivceInterface2injectPoints:Dictionary = new Dictionary(); private var serviceRegisterListenersByInterface:Dictionary = new Dictionary(); private var logger:Logger; public function OSGi() { super(); if(instance == null) { instance = this; this.initLogging(); return; } throw new Error("Only one instance of OSGi class is allowed"); } public static function getInstance() : OSGi { if(instance == null) { instance = new OSGi(); } return instance; } public static function paramsToString(param1:Dictionary) : String { var local3:* = undefined; var local2:String = ""; for(local3 in param1) { local2 += " (" + local3 + " = " + param1[local3] + ")"; } return local2; } private static function notifyServiceRemovalListeners(param1:Class, param2:Object, param3:Vector.<ListenerInfo>) : void { var local4:ListenerInfo = null; var local5:Vector.<Object> = null; var local6:Object = null; for each(local4 in param3) { local5 = local4.implementations; for each(local6 in local5) { if(local6 == param2) { local4.listener.serviceUnregistered(param1,param2); break; } } } } private function initLogging() : void { var local1:LogServiceImpl = new LogServiceImpl(); this.logger = local1.getLogger("osgi"); this.registerService(LogService,local1); } public function installBundle(param1:IBundleDescriptor) : void { var local3:int = 0; var local4:IBundleActivator = null; if(this.bundleDescriptors[param1.name]) { throw new Error("Bundle " + param1.name + " is already installed"); } this.bundleDescriptors[param1.name] = param1; var local2:Vector.<IBundleActivator> = param1.activators; if(local2 != null) { local3 = 0; while(local3 < local2.length) { local4 = local2[local3]; local4.start(this); local3++; } } } public function uninstallBundle(param1:String) : void { var local4:int = 0; var local5:IBundleActivator = null; if(param1 == null) { throw new ArgumentError("Bundle name is null"); } var local2:IBundleDescriptor = this.bundleDescriptors[param1]; if(local2 == null) { throw new Error("Bundle " + param1 + " not found"); } var local3:Vector.<IBundleActivator> = local2.activators; if(local3 != null) { local4 = 0; while(local4 < local3.length) { local5 = local3[local4]; local5.stop(this); local4++; } } delete this.bundleDescriptors[param1]; } public function registerService(param1:Class, param2:Object, param3:Dictionary = null) : void { this.services.addService(param1,param2,param3); this.updateInject(param1); this.notifyServiceRegistrationListeners(param1,param2); } private function updateInject(param1:Class) : void { var local2:Vector.<InjectPoint> = null; var local3:InjectPoint = null; if(this.serivceInterface2injectPoints[param1] != null) { local2 = this.serivceInterface2injectPoints[param1]; for each(local3 in local2) { local3.injectFunction(this.services.getService(param1,local3.filter)); } } } private function notifyServiceRegistrationListeners(param1:Class, param2:Object) : void { var local5:IServiceRegisterListener = null; var local6:Vector.<String> = null; var local7:String = null; var local8:Object = null; var local3:ServiceListenersCatalog = this.serviceRegisterListenersByInterface[param1]; if(local3 == null) { return; } var local4:Vector.<IServiceRegisterListener> = local3.getListeners(); if(local4 == null) { return; } for each(local5 in local4) { local6 = local3.getFilters(local5); for each(local7 in local6) { local8 = this.services.getService(param1,local7); if(local8 == param2) { local5.serviceRegistered(param1,param2); break; } } } } public function registerServiceMulti(param1:Array, param2:Object, param3:Dictionary = null) : void { var local4:Class = null; for each(local4 in param1) { this.registerService(local4,param2,param3); } } public function unregisterService(param1:Class, param2:Dictionary = null) : void { var local6:int = 0; var local7:InjectPoint = null; var local3:Vector.<ListenerInfo> = this.getListenerInfos(param1); var local4:Object = this.services.removeService(param1,param2); if(local4 == null) { return; } var local5:Vector.<InjectPoint> = this.serivceInterface2injectPoints[param1]; if(local5 != null) { local6 = int(local5.length - 1); while(local6 >= 0) { local7 = local5[local6]; if(local7.valueReturnInjectFunction() == local4) { local7.injectFunction(null); } local6--; } } notifyServiceRemovalListeners(param1,local4,local3); } private function getListenerInfos(param1:Class) : Vector.<ListenerInfo> { var local4:Vector.<IServiceRegisterListener> = null; var local5:IServiceRegisterListener = null; var local6:Vector.<String> = null; var local7:ListenerInfo = null; var local8:String = null; var local9:Object = null; var local2:Vector.<ListenerInfo> = new Vector.<ListenerInfo>(); var local3:ServiceListenersCatalog = this.serviceRegisterListenersByInterface[param1]; if(local3 != null) { local4 = local3.getListeners(); if(local4 != null) { for each(local5 in local4) { local6 = local3.getFilters(local5); local7 = new ListenerInfo(local5); for each(local8 in local6) { local9 = this.services.getService(param1,local8); if(local9 != null) { local7.addService(local9); } } local2.push(local7); } } } return local2; } public function getService(param1:Class, param2:String = "") : * { return this.services.getService(param1,param2); } public function addServiceRegisterListener(param1:Class, param2:IServiceRegisterListener, param3:String = "") : void { var local4:ServiceListenersCatalog = this.serviceRegisterListenersByInterface[param1]; if(local4 == null) { local4 = new ServiceListenersCatalog(); this.serviceRegisterListenersByInterface[param1] = local4; } local4.addListener(param2,param3); } public function removeServiceRegisterListener(param1:Class, param2:IServiceRegisterListener, param3:String = "") : void { var local4:ServiceListenersCatalog = this.serviceRegisterListenersByInterface[param1]; if(local4 != null) { local4.removeListener(param2,param3); } } public function injectService(param1:Class, param2:Function, param3:Function, param4:String = "") : void { if(!this.serivceInterface2injectPoints[param1]) { this.serivceInterface2injectPoints[param1] = new Vector.<InjectPoint>(); } this.serivceInterface2injectPoints[param1].push(new InjectPoint(param2,param3,param4)); var local5:Object = this.services.getService(param1,param4); param2(local5); } public function get bundleList() : Vector.<IBundleDescriptor> { var local2:IBundleDescriptor = null; var local1:Vector.<IBundleDescriptor> = new Vector.<IBundleDescriptor>(); for each(local2 in this.bundleDescriptors) { local1.push(local2); } return local1; } public function get serviceList() : Vector.<Object> { return this.services.serviceList; } public function getServicesInfo() : Vector.<ServiceInfo> { return this.services.getServicesInfo(); } public function createSharedObject(param1:String, param2:String = null, param3:Boolean = false) : SharedObject { return SharedObject.getLocal(param1,param2,param3); } } } import alternativa.osgi.service.IServiceRegisterListener; class InjectPoint { public var injectFunction:Function; public var valueReturnInjectFunction:Function; public var filter:String; public function InjectPoint(param1:Function, param2:Function, param3:String) { super(); this.injectFunction = param1; this.valueReturnInjectFunction = param2; this.filter = param3; } } class ListenerInfo { public var listener:IServiceRegisterListener; public var implementations:Vector.<Object> = new Vector.<Object>(); public function ListenerInfo(param1:IServiceRegisterListener) { super(); this.listener = param1; } public function addService(param1:Object) : void { if(this.implementations.indexOf(param1) == -1) { this.implementations.push(param1); } } }
package _codec.projects.tanks.client.battlefield.models.coloradjust { 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.coloradjust.ColorAdjustParams; public class CodecColorAdjustParams implements ICodec { public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog)); private var codec_alphaMultiplier:ICodec; private var codec_alphaOffset:ICodec; private var codec_blueMultiplier:ICodec; private var codec_blueOffset:ICodec; private var codec_greenMultiplier:ICodec; private var codec_greenOffset:ICodec; private var codec_redMultiplier:ICodec; private var codec_redOffset:ICodec; public function CodecColorAdjustParams() { super(); } public function init(param1:IProtocol) : void { this.codec_alphaMultiplier = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_alphaOffset = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_blueMultiplier = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_blueOffset = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_greenMultiplier = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_greenOffset = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_redMultiplier = param1.getCodec(new TypeCodecInfo(Float,false)); this.codec_redOffset = param1.getCodec(new TypeCodecInfo(Float,false)); } public function decode(param1:ProtocolBuffer) : Object { var local2:ColorAdjustParams = new ColorAdjustParams(); local2.alphaMultiplier = this.codec_alphaMultiplier.decode(param1) as Number; local2.alphaOffset = this.codec_alphaOffset.decode(param1) as Number; local2.blueMultiplier = this.codec_blueMultiplier.decode(param1) as Number; local2.blueOffset = this.codec_blueOffset.decode(param1) as Number; local2.greenMultiplier = this.codec_greenMultiplier.decode(param1) as Number; local2.greenOffset = this.codec_greenOffset.decode(param1) as Number; local2.redMultiplier = this.codec_redMultiplier.decode(param1) as Number; local2.redOffset = this.codec_redOffset.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:ColorAdjustParams = ColorAdjustParams(param2); this.codec_alphaMultiplier.encode(param1,local3.alphaMultiplier); this.codec_alphaOffset.encode(param1,local3.alphaOffset); this.codec_blueMultiplier.encode(param1,local3.blueMultiplier); this.codec_blueOffset.encode(param1,local3.blueOffset); this.codec_greenMultiplier.encode(param1,local3.greenMultiplier); this.codec_greenOffset.encode(param1,local3.greenOffset); this.codec_redMultiplier.encode(param1,local3.redMultiplier); this.codec_redOffset.encode(param1,local3.redOffset); } } }
package projects.tanks.client.panel.model.shop.description { public class ShopItemAdditionalDescriptionCC { private var _additionalDescription:String; public function ShopItemAdditionalDescriptionCC(param1:String = null) { super(); this._additionalDescription = param1; } public function get additionalDescription() : String { return this._additionalDescription; } public function set additionalDescription(param1:String) : void { this._additionalDescription = param1; } public function toString() : String { var local1:String = "ShopItemAdditionalDescriptionCC ["; local1 += "additionalDescription = " + this.additionalDescription + " "; return local1 + "]"; } } }
package alternativa.tanks.gui.icons { import flash.display.Bitmap; import flash.display.BitmapData; public class PremiumIcon { private static const premiumIconClass:Class = PremiumIcon_premiumIconClass; private static const premiumBd:BitmapData = new premiumIconClass().bitmapData; private static const smallPremiumIconClass:Class = PremiumIcon_smallPremiumIconClass; private static const smallPremiumBd:BitmapData = new smallPremiumIconClass().bitmapData; public function PremiumIcon() { super(); } public static function createInstance() : Bitmap { return new Bitmap(premiumBd); } public static function createSmallInstance() : Bitmap { return new Bitmap(smallPremiumBd); } } }
package { import flash.display.Sprite; import flash.system.Security; [ExcludeClass] public class _6a39ad10b0a5034b7f18b8fdf3adecf2d1daf72546a07bfff5440ac49311bcfa_flash_display_Sprite extends Sprite { public function _6a39ad10b0a5034b7f18b8fdf3adecf2d1daf72546a07bfff5440ac49311bcfa_flash_display_Sprite() { super(); } public function allowDomainInRSL(... rest) : void { Security.allowDomain.apply(null,rest); } public function allowInsecureDomainInRSL(... rest) : void { Security.allowInsecureDomain.apply(null,rest); } } }
package alternativa.tanks.models.weapons.discrete { import alternativa.math.Vector3; import alternativa.tanks.battle.objects.tank.Tank; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class DiscreteWeaponAdapt implements DiscreteWeapon { private var object:IGameObject; private var impl:DiscreteWeapon; public function DiscreteWeaponAdapt(param1:IGameObject, param2:DiscreteWeapon) { super(); this.object = param1; this.impl = param2; } public function tryToShoot(param1:int, param2:Vector3, param3:Vector.<Tank>) : void { var clientTime:int = param1; var direction:Vector3 = param2; var targets:Vector.<Tank> = param3; try { Model.object = this.object; this.impl.tryToShoot(clientTime,direction,targets); } finally { Model.popObject(); } } public function tryToDummyShoot(param1:int, param2:Vector3) : void { var clientTime:int = param1; var direction:Vector3 = param2; try { Model.object = this.object; this.impl.tryToDummyShoot(clientTime,direction); } finally { Model.popObject(); } } } }
package alternativa.tanks.model.quest.common.gui.window.buttons.skin { import controls.buttons.FixedHeightRectangleSkin; import controls.buttons.H50ButtonSkin; public class GreenBigButtonSkin extends H50ButtonSkin { private static const leftUpClass:Class = GreenBigButtonSkin_leftUpClass; private static const middleUpClass:Class = GreenBigButtonSkin_middleUpClass; private static const rightUpClass:Class = GreenBigButtonSkin_rightUpClass; private static const leftOverClass:Class = GreenBigButtonSkin_leftOverClass; private static const middleOverClass:Class = GreenBigButtonSkin_middleOverClass; private static const rightOverClass:Class = GreenBigButtonSkin_rightOverClass; private static const leftDownClass:Class = GreenBigButtonSkin_leftDownClass; private static const middleDownClass:Class = GreenBigButtonSkin_middleDownClass; private static const rightDownClass:Class = GreenBigButtonSkin_rightDownClass; public static const GREEN_SKIN:GreenBigButtonSkin = new GreenBigButtonSkin(); public function GreenBigButtonSkin() { super(this.createStateSkin(leftUpClass,middleUpClass,rightUpClass),this.createStateSkin(leftOverClass,middleOverClass,rightOverClass),this.createStateSkin(leftDownClass,middleDownClass,rightDownClass)); } private function createStateSkin(param1:Class, param2:Class, param3:Class) : FixedHeightRectangleSkin { return new FixedHeightRectangleSkin(param1,param2,param3); } } }
package alternativa.tanks.models.tank.hullcommon { import flash.display.BitmapData; import flash.media.Sound; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.resource.types.TextureResource; import platform.client.fp10.core.type.IGameObject; import projects.tanks.client.battlefield.models.tankparts.armor.common.HullCommonCC; public class HullCommonEvents implements HullCommon { private var object:IGameObject; private var impl:Vector.<Object>; public function HullCommonEvents(param1:IGameObject, param2:Vector.<Object>) { super(); this.object = param1; this.impl = param2; } public function getCC() : HullCommonCC { var result:HullCommonCC = null; var i:int = 0; var m:HullCommon = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); result = m.getCC(); i++; } } finally { Model.popObject(); } return result; } public function getDeadColoring() : TextureResource { var result:TextureResource = null; var i:int = 0; var m:HullCommon = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); result = m.getDeadColoring(); i++; } } finally { Model.popObject(); } return result; } public function getMass() : Number { var result:Number = NaN; var i:int = 0; var m:HullCommon = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); result = Number(m.getMass()); i++; } } finally { Model.popObject(); } return result; } public function setTankObject(param1:IGameObject) : void { var i:int = 0; var m:HullCommon = null; var tank:IGameObject = param1; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); m.setTankObject(tank); i++; } } finally { Model.popObject(); } } public function getTankObject() : IGameObject { var result:IGameObject = null; var i:int = 0; var m:HullCommon = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); result = m.getTankObject(); i++; } } finally { Model.popObject(); } return result; } public function getStunEffectTexture() : BitmapData { var result:BitmapData = null; var i:int = 0; var m:HullCommon = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); result = m.getStunEffectTexture(); i++; } } finally { Model.popObject(); } return result; } public function getStunSound() : Sound { var result:Sound = null; var i:int = 0; var m:HullCommon = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); result = m.getStunSound(); i++; } } finally { Model.popObject(); } return result; } public function getUltimateIconIndex() : int { var result:int = 0; var i:int = 0; var m:HullCommon = null; try { Model.object = this.object; i = 0; while(i < this.impl.length) { m = HullCommon(this.impl[i]); result = int(m.getUltimateIconIndex()); i++; } } finally { Model.popObject(); } return result; } } }
package alternativa.init { import alternativa.osgi.bundle.IBundleActivator; import alternativa.osgi.service.locale.ILocaleService; import alternativa.tanks.locale.ru.Image; import alternativa.tanks.locale.ru.Text; import scpacker.gui.GTanksI; import scpacker.gui.GTanksLoaderImages; public class TanksLocaleRuActivator implements IBundleActivator { public static var osgi:OSGi; public function TanksLocaleRuActivator() { super(); } public function start(osgi:OSGi) : void { TanksLocaleRuActivator.osgi = osgi; Text.init(osgi.getService(ILocaleService) as ILocaleService); Image.init(osgi.getService(ILocaleService) as ILocaleService); Main.osgi.registerService(GTanksLoaderImages,new GTanksI()); } public function stop(osgi:OSGi) : void { TanksLocaleRuActivator.osgi = null; } } }
package alternativa.tanks.models.battlefield.effects.levelup.rangs { import mx.core.BitmapAsset; [ExcludeClass] public class BigRangIcon_rang_23 extends BitmapAsset { public function BigRangIcon_rang_23() { super(); } } }
package alternativa.tanks.gui.device { import mx.core.BitmapAsset; [ExcludeClass] [Embed(source="/_assets/alternativa.tanks.gui.device.DevicesIcons_iconDefaultShotColorClass.png")] public class DevicesIcons_iconDefaultShotColorClass extends BitmapAsset { public function DevicesIcons_iconDefaultShotColorClass() { super(); } } }
package filters { import flash.filters.GlowFilter; public class Filters { public static const SHADOW_FILTER:GlowFilter = new GlowFilter(0,0.8,4,4,3); public static const SHADOW_FILTERS:Array = [SHADOW_FILTER]; public static const SHADOW_ON_OVER_FILTER:GlowFilter = new GlowFilter(0,0.8,4,4,5); public static const SHADOW_ON_OVER_FILTERS:Array = [SHADOW_ON_OVER_FILTER]; public function Filters() { super(); } } }
package alternativa.tanks.models.weapon.freeze { import alternativa.tanks.models.weapon.shared.streamweapon.StreamWeaponEffects; import platform.client.fp10.core.model.impl.Model; import platform.client.fp10.core.type.IGameObject; public class IFreezeSFXModelAdapt implements IFreezeSFXModel { private var object:IGameObject; private var impl:IFreezeSFXModel; public function IFreezeSFXModelAdapt(param1:IGameObject, param2:IFreezeSFXModel) { super(); this.object = param1; this.impl = param2; } public function getFreezeEffects(param1:Number, param2:Number) : StreamWeaponEffects { var result:StreamWeaponEffects = null; var damageAreaRange:Number = param1; var damageAreaConeAngle:Number = param2; try { Model.object = this.object; result = this.impl.getFreezeEffects(damageAreaRange,damageAreaConeAngle); } finally { Model.popObject(); } return result; } } }