code
stringlengths 57
237k
|
|---|
package alternativa.tanks.model.quest.common.gui.window.events {
import alternativa.types.Long;
import flash.events.Event;
public class QuestGetPrizeEvent extends Event {
public static const GET_QUEST_PRIZE:String = "QuestGetPrize";
public var questId:Long;
public function QuestGetPrizeEvent(param1:String, param2:Long) {
super(param1,true);
this.questId = param2;
}
}
}
|
package projects.tanks.client.panel.model.quest.notifier {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class QuestNotifierModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _completedDailyQuestViewedId:Long = Long.getLong(1139564146,-1776311807);
private var _completedWeeklyQuestViewedId:Long = Long.getLong(316469638,107701299);
private var _newDailyQuestViewedId:Long = Long.getLong(1598751087,-1100513428);
private var _newWeeklyQuestViewedId:Long = Long.getLong(1033423649,-632788030);
private var model:IModel;
public function QuestNotifierModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
public function completedDailyQuestViewed() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._completedDailyQuestViewedId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function completedWeeklyQuestViewed() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._completedWeeklyQuestViewedId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function newDailyQuestViewed() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._newDailyQuestViewedId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function newWeeklyQuestViewed() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._newWeeklyQuestViewedId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.model.payment.shop.category {
import projects.tanks.client.commons.types.ShopCategoryEnum;
import projects.tanks.client.panel.model.shop.shopcategory.IShopCategoryModelBase;
import projects.tanks.client.panel.model.shop.shopcategory.ShopCategoryModelBase;
[ModelInfo]
public class ShopCategoryModel extends ShopCategoryModelBase implements IShopCategoryModelBase, ShopCategory {
public function ShopCategoryModel() {
super();
}
public function getOrderIndex() : int {
return getInitParam().orderIndex;
}
public function isWithJumpButton() : Boolean {
return getInitParam().withJumpButton;
}
public function getType() : ShopCategoryEnum {
return getInitParam().type;
}
}
}
|
package platform.client.fp10.core.network.handler {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.display.IDisplay;
import alternativa.osgi.service.dump.IDumpService;
import alternativa.osgi.service.dump.IDumper;
import alternativa.osgi.service.launcherparams.ILauncherParams;
import alternativa.osgi.service.logging.LogService;
import alternativa.osgi.service.logging.Logger;
import alternativa.protocol.IProtocol;
import flash.utils.Dictionary;
import platform.client.fp10.core.network.ControlChannelContext;
import platform.client.fp10.core.network.ICommandHandler;
import platform.client.fp10.core.network.ICommandSender;
import platform.client.fp10.core.network.command.IServerControlCommand;
import platform.client.fp10.core.network.command.control.client.HashRequestCommand;
import platform.client.fp10.core.network.connection.ConnectionCloseStatus;
import platform.client.fp10.core.registry.SpaceRegistry;
import platform.client.fp10.core.service.address.AddressService;
import platform.client.fp10.core.service.clientparam.ClientParamUtil;
import platform.client.fp10.core.service.errormessage.IErrorMessageService;
import platform.client.fp10.core.service.errormessage.errors.ConnectionClosedError;
import platform.client.fp10.core.type.ISpace;
public class ControlCommandHandler implements ICommandHandler {
[Inject]
public static var logService:LogService;
private static var logger:Logger;
[Inject]
public static var messageBoxService:IErrorMessageService;
[Inject]
public static var spaceRegistry:SpaceRegistry;
[Inject]
public static var display:IDisplay;
[Inject]
public static var launcherParams:ILauncherParams;
[Inject]
public static var addressService:AddressService;
private var channelContext:ControlChannelContext = new ControlChannelContext();
private var commandSender:ICommandSender;
public function ControlCommandHandler() {
super();
var local1:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.channelContext.spaceProtocol = local1;
}
private static function getLogger() : Logger {
return logger || (logger = logService.getLogger("control"));
}
public function getCommandSender() : ICommandSender {
return this.commandSender;
}
public function getChannelContext() : ControlChannelContext {
return this.channelContext;
}
public function onConnectionOpen(param1:ICommandSender) : void {
this.commandSender = param1;
this.sendConnectionResponse();
}
public function onConnectionClose(param1:ConnectionCloseStatus, param2:String = null) : void {
var local3:Object = null;
var local4:ISpace = null;
while(spaceRegistry.spaces.length > 0) {
local4 = spaceRegistry.spaces[0];
local4.close();
}
for each(local3 in OSGi.getInstance().serviceList) {
if(local3 is OnConnectionClosedServiceListener) {
OnConnectionClosedServiceListener(local3).onConnectionClosed(param1);
}
}
if(param1 != ConnectionCloseStatus.CLOSED_BY_CLIENT) {
messageBoxService.showMessage(new ConnectionClosedError(param1));
}
this.commandSender = null;
this.logDumpers();
}
public function executeCommand(param1:Object) : void {
IServerControlCommand(param1).execute(this.channelContext);
}
private function sendConnectionResponse() : void {
var local3:String = null;
var local4:Dictionary = null;
var local5:String = null;
var local1:Array = [];
var local2:Array = [];
for each(local3 in launcherParams.parameterNames) {
local1.push(local3);
local2.push(launcherParams.getParameter(local3));
}
local1.push("clientHashURL");
local2.push(this.getClientHashURL());
local4 = ClientParamUtil.collectClientParams();
for(local5 in local4) {
local1.push(local5);
local2.push(local4[local5]);
}
this.commandSender.sendCommand(new HashRequestCommand(local1,local2));
}
private function logDumpers() : void {
var local2:IDumper = null;
var local1:IDumpService = IDumpService(OSGi.getInstance().getService(IDumpService));
for each(local2 in local1.dumpersList) {
logService.getLogger("dumper_" + local2.dumperName).info(local2.dump([]));
}
}
private function getClientHashURL() : String {
return addressService.getBaseURL() + "#" + addressService.getValue();
}
}
}
|
package _codec {
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;
public class VectorCodecintLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecintLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(int,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.<int> = new Vector.<int>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = int(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:int = 0;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<int> = Vector.<int>(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.scroller.gray {
import controls.scroller.*;
public class ScrollThumbSkinGray extends ScrollThumbSkin {
public function ScrollThumbSkinGray() {
super();
}
override public function initSkin() : void {
toppng = new ScrollSkinGray.thumbTop().bitmapData;
midpng = new ScrollSkinGray.thumbMiddle().bitmapData;
}
}
}
|
package projects.tanks.client.panel.model.shop.specialkit {
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 SpecialKitPackageModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:SpecialKitPackageModelServer;
private var client:ISpecialKitPackageModelBase = ISpecialKitPackageModelBase(this);
private var modelId:Long = Long.getLong(1441895147,1264370554);
public function SpecialKitPackageModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new SpecialKitPackageModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(SpecialKitPackageCC,false)));
}
protected function getInitParam() : SpecialKitPackageCC {
return SpecialKitPackageCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.weapon.shared {
import alternativa.physics.Body;
public interface RailgunTargetEvaluator {
function getHitEfficiency(param1:Body) : Number;
function isFriendly(param1:Body) : Boolean;
}
}
|
package alternativa.tanks.models.battlefield.gui.statistics.field
{
import assets.icons.BattleInfoIcons;
import controls.Label;
import flash.display.Bitmap;
import flash.display.Sprite;
public class IconField extends Sprite
{
[Embed(source="1044.png")]
private static const dom:Class;
protected var icon:BattleInfoIcons;
protected var iconType:int;
protected var label:Label;
private var addicitonIcon:Bitmap;
public function IconField(iconType:int = -1)
{
super();
this.iconType = iconType;
this.init();
}
protected function init() : void
{
if(this.iconType == 10)
{
this.addicitonIcon = new Bitmap(new dom().bitmapData);
addChild(this.addicitonIcon);
this.addicitonIcon.x = 0;
this.addicitonIcon.y = 2;
}
else if(this.iconType > -1)
{
this.icon = new BattleInfoIcons();
this.icon.type = this.iconType;
addChild(this.icon);
this.icon.x = 0;
this.icon.y = 0;
}
this.label = new Label();
this.label.color = 16777215;
if(this.icon)
{
this.label.x = this.icon.width + 3;
}
if(this.addicitonIcon)
{
this.label.x = this.addicitonIcon.width + 3;
}
addChild(this.label);
}
public function set text(value:String) : void
{
this.label.htmlText = value;
}
public function set size(value:Number) : void
{
this.label.size = value;
}
}
}
|
package alternativa.tanks.view.timeleftindicator {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.timeleftindicator.GreyTimeLeftIndicator_fullMarkerClass.png")]
public class GreyTimeLeftIndicator_fullMarkerClass extends BitmapAsset {
public function GreyTimeLeftIndicator_fullMarkerClass() {
super();
}
}
}
|
package flashx.textLayout.formats {
public final class TextAlign {
public static const START:String = "start";
public static const END:String = "end";
public static const LEFT:String = "left";
public static const RIGHT:String = "right";
public static const CENTER:String = "center";
public static const JUSTIFY:String = "justify";
public function TextAlign() {
super();
}
}
}
|
package alternativa.engine3d.loaders.collada {
import alternativa.engine3d.core.Camera3D;
use namespace collada;
public class DaeCamera extends DaeElement {
public function DaeCamera(param1:XML, param2:DaeDocument) {
super(param1,param2);
}
private function setXFov(param1:Camera3D, param2:Number) : void {
}
public function parseCamera() : Camera3D {
var local3:Number = NaN;
var local4:XML = null;
var local5:XML = null;
var local6:XML = null;
var local7:XML = null;
var local8:XML = null;
var local9:Number = NaN;
var local1:Camera3D = new Camera3D();
var local2:XML = data.optics.technique_common.perspective[0];
if(Boolean(local2)) {
local3 = Math.PI / 180;
local4 = local2.xfov[0];
local5 = local2.yfov[0];
local6 = local2.aspect_ratio[0];
if(local6 == null) {
if(local4 != null) {
this.setXFov(local1,parseNumber(local4) * local3);
} else if(local5 != null) {
this.setXFov(local1,parseNumber(local5) * local3);
}
} else {
local9 = parseNumber(local6);
if(local4 != null) {
this.setXFov(local1,parseNumber(local4) * local3);
} else if(local5 != null) {
this.setXFov(local1,local9 * parseNumber(local5) * local3);
}
}
local7 = local2.znear[0];
local8 = local2.zfar[0];
if(local7 != null) {
local1.nearClipping = parseNumber(local7);
}
if(local8 != null) {
local1.farClipping = parseNumber(local8);
}
}
return local1;
}
}
}
|
package forms {
import controls.base.LabelBase;
import controls.statassets.BlackRoundRect;
import flash.text.TextFormatAlign;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow;
public class AntiAddictionAlert extends DialogWindow {
protected const PADDING:int = 15;
protected var bg:BlackRoundRect = new BlackRoundRect();
protected var timeLimitLabel:LabelBase = new LabelBase();
public function AntiAddictionAlert(param1:String) {
super();
this.timeLimitLabel.align = TextFormatAlign.CENTER;
this.timeLimitLabel.text = param1;
addChild(this.bg);
addChild(this.timeLimitLabel);
this.timeLimitLabel.x = this.PADDING;
this.timeLimitLabel.y = this.PADDING;
this.bg.width = this.timeLimitLabel.width + this.PADDING * 2;
this.bg.height = this.timeLimitLabel.height + this.PADDING * 2;
dialogService.enqueueDialog(this);
}
public function removeFormDialog() : void {
dialogService.removeDialog(this);
}
}
}
|
package assets.button {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.button.button_red_UP_RIGHT.png")]
public dynamic class button_red_UP_RIGHT extends BitmapData {
public function button_red_UP_RIGHT(param1:int = 7, param2:int = 30) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.utils {
public interface DataValidator {
function addValidator(param1:DataUnitValidator) : void;
function removeValidator(param1:DataUnitValidator) : void;
function removeAllValidators() : void;
function tick() : void;
}
}
|
package projects.tanks.clients.flash.commons.models.coloring {
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import platform.client.fp10.core.resource.types.TextureResource;
[ModelInterface]
public interface IColoring {
function getColoring() : TextureResource;
function getAnimatedColoring() : MultiframeTextureResource;
function isAnimated() : Boolean;
}
}
|
package alternativa.tanks.model.payment.modes.paygarden {
import projects.tanks.client.panel.model.payment.modes.paygarden.PayGardenProductType;
[ModelInterface]
public interface PayGardenPayment {
function getProductType() : PayGardenProductType;
}
}
|
package scpacker.server.models.bonus
{
import alternativa.init.Main;
import alternativa.service.IModelService;
import alternativa.tanks.model.bonus.BonusModel;
import projects.tanks.client.panel.model.bonus.BonusItem;
import projects.tanks.client.panel.model.bonus.IBonusModelBase;
public class ServerBonusModel
{
private var model:BonusModel;
private var modelsService:IModelService;
public function ServerBonusModel()
{
super();
this.modelsService = IModelService(Main.osgi.getService(IModelService));
this.model = BonusModel(this.modelsService.getModelsByInterface(IBonusModelBase)[0]);
}
public function showBonuses(data:String) : void
{
var item:Object = null;
var bonusItem:BonusItem = null;
var array:Array = new Array();
var parser:Object = JSON.parse(data);
var i:int = 0;
for each(item in parser.items)
{
bonusItem = new BonusItem(item.id);
bonusItem.count = item.count;
array[i] = bonusItem;
i++;
}
this.model.showBonuses(null,array,"RU");
}
public function showCrystalls(count:int) : void
{
this.model.showCrystals(null,count,null);
}
public function showDoubleCrystalls() : void
{
this.model.showDoubleCrystalls(null,null);
}
public function showNoSupplies() : void
{
this.model.showNoSupplies(null,null);
}
public function showNewbiesUpScore() : void
{
this.model.showNubeUpScore();
}
public function showNewbiesNewRank() : void
{
this.model.showNubeNewRank();
}
public function showRulesUpdate() : void
{
this.model.showRulesUpdate();
}
}
}
|
package alternativa.tanks.display.usertitle
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ProgressBarSkin_hpRightBgDmCls extends BitmapAsset
{
public function ProgressBarSkin_hpRightBgDmCls()
{
super();
}
}
}
|
package alternativa.tanks.models.battlemessages {
import controls.Label;
internal class Message {
private static const FLASH_TIME:int = 500;
private static const FADE_TIME:int = 700;
private static const LIFE_TIME1:int = 2000;
private static const LIFE_TIME2:int = 10000;
private static const ALPHA:Number = 0.6;
private const FONT_SIZE:int = 18;
private var STATES:Vector.<MessageState>;
private var DURATION_STATES:Vector.<MessageState>;
public var isDead:Boolean;
private var label:Label = new Label();
private var states:Vector.<MessageState>;
private var currentStateIndex:int;
public function Message() {
super();
this.STATES = Vector.<MessageState>([new StateAlpha(this,FLASH_TIME,0,1),new StateNormal(LIFE_TIME1),new StateAlpha(this,FADE_TIME,1,ALPHA),new StateNormal(LIFE_TIME2),new StateAlpha(this,FADE_TIME,ALPHA,0)]);
this.DURATION_STATES = Vector.<MessageState>([new StateAlpha(this,FADE_TIME,1,ALPHA),new StateNormal(LIFE_TIME2),new StateAlpha(this,FADE_TIME,ALPHA,0)]);
this.label.size = this.FONT_SIZE;
this.label.bold = true;
}
public function init() : void {
this.isDead = false;
this.currentStateIndex = 0;
this.states = this.STATES;
var local1:MessageState = this.states[0];
local1.init();
}
public function initWithDuration(param1:int) : void {
this.isDead = false;
this.currentStateIndex = 0;
this.states = this.DURATION_STATES;
var local2:MessageState = this.states[1];
local2.setDurationInMs(param1);
var local3:MessageState = this.states[0];
local3.init();
}
public function update(param1:int) : void {
var local2:MessageState = null;
var local3:MessageState = null;
if(!this.isDead) {
local2 = this.states[this.currentStateIndex];
if(!local2.update(param1)) {
if(++this.currentStateIndex == this.states.length) {
this.isDead = true;
} else {
local3 = this.states[this.currentStateIndex];
local3.init();
}
}
}
}
public function setAlpha(param1:Number) : void {
this.label.alpha = param1;
}
public function getLabel() : Label {
return this.label;
}
}
}
|
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.freeze
{
import scpacker.Base;
public class FreezeModelBase extends Base
{
public function FreezeModelBase()
{
super();
}
}
}
|
package mx.core
{
import flash.display.Loader;
import flash.events.Event;
import flash.system.ApplicationDomain;
import flash.system.LoaderContext;
import flash.utils.ByteArray;
use namespace mx_internal;
[Event(name="complete",type="flash.events.Event")]
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject
{
mx_internal static const VERSION:String = "4.6.0.23201";
private var loader:Loader = null;
private var initialized:Boolean = false;
private var requestedWidth:Number;
private var requestedHeight:Number;
protected var initialWidth:Number = 0;
protected var initialHeight:Number = 0;
public function MovieClipLoaderAsset()
{
super();
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if("allowLoadBytesCodeExecution" in loaderContext)
{
loaderContext["allowLoadBytesCodeExecution"] = true;
}
this.loader = new Loader();
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.completeHandler);
this.loader.loadBytes(this.movieClipData,loaderContext);
addChild(this.loader);
}
override public function get height() : Number
{
if(!this.initialized)
{
return this.initialHeight;
}
return super.height;
}
override public function set height(value:Number) : void
{
if(!this.initialized)
{
this.requestedHeight = value;
}
else
{
this.loader.height = value;
}
}
override public function get measuredHeight() : Number
{
return this.initialHeight;
}
override public function get measuredWidth() : Number
{
return this.initialWidth;
}
override public function get width() : Number
{
if(!this.initialized)
{
return this.initialWidth;
}
return super.width;
}
override public function set width(value:Number) : void
{
if(!this.initialized)
{
this.requestedWidth = value;
}
else
{
this.loader.width = value;
}
}
public function get movieClipData() : ByteArray
{
return null;
}
private function completeHandler(event:Event) : void
{
this.initialized = true;
this.initialWidth = this.loader.contentLoaderInfo.width;
this.initialHeight = this.loader.contentLoaderInfo.height;
if(!isNaN(this.requestedWidth))
{
this.loader.width = this.requestedWidth;
}
if(!isNaN(this.requestedHeight))
{
this.loader.height = this.requestedHeight;
}
dispatchEvent(event);
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.twins {
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.Byte;
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;
import projects.tanks.client.battlefield.types.Vector3d;
public class TwinsModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _fireCommandId:Long = Long.getLong(1277019392,-355104349);
private var _fireCommand_clientTimeCodec:ICodec;
private var _fireCommand_barrelCodec:ICodec;
private var _fireCommand_shotIdCodec:ICodec;
private var _fireCommand_shotDirectionCodec:ICodec;
private var _fireDummyCommandId:Long = Long.getLong(357444731,388730325);
private var _fireDummyCommand_clientTimeCodec:ICodec;
private var _fireDummyCommand_barrelCodec:ICodec;
private var _hitStaticCommandId:Long = Long.getLong(130637440,377170052);
private var _hitStaticCommand_clientTimeCodec:ICodec;
private var _hitStaticCommand_shotIdCodec:ICodec;
private var _hitStaticCommand_hitPointWorldCodec:ICodec;
private var _hitTargetCommandId:Long = Long.getLong(56483500,-1445983993);
private var _hitTargetCommand_clientTimeCodec:ICodec;
private var _hitTargetCommand_shotIdCodec:ICodec;
private var _hitTargetCommand_targetCodec:ICodec;
private var _hitTargetCommand_targetPositionCodec:ICodec;
private var _hitTargetCommand_hitPointWorldCodec:ICodec;
private var model:IModel;
public function TwinsModelServer(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._fireCommand_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._fireCommand_barrelCodec = this.protocol.getCodec(new TypeCodecInfo(Byte,false));
this._fireCommand_shotIdCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._fireCommand_shotDirectionCodec = this.protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._fireDummyCommand_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._fireDummyCommand_barrelCodec = this.protocol.getCodec(new TypeCodecInfo(Byte,false));
this._hitStaticCommand_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._hitStaticCommand_shotIdCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._hitStaticCommand_hitPointWorldCodec = this.protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._hitTargetCommand_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._hitTargetCommand_shotIdCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._hitTargetCommand_targetCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._hitTargetCommand_targetPositionCodec = this.protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._hitTargetCommand_hitPointWorldCodec = this.protocol.getCodec(new TypeCodecInfo(Vector3d,false));
}
public function fireCommand(param1:int, param2:int, param3:int, param4:Vector3d) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._fireCommand_clientTimeCodec.encode(this.protocolBuffer,param1);
this._fireCommand_barrelCodec.encode(this.protocolBuffer,param2);
this._fireCommand_shotIdCodec.encode(this.protocolBuffer,param3);
this._fireCommand_shotDirectionCodec.encode(this.protocolBuffer,param4);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local5:SpaceCommand = new SpaceCommand(Model.object.id,this._fireCommandId,this.protocolBuffer);
var local6:IGameObject = Model.object;
var local7:ISpace = local6.space;
local7.commandSender.sendCommand(local5);
this.protocolBuffer.optionalMap.clear();
}
public function fireDummyCommand(param1:int, param2:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._fireDummyCommand_clientTimeCodec.encode(this.protocolBuffer,param1);
this._fireDummyCommand_barrelCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._fireDummyCommandId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
public function hitStaticCommand(param1:int, param2:int, param3:Vector3d) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._hitStaticCommand_clientTimeCodec.encode(this.protocolBuffer,param1);
this._hitStaticCommand_shotIdCodec.encode(this.protocolBuffer,param2);
this._hitStaticCommand_hitPointWorldCodec.encode(this.protocolBuffer,param3);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local4:SpaceCommand = new SpaceCommand(Model.object.id,this._hitStaticCommandId,this.protocolBuffer);
var local5:IGameObject = Model.object;
var local6:ISpace = local5.space;
local6.commandSender.sendCommand(local4);
this.protocolBuffer.optionalMap.clear();
}
public function hitTargetCommand(param1:int, param2:int, param3:IGameObject, param4:Vector3d, param5:Vector3d) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._hitTargetCommand_clientTimeCodec.encode(this.protocolBuffer,param1);
this._hitTargetCommand_shotIdCodec.encode(this.protocolBuffer,param2);
this._hitTargetCommand_targetCodec.encode(this.protocolBuffer,param3);
this._hitTargetCommand_targetPositionCodec.encode(this.protocolBuffer,param4);
this._hitTargetCommand_hitPointWorldCodec.encode(this.protocolBuffer,param5);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local6:SpaceCommand = new SpaceCommand(Model.object.id,this._hitTargetCommandId,this.protocolBuffer);
var local7:IGameObject = Model.object;
var local8:ISpace = local7.space;
local8.commandSender.sendCommand(local6);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.battle.objects.tank.tankskin.turret {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class CustomTurretSkinAdapt implements CustomTurretSkin {
private var object:IGameObject;
private var impl:CustomTurretSkin;
public function CustomTurretSkinAdapt(param1:IGameObject, param2:CustomTurretSkin) {
super();
this.object = param1;
this.impl = param2;
}
public function createSkin(param1:Tanks3DSResource) : TurretSkin {
var result:TurretSkin = null;
var resource:Tanks3DSResource = param1;
try {
Model.object = this.object;
result = this.impl.createSkin(resource);
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.weapon.artillery {
import alternativa.tanks.models.weapon.artillery.sfx.ArtilleryEffects;
import alternativa.tanks.models.weapon.artillery.sfx.ArtillerySfxData;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapons.artillery.ArtilleryCC;
public class RemoteArtilleryWeapon extends ArtilleryWeapon {
public function RemoteArtilleryWeapon(param1:IGameObject, param2:ArtilleryObject, param3:ArtilleryCC, param4:ArtillerySfxData, param5:ArtilleryEffects) {
super(param1,param2,param3,param4,param5);
}
override public function enable() : void {
}
override public function disable(param1:Boolean) : void {
stop(0,param1);
}
}
}
|
package alternativa.tanks.loader
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ProgressBar_bitmapBar extends BitmapAsset
{
public function ProgressBar_bitmapBar()
{
super();
}
}
}
|
package alternativa.tanks.model.garage.resistance {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.garage.resistance.ResistancesIcons_bitmapmineResistance_x2.png")]
public class ResistancesIcons_bitmapmineResistance_x2 extends BitmapAsset {
public function ResistancesIcons_bitmapmineResistance_x2() {
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.mobilequest.quest {
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.mobilequest.quest.MobileQuestReward;
public class VectorCodecMobileQuestRewardLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecMobileQuestRewardLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(MobileQuestReward,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.<MobileQuestReward> = new Vector.<MobileQuestReward>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = MobileQuestReward(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:MobileQuestReward = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<MobileQuestReward> = Vector.<MobileQuestReward>(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.protocol.codec.primitive {
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
public class DoubleCodec implements IPrimitiveCodec {
public function DoubleCodec() {
super();
}
public function nullValue() : Object {
return Number.NEGATIVE_INFINITY;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
param1.writer.writeDouble(Number(param2));
}
public function decode(param1:ProtocolBuffer) : Object {
return param1.reader.readDouble();
}
public function init(param1:IProtocol) : void {
}
}
}
|
package _codec.projects.tanks.client.tanksservices.types.battle {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import projects.tanks.client.battleservice.BattleMode;
import projects.tanks.client.battleservice.Range;
import projects.tanks.client.tanksservices.types.battle.BattleInfoData;
public class CodecBattleInfoData implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_battleId:ICodec;
private var codec_inGroup:ICodec;
private var codec_mapName:ICodec;
private var codec_mode:ICodec;
private var codec_privateBattle:ICodec;
private var codec_proBattle:ICodec;
private var codec_range:ICodec;
public function CodecBattleInfoData() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_battleId = param1.getCodec(new TypeCodecInfo(Long,false));
this.codec_inGroup = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_mapName = param1.getCodec(new TypeCodecInfo(String,true));
this.codec_mode = param1.getCodec(new EnumCodecInfo(BattleMode,true));
this.codec_privateBattle = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_proBattle = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_range = param1.getCodec(new TypeCodecInfo(Range,true));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BattleInfoData = new BattleInfoData();
local2.battleId = this.codec_battleId.decode(param1) as Long;
local2.inGroup = this.codec_inGroup.decode(param1) as Boolean;
local2.mapName = this.codec_mapName.decode(param1) as String;
local2.mode = this.codec_mode.decode(param1) as BattleMode;
local2.privateBattle = this.codec_privateBattle.decode(param1) as Boolean;
local2.proBattle = this.codec_proBattle.decode(param1) as Boolean;
local2.range = this.codec_range.decode(param1) as Range;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:BattleInfoData = BattleInfoData(param2);
this.codec_battleId.encode(param1,local3.battleId);
this.codec_inGroup.encode(param1,local3.inGroup);
this.codec_mapName.encode(param1,local3.mapName);
this.codec_mode.encode(param1,local3.mode);
this.codec_privateBattle.encode(param1,local3.privateBattle);
this.codec_proBattle.encode(param1,local3.proBattle);
this.codec_range.encode(param1,local3.range);
}
}
}
|
package projects.tanks.client.garage.models.garage.present {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class PresentPurchaseModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:PresentPurchaseModelServer;
private var client:IPresentPurchaseModelBase = IPresentPurchaseModelBase(this);
private var modelId:Long = Long.getLong(888433053,2115284408);
private var _setUidAvailableId:Long = Long.getLong(759000870,-1549014702);
private var _setUidAvailable_availableCodec:ICodec;
public function PresentPurchaseModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new PresentPurchaseModelServer(IModel(this));
this._setUidAvailable_availableCodec = this._protocol.getCodec(new TypeCodecInfo(Boolean,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._setUidAvailableId:
this.client.setUidAvailable(Boolean(this._setUidAvailable_availableCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.servermodels.registartion.password {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IPasswordRegistrationEvents implements IPasswordRegistration {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IPasswordRegistrationEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function register(param1:String, param2:String, param3:String, param4:Boolean, param5:String, param6:String, param7:String) : void {
var i:int = 0;
var m:IPasswordRegistration = null;
var uid:String = param1;
var password:String = param2;
var registeredUrl:String = param3;
var rememberMe:Boolean = param4;
var referralHash:String = param5;
var realName:String = param6;
var idNumber:String = param7;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IPasswordRegistration(this.impl[i]);
m.register(uid,password,registeredUrl,rememberMe,referralHash,realName,idNumber);
i++;
}
}
finally {
Model.popObject();
}
}
public function checkCallsign(param1:String) : void {
var i:int = 0;
var m:IPasswordRegistration = null;
var callsign:String = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IPasswordRegistration(this.impl[i]);
m.checkCallsign(callsign);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.launcher {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.launcherparams.LauncherParams;
import alternativa.osgi.service.serverlog.ServerLoggingService;
import alternativa.startup.ConnectionParameters;
import alternativa.types.URL;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.utils.clearInterval;
import flash.utils.setTimeout;
public class ServerConfigLoader {
public static var resourcesRootURL:String;
public static const PARAM_CONFIG_URL:String = "config";
private const LOAD_CONFIG_ATTEMPT_COUNT:int = 3;
private const SERVER_STATUS_OVERLOADED:String = "overloaded";
private const SERVER_STATUS_UNAVAILABLE:String = "unavailable";
private const PARAM_RESOURCES_ROOT_URL:String = "resources";
private const RESOURCES_ROOT:String = "resources";
private var configLoader:URLLoader;
private var listener:ServerConfigLoaderListener;
private var params:LauncherParams;
private var configURL:String;
private var loadConfigAttempt:int = 1;
private var retryLoadConfigTimeoutId:int = -1;
public function ServerConfigLoader(param1:LauncherParams, param2:ServerConfigLoaderListener) {
super();
this.params = param1;
this.listener = param2;
}
public function loadServerConfiguration() : void {
var local1:URL = new URL(this.params.urlLoader,this.params.isStrictUseHttp());
this.configURL = this.params.getParameter(PARAM_CONFIG_URL);
if(this.configURL.indexOf("://") == -1) {
this.configURL = local1.scheme + "://" + this.configURL;
}
this.log(this.configURL);
resourcesRootURL = this.makeResourcesRootURL(local1);
this.startLoadServerConfigurationWithNotify();
}
private function startLoadServerConfigurationWithNotify() : void {
this.loadConfigAttempt = 1;
this.startLoadServerConfiguration();
this.listener.onServerConfigLoadingStart();
}
private function startLoadServerConfiguration() : void {
this.configLoader = new URLLoader();
this.configLoader.addEventListener(Event.COMPLETE,this.onServerConfigLoadingComplete);
this.configLoader.addEventListener(IOErrorEvent.IO_ERROR,this.onServerConfigLoadingError);
this.configLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onServerConfigLoadingError);
this.configLoader.addEventListener(ProgressEvent.PROGRESS,this.onServerConfigLoadingProgress);
this.configLoader.load(new URLRequest(this.configURL + "?rnd=" + Math.random()));
}
private function stopLoadServerConfiguration() : void {
this.configLoader.close();
this.configLoader.removeEventListener(Event.COMPLETE,this.onServerConfigLoadingComplete);
this.configLoader.removeEventListener(IOErrorEvent.IO_ERROR,this.onServerConfigLoadingError);
this.configLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onServerConfigLoadingError);
this.configLoader.removeEventListener(ProgressEvent.PROGRESS,this.onServerConfigLoadingProgress);
this.configLoader = null;
}
private function onServerConfigLoadingProgress(param1:ProgressEvent) : void {
this.listener.onServerConfigLoadingProgress(param1.bytesLoaded,param1.bytesTotal);
}
private function onServerConfigLoadingComplete(param1:Event) : void {
this.clearReloadInterval();
this.listener.onServerConfigLoadingComplete();
var local2:XML = XML(this.configLoader.data);
this.configLoader = null;
var local3:Namespace = local2.namespace();
var local4:String = local2.local3::status.toString();
switch(local4) {
case this.SERVER_STATUS_OVERLOADED:
this.listener.onServerOverloaded();
return;
case this.SERVER_STATUS_UNAVAILABLE:
this.listener.onServerUnavailable();
return;
default:
this.initConnectionParams(local2);
return;
}
}
private function onServerConfigLoadingError(param1:ErrorEvent) : void {
this.logLoadingErrorToServer(param1);
this.clearReloadInterval();
if(this.loadConfigAttempt >= this.LOAD_CONFIG_ATTEMPT_COUNT) {
this.listener.onServerConfigLoadingError(param1.text);
} else {
this.stopLoadServerConfiguration();
this.retryLoadConfigTimeoutId = setTimeout(this.reloadConfig,Math.random() * 1000 + 1000);
}
}
private function clearReloadInterval() : void {
if(this.retryLoadConfigTimeoutId != -1) {
clearInterval(this.retryLoadConfigTimeoutId);
}
}
private function reloadConfig() : void {
++this.loadConfigAttempt;
this.startLoadServerConfiguration();
}
private function initConnectionParams(param1:XML) : void {
var local5:XML = null;
var local6:* = false;
var local7:ConnectionParameters = null;
var local2:Namespace = param1.namespace();
var local3:String = param1.local2::server.@address;
this.log("Server address: " + local3);
var local4:Vector.<int> = new Vector.<int>();
for each(local5 in param1.local2::server.local2::ports.local2::port) {
local4.push(int(local5));
}
this.log("Ports: " + local4.join(", "));
local6 = "secure" == param1.local2::server.@mode;
local7 = new ConnectionParameters(local3,local4,resourcesRootURL,local6);
this.listener.onServerConfigParsed(local7);
}
private function makeResourcesRootURL(param1:URL) : String {
var local3:String = null;
var local2:* = this.params.getParameter(this.PARAM_RESOURCES_ROOT_URL);
if(local2 == null || local2.length == 0) {
local3 = param1.path.substring(0,param1.path.lastIndexOf("/") + 1);
local2 = local3 + this.RESOURCES_ROOT;
return param1.getRoot() + local2 + "/";
}
if(local2.indexOf("http") == -1) {
local2 = param1.scheme + "://" + local2;
}
if(local2.lastIndexOf("/") != local2.length - 1) {
local2 += "/";
}
return local2;
}
private function log(param1:String) : void {
this.listener.log("Loading server configuration from " + param1);
}
private function logLoadingErrorToServer(param1:ErrorEvent) : void {
ServerLoggingService(OSGi.getInstance().getService(ServerLoggingService)).sendDataToServer(this.getGelfString(param1.errorID.toString()));
}
private function getGelfString(param1:String) : String {
return "{\"short_message\":\"Config loading error\", \"host\":\"client_errors\",\"_configUrl\":\"" + this.configURL + "\", \"_error_id\":\"" + param1 + "\"}";
}
}
}
|
package alternativa.tanks.model.premiumaccount.alert {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.premiumaccount.PremiumAccountWelcomeAlert;
import alternativa.tanks.model.premiumaccount.notification.PremiumCompleteNotification;
import flash.events.Event;
import flash.utils.clearInterval;
import flash.utils.setInterval;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.premiumaccount.alert.IPremiumAccountAlertModelBase;
import projects.tanks.client.panel.model.premiumaccount.alert.PremiumAccountAlertCC;
import projects.tanks.client.panel.model.premiumaccount.alert.PremiumAccountAlertModelBase;
import projects.tanks.clients.flash.commons.services.notification.INotificationService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.premium.PremiumService;
[ModelInfo]
public class PremiumAccountAlertModel extends PremiumAccountAlertModelBase implements IPremiumAccountAlertModelBase, ObjectLoadListener, ObjectUnloadListener {
[Inject]
public static var notificationService:INotificationService;
[Inject]
public static var premiumService:PremiumService;
[Inject]
public static var localeService:ILocaleService;
private static const UPDATE_INTERVAL:int = 60000;
private var _showReminderIntervalId:uint = 0;
private var _wasShowReminderCompletionPremium:Boolean;
private var _reminderCompletionPremiumTime:int;
public function PremiumAccountAlertModel() {
super();
}
public function objectLoaded() : void {
var local1:PremiumAccountAlertCC = getInitParam();
if(local1.localRuntimeUser) {
if(local1.needShowWelcomeAlert) {
this.showWelcomeAlert(local1.wasShowAlertForFirstPurchasePremium);
}
if(local1.needShowNotificationCompletionPremium) {
this.showNotificationCompletionPremium();
}
this._wasShowReminderCompletionPremium = local1.wasShowReminderCompletionPremium;
this._reminderCompletionPremiumTime = local1.reminderCompletionPremiumTime;
this.checkNeedShowReminderCompletionPremium();
premiumService.addEventListener(Event.CHANGE,getFunctionWrapper(this.onSelfPremiumChange));
}
}
private function checkNeedShowReminderCompletionPremium() : void {
var local1:int = 0;
this.destroyReminderInterval();
if(premiumService.hasPremium()) {
local1 = premiumService.getTimeLeft() - this._reminderCompletionPremiumTime;
if(local1 > 0) {
this._wasShowReminderCompletionPremium = false;
this._showReminderIntervalId = setInterval(getFunctionWrapper(this.checkNeedShowReminderCompletionPremium),UPDATE_INTERVAL);
} else if(!this._wasShowReminderCompletionPremium) {
this.showReminderCompletionPremium();
}
}
}
public function objectUnloaded() : void {
if(getInitParam().localRuntimeUser) {
premiumService.removeEventListener(Event.CHANGE,getFunctionWrapper(this.onSelfPremiumChange));
this.destroyReminderInterval();
}
}
private function destroyReminderInterval() : void {
if(this._showReminderIntervalId != 0) {
clearInterval(this._showReminderIntervalId);
this._showReminderIntervalId = 0;
}
}
public function showWelcomeAlert(param1:Boolean) : void {
var local2:String = null;
if(param1) {
local2 = localeService.getText(TanksLocale.TEXT_PREMIUM_ALERT_RETURN);
} else {
local2 = localeService.getText(TanksLocale.TEXT_PREMIUM_ALERT_WELCOM);
}
var local3:PremiumAccountWelcomeAlert = new PremiumAccountWelcomeAlert(local2);
local3.enqueueDialog();
server.confirmShowWelcomeAlert();
}
private function onSelfPremiumChange(param1:Event) : void {
if(premiumService.hasPremium()) {
this.checkNeedShowReminderCompletionPremium();
} else {
this.showNotificationCompletionPremium();
}
}
private function showNotificationCompletionPremium() : void {
notificationService.addNotification(new PremiumCompleteNotification(localeService.getText(TanksLocale.TEXT_PREMIUM_NOTIFICATION_COMPLETE)));
server.confirmShowNotificationCompletionPremium();
}
private function showReminderCompletionPremium() : void {
this._wasShowReminderCompletionPremium = true;
notificationService.addNotification(new PremiumCompleteNotification(localeService.getText(TanksLocale.TEXT_PREMIUM_NOTIFICATION_SOON_COMPLETE)));
server.confirmShowReminderCompletionPremium();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.terminator {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import alternativa.types.Short;
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;
import projects.tanks.client.battlefield.types.Vector3d;
public class TerminatorModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _primaryChargeId:Long = Long.getLong(599352190,701324778);
private var _primaryCharge_clientTimeCodec:ICodec;
private var _primaryCharge_barrelIndexCodec:ICodec;
private var _primaryDummyShotId:Long = Long.getLong(1122047966,-542035764);
private var _primaryDummyShot_clientTimeCodec:ICodec;
private var _primaryDummyShot_barrelIndexCodec:ICodec;
private var _primaryShotId:Long = Long.getLong(1697698460,1026724944);
private var _primaryShot_clientTimeCodec:ICodec;
private var _primaryShot_staticHitPointCodec:ICodec;
private var _primaryShot_targetsCodec:ICodec;
private var _primaryShot_targetHitPointsCodec:ICodec;
private var _primaryShot_targetIncarnationsCodec:ICodec;
private var _primaryShot_targetPositionsCodec:ICodec;
private var _primaryShot_hitPointsWorldCodec:ICodec;
private var _primaryShot_barrelIndexCodec:ICodec;
private var _secondaryHideId:Long = Long.getLong(1071491744,825439082);
private var _secondaryHide_clientTimeCodec:ICodec;
private var _secondaryOpenId:Long = Long.getLong(1071491744,825654386);
private var _secondaryOpen_clientTimeCodec:ICodec;
private var model:IModel;
public function TerminatorModelServer(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._primaryCharge_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._primaryCharge_barrelIndexCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._primaryDummyShot_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._primaryDummyShot_barrelIndexCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._primaryShot_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._primaryShot_staticHitPointCodec = this.protocol.getCodec(new TypeCodecInfo(Vector3d,true));
this._primaryShot_targetsCodec = this.protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(IGameObject,false),true,1));
this._primaryShot_targetHitPointsCodec = this.protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Vector3d,false),true,1));
this._primaryShot_targetIncarnationsCodec = this.protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Short,false),true,1));
this._primaryShot_targetPositionsCodec = this.protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Vector3d,false),true,1));
this._primaryShot_hitPointsWorldCodec = this.protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Vector3d,false),true,1));
this._primaryShot_barrelIndexCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._secondaryHide_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._secondaryOpen_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
}
public function primaryCharge(param1:int, param2:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._primaryCharge_clientTimeCodec.encode(this.protocolBuffer,param1);
this._primaryCharge_barrelIndexCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._primaryChargeId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
public function primaryDummyShot(param1:int, param2:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._primaryDummyShot_clientTimeCodec.encode(this.protocolBuffer,param1);
this._primaryDummyShot_barrelIndexCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._primaryDummyShotId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
public function primaryShot(param1:int, param2:Vector3d, param3:Vector.<IGameObject>, param4:Vector.<Vector3d>, param5:Vector.<int>, param6:Vector.<Vector3d>, param7:Vector.<Vector3d>, param8:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._primaryShot_clientTimeCodec.encode(this.protocolBuffer,param1);
this._primaryShot_staticHitPointCodec.encode(this.protocolBuffer,param2);
this._primaryShot_targetsCodec.encode(this.protocolBuffer,param3);
this._primaryShot_targetHitPointsCodec.encode(this.protocolBuffer,param4);
this._primaryShot_targetIncarnationsCodec.encode(this.protocolBuffer,param5);
this._primaryShot_targetPositionsCodec.encode(this.protocolBuffer,param6);
this._primaryShot_hitPointsWorldCodec.encode(this.protocolBuffer,param7);
this._primaryShot_barrelIndexCodec.encode(this.protocolBuffer,param8);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local9:SpaceCommand = new SpaceCommand(Model.object.id,this._primaryShotId,this.protocolBuffer);
var local10:IGameObject = Model.object;
var local11:ISpace = local10.space;
local11.commandSender.sendCommand(local9);
this.protocolBuffer.optionalMap.clear();
}
public function secondaryHide(param1:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._secondaryHide_clientTimeCodec.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._secondaryHideId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function secondaryOpen(param1:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._secondaryOpen_clientTimeCodec.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._secondaryOpenId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.gui.shop.payment.promo {
import flash.events.Event;
public class SendPromoCodeEvent extends Event {
public static var SEND_PROMO_CODE:String = "SendPromoCodeEvent";
private var promoCode:String;
public function SendPromoCodeEvent(param1:String) {
this.promoCode = param1;
super(SEND_PROMO_CODE);
}
public function getPromoCode() : String {
return this.promoCode;
}
}
}
|
package alternativa.tanks.view.mainview.grouplist.item.background {
import alternativa.tanks.view.mainview.grouplist.header.GroupHeader;
import controls.cellrenderer.ButtonState;
import flash.display.Sprite;
public class GroupListBackgroundRenderer extends Sprite {
private static const GAP:int = 2;
private var backgrounds:Vector.<ButtonState>;
private var sumParts:int = 0;
public function GroupListBackgroundRenderer(param1:Class) {
var local3:ButtonState = null;
this.backgrounds = new Vector.<ButtonState>();
super();
var local2:int = 0;
while(local2 < GroupHeader.HEADER_INFOS.length) {
local3 = ButtonState(new param1());
this.backgrounds.push(local3);
addChild(local3);
this.sumParts += GroupHeader.HEADER_INFOS[local2].getPartOfHeader();
local2++;
}
this.resize();
}
private function resize() : void {
var local3:ButtonState = null;
var local4:int = 0;
var local1:int = 0;
var local2:int = 0;
while(local2 < GroupHeader.HEADER_INFOS.length) {
local3 = this.backgrounds[local2];
local3.x = local1;
local4 = width * GroupHeader.HEADER_INFOS[local2].getPartOfHeader() / this.sumParts;
local3.width = local4 - GAP;
local1 += local4;
local2++;
}
}
override public function set width(param1:Number) : void {
super.width = param1;
this.resize();
}
}
}
|
package alternativa.tanks.models.statistics {
import alternativa.tanks.models.battle.gui.statistics.ShortUserInfo;
import alternativa.types.Long;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
[ModelInterface]
public interface IStatisticsModel {
function getBattleName() : String;
function userConnect(param1:ShortUserInfo) : void;
function userDisconnect(param1:ShortUserInfo) : void;
function updateUserKills(param1:Long, param2:int) : void;
function changeTeamScore(param1:BattleTeam, param2:int) : void;
function turnOnTimerToRestoreBalance(param1:int) : void;
function turnOffTimerToRestoreBalance() : void;
function notifyAboutTraining(param1:int) : void;
function notifyAboutBattle(param1:int) : void;
function getTimeLeftInSec() : int;
}
}
|
package alternativa.tanks.models.weapon.thunder
{
public class ThunderData
{
public var maxSplashDamageRadius:Number = 0;
public var minSplashDamageRadius:Number = 0;
public var minSplashDamagePercent:Number = 0;
public var impactForce:Number = 0;
public function ThunderData(maxSplashDamageRadius:Number, minSplashDamageRadius:Number, minSplashDamagePercent:Number, impactForce:Number)
{
super();
this.maxSplashDamageRadius = maxSplashDamageRadius;
this.minSplashDamageRadius = minSplashDamageRadius;
this.minSplashDamagePercent = minSplashDamagePercent;
this.impactForce = impactForce;
}
}
}
|
package projects.tanks.client.commons.models.alert {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class AlertModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:AlertModelServer;
private var client:IAlertModelBase = IAlertModelBase(this);
private var modelId:Long = Long.getLong(2058573415,-746879275);
private var _showId:Long = Long.getLong(888592950,-646476035);
private var _show_textCodec:ICodec;
public function AlertModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new AlertModelServer(IModel(this));
this._show_textCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._showId:
this.client.show(String(this._show_textCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package _codec.projects.tanks.client.panel.model.shop.kitpackage {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.shop.kitpackage.KitPackageCC;
public class VectorCodecKitPackageCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecKitPackageCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(KitPackageCC,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.<KitPackageCC> = new Vector.<KitPackageCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = KitPackageCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:KitPackageCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<KitPackageCC> = Vector.<KitPackageCC>(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.proplib.types
{
import alternativa.proplib.objects.PropObject;
public class PropState
{
public static const DEFAULT_NAME:String = "default";
private var _lods:Vector.<PropLOD>;
public function PropState()
{
this._lods = new Vector.<PropLOD>();
super();
}
public function addLOD(prop:PropObject, distance:Number) : void
{
this._lods.push(new PropLOD(prop,distance));
}
public function get numLODs() : int
{
return this._lods.length;
}
public function lodByIndex(index:int) : PropLOD
{
return this._lods[index];
}
public function getDefaultObject() : PropObject
{
if(this._lods.length == 0)
{
throw new Error("No LODs found");
}
return PropLOD(this._lods[0]).prop;
}
public function traceState() : void
{
var lod:PropLOD = null;
for each(lod in this._lods)
{
lod.traceLOD();
}
}
}
}
|
package alternativa.tanks.controllers.battlelist {
import flash.events.Event;
import platform.client.fp10.core.type.IGameObject;
public class BattleSelectedEvent extends Event {
public static const BATTLE_SELECTED:String = "BattleListControllerEvent.BATTLE_SELECTED";
public var selectedItem:IGameObject;
public function BattleSelectedEvent(param1:String, param2:IGameObject) {
super(param1);
this.selectedItem = param2;
}
}
}
|
package alternativa.tanks.model.payment.modes.terminal {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.TerminalForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.CrystalsOnlyPaymentMode;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.panel.model.payment.modes.terminal.ITerminalPaymentModelBase;
import projects.tanks.client.panel.model.payment.modes.terminal.TerminalPaymentModelBase;
[ModelInfo]
public class TerminalPaymentModel extends TerminalPaymentModelBase implements ITerminalPaymentModelBase, PayModeView, CrystalsOnlyPaymentMode, ObjectLoadListener, ObjectUnloadListener, TerminalPayMode {
public function TerminalPaymentModel() {
super();
}
public function getView() : PayModeForm {
return TerminalForm(getData(TerminalForm));
}
public function objectLoaded() : void {
var local1:TerminalForm = new TerminalForm(object,getInitParam());
putData(TerminalForm,local1);
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(TerminalForm);
}
}
}
|
package alternativa.tanks.controller.events.logging {
import flash.events.Event;
import projects.tanks.client.entrance.model.entrance.logging.RegistrationUXScreen;
public class RegistrationUXNavigationStartEvent extends Event {
public static const NAVIGATION_START:String = "RegistrationUXNavigationStartEvent";
private var _screen:RegistrationUXScreen;
public function RegistrationUXNavigationStartEvent(param1:RegistrationUXScreen) {
this._screen = param1;
super(NAVIGATION_START);
}
public function get screen() : RegistrationUXScreen {
return this._screen;
}
}
}
|
package _codec.projects.tanks.client.battlefield.types {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.types.Vector3d;
public class VectorCodecVector3dLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecVector3dLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(Vector3d,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.<Vector3d> = new Vector.<Vector3d>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = Vector3d(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:Vector3d = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<Vector3d> = Vector.<Vector3d>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.sfx
{
import alternativa.math.Vector3;
public interface ISound3DEffect extends ISpecialEffect
{
function set enabled(param1:Boolean) : void;
function readPosition(param1:Vector3) : void;
function get numSounds() : int;
}
}
|
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.gun
{
public interface IGunModelBase
{
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.kits.description.panel {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.shop.shopitems.item.kits.description.panel.KitPackageDescriptionPanelBitmaps_bitmapTopLine.png")]
public class KitPackageDescriptionPanelBitmaps_bitmapTopLine extends BitmapAsset {
public function KitPackageDescriptionPanelBitmaps_bitmapTopLine() {
super();
}
}
}
|
package alternativa.tanks.view {
import alternativa.tanks.controller.events.InviteCheckResultEvent;
import alternativa.tanks.controller.events.InviteCodeEnteredEvent;
import alternativa.tanks.view.events.InviteFormOkButtonEvent;
import alternativa.tanks.view.forms.InviteForm;
import org.robotlegs.mvcs.Mediator;
public class InviteFormMediator extends Mediator {
[Inject]
public var view:InviteForm;
public function InviteFormMediator() {
super();
}
override public function onRegister() : void {
addViewListener(InviteFormOkButtonEvent.OK_BUTTON_CLICKED,this.onInviteEntered,InviteFormOkButtonEvent);
addContextListener(InviteCheckResultEvent.INVITE_CODE_DOES_NOT_EXIST,this.onWrongInviteCode,InviteCheckResultEvent);
}
private function onWrongInviteCode(param1:InviteCheckResultEvent) : void {
this.view.showInviteError();
}
private function onInviteEntered(param1:InviteFormOkButtonEvent) : void {
dispatch(new InviteCodeEnteredEvent(this.view.code));
}
}
}
|
package alternativa.engine3d.lights {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Debug;
import alternativa.engine3d.core.Light3D;
import alternativa.engine3d.core.Object3D;
import flash.display.Sprite;
use namespace alternativa3d;
public class DirectionalLight extends Light3D {
public function DirectionalLight(param1:uint) {
super();
this.color = param1;
calculateBounds();
}
public function lookAt(param1:Number, param2:Number, param3:Number) : void {
var local4:Number = 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:DirectionalLight = new DirectionalLight(color);
local1.clonePropertiesFrom(this);
return local1;
}
override alternativa3d function drawDebug(param1:Camera3D) : void {
var local3:Sprite = null;
var local4:Number = NaN;
var local5:Number = NaN;
var local6:Number = NaN;
var local7:int = 0;
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: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 local57:Number = NaN;
var local58:Number = NaN;
var local59:Number = NaN;
var local60:Number = NaN;
var local61:Number = NaN;
var local62:Number = NaN;
var local63:Number = NaN;
var local64:Number = NaN;
var local2:int = int(param1.alternativa3d::checkInDebug(this));
if(local2 > 0) {
local3 = param1.view.alternativa3d::canvas;
if(Boolean(local2 & Debug.LIGHTS) && alternativa3d::ml > param1.nearClipping) {
local4 = (color >> 16 & 0xFF) * intensity;
local5 = (color >> 8 & 0xFF) * intensity;
local6 = (color & 0xFF) * intensity;
local7 = ((local4 > 255 ? 255 : local4) << 16) + ((local5 > 255 ? 255 : local5) << 8) + (local6 > 255 ? 255 : local6);
local8 = alternativa3d::md * param1.alternativa3d::viewSizeX / param1.alternativa3d::focalLength;
local9 = alternativa3d::mh * param1.alternativa3d::viewSizeY / param1.alternativa3d::focalLength;
local10 = Number(alternativa3d::ml);
local11 = alternativa3d::mc * param1.alternativa3d::viewSizeX / param1.alternativa3d::focalLength;
local12 = alternativa3d::mg * param1.alternativa3d::viewSizeY / param1.alternativa3d::focalLength;
local13 = Number(alternativa3d::mk);
local14 = Math.sqrt(local11 * local11 + local12 * local12 + local13 * local13);
local11 /= local14;
local12 /= local14;
local13 /= local14;
local15 = alternativa3d::ma * param1.alternativa3d::viewSizeX / param1.alternativa3d::focalLength;
local16 = alternativa3d::me * param1.alternativa3d::viewSizeY / param1.alternativa3d::focalLength;
local17 = Number(alternativa3d::mi);
local18 = local17 * local12 - local16 * local13;
local19 = local15 * local13 - local17 * local11;
local20 = local16 * local11 - local15 * local12;
local14 = Math.sqrt(local18 * local18 + local19 * local19 + local20 * local20);
local18 /= local14;
local19 /= local14;
local20 /= local14;
local15 = alternativa3d::mb * param1.alternativa3d::viewSizeX / param1.alternativa3d::focalLength;
local16 = alternativa3d::mf * param1.alternativa3d::viewSizeY / param1.alternativa3d::focalLength;
local17 = Number(alternativa3d::mj);
local15 = local20 * local12 - local19 * local13;
local16 = local18 * local13 - local20 * local11;
local17 = local19 * local11 - local18 * local12;
local21 = alternativa3d::ml / param1.alternativa3d::focalLength;
local11 *= local21;
local12 *= local21;
local13 *= local21;
local15 *= local21;
local16 *= local21;
local17 *= local21;
local18 *= local21;
local19 *= local21;
local20 *= local21;
local22 = 16;
local23 = 24;
local24 = 4;
local25 = 8;
local26 = local8 + local11 * local23;
local27 = local9 + local12 * local23;
local28 = local10 + local13 * local23;
local29 = local8 + local15 * local24 + local18 * local24;
local30 = local9 + local16 * local24 + local19 * local24;
local31 = local10 + local17 * local24 + local20 * local24;
local32 = local8 - local15 * local24 + local18 * local24;
local33 = local9 - local16 * local24 + local19 * local24;
local34 = local10 - local17 * local24 + local20 * local24;
local35 = local8 - local15 * local24 - local18 * local24;
local36 = local9 - local16 * local24 - local19 * local24;
local37 = local10 - local17 * local24 - local20 * local24;
local38 = local8 + local15 * local24 - local18 * local24;
local39 = local9 + local16 * local24 - local19 * local24;
local40 = local10 + local17 * local24 - local20 * local24;
local41 = local8 + local11 * local22 + local15 * local24 + local18 * local24;
local42 = local9 + local12 * local22 + local16 * local24 + local19 * local24;
local43 = local10 + local13 * local22 + local17 * local24 + local20 * local24;
local44 = local8 + local11 * local22 - local15 * local24 + local18 * local24;
local45 = local9 + local12 * local22 - local16 * local24 + local19 * local24;
local46 = local10 + local13 * local22 - local17 * local24 + local20 * local24;
local47 = local8 + local11 * local22 - local15 * local24 - local18 * local24;
local48 = local9 + local12 * local22 - local16 * local24 - local19 * local24;
local49 = local10 + local13 * local22 - local17 * local24 - local20 * local24;
local50 = local8 + local11 * local22 + local15 * local24 - local18 * local24;
local51 = local9 + local12 * local22 + local16 * local24 - local19 * local24;
local52 = local10 + local13 * local22 + local17 * local24 - local20 * local24;
local53 = local8 + local11 * local22 + local15 * local25 + local18 * local25;
local54 = local9 + local12 * local22 + local16 * local25 + local19 * local25;
local55 = local10 + local13 * local22 + local17 * local25 + local20 * local25;
local56 = local8 + local11 * local22 - local15 * local25 + local18 * local25;
local57 = local9 + local12 * local22 - local16 * local25 + local19 * local25;
local58 = local10 + local13 * local22 - local17 * local25 + local20 * local25;
local59 = local8 + local11 * local22 - local15 * local25 - local18 * local25;
local60 = local9 + local12 * local22 - local16 * local25 - local19 * local25;
local61 = local10 + local13 * local22 - local17 * local25 - local20 * local25;
local62 = local8 + local11 * local22 + local15 * local25 - local18 * local25;
local63 = local9 + local12 * local22 + local16 * local25 - local19 * local25;
local64 = local10 + local13 * local22 + local17 * local25 - local20 * local25;
if(local28 > param1.nearClipping && local31 > param1.nearClipping && local34 > param1.nearClipping && local37 > param1.nearClipping && local40 > param1.nearClipping && local43 > param1.nearClipping && local46 > param1.nearClipping && local49 > param1.nearClipping && local52 > param1.nearClipping && local55 > param1.nearClipping && local58 > param1.nearClipping && local61 > param1.nearClipping && local64 > param1.nearClipping) {
local3.graphics.lineStyle(1,local7);
local3.graphics.moveTo(local29 * param1.alternativa3d::focalLength / local31,local30 * param1.alternativa3d::focalLength / local31);
local3.graphics.lineTo(local32 * param1.alternativa3d::focalLength / local34,local33 * param1.alternativa3d::focalLength / local34);
local3.graphics.lineTo(local35 * param1.alternativa3d::focalLength / local37,local36 * param1.alternativa3d::focalLength / local37);
local3.graphics.lineTo(local38 * param1.alternativa3d::focalLength / local40,local39 * param1.alternativa3d::focalLength / local40);
local3.graphics.lineTo(local29 * param1.alternativa3d::focalLength / local31,local30 * param1.alternativa3d::focalLength / local31);
local3.graphics.moveTo(local41 * param1.alternativa3d::focalLength / local43,local42 * param1.alternativa3d::focalLength / local43);
local3.graphics.lineTo(local44 * param1.alternativa3d::focalLength / local46,local45 * param1.alternativa3d::focalLength / local46);
local3.graphics.lineTo(local47 * param1.alternativa3d::focalLength / local49,local48 * param1.alternativa3d::focalLength / local49);
local3.graphics.lineTo(local50 * param1.alternativa3d::focalLength / local52,local51 * param1.alternativa3d::focalLength / local52);
local3.graphics.lineTo(local41 * param1.alternativa3d::focalLength / local43,local42 * param1.alternativa3d::focalLength / local43);
local3.graphics.moveTo(local53 * param1.alternativa3d::focalLength / local55,local54 * param1.alternativa3d::focalLength / local55);
local3.graphics.lineTo(local56 * param1.alternativa3d::focalLength / local58,local57 * param1.alternativa3d::focalLength / local58);
local3.graphics.lineTo(local59 * param1.alternativa3d::focalLength / local61,local60 * param1.alternativa3d::focalLength / local61);
local3.graphics.lineTo(local62 * param1.alternativa3d::focalLength / local64,local63 * param1.alternativa3d::focalLength / local64);
local3.graphics.lineTo(local53 * param1.alternativa3d::focalLength / local55,local54 * param1.alternativa3d::focalLength / local55);
local3.graphics.moveTo(local26 * param1.alternativa3d::focalLength / local28,local27 * param1.alternativa3d::focalLength / local28);
local3.graphics.lineTo(local53 * param1.alternativa3d::focalLength / local55,local54 * param1.alternativa3d::focalLength / local55);
local3.graphics.moveTo(local26 * param1.alternativa3d::focalLength / local28,local27 * param1.alternativa3d::focalLength / local28);
local3.graphics.lineTo(local56 * param1.alternativa3d::focalLength / local58,local57 * param1.alternativa3d::focalLength / local58);
local3.graphics.moveTo(local26 * param1.alternativa3d::focalLength / local28,local27 * param1.alternativa3d::focalLength / local28);
local3.graphics.lineTo(local59 * param1.alternativa3d::focalLength / local61,local60 * param1.alternativa3d::focalLength / local61);
local3.graphics.moveTo(local26 * param1.alternativa3d::focalLength / local28,local27 * param1.alternativa3d::focalLength / local28);
local3.graphics.lineTo(local62 * param1.alternativa3d::focalLength / local64,local63 * param1.alternativa3d::focalLength / local64);
local3.graphics.moveTo(local29 * param1.alternativa3d::focalLength / local31,local30 * param1.alternativa3d::focalLength / local31);
local3.graphics.lineTo(local41 * param1.alternativa3d::focalLength / local43,local42 * param1.alternativa3d::focalLength / local43);
local3.graphics.moveTo(local32 * param1.alternativa3d::focalLength / local34,local33 * param1.alternativa3d::focalLength / local34);
local3.graphics.lineTo(local44 * param1.alternativa3d::focalLength / local46,local45 * param1.alternativa3d::focalLength / local46);
local3.graphics.moveTo(local35 * param1.alternativa3d::focalLength / local37,local36 * param1.alternativa3d::focalLength / local37);
local3.graphics.lineTo(local47 * param1.alternativa3d::focalLength / local49,local48 * param1.alternativa3d::focalLength / local49);
local3.graphics.moveTo(local38 * param1.alternativa3d::focalLength / local40,local39 * param1.alternativa3d::focalLength / local40);
local3.graphics.lineTo(local50 * param1.alternativa3d::focalLength / local52,local51 * param1.alternativa3d::focalLength / local52);
}
}
if(Boolean(local2 & Debug.BOUNDS)) {
Debug.alternativa3d::drawBounds(param1,this,boundMinX,boundMinY,boundMinZ,boundMaxX,boundMaxY,boundMaxZ,10092288);
}
}
}
}
}
|
package forms.buttons
{
import controls.Label;
import controls.panel.BaseButton;
import flash.display.Bitmap;
import flash.events.MouseEvent;
import flash.text.TextFieldAutoSize;
public class MainPanelWideButton extends BaseButton
{
private static const LABEL_POSITION_Y:int = 4;
private var _icon:Bitmap;
private var _buttonOverBitmap:Bitmap;
private var _buttonNormalBitmap:Bitmap;
private var _labelBase:Label;
private var _x:int;
private var _y:int;
protected var previousY:int;
public var savelLabel:String;
public function MainPanelWideButton(param1:Bitmap, param2:int, param3:int, param4:Bitmap, param5:Bitmap)
{
this._icon = param1;
this._buttonNormalBitmap = param5;
this._buttonOverBitmap = param4;
this._x = param2;
this._y = param3;
super();
super.type = 1;
this.createLabel();
}
private function createLabel() : void
{
this._labelBase = new Label();
this._labelBase.x = 18;
this._labelBase.y = LABEL_POSITION_Y;
this._labelBase.width = this.width - 18;
this._labelBase.autoSize = TextFieldAutoSize.CENTER;
this._labelBase.mouseEnabled = false;
addChild(this._labelBase);
}
override protected function configUI() : void
{
addChild(this._buttonNormalBitmap);
addChild(this._buttonOverBitmap);
this._buttonOverBitmap.visible = false;
this._icon.x = this._x;
this._icon.y = this._y;
addChild(this._icon);
}
override protected function addListeners() : void
{
buttonMode = true;
mouseEnabled = true;
mouseChildren = true;
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent);
}
override protected function removeListeners() : void
{
buttonMode = false;
mouseEnabled = false;
mouseChildren = false;
removeEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent);
}
override protected function onMouseEvent(param1:MouseEvent) : void
{
switch(param1.type)
{
case MouseEvent.MOUSE_OVER:
this.previousY = y;
this._buttonOverBitmap.visible = true;
break;
case MouseEvent.MOUSE_OUT:
y = this.previousY;
this._buttonOverBitmap.visible = false;
break;
case MouseEvent.MOUSE_DOWN:
y = this.previousY + 1;
this._buttonOverBitmap.visible = false;
break;
case MouseEvent.MOUSE_UP:
y = this.previousY;
this._buttonOverBitmap.visible = false;
}
}
override public function set label(param1:String) : void
{
this._labelBase.htmlText = param1;
this.savelLabel = param1;
}
}
}
|
package alternativa.gfx {
public namespace alternativagfx = "http://alternativaplatform.com/en/alternativagfx";
}
|
package alternativa.tanks.models.weapon.rotation {
[ModelInterface]
public interface WeaponRotationLimit {
function getMaxAngle() : Number;
function getMinAngle() : Number;
}
}
|
package alternativa.engine3d.core {
import alternativa.engine3d.alternativa3d;
use namespace alternativa3d;
public class Wrapper {
alternativa3d static var collector:Wrapper;
alternativa3d var next:Wrapper;
alternativa3d var vertex:Vertex;
public function Wrapper() {
super();
}
alternativa3d static function create() : Wrapper {
var local1:Wrapper = null;
if(alternativa3d::collector != null) {
local1 = alternativa3d::collector;
alternativa3d::collector = alternativa3d::collector.alternativa3d::next;
local1.alternativa3d::next = null;
return local1;
}
return new Wrapper();
}
alternativa3d function create() : Wrapper {
var local1:Wrapper = null;
if(alternativa3d::collector != null) {
local1 = alternativa3d::collector;
alternativa3d::collector = alternativa3d::collector.alternativa3d::next;
local1.alternativa3d::next = null;
return local1;
}
return new Wrapper();
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.messages {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.messages.ActionOutputLine_playerSelfDestroyIcon.png")]
public class ActionOutputLine_playerSelfDestroyIcon extends BitmapAsset {
public function ActionOutputLine_playerSelfDestroyIcon() {
super();
}
}
}
|
package projects.tanks.client.battleselect.model.matchmaking.modes {
import projects.tanks.client.battleselect.model.matchmaking.queue.MatchmakingMode;
public class MatchmakingModeRank {
private var _matchmakingMode:MatchmakingMode;
private var _rank:int;
public function MatchmakingModeRank(param1:MatchmakingMode = null, param2:int = 0) {
super();
this._matchmakingMode = param1;
this._rank = param2;
}
public function get matchmakingMode() : MatchmakingMode {
return this._matchmakingMode;
}
public function set matchmakingMode(param1:MatchmakingMode) : void {
this._matchmakingMode = param1;
}
public function get rank() : int {
return this._rank;
}
public function set rank(param1:int) : void {
this._rank = param1;
}
public function toString() : String {
var local1:String = "MatchmakingModeRank [";
local1 += "matchmakingMode = " + this.matchmakingMode + " ";
local1 += "rank = " + this.rank + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_backgroundIconClass.png")]
public class DeviceIcons_backgroundIconClass extends BitmapAsset {
public function DeviceIcons_backgroundIconClass() {
super();
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank19.png")]
public class DefaultRanksBitmaps_bitmapBigRank19 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapBigRank19() {
super();
}
}
}
|
package alternativa.tanks.config
{
import alternativa.proplib.PropLibRegistry;
import alternativa.utils.TaskSequence;
import flash.events.Event;
public class PropLibsLoader extends ResourceLoader
{
private var libRegistry:PropLibRegistry;
private var sequence:TaskSequence;
public function PropLibsLoader(config:Config)
{
this.libRegistry = new PropLibRegistry();
super("Props library loader",config);
}
override public function run() : void
{
var lib:Object = null;
var libPath:Object = null;
this.sequence = new TaskSequence();
var jsonParser:Object = JSON.parse(config.json);
for each(lib in jsonParser.items)
{
if(lib.name == config.map.mapId + ".xml")
{
for each(libPath in lib.libs)
{
this.sequence.addTask(new PropLibLoadingTask(libPath as String,this.libRegistry));
trace("load lib: " + libPath);
}
}
}
this.sequence.addEventListener(Event.COMPLETE,this.onProplobsLoadingComplete);
this.sequence.run();
}
private function onProplobsLoadingComplete(e:Event) : void
{
this.sequence = null;
config.propLibRegistry = this.libRegistry;
completeTask();
}
}
}
import alternativa.proplib.PropLibRegistry;
import alternativa.proplib.PropLibrary;
import alternativa.utils.TARAParser;
import alternativa.utils.Task;
import flash.events.Event;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import scpacker.resource.cache.CacheURLLoader;
import specter.utils.Logger;
class PropLibLoadingTask extends Task
{
private var url:String;
private var libRegistry:PropLibRegistry;
private var loader:CacheURLLoader;
function PropLibLoadingTask(url:String, libRegistry:PropLibRegistry)
{
super();
this.url = url;
this.libRegistry = libRegistry;
}
override public function run() : void
{
this.loader = new CacheURLLoader();
this.loader.dataFormat = URLLoaderDataFormat.BINARY;
this.loader.addEventListener(Event.COMPLETE,this.onLoadingComplete);
this.loader.load(new URLRequest(this.url));
}
private function onLoadingComplete(event:Event) : void
{
var propLibrary:PropLibrary = new PropLibrary(TARAParser.parse(this.loader.data));
this.libRegistry.addLibrary(propLibrary);
completeTask();
Logger.log("Loaded prop: " + this.url);
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_corrosivemixIconClass.png")]
public class DeviceIcons_corrosivemixIconClass extends BitmapAsset {
public function DeviceIcons_corrosivemixIconClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete {
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.types.Vector3d;
public interface IDiscreteWeaponCommunicationModelBase {
function shoot(param1:IGameObject, param2:Vector3d, param3:Vector.<TargetHit>) : void;
}
}
|
package projects.tanks.client.garage.models.item.properties {
public interface IItemPropertiesModelBase {
}
}
|
package _codec.projects.tanks.client.commons.socialnetwork {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import projects.tanks.client.commons.socialnetwork.SocialNetworkEnum;
public class VectorCodecSocialNetworkEnumLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecSocialNetworkEnumLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(SocialNetworkEnum,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.<SocialNetworkEnum> = new Vector.<SocialNetworkEnum>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = SocialNetworkEnum(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:SocialNetworkEnum = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<SocialNetworkEnum> = Vector.<SocialNetworkEnum>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.models.battle.ctf {
public class FlagActionMessages {
public var positive:FlagMessage;
public var negative:FlagMessage;
public function FlagActionMessages(param1:FlagMessage, param2:FlagMessage) {
super();
this.positive = param1;
this.negative = param2;
}
}
}
|
package _codec.projects.tanks.client.garage.models.item.relativeproperties {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import projects.tanks.client.garage.models.item.relativeproperties.RelativeProperties;
public class VectorCodecRelativePropertiesLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecRelativePropertiesLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(RelativeProperties,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.<RelativeProperties> = new Vector.<RelativeProperties>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = RelativeProperties(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:RelativeProperties = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<RelativeProperties> = Vector.<RelativeProperties>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package projects.tanks.client.battlefield.models.battle.battlefield.debug {
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.Float;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import projects.tanks.client.battlefield.types.Vector3d;
public class BattleDebugModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:BattleDebugModelServer;
private var client:IBattleDebugModelBase = IBattleDebugModelBase(this);
private var modelId:Long = Long.getLong(779331045,19368635);
private var _addFrameId:Long = Long.getLong(964810564,576305510);
private var _addFrame_sizeCodec:ICodec;
private var _addFrame_colorCodec:ICodec;
private var _addFrame_debugFrameCodec:ICodec;
private var _addFrame_timeoutCodec:ICodec;
private var _addGizmoId:Long = Long.getLong(964810564,576984947);
private var _addGizmo_sizeCodec:ICodec;
private var _addGizmo_colorCodec:ICodec;
private var _addGizmo_pointCodec:ICodec;
private var _addGizmo_directionCodec:ICodec;
private var _addGizmo_timeoutCodec:ICodec;
private var _addMarkerId:Long = Long.getLong(155643583,-870810465);
private var _addMarker_sizeCodec:ICodec;
private var _addMarker_colorCodec:ICodec;
private var _addMarker_pointCodec:ICodec;
private var _addMarker_timeoutCodec:ICodec;
public function BattleDebugModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new BattleDebugModelServer(IModel(this));
this._addFrame_sizeCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._addFrame_colorCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._addFrame_debugFrameCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Vector3d,false),false,1));
this._addFrame_timeoutCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._addGizmo_sizeCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._addGizmo_colorCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._addGizmo_pointCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._addGizmo_directionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._addGizmo_timeoutCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._addMarker_sizeCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._addMarker_colorCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._addMarker_pointCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._addMarker_timeoutCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._addFrameId:
this.client.addFrame(Number(this._addFrame_sizeCodec.decode(param2)),int(this._addFrame_colorCodec.decode(param2)),this._addFrame_debugFrameCodec.decode(param2) as Vector.<Vector3d>,int(this._addFrame_timeoutCodec.decode(param2)));
break;
case this._addGizmoId:
this.client.addGizmo(Number(this._addGizmo_sizeCodec.decode(param2)),int(this._addGizmo_colorCodec.decode(param2)),Vector3d(this._addGizmo_pointCodec.decode(param2)),Vector3d(this._addGizmo_directionCodec.decode(param2)),int(this._addGizmo_timeoutCodec.decode(param2)));
break;
case this._addMarkerId:
this.client.addMarker(Number(this._addMarker_sizeCodec.decode(param2)),int(this._addMarker_colorCodec.decode(param2)),Vector3d(this._addMarker_pointCodec.decode(param2)),int(this._addMarker_timeoutCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.pointbased.rugby.explosion {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.battle.pointbased.rugby.explosion.BallExplosionCC;
public class VectorCodecBallExplosionCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecBallExplosionCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(BallExplosionCC,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.<BallExplosionCC> = new Vector.<BallExplosionCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = BallExplosionCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:BallExplosionCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<BallExplosionCC> = Vector.<BallExplosionCC>(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.collision
{
import alternativa.math.Vector3;
import alternativa.physics.Contact;
import alternativa.physics.collision.types.RayIntersection;
public interface ICollisionDetector
{
function getAllContacts(param1:Contact) : Contact;
function intersectRay(param1:Vector3, param2:Vector3, param3:int, param4:Number, param5:IRayCollisionPredicate, param6:RayIntersection) : Boolean;
function intersectRayWithStatic(param1:Vector3, param2:Vector3, param3:int, param4:Number, param5:IRayCollisionPredicate, param6:RayIntersection) : Boolean;
function getContact(param1:CollisionPrimitive, param2:CollisionPrimitive, param3:Contact) : Boolean;
function testCollision(param1:CollisionPrimitive, param2:CollisionPrimitive) : Boolean;
function destroy() : void;
}
}
|
package alternativa.tanks.model.garage.resistance {
import projects.tanks.client.commons.types.ItemGarageProperty;
import projects.tanks.client.panel.model.garage.resistance.IResistancesListModelBase;
import projects.tanks.client.panel.model.garage.resistance.ResistancesListModelBase;
[ModelInfo]
public class ResistancesListModel extends ResistancesListModelBase implements IResistancesListModelBase, ModuleResistances {
public function ResistancesListModel() {
super();
}
public function getResistances() : Vector.<ItemGarageProperty> {
return getInitParam().resistances;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.ultimate.effects.mammoth {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.ultimate.effects.mammoth.MammothUltimateCC;
public class VectorCodecMammothUltimateCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecMammothUltimateCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(MammothUltimateCC,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.<MammothUltimateCC> = new Vector.<MammothUltimateCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = MammothUltimateCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:MammothUltimateCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<MammothUltimateCC> = Vector.<MammothUltimateCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.models.dom.sfx
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class AllBeamProperties_blueRayTip extends BitmapAsset
{
public function AllBeamProperties_blueRayTip()
{
super();
}
}
}
|
package _codec.projects.tanks.client.panel.model.challenge.stars {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.challenge.stars.StarsInfoCC;
public class CodecStarsInfoCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_stars:ICodec;
public function CodecStarsInfoCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_stars = param1.getCodec(new TypeCodecInfo(int,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:StarsInfoCC = new StarsInfoCC();
local2.stars = this.codec_stars.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:StarsInfoCC = StarsInfoCC(param2);
this.codec_stars.encode(param1,local3.stars);
}
}
}
|
package controls.buttons.h30px {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.buttons.h30px.OrangeMediumButtonSkin_leftDownClass.png")]
public class OrangeMediumButtonSkin_leftDownClass extends BitmapAsset {
public function OrangeMediumButtonSkin_leftDownClass() {
super();
}
}
}
|
package alternativa.tanks.model.antiaddiction {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IAntiAddictionAlertEvents implements IAntiAddictionAlert {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IAntiAddictionAlertEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function setIdNumberAndRealName(param1:String, param2:String) : void {
var i:int = 0;
var m:IAntiAddictionAlert = null;
var realName:String = param1;
var idNumber:String = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IAntiAddictionAlert(this.impl[i]);
m.setIdNumberAndRealName(realName,idNumber);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.utils
{
public class BitMask
{
private var mask:int;
public function BitMask(mask:int)
{
super();
this.mask = mask;
}
public function setBits(bits:int) : void
{
this.mask |= bits;
}
public function clearBits(bits:int) : void
{
this.mask &= ~bits;
}
public function setBit(bitIndex:int) : void
{
this.setBits(1 << bitIndex);
}
public function clearBit(bitIndex:int) : void
{
this.clearBits(1 << bitIndex);
}
public function getBitValue(bitIndex:int) : int
{
return 1 & this.mask >> bitIndex;
}
public function clear() : void
{
this.mask = 0;
}
public function isEmpty() : Boolean
{
return this.mask == 0;
}
public function hasAnyBit(bits:int) : Boolean
{
return (this.mask & bits) != 0;
}
public function change(mask:int, setMask:Boolean) : void
{
if(setMask)
{
this.setBits(mask);
}
else
{
this.clearBits(mask);
}
}
}
}
|
package com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.healing
{
import scpacker.Base;
public class HealingGunModelBase extends Base
{
public function HealingGunModelBase()
{
super();
}
}
}
|
package alternativa.tanks.models.tank.engine {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.engine.EngineCC;
public class EngineAdapt implements Engine {
private var object:IGameObject;
private var impl:Engine;
public function EngineAdapt(param1:IGameObject, param2:Engine) {
super();
this.object = param1;
this.impl = param2;
}
public function getCC() : EngineCC {
var result:EngineCC = null;
try {
Model.object = this.object;
result = this.impl.getCC();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.view.battleinfo.renderer {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battleinfo.renderer.CellBlue_cellFullRight.png")]
public class CellBlue_cellFullRight extends BitmapAsset {
public function CellBlue_cellFullRight() {
super();
}
}
}
|
package projects.tanks.client.clans.clan.permissions {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.EnumCodecInfo;
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 ClanPermissionsModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _setPermissionForUserId:Long = Long.getLong(447793233,-26752538);
private var _setPermissionForUser_userIdCodec:ICodec;
private var _setPermissionForUser_permissionCodec:ICodec;
private var model:IModel;
public function ClanPermissionsModelServer(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._setPermissionForUser_userIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
this._setPermissionForUser_permissionCodec = this.protocol.getCodec(new EnumCodecInfo(ClanPermission,false));
}
public function setPermissionForUser(param1:Long, param2:ClanPermission) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._setPermissionForUser_userIdCodec.encode(this.protocolBuffer,param1);
this._setPermissionForUser_permissionCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._setPermissionForUserId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.battlefield.meteors {
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.battle.battlefield.meteors.MeteorDescriptor;
import projects.tanks.client.battlefield.types.Vector3d;
public class CodecMeteorDescriptor implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_groundPosition:ICodec;
private var codec_lifeTimeMs:ICodec;
private var codec_timeToFlyMs:ICodec;
private var codec_upperPosition:ICodec;
public function CodecMeteorDescriptor() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_groundPosition = param1.getCodec(new TypeCodecInfo(Vector3d,false));
this.codec_lifeTimeMs = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_timeToFlyMs = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_upperPosition = param1.getCodec(new TypeCodecInfo(Vector3d,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:MeteorDescriptor = new MeteorDescriptor();
local2.groundPosition = this.codec_groundPosition.decode(param1) as Vector3d;
local2.lifeTimeMs = this.codec_lifeTimeMs.decode(param1) as int;
local2.timeToFlyMs = this.codec_timeToFlyMs.decode(param1) as int;
local2.upperPosition = this.codec_upperPosition.decode(param1) as Vector3d;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:MeteorDescriptor = MeteorDescriptor(param2);
this.codec_groundPosition.encode(param1,local3.groundPosition);
this.codec_lifeTimeMs.encode(param1,local3.lifeTimeMs);
this.codec_timeToFlyMs.encode(param1,local3.timeToFlyMs);
this.codec_upperPosition.encode(param1,local3.upperPosition);
}
}
}
|
package forms.contextmenu {
import flash.display.Bitmap;
import flash.display.BitmapData;
public class BattleInviteContextMenuLabel extends ContextMenuLabel {
private static var battleInviteClass:Class = BattleInviteContextMenuLabel_battleInviteClass;
public static var battleInviteBitmapData:BitmapData = Bitmap(new battleInviteClass()).bitmapData;
private var _icon:Bitmap;
public function BattleInviteContextMenuLabel() {
super();
}
override protected function init() : void {
this._icon = new Bitmap(battleInviteBitmapData);
addChild(this._icon);
this._icon.y = 4;
super.init();
}
override public function set locked(param1:Boolean) : void {
super.locked = param1;
this.alignIcon();
}
private function alignIcon() : void {
if(locked) {
this._icon.x = 0;
this._icon.visible = false;
} else {
this._icon.x = _label.width + 4;
this._icon.visible = true;
}
}
override public function get width() : Number {
var local1:Number = NaN;
if(locked) {
local1 = _label.width;
} else {
local1 = this._icon.x + this._icon.width + 1;
}
return local1;
}
override public function set text(param1:String) : void {
super.text = param1;
this.alignIcon();
}
}
}
|
package alternativa.engine3d.materials {
import flash.display.BitmapData;
import flash.utils.Dictionary;
public class TextureResourcesRegistry {
public static var texture2Resource:Dictionary = new Dictionary();
public function TextureResourcesRegistry() {
super();
}
public static function releaseTextureResources() : void {
}
public static function release(param1:BitmapData) : void {
}
}
}
|
package alternativa.tanks.gui {
import flash.display.BitmapData;
import utils.FlipBitmapDataUtils;
public class ItemInfoPanelBitmaps {
private static const bitmapArea:Class = ItemInfoPanelBitmaps_bitmapArea;
public static const area:BitmapData = new bitmapArea().bitmapData;
private static const bitmapArmorWear:Class = ItemInfoPanelBitmaps_bitmapArmorWear;
public static const damage:BitmapData = new bitmapArmorWear().bitmapData;
private static const bitmapArmor:Class = ItemInfoPanelBitmaps_bitmapArmor;
public static const armor:BitmapData = new bitmapArmor().bitmapData;
private static const bitmapEnergyConsumption:Class = ItemInfoPanelBitmaps_bitmapEnergyConsumption;
public static const energyConsumption:BitmapData = new bitmapEnergyConsumption().bitmapData;
private static const bitmapHullPower:Class = ItemInfoPanelBitmaps_bitmapHullPower;
public static const hullPower:BitmapData = new bitmapHullPower().bitmapData;
private static const bitmapHullMass:Class = ItemInfoPanelBitmaps_bitmapHullMass;
public static const hullMass:BitmapData = new bitmapHullMass().bitmapData;
private static const bitmapRange:Class = ItemInfoPanelBitmaps_bitmapRange;
public static const range:BitmapData = new bitmapRange().bitmapData;
private static const bitmapRateOfFire:Class = ItemInfoPanelBitmaps_bitmapRateOfFire;
public static const rateOfFire:BitmapData = new bitmapRateOfFire().bitmapData;
private static const bitmapResourceWear:Class = ItemInfoPanelBitmaps_bitmapResourceWear;
public static const resourceWear:BitmapData = new bitmapResourceWear().bitmapData;
private static const bitmapResource:Class = ItemInfoPanelBitmaps_bitmapResource;
public static const resource:BitmapData = new bitmapResource().bitmapData;
private static const bitmapSpread:Class = ItemInfoPanelBitmaps_bitmapSpread;
public static const spread:BitmapData = new bitmapSpread().bitmapData;
private static const bitmapTurretRotationRate:Class = ItemInfoPanelBitmaps_bitmapTurretRotationRate;
public static const turretRotationRate:BitmapData = new bitmapTurretRotationRate().bitmapData;
private static const bitmapSpeed:Class = ItemInfoPanelBitmaps_bitmapSpeed;
public static const speed:BitmapData = new bitmapSpeed().bitmapData;
private static const bitmapTurnSpeed:Class = ItemInfoPanelBitmaps_bitmapTurnSpeed;
public static const turnspeed:BitmapData = new bitmapTurnSpeed().bitmapData;
private static const continuousHealClass:Class = ItemInfoPanelBitmaps_continuousHealClass;
public static const continuousHealBitmapData:BitmapData = new continuousHealClass().bitmapData;
private static const instantHealClass:Class = ItemInfoPanelBitmaps_instantHealClass;
public static const instantHealBitmapData:BitmapData = new instantHealClass().bitmapData;
private static const bitmapVampireRate:Class = ItemInfoPanelBitmaps_bitmapVampireRate;
public static const vampireRate:BitmapData = new bitmapVampireRate().bitmapData;
private static const bitmapPropertiesLeft:Class = ItemInfoPanelBitmaps_bitmapPropertiesLeft;
public static const propertiesLeft:BitmapData = new bitmapPropertiesLeft().bitmapData;
private static const bitmapPropertiesCenter:Class = ItemInfoPanelBitmaps_bitmapPropertiesCenter;
public static const propertiesCenter:BitmapData = new bitmapPropertiesCenter().bitmapData;
public static const propertiesRight:BitmapData = FlipBitmapDataUtils.flipH(propertiesLeft);
private static const bitmapUpgradeTableLeft:Class = ItemInfoPanelBitmaps_bitmapUpgradeTableLeft;
public static const upgradeTableLeft:BitmapData = new bitmapUpgradeTableLeft().bitmapData;
private static const bitmapUpgradeTableCenter:Class = ItemInfoPanelBitmaps_bitmapUpgradeTableCenter;
public static const upgradeTableCenter:BitmapData = new bitmapUpgradeTableCenter().bitmapData;
public static const upgradeTableRight:BitmapData = FlipBitmapDataUtils.flipH(upgradeTableLeft);
private static const shaftFireRateClass:Class = ItemInfoPanelBitmaps_shaftFireRateClass;
public static const shaftFireRate:BitmapData = new shaftFireRateClass().bitmapData;
private static const shaftDamageClass:Class = ItemInfoPanelBitmaps_shaftDamageClass;
public static const shaftDamage:BitmapData = new shaftDamageClass().bitmapData;
private static const shellSpeedClass:Class = ItemInfoPanelBitmaps_shellSpeedClass;
public static const shellSpeed:BitmapData = new shellSpeedClass().bitmapData;
private static const smokyCritClass:Class = ItemInfoPanelBitmaps_smokyCritClass;
public static const smokyCrit:BitmapData = new smokyCritClass().bitmapData;
private static const firebirdClass:Class = ItemInfoPanelBitmaps_firebirdClass;
public static const firebird:BitmapData = new firebirdClass().bitmapData;
private static const percentClass:Class = ItemInfoPanelBitmaps_percentClass;
public static const percent:BitmapData = new percentClass().bitmapData;
private static const minDamagePercentClass:Class = ItemInfoPanelBitmaps_minDamagePercentClass;
public static const minDamagePercent:BitmapData = new minDamagePercentClass().bitmapData;
private static const selfMedicationPercentClass:Class = ItemInfoPanelBitmaps_selfMedicationPercentClass;
public static const selfMedicationPercent:BitmapData = new selfMedicationPercentClass().bitmapData;
private static const aimingImpactForceClass:Class = ItemInfoPanelBitmaps_aimingImpactForceClass;
public static const aimingImpactForce:BitmapData = new aimingImpactForceClass().bitmapData;
private static const impactForceClass:Class = ItemInfoPanelBitmaps_impactForceClass;
public static const impactForce:BitmapData = new impactForceClass().bitmapData;
private static const piercingCoeffClass:Class = ItemInfoPanelBitmaps_piercingCoeffClass;
public static const piercingCoeff:BitmapData = new piercingCoeffClass().bitmapData;
private static const backIconClass:Class = ItemInfoPanelBitmaps_backIconClass;
public static const backIcon:BitmapData = new backIconClass().bitmapData;
private static const cooldownDoubleArmorClass:Class = ItemInfoPanelBitmaps_cooldownDoubleArmorClass;
public static const cooldownDoubleArmorIcon:BitmapData = new cooldownDoubleArmorClass().bitmapData;
private static const cooldownDoublePowerClass:Class = ItemInfoPanelBitmaps_cooldownDoublePowerClass;
public static const cooldownDoublePowerIcon:BitmapData = new cooldownDoublePowerClass().bitmapData;
private static const cooldownNitroClass:Class = ItemInfoPanelBitmaps_cooldownNitroClass;
public static const cooldownNitroIcon:BitmapData = new cooldownNitroClass().bitmapData;
private static const cooldownFirstAidClass:Class = ItemInfoPanelBitmaps_cooldownFirstAidClass;
public static const cooldownFirstAidIcon:BitmapData = new cooldownFirstAidClass().bitmapData;
private static const cooldownMineClass:Class = ItemInfoPanelBitmaps_cooldownMineClass;
public static const cooldownMineIcon:BitmapData = new cooldownMineClass().bitmapData;
private static const cooldownGoldClass:Class = ItemInfoPanelBitmaps_cooldownGoldClass;
public static const cooldownGoldIcon:BitmapData = new cooldownGoldClass().bitmapData;
private static const durationEffectInventoryClass:Class = ItemInfoPanelBitmaps_durationEffectInventoryClass;
public static const durationEffectInventoryIcon:BitmapData = new durationEffectInventoryClass().bitmapData;
private static const armorBoostClass:Class = ItemInfoPanelBitmaps_armorBoostClass;
public static const armorBoostIcon:BitmapData = new armorBoostClass().bitmapData;
private static const cooldownBoostClass:Class = ItemInfoPanelBitmaps_cooldownBoostClass;
public static const cooldownBoostIcon:BitmapData = new cooldownBoostClass().bitmapData;
private static const powerBoostClass:Class = ItemInfoPanelBitmaps_powerBoostClass;
public static const powerBoostIcon:BitmapData = new powerBoostClass().bitmapData;
private static const additionalMinesClass:Class = ItemInfoPanelBitmaps_additionalMinesClass;
public static const additionalMinesIcon:BitmapData = new additionalMinesClass().bitmapData;
private static const cooldownRadiusClass:Class = ItemInfoPanelBitmaps_cooldownRadiusClass;
public static const cooldownRadiusIcon:BitmapData = new cooldownRadiusClass().bitmapData;
private static const mineActivationDelayClass:Class = ItemInfoPanelBitmaps_mineActivationDelayClass;
public static const mineActivationDelayIcon:BitmapData = new mineActivationDelayClass().bitmapData;
private static const surviveMinesClass:Class = ItemInfoPanelBitmaps_surviveMinesClass;
public static const surviveMinesIcon:BitmapData = new surviveMinesClass().bitmapData;
private static const bitmapLeftTopCornerTableKit:Class = ItemInfoPanelBitmaps_bitmapLeftTopCornerTableKit;
public static const leftTopCornerTableKit:BitmapData = new bitmapLeftTopCornerTableKit().bitmapData;
public static const rightTopCornerTableKit:BitmapData = FlipBitmapDataUtils.flipH(leftTopCornerTableKit);
private static const bitmapCenterTopTableKit:Class = ItemInfoPanelBitmaps_bitmapCenterTopTableKit;
public static const centerTopTableKit:BitmapData = new bitmapCenterTopTableKit().bitmapData;
public static const centerBottomLineTableKit:BitmapData = FlipBitmapDataUtils.flipW(centerTopTableKit);
private static const bitmapLineTableKit:Class = ItemInfoPanelBitmaps_bitmapLineTableKit;
public static const leftLineTableKit:BitmapData = new bitmapLineTableKit().bitmapData;
public static const rightLineTableKit:BitmapData = FlipBitmapDataUtils.flipH(leftLineTableKit);
private static const bitmapLeftCenterTableKit:Class = ItemInfoPanelBitmaps_bitmapLeftCenterTableKit;
public static const leftCenterTableKit:BitmapData = new bitmapLeftCenterTableKit().bitmapData;
public static const rightCenterTableKit:BitmapData = FlipBitmapDataUtils.flipH(leftCenterTableKit);
private static const bitmapBackgroundPixelTableKit:Class = ItemInfoPanelBitmaps_bitmapBackgroundPixelTableKit;
public static const backgroundPixelTableKit:BitmapData = new bitmapBackgroundPixelTableKit().bitmapData;
private static const bitmapLeftBottomLineTableKit:Class = ItemInfoPanelBitmaps_bitmapLeftBottomLineTableKit;
public static const leftBottomLineTableKit:BitmapData = new bitmapLeftBottomLineTableKit().bitmapData;
private static const bitmapDroneBonusRadius:Class = ItemInfoPanelBitmaps_bitmapDroneBonusRadius;
public static const droneBonusRadius:BitmapData = new bitmapDroneBonusRadius().bitmapData;
private static const bitmapDroneReload:Class = ItemInfoPanelBitmaps_bitmapDroneReload;
public static const droneReload:BitmapData = new bitmapDroneReload().bitmapData;
private static const bitmapDroneOverdriveBoost:Class = ItemInfoPanelBitmaps_bitmapDroneOverdriveBoost;
public static const droneOverdriveBoost:BitmapData = new bitmapDroneOverdriveBoost().bitmapData;
private static const bitmapHealRadius:Class = ItemInfoPanelBitmaps_bitmapHealRadius;
public static const healRadius:BitmapData = new bitmapHealRadius().bitmapData;
public static const rightBottomLineTableKit:BitmapData = FlipBitmapDataUtils.flipH(leftBottomLineTableKit);
public function ItemInfoPanelBitmaps() {
super();
}
}
}
|
package alternativa.tanks.model.item.discount {
[ModelInterface]
public interface ICollectDiscount {
function collectDiscountsInfo(param1:IDiscountCollector) : void;
}
}
|
package alternativa.utils
{
import flash.utils.ByteArray;
public class TextureByteData
{
public var diffuseData:ByteArray;
public var opacityData:ByteArray;
public function TextureByteData(diffuseData:ByteArray = null, opacityData:ByteArray = null)
{
super();
this.diffuseData = diffuseData;
this.opacityData = opacityData;
}
}
}
|
package forms.garage
{
import alternativa.init.Main;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.locale.constants.TextConst;
import assets.Diamond;
import controls.BigButton;
import controls.Label;
import controls.rangicons.RangIconSmall;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;
public class GarageButton extends BigButton
{
private static const RANK_LABEL:String = (ILocaleService(Main.osgi.getService(ILocaleService)) as ILocaleService).getText(TextConst.GARAGE_BUY_BUTTON_RANK_LABEL);
protected var bmp:BitmapData;
public function GarageButton()
{
super();
}
public function setInfo(crystal:int = 0, rank:int = 0) : void
{
var rangLabel:Label = null;
var rangIcon:RangIconSmall = null;
var cont:Sprite = new Sprite();
var c_price:Label = new Label();
rangLabel = new Label();
rangIcon = new RangIconSmall();
var diamond:Diamond = new Diamond();
if(crystal == 0 && rank >= 0)
{
this.bmp = new BitmapData(40,20,true,2164195328);
this.icon = this.bmp;
}
else
{
if(crystal < 0)
{
c_price.color = 16731648;
c_price.sharpness = -100;
c_price.thickness = 100;
}
if(rank < 0)
{
rangLabel.color = 16731648;
rangLabel.sharpness = -100;
rangLabel.thickness = 100;
}
else
{
rank = 0;
}
rangLabel.filters = c_price.filters = [new DropShadowFilter(1,45,0,0.7,1,1,1)];
crystal = crystal < 0 ? int(-crystal) : int(crystal);
rank = rank < 0 ? int(-rank) : int(rank);
if(crystal > 0)
{
c_price.text = String(crystal);
c_price.x = 0;
c_price.y = 0;
cont.addChild(diamond);
cont.addChild(c_price);
diamond.x = c_price.textWidth + 5;
diamond.y = 4;
}
if(rank > 0)
{
rangIcon.rang = rank;
cont.addChild(rangLabel);
rangLabel.y = 0;
rangLabel.x = cont.width + 4;
rangLabel.text = RANK_LABEL;
rangIcon.y = rangLabel.y + 3;
rangIcon.x = cont.width - 1;
cont.addChild(rangIcon);
}
cont.x -= 96 - cont.width;
this.bmp = new BitmapData(cont.width,cont.height,true,0);
this.bmp.draw(cont);
this.icon = this.bmp;
}
}
override public function set width(w:Number) : void
{
_width = int(w);
stateDOWN.width = stateOFF.width = stateOVER.width = stateUP.width = _width;
_info.width = _label.width = _width - 4;
if(_icon.bitmapData != null)
{
_icon.x = _width - _icon.width >> 1;
_icon.y = 25;
}
}
override public function set icon(icoBMP:BitmapData) : void
{
if(icoBMP != null)
{
_icon.visible = true;
_label.y = 8;
}
else
{
_label.width = _width - 4;
_icon.visible = false;
_label.y = 15;
}
_icon.bitmapData = icoBMP;
this.width = _width;
}
override protected function onMouseEvent(event:MouseEvent) : void
{
if(_enable)
{
switch(event.type)
{
case MouseEvent.MOUSE_OVER:
setState(2);
break;
case MouseEvent.MOUSE_OUT:
setState(1);
break;
case MouseEvent.MOUSE_DOWN:
setState(3);
break;
case MouseEvent.MOUSE_UP:
setState(1);
}
if(_icon.bitmapData != null)
{
_icon.y = 25 + (event.type == MouseEvent.MOUSE_DOWN ? 1 : 0);
_label.y = 8 + (event.type == MouseEvent.MOUSE_DOWN ? 1 : 0);
}
else
{
_label.y = 15 + (event.type == MouseEvent.MOUSE_DOWN ? 1 : 0);
}
}
}
}
}
|
package scpacker.test.spectator
{
import alternativa.tanks.utils.BitMask;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import flash.utils.Dictionary;
public class UserInputImpl implements UserInput, KeyboardHandler
{
public static const BIT_FORWARD:int = 0;
public static const BIT_BACK:int = 1;
public static const BIT_LEFT:int = 2;
public static const BIT_RIGHT:int = 3;
public static const BIT_UP:int = 4;
public static const BIT_DOWN:int = 5;
public static const BIT_ACCELERATION:int = 6;
public static const BIT_YAW_LEFT:int = 7;
public static const BIT_YAW_RIGHT:int = 8;
public static const BIT_PITCH_UP:int = 9;
public static const BIT_PITCH_DOWN:int = 10;
private static const ROTATION_MASK:int = 1 << BIT_PITCH_DOWN | 1 << BIT_PITCH_UP | 1 << BIT_YAW_LEFT | 1 << BIT_YAW_RIGHT;
private var keyMap:Dictionary;
private var controlBits:BitMask;
public function UserInputImpl()
{
this.keyMap = new Dictionary();
this.controlBits = new BitMask(0);
super();
this.keyMap[Keyboard.W] = BIT_FORWARD;
this.keyMap[Keyboard.S] = BIT_BACK;
this.keyMap[Keyboard.A] = BIT_LEFT;
this.keyMap[Keyboard.D] = BIT_RIGHT;
this.keyMap[Keyboard.Q] = BIT_DOWN;
this.keyMap[Keyboard.E] = BIT_UP;
this.keyMap[Keyboard.SHIFT] = BIT_ACCELERATION;
this.keyMap[Keyboard.LEFT] = BIT_YAW_LEFT;
this.keyMap[Keyboard.RIGHT] = BIT_YAW_RIGHT;
this.keyMap[Keyboard.UP] = BIT_PITCH_UP;
this.keyMap[Keyboard.DOWN] = BIT_PITCH_DOWN;
}
public function getForwardDirection() : int
{
return this.getDirection(BIT_FORWARD,BIT_BACK);
}
public function getSideDirection() : int
{
return this.getDirection(BIT_RIGHT,BIT_LEFT);
}
public function getVerticalDirection() : int
{
return this.getDirection(BIT_UP,BIT_DOWN);
}
public function isAcceleratied() : Boolean
{
return this.controlBits.getBitValue(BIT_ACCELERATION) == 1;
}
public function handleKeyDown(param1:KeyboardEvent) : void
{
if(this.keyMap[param1.keyCode] != null)
{
this.controlBits.setBit(this.keyMap[param1.keyCode]);
}
}
public function handleKeyUp(param1:KeyboardEvent) : void
{
if(this.keyMap[param1.keyCode] != null)
{
this.controlBits.clearBit(this.keyMap[param1.keyCode]);
}
}
public function getYawDirection() : int
{
return this.getDirection(BIT_YAW_LEFT,BIT_YAW_RIGHT);
}
public function getPitchDirection() : int
{
return this.getDirection(BIT_PITCH_UP,BIT_PITCH_DOWN);
}
public function isRotating() : Boolean
{
return this.controlBits.hasAnyBit(ROTATION_MASK);
}
private function getDirection(param1:int, param2:int) : int
{
return this.controlBits.getBitValue(param1) - this.controlBits.getBitValue(param2);
}
public function reset() : void
{
this.controlBits.clear();
}
}
}
|
package _codec.platform.client.models.commons.periodtime {
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.models.commons.periodtime.TimePeriodModelCC;
public class CodecTimePeriodModelCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_isEnabled:ICodec;
private var codec_isTimeless:ICodec;
private var codec_timeLeftInSeconds:ICodec;
private var codec_timeToStartInSeconds:ICodec;
public function CodecTimePeriodModelCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_isEnabled = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_isTimeless = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_timeLeftInSeconds = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_timeToStartInSeconds = param1.getCodec(new TypeCodecInfo(int,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:TimePeriodModelCC = new TimePeriodModelCC();
local2.isEnabled = this.codec_isEnabled.decode(param1) as Boolean;
local2.isTimeless = this.codec_isTimeless.decode(param1) as Boolean;
local2.timeLeftInSeconds = this.codec_timeLeftInSeconds.decode(param1) as int;
local2.timeToStartInSeconds = this.codec_timeToStartInSeconds.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:TimePeriodModelCC = TimePeriodModelCC(param2);
this.codec_isEnabled.encode(param1,local3.isEnabled);
this.codec_isTimeless.encode(param1,local3.isTimeless);
this.codec_timeLeftInSeconds.encode(param1,local3.timeLeftInSeconds);
this.codec_timeToStartInSeconds.encode(param1,local3.timeToStartInSeconds);
}
}
}
|
package alternativa.tanks.model.challenge
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ChallengeCongratulationWindow_congratsBitmap extends BitmapAsset
{
public function ChallengeCongratulationWindow_congratsBitmap()
{
super();
}
}
}
|
package alternativa.tanks.models.weapon.shared.streamweapon {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.physics.Body;
public interface StreamWeaponEffects {
function startEffects(param1:Body, param2:Vector3, param3:Object3D) : void;
function stopEffects() : void;
function updateRange(param1:Number) : void;
function setBuffedMode(param1:Boolean) : void;
}
}
|
package com.alternativaplatform.projects.tanks.client.commons.models.itemtype
{
public class ItemTypeEnum
{
public static var WEAPON:ItemTypeEnum = new ItemTypeEnum(1);
public static var ARMOR:ItemTypeEnum = new ItemTypeEnum(2);
public static var COLOR:ItemTypeEnum = new ItemTypeEnum(3);
public static var INVENTORY:ItemTypeEnum = new ItemTypeEnum(4);
public static var PLUGIN:ItemTypeEnum = new ItemTypeEnum(5);
public static var KIT:ItemTypeEnum = new ItemTypeEnum(6);
public var value:int;
public function ItemTypeEnum(value:int)
{
super();
this.value = value;
}
}
}
|
package alternativa.tanks.models.battle.gui.inventory {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IInventoryItemAdapt implements IInventoryItem {
private var object:IGameObject;
private var impl:IInventoryItem;
public function IInventoryItemAdapt(param1:IGameObject, param2:IInventoryItem) {
super();
this.object = param1;
this.impl = param2;
}
public function getSlotIndex() : int {
var result:int = 0;
try {
Model.object = this.object;
result = int(this.impl.getSlotIndex());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.controller.commands.google {
import alternativa.tanks.controller.events.google.GoogleLoginEvent;
import alternativa.tanks.model.EntranceUrlParamsModel;
import alternativa.tanks.service.IEntranceServerFacade;
import alternativa.tanks.service.impl.ExternalEntranceService;
import org.robotlegs.mvcs.Command;
public class GoogleLoginCommand extends Command {
[Inject]
public var urlParams:EntranceUrlParamsModel;
[Inject]
public var serverFacade:IEntranceServerFacade;
[Inject]
public var event:GoogleLoginEvent;
public function GoogleLoginCommand() {
super();
}
override public function execute() : void {
this.serverFacade.startExternalRegisterUser(ExternalEntranceService.GOOGLE,this.event.rememberMe,this.urlParams.domain);
this.serverFacade.googleLogin(this.event.token);
}
}
}
|
package controls {
import assets.icons.InputCheckIcon;
import utils.tweener.TweenLite;
public class ValidationIcon extends InputCheckIcon {
private static const OFF:int = 0;
private static const PROGRESS:int = 1;
private static const VALID:int = 2;
private static const INVALID:int = 3;
public var fadeTime:Number;
private var currentState:int = -1;
public function ValidationIcon() {
super();
this.turnOff();
}
private function setCompleteVisible(param1:Boolean) : void {
visible = param1;
if(!visible) {
gotoAndStop(this.currentState);
if(this.currentState != OFF) {
visible = true;
if(this.fadeTime > 0) {
alpha = 0;
TweenLite.to(this,this.fadeTime,{"alpha":1});
}
}
}
}
private function changeState(param1:int) : void {
if(this.currentState != param1) {
this.currentState = param1;
if(this.fadeTime > 0) {
TweenLite.to(this,this.fadeTime,{
"alpha":0,
"onComplete":this.setCompleteVisible,
"onCompleteParams":[false]
});
} else {
this.setCompleteVisible(false);
}
}
}
public function startProgress() : void {
this.changeState(PROGRESS);
}
public function turnOff() : void {
this.changeState(OFF);
}
public function markAsValid() : void {
this.changeState(VALID);
}
public function markAsInvalid() : void {
this.changeState(INVALID);
}
}
}
|
package com.alternativaplatform.projects.tanks.client.warfare.models.sfx.shoot.thunder
{
public interface IThunderShootSFXModelBase
{
}
}
|
package alternativa.tanks.models.battle.gui.inventory {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_armorWhiteIconClass.png")]
public class HudInventoryIcon_armorWhiteIconClass extends BitmapAsset {
public function HudInventoryIcon_armorWhiteIconClass() {
super();
}
}
}
|
package projects.tanks.client.entrance.model.entrance.passwordchange {
public interface IPasswordChangeModelBase {
function emailNotFound() : void;
function emailWithRestoreLinkSuccessfullySent() : void;
function passwordRecoveryHashCorrect(param1:String) : void;
function passwordRecoveryHashWrong() : void;
function setPasswordChangeResult(param1:Boolean, param2:String) : void;
}
}
|
package alternativa.tanks.model.payment.shop.indemnity {
import projects.tanks.client.panel.model.shop.indemnity.IIndemnityModelBase;
import projects.tanks.client.panel.model.shop.indemnity.IndemnityModelBase;
[ModelInfo]
public class IndemnityModel extends IndemnityModelBase implements IIndemnityModelBase, Indemnity {
public function IndemnityModel() {
super();
}
public function getIndemnitySize() : int {
return getInitParam().indemnitySize;
}
}
}
|
package alternativa.register
{
import alternativa.init.Main;
import alternativa.model.IModel;
import alternativa.object.ClientObject;
import alternativa.osgi.service.log.LogLevel;
import alternativa.protocol.codec.NullMap;
import alternativa.service.IModelService;
import alternativa.service.Logger;
import flash.utils.Dictionary;
import flash.utils.IDataInput;
public class ModelsRegister implements IModelService
{
private var modelInstances:Dictionary;
private var modelInstancesByInterface:Dictionary;
private var modelInterfaces:Dictionary;
private var modelByMethod:Dictionary;
private var modelsParamsStruct:Dictionary;
private var _modelsList:Vector.<IModel>;
public function ModelsRegister()
{
super();
this.modelInterfaces = new Dictionary();
this.modelInstances = new Dictionary();
this.modelByMethod = new Dictionary();
this.modelInstancesByInterface = new Dictionary();
this.modelsParamsStruct = new Dictionary();
this._modelsList = new Vector.<IModel>();
}
public function register(modelId:String, methodId:String) : void
{
this.modelByMethod[methodId] = modelId;
Main.writeVarsToConsoleChannel("MODEL REGISTER","Метод %1 (модель %2) зарегистрирован",methodId,modelId);
}
public function registerModelsParamsStruct(modelId:String, paramsStruct:Class) : void
{
this.modelsParamsStruct[modelId] = paramsStruct;
}
public function unregisterModelsParamsStruct(modelId:String) : void
{
this.modelsParamsStruct[modelId] = null;
}
public function getModelsParamsStruct(modelId:String) : Class
{
return this.modelsParamsStruct[modelId];
}
public function add(modelInstance:IModel) : void
{
var key:Class = null;
var record:Vector.<IModel> = null;
Main.writeVarsToConsoleChannel("MODEL REGISTER","add model %1",modelInstance);
this._modelsList.push(modelInstance);
var modelId:String = modelInstance.id;
this.modelInstances[modelId] = modelInstance;
var interfaces:Vector.<Class> = modelInstance.interfaces;
this.modelInterfaces[modelId] = interfaces;
for(var i:int = 0; i < interfaces.length; i++)
{
key = interfaces[i];
record = this.modelInstancesByInterface[key];
if(record == null)
{
this.modelInstancesByInterface[key] = record = new Vector.<IModel>();
}
record.push(modelInstance);
}
Main.writeVarsToConsoleChannel("MODEL REGISTER","Реализация модели id: %1 %2 добавлена в реестр",modelId,modelInstance);
}
public function remove(modelId:String) : void
{
var methodId:* = undefined;
var instance:IModel = null;
var interfaces:Vector.<Class> = null;
var i:int = 0;
var id:String = null;
var key:Class = null;
var modelsArray:Vector.<IModel> = null;
var index:int = 0;
Main.writeVarsToConsoleChannel("MODEL REGISTER","remove model id: %1",modelId);
this._modelsList.splice(this._modelsList.indexOf(this.modelInstances[modelId]),1);
for(methodId in this.modelByMethod)
{
id = this.modelByMethod[methodId];
if(id == modelId)
{
delete this.modelByMethod[methodId];
}
}
instance = IModel(this.modelInstances[modelId]);
Main.writeVarsToConsoleChannel("MODEL REGISTER"," model instance: %1",instance);
interfaces = this.modelInterfaces[modelId] as Vector.<Class>;
Main.writeVarsToConsoleChannel("MODEL REGISTER"," model interfaces: %1",interfaces);
for(i = 0; i < interfaces.length; i++)
{
key = interfaces[i];
modelsArray = this.modelInstancesByInterface[key] as Vector.<IModel>;
Main.writeVarsToConsoleChannel("MODEL REGISTER"," models for interface %1: %2",key,modelsArray);
index = modelsArray.indexOf(instance);
modelsArray.splice(index,1);
}
delete this.modelInterfaces[modelId];
delete this.modelInstances[modelId];
Main.writeVarsToConsoleChannel("MODEL REGISTER","Реализация модели id: %1 удалена из реестра",modelId);
}
public function invoke(clientObject:ClientObject, methodId:String, params:IDataInput, nullMap:NullMap) : void
{
var modelId:String = String(this.modelByMethod[methodId]);
var model:IModel = IModel(this.modelInstances[modelId]);
Main.writeVarsToConsoleChannel("MODEL REGISTER","invoke");
Main.writeVarsToConsoleChannel("MODEL REGISTER"," methodId: " + methodId,255);
Main.writeVarsToConsoleChannel("MODEL REGISTER"," clientObjectId: " + clientObject.id,255);
Main.writeVarsToConsoleChannel("MODEL REGISTER"," invoke modelId: " + modelId,255);
Main.writeVarsToConsoleChannel("MODEL REGISTER"," invoke model: " + model,255);
if(model != null)
{
model.invoke(clientObject,methodId,Main.codecFactory,params,nullMap);
}
else
{
Main.writeVarsToConsoleChannel("MODEL REGISTER"," method invoke failed. MODEL NOT FOUND");
}
}
public function getModel(id:String) : IModel
{
return this.modelInstances[id];
}
public function getModelsByInterface(modelInterface:Class) : Vector.<IModel>
{
Main.writeVarsToConsoleChannel("MODEL REGISTER","getModelsByInterface %1: %2",modelInterface,this.modelInstancesByInterface[modelInterface]);
return this.modelInstancesByInterface[modelInterface];
}
public function getModelForObject(object:ClientObject, modelInterface:Class) : IModel
{
var msg:String = null;
var model:IModel = null;
var interfaces:Vector.<Class> = null;
var n:int = 0;
if(object == null)
{
msg = "Object is null. Model interface = " + modelInterface;
Logger.log(LogLevel.LOG_ERROR,"ModelRegister::getModelForObject " + msg);
}
if(modelInterface == null)
{
msg = "Model interface is null. Object id = " + object.id;
Logger.log(LogLevel.LOG_ERROR,"ModelRegister::getModelForObject " + msg);
throw new ArgumentError(msg);
}
var modelIds:Vector.<String> = object.getModels();
for(var i:int = modelIds.length - 1; i >= 0; i--)
{
interfaces = this.modelInterfaces[modelIds[i]] as Vector.<Class>;
if(interfaces == null)
{
throw new Error("No interfaces found. Object id=" + object.id + ", model id=" + modelIds[i]);
}
for(n = interfaces.length - 1; n >= 0; n--)
{
if(interfaces[n] == modelInterface)
{
if(model == null)
{
model = this.getModel(modelIds[i]);
break;
}
throw new Error("MODEL REGISTER getModelForObject: Найдено несколько моделей с указанным интерфейсом.");
}
}
}
return model;
}
public function getModelsForObject(object:ClientObject, modelInterface:Class) : Vector.<IModel>
{
var interfaces:Vector.<Class> = null;
var n:int = 0;
var result:Vector.<IModel> = new Vector.<IModel>();
var modelIds:Vector.<String> = object.getModels();
for(var i:int = modelIds.length - 1; i >= 0; i--)
{
interfaces = this.modelInterfaces[modelIds[i]] as Vector.<Class>;
if(interfaces == null)
{
throw new Error("No interfaces found. Object id=" + object.id + ", model id=" + modelIds[i]);
}
for(n = interfaces.length - 1; n >= 0; n--)
{
if(interfaces[n] == modelInterface)
{
result.push(this.getModel(modelIds[i]));
break;
}
}
}
return result;
}
public function getInterfacesForModel(id:String) : Vector.<Class>
{
return this.modelInterfaces[id];
}
public function get modelsList() : Vector.<IModel>
{
return this._modelsList;
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.