code
stringlengths 57
237k
|
|---|
package alternativa.tanks.model.payment.shop.kitviewresource.localized {
import alternativa.tanks.model.payment.shop.kitviewresource.KitViewResource;
import flash.display.BitmapData;
import projects.tanks.client.panel.model.shop.kitview.localized.IKitViewResourceLocalizedModelBase;
import projects.tanks.client.panel.model.shop.kitview.localized.KitViewResourceLocalizedModelBase;
[ModelInfo]
public class KitViewResourceLocalizedModel extends KitViewResourceLocalizedModelBase implements IKitViewResourceLocalizedModelBase, KitViewResource {
public function KitViewResourceLocalizedModel() {
super();
}
public function getButtonKitImage() : BitmapData {
return getInitParam().buttonKit.data;
}
public function getButtonKitOverImage() : BitmapData {
return getInitParam().buttonKitOver.data;
}
}
}
|
package alternativa.tanks.sfx
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.math.Vector3;
import alternativa.object.ClientObject;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.utils.objectpool.ObjectPool;
import alternativa.tanks.utils.objectpool.PooledObject;
import flash.geom.ColorTransform;
public class AnimatedSpriteEffect extends PooledObject implements IGraphicEffect
{
private static var toCamera:Vector3 = new Vector3();
private var sprite:Sprite3D;
private var offsetToCamera:Number;
private var framesPerMillisecond:Number;
private var currFrame:Number;
private var materials:Vector.<Material>;
private var numFrames:int;
private var position:Vector3;
private var loop:Boolean;
public function AnimatedSpriteEffect(objectPool:ObjectPool)
{
this.position = new Vector3();
super(objectPool);
}
public function init(width:Number, height:Number, materials:Vector.<Material>, position:Vector3, rotation:Number, offsetToCamera:Number, fps:Number, loop:Boolean, originX:Number = 0.5, originY:Number = 0.5, colorTransform:ColorTransform = null) : void
{
this.initSprite(width,height,rotation,originX,originY,colorTransform);
this.materials = materials;
this.offsetToCamera = offsetToCamera;
this.framesPerMillisecond = 0.001 * fps;
this.position.vCopy(position);
this.loop = loop;
this.numFrames = materials.length;
this.sprite.softAttenuation = 140;
this.currFrame = 0;
}
public function addToContainer(container:Scene3DContainer) : void
{
container.addChild(this.sprite);
}
public function get owner() : ClientObject
{
return null;
}
public function play(timeDelta:int, camera:GameCamera) : Boolean
{
if(!this.loop && this.currFrame >= this.numFrames)
{
return false;
}
toCamera.x = camera.x - this.position.x;
toCamera.y = camera.y - this.position.y;
toCamera.z = camera.z - this.position.z;
toCamera.vNormalize();
this.sprite.x = this.position.x + this.offsetToCamera * toCamera.x;
this.sprite.y = this.position.y + this.offsetToCamera * toCamera.y;
this.sprite.z = this.position.z + this.offsetToCamera * toCamera.z;
this.sprite.material = this.materials[int(this.currFrame)];
this.currFrame += this.framesPerMillisecond * timeDelta;
if(this.loop)
{
while(this.currFrame >= this.numFrames)
{
this.currFrame -= this.numFrames;
}
}
return true;
}
public function destroy() : void
{
this.sprite.alternativa3d::removeFromParent();
this.sprite.material = null;
this.sprite.destroy();
this.sprite = null;
this.materials = null;
storeInPool();
}
public function kill() : void
{
this.loop = false;
this.currFrame = this.numFrames + 1;
}
override protected function getClass() : Class
{
return AnimatedSpriteEffect;
}
private function initSprite(width:Number, height:Number, rotation:Number, originX:Number, originY:Number, colorTransform:ColorTransform) : void
{
if(this.sprite == null)
{
this.sprite = new Sprite3D(width,height);
}
else
{
this.sprite.width = width;
this.sprite.height = height;
}
this.sprite.rotation = rotation;
this.sprite.originX = originX;
this.sprite.originY = originY;
this.sprite.colorTransform = colorTransform;
this.sprite.useShadowMap = false;
this.sprite.useLight = false;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.battlefield.billboard {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.battle.battlefield.billboard.BillboardCC;
public class CodecBillboardCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_defaultBillboardImage:ICodec;
public function CodecBillboardCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_defaultBillboardImage = param1.getCodec(new TypeCodecInfo(TextureResource,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BillboardCC = new BillboardCC();
local2.defaultBillboardImage = this.codec_defaultBillboardImage.decode(param1) as TextureResource;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:BillboardCC = BillboardCC(param2);
this.codec_defaultBillboardImage.encode(param1,local3.defaultBillboardImage);
}
}
}
|
package alternativa.tanks.gui.friends {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.friends.FriendsWindowStateBigButton_ButtonDownRight.png")]
public class FriendsWindowStateBigButton_ButtonDownRight extends BitmapAsset {
public function FriendsWindowStateBigButton_ButtonDownRight() {
super();
}
}
}
|
package projects.tanks.client.panel.model.shop.price {
import platform.client.fp10.core.resource.types.ImageResource;
public class ShopItemCC {
private var _currencyName:String;
private var _preview:ImageResource;
private var _price:Number;
private var _roundingPrecision:int;
public function ShopItemCC(param1:String = null, param2:ImageResource = null, param3:Number = 0, param4:int = 0) {
super();
this._currencyName = param1;
this._preview = param2;
this._price = param3;
this._roundingPrecision = param4;
}
public function get currencyName() : String {
return this._currencyName;
}
public function set currencyName(param1:String) : void {
this._currencyName = param1;
}
public function get preview() : ImageResource {
return this._preview;
}
public function set preview(param1:ImageResource) : void {
this._preview = param1;
}
public function get price() : Number {
return this._price;
}
public function set price(param1:Number) : void {
this._price = param1;
}
public function get roundingPrecision() : int {
return this._roundingPrecision;
}
public function set roundingPrecision(param1:int) : void {
this._roundingPrecision = param1;
}
public function toString() : String {
var local1:String = "ShopItemCC [";
local1 += "currencyName = " + this.currencyName + " ";
local1 += "preview = " + this.preview + " ";
local1 += "price = " + this.price + " ";
local1 += "roundingPrecision = " + this.roundingPrecision + " ";
return local1 + "]";
}
}
}
|
package alternativa.osgi.service.storage
{
import flash.net.SharedObject;
public class StorageService implements IStorageService
{
private var storage:SharedObject;
public function StorageService(sharedObject:SharedObject)
{
super();
this.storage = sharedObject;
}
public function getStorage() : SharedObject
{
return this.storage;
}
}
}
|
package alternativa.tanks.model.panel
{
public interface IPanelListener
{
function bugReportOpened() : void;
function bugReportClosed() : void;
function friendsOpened() : void;
function friendsClosed() : void;
function onCloseGame() : void;
function onCloseGameExit() : void;
function settingsOpened() : void;
function settingsCanceled() : void;
function settingsAccepted() : void;
function setMuteSound(param1:Boolean) : void;
}
}
|
package alternativa.tanks.models.weapon.freeze {
import alternativa.tanks.models.weapon.shared.streamweapon.StreamWeaponEffects;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IFreezeSFXModelEvents implements IFreezeSFXModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IFreezeSFXModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getFreezeEffects(param1:Number, param2:Number) : StreamWeaponEffects {
var result:StreamWeaponEffects = null;
var i:int = 0;
var m:IFreezeSFXModel = null;
var damageAreaRange:Number = param1;
var damageAreaConeAngle:Number = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IFreezeSFXModel(this.impl[i]);
result = m.getFreezeEffects(damageAreaRange,damageAreaConeAngle);
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank03.png")]
public class PremiumRankBitmaps_bitmapBigRank03 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapBigRank03() {
super();
}
}
}
|
package alternativa.tanks.models.clan.outgoing {
import alternativa.tanks.gui.clanmanagement.ClanOutgoingRequestsDialog;
import alternativa.types.Long;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IClanOutgoingModelEvents implements IClanOutgoingModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IClanOutgoingModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function setClanOutgoingWindow(param1:ClanOutgoingRequestsDialog) : void {
var i:int = 0;
var m:IClanOutgoingModel = null;
var clanOutgoingWindow:ClanOutgoingRequestsDialog = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IClanOutgoingModel(this.impl[i]);
m.setClanOutgoingWindow(clanOutgoingWindow);
i++;
}
}
finally {
Model.popObject();
}
}
public function getUsers() : Vector.<Long> {
var result:Vector.<Long> = null;
var i:int = 0;
var m:IClanOutgoingModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IClanOutgoingModel(this.impl[i]);
result = m.getUsers();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.weapon.rocketlauncher.sfx {
[ModelInterface]
public interface RocketLauncherSfx {
function getSfxData() : RocketLauncherSfxData;
}
}
|
package projects.tanks.client.battlefield.models.battle.cp.resources {
import platform.client.fp10.core.resource.types.SoundResource;
public class DominationSounds {
private var _pointCaptureStartNegativeSound:SoundResource;
private var _pointCaptureStartPositiveSound:SoundResource;
private var _pointCaptureStopNegativeSound:SoundResource;
private var _pointCaptureStopPositiveSound:SoundResource;
private var _pointCapturedNegativeSound:SoundResource;
private var _pointCapturedPositiveSound:SoundResource;
private var _pointNeutralizedNegativeSound:SoundResource;
private var _pointNeutralizedPositiveSound:SoundResource;
private var _pointScoreDecreasingSound:SoundResource;
private var _pointScoreIncreasingSound:SoundResource;
public function DominationSounds(param1:SoundResource = null, param2:SoundResource = null, param3:SoundResource = null, param4:SoundResource = null, param5:SoundResource = null, param6:SoundResource = null, param7:SoundResource = null, param8:SoundResource = null, param9:SoundResource = null, param10:SoundResource = null) {
super();
this._pointCaptureStartNegativeSound = param1;
this._pointCaptureStartPositiveSound = param2;
this._pointCaptureStopNegativeSound = param3;
this._pointCaptureStopPositiveSound = param4;
this._pointCapturedNegativeSound = param5;
this._pointCapturedPositiveSound = param6;
this._pointNeutralizedNegativeSound = param7;
this._pointNeutralizedPositiveSound = param8;
this._pointScoreDecreasingSound = param9;
this._pointScoreIncreasingSound = param10;
}
public function get pointCaptureStartNegativeSound() : SoundResource {
return this._pointCaptureStartNegativeSound;
}
public function set pointCaptureStartNegativeSound(param1:SoundResource) : void {
this._pointCaptureStartNegativeSound = param1;
}
public function get pointCaptureStartPositiveSound() : SoundResource {
return this._pointCaptureStartPositiveSound;
}
public function set pointCaptureStartPositiveSound(param1:SoundResource) : void {
this._pointCaptureStartPositiveSound = param1;
}
public function get pointCaptureStopNegativeSound() : SoundResource {
return this._pointCaptureStopNegativeSound;
}
public function set pointCaptureStopNegativeSound(param1:SoundResource) : void {
this._pointCaptureStopNegativeSound = param1;
}
public function get pointCaptureStopPositiveSound() : SoundResource {
return this._pointCaptureStopPositiveSound;
}
public function set pointCaptureStopPositiveSound(param1:SoundResource) : void {
this._pointCaptureStopPositiveSound = param1;
}
public function get pointCapturedNegativeSound() : SoundResource {
return this._pointCapturedNegativeSound;
}
public function set pointCapturedNegativeSound(param1:SoundResource) : void {
this._pointCapturedNegativeSound = param1;
}
public function get pointCapturedPositiveSound() : SoundResource {
return this._pointCapturedPositiveSound;
}
public function set pointCapturedPositiveSound(param1:SoundResource) : void {
this._pointCapturedPositiveSound = param1;
}
public function get pointNeutralizedNegativeSound() : SoundResource {
return this._pointNeutralizedNegativeSound;
}
public function set pointNeutralizedNegativeSound(param1:SoundResource) : void {
this._pointNeutralizedNegativeSound = param1;
}
public function get pointNeutralizedPositiveSound() : SoundResource {
return this._pointNeutralizedPositiveSound;
}
public function set pointNeutralizedPositiveSound(param1:SoundResource) : void {
this._pointNeutralizedPositiveSound = param1;
}
public function get pointScoreDecreasingSound() : SoundResource {
return this._pointScoreDecreasingSound;
}
public function set pointScoreDecreasingSound(param1:SoundResource) : void {
this._pointScoreDecreasingSound = param1;
}
public function get pointScoreIncreasingSound() : SoundResource {
return this._pointScoreIncreasingSound;
}
public function set pointScoreIncreasingSound(param1:SoundResource) : void {
this._pointScoreIncreasingSound = param1;
}
public function toString() : String {
var local1:String = "DominationSounds [";
local1 += "pointCaptureStartNegativeSound = " + this.pointCaptureStartNegativeSound + " ";
local1 += "pointCaptureStartPositiveSound = " + this.pointCaptureStartPositiveSound + " ";
local1 += "pointCaptureStopNegativeSound = " + this.pointCaptureStopNegativeSound + " ";
local1 += "pointCaptureStopPositiveSound = " + this.pointCaptureStopPositiveSound + " ";
local1 += "pointCapturedNegativeSound = " + this.pointCapturedNegativeSound + " ";
local1 += "pointCapturedPositiveSound = " + this.pointCapturedPositiveSound + " ";
local1 += "pointNeutralizedNegativeSound = " + this.pointNeutralizedNegativeSound + " ";
local1 += "pointNeutralizedPositiveSound = " + this.pointNeutralizedPositiveSound + " ";
local1 += "pointScoreDecreasingSound = " + this.pointScoreDecreasingSound + " ";
local1 += "pointScoreIncreasingSound = " + this.pointScoreIncreasingSound + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.view.forms {
import alternativa.osgi.service.display.IDisplay;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.controller.events.CheckCallsignEvent;
import alternativa.tanks.controller.events.PartnersEvent;
import alternativa.tanks.controller.events.partners.FinishPartnerRegisterEvent;
import alternativa.tanks.service.IRegistrationUXService;
import alternativa.tanks.type.RulesType;
import alternativa.tanks.view.bubbles.Bubble;
import alternativa.tanks.view.bubbles.EntranceBubbleFactory;
import alternativa.tanks.view.forms.commons.RegistrationCommonElementsSection;
import alternativa.tanks.view.forms.freeuids.FreeUidsForm;
import alternativa.tanks.view.forms.freeuids.FreeUidsFormEvent;
import alternativa.tanks.view.forms.primivites.ValidationIcon;
import alternativa.tanks.view.layers.EntranceView;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import controls.base.TankInputBase;
import controls.checkbox.CheckBoxBase;
import controls.checkbox.CheckBoxEvent;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.TextEvent;
import flash.events.TimerEvent;
import flash.ui.Keyboard;
import flash.utils.Timer;
import forms.TankWindowWithHeader;
import forms.events.LoginFormEvent;
import org.robotlegs.core.IInjector;
import projects.tanks.client.entrance.model.entrance.logging.RegistrationUXFormAction;
import projects.tanks.clients.flash.commons.services.validate.IValidateService;
import projects.tanks.clients.flash.commons.services.validate.ValidateService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.IHelpService;
public class PartnersRegistrationForm extends Sprite {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var display:IDisplay;
[Inject]
public static var helperService:IHelpService;
[Inject]
public static var validateService:IValidateService;
[Inject]
public static var registrationUXService:IRegistrationUXService;
[Inject]
public var entranceView:EntranceView;
[Inject]
public var injector:IInjector;
private var _allowExternalLogin:Boolean = false;
private var _callsignInput:TankInputBase;
private var _continueButton:DefaultButtonBase;
private var _rulesButton:LabelBase;
private var _haveAccountLabel:LabelBase;
private var infoLabel:LabelBase;
private var _backgroundContainer:Sprite;
private var _backgroundImage:Bitmap;
private var _window:TankWindowWithHeader;
private var _freeUidsForm:FreeUidsForm;
private var _isFreeUidsFormAlreadyShowed:Boolean;
private var _margin:int = 20;
private var _border:int = 25;
private var _windowWidth:int = 400;
private var _windowHeight:int = 193;
private var _inputsLeftMargin:int = 80;
private var _callsignValidated:Boolean = false;
private var _callSignCheckIcon:ValidationIcon;
private var _checkCallsignTimer:Timer;
private const checkCallsignDelay:int = 500;
private var _checkSymbolAllowedTimer:Timer;
private const checkSymbolAllowedDelay:int = 5000;
private var _nameIsNotUniqueBubble:Bubble;
private var _nameIsIncorrectBubble:Bubble;
private var _symbolIsNotAllowedBubble:Bubble;
private var _acceptRulesCheckBox:CheckBoxBase;
public function PartnersRegistrationForm(param1:Bitmap, param2:Boolean) {
super();
this._backgroundImage = param1;
this._allowExternalLogin = param2;
}
[PostConstruct]
public function postConstruct() : void {
var local1:int = this._border;
this._window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_REGISTRATION,this._windowWidth,local1);
this._callsignInput = new TankInputBase();
this._callSignCheckIcon = new ValidationIcon();
this._continueButton = new DefaultButtonBase();
this._haveAccountLabel = new LabelBase();
this.infoLabel = new LabelBase();
this._acceptRulesCheckBox = new CheckBoxBase();
this._window.addChild(this._callsignInput);
this._window.addChild(this.infoLabel);
this.infoLabel.text = localeService.getText(TanksLocale.TEXT_PARTNER_REGISTARTION_FORM_CHOOSE_NAME_TEXT);
this.infoLabel.y = this._margin;
this.infoLabel.x = this._border;
this._inputsLeftMargin = this._border + 5 + this._callsignInput._label.width;
this._callsignInput.x = this._border;
this._callsignInput.y = this.infoLabel.y + this.infoLabel.height + this._margin - 5;
this._callsignInput.width = this._windowWidth - 2 * this._border;
this._callsignInput.maxChars = RegistrationCommonElementsSection.MAX_CHARS_CALLSIGN;
this._callsignInput.tabIndex = 0;
this._callsignInput.validValue = true;
this._callSignCheckIcon.x = this._windowWidth - this._margin - this._callSignCheckIcon.width - 10;
this._callSignCheckIcon.y = this._callsignInput.y + 7;
this._acceptRulesCheckBox.x = this._border;
this._acceptRulesCheckBox.y = this._callsignInput.y + this._callsignInput.height + this._margin - 6;
this._window.addChild(this._acceptRulesCheckBox);
this._rulesButton = new LabelBase();
this._rulesButton.x = this._border + this._acceptRulesCheckBox.width;
this._rulesButton.y = this._acceptRulesCheckBox.y;
this._rulesButton.multiline = true;
this._rulesButton.wordWrap = true;
this._rulesButton.htmlText = localeService.getText(TanksLocale.TEXT_REGISTER_FORM_AGREEMENT_NOTE_TEXT);
this._rulesButton.width = this._windowWidth - this._rulesButton.x - this._border;
this._window.addChild(this._rulesButton);
this._continueButton.label = localeService.getText(TanksLocale.TEXT_PARTNER_REGISTARTION_FORM_CONTINUE);
this._continueButton.enable = false;
this._continueButton.x = this._windowWidth - this._border - this._continueButton.width;
this._continueButton.y = this._rulesButton.y + this._rulesButton.height + this._margin - 8;
this._window.addChild(this._continueButton);
this._haveAccountLabel.x = this._border;
this._haveAccountLabel.multiline = true;
this._haveAccountLabel.wordWrap = true;
this._haveAccountLabel.width = this._windowWidth - this._haveAccountLabel.x - this._margin - this._continueButton.width;
this._haveAccountLabel.htmlText = localeService.getText(TanksLocale.TEXT_PARTNER_REGISTARTION_FORM_LOGIN_LINK_TEXT);
this._haveAccountLabel.y = this._continueButton.y + this._continueButton.height / 2 - this._haveAccountLabel.height / 2;
this._haveAccountLabel.visible = this._allowExternalLogin;
this._window.addChild(this._haveAccountLabel);
this._checkCallsignTimer = new Timer(this.checkCallsignDelay,1);
this._checkSymbolAllowedTimer = new Timer(this.checkSymbolAllowedDelay,1);
this._backgroundContainer = new Sprite();
addChild(this._backgroundContainer);
this._window.addChild(this._callSignCheckIcon);
addChild(this._window);
this._freeUidsForm = new FreeUidsForm();
this._freeUidsForm.x = this._callsignInput.x;
this._freeUidsForm.y = this._callsignInput.y + this._callsignInput.height;
this._freeUidsForm.width = this._windowWidth - 2 * this._border;
addChild(this._freeUidsForm);
this.createBubbles();
this._window.height = Math.max(this._windowHeight,this._continueButton.y + this._continueButton.height + this._margin);
this.setEvent();
display.stage.focus = this._callsignInput.textField;
this.alignYourself(null);
addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
registrationUXService.logNavigationFinish();
}
private function onAddedToStage(param1:Event) : void {
removeEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemovedFromStage);
stage.addEventListener(Event.RESIZE,this.alignYourself);
this.alignYourself(null);
if(Boolean(this._backgroundImage)) {
this.setBackground(this._backgroundImage);
}
}
private function onRemovedFromStage(param1:Event) : void {
this._freeUidsForm.destroy();
stage.removeEventListener(Event.RESIZE,this.alignYourself);
}
public function setBackground(param1:Bitmap) : void {
if(this._backgroundContainer.numChildren == 0) {
this._backgroundImage = param1;
this._backgroundContainer.addChild(param1);
this.alignYourself(null);
}
}
private function createBubbles() : void {
var local1:ILocaleService = this.injector.getInstance(ILocaleService);
this._nameIsNotUniqueBubble = EntranceBubbleFactory.nameIsNotUniqueinPartnerBubble();
this._nameIsIncorrectBubble = EntranceBubbleFactory.nameIsIncorrectinPartnerBubble();
this._symbolIsNotAllowedBubble = EntranceBubbleFactory.symbolIsNotAllowedinPartnerBubble();
}
private function setEvent() : void {
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
display.stage.addEventListener(Event.RESIZE,this.alignYourself);
this._callsignInput.addEventListener(LoginFormEvent.TEXT_CHANGED,this.onCallsignChanged);
this._callsignInput.addEventListener(KeyboardEvent.KEY_DOWN,this.onPlayClickedKey);
this._continueButton.addEventListener(MouseEvent.CLICK,this.onRegisterButtonClick);
this._haveAccountLabel.addEventListener(TextEvent.LINK,this.onHaveAccountClick);
this._rulesButton.addEventListener(TextEvent.LINK,this.onRules);
this._checkCallsignTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onCallsignCheckTimerComplete);
this._checkSymbolAllowedTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onSymbolAllowedChanged);
this._freeUidsForm.addEventListener(FreeUidsFormEvent.CLICK_ITEM,this.onFreeUidsFormSelectedItem);
this._freeUidsForm.addEventListener(FreeUidsFormEvent.FOCUS_OUT,this.onFreeUidsFormFocusOut);
this._callsignInput.textField.addEventListener(FocusEvent.FOCUS_IN,this.onCallsignFocusIn);
this._acceptRulesCheckBox.addEventListener(CheckBoxEvent.STATE_CHANGED,this.onCheckRulesChanged);
}
private function onHaveAccountClick(param1:TextEvent) : void {
if(param1.text == "haveAcc") {
dispatchEvent(new PartnersEvent(PartnersEvent.START_LOGIN));
}
}
private function removeEvent() : void {
removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
display.stage.removeEventListener(Event.RESIZE,this.alignYourself);
this._callsignInput.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.onCallsignChanged);
this._callsignInput.removeEventListener(KeyboardEvent.KEY_DOWN,this.onPlayClickedKey);
this._continueButton.removeEventListener(MouseEvent.CLICK,this.onRegisterButtonClick);
this._haveAccountLabel.removeEventListener(TextEvent.LINK,this.onHaveAccountClick);
this._rulesButton.removeEventListener(TextEvent.LINK,this.onRules);
this._checkCallsignTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.onCallsignCheckTimerComplete);
this._checkSymbolAllowedTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.onSymbolAllowedChanged);
this._freeUidsForm.removeEventListener(FreeUidsFormEvent.CLICK_ITEM,this.onFreeUidsFormSelectedItem);
this._freeUidsForm.removeEventListener(FreeUidsFormEvent.FOCUS_OUT,this.onFreeUidsFormFocusOut);
this._callsignInput.textField.removeEventListener(FocusEvent.FOCUS_IN,this.onCallsignFocusIn);
this._acceptRulesCheckBox.removeEventListener(CheckBoxEvent.STATE_CHANGED,this.onCheckRulesChanged);
}
private function onRemoveFromStage(param1:Event) : void {
this._checkCallsignTimer.stop();
this._checkSymbolAllowedTimer.stop();
this.removeEvent();
}
private function onCallsignChanged(param1:LoginFormEvent = null) : void {
this._callsignValidated = false;
this._callsignInput.validValue = true;
this._nameIsIncorrectBubble.hide();
this._nameIsNotUniqueBubble.hide();
this._symbolIsNotAllowedBubble.hide();
this._callSignCheckIcon.turnOff();
this._isFreeUidsFormAlreadyShowed = false;
this.hideFreeUidsForm();
this._checkCallsignTimer.reset();
this._checkCallsignTimer.start();
var local2:String = this._callsignInput.value;
if(!validateService.isValidIdentificationStringForRegistration(local2)) {
this._checkSymbolAllowedTimer.reset();
this._checkSymbolAllowedTimer.start();
registrationUXService.logCountableFormAction(RegistrationUXFormAction.FORBIDDEN_CHARACTERS_TYPED,validateService.getForbiddenCharactersCountForRegistration(local2));
registrationUXService.logCountableFormAction(RegistrationUXFormAction.FORBIDDEN_LETTERS_TYPED,validateService.getForbiddenLettersCountForRegistration(local2));
this._callsignInput.value = local2.replace(ValidateService.NOT_ALLOWED_PATTERN_FOR_REGISTRATION,"");
this.alertAboutSymbolIsNotAllowed();
}
this.togglePlayButton();
}
private function onCheckRulesChanged(param1:CheckBoxEvent) : void {
if(this._acceptRulesCheckBox.checked) {
registrationUXService.logFormAction(RegistrationUXFormAction.USER_AGREEMENT_ACCEPTED);
}
this.togglePlayButton();
}
private function togglePlayButton() : void {
this._continueButton.enable = this._callsignValidated && this._acceptRulesCheckBox.checked;
}
private function alertAboutSymbolIsNotAllowed() : void {
this._callsignInput.validValue = false;
this._callSignCheckIcon.markAsInvalid();
this._window.addChild(this._symbolIsNotAllowedBubble);
registrationUXService.logFormAction(RegistrationUXFormAction.FORBIDDEN_USERNAME_TYPED);
}
public function alertAboutFreeUid() : void {
registrationUXService.logFormAction(RegistrationUXFormAction.CORRECT_USERNAME_TYPED);
this._callsignInput.validValue = true;
this._callsignValidated = true;
this._callSignCheckIcon.markAsValid();
this.togglePlayButton();
}
public function alertAboutBusyUid(param1:Vector.<String>) : void {
registrationUXService.logFormAction(RegistrationUXFormAction.BUSY_USERNAME_TYPED);
this._symbolIsNotAllowedBubble.hide();
this._callsignInput.validValue = false;
this._callSignCheckIcon.markAsInvalid();
this._callSignCheckIcon.addChild(this._nameIsNotUniqueBubble);
this._nameIsNotUniqueBubble.visible = true;
if(param1.length != 0) {
this._isFreeUidsFormAlreadyShowed = true;
this._nameIsNotUniqueBubble.visible = false;
this._freeUidsForm.create(param1);
}
this.togglePlayButton();
}
public function alertAboutIncorrectUid() : void {
registrationUXService.logFormAction(RegistrationUXFormAction.FORBIDDEN_USERNAME_TYPED);
this._symbolIsNotAllowedBubble.hide();
this._callsignInput.validValue = false;
this._callSignCheckIcon.markAsInvalid();
this._callSignCheckIcon.addChild(this._nameIsIncorrectBubble);
this.togglePlayButton();
}
private function onPlayClickedKey(param1:KeyboardEvent) : void {
if(param1.keyCode == Keyboard.ENTER && this._continueButton.enable) {
this.onRegisterButtonClick();
}
}
private function onCallsignCheckTimerComplete(param1:TimerEvent) : void {
if(validateService.isUidValid(this._callsignInput.value)) {
this._callSignCheckIcon.startProgress();
dispatchEvent(new CheckCallsignEvent(this.callsign));
} else {
this._callsignInput.validValue = true;
this._callSignCheckIcon.turnOff();
if(this._callsignInput.value.length != 0) {
this.alertAboutIncorrectUid();
}
}
}
private function onSymbolAllowedChanged(param1:TimerEvent) : void {
this._symbolIsNotAllowedBubble.hide();
}
private function onFreeUidsFormSelectedItem(param1:FreeUidsFormEvent) : void {
registrationUXService.logFormAction(RegistrationUXFormAction.USERNAME_OFFER_ACCEPTED);
this.callsign = param1.uid;
this.hideFreeUidsForm();
}
private function onFreeUidsFormFocusOut(param1:FreeUidsFormEvent) : void {
this.hideFreeUidsForm();
}
private function hideFreeUidsForm() : void {
this._freeUidsForm.hide();
this._nameIsNotUniqueBubble.visible = true;
}
private function onCallsignFocusIn(param1:FocusEvent) : void {
if(this._isFreeUidsFormAlreadyShowed) {
this._nameIsNotUniqueBubble.visible = false;
this._freeUidsForm.show();
}
}
private function onRegisterButtonClick(param1:MouseEvent = null) : void {
this._continueButton.enable = false;
dispatchEvent(new FinishPartnerRegisterEvent(this.callsign));
}
private function onRules(param1:TextEvent) : void {
var local2:ViewText = new ViewText();
this.entranceView.addChild(local2);
switch(param1.text) {
case RulesType.RULES:
local2.text = localeService.getText(TanksLocale.TEXT_GAME_RULES);
break;
case RulesType.EULA:
local2.text = localeService.getText(TanksLocale.TEXT_GAME_TERMS);
break;
case RulesType.PRIVACY_POLICY:
local2.text = localeService.getText(TanksLocale.TEXT_GAME_PRIVACY_POLICY);
break;
case RulesType.PARTNER_EULA:
local2.text = localeService.getText(TanksLocale.TEXT_PARTNER_GAME_TERMS);
}
}
private function alignYourself(param1:Event) : void {
this.x = int((display.stage.stageWidth - this._windowWidth) / 2);
this.y = int((display.stage.stageHeight - this._window.height) / 2);
if(Boolean(this._backgroundImage)) {
graphics.clear();
graphics.beginFill(0);
graphics.drawRect(-this.x,-this.y,display.stage.width,display.stage.height);
graphics.endFill();
this._backgroundImage.x = int(this._windowWidth - this._backgroundImage.width >> 1);
this._backgroundImage.y = -int(display.stage.stageHeight - this._window.height >> 1);
}
}
public function get callsign() : String {
return this._callsignInput.textField.text;
}
public function set callsign(param1:String) : void {
this._callsignInput.value = param1;
display.stage.focus = this._callsignInput.textField;
if(param1.length != 0) {
this.onCallsignChanged();
this._callsignInput.textField.setSelection(param1.length,param1.length);
}
}
}
}
|
package projects.tanks.client.battlefield.models.effects.duration.time {
public class DurationCC {
private var _durationTimeInMs:int;
private var _infinite:Boolean;
public function DurationCC(param1:int = 0, param2:Boolean = false) {
super();
this._durationTimeInMs = param1;
this._infinite = param2;
}
public function get durationTimeInMs() : int {
return this._durationTimeInMs;
}
public function set durationTimeInMs(param1:int) : void {
this._durationTimeInMs = param1;
}
public function get infinite() : Boolean {
return this._infinite;
}
public function set infinite(param1:Boolean) : void {
this._infinite = param1;
}
public function toString() : String {
var local1:String = "DurationCC [";
local1 += "durationTimeInMs = " + this.durationTimeInMs + " ";
local1 += "infinite = " + this.infinite + " ";
return local1 + "]";
}
}
}
|
package forms.contextmenu {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.contextmenu.BattleInviteContextMenuLabel_battleInviteClass.png")]
public class BattleInviteContextMenuLabel_battleInviteClass extends BitmapAsset {
public function BattleInviteContextMenuLabel_battleInviteClass() {
super();
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.leogaming.mobile {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class LeogamingPaymentMobileModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _confirmOrderId:Long = Long.getLong(1266259180,1673686965);
private var _confirmOrder_codeCodec:ICodec;
private var _createOrderId:Long = Long.getLong(1760251596,-1972250507);
private var _createOrder_shopItemCodec:ICodec;
private var _createOrder_phoneCodec:ICodec;
private var model:IModel;
public function LeogamingPaymentMobileModelServer(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._confirmOrder_codeCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._createOrder_shopItemCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._createOrder_phoneCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function confirmOrder(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._confirmOrder_codeCodec.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._confirmOrderId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function createOrder(param1:IGameObject, param2:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._createOrder_shopItemCodec.encode(this.protocolBuffer,param1);
this._createOrder_phoneCodec.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._createOrderId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package com.lorentz.SVG.display {
import com.lorentz.SVG.display.base.ISVGViewBox;
import com.lorentz.SVG.display.base.ISVGViewPort;
import com.lorentz.SVG.display.base.SVGContainer;
import flash.geom.Rectangle;
public class SVG extends SVGContainer implements ISVGViewPort, ISVGViewBox {
public function SVG(){
super("svg");
}
public function get svgViewBox():Rectangle {
return getAttribute("viewBox") as Rectangle;
}
public function set svgViewBox(value:Rectangle):void {
setAttribute("viewBox", value);
}
public function get svgPreserveAspectRatio():String {
return getAttribute("preserveAspectRatio") as String;
}
public function set svgPreserveAspectRatio(value:String):void {
setAttribute("preserveAspectRatio", value);
}
public function get svgX():String {
return getAttribute("x") as String;
}
public function set svgX(value:String):void {
setAttribute("x", value);
}
public function get svgY():String {
return getAttribute("y") as String;
}
public function set svgY(value:String):void {
setAttribute("y", value);
}
public function get svgWidth():String {
return getAttribute("width") as String;
}
public function set svgWidth(value:String):void {
setAttribute("width", value);
}
public function get svgHeight():String {
return getAttribute("height") as String;
}
public function set svgHeight(value:String):void {
setAttribute("height", value);
}
public function get svgOverflow():String {
return getAttribute("overflow") as String;
}
public function set svgOverflow(value:String):void {
setAttribute("overflow", value);
}
}
}
|
package alternativa.tanks.models.weapon.thunder {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.WeaponForces;
import alternativa.tanks.models.weapon.splash.Splash;
import alternativa.tanks.models.weapon.weakening.DistanceWeakening;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class RemoteThunderWeapon implements Weapon {
private static const directionToTarget:Vector3 = new Vector3();
private static const allGunParams:AllGlobalGunParams = new AllGlobalGunParams();
private var weaponForces:WeaponForces;
private var effects:IThunderEffects;
private var weaponPlatform:WeaponPlatform;
private var weakening:DistanceWeakening;
private var splash:Splash;
public function RemoteThunderWeapon(param1:WeaponForces, param2:DistanceWeakening, param3:Splash, param4:IThunderEffects) {
super();
this.weaponForces = param1;
this.effects = param4;
this.splash = param3;
this.weakening = param2;
}
public function init(param1:WeaponPlatform) : void {
this.weaponPlatform = param1;
}
public function destroy() : void {
}
public function activate() : void {
}
public function deactivate() : void {
}
public function enable() : void {
}
public function disable(param1:Boolean) : void {
}
public function reset() : void {
}
public function getStatus() : Number {
return 0;
}
public function shoot() : void {
this.weaponPlatform.getAllGunParams(allGunParams);
this.createCommonShotEffects(allGunParams);
}
private function createCommonShotEffects(param1:AllGlobalGunParams) : void {
this.weaponPlatform.getBody().addWorldForceScaled(param1.muzzlePosition,param1.direction,-this.weaponForces.getRecoilForce());
this.weaponPlatform.addDust();
this.effects.createShotEffects(this.weaponPlatform.getLocalMuzzlePosition(),this.weaponPlatform.getTurret3D());
}
public function shootStatic(param1:Vector3) : void {
this.weaponPlatform.getAllGunParams(allGunParams);
this.createCommonShotEffects(allGunParams);
this.effects.createExplosionEffects(param1);
this.effects.createExplosionMark(allGunParams.barrelOrigin,param1);
this.applyForceToSplashTargets(param1,null);
}
public function shootTarget(param1:Tank, param2:Vector3) : void {
this.weaponPlatform.getAllGunParams(allGunParams);
this.createCommonShotEffects(allGunParams);
this.effects.createExplosionEffects(param2);
this.applyForceToDirectTarget(param1,param2,allGunParams.muzzlePosition);
this.applyForceToSplashTargets(param2,param1.getBody());
}
private function applyForceToDirectTarget(param1:Tank, param2:Vector3, param3:Vector3) : void {
var local4:Number = NaN;
directionToTarget.diff(param2,param3).normalize();
if(Vector3.isFiniteVector(directionToTarget)) {
local4 = this.calculateDirectWeakeningCoefficient(param2);
param1.applyWeaponHit(param2,directionToTarget,this.weaponForces.getImpactForce() * local4);
}
}
private function calculateDirectWeakeningCoefficient(param1:Vector3) : Number {
return this.weakening.getImpactCoeff(param1.distanceTo(allGunParams.muzzlePosition));
}
private function applyForceToSplashTargets(param1:Vector3, param2:Body) : void {
var local3:Number = this.calculateDirectWeakeningCoefficient(param1);
this.splash.applySplashForce(param1,local3,param2);
}
public function getResistanceProperty() : ItemProperty {
return ItemProperty.THUNDER_RESISTANCE;
}
public function updateRecoilForce(param1:Number) : void {
this.weaponForces.setRecoilForce(param1);
}
public function fullyRecharge() : void {
}
public function weaponReloadTimeChanged(param1:int, param2:int) : void {
}
public function stun() : void {
}
public function calm(param1:int) : void {
}
}
}
|
package alternativa.tanks.model.item.info {
import flash.display.DisplayObjectContainer;
import flash.events.IEventDispatcher;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ItemActionPanelAdapt implements ItemActionPanel {
private var object:IGameObject;
private var impl:ItemActionPanel;
public function ItemActionPanelAdapt(param1:IGameObject, param2:ItemActionPanel) {
super();
this.object = param1;
this.impl = param2;
}
public function updateActionElements(param1:DisplayObjectContainer, param2:IEventDispatcher) : void {
var actionContainer:DisplayObjectContainer = param1;
var garageWindowDispatcher:IEventDispatcher = param2;
try {
Model.object = this.object;
this.impl.updateActionElements(actionContainer,garageWindowDispatcher);
}
finally {
Model.popObject();
}
}
public function handleDoubleClickOnItemPreview() : void {
try {
Model.object = this.object;
this.impl.handleDoubleClickOnItemPreview();
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.proplib.types {
public class PropData {
private var _name:String;
private var states:Object = {};
public function PropData(name:String) {
super();
this._name = name;
}
public function get name() : String {
return this._name;
}
public function addState(stateName:String, state:PropState) : void {
this.states[stateName] = state;
}
public function getStateByName(stateName:String) : PropState {
return this.states[stateName];
}
public function getDefaultState() : PropState {
return this.states[PropState.DEFAULT_NAME];
}
public function toString() : String {
return "[Prop name=" + this._name + "]";
}
public function traceProp() : void {
var stateName:String = null;
var state:PropState = null;
trace("Prop",this._name);
for(stateName in this.states) {
state = this.states[stateName];
trace("State",stateName);
state.traceState();
}
}
}
}
|
package projects.tanks.clients.flash.commons.osgi {
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.osgi.service.display.IDisplay;
import alternativa.osgi.service.launcherparams.ILauncherParams;
import projects.tanks.clients.flash.commons.models.challenge.ChallengeInfoService;
import projects.tanks.clients.flash.commons.models.challenge.ChallengesServiceImpl;
import projects.tanks.clients.flash.commons.models.challenge.shopitems.ChallengeShopItems;
import projects.tanks.clients.flash.commons.models.challenge.shopitems.ChallengeShopItemsServiceImpl;
import projects.tanks.clients.flash.commons.services.autobattleenter.AutomaticEnterExitService;
import projects.tanks.clients.flash.commons.services.externalauth.ExternalAuthParamsService;
import projects.tanks.clients.flash.commons.services.externalauth.ExternalAuthParamsServiceImpl;
import projects.tanks.clients.flash.commons.services.fullscreen.FullscreenServiceImpl;
import projects.tanks.clients.flash.commons.services.fullscreen.FullscreenStateServiceImpl;
import projects.tanks.clients.flash.commons.services.layout.LobbyLayoutService;
import projects.tanks.clients.flash.commons.services.notification.INotificationService;
import projects.tanks.clients.flash.commons.services.notification.NotificationService;
import projects.tanks.clients.flash.commons.services.notification.sound.INotificationSoundService;
import projects.tanks.clients.flash.commons.services.notification.sound.NotificationSoundService;
import projects.tanks.clients.flash.commons.services.serverhalt.IServerHaltService;
import projects.tanks.clients.flash.commons.services.serverhalt.ServerHaltService;
import projects.tanks.clients.flash.commons.services.stagequality.IStageQualityService;
import projects.tanks.clients.flash.commons.services.stagequality.StageQualityService;
import projects.tanks.clients.flash.commons.services.timeunit.ITimeUnitService;
import projects.tanks.clients.flash.commons.services.timeunit.TimeUnitService;
import projects.tanks.clients.flash.commons.services.validate.IValidateService;
import projects.tanks.clients.flash.commons.services.validate.ValidateService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.fullscreen.FullscreenService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.fullscreen.FullscreenStateService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.ILobbyLayoutService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.layout.LobbyLayoutServiceBase;
public class Activator implements IBundleActivator {
public function Activator() {
super();
}
public function start(param1:OSGi) : void {
var local2:ILobbyLayoutService = new LobbyLayoutService();
param1.registerService(ILobbyLayoutService,local2);
param1.registerService(LobbyLayoutServiceBase,local2);
param1.registerService(INotificationService,new NotificationService(local2));
param1.registerService(IServerHaltService,new ServerHaltService());
param1.registerService(IValidateService,new ValidateService());
param1.registerService(AutomaticEnterExitService,new AutomaticEnterExitService(param1));
param1.registerService(INotificationSoundService,new NotificationSoundService());
param1.registerService(IStageQualityService,new StageQualityService(local2));
param1.registerService(ITimeUnitService,new TimeUnitService());
param1.registerService(ExternalAuthParamsService,new ExternalAuthParamsServiceImpl());
var local3:IDisplay = IDisplay(OSGi.getInstance().getService(IDisplay));
var local4:ILauncherParams = ILauncherParams(OSGi.getInstance().getService(ILauncherParams));
var local5:FullscreenServiceImpl = new FullscreenServiceImpl(local3,local4);
param1.registerService(FullscreenService,local5);
param1.registerService(FullscreenStateService,new FullscreenStateServiceImpl(local3,local5.isAvailable()));
param1.registerService(ChallengeInfoService,new ChallengesServiceImpl());
param1.registerService(ChallengeShopItems,new ChallengeShopItemsServiceImpl());
}
public function stop(param1:OSGi) : void {
}
}
}
|
package alternativa.proplib.objects {
import flash.geom.Vector3D;
public class Triangle extends Polygon {
public function Triangle(v0:Vector3D, v1:Vector3D, v2:Vector3D, twoSided:Boolean) {
var points:Vector.<Number> = Vector.<Number>([v0.x,v0.y,v0.z,v1.x,v1.y,v1.z,v2.x,v2.y,v2.z]);
var uv:Vector.<Number> = Vector.<Number>([0,0,0,1,1,1]);
super(points,uv,twoSided);
}
}
}
|
package platform.loading.codecs {
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 flash.utils.IDataInput;
import platform.client.core.general.spaces.loading.dispatcher.types.ObjectsData;
import platform.client.core.general.spaces.loading.modelconstructors.ModelData;
import platform.client.fp10.core.registry.GameTypeRegistry;
import platform.client.fp10.core.registry.SpaceRegistry;
import platform.client.fp10.core.type.IGameClass;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class ObjectsDataCodec implements ICodec {
private var modelDataCodec:ModelDataCodec = new ModelDataCodec();
private var longCodec:ICodec;
private var gameTypeRegistry:GameTypeRegistry;
private var spaceRegistry:SpaceRegistry;
public function ObjectsDataCodec() {
super();
}
public function init(param1:IProtocol) : void {
this.modelDataCodec.init(param1);
this.longCodec = param1.getCodec(new TypeCodecInfo(Long,false));
this.gameTypeRegistry = OSGi.getInstance().getService(GameTypeRegistry);
this.spaceRegistry = OSGi.getInstance().getService(SpaceRegistry);
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
throw new Error("unsupported");
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ObjectsData = new ObjectsData();
local2.objects = this.decodeObjects(param1);
local2.modelsData = this.decodeModelsData(param1);
return local2;
}
private function decodeObjects(param1:ProtocolBuffer) : Vector.<IGameObject> {
var local2:IDataInput = param1.reader;
var local3:int = int(local2.readInt());
var local4:Vector.<IGameObject> = new Vector.<IGameObject>(local3);
var local5:int = 0;
while(local5 < local3) {
local4[local5] = this.readObject(param1);
local5++;
}
return local4;
}
private function readObject(param1:ProtocolBuffer) : IGameObject {
var local2:Long = Long(this.longCodec.decode(param1));
var local3:Long = Long(this.longCodec.decode(param1));
var local4:ISpace = this.spaceRegistry.currentSpace;
if(local4.rootObject.id == local2) {
local4.destroyObject(local2);
}
var local5:IGameClass = this.gameTypeRegistry.getClass(local3);
if(local5 == null) {
throw new Error("Class not found exception class=" + local3 + ", object=" + local2);
}
return local4.createObject(local2,local5,"");
}
private function decodeModelsData(param1:ProtocolBuffer) : Vector.<ModelData> {
var local2:int = int(param1.reader.readInt());
var local3:Vector.<ModelData> = new Vector.<ModelData>(local2);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ModelData(this.modelDataCodec.decode(param1));
local4++;
}
return local3;
}
}
}
|
package scpacker.gui.en
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GTanksIEN_coldload11 extends BitmapAsset
{
public function GTanksIEN_coldload11()
{
super();
}
}
}
|
package alternativa.tanks.services.tankregistry {
import alternativa.types.Long;
import platform.client.fp10.core.type.IGameObject;
public interface TankUsersRegistry {
function addUser(param1:IGameObject) : void;
function removeUser(param1:IGameObject) : void;
function getUserCount() : int;
function getUsers() : Vector.<IGameObject>;
function getUser(param1:Long) : IGameObject;
function getLocalUser() : IGameObject;
function existLocalUser() : Boolean;
}
}
|
package com.alternativaplatform.projects.tanks.client.warfare.models.effects.crystal
{
import scpacker.Base;
public class CrystalBonusModelBase extends Base
{
public function CrystalBonusModelBase()
{
super();
}
}
}
|
package alternativa.tanks.models.tank.ultimate.hunter {
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.sfx.GraphicEffect;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
import flash.display.BlendMode;
import flash.geom.Vector3D;
public class EnergyEffect extends PooledObject implements GraphicEffect {
public static const FADE:Number = 0.17;
public static const OFFSET:Number = 300;
public static const MIN:Number = 0.4;
private static const vector:Vector3D = new Vector3D();
private static const vector3:Vector3 = new Vector3();
private var container:Scene3DContainer;
private var target:Object3D;
private var charging:Number;
private var secondBegin:Number;
private var firstEnd:Number;
private var energy1:Sprite3D;
private var energy2:Sprite3D;
private var time:Number;
private var chargingSound:Sound3D;
internal var fadeOut:Boolean = false;
private var chargingSoundPlayed:Boolean = false;
public function EnergyEffect(param1:Pool) {
super(param1);
this.energy1 = new Sprite3D(700,700);
this.energy1.useLight = false;
this.energy1.useShadowMap = false;
this.energy1.blendMode = BlendMode.ADD;
this.energy1.softAttenuation = 200;
this.energy2 = new Sprite3D(700,700);
this.energy2.useLight = false;
this.energy2.useShadowMap = false;
this.energy2.blendMode = BlendMode.ADD;
this.energy2.rotation = Math.PI;
this.energy2.softAttenuation = 200;
}
public function init(param1:TextureMaterial, param2:Object3D, param3:Number, param4:Sound3D) : * {
this.target = param2;
this.charging = param3;
this.secondBegin = param3 * 0.33;
this.firstEnd = param3 - param3 * 0.13;
this.chargingSound = param4;
this.energy1.material = param1;
this.energy2.material = param1;
this.time = 0;
this.fadeOut = false;
}
public function addedToScene(param1:Scene3DContainer) : void {
this.container = param1;
param1.addChild(this.energy1);
param1.addChild(this.energy2);
this.chargingSoundPlayed = false;
}
public function play(param1:int, param2:GameCamera) : Boolean {
var local4:Number = NaN;
var local5:Number = NaN;
var local3:Number = param1 / 1000;
this.time += local3;
if(this.fadeOut) {
return false;
}
this.playSounds(param2);
vector.x = param2.x - this.target.x;
vector.y = param2.y - this.target.y;
vector.z = param2.z - this.target.z + 50;
vector.normalize();
this.energy1.x = this.target.x + vector.x * OFFSET;
this.energy1.y = this.target.y + vector.y * OFFSET;
this.energy1.z = this.target.z + vector.z * OFFSET + 100;
this.energy2.x = this.energy1.x;
this.energy2.y = this.energy1.y;
this.energy2.z = this.energy1.z;
if(this.time <= this.charging) {
local4 = this.time / this.firstEnd;
if(local4 > 1) {
local4 = 1;
}
local5 = MIN + (1 - MIN) * local4;
this.energy1.scaleX = local5;
this.energy1.scaleY = local5;
this.energy1.scaleZ = local5;
this.energy1.alpha = local4;
local4 = (this.time - this.secondBegin) / (this.charging - this.secondBegin);
if(local4 < 0) {
local4 = 0;
}
local5 = MIN + (1 - MIN) * local4;
this.energy2.scaleX = local5;
this.energy2.scaleY = local5;
this.energy2.scaleZ = local5;
this.energy2.alpha = local4;
return true;
}
if(this.time <= this.charging + FADE) {
local4 = 1 - (this.time - this.charging) / FADE;
this.energy1.alpha = local4;
this.energy2.alpha = local4;
return true;
}
return false;
}
private function playSounds(param1:GameCamera) : void {
vector3.reset(this.target.x,this.target.y,this.target.z);
if(!this.chargingSoundPlayed) {
this.chargingSound.play(0,0);
this.chargingSound.checkVolume(param1.position,vector3,param1.xAxis);
this.chargingSoundPlayed = true;
}
}
public function stop() : void {
this.fadeOut = true;
}
public function destroy() : void {
this.container.removeChild(this.energy1);
this.container.removeChild(this.energy2);
this.energy1.material = null;
this.energy2.material = null;
this.container = null;
this.target = null;
if(this.chargingSound != null) {
this.chargingSound.stop();
this.chargingSound = null;
}
recycle();
}
public function kill() : void {
this.energy1.alpha = 0;
this.energy2.alpha = 0;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapons.common.shell {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.TargetPosition;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.shell.ShellHit;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.shell.ShellState;
public class CodecShellHit implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_shotId:ICodec;
private var codec_states:ICodec;
private var codec_targets:ICodec;
public function CodecShellHit() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_shotId = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_states = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(ShellState,false),false,1));
this.codec_targets = param1.getCodec(new CollectionCodecInfo(new TypeCodecInfo(TargetPosition,false),false,1));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ShellHit = new ShellHit();
local2.shotId = this.codec_shotId.decode(param1) as int;
local2.states = this.codec_states.decode(param1) as Vector.<ShellState>;
local2.targets = this.codec_targets.decode(param1) as Vector.<TargetPosition>;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:ShellHit = ShellHit(param2);
this.codec_shotId.encode(param1,local3.shotId);
this.codec_states.encode(param1,local3.states);
this.codec_targets.encode(param1,local3.targets);
}
}
}
|
package projects.tanks.clients.flash.commons.services.notification {
import alternativa.types.Long;
public interface INotificationService {
function addNotification(param1:INotification, param2:Boolean = false) : void;
function hasNotification(param1:Long, param2:String) : Boolean;
}
}
|
package projects.tanks.client.panel.model.mobilequest.quest {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class MobileQuestModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function MobileQuestModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package utils.tweener.core {
import utils.tweener.TweenLite;
public class TweenCore {
protected static var _classInitted:Boolean;
public static const version:Number = 1.693;
protected var _delay:Number;
protected var _hasUpdate:Boolean;
protected var _rawPrevTime:Number = -1;
public var vars:Object;
public var active:Boolean;
public var gc:Boolean;
public var initted:Boolean;
public var timeline:SimpleTimeline;
public var cachedStartTime:Number;
public var cachedTime:Number;
public var cachedTotalTime:Number;
public var cachedDuration:Number;
public var cachedTotalDuration:Number;
public var cachedTimeScale:Number;
public var cachedPauseTime:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
public var prevNode:TweenCore;
public var cachedOrphan:Boolean;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var data:*;
public function TweenCore(param1:Number = 0, param2:Object = null) {
super();
this.vars = param2 != null ? param2 : {};
if(Boolean(this.vars.isGSVars)) {
this.vars = this.vars.vars;
}
this.cachedDuration = this.cachedTotalDuration = param1;
this._delay = Boolean(this.vars.delay) ? Number(this.vars.delay) : 0;
this.cachedTimeScale = Boolean(this.vars.timeScale) ? Number(this.vars.timeScale) : 1;
this.active = Boolean(param1 == 0 && this._delay == 0 && this.vars.immediateRender != false);
this.cachedTotalTime = this.cachedTime = 0;
this.data = this.vars.data;
if(!_classInitted) {
if(!isNaN(TweenLite.rootFrame)) {
return;
}
TweenLite.initClass();
_classInitted = true;
}
var local3:SimpleTimeline = this.vars.timeline is SimpleTimeline ? this.vars.timeline : (Boolean(this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline);
local3.insert(this,local3.cachedTotalTime);
if(Boolean(this.vars.reversed)) {
this.cachedReversed = true;
}
if(Boolean(this.vars.paused)) {
this.paused = true;
}
}
public function play() : void {
this.reversed = false;
this.paused = false;
}
public function pause() : void {
this.paused = true;
}
public function resume() : void {
this.paused = false;
}
public function restart(param1:Boolean = false, param2:Boolean = true) : void {
this.reversed = false;
this.paused = false;
this.setTotalTime(param1 ? -this._delay : 0,param2);
}
public function reverse(param1:Boolean = true) : void {
this.reversed = true;
if(param1) {
this.paused = false;
} else if(this.gc) {
this.setEnabled(true,false);
}
}
public function renderTime(param1:Number, param2:Boolean = false, param3:Boolean = false) : void {
}
public function complete(param1:Boolean = false, param2:Boolean = false) : void {
if(!param1) {
this.renderTime(this.totalDuration,param2,false);
return;
}
if(this.timeline.autoRemoveChildren) {
this.setEnabled(false,false);
} else {
this.active = false;
}
if(!param2) {
if(this.vars.onComplete && this.cachedTotalTime >= this.cachedTotalDuration && !this.cachedReversed) {
this.vars.onComplete.apply(null,this.vars.onCompleteParams);
} else if(this.cachedReversed && this.cachedTotalTime == 0 && Boolean(this.vars.onReverseComplete)) {
this.vars.onReverseComplete.apply(null,this.vars.onReverseCompleteParams);
}
}
}
public function invalidate() : void {
}
public function setEnabled(param1:Boolean, param2:Boolean = false) : Boolean {
this.gc = !param1;
if(param1) {
this.active = Boolean(!this.cachedPaused && this.cachedTotalTime > 0 && this.cachedTotalTime < this.cachedTotalDuration);
if(!param2 && this.cachedOrphan) {
this.timeline.insert(this,this.cachedStartTime - this._delay);
}
} else {
this.active = false;
if(!param2 && !this.cachedOrphan) {
this.timeline.remove(this,true);
}
}
return false;
}
public function kill() : void {
this.setEnabled(false,false);
}
protected function setDirtyCache(param1:Boolean = true) : void {
var local2:TweenCore = param1 ? this : this.timeline;
while(Boolean(local2)) {
local2.cacheIsDirty = true;
local2 = local2.timeline;
}
}
protected function setTotalTime(param1:Number, param2:Boolean = false) : void {
var local3:Number = NaN;
var local4:Number = NaN;
if(Boolean(this.timeline)) {
local3 = this.cachedPaused ? this.cachedPauseTime : this.timeline.cachedTotalTime;
if(this.cachedReversed) {
local4 = this.cacheIsDirty ? this.totalDuration : this.cachedTotalDuration;
this.cachedStartTime = local3 - (local4 - param1) / this.cachedTimeScale;
} else {
this.cachedStartTime = local3 - param1 / this.cachedTimeScale;
}
if(!this.timeline.cacheIsDirty) {
this.setDirtyCache(false);
}
if(this.cachedTotalTime != param1) {
this.renderTime(param1,param2,false);
}
}
}
public function get delay() : Number {
return this._delay;
}
public function set delay(param1:Number) : void {
this.startTime += param1 - this._delay;
this._delay = param1;
}
public function get duration() : Number {
return this.cachedDuration;
}
public function set duration(param1:Number) : void {
var local2:Number = param1 / this.cachedDuration;
this.cachedDuration = this.cachedTotalDuration = param1;
this.setDirtyCache(true);
if(this.active && !this.cachedPaused && param1 != 0) {
this.setTotalTime(this.cachedTotalTime * local2,true);
}
}
public function get totalDuration() : Number {
return this.cachedTotalDuration;
}
public function set totalDuration(param1:Number) : void {
this.duration = param1;
}
public function get currentTime() : Number {
return this.cachedTime;
}
public function set currentTime(param1:Number) : void {
this.setTotalTime(param1,false);
}
public function get totalTime() : Number {
return this.cachedTotalTime;
}
public function set totalTime(param1:Number) : void {
this.setTotalTime(param1,false);
}
public function get startTime() : Number {
return this.cachedStartTime;
}
public function set startTime(param1:Number) : void {
if(this.timeline != null && (param1 != this.cachedStartTime || this.gc)) {
this.timeline.insert(this,param1 - this._delay);
} else {
this.cachedStartTime = param1;
}
}
public function get reversed() : Boolean {
return this.cachedReversed;
}
public function set reversed(param1:Boolean) : void {
if(param1 != this.cachedReversed) {
this.cachedReversed = param1;
this.setTotalTime(this.cachedTotalTime,true);
}
}
public function get paused() : Boolean {
return this.cachedPaused;
}
public function set paused(param1:Boolean) : void {
if(param1 != this.cachedPaused && Boolean(this.timeline)) {
if(param1) {
this.cachedPauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime += this.timeline.rawTime - this.cachedPauseTime;
this.cachedPauseTime = NaN;
this.setDirtyCache(false);
}
this.cachedPaused = param1;
this.active = Boolean(!this.cachedPaused && this.cachedTotalTime > 0 && this.cachedTotalTime < this.cachedTotalDuration);
}
if(!param1 && this.gc) {
this.setEnabled(true,false);
}
}
}
}
|
package alternativa.tanks.models.battle.battlefield {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class BattleModelAdapt implements BattleModel {
private var object:IGameObject;
private var impl:BattleModel;
public function BattleModelAdapt(param1:IGameObject, param2:BattleModel) {
super();
this.object = param1;
this.impl = param2;
}
public function getBattleType() : BattleType {
var result:BattleType = null;
try {
Model.object = this.object;
result = this.impl.getBattleType();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs {
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow;
public interface IDialogsService {
function addDialog(param1:DialogWindow) : void;
function enqueueDialog(param1:DialogWindow) : void;
function removeDialog(param1:DialogWindow) : void;
function centerDialog(param1:DialogWindow) : void;
}
}
|
package {
import flash.display.BitmapData;
[Embed(source="/_assets/goldButtonCenter_over.png")]
public dynamic class goldButtonCenter_over extends BitmapData {
public function goldButtonCenter_over(param1:int = 62, param2:int = 29) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.gui.shop.payment.item {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.shop.payment.item.PaymentItemSkin_overStateClass.png")]
public class PaymentItemSkin_overStateClass extends BitmapAsset {
public function PaymentItemSkin_overStateClass() {
super();
}
}
}
|
package alternativa.tanks.battle.objects.tank {
public class HullNotFoundError extends Error {
public function HullNotFoundError() {
super();
}
}
}
|
package alternativa.tanks.models.weapons.targeting.priority {
import alternativa.physics.Body;
import alternativa.physics.collision.types.RayHit;
import alternativa.tanks.models.weapons.targeting.direction.sector.TargetingSector;
import alternativa.tanks.models.weapons.targeting.priority.targeting.TargetPriorityCalculator;
public class TargetingPriorityCalculator {
private var priorityEvalutor:TargetPriorityCalculator;
private var weakingCoef:Number;
public function TargetingPriorityCalculator(param1:TargetPriorityCalculator, param2:Number = 0) {
super();
this.priorityEvalutor = param1;
this.weakingCoef = param2;
}
public function getPriorityForSectors(param1:Number, param2:Vector.<TargetingSector>) : Number {
var local5:TargetingSector = null;
var local3:Number = 0;
var local4:int = param2.length - 1;
while(local4 >= 0) {
local5 = param2[local4];
local3 = Math.max(this.getPriorityForSector(local5,param1) + this.weakingCoef * local3,local3);
local4--;
}
return local3;
}
private function getPriorityForSector(param1:TargetingSector, param2:Number) : Number {
return this.priorityEvalutor.getTargetPriority(param1.getTank(),param1.getDistance(),param2);
}
public function getPriorityForRayHits(param1:Number, param2:Vector.<RayHit>) : Number {
var local5:RayHit = null;
var local3:Number = 1;
var local4:Number = 0;
for each(local5 in param2) {
local4 += this.getPriorityForRayHit(param1,local5) * local3;
local3 *= this.weakingCoef;
}
return local4;
}
private function getPriorityForRayHit(param1:Number, param2:RayHit) : Number {
var local3:Body = param2.shape.body;
if(param2.staticHit) {
return 0;
}
return this.priorityEvalutor.getTargetPriority(local3.tank,param2.t,param1);
}
}
}
|
package alternativa.math
{
import flash.geom.Vector3D;
public class Matrix3
{
public static const ZERO:Matrix3 = new Matrix3(0,0,0,0,0,0,0,0,0);
public static const IDENTITY:Matrix3 = new Matrix3();
public var a:Number;
public var b:Number;
public var c:Number;
public var e:Number;
public var f:Number;
public var g:Number;
public var i:Number;
public var j:Number;
public var k:Number;
public function Matrix3(a:Number = 1, b:Number = 0, c:Number = 0, e:Number = 0, f:Number = 1, g:Number = 0, i:Number = 0, j:Number = 0, k:Number = 1)
{
super();
this.a = a;
this.b = b;
this.c = c;
this.e = e;
this.f = f;
this.g = g;
this.i = i;
this.j = j;
this.k = k;
}
public function toIdentity() : Matrix3
{
this.a = this.f = this.k = 1;
this.b = this.c = this.e = this.g = this.i = this.j = 0;
return this;
}
public function invert() : Matrix3
{
var aa:Number = this.a;
var bb:Number = this.b;
var cc:Number = this.c;
var ee:Number = this.e;
var ff:Number = this.f;
var gg:Number = this.g;
var ii:Number = this.i;
var jj:Number = this.j;
var kk:Number = this.k;
var det:Number = 1 / (-cc * ff * ii + bb * gg * ii + cc * ee * jj - aa * gg * jj - bb * ee * kk + aa * ff * kk);
this.a = (ff * kk - gg * jj) * det;
this.b = (cc * jj - bb * kk) * det;
this.c = (bb * gg - cc * ff) * det;
this.e = (gg * ii - ee * kk) * det;
this.f = (aa * kk - cc * ii) * det;
this.g = (cc * ee - aa * gg) * det;
this.i = (ee * jj - ff * ii) * det;
this.j = (bb * ii - aa * jj) * det;
this.k = (aa * ff - bb * ee) * det;
return this;
}
public function append(m:Matrix3) : Matrix3
{
var aa:Number = this.a;
var bb:Number = this.b;
var cc:Number = this.c;
var ee:Number = this.e;
var ff:Number = this.f;
var gg:Number = this.g;
var ii:Number = this.i;
var jj:Number = this.j;
var kk:Number = this.k;
this.a = m.a * aa + m.b * ee + m.c * ii;
this.b = m.a * bb + m.b * ff + m.c * jj;
this.c = m.a * cc + m.b * gg + m.c * kk;
this.e = m.e * aa + m.f * ee + m.g * ii;
this.f = m.e * bb + m.f * ff + m.g * jj;
this.g = m.e * cc + m.f * gg + m.g * kk;
this.i = m.i * aa + m.j * ee + m.k * ii;
this.j = m.i * bb + m.j * ff + m.k * jj;
this.k = m.i * cc + m.j * gg + m.k * kk;
return this;
}
public function prepend(m:Matrix3) : Matrix3
{
var aa:Number = this.a;
var bb:Number = this.b;
var cc:Number = this.c;
var ee:Number = this.e;
var ff:Number = this.f;
var gg:Number = this.g;
var ii:Number = this.i;
var jj:Number = this.j;
var kk:Number = this.k;
this.a = aa * m.a + bb * m.e + cc * m.i;
this.b = aa * m.b + bb * m.f + cc * m.j;
this.c = aa * m.c + bb * m.g + cc * m.k;
this.e = ee * m.a + ff * m.e + gg * m.i;
this.f = ee * m.b + ff * m.f + gg * m.j;
this.g = ee * m.c + ff * m.g + gg * m.k;
this.i = ii * m.a + jj * m.e + kk * m.i;
this.j = ii * m.b + jj * m.f + kk * m.j;
this.k = ii * m.c + jj * m.g + kk * m.k;
return this;
}
public function prependTransposed(m:Matrix3) : Matrix3
{
var aa:Number = this.a;
var bb:Number = this.b;
var cc:Number = this.c;
var ee:Number = this.e;
var ff:Number = this.f;
var gg:Number = this.g;
var ii:Number = this.i;
var jj:Number = this.j;
var kk:Number = this.k;
this.a = aa * m.a + bb * m.b + cc * m.c;
this.b = aa * m.e + bb * m.f + cc * m.g;
this.c = aa * m.i + bb * m.j + cc * m.k;
this.e = ee * m.a + ff * m.b + gg * m.c;
this.f = ee * m.e + ff * m.f + gg * m.g;
this.g = ee * m.i + ff * m.j + gg * m.k;
this.i = ii * m.a + jj * m.b + kk * m.c;
this.j = ii * m.e + jj * m.f + kk * m.g;
this.k = ii * m.i + jj * m.j + kk * m.k;
return this;
}
public function add(m:Matrix3) : Matrix3
{
this.a += m.a;
this.b += m.b;
this.c += m.c;
this.e += m.e;
this.f += m.f;
this.g += m.g;
this.i += m.i;
this.j += m.j;
this.k += m.k;
return this;
}
public function subtract(m:Matrix3) : Matrix3
{
this.a -= m.a;
this.b -= m.b;
this.c -= m.c;
this.e -= m.e;
this.f -= m.f;
this.g -= m.g;
this.i -= m.i;
this.j -= m.j;
this.k -= m.k;
return this;
}
public function transpose() : Matrix3
{
var tmp:Number = this.b;
this.b = this.e;
this.e = tmp;
tmp = this.c;
this.c = this.i;
this.i = tmp;
tmp = this.g;
this.g = this.j;
this.j = tmp;
return this;
}
public function transformVector(vin:Vector3, vout:Vector3) : void
{
vout.x = this.a * vin.x + this.b * vin.y + this.c * vin.z;
vout.y = this.e * vin.x + this.f * vin.y + this.g * vin.z;
vout.z = this.i * vin.x + this.j * vin.y + this.k * vin.z;
}
public function transformVectorInverse(vin:Vector3, vout:Vector3) : void
{
vout.x = this.a * vin.x + this.e * vin.y + this.i * vin.z;
vout.y = this.b * vin.x + this.f * vin.y + this.j * vin.z;
vout.z = this.c * vin.x + this.g * vin.y + this.k * vin.z;
}
public function transformVector3To3D(vin:Vector3, vout:Vector3D) : void
{
vout.x = this.a * vin.x + this.b * vin.y + this.c * vin.z;
vout.y = this.e * vin.x + this.f * vin.y + this.g * vin.z;
vout.z = this.i * vin.x + this.j * vin.y + this.k * vin.z;
}
public function createSkewSymmetric(v:Vector3) : Matrix3
{
this.a = this.f = this.k = 0;
this.b = -v.z;
this.c = v.y;
this.e = v.z;
this.g = -v.x;
this.i = -v.y;
this.j = v.x;
return this;
}
public function copy(m:Matrix3) : Matrix3
{
this.a = m.a;
this.b = m.b;
this.c = m.c;
this.e = m.e;
this.f = m.f;
this.g = m.g;
this.i = m.i;
this.j = m.j;
this.k = m.k;
return this;
}
public function setRotationMatrix(rx:Number, ry:Number, rz:Number) : Matrix3
{
var cosX:Number = Math.cos(rx);
var sinX:Number = Math.sin(rx);
var cosY:Number = Math.cos(ry);
var sinY:Number = Math.sin(ry);
var cosZ:Number = Math.cos(rz);
var sinZ:Number = Math.sin(rz);
var cosZsinY:Number = cosZ * sinY;
var sinZsinY:Number = sinZ * sinY;
this.a = cosZ * cosY;
this.b = cosZsinY * sinX - sinZ * cosX;
this.c = cosZsinY * cosX + sinZ * sinX;
this.e = sinZ * cosY;
this.f = sinZsinY * sinX + cosZ * cosX;
this.g = sinZsinY * cosX - cosZ * sinX;
this.i = -sinY;
this.j = cosY * sinX;
this.k = cosY * cosX;
return this;
}
public function fromAxisAngle(axis:Vector3, angle:Number) : void
{
var c1:Number = Math.cos(angle);
var s:Number = Math.sin(angle);
var t:Number = 1 - c1;
var x:Number = axis.x;
var y:Number = axis.y;
var z:Number = axis.z;
this.a = t * x * x + c1;
this.b = t * x * y - z * s;
this.c = t * x * z + y * s;
this.e = t * x * y + z * s;
this.f = t * y * y + c1;
this.g = t * y * z - x * s;
this.i = t * x * z - y * s;
this.j = t * y * z + x * s;
this.k = t * z * z + c1;
}
public function clone() : Matrix3
{
return new Matrix3(this.a,this.b,this.c,this.e,this.f,this.g,this.i,this.j,this.k);
}
public function toString() : String
{
return "[Matrix3 (" + this.a + ", " + this.b + ", " + this.c + "), (" + this.e + ", " + this.f + ", " + this.g + "), (" + this.i + ", " + this.j + ", " + this.k + ")]";
}
public function getEulerAngles(angles:Vector3) : void
{
if(-1 < this.i && this.i < 1)
{
angles.x = Math.atan2(this.j,this.k);
angles.y = -Math.asin(this.i);
angles.z = Math.atan2(this.e,this.a);
}
else
{
angles.x = 0;
angles.y = this.i <= -1 ? Number(Number(Math.PI)) : Number(Number(-Math.PI));
angles.y *= 0.5;
angles.z = Math.atan2(-this.b,this.f);
}
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.sms {
import projects.tanks.client.panel.model.payment.modes.sms.types.SMSNumber;
import projects.tanks.client.panel.model.payment.modes.sms.types.SMSOperator;
public interface ISMSPayModeModelBase {
function setNumbers(param1:Vector.<SMSNumber>) : void;
function setOperators(param1:Vector.<SMSOperator>) : void;
}
}
|
package _codec.projects.tanks.client.battleservice.model.types {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.battleservice.model.types.BattleSuspicionLevel;
public class CodecBattleSuspicionLevel implements ICodec {
public function CodecBattleSuspicionLevel() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BattleSuspicionLevel = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = BattleSuspicionLevel.NONE;
break;
case 1:
local2 = BattleSuspicionLevel.LOW;
break;
case 2:
local2 = BattleSuspicionLevel.HIGH;
}
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:int = int(param2.value);
param1.writer.writeInt(local3);
}
}
}
|
package alternativa.tanks.model.payment.modes.errors {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ErrorDescriptionAdapt implements ErrorDescription {
private var object:IGameObject;
private var impl:ErrorDescription;
public function ErrorDescriptionAdapt(param1:IGameObject, param2:ErrorDescription) {
super();
this.object = param1;
this.impl = param2;
}
public function showError(param1:int) : void {
var errorCode:int = param1;
try {
Model.object = this.object;
this.impl.showError(errorCode);
}
finally {
Model.popObject();
}
}
public function showUnknownError() : void {
try {
Model.object = this.object;
this.impl.showUnknownError();
}
finally {
Model.popObject();
}
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.gui.group {
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.gui.group.MatchmakingGroupInfoCC;
public class VectorCodecMatchmakingGroupInfoCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecMatchmakingGroupInfoCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(MatchmakingGroupInfoCC,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.<MatchmakingGroupInfoCC> = new Vector.<MatchmakingGroupInfoCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = MatchmakingGroupInfoCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:MatchmakingGroupInfoCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<MatchmakingGroupInfoCC> = Vector.<MatchmakingGroupInfoCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.engine3d.loaders.collada {
use namespace collada;
public class DaeEffectParam extends DaeElement {
private var effect:DaeEffect;
public function DaeEffectParam(param1:XML, param2:DaeEffect) {
super(param1,param2.document);
this.effect = param2;
}
public function getFloat(param1:Object) : Number {
var local4:DaeParam = null;
var local2:XML = data.float[0];
if(local2 != null) {
return parseNumber(local2);
}
var local3:XML = data.param.@ref[0];
if(local3 != null) {
local4 = this.effect.getParam(local3.toString(),param1);
if(local4 != null) {
return local4.getFloat();
}
}
return NaN;
}
public function getColor(param1:Object) : Array {
var local4:DaeParam = null;
var local2:XML = data.color[0];
if(local2 != null) {
return parseNumbersArray(local2);
}
var local3:XML = data.param.@ref[0];
if(local3 != null) {
local4 = this.effect.getParam(local3.toString(),param1);
if(local4 != null) {
return local4.getFloat4();
}
}
return null;
}
private function get texture() : String {
var local1:XML = data.texture.@texture[0];
return local1 == null ? null : local1.toString();
}
public function getSampler(param1:Object) : DaeParam {
var local2:String = this.texture;
if(local2 != null) {
return this.effect.getParam(local2,param1);
}
return null;
}
public function getImage(param1:Object) : DaeImage {
var local3:String = null;
var local4:DaeParam = null;
var local2:DaeParam = this.getSampler(param1);
if(local2 != null) {
local3 = local2.surfaceSID;
if(local3 != null) {
local4 = this.effect.getParam(local3,param1);
if(local4 != null) {
return local4.image;
}
return null;
}
return local2.image;
}
return document.findImageByID(this.texture);
}
public function get texCoord() : String {
var local1:XML = data.texture.@texcoord[0];
return local1 == null ? null : local1.toString();
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.serverslist {
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
public class ServersListLoader extends EventDispatcher {
private var url:String;
private var serversList:Vector.<ServerNode>;
private var serverPrefix:String = "main.c";
public function ServersListLoader(url:String, serverPrefix:String) {
super();
this.url = url;
this.serverPrefix = serverPrefix;
}
public function loadServersList() : void {
var urlLoader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(this.url + "?rnd=" + Math.random());
request.method = URLRequestMethod.GET;
urlLoader.addEventListener(Event.COMPLETE,this.onServerListLoaded);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR,this.onError);
urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onError);
urlLoader.load(request);
}
private function onServerListLoaded(event:Event) : void {
var name:String = null;
var serverNumber:int = 0;
var usersOnline:int = 0;
var result:Object = JSON.parse(unescape(event.target.data));
var servers:Object = result["nodes"];
this.serversList = new Vector.<ServerNode>();
for(name in servers) {
if(name.substr(0,this.serverPrefix.length) == this.serverPrefix) {
serverNumber = parseInt(name.substr(this.serverPrefix.length));
usersOnline = int(servers[name]["online"]);
this.serversList.push(new ServerNode(serverNumber,usersOnline));
}
}
dispatchEvent(new ServersListEvent(ServersListEvent.LOADED,this.serversList));
}
private function onError(event:Event) : void {
dispatchEvent(new ServersListEvent(ServersListEvent.ERROR));
}
}
}
|
package projects.tanks.client.chat.models {
public interface ICommunicationPanelModelBase {
}
}
|
package projects.tanks.client.battlefield.bonus.randomgold.notification {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class RandomGoldBonusTakeModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function RandomGoldBonusTakeModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.gui.friends.list.renderer {
import controls.base.LabelBase;
import controls.statassets.StatLineHeader;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
public class FriendsHeaderItem extends Sprite {
private var _bg:StatLineHeader = new StatLineHeader();
private var _label:LabelBase = new LabelBase();
protected var _selected:Boolean = false;
protected var _width:int = 100;
protected var _height:int = 20;
public function FriendsHeaderItem(param1:String) {
super();
this._bg.width = this._width;
this._bg.height = this._height;
addChild(this._bg);
addChild(this._label);
this._label.color = 860685;
this._label.x = 0;
this._label.y = 0;
this._label.mouseEnabled = false;
this._label.autoSize = TextFieldAutoSize.NONE;
this._label.align = param1;
this._label.height = 18;
}
public function set selected(param1:Boolean) : void {
this._selected = param1;
this._bg.selected = this._selected;
}
public function set label(param1:String) : void {
this._label.text = param1;
}
override public function set width(param1:Number) : void {
this._width = Math.floor(param1);
this._bg.width = param1;
this._label.width = this._width - 4;
}
override public function set height(param1:Number) : void {
this._height = Math.floor(param1);
this._bg.height = param1;
}
public function setLabelPosX(param1:int) : void {
this._label.x = param1;
}
}
}
|
package alternativa.tanks.models.tank.explosion {
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.sfx.LightAnimation;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ITankExplosionModelAdapt implements ITankExplosionModel {
private var object:IGameObject;
private var impl:ITankExplosionModel;
public function ITankExplosionModelAdapt(param1:IGameObject, param2:ITankExplosionModel) {
super();
this.object = param1;
this.impl = param2;
}
public function createExplosionEffects(param1:IGameObject, param2:Tank, param3:LightAnimation) : void {
var clientObject:IGameObject = param1;
var tank:Tank = param2;
var lighting:LightAnimation = param3;
try {
Model.object = this.object;
this.impl.createExplosionEffects(clientObject,tank,lighting);
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.models.battlefield.event
{
import flash.events.Event;
public class ExitEvent extends Event
{
public static const EXIT:String = "exit";
public function ExitEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
{
super(type,bubbles,cancelable);
}
}
}
|
package assets.button {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.button.button_def_OVER_CENTER.png")]
public dynamic class button_def_OVER_CENTER extends BitmapData {
public function button_def_OVER_CENTER(param1:int = 201, param2:int = 30) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.promo {
import alternativa.tanks.gui.shop.shopitems.item.OtherShopItemButton;
import flash.display.Bitmap;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class ShopPromoCodeButton extends OtherShopItemButton {
private static const promoCodePreviewClass:Class = ShopPromoCodeButton_promoCodePreviewClass;
public function ShopPromoCodeButton(param1:IGameObject) {
this.preview = new Bitmap(new promoCodePreviewClass().bitmapData);
super(param1,localeService.getText(TanksLocale.TEXT_PROMO_CODE_SHOP_LABEL));
updateLazyLoadedPreview();
}
override protected function align() : void {
super.align();
if(preview != null) {
preview.y += 4;
preview.x -= PADDING;
}
}
}
}
|
package utils {
import alternativa.osgi.service.locale.ILocaleService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class TimeFormatter {
[Inject]
public static var localeService:ILocaleService;
private static const MINUTE:int = 60;
private static const HOUR:int = MINUTE * 60;
private static const DAY:int = HOUR * 24;
public function TimeFormatter() {
super();
}
public static function format(param1:int) : String {
var local2:int = param1 / DAY;
param1 %= DAY;
var local3:int = param1 / HOUR;
param1 %= HOUR;
var local4:int = param1 / MINUTE;
var local5:int = param1 % MINUTE;
return formatDHMS(local2,local3,local4,local5);
}
public static function formatDHMS(param1:int, param2:int, param3:int, param4:int) : String {
var local5:String = "";
var local6:Boolean = localeService.language == "cn";
if(param1 > 0) {
local5 = add(param1,TanksLocale.TEXT_TIME_LABEL_DAY,local5);
if(!local6) {
local5 = add(param2,TanksLocale.TEXT_TIME_LABEL_HOUR,local5);
}
} else if(param2 > 0) {
local5 = add(param2,TanksLocale.TEXT_TIME_LABEL_HOUR,local5);
if(!local6) {
local5 = add(param3,TanksLocale.TEXT_TIME_LABEL_MINUTE,local5);
}
} else if(param3 > 0) {
local5 = add(param3,TanksLocale.TEXT_TIME_LABEL_MINUTE,local5);
if(!local6) {
local5 = add(param4,TanksLocale.TEXT_TIME_LABEL_SECOND,local5);
}
} else {
local5 = add(param4,TanksLocale.TEXT_TIME_LABEL_SECOND,local5);
}
return local5;
}
private static function add(param1:int, param2:String, param3:String) : String {
if(param1 > 0) {
if(param3.length > 0) {
param3 += " ";
}
param3 += param1 + localeService.getText(param2);
}
return param3;
}
}
}
|
package alternativa.tanks.view.forms.commons {
import alternativa.osgi.service.display.IDisplay;
import alternativa.tanks.controller.events.CheckCallsignEvent;
import alternativa.tanks.view.bubbles.Bubble;
import alternativa.tanks.view.bubbles.EntranceBubbleFactory;
import alternativa.tanks.view.forms.freeuids.FreeUidsForm;
import alternativa.tanks.view.forms.freeuids.FreeUidsFormEvent;
import alternativa.tanks.view.forms.primivites.ValidationIcon;
import base.DiscreteSprite;
import controls.base.TankInputBase;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.TimerEvent;
import flash.utils.Timer;
import forms.events.LoginFormEvent;
import projects.tanks.clients.flash.commons.services.validate.IValidateService;
import projects.tanks.clients.flash.commons.services.validate.ValidateService;
public class ChangeUidInputField extends DiscreteSprite {
[Inject]
public static var validateService:IValidateService;
[Inject]
public static var display:IDisplay;
private var _callsignInput:TankInputBase;
private var _checkCallsignTimer:Timer;
private var _freeUidsForm:FreeUidsForm;
private var _callsignValidated:Boolean;
private var _callSignCheckIcon:ValidationIcon;
private var _nameIsNotUniqueBubble:Bubble;
private var _nameIsIncorrectBubble:Bubble;
private var _symbolIsNotAllowedBubble:Bubble;
private var _isFreeUidsFormAlreadyShowed:Boolean;
private var _inputFieldWidth:int;
public function ChangeUidInputField() {
super();
this.init();
}
public function init() : void {
this._callsignInput = new TankInputBase();
this._callsignInput.maxChars = RegistrationCommonElementsSection.MAX_CHARS_CALLSIGN;
this._callsignInput.validValue = true;
addChild(this._callsignInput);
this._callSignCheckIcon = new ValidationIcon();
addChild(this._callSignCheckIcon);
this._freeUidsForm = new FreeUidsForm();
addChild(this._freeUidsForm);
this._nameIsNotUniqueBubble = EntranceBubbleFactory.nameIsNotUniqueBubble();
this._nameIsIncorrectBubble = EntranceBubbleFactory.nameIsIncorrectBubble();
this._symbolIsNotAllowedBubble = EntranceBubbleFactory.symbolIsNotAllowedBubble();
this._checkCallsignTimer = new Timer(500,1);
display.stage.focus = this._callsignInput.textField;
this.addEventListeners();
this.alignElements();
}
private function addEventListeners() : void {
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
this._callsignInput.textField.addEventListener(FocusEvent.FOCUS_IN,this.onCallsignFocusIn);
this._callsignInput.addEventListener(LoginFormEvent.TEXT_CHANGED,this.onCallsignChanged);
this._checkCallsignTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onCallsignCheckTimerComplete);
this._freeUidsForm.addEventListener(FreeUidsFormEvent.CLICK_ITEM,this.onFreeUidsFormSelectedItem);
this._freeUidsForm.addEventListener(FreeUidsFormEvent.FOCUS_OUT,this.onFreeUidsFormFocusOut);
}
private function onRemoveFromStage(param1:Event) : void {
this.removeEventListeners();
}
private function removeEventListeners() : void {
removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
this._callsignInput.textField.removeEventListener(FocusEvent.FOCUS_IN,this.onCallsignFocusIn);
this._callsignInput.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.onCallsignChanged);
this._checkCallsignTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.onCallsignCheckTimerComplete);
this._freeUidsForm.removeEventListener(FreeUidsFormEvent.CLICK_ITEM,this.onFreeUidsFormSelectedItem);
this._freeUidsForm.removeEventListener(FreeUidsFormEvent.FOCUS_OUT,this.onFreeUidsFormFocusOut);
}
private function alignElements() : void {
this._callsignInput.width = this._inputFieldWidth;
this._callSignCheckIcon.x = this._callsignInput.x + this._inputFieldWidth - 25;
this._callSignCheckIcon.y = this._callsignInput.y + 7;
this._freeUidsForm.x = this._callsignInput.x;
this._freeUidsForm.y = this._callsignInput.y + this._callsignInput.height;
this._freeUidsForm.width = this._inputFieldWidth;
}
private function onCallsignFocusIn(param1:FocusEvent) : void {
if(this._isFreeUidsFormAlreadyShowed) {
this._nameIsNotUniqueBubble.visible = false;
this._freeUidsForm.show();
dispatchEvent(new Event(Event.CHANGE));
}
}
private function onCallsignChanged(param1:LoginFormEvent = null) : void {
this._callsignValidated = false;
this._callsignInput.validValue = true;
this._nameIsIncorrectBubble.hide();
this._nameIsNotUniqueBubble.hide();
this._symbolIsNotAllowedBubble.hide();
this._callSignCheckIcon.turnOff();
this._isFreeUidsFormAlreadyShowed = false;
this.hideFreeUidsForm();
this._checkCallsignTimer.reset();
this._checkCallsignTimer.start();
var local2:String = this._callsignInput.value;
if(!validateService.isValidIdentificationStringForRegistration(local2)) {
this._callsignInput.value = local2.replace(ValidateService.NOT_ALLOWED_PATTERN_FOR_REGISTRATION,"");
this.alertAboutSymbolIsNotAllowed();
}
dispatchEvent(new Event(Event.CHANGE));
}
private function onFreeUidsFormSelectedItem(param1:FreeUidsFormEvent) : void {
this.callsign = param1.uid;
this.hideFreeUidsForm();
}
private function onFreeUidsFormFocusOut(param1:FreeUidsFormEvent) : void {
this.hideFreeUidsForm();
}
private function hideFreeUidsForm() : void {
this._freeUidsForm.hide();
this._nameIsNotUniqueBubble.visible = true;
dispatchEvent(new Event(Event.CHANGE));
}
private function alertAboutSymbolIsNotAllowed() : void {
this._callsignInput.validValue = false;
this._callSignCheckIcon.markAsInvalid();
this._callSignCheckIcon.addChild(this._symbolIsNotAllowedBubble);
}
private function onCallsignCheckTimerComplete(param1:TimerEvent = null) : void {
if(validateService.isUidValid(this._callsignInput.value)) {
this._callSignCheckIcon.startProgress();
dispatchEvent(new CheckCallsignEvent(this.callsign));
} else {
this._callsignInput.validValue = true;
this._symbolIsNotAllowedBubble.hide();
this._callSignCheckIcon.turnOff();
if(this._callsignInput.value.length != 0) {
this.alertAboutIncorrectUid();
}
}
}
public function alertAboutFreeUid() : void {
this._symbolIsNotAllowedBubble.hide();
this._callsignInput.validValue = true;
this._callsignValidated = true;
this._callSignCheckIcon.markAsValid();
dispatchEvent(new Event(Event.CHANGE));
}
public function alertAboutBusyUid(param1:Vector.<String>) : void {
this._symbolIsNotAllowedBubble.hide();
this._callsignInput.validValue = false;
this._callSignCheckIcon.markAsInvalid();
this._callSignCheckIcon.addChild(this._nameIsNotUniqueBubble);
this._nameIsNotUniqueBubble.visible = true;
if(param1.length != 0) {
this._isFreeUidsFormAlreadyShowed = true;
this._nameIsNotUniqueBubble.visible = false;
this._freeUidsForm.create(param1);
}
dispatchEvent(new Event(Event.CHANGE));
}
public function alertAboutIncorrectUid() : void {
this._callsignValidated = false;
this._symbolIsNotAllowedBubble.hide();
this._callsignInput.validValue = false;
this._callSignCheckIcon.markAsInvalid();
this._callSignCheckIcon.addChild(this._nameIsIncorrectBubble);
dispatchEvent(new Event(Event.CHANGE));
}
public function get callsign() : String {
return this._callsignInput.textField.text;
}
public function set callsign(param1:String) : void {
this._callsignInput.value = param1;
display.stage.focus = this._callsignInput.textField;
if(param1.length != 0) {
this.onCallsignChanged();
this._callsignInput.textField.setSelection(param1.length,param1.length);
}
}
override public function set width(param1:Number) : void {
this._inputFieldWidth = int(param1);
this.alignElements();
}
override public function get width() : Number {
return this._inputFieldWidth;
}
override public function get height() : Number {
return this._callsignInput.height;
}
public function isUidValid() : Boolean {
return this._callsignValidated;
}
public function setLabelText(param1:String) : void {
this._callsignInput.label = param1;
}
public function isOpenFreeUidsForm() : Boolean {
return this._freeUidsForm.visible;
}
}
}
|
package alternativa.types {
public class UInt64 extends Binary64 {
public function UInt64(param1:uint = 0, param2:uint = 0) {
super(param1,param2);
}
public static function parseUInt64(param1:String, param2:uint = 0) : UInt64 {
var local5:uint = 0;
var local3:uint = 0;
if(param2 == 0) {
if(param1.search(/^0x/) == 0) {
param2 = 16;
local3 = 2;
} else {
param2 = 10;
}
}
if(param2 < 2 || param2 > 36) {
throw new ArgumentError();
}
param1 = param1.toLowerCase();
var local4:UInt64 = new UInt64();
while(local3 < param1.length) {
local5 = uint(param1.charCodeAt(local3));
if(local5 >= "0".charCodeAt() && local5 <= "9".charCodeAt()) {
local5 -= "0".charCodeAt();
} else {
if(!(local5 >= "a".charCodeAt() && local5 <= "z".charCodeAt())) {
throw new ArgumentError();
}
local5 -= "a".charCodeAt();
}
if(local5 >= param2) {
throw new ArgumentError();
}
local4.mul(param2);
local4.add(local5);
local3++;
}
return local4;
}
final public function set high(param1:uint) : void {
internalHigh = param1;
}
final public function get high() : uint {
return internalHigh;
}
final public function toNumber() : Number {
return this.high * 4294967296 + low;
}
final public function toString(param1:uint = 10) : String {
var local4:uint = 0;
if(param1 < 2 || param1 > 36) {
throw new ArgumentError();
}
if(this.high == 0) {
return low.toString(param1);
}
var local2:Array = [];
var local3:UInt64 = new UInt64(low,this.high);
do {
local4 = uint(local3.div(param1));
local2.push((local4 < 10 ? "0" : "a").charCodeAt() + local4);
}
while(local3.high != 0);
return local3.low.toString(param1) + String.fromCharCode.apply(String,local2.reverse());
}
}
}
|
package forms.events
{
import flash.events.Event;
public class MainButtonBarEvents extends Event
{
public static const ADDMONEY:String = "AddMoney";
public static const PROFILE:String = "Profile";
public static const CHALLENGE:String = "Challenge";
public static const BATTLE:String = "Batle";
public static const GARAGE:String = "Garage";
public static const STAT:String = "Stat";
public static const CLANS:String = "Clans";
public static const SOUND:String = "Sound";
public static const SETTINGS:String = "Settings";
public static const HELP:String = "Help";
public static const CLOSE:String = "Close";
public static const BUGS:String = "Bugs";
public static const EXCHANGE:String = "ChangeMoney";
public static const SOCIALNETS:String = "Referal";
public static const SPINS:String = "Spins";
public static const FRIENDS:String = "Friends";
public static const PANEL_BUTTON_PRESSED:String = "Close";
private var types:Array;
private var _typeButton:String;
public function MainButtonBarEvents(typeButton:int)
{
this.types = new Array(ADDMONEY,PROFILE,CHALLENGE,BATTLE,GARAGE,STAT,SETTINGS,SOUND,HELP,CLOSE,BUGS,EXCHANGE,SPINS,SOCIALNETS,FRIENDS,CLANS);
super(MainButtonBarEvents.PANEL_BUTTON_PRESSED,true,false);
this._typeButton = this.types[typeButton - 1];
}
public function get typeButton() : String
{
return this._typeButton;
}
}
}
|
package assets.windowinner.bitmaps {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.windowinner.bitmaps.WindowInnerRight.png")]
public class WindowInnerRight extends BitmapData {
public function WindowInnerRight(param1:int, param2:int, param3:Boolean = true, param4:uint = 0) {
super(param1,param2,param3,param4);
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.online {
import alternativa.types.Long;
import projects.tanks.client.tanksservices.model.notifier.online.IOnlineNotifierModelBase;
import projects.tanks.client.tanksservices.model.notifier.online.OnlineNotifierData;
import projects.tanks.client.tanksservices.model.notifier.online.OnlineNotifierModelBase;
import projects.tanks.clients.fp10.libraries.tanksservices.model.UserRefresh;
import projects.tanks.clients.fp10.libraries.tanksservices.model.listener.UserNotifier;
import projects.tanks.clients.fp10.libraries.tanksservices.model.notifier.UserInfoConsumer;
import projects.tanks.clients.fp10.libraries.tanksservices.service.notifier.online.IOnlineNotifierService;
[ModelInfo]
public class OnlineNotifierModel extends OnlineNotifierModelBase implements IOnlineNotifierModelBase, UserRefresh {
[Inject]
public static var onlineNotifierService:IOnlineNotifierService;
public function OnlineNotifierModel() {
super();
}
private static function convertToClientData(param1:OnlineNotifierData) : ClientOnlineNotifierData {
return new ClientOnlineNotifierData(param1.userId,param1.online,param1.serverNumber);
}
public function setOnline(param1:Vector.<OnlineNotifierData>) : void {
var local5:ClientOnlineNotifierData = null;
var local2:Vector.<ClientOnlineNotifierData> = new Vector.<ClientOnlineNotifierData>(param1.length);
var local3:int = int(param1.length);
var local4:int = 0;
while(local4 < local3) {
local5 = convertToClientData(param1[local4]);
this.setAndUpdateConsumer(local5);
local2[local4] = local5;
local4++;
}
onlineNotifierService.setOnline(local2);
}
private function setAndUpdateConsumer(param1:ClientOnlineNotifierData) : void {
var local4:UserInfoConsumer = null;
var local2:Long = param1.userId;
onlineNotifierService.addUserOnlineData(param1);
var local3:UserNotifier = UserNotifier(object.adapt(UserNotifier));
if(local3.hasDataConsumer(local2)) {
local4 = local3.getDataConsumer(local2);
local4.setOnline(param1.online,param1.serverNumber);
}
}
public function refresh(param1:Long, param2:UserInfoConsumer) : void {
var local3:ClientOnlineNotifierData = null;
if(onlineNotifierService.hasUserOnlineData(param1)) {
local3 = onlineNotifierService.getUserOnlineData(param1);
param2.setOnline(local3.online,local3.serverNumber);
}
}
public function remove(param1:Long) : void {
onlineNotifierService.removeUserOnlineData(param1);
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ModTable_bitmapUpgradeSelectionLeft extends BitmapAsset
{
public function ModTable_bitmapUpgradeSelectionLeft()
{
super();
}
}
}
|
package alternativa.tanks.models.sfx.healing
{
import alternativa.engine3d.materials.Material;
import alternativa.tanks.engine3d.TextureAnimation;
import flash.media.Sound;
public class HealingGunSFXData
{
public var idleSparkMaterials:Vector.<Material>;
public var idleSound:Sound;
public var healSparkMaterials:Vector.<Material>;
public var healShaftMaterials:Vector.<Material>;
public var healShaftEndMaterials:Vector.<Material>;
public var healSound:Sound;
public var damageSparkMaterials:Vector.<Material>;
public var damageShaftMaterials:Vector.<Material>;
public var damageShaftEndMaterials:Vector.<Material>;
public var damageSound:Sound;
public var idleSparkData:TextureAnimation;
public var healSparkData:TextureAnimation;
public var healShaftEndData:TextureAnimation;
public var healShaftData:TextureAnimation;
public var damageSparkData:TextureAnimation;
public var damageShaftData:TextureAnimation;
public var damageShaftEndData:TextureAnimation;
public function HealingGunSFXData()
{
super();
}
}
}
|
package projects.tanks.client.users.model.friends {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class FriendsModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:FriendsModelServer;
private var client:IFriendsModelBase = IFriendsModelBase(this);
private var modelId:Long = Long.getLong(1693173045,628784534);
private var _acceptSuccessId:Long = Long.getLong(608205693,1898592764);
private var _acceptSuccess_userIdCodec:ICodec;
private var _acceptedLimitExceededId:Long = Long.getLong(370363039,338480872);
private var _acceptedLimitExceeded_uidCodec:ICodec;
private var _alreadyInAcceptedFriendsId:Long = Long.getLong(311681954,1684738000);
private var _alreadyInAcceptedFriends_uidCodec:ICodec;
private var _alreadyInIncomingFriendsId:Long = Long.getLong(348947857,-1693710961);
private var _alreadyInIncomingFriends_uidCodec:ICodec;
private var _alreadyInIncomingFriends_userIdCodec:ICodec;
private var _alreadyInOutgoingFriendsId:Long = Long.getLong(444676649,1880663147);
private var _alreadyInOutgoingFriends_uidCodec:ICodec;
private var _incomingLimitExceededId:Long = Long.getLong(910302409,-1168735433);
private var _yourAcceptedLimitExceededId:Long = Long.getLong(766260615,-36774901);
public function FriendsModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new FriendsModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(FriendsCC,false)));
this._acceptSuccess_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._acceptedLimitExceeded_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._alreadyInAcceptedFriends_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._alreadyInIncomingFriends_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._alreadyInIncomingFriends_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._alreadyInOutgoingFriends_uidCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
}
protected function getInitParam() : FriendsCC {
return FriendsCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._acceptSuccessId:
this.client.acceptSuccess(Long(this._acceptSuccess_userIdCodec.decode(param2)));
break;
case this._acceptedLimitExceededId:
this.client.acceptedLimitExceeded(String(this._acceptedLimitExceeded_uidCodec.decode(param2)));
break;
case this._alreadyInAcceptedFriendsId:
this.client.alreadyInAcceptedFriends(String(this._alreadyInAcceptedFriends_uidCodec.decode(param2)));
break;
case this._alreadyInIncomingFriendsId:
this.client.alreadyInIncomingFriends(String(this._alreadyInIncomingFriends_uidCodec.decode(param2)),Long(this._alreadyInIncomingFriends_userIdCodec.decode(param2)));
break;
case this._alreadyInOutgoingFriendsId:
this.client.alreadyInOutgoingFriends(String(this._alreadyInOutgoingFriends_uidCodec.decode(param2)));
break;
case this._incomingLimitExceededId:
this.client.incomingLimitExceeded();
break;
case this._yourAcceptedLimitExceededId:
this.client.yourAcceptedLimitExceeded();
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package forms.userlabel
{
import alternativa.types.Long;
import controls.base.LabelBase;
import controls.rangicons.RangIconSmall;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.system.System;
import forms.ColorConstants;
public class UserLabel extends Sprite
{
protected static const RANK_ICON_CONT_WIDTH:int = 20;
private static const RANK_ICON_CONT_HEIGHT:int = 18;
public static var ds:Sprite = new Sprite();
protected var shadowContainer:Sprite;
protected var _userId:Long;
protected var _uid:String;
protected var _rank:int;
protected var _uidLabel:LabelBase;
protected var _writeInPublicChat:Boolean;
protected var _writePrivateInChat:Boolean;
protected var _blockUserEnable:Boolean;
protected var _forciblySubscribeFriend:Boolean;
protected var _isInitRank:Boolean;
protected var _isInitUid:Boolean;
protected var _focusOnUserEnabled:Boolean;
protected var _hasPremium:Boolean;
private var _inviteBattleEnable:Boolean;
private var _rankIcon:RangIconSmall;
private var _online:Boolean = false;
private var _friend:Boolean = false;
protected var _self:Boolean;
private var _lastUidColor:uint;
private var _ignoreFriendsColor:Boolean;
private var _additionalText:String = "";
protected var _showClanTag:Boolean = true;
private var _showClanProfile:Boolean = true;
private var _showInviteToClan:Boolean = true;
private var nic:String = "";
public function UserLabel(param1:Long, param2:Boolean = true)
{
this.shadowContainer = new Sprite();
super();
if(param1 == null)
{
throw Error("UserLabel userId is NULL");
}
this._userId = param1;
this.init();
ds.addEventListener("dsf",this.getlab);
}
protected function getShadowFilters() : Array
{
return null;
}
private function init() : void
{
mouseChildren = false;
mouseEnabled = true;
tabEnabled = false;
tabChildren = false;
addChild(this.shadowContainer);
this.shadowContainer.filters = this.getShadowFilters();
this._lastUidColor = ColorConstants.GREEN_LABEL;
this.initSelf();
if(!this._self)
{
useHandCursor = true;
buttonMode = true;
}
this.createRankIcon();
this.createAdditionalIcons();
this.createUidLabel();
this.updateProperties();
this.friend(false);
addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
}
protected function initSelf() : void
{
}
protected function createAdditionalIcons() : void
{
}
protected function updateProperties() : void
{
}
protected function createUidLabel() : void
{
this._uidLabel = new LabelBase();
this._uidLabel.x = RANK_ICON_CONT_WIDTH - 2 + this.getAdditionalIconsWidth();
this.shadowContainer.addChild(this._uidLabel);
this._uidLabel.visible = false;
}
protected function getAdditionalIconsWidth() : Number
{
return 0;
}
private function createRankIcon() : void
{
var _loc1_:Sprite = new Sprite();
_loc1_.graphics.clear();
_loc1_.graphics.beginFill(65535,0);
_loc1_.graphics.drawRect(0,0,RANK_ICON_CONT_WIDTH,RANK_ICON_CONT_HEIGHT);
_loc1_.graphics.endFill();
this._rankIcon = new RangIconSmall(0);
_loc1_.addChild(this._rankIcon);
this.shadowContainer.addChild(_loc1_);
this._rankIcon.visible = false;
}
private function onAddedToStage(param1:Event) : void
{
removeEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
this.setEvent();
}
private function onRemoveFromStage(param1:Event) : void
{
removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
this.removeEvent();
}
private function setEvent() : void
{
if(!this.hasEventListener(MouseEvent.CLICK))
{
this.addEventListener(MouseEvent.CLICK,this.onMouseClick);
}
}
private function removeEvent() : void
{
if(this.hasEventListener(MouseEvent.CLICK))
{
this.removeEventListener(MouseEvent.CLICK,this.onMouseClick);
}
}
protected function onMouseClick(param1:MouseEvent) : void
{
if(!this._isInitRank || !this._isInitUid)
{
return;
}
if(param1.ctrlKey)
{
System.setClipboard(this._uid);
}
}
public function setUid(param1:String, param2:String = "") : void
{
if(!this._isInitUid)
{
this._isInitUid = true;
this._uidLabel.visible = true;
}
this._uid = param1;
this._uidLabel.text = param1;
if(param2 != null && param2 != "")
{
this.nic = param2;
this.getlab();
}
}
public function getlab(param1:Event = null) : void
{
if(this.nic != null && this.nic != "")
{
}
}
public function setRank(param1:int) : void
{
this._rank = param1;
this._isInitRank = true;
this._rankIcon = new RangIconSmall(this._rank);
this._rankIcon.visible = true;
this.addChild(this._rankIcon);
this.alignRankIcon();
}
private function alignRankIcon() : void
{
this._rankIcon.x = RANK_ICON_CONT_WIDTH - this._rankIcon.width >> 1;
this._rankIcon.y = RANK_ICON_CONT_HEIGHT - this._rankIcon.height >> 1;
}
public function setUidColor(param1:uint, param2:Boolean = false) : void
{
this._lastUidColor = param1;
this._ignoreFriendsColor = param2;
this._uidLabel.color = param1;
}
public function online1(param1:Boolean) : void
{
this._online = param1;
this.setUidColor(!!param1 ? (!!this._friend ? uint(uint(uint(ColorConstants.FRIEND_COLOR))) : uint(uint(uint(ColorConstants.GREEN_LABEL)))) : uint(uint(uint(ColorConstants.ACCESS_LABEL))),true);
}
public function get online() : Boolean
{
return this._online;
}
public function get tw() : int
{
return this._uidLabel.textWidth;
}
public function friend(param1:Boolean) : void
{
this._friend = param1;
if(this._friend)
{
this._uidLabel.color = ColorConstants.FRIEND_COLOR;
return;
}
}
public function get userRank() : int
{
return this._rank;
}
public function get self() : Boolean
{
return this._self;
}
public function get uid() : String
{
return this._uid;
}
public function get userId() : Long
{
return this._userId;
}
public function get inviteBattleEnable() : Boolean
{
return this._inviteBattleEnable;
}
public function set inviteBattleEnable(param1:Boolean) : void
{
this._inviteBattleEnable = param1;
}
public function get premium() : Boolean
{
return this._hasPremium;
}
public function get showClanProfile() : Boolean
{
return this._showClanProfile;
}
public function set showClanProfile(param1:Boolean) : void
{
this._showClanProfile = param1;
}
public function get showInviteToClan() : Boolean
{
return this._showInviteToClan;
}
public function set showInviteToClan(param1:Boolean) : void
{
this._showInviteToClan = param1;
}
}
}
|
package alternativa.tanks.engine3d {
import alternativa.engine3d.materials.TextureResourcesRegistry;
import alternativa.tanks.battle.events.BattleEventListener;
import alternativa.utils.TextureMaterialRegistry;
public class TextureMaterialRegistryCleaner implements BattleEventListener {
private var registry:TextureMaterialRegistry;
public function TextureMaterialRegistryCleaner(param1:TextureMaterialRegistry) {
super();
this.registry = param1;
}
public function handleBattleEvent(param1:Object) : void {
this.registry.clear();
TextureResourcesRegistry.releaseTextureResources();
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.braintree {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class BraintreePaymentModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _getPaymentUrlId:Long = Long.getLong(268349667,-205589108);
private var _getPaymentUrl_shopItemIdCodec:ICodec;
private var model:IModel;
public function BraintreePaymentModelServer(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._getPaymentUrl_shopItemIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
}
public function getPaymentUrl(param1:Long) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._getPaymentUrl_shopItemIdCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._getPaymentUrlId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.common {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class WeaponCommonModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function WeaponCommonModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.model.payment.modes {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class PayModeDescriptionAdapt implements PayModeDescription {
private var object:IGameObject;
private var impl:PayModeDescription;
public function PayModeDescriptionAdapt(param1:IGameObject, param2:PayModeDescription) {
super();
this.object = param1;
this.impl = param2;
}
public function getDescription() : String {
var result:String = null;
try {
Model.object = this.object;
result = this.impl.getDescription();
}
finally {
Model.popObject();
}
return result;
}
public function rewriteCategoryDescription() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.rewriteCategoryDescription());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.garageitem {
import alternativa.tanks.gui.shop.shopitems.item.CountableItemButton;
import alternativa.tanks.gui.shop.shopitems.item.LeftPictureAndTextPackageButton;
import alternativa.tanks.model.payment.shop.goldbox.GoldBoxPackage;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class GoldBoxPackageButton extends LeftPictureAndTextPackageButton implements CountableItemButton {
public function GoldBoxPackageButton(param1:IGameObject) {
super(param1);
}
override protected function getText() : String {
return this.getBoxWordDeclension(this.getCount()).toLowerCase();
}
private function getBoxWordDeclension(param1:int) : String {
return param1.toString() + " " + this.getDeclension(param1);
}
private function getDeclension(param1:int) : String {
if(localeService.language == "ru") {
return localeService.getText(TanksLocale.TEXT_SHOP_GOLDBOX_ONE) + this.getRuPostfix(param1);
}
return localeService.getText(param1 == 1 ? TanksLocale.TEXT_SHOP_GOLDBOX_ONE : TanksLocale.TEXT_SHOP_GOLDBOX_MANY);
}
private function getRuPostfix(param1:int) : String {
var local2:int = param1 % 100;
if(local2 >= 11 && local2 <= 20) {
return "ов";
}
local2 = param1 % 10;
if(local2 == 1) {
return "";
}
if(local2 >= 2 && local2 <= 4) {
return "а";
}
return "ов";
}
public function getCount() : int {
return GoldBoxPackage(item.adapt(GoldBoxPackage)).getCount();
}
override protected function getNameLabelFontSize() : int {
switch(localeService.language) {
case "fa":
return 26;
default:
return super.getNameLabelFontSize();
}
}
}
}
|
package _codec.projects.tanks.client.panel.model.quest.daily {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.quest.daily.DailyQuestInfo;
public class VectorCodecDailyQuestInfoLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecDailyQuestInfoLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(DailyQuestInfo,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.<DailyQuestInfo> = new Vector.<DailyQuestInfo>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = DailyQuestInfo(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:DailyQuestInfo = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<DailyQuestInfo> = Vector.<DailyQuestInfo>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package projects.tanks.clients.flash.commons.models.detach {
[ModelInterface]
public interface Detach {
function detach() : void;
}
}
|
package projects.tanks.client.panel.model.videoads.videoadsbattleresult {
public interface IVideoAdsBattleResultModelBase {
function availableIncreasedRewards(param1:int) : void;
function availableSimpleRewards(param1:int) : void;
function notAvailableRewards() : void;
}
}
|
package projects.tanks.client.clans.user.incoming {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.clans.container.ContainerCC;
public class ClanUserIncomingModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ClanUserIncomingModelServer;
private var client:IClanUserIncomingModelBase = IClanUserIncomingModelBase(this);
private var modelId:Long = Long.getLong(1120804751,-1974844538);
private var _onAddingId:Long = Long.getLong(591561906,1809211473);
private var _onAdding_userIdCodec:ICodec;
private var _onRemovedId:Long = Long.getLong(1158549911,-1988807186);
private var _onRemoved_userIdCodec:ICodec;
public function ClanUserIncomingModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ClanUserIncomingModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ContainerCC,false)));
this._onAdding_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._onRemoved_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
}
protected function getInitParam() : ContainerCC {
return ContainerCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._onAddingId:
this.client.onAdding(Long(this._onAdding_userIdCodec.decode(param2)));
break;
case this._onRemovedId:
this.client.onRemoved(Long(this._onRemoved_userIdCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.engine3d {
import alternativa.tanks.services.colortransform.ColorTransformUtils;
import alternativa.utils.clearDictionary;
import flash.display.BitmapData;
import flash.geom.ColorTransform;
import flash.utils.Dictionary;
import org1.osflash.signals.Signal;
public class DefaultColorCorrectedTextureRegistry implements ColorCorrectedTextureRegistry {
private static const IDENTITY_COLOR_TRANSFORM:ColorTransform = new ColorTransform();
private const onTextureChange:Signal = new Signal();
private const textures:Dictionary = new Dictionary();
private var colorTransform:ColorTransform;
public function DefaultColorCorrectedTextureRegistry() {
super();
}
public function clear() : void {
var local1:int = 0;
var local2:* = undefined;
var local3:BitmapData = null;
if(this.colorTransform == null) {
clearDictionary(this.textures);
} else {
local1 = 0;
for(local2 in this.textures) {
local3 = this.textures[local2];
local3.dispose();
delete this.textures[local2];
local1++;
}
}
}
public function getTexture(param1:BitmapData, param2:Boolean = true) : BitmapData {
if(param1 == null) {
throw new ArgumentError("Texture is null");
}
var local3:BitmapData = this.textures[param1];
if(local3 == null) {
local3 = this.transformTexture(param1,param2);
this.textures[param1] = local3;
}
return local3;
}
private function transformTexture(param1:BitmapData, param2:Boolean = true) : BitmapData {
if(this.colorTransform == null) {
return param1;
}
if(param2) {
return ColorTransformUtils.transformBitmap(param1,this.colorTransform);
}
return param1.clone();
}
public function addTextureChangeHandler(param1:Function) : void {
this.onTextureChange.add(param1);
}
public function setColorTransform(param1:ColorTransform) : void {
var local2:ColorTransform = this.getEffectiveColorTransform(param1);
if(!ColorTransformUtils.equal(this.colorTransform,local2)) {
this.colorTransform = local2;
this.updateTextures();
this.onTextureChange.dispatch();
}
}
private function getEffectiveColorTransform(param1:ColorTransform) : ColorTransform {
var local2:ColorTransform = ColorTransformUtils.clone(param1);
if(ColorTransformUtils.equal(local2,IDENTITY_COLOR_TRANSFORM)) {
return null;
}
return local2;
}
private function updateTextures() : void {
var local2:* = undefined;
var local3:BitmapData = null;
var local1:int = 0;
for(local2 in this.textures) {
local3 = this.textures[local2];
if(local3 != local2) {
local3.dispose();
local1++;
}
this.textures[local2] = this.transformTexture(local2);
}
}
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.partners.kongregate {
public class KongregateInstanceWrapper {
public static var kongregate:*;
public function KongregateInstanceWrapper() {
super();
}
}
}
|
package alternativa.tanks.models.weapon.machinegun {
import alternativa.math.Vector3;
import alternativa.physics.collision.types.RayHit;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.LogicUnit;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.battle.objects.tank.WeaponPlatform;
import alternativa.tanks.models.tank.ITankModel;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.RayCollisionFilter;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.models.weapon.machinegun.sfx.MachineGunSFXData;
import alternativa.tanks.physics.CollisionGroup;
import alternativa.tanks.physics.TanksCollisionDetector;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete.TargetHit;
import projects.tanks.client.battlefield.models.tankparts.weapons.machinegun.cc.MachineGunCC;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
public class MachineGunRemoteWeapon implements LogicUnit, Weapon {
[Inject]
public static var battleService:BattleService;
private static const MAX_DISTANCE:Number = 1000000;
private static const rayHit:RayHit = new RayHit();
private static const collisionFilter:RayCollisionFilter = new RayCollisionFilter();
private var gunParams:AllGlobalGunParams;
private var hittingTime:int;
private var lastTime:int;
private var params:MachineGunCC;
private var target:Tank;
private var hitPosition:Vector3;
private var shooting:Boolean;
private var weaponPlatform:WeaponPlatform;
private var commonWeapon:MachineGunCommonWeapon;
private var lastUpdateTargetTime:int;
private var wasCallUpdateTargets:Boolean;
private var spinUpTime:int;
public function MachineGunRemoteWeapon(param1:IGameObject, param2:MachineGunCC, param3:MachineGunSFXData, param4:WeaponCommonData) {
super();
this.commonWeapon = new MachineGunCommonWeapon(param1,param2,param3,param4);
this.lastTime = 0;
this.params = param2;
this.spinUpTime = param2.spinUpTime;
}
public function init(param1:WeaponPlatform) : void {
this.commonWeapon.init(param1);
this.weaponPlatform = param1;
}
public function destroy() : void {
this.commonWeapon.destroy();
battleService.getBattleRunner().removeLogicUnit(this);
}
public function deactivate() : void {
this.commonWeapon.stopEffects();
this.disable(false);
battleService.getBattleRunner().removeLogicUnit(this);
}
public function start() : void {
this.commonWeapon.start();
this.gunParams = this.commonWeapon.updateGunParams();
this.shooting = true;
this.wasCallUpdateTargets = false;
this.lastTime = this.getCurrentPhysicsTime();
this.hittingTime = this.lastTime + this.spinUpTime;
}
public function updateTargets(param1:Vector3, param2:Vector.<TargetHit>) : void {
this.gunParams = this.commonWeapon.updateGunParams();
this.hitPosition = null;
this.target = null;
this.wasCallUpdateTargets = true;
this.lastUpdateTargetTime = this.getCurrentPhysicsTime();
var local3:Boolean = false;
if(param2.length == 0) {
if(this.calculateHitPosition(param1)) {
this.hitPosition = rayHit.position;
local3 = BattleUtils.isTankBody(rayHit.shape.body);
}
} else {
local3 = true;
this.hitPosition = BattleUtils.getVector3(param2[0].localHitPoint);
this.target = ITankModel(param2[0].target.adapt(ITankModel)).getTank();
BattleUtils.localToGlobal(this.target.getBody(),this.hitPosition);
}
this.updateTargetPosition(local3);
}
public function stop() : void {
this.commonWeapon.stop();
this.target = null;
this.shooting = false;
}
public function runLogic(param1:int, param2:int) : void {
var local3:Number = NaN;
this.commonWeapon.updateCharacteristicsAndEffects(param2,this.shooting);
this.gunParams = this.commonWeapon.updateGunParams();
if(this.shooting) {
this.updateTargetsIfNeed();
local3 = this.commonWeapon.getPowerCoeff(param2,this.lastTime,this.hittingTime);
if(local3 > 0) {
this.commonWeapon.addRecoilForShooter(this.gunParams.direction,local3);
if(Boolean(this.target) && this.lastUpdateTargetTime + 500 < this.getCurrentPhysicsTime()) {
this.target = null;
}
if(this.target != null && this.target.getBody() != null) {
this.commonWeapon.addImpactForTarget(this.target.getBody(),this.hitPosition,this.gunParams.direction,local3);
}
}
}
this.lastTime = param1;
}
public function activate() : void {
this.commonWeapon.activate();
if(this.params.started) {
this.params.started = false;
this.start();
this.hittingTime = this.lastTime + this.spinUpTime * (1 - this.params.state);
this.updateTargets(this.gunParams.direction,new Vector.<TargetHit>());
}
battleService.getBattleRunner().addLogicUnit(this);
}
public function enable() : void {
this.commonWeapon.enable();
}
public function disable(param1:Boolean) : void {
this.stop();
}
public function reset() : void {
this.commonWeapon.reset();
this.target = null;
}
public function getStatus() : Number {
return 0;
}
private function getCurrentPhysicsTime() : int {
return battleService.getBattleRunner().getPhysicsTime();
}
private function updateTargetsIfNeed() : void {
var local1:Boolean = false;
if(this.commonWeapon.state == 1 && !this.wasCallUpdateTargets) {
this.gunParams = this.commonWeapon.updateGunParams();
local1 = false;
if(this.calculateHitPosition(this.gunParams.direction)) {
this.hitPosition = rayHit.position;
local1 = BattleUtils.isTankBody(rayHit.shape.body);
} else {
this.hitPosition = null;
}
this.updateTargetPosition(local1);
}
}
private function calculateHitPosition(param1:Vector3) : Boolean {
var local2:TanksCollisionDetector = battleService.getBattleRunner().getCollisionDetector();
collisionFilter.exclusion = this.weaponPlatform.getBody();
return local2.raycast(this.gunParams.barrelOrigin,param1,CollisionGroup.WEAPON,MAX_DISTANCE,collisionFilter,rayHit);
}
private function updateTargetPosition(param1:Boolean) : void {
if(this.hitPosition != null) {
this.commonWeapon.setTargetPosition(this.hitPosition,param1);
} else {
this.commonWeapon.clearTargetPosition();
}
}
public function getResistanceProperty() : ItemProperty {
return ItemProperty.MACHINE_GUN_RESISTANCE;
}
public function updateRecoilForce(param1:Number) : void {
this.commonWeapon.updateRecoilForce(param1);
}
public function fullyRecharge() : void {
}
public function weaponReloadTimeChanged(param1:int, param2:int) : void {
}
public function updateSpinTimes(param1:int, param2:int) : void {
var local3:int = this.commonWeapon.getCurrentSpinUpTime();
var local4:int = param1 - local3;
this.spinUpTime = param1;
this.hittingTime += local4;
this.commonWeapon.updateSpinTimes(param1,param2);
}
public function stun() : void {
}
public function calm(param1:int) : void {
}
public function spin() : void {
this.commonWeapon.spin();
}
}
}
|
package platform.client.fp10.core.network.command.control.client {
import platform.client.fp10.core.network.command.ControlCommand;
public class LogCommand extends ControlCommand {
public var level:int;
public var channel:String;
public var message:String;
public function LogCommand(param1:int, param2:String, param3:String) {
super(ControlCommand.CL_LOG,"Log");
this.level = param1;
this.channel = param2;
this.message = param3;
}
}
}
|
package alternativa.tanks.models.dom.sfx
{
public class PointState
{
public static const NEUTRAL:PointState = new PointState();
public static const BLUE:PointState = new PointState();
public static const RED:PointState = new PointState();
public function PointState()
{
super();
}
}
}
|
package alternativa.tanks.battle.events {
import flash.utils.Dictionary;
public class BattleEventSupport implements BattleEventListener {
private var dispatcher:BattleEventDispatcher;
private var handlers:Dictionary = new Dictionary();
public function BattleEventSupport(param1:BattleEventDispatcher) {
super();
this.dispatcher = param1;
}
public function addEventHandler(param1:Class, param2:Function) : void {
this.handlers[param1] = param2;
}
public function activateHandlers() : void {
var local1:* = undefined;
for(local1 in this.handlers) {
this.dispatcher.addBattleEventListener(local1,this);
}
}
public function deactivateHandlers() : void {
var local1:* = undefined;
for(local1 in this.handlers) {
this.dispatcher.removeBattleEventListener(local1,this);
}
}
public function handleBattleEvent(param1:Object) : void {
var local2:Function = this.handlers[param1.constructor];
if(local2 != null) {
local2(param1);
}
}
public function dispatchEvent(param1:Object) : void {
this.dispatcher.dispatchEvent(param1);
}
}
}
|
package alternativa.tanks.display.usertitle {
import alternativa.engine3d.core.Clipping;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.tanks.model.garage.resistance.ResistancesIcons;
import alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons;
import alternativa.tanks.models.tank.device.TankDevice;
import alternativa.tanks.models.tank.gearscore.GearScoreInfo;
import alternativa.tanks.models.tank.resistance.TankResistances;
import controls.Label;
import filters.Filters;
import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.text.GridFitType;
import flash.text.TextFieldAutoSize;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.user.resistance.TankResistance;
public class AdditionUserTitle extends Sprite3D {
private static var tankPartInfoWidth:Number;
private static var titleHeight:Number;
private static const matrix:Matrix = new Matrix();
private static const label:Label = new Label();
private static const ZERO:Point = new Point();
label.autoSize = TextFieldAutoSize.LEFT;
label.thickness = 200;
label.gridFitType = GridFitType.PIXEL;
private var texture:BitmapData = new BitmapData(256,180,true,0);
public function AdditionUserTitle() {
var local1:TextureMaterial = new TextureMaterial(this.texture);
local1.uploadEveryFrame = true;
super(256,180,local1);
perspectiveScale = false;
alpha = 1;
visible = true;
useShadowMap = false;
useLight = false;
originY = 1;
clipping = Clipping.FACE_CULLING;
sorting = Sorting.AVERAGE_Z;
}
public static function createTexture(param1:String, param2:Vector.<TankResistance>, param3:TankDevice) : BitmapData {
tankPartInfoWidth = 0;
var local4:BitmapData = new BitmapData(256,180,true,0);
var local5:int = 2;
var local6:int = 42;
var local7:BitmapData = DeviceIcons.getByDeviceId(param3.getDevice());
if(local7 != null) {
drawDevice(local6,param2.length == 0 ? local5 + 37 : local5,local7,local4);
}
local5 += DeviceIcons.backgroundIcon.height;
if(param2.length != 0) {
drawResistances(local6,local5,param2,local4);
}
local5 += 40;
drawInfo(local6,local5,param1,local4);
local5 += 15;
titleHeight = local5;
local4.applyFilter(local4,local4.rect,ZERO,Filters.SHADOW_FILTER);
return local4;
}
private static function drawInfo(param1:int, param2:int, param3:String, param4:BitmapData) : void {
label.text = param3;
matrix.tx = param1 + 25;
matrix.ty = param2;
param4.draw(label,matrix,null,null,null,true);
matrix.tx += label.width + 10;
tankPartInfoWidth = Math.max(tankPartInfoWidth,matrix.tx + label.width + 2);
}
private static function drawResistances(param1:int, param2:int, param3:Vector.<TankResistance>, param4:BitmapData) : void {
var local5:TankResistance = null;
var local6:BitmapData = null;
var local7:BitmapData = null;
var local8:Number = NaN;
var local9:Label = null;
var local10:Number = NaN;
matrix.tx = param1 + ((3 - param3.length) * ResistancesIcons.resistanceIcon.width >> 1);
matrix.ty = param2;
for each(local5 in param3) {
local6 = ResistancesIcons.resistanceIcon;
param4.draw(local6,matrix,null,null,null,true);
local7 = ResistancesIcons.getBitmapDataByName(local5.resistanceProperty.name);
local8 = local6.height - local7.height >> 1;
matrix.tx += local6.width - local7.width >> 1;
matrix.ty += local8;
param4.draw(local7,matrix,null,null,null,true);
local9 = new Label();
local9.text = local5.resistanceInPercent == 100 ? "??" : local5.resistanceInPercent.toString() + "%";
matrix.ty += local6.height - 3;
local10 = local6.width - local9.textWidth + 2 >> 1;
matrix.tx += local10;
param4.draw(local9,matrix,null,null,null,true);
matrix.tx += local6.width + 3 - local10;
matrix.ty -= local8 + local6.height - 3;
}
}
private static function drawDevice(param1:int, param2:int, param3:BitmapData, param4:BitmapData) : void {
matrix.tx = param1 + (DeviceIcons.backgroundIcon.width >> 1);
matrix.ty = param2;
param4.draw(DeviceIcons.backgroundIcon,matrix,null,null,null,true);
matrix.tx += DeviceIcons.backgroundIcon.width - param3.width >> 1;
matrix.ty += DeviceIcons.backgroundIcon.height - param3.height >> 1;
param4.draw(param3,matrix,null,null,null,true);
}
public function updateTexture(param1:uint, param2:IGameObject, param3:int) : void {
var local4:GearScoreInfo = GearScoreInfo(param2.adapt(GearScoreInfo));
var local5:String = "GS: " + local4.getScore();
var local6:TankResistances = TankResistances(param2.adapt(TankResistances));
var local7:Vector.<TankResistance> = local6.getResistances();
var local8:TankDevice = TankDevice(param2.adapt(TankDevice));
label.color = param1;
var local9:BitmapData = createTexture(local5,local7,local8);
this.cleanTexture();
this.texture.draw(local9);
local9.dispose();
var local10:Number = Math.max(32 * local7.length + 4,tankPartInfoWidth);
width = local10;
titleHeight += param3;
height = titleHeight;
bottomRightU = local10 / this.texture.width;
bottomRightV = titleHeight / this.texture.height;
}
private function cleanTexture() : * {
this.texture.dispose();
this.texture = new BitmapData(256,180,true,0);
material = new TextureMaterial(this.texture);
material.uploadEveryFrame = true;
}
public function dispose() : void {
if(material != null) {
material.dispose();
}
if(this.texture != null) {
this.texture.dispose();
}
this.texture = null;
material = null;
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.engine {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class EngineModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function EngineModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.model.quest.challenge.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.quest.challenge.gui.ChallengesView_goldenStarClass.png")]
public class ChallengesView_goldenStarClass extends BitmapAsset {
public function ChallengesView_goldenStarClass() {
super();
}
}
}
|
package alternativa.tanks.vehicles.tanks
{
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.objects.Mesh;
import alternativa.math.Matrix3;
import alternativa.math.Matrix4;
import alternativa.math.Quaternion;
import alternativa.math.Vector3;
import alternativa.physics.CollisionPrimitiveListItem;
import alternativa.physics.altphysics;
import alternativa.physics.collision.primitives.CollisionBox;
import alternativa.physics.rigid.Body3D;
import alternativa.tanks.display.usertitle.UserTitle;
import alternativa.tanks.models.battlefield.logic.updaters.HullTransformUpdater;
import alternativa.tanks.models.battlefield.logic.updaters.LocalHullTransformUpdater;
import alternativa.tanks.models.battlefield.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.models.tank.TankData;
import alternativa.tanks.models.tank.turret.TurretController;
import alternativa.tanks.models.weapon.AllGlobalGunParams;
import alternativa.tanks.models.weapon.WeaponUtils;
import com.alternativaplatform.projects.tanks.client.commons.types.Vector3d;
import flash.display.Graphics;
import flash.utils.Dictionary;
use namespace altphysics;
public class Tank extends Body3D
{
private static const FORWARD:int = 1;
private static const BACK:int = 2;
private static const LEFT:int = 4;
private static const RIGHT:int = 8;
private static const TURRET_LEFT:int = 16;
private static const TURRET_RIGHT:int = 32;
private static const CENTER_TURRET:int = 64;
private static const REVERSE_TURN_BIT:int = 128;
private static const PI:Number = Math.PI;
private static const PI2:Number = 2 * Math.PI;
private static var _m:Matrix3 = new Matrix3();
private static var _orient:Quaternion = new Quaternion();
private static var _pos:Vector3 = new Vector3();
private static var _v:Vector3 = new Vector3();
private static var _vin:Vector.<Number> = Vector.<Number>([0,0,0]);
private static var _vout:Vector.<Number> = Vector.<Number>([0,0,0]);
public var tankData:TankData;
public var maxSpeed:Number = 0;
private var maxSpeedSmoother:IValueSmoother;
public var maxTurnSpeed:Number = 0;
private var maxTurnSpeedSmoother:ValueSmoother;
public var maxTurretTurnSpeed:Number = 0;
private var maxTurretTurnSpeedSmoother:ValueSmoother;
public var turretTurnAcceleration:Number = 0;
public var turretTurnSpeed:Number = 0;
public var mass:Number;
public var suspensionData:SuspensionData;
public var skinZCorrection:Number = 0;
public var mainCollisionBox:CollisionBox;
public var visibilityPoints:Vector.<Vector3>;
private const RAY_OFFSET:Number = 5;
private var dimensions:Vector3;
private var _skin:TankSkin;
private var _title:UserTitle;
public var leftTrack:Track;
public var rightTrack:Track;
private var trackSpeed:calculateTrackSpeed;
public var leftThrottle:Number = 0;
public var rightThrottle:Number = 0;
private var leftBrake:Boolean;
private var rightBrake:Boolean;
private var bbs:Dictionary;
private var container:Scene3DContainer;
private var _showCollisionGeometry:Boolean;
private var titleContainer:Scene3DContainer;
private var local:Boolean;
private var jumpActivated:Boolean;
private var shpereRadius:Number;
public var hullTransformUpdater:HullTransformUpdater;
private var notLockedHullUpdater:HullTransformUpdater;
private var lockedHullTransformUpdater:LocalHullTransformUpdater;
public var interpolatedPosition:Vector3;
public var interpolatedOrientation:Quaternion;
public var skinCenterOffset:Vector3;
private const _acceleration:Number = 0;
private var turretController:TurretController;
private var animatedTracks:Boolean;
public function Tank(skin:TankSkin, mass:Number, maxSpeed:Number, maxTurnSpeed:Number, turretMaxTurnSpeed:Number, turretTurnAcceleration:Number, isLocal:Boolean, titleContainer:Scene3DContainer, rayLength:Number = 50, rayOptimalLength:Number = 25, dampingCoeff:Number = 1000, friction:Number = 0.1, rays:Number = 5)
{
this.maxTurnSpeedSmoother = new ValueSmoother(0.3,10,0,0);
this.maxTurretTurnSpeedSmoother = new ValueSmoother(0.3,10,0,0);
this.suspensionData = new SuspensionData();
this.dimensions = new Vector3();
this.trackSpeed = new calculateTrackSpeed();
this.bbs = new Dictionary();
this.skinCenterOffset = new Vector3();
super(0,Matrix3.ZERO,isLocal);
this._skin = skin;
this.maxSpeed = maxSpeed;
this.maxTurnSpeed = maxTurnSpeed;
this.maxTurretTurnSpeed = turretMaxTurnSpeed;
this.turretTurnAcceleration = turretTurnAcceleration;
this.titleContainer = titleContainer;
this.local = isLocal;
this._title = new UserTitle(this.local);
this.lockedHullTransformUpdater = new LocalHullTransformUpdater(this);
if(isLocal)
{
this.maxSpeedSmoother = new SecureValueSmoother(100,1000,0,0);
}
else
{
this.maxSpeedSmoother = new ValueSmoother(100,1000,0,0);
}
var mesh:Mesh = skin.hullDescriptor.mesh;
mesh.calculateBounds();
var dimensions:Vector3 = new Vector3(2 * mesh.boundMaxX,2 * mesh.boundMaxY,mesh.boundMaxZ);
this.setMassAndDimensions(mass,dimensions);
this.createTracks(rays,dimensions.y * 0.8,dimensions.x - 40);
this.suspensionData.rayLength = rayLength;
this.suspensionData.rayOptimalLength = rayOptimalLength;
this.suspensionData.dampingCoeff = dampingCoeff;
material.friction = friction;
this.setOptimalZCorrection();
var raduis:Vector3 = this.calculateSizeFromMesh(mesh);
var hall:Vector3 = new Vector3(raduis.x / 2,raduis.y / 2,raduis.z / 2);
var p1:Number = 2 * hall.z - (this.suspensionData.rayOptimalLength - 10);
this.interpolatedOrientation = new Quaternion();
this.interpolatedPosition = new Vector3();
}
override public function addWorldForceScaled(pos:Vector3, force:Vector3, scale:Number) : void
{
if(isNaN(pos.x) || isNaN(pos.y) || isNaN(pos.z))
{
return;
}
if(isNaN(force.x) || isNaN(force.y) || isNaN(force.z))
{
return;
}
super.addWorldForceScaled(pos,force,scale);
}
public function getAllGunParams(param1:AllGlobalGunParams, muzzles:Vector.<Vector3>, param2:int = 0) : void
{
WeaponUtils.getInstance().calculateMainGunParams(this.skin.turretMesh,muzzles[param2],param1);
}
public function setTurretController(controller:TurretController) : void
{
this.turretController = controller;
}
public function getTurretController() : TurretController
{
return this.turretController;
}
public function lockTransformUpdate() : void
{
this.hullTransformUpdater = this.lockedHullTransformUpdater;
this.hullTransformUpdater.reset();
}
public function unlockTransformUpdate() : void
{
this.hullTransformUpdater = this.notLockedHullUpdater;
this.hullTransformUpdater.reset();
}
private function calculateSkinCenterOffset(param1:Vector3) : void
{
var _loc2_:Mesh = this.skin.hullMesh;
_loc2_.calculateBounds();
this.skinCenterOffset.x = -0.5 * (_loc2_.boundMinX + _loc2_.boundMaxX);
this.skinCenterOffset.y = -0.5 * (_loc2_.boundMinY + _loc2_.boundMaxY);
this.skinCenterOffset.z = -0.5 * param1.z - this.suspensionData.rayOptimalLength + 10;
}
public function setAnimationTracks(value:Boolean) : void
{
this.animatedTracks = value;
}
public function getBoundSphereRadius() : Number
{
return this.shpereRadius;
}
private function setBoundSphereRadius(radius:Vector3, p1:Number) : void
{
var _loc3_:Vector3 = new Vector3(radius.x,radius.y,p1 / 2);
var _loc4_:Matrix4 = this.mainCollisionBox.transform;
this.shpereRadius = _loc3_.vLength() + Math.abs(_loc4_.k);
}
private function calculateSizeFromMesh(mesh:Mesh) : Vector3
{
return new Vector3(mesh.boundMaxX - mesh.boundMinX,mesh.boundMaxY - mesh.boundMinY,mesh.boundMaxZ - mesh.boundMinZ);
}
public function setMaxTurretTurnSpeed(value:Number, immediate:Boolean) : void
{
if(immediate)
{
this.maxTurretTurnSpeed = value;
this.maxTurretTurnSpeedSmoother.reset(value);
}
else
{
this.maxTurretTurnSpeedSmoother.targetValue = value;
}
}
public function setMaxTurnSpeed(value:Number, immediate:Boolean) : void
{
if(immediate)
{
this.maxTurnSpeed = value;
this.maxTurnSpeedSmoother.reset(value);
}
else
{
this.maxTurnSpeedSmoother.targetValue = value;
}
}
public function setMaxSpeed(value:Number, immediate:Boolean) : void
{
if(immediate)
{
this.maxSpeed = value;
this.maxSpeedSmoother.reset(value);
}
else
{
this.maxSpeedSmoother.targetValue = value;
}
}
public function get collisionGroup() : int
{
return collisionPrimitives.head.primitive.collisionGroup;
}
public function set collisionGroup(value:int) : void
{
var item:CollisionPrimitiveListItem = collisionPrimitives.head;
while(item != null)
{
item.primitive.collisionGroup = value;
item = item.next;
}
}
public function set tracksCollisionGroup(value:int) : void
{
this.leftTrack.collisionGroup = value;
this.rightTrack.collisionGroup = value;
}
public function setMassAndDimensions(mass:Number, dimensions:Vector3) : void
{
var xx:Number = NaN;
var yy:Number = NaN;
var zz:Number = NaN;
if(isNaN(mass) || mass <= 0)
{
throw new ArgumentError("Wrong mass");
}
if(dimensions == null || dimensions.x <= 0 || dimensions.y <= 0 || dimensions.z <= 0)
{
throw new ArgumentError("Wrong dimensions");
}
this.mass = mass;
this.dimensions.vCopy(dimensions);
if(mass == Infinity)
{
invMass = 0;
invInertia.copy(Matrix3.ZERO);
}
else
{
invMass = 1 / mass;
xx = dimensions.x * dimensions.x;
yy = dimensions.y * dimensions.y;
zz = dimensions.z * dimensions.z;
invInertia.a = 12 * invMass / (yy + zz);
invInertia.f = 12 * invMass / (zz + xx);
invInertia.k = 12 * invMass / (xx + yy);
}
this.setupCollisionPrimitives();
}
override public function addToContainer(container:Scene3DContainer) : void
{
if(this.container != null)
{
this.removeFromContainer();
}
this.container = container;
this._skin.addToContainer(container);
if(this._title != null)
{
this._title.addToContainer(this.titleContainer);
}
if(this._showCollisionGeometry)
{
this.addDebugBoxesToContainer(container);
}
var raduis:Vector3 = this.calculateSizeFromMesh(this.skin.hullMesh);
var hall:Vector3 = new Vector3(raduis.x / 2,raduis.y / 2,raduis.z / 2);
var p1:Number = 2 * raduis.z - (this.suspensionData.rayOptimalLength - 10);
this.setBoundSphereRadius(raduis,p1);
this.calculateSkinCenterOffset(raduis);
}
override public function removeFromContainer() : void
{
this._skin.removeFromContainer();
if(this._title != null)
{
this._title.removeFromContainer();
}
if(this._showCollisionGeometry)
{
this.removeDebugBoxesFromContainer();
}
this.container = null;
}
public function createTracks(raysNum:int, trackLength:Number, widthBetween:Number) : void
{
this.leftTrack = new Track(this,raysNum,new Vector3(-0.5 * widthBetween,0,-0.5 * this.dimensions.z + this.RAY_OFFSET),trackLength);
this.rightTrack = new Track(this,raysNum,new Vector3(0.5 * widthBetween,0,-0.5 * this.dimensions.z + this.RAY_OFFSET),trackLength);
}
public function setThrottle(throttleLeft:Number, throttleRight:Number) : void
{
this.leftThrottle = throttleLeft;
this.rightThrottle = throttleRight;
}
public function setBrakes(lb:Boolean, rb:Boolean) : void
{
this.leftBrake = lb;
this.rightBrake = rb;
}
public function rotateTurret(timeFactor:Number, stopAtZero:Boolean) : Boolean
{
var sign:Boolean = this._skin.turretDirection < 0;
this.turretTurnSpeed += timeFactor * this.turretTurnAcceleration;
if(this.turretTurnSpeed < -this.maxTurretTurnSpeed)
{
this.turretTurnSpeed = -this.maxTurretTurnSpeed;
}
else if(this.turretTurnSpeed > this.maxTurretTurnSpeed)
{
this.turretTurnSpeed = this.maxTurretTurnSpeed;
}
this.turretDir += this.turretTurnSpeed * (timeFactor < 0 ? -timeFactor : timeFactor);
if(stopAtZero && sign != this._skin.turretDirection < 0)
{
this.turretTurnSpeed = 0;
this._skin.turretDirection = 0;
return true;
}
return false;
}
public function rotateTurretDo(timeFactor:Number, stopAt:Number) : Boolean
{
var sign:Boolean = this._skin.turretDirection < stopAt;
this.turretTurnSpeed += timeFactor * this.turretTurnAcceleration;
if(this.turretTurnSpeed < -this.maxTurretTurnSpeed)
{
this.turretTurnSpeed = -this.maxTurretTurnSpeed;
}
else if(this.turretTurnSpeed > this.maxTurretTurnSpeed)
{
this.turretTurnSpeed = this.maxTurretTurnSpeed;
}
this.turretDir += this.turretTurnSpeed * (timeFactor < 0 ? -timeFactor : timeFactor);
if(sign != this._skin.turretDirection < stopAt)
{
this._skin.turretDirection = this.turretTurnSpeed = stopAt;
return true;
}
return false;
}
public function stopTurret() : void
{
this.turretTurnSpeed = 0;
}
public function get turretDirSign() : int
{
return this._skin.turretDirection < 0 ? int(int(-1)) : (this._skin.turretDirection > 0 ? int(int(1)) : int(int(0)));
}
public function get skin() : TankSkin
{
return this._skin;
}
public function interpolatePhysicsState(t:Number) : void
{
interpolate(t,this.interpolatedPosition,this.interpolatedOrientation);
this.interpolatedOrientation.normalize();
if(this.hullTransformUpdater != null)
{
this.hullTransformUpdater.update(t);
}
}
override public function updateSkin(t:Number) : void
{
var avel:Number = NaN;
var Speed:Number = NaN;
this.interpolatePhysicsState(t);
_pos.x += this.skinZCorrection * _m.c;
_pos.y += this.skinZCorrection * _m.g;
_pos.z += this.skinZCorrection * _m.k;
this.skin.updateTransform(_pos,_orient);
this.skin.turretMesh.matrix.transformVectors(_vin,_vout);
_pos.x = _vout[0];
_pos.y = _vout[1];
_pos.z = _vout[2];
_pos.z += !!this.local ? 0 : 200;
this._title.update(_pos);
if(this.animatedTracks)
{
avel = Math.abs(this.state.rotation.z);
Speed = this.getVelocity();
this._skin.updateTracks(this.trackSpeed.calcTrackSpeed(Speed,avel,this.tankData.ctrlBits,this.leftTrack.lastContactsNum,this.contactsNum,this.maxSpeed,-1),this.trackSpeed.calcTrackSpeed(Speed,avel,this.tankData.ctrlBits,this.rightTrack.lastContactsNum,this.contactsNum,this.maxSpeed,1));
}
}
public function updatePhysicsState() : void
{
this.interpolatePhysicsState(1);
this.hullTransformUpdater.update(0);
}
public function getBarrelOrigin(param1:Vector3, muzzles:Vector.<Vector3>, param2:int = 0) : void
{
param1.vCopy(muzzles[param2]);
param1.y = 0;
}
public function jump() : void
{
this.jumpActivated = true;
}
override public function beforePhysicsStep(dt:Number) : void
{
var d:Number = NaN;
var limit:Number = NaN;
if(this.maxSpeed != this.maxSpeedSmoother.targetValue)
{
this.maxSpeed = this.maxSpeedSmoother.update(dt);
}
if(this.maxTurnSpeed != this.maxTurnSpeedSmoother.targetValue)
{
this.maxTurnSpeed = this.maxTurnSpeedSmoother.update(dt);
}
if(this.maxTurretTurnSpeed != this.maxTurretTurnSpeedSmoother.targetValue)
{
this.maxTurretTurnSpeed = this.maxTurretTurnSpeedSmoother.update(dt);
}
var slipTerm:int = this.leftThrottle > this.rightThrottle ? int(int(-1)) : (this.leftThrottle < this.rightThrottle ? int(int(1)) : int(int(0)));
var weight:Number = this.mass * world._gravity.vLength();
var k:Number = this.leftThrottle != this.rightThrottle && !(this.leftBrake || this.rightBrake) && state.rotation.vLength() > this.maxTurnSpeed ? Number(Number(0.1)) : Number(Number(1));
this.leftTrack.addForces(dt,k * this.leftThrottle,this.maxSpeed,slipTerm,weight,this.suspensionData,this.leftBrake);
this.rightTrack.addForces(dt,k * this.rightThrottle,this.maxSpeed,slipTerm,weight,this.suspensionData,this.rightBrake);
if(this.rightTrack.lastContactsNum >= this.rightTrack.raysNum >> 1 || this.leftTrack.lastContactsNum >= this.leftTrack.raysNum >> 1)
{
d = world._gravity.x * baseMatrix.c + world._gravity.y * baseMatrix.g + world._gravity.z * baseMatrix.k;
limit = Math.SQRT1_2 * world._gravity.vLength();
if(d < -limit || d > limit)
{
_v.x = (baseMatrix.c * d - world._gravity.x) / invMass;
_v.y = (baseMatrix.g * d - world._gravity.y) / invMass;
_v.z = (baseMatrix.k * d - world._gravity.z) / invMass;
addForce(_v);
}
}
}
public function setOptimalZCorrection() : void
{
this.skinZCorrection = -0.5 * this.dimensions.z - this.suspensionData.rayOptimalLength + this.RAY_OFFSET;
}
public function getPhysicsState(pos:Vector3d, orient:Vector3d, linVel:Vector3d, angVel:Vector3d) : void
{
this.vector3To3d(state.pos,pos);
state.orientation.getEulerAngles(_v);
orient.x = _v.x;
orient.y = _v.y;
orient.z = _v.z;
this.vector3To3d(state.velocity,linVel);
this.vector3To3d(state.rotation,angVel);
}
public function getVelocity() : Number
{
return state.velocity.vLength();
}
public function setPhysicsState(pos:Vector3d, orient:Vector3d, linVel:Vector3d, angVel:Vector3d) : void
{
this.vector3dTo3(pos,state.pos);
_orient.setFromAxisAngleComponents(1,0,0,orient.x);
state.orientation.copy(_orient);
_orient.setFromAxisAngleComponents(0,1,0,orient.y);
state.orientation.append(_orient);
state.orientation.normalize();
_orient.setFromAxisAngleComponents(0,0,1,orient.z);
state.orientation.append(_orient);
state.orientation.normalize();
this.vector3dTo3(linVel,state.velocity);
this.vector3dTo3(angVel,state.rotation);
prevState.copy(state);
}
public function get turretDir() : Number
{
return this._skin.turretDirection;
}
public function set turretDir(value:Number) : void
{
if(this._skin == null)
{
return;
}
if(value > PI)
{
this._skin.turretDirection = value - PI2;
}
else if(value < -PI)
{
this._skin.turretDirection = value + PI2;
}
else
{
this._skin.turretDirection = value;
}
}
public function get title() : UserTitle
{
return this._title;
}
public function debugDraw(g:Graphics, camera:Camera3D) : void
{
this.leftTrack.debugDraw(g,camera,this.suspensionData);
this.rightTrack.debugDraw(g,camera,this.suspensionData);
}
public function get showCollisionGeometry() : Boolean
{
return this._showCollisionGeometry;
}
public function set showCollisionGeometry(value:Boolean) : void
{
if(this._showCollisionGeometry == value)
{
return;
}
this._showCollisionGeometry = value;
if(this._showCollisionGeometry)
{
if(this.container != null)
{
this.addDebugBoxesToContainer(this.container);
}
}
else if(this.container != null)
{
this.removeDebugBoxesFromContainer();
}
}
public function setHullTransformUpdater(hull_:HullTransformUpdater) : void
{
this.hullTransformUpdater = hull_;
this.notLockedHullUpdater = hull_;
this.hullTransformUpdater.reset();
}
private function setupCollisionPrimitives() : void
{
var key:* = undefined;
var prim:CollisionBox = null;
var item:CollisionPrimitiveListItem = null;
var hs:Vector3 = this.dimensions.vClone().vScale(0.5);
var sizeX:Number = hs.x;
var sizeY:Number = hs.y;
var sizeZ:Number = hs.z;
var m:Matrix4 = new Matrix4();
if(collisionPrimitives == null)
{
hs.y = 0.8 * sizeY;
this.mainCollisionBox = new CollisionBox(hs,0);
addCollisionPrimitive(this.mainCollisionBox);
hs.y = sizeY;
hs.z = sizeZ / 3;
m.l = 2 * sizeZ / 3;
addCollisionPrimitive(new CollisionBox(hs,0),m);
this.visibilityPoints = Vector.<Vector3>([new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3()]);
}
else
{
item = collisionPrimitives.head;
hs.y = 0.8 * sizeY;
prim = CollisionBox(item.primitive);
prim.hs.vCopy(hs);
item = item.next;
hs.y = sizeY;
hs.z = sizeZ / 3;
m.l = 2 * sizeZ / 3;
prim = CollisionBox(item.primitive);
prim.hs.vCopy(hs);
prim.localTransform.copy(m);
}
Vector3(this.visibilityPoints[0]).vReset(-sizeX,sizeY,0);
Vector3(this.visibilityPoints[1]).vReset(sizeX,sizeY,0);
Vector3(this.visibilityPoints[2]).vReset(-sizeX,0,0);
Vector3(this.visibilityPoints[3]).vReset(sizeX,0,0);
Vector3(this.visibilityPoints[4]).vReset(-sizeX,-sizeY,0);
Vector3(this.visibilityPoints[5]).vReset(sizeX,-sizeY,0);
this.removeDebugBoxesFromContainer();
for(key in this.bbs)
{
delete this.bbs[key];
}
}
private function vector3To3d(v:Vector3, result:Vector3d) : void
{
result.x = v.x;
result.y = v.y;
result.z = v.z;
}
private function vector3dTo3(v:Vector3d, result:Vector3) : void
{
result.x = v.x;
result.y = v.y;
result.z = v.z;
}
private function addDebugBoxesToContainer(container:Scene3DContainer) : void
{
}
private function removeDebugBoxesFromContainer() : void
{
}
public function destroy(fully:Boolean = false) : *
{
var v:Vector3 = null;
if(this.mainCollisionBox != null)
{
this.mainCollisionBox.destroy();
}
this.mainCollisionBox = null;
if(this._skin != null)
{
this._skin.destroy(fully);
}
if(!fully)
{
return;
}
this.skinCenterOffset = null;
this.interpolatedPosition = null;
for each(v in this.visibilityPoints)
{
v = null;
}
this._skin = null;
}
}
}
import com.reygazu.anticheat.variables.SecureNumber;
class SecureValueSmoother implements IValueSmoother
{
public var currentValue:SecureNumber;
public var targetValue_:SecureNumber;
public var smoothingSpeedUp:SecureNumber;
public var smoothingSpeedDown:SecureNumber;
function SecureValueSmoother(smoothingSpeedUp:Number, smoothingSpeedDown:Number, targetValue:Number, currentValue:Number)
{
this.currentValue = new SecureNumber("SecureValueSmoother::currentValue");
this.targetValue_ = new SecureNumber("SecureValueSmoother::targetValue_");
this.smoothingSpeedUp = new SecureNumber("SecureValueSmoother::smoothingSpeedUp");
this.smoothingSpeedDown = new SecureNumber("SecureValueSmoother::smoothingSpeedDown");
super();
this.smoothingSpeedUp.value = smoothingSpeedUp;
this.smoothingSpeedDown.value = smoothingSpeedDown;
this.targetValue_.value = targetValue;
this.currentValue.value = currentValue;
}
public function reset(value:Number) : void
{
this.currentValue.value = value;
this.targetValue_.value = value;
}
public function update(dt:Number) : Number
{
if(this.currentValue.value < this.targetValue_.value)
{
this.currentValue.value += this.smoothingSpeedUp.value * dt;
if(this.currentValue.value > this.targetValue_.value)
{
this.currentValue.value = this.targetValue_.value;
}
}
else if(this.currentValue.value > this.targetValue_.value)
{
this.currentValue.value -= this.smoothingSpeedDown.value * dt;
if(this.currentValue.value < this.targetValue_.value)
{
this.currentValue.value = this.targetValue_.value;
}
}
return this.currentValue.value;
}
public function set targetValue(v:Number) : void
{
this.targetValue_.value = v;
}
public function get targetValue() : Number
{
return this.targetValue_.value;
}
}
interface IValueSmoother
{
function reset(param1:Number) : void;
function update(param1:Number) : Number;
function set targetValue(param1:Number) : void;
function get targetValue() : Number;
}
class ValueSmoother implements IValueSmoother
{
public var currentValue:Number;
public var targetValue_:Number;
public var smoothingSpeedUp:Number;
public var smoothingSpeedDown:Number;
function ValueSmoother(smoothingSpeedUp:Number, smoothingSpeedDown:Number, targetValue:Number, currentValue:Number)
{
super();
this.smoothingSpeedUp = smoothingSpeedUp;
this.smoothingSpeedDown = smoothingSpeedDown;
this.targetValue_ = targetValue;
this.currentValue = currentValue;
}
public function reset(value:Number) : void
{
this.currentValue = value;
this.targetValue_ = value;
}
public function update(dt:Number) : Number
{
if(this.currentValue < this.targetValue_)
{
this.currentValue += this.smoothingSpeedUp * dt;
if(this.currentValue > this.targetValue_)
{
this.currentValue = this.targetValue_;
}
}
else if(this.currentValue > this.targetValue_)
{
this.currentValue -= this.smoothingSpeedDown * dt;
if(this.currentValue < this.targetValue_)
{
this.currentValue = this.targetValue_;
}
}
return this.currentValue;
}
public function set targetValue(v:Number) : void
{
this.targetValue_ = v;
}
public function get targetValue() : Number
{
return this.targetValue_;
}
}
|
package projects.tanks.client.commons.models.layout.notify {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.EnumCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import projects.tanks.client.commons.models.layout.LayoutState;
public class LobbyLayoutNotifyModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:LobbyLayoutNotifyModelServer;
private var client:ILobbyLayoutNotifyModelBase = ILobbyLayoutNotifyModelBase(this);
private var modelId:Long = Long.getLong(1481647778,-291699533);
private var _beginLayoutSwitchId:Long = Long.getLong(1809738995,677658011);
private var _beginLayoutSwitch_stateCodec:ICodec;
private var _cancelPredictedLayoutSwitchId:Long = Long.getLong(527428095,-1647091354);
private var _endLayoutSwitchId:Long = Long.getLong(2122248367,-1459259159);
private var _endLayoutSwitch_originCodec:ICodec;
private var _endLayoutSwitch_stateCodec:ICodec;
public function LobbyLayoutNotifyModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new LobbyLayoutNotifyModelServer(IModel(this));
this._beginLayoutSwitch_stateCodec = this._protocol.getCodec(new EnumCodecInfo(LayoutState,false));
this._endLayoutSwitch_originCodec = this._protocol.getCodec(new EnumCodecInfo(LayoutState,false));
this._endLayoutSwitch_stateCodec = this._protocol.getCodec(new EnumCodecInfo(LayoutState,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._beginLayoutSwitchId:
this.client.beginLayoutSwitch(LayoutState(this._beginLayoutSwitch_stateCodec.decode(param2)));
break;
case this._cancelPredictedLayoutSwitchId:
this.client.cancelPredictedLayoutSwitch();
break;
case this._endLayoutSwitchId:
this.client.endLayoutSwitch(LayoutState(this._endLayoutSwitch_originCodec.decode(param2)),LayoutState(this._endLayoutSwitch_stateCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.loader
{
public interface ILoaderWindowService
{
function setBatchIdForProcess(param1:int, param2:Object) : void;
function showLoaderWindow() : void;
function hideLoaderWindow() : void;
function lockLoaderWindow() : void;
function unlockLoaderWindow() : void;
}
}
|
package alternativa.tanks.model.item.resistance {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class MountedResistancesAdapt implements MountedResistances {
private var object:IGameObject;
private var impl:MountedResistances;
public function MountedResistancesAdapt(param1:IGameObject, param2:MountedResistances) {
super();
this.object = param1;
this.impl = param2;
}
public function mount(param1:int, param2:IGameObject) : void {
var index:int = param1;
var item:IGameObject = param2;
try {
Model.object = this.object;
this.impl.mount(index,item);
}
finally {
Model.popObject();
}
}
public function unmount(param1:IGameObject) : void {
var item:IGameObject = param1;
try {
Model.object = this.object;
this.impl.unmount(item);
}
finally {
Model.popObject();
}
}
public function getMounted() : Vector.<IGameObject> {
var result:Vector.<IGameObject> = null;
try {
Model.object = this.object;
result = this.impl.getMounted();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.network
{
import alternativa.init.NetworkActivator;
import alternativa.osgi.service.console.IConsoleService;
import alternativa.osgi.service.log.ILogService;
import alternativa.osgi.service.log.LogLevel;
import alternativa.osgi.service.network.INetworkService;
import alternativa.protocol.Packet;
import alternativa.protocol.Protocol;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.events.SecurityErrorEvent;
import flash.net.Socket;
import flash.utils.ByteArray;
public class CommandSocket implements ICommandSender
{
private static const CHANNEL:String = "CMDSOCKET";
private static var counter:int;
private var socket:Socket;
private var _id:int;
private var packet:Packet;
private var protocol:Protocol;
private var handler:ICommandHandler;
private var dataBuffer:ByteArray;
private var packetCursor:int;
private var host:String;
private var port:uint;
private var proxyHost:String;
private var proxyPort:uint;
public function CommandSocket(host:String, port:uint, packet:Packet, protocol:Protocol, handler:ICommandHandler)
{
super();
this._id = counter++;
var networkService:INetworkService = NetworkActivator.osgi.getService(INetworkService) as INetworkService;
this.host = host;
this.port = port;
this.proxyHost = networkService.proxyHost;
this.proxyPort = networkService.proxyPort;
this.packet = packet;
this.protocol = protocol;
this.handler = handler;
handler.commandSender = this;
this.dataBuffer = new ByteArray();
this.packetCursor = 0;
if(this.proxyHost == "" && this.proxyPort == 0)
{
this.socket = new Socket(host,port);
}
else
{
this.socket = new RFC2817Socket(host,port);
(this.socket as RFC2817Socket).setProxyInfo(this.proxyHost,this.proxyPort);
}
this.socket.timeout = 120000;
this.configureListeners();
}
public function connect(host:String, port:int) : void
{
this.socket.connect(host,port);
}
public function sendCommand(command:Object, zipped:Boolean = false) : void
{
var encoded:ByteArray = null;
var dataString:String = null;
var b:String = null;
var console:IConsoleService = NetworkActivator.osgi.getService(IConsoleService) as IConsoleService;
console.writeToConsoleChannel(CHANNEL,"CommandSocket sendCommand");
try
{
encoded = new ByteArray();
this.protocol.encode(encoded,command);
encoded.position = 0;
console.writeToConsoleChannel(CHANNEL,"CommandSocket [id=%1] sendCommand encoded bytes:",this._id);
dataString = " ";
while(encoded.bytesAvailable)
{
b = encoded.readUnsignedByte().toString(16).toUpperCase() + " ";
if(b.length < 3)
{
b = "0" + b;
}
dataString += b;
}
console.writeToConsoleChannel(CHANNEL,dataString);
encoded.position = 0;
if(zipped)
{
this.packet.wrapZippedPacket(encoded,this.socket);
}
else
{
this.packet.wrapUnzippedPacket(encoded,this.socket);
}
this.socket.flush();
}
catch(error:Error)
{
(NetworkActivator.osgi.getService(ILogService) as ILogService).log(LogLevel.LOG_ERROR,"[CommandSocket] : sendCommand ERROR: " + error.toString());
}
}
public function close() : void
{
IConsoleService(NetworkActivator.osgi.getService(IConsoleService)).writeToConsoleChannel(CHANNEL,"CLOSE id=%1",this._id);
this.socket.flush();
this.socket.close();
this.handler.close();
}
public function get id() : int
{
return this._id;
}
private function configureListeners() : void
{
this.socket.addEventListener(Event.CLOSE,this.closeHandler);
this.socket.addEventListener(Event.CONNECT,this.connectHandler);
this.socket.addEventListener(IOErrorEvent.IO_ERROR,this.ioErrorHandler);
this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.securityErrorHandler);
this.socket.addEventListener(ProgressEvent.SOCKET_DATA,this.socketDataHandler);
}
private function connectHandler(event:Event) : void
{
this.handler.open();
IConsoleService(NetworkActivator.osgi.getService(IConsoleService)).writeToConsoleChannel(CHANNEL,"CommandSocket opened id=%1",this._id);
ILogService(NetworkActivator.osgi.getService(ILogService)).log(LogLevel.LOG_DEBUG,"CommandSocket opened");
}
private function closeHandler(event:Event) : void
{
this.handler.close();
IConsoleService(NetworkActivator.osgi.getService(IConsoleService)).writeToConsoleChannel(CHANNEL,"CommandSocket closed id=%1",this._id);
ILogService(NetworkActivator.osgi.getService(ILogService)).log(LogLevel.LOG_DEBUG,"CommandSocket closed");
}
private function socketDataHandler(event:ProgressEvent) : void
{
var unwrappedData:ByteArray = null;
unwrappedData = null;
var unwrapped:Boolean = false;
var decodedData:Object = null;
this.dataBuffer.position = this.dataBuffer.length;
while(this.socket.bytesAvailable > 0)
{
this.dataBuffer.writeByte(this.socket.readByte());
}
this.dataBuffer.position = this.packetCursor;
var readBuffer:Boolean = Boolean(this.dataBuffer.bytesAvailable);
while(readBuffer)
{
unwrappedData = new ByteArray();
unwrapped = this.packet.unwrapPacket(this.dataBuffer,unwrappedData);
if(unwrapped)
{
unwrappedData.position = 0;
while(unwrappedData.bytesAvailable)
{
try
{
decodedData = this.protocol.decode(unwrappedData);
this.handler.executeCommand(decodedData);
}
catch(e:Error)
{
unwrappedData.clear();
}
}
if(this.dataBuffer.bytesAvailable == 0)
{
this.dataBuffer.clear();
this.packetCursor = 0;
readBuffer = false;
}
else
{
this.packetCursor = this.dataBuffer.position;
}
}
else
{
readBuffer = false;
}
}
}
private function ioErrorHandler(event:IOErrorEvent) : void
{
this.handler.disconnect(event.toString());
}
private function securityErrorHandler(event:SecurityErrorEvent) : void
{
this.handler.disconnect(event.toString());
}
}
}
|
package forms
{
import flash.geom.ColorTransform;
public class ColorConstants
{
public static const BATTLE_SUSPICIOUS_HIGH:uint = 16048128;
public static const BATTLE_SUSPICIOUS_LOW:uint = 14368318;
public static const SUSPICIOUS:uint = 16048128;
public static const WHITE:uint = 16777215;
public static const CHAT_LABEL:uint = 1244928;
public static const GREEN_LABEL:uint = 5898034;
public static const ACCESS_LABEL:uint = 11645361;
public static const FRIEND_COLOR:uint = 12582791;
public static const DISBALANCE_BATTLE:uint = 14368318;
public static const DISBALANCE_BATTLE_COLOR_TRANSFORM:ColorTransform = new ColorTransform(0,0,0,1,219,62,62);
public static const GREEN_TEXT:uint = 381208;
public static const SHOP_CRYSTALS_TEXT_LABEL_COLOR:uint = 23704;
public static const SHOP_MONEY_TEXT_LABEL_COLOR:uint = 4144959;
public static const SHOP_ITEM_NAME_LABEL_COLOR:uint = 3432728;
public static const USER_TITLE_RED:uint = 15741974;
public static const USER_TITLE_BLUE:uint = 4691967;
public static const USER_TITLE_YELLOW:uint = 14207247;
public static const INPUT_DISABLED:uint = 8158332;
public static const LIST_LABEL_HINT:uint = 10987948;
public static const NEWS_DATE:uint = 8454016;
public static const HEADER_COLOR:uint = 860685;
public function ColorConstants()
{
super();
}
}
}
|
package projects.tanks.client.garage.models.item.properties {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
public class ItemPropertiesModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ItemPropertiesModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.protocol.info {
import alternativa.protocol.ICodecInfo;
public class SetCodecInfo extends CodecInfo {
private var _elementCodec:ICodecInfo;
public function SetCodecInfo(param1:ICodecInfo, param2:Boolean) {
super(param2);
this._elementCodec = param1;
}
public function get elementCodec() : ICodecInfo {
return this._elementCodec;
}
override public function toString() : String {
return "[SetCodecInfo " + super.toString() + " element=" + this.elementCodec.toString() + "]";
}
}
}
|
package scpacker.resource.cache
{
import alternativa.console.IConsole;
import alternativa.init.Main;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.system.Capabilities;
import flash.utils.ByteArray;
import flash.utils.getDefinitionByName;
public class CacheURLLoader extends URLLoader
{
private var url:String;
private var encodedUrl:String;
private var cacheDirectory:Object;
private var FileClass:Class;
private var FileStreamClass:Class;
private var FileModeClass:Class;
public function CacheURLLoader()
{
super();
if(isDesktop)
{
this.FileClass = getDefinitionByName("flash.filesystem.File") as Class;
this.FileStreamClass = getDefinitionByName("flash.filesystem.FileStream") as Class;
this.FileModeClass = getDefinitionByName("flash.filesystem.FileMode") as Class;
this.cacheDirectory = this.FileClass.applicationStorageDirectory.resolvePath("cache");
if(!this.cacheDirectory.exists)
{
this.cacheDirectory.createDirectory();
}
else if(!this.cacheDirectory.isDirectory)
{
throw new Error("Cannot create directory." + this.cacheDirectory.nativePath + " is already exists.");
}
}
}
public static function get isDesktop() : Boolean
{
return Capabilities.playerType == "Desktop" || Capabilities.playerType == "External";
}
override public function load(param1:URLRequest) : void
{
if(!isDesktop)
{
super.load(param1);
return;
}
this.url = param1.url;
if(this.url.indexOf("?") >= 0)
{
this.url = this.url.split("?")[0];
}
var _loc2_:Object = this.cacheDirectory.resolvePath(this.url);
super.addEventListener(IOErrorEvent.IO_ERROR,this.onError,false,0,true);
super.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onError,false,0,true);
super.load(new URLRequest(_loc2_.url));
}
private function loadFromServer(param1:URLRequest) : void
{
}
private function onError(param1:IOErrorEvent) : void
{
(Main.osgi.getService(IConsole) as IConsole).addLine("Error load resource: " + this.url);
}
private function onComplete(param1:Event) : void
{
var e:Event = param1;
var file:Object = new this.FileClass(this.cacheDirectory.resolvePath(this.encodedUrl).nativePath);
var fileStream:Object = new this.FileStreamClass();
try
{
fileStream.open(file,this.FileModeClass.WRITE);
fileStream.writeBytes(URLLoader(e.target).data as ByteArray);
fileStream.close();
return;
}
catch(e:Error)
{
throw new IOErrorEvent("CacheURLLoader error! " + e.message);
}
}
}
}
|
package projects.tanks.client.garage.models.item.rarity {
public interface IItemRarityModelBase {
}
}
|
package platform.client.fp10.core.model {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IObjectLoadListenerAdapt implements IObjectLoadListener {
private var object:IGameObject;
private var impl:IObjectLoadListener;
public function IObjectLoadListenerAdapt(param1:IGameObject, param2:IObjectLoadListener) {
super();
this.object = param1;
this.impl = param2;
}
public function objectLoaded() : void {
try {
Model.object = this.object;
this.impl.objectLoaded();
}
finally {
Model.popObject();
}
}
public function objectLoadedPost() : void {
try {
Model.object = this.object;
this.impl.objectLoadedPost();
}
finally {
Model.popObject();
}
}
public function objectUnloaded() : void {
try {
Model.object = this.object;
this.impl.objectUnloaded();
}
finally {
Model.popObject();
}
}
public function objectUnloadedPost() : void {
try {
Model.object = this.object;
this.impl.objectUnloadedPost();
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_modifiedfiringrateIconClass.png")]
public class DeviceIcons_modifiedfiringrateIconClass extends BitmapAsset {
public function DeviceIcons_modifiedfiringrateIconClass() {
super();
}
}
}
|
package alternativa.tanks.models.battle.facilities {
import alternativa.engine3d.core.Object3D;
public class CommonFacilityData {
public var object3d:Object3D;
public var isDispelled:Boolean = false;
public function CommonFacilityData(param1:Object3D) {
super();
this.object3d = param1;
}
}
}
|
package alternativa.tanks.view.battlelist.battleitem {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battlelist.battleitem.BattleTypeIcon_proDisableClass.png")]
public class BattleTypeIcon_proDisableClass extends BitmapAsset {
public function BattleTypeIcon_proDisableClass() {
super();
}
}
}
|
package projects.tanks.clients.flash.commons.models.layout {
import projects.tanks.client.commons.models.layout.LayoutState;
[ModelInterface]
public interface ILobbyLayout {
function showGarage() : void;
function showBattleSelect() : void;
function showMatchmaking() : void;
function showBattleLobby() : void;
function showClan() : void;
function exitFromBattle() : void;
function exitFromBattleToState(param1:LayoutState) : void;
function returnToBattle() : void;
}
}
|
package alternativa.types {
public class Short {
public function Short() {
super();
}
}
}
|
package scpacker.gui.combo
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class DPLBackground_b extends BitmapAsset
{
public function DPLBackground_b()
{
super();
}
}
}
|
package alternativa.tanks.models.weapon.splash {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.physics.collision.types.RayHit;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.objects.tank.ClientTankState;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.models.weapon.WeaponConst;
import alternativa.tanks.physics.CollisionGroup;
import alternativa.tanks.physics.TankBody;
import alternativa.tanks.physics.TanksCollisionDetector;
import platform.client.fp10.core.model.ObjectLoadListener;
import projects.tanks.client.battlefield.models.tankparts.weapon.splash.ISplashModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapon.splash.SplashCC;
import projects.tanks.client.battlefield.models.tankparts.weapon.splash.SplashModelBase;
[ModelInfo]
public class SplashModel extends SplashModelBase implements ISplashModelBase, ObjectLoadListener, Splash {
[Inject]
public static var battleService:BattleService;
private static const vectorToTarget:Vector3 = new Vector3();
private static const forceDirection:Vector3 = new Vector3();
private static const vector:Vector3 = new Vector3();
private static const rayHit:RayHit = new RayHit();
public function SplashModel() {
super();
}
[Obfuscation(rename="false")]
public function objectLoaded() : void {
var local1:SplashCC = getInitParam();
var local2:SplashParams = null;
if(local1 != null) {
local2 = new SplashParams(BattleUtils.toClientScale(local1.radiusOfMaxSplashDamage),BattleUtils.toClientScale(local1.splashDamageRadius),local1.minSplashDamagePercent,local1.impactForce * WeaponConst.BASE_IMPACT_FORCE.getNumber());
}
putData(SplashParams,local2);
}
public function applySplashForce(param1:Vector3, param2:Number, param3:Body, param4:SplashParams = null) : Boolean {
var local7:TankBody = null;
var local8:Body = null;
var local9:Tank = null;
var local10:Vector3 = null;
var local11:Number = NaN;
if(param4 == null) {
param4 = SplashParams(getData(SplashParams));
if(param4 == null) {
return false;
}
}
var local5:Number = param4.getSplashRadius() * param4.getSplashRadius();
var local6:TanksCollisionDetector = battleService.getBattleRunner().getCollisionDetector();
for each(local7 in local6.getTankBodies()) {
local8 = local7.body;
local9 = local8.tank;
if(local9.state == ClientTankState.ACTIVE && local8 != param3) {
local10 = local9.getBody().state.position;
vectorToTarget.diff(local10,param1);
local11 = vectorToTarget.lengthSqr();
if(local11 <= local5) {
if(!this.isTankOccluded(local9,param1)) {
forceDirection.copy(vectorToTarget);
forceDirection.normalize();
local9.applyWeaponHit(local9.getBody().state.position,forceDirection,param2 * param4.getImpactForce(Math.sqrt(local11)));
}
}
}
}
return true;
}
private function isTankOccluded(param1:Tank, param2:Vector3) : Boolean {
var local3:Body = param1.getBody();
var local4:Number = 0.75 * param1.getHalfLength();
return this.isPointOccluded(param2,local3,0) && this.isPointOccluded(param2,local3,-local4) && this.isPointOccluded(param2,local3,local4);
}
private function isPointOccluded(param1:Vector3, param2:Body, param3:Number) : Boolean {
vector.reset(0,param3,0);
vector.transform3(param2.baseMatrix);
vector.add(param2.state.position);
vector.subtract(param1);
var local4:TanksCollisionDetector = battleService.getBattleRunner().getCollisionDetector();
return local4.raycastStatic(param1,vector,CollisionGroup.STATIC,1,null,rayHit);
}
}
}
|
package projects.tanks.client.entrance.model.entrance.vkontakte {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class VkontakteEntranceModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:VkontakteEntranceModelServer;
private var client:IVkontakteEntranceModelBase = IVkontakteEntranceModelBase(this);
private var modelId:Long = Long.getLong(1006312626,1716761864);
public function VkontakteEntranceModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new VkontakteEntranceModelServer(IModel(this));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.healing {
import alternativa.osgi.OSGi;
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.Float;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete.TargetHit;
public class IsisModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:IsisModelServer;
private var client:IIsisModelBase = IIsisModelBase(this);
private var modelId:Long = Long.getLong(1645686167,1474428435);
private var _addEnergyId:Long = Long.getLong(387345259,-1471314439);
private var _addEnergy_energyDeltaCodec:ICodec;
private var _reconfigureWeaponId:Long = Long.getLong(2020897529,-1471968141);
private var _reconfigureWeapon_dischargeDamageSpeedCodec:ICodec;
private var _reconfigureWeapon_dischargeHealingSpeedCodec:ICodec;
private var _reconfigureWeapon_dischargeIdleSpeedCodec:ICodec;
private var _reconfigureWeapon_radiusCodec:ICodec;
private var _resetTargetId:Long = Long.getLong(1426613749,-669664322);
private var _setTargetId:Long = Long.getLong(387341675,1817286639);
private var _setTarget_stateCodec:ICodec;
private var _setTarget_hitCodec:ICodec;
private var _stopWeaponId:Long = Long.getLong(877312902,1109359872);
public function IsisModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new IsisModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(IsisCC,false)));
this._addEnergy_energyDeltaCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
this._reconfigureWeapon_dischargeDamageSpeedCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._reconfigureWeapon_dischargeHealingSpeedCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._reconfigureWeapon_dischargeIdleSpeedCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._reconfigureWeapon_radiusCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._setTarget_stateCodec = this._protocol.getCodec(new EnumCodecInfo(IsisState,false));
this._setTarget_hitCodec = this._protocol.getCodec(new TypeCodecInfo(TargetHit,false));
}
protected function getInitParam() : IsisCC {
return IsisCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._addEnergyId:
this.client.addEnergy(int(this._addEnergy_energyDeltaCodec.decode(param2)));
break;
case this._reconfigureWeaponId:
this.client.reconfigureWeapon(Number(this._reconfigureWeapon_dischargeDamageSpeedCodec.decode(param2)),Number(this._reconfigureWeapon_dischargeHealingSpeedCodec.decode(param2)),Number(this._reconfigureWeapon_dischargeIdleSpeedCodec.decode(param2)),Number(this._reconfigureWeapon_radiusCodec.decode(param2)));
break;
case this._resetTargetId:
this.client.resetTarget();
break;
case this._setTargetId:
this.client.setTarget(IsisState(this._setTarget_stateCodec.decode(param2)),TargetHit(this._setTarget_hitCodec.decode(param2)));
break;
case this._stopWeaponId:
this.client.stopWeapon();
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.clients.tankslauncershared.dishonestprogressbar {
import mx.core.BitmapAsset;
[Embed(source="/_assets/projects.tanks.clients.tankslauncershared.dishonestprogressbar.DishonestProgressBar_bgdRightClass.png")]
public class DishonestProgressBar_bgdRightClass extends BitmapAsset {
public function DishonestProgressBar_bgdRightClass() {
super();
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.