code stringlengths 57 237k |
|---|
package alternativa.tanks.model.info {
import alternativa.tanks.view.battleinfo.BattleInfoBaseParams;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class BattleInfoParamsEvents implements BattleInfoParams {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function BattleInfoParamsEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getParams() : BattleInfoBaseParams {
var result:BattleInfoBaseParams = null;
var i:int = 0;
var m:BattleInfoParams = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = BattleInfoParams(this.impl[i]);
result = m.getParams();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.clan.info {
import alternativa.types.Long;
import projects.tanks.client.clans.clan.clanflag.ClanFlag;
[ModelInterface]
public interface IClanInfoModel {
function getClanName() : String;
function getClanTag() : String;
function getDescription() : String;
function getClanFlag() : ClanFlag;
function getRankIndexForAddClan() : int;
function incomingRequestEnabled() : Boolean;
function getCreatorId() : Long;
function getCreateTime() : Long;
function getUsersCount() : int;
}
}
|
package assets.windowinner.bitmaps {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.windowinner.bitmaps.WindowInnerBGTile.jpg")]
public class WindowInnerBGTile extends BitmapData {
public function WindowInnerBGTile(param1:int, param2:int, param3:Boolean = true, param4:uint = 0) {
super(param1,param2,param3,param4);
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist.list {
import base.DiscreteSprite;
import controls.base.LabelBase;
import controls.statassets.StatLineHeader;
import flash.text.TextFieldAutoSize;
public class ClanMembersHeaderItem extends DiscreteSprite {
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 ClanMembersHeaderItem(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.model.info {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.loader.ILoaderWindowService;
import alternativa.tanks.model.info.param.BattleParams;
import alternativa.tanks.model.item.BattleFriendsListener;
import alternativa.tanks.model.map.mapinfo.IMapInfo;
import alternativa.tanks.service.battle.IBattleUserInfoService;
import alternativa.tanks.service.battleinfo.IBattleInfoFormService;
import alternativa.tanks.service.battlelist.IBattleListFormService;
import alternativa.tanks.tracker.ITrackerService;
import alternativa.tanks.view.battleinfo.BattleInfoBaseParams;
import alternativa.types.Long;
import flash.utils.getTimer;
import platform.client.fp10.core.model.ObjectUnloadListener;
import platform.client.fp10.core.model.ObjectUnloadPostListener;
import platform.client.fp10.core.resource.types.ImageResource;
import projects.tanks.client.battleselect.model.battle.BattleInfoCC;
import projects.tanks.client.battleselect.model.battle.BattleInfoModelBase;
import projects.tanks.client.battleselect.model.battle.IBattleInfoModelBase;
import projects.tanks.client.battleselect.model.battle.param.BattleParamInfoCC;
import projects.tanks.client.battleservice.model.types.BattleSuspicionLevel;
import projects.tanks.clients.fp10.libraries.tanksservices.service.alertservices.IAlertService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.logging.battlelist.UserBattleSelectActionsService;
[ModelInfo]
public class BattleInfoModel extends BattleInfoModelBase implements IBattleInfoModelBase, ObjectUnloadListener, ObjectUnloadPostListener, IBattleInfo, BattleFriendsListener {
[Inject]
public static var battleInfoFormService:IBattleInfoFormService;
[Inject]
public static var battleAlertService:IAlertService;
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var trackerService:ITrackerService;
[Inject]
public static var alertService:IAlertService;
[Inject]
public static var userBattleSelectActionsService:UserBattleSelectActionsService;
[Inject]
public static var loaderWindowService:ILoaderWindowService;
[Inject]
public static var battleListFormService:IBattleListFormService;
[Inject]
public static var battleUserInfoService:IBattleUserInfoService;
public function BattleInfoModel() {
super();
}
public function roundFinished() : void {
this.data().roundStarted = false;
this.data().endTime = 0;
battleInfoFormService.roundFinish();
}
public function roundStarted(param1:int) : void {
this.data().roundStarted = true;
this.data().endTime = getTimer() + param1 * 1000;
this.data().userToInfo.resetScore();
battleInfoFormService.roundStart(param1);
}
public function updateSuspicion(param1:BattleSuspicionLevel) : void {
battleListFormService.updateSuspicious(object.id,param1);
}
public function updateUserSuspiciousState(param1:Long, param2:Boolean) : void {
battleInfoFormService.updateUserSuspiciousState(param1,param2);
}
public function objectUnloaded() : void {
if(battleInfoFormService.getSelectedBattle() == object) {
battleInfoFormService.hideBattleForms();
}
}
public function getConstructor() : BattleInfoCC {
return getInitParam();
}
public function getPreviewResource() : ImageResource {
var local1:BattleParamInfoCC = BattleParams(object.adapt(BattleParams)).getConstructor();
return IMapInfo(local1.map.adapt(IMapInfo)).getPreviewResource();
}
public function objectUnloadedPost() : void {
battleUserInfoService.deleteBattleItem(object);
battleListFormService.removeBattleItem(object.id);
}
public function onAddFriend(param1:Long) : void {
++this.data().friends;
this.updateUsersCount();
}
public function onDeleteFriend(param1:Long) : void {
--this.data().friends;
this.updateUsersCount();
}
private function data() : BattleInfoBaseParams {
return BattleInfoParams(object.adapt(BattleInfoParams)).getParams();
}
private function updateUsersCount() : void {
battleListFormService.updateUsersCount(object.id);
}
public function setBattleName(param1:String) : void {
this.data().customName = param1;
this.updateBattleName();
}
private function updateBattleName() : void {
battleListFormService.updateBattleName(object.id);
battleInfoFormService.updateBattleName();
}
public function resetBattleName() : void {
this.data().customName = null;
this.updateBattleName();
}
}
}
|
package projects.tanks.client.battlefield.models.anticheat.timechecker {
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 TimeCheckerModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _pongId:Long = Long.getLong(829170552,1724953279);
private var _pong_clientTimeCodec:ICodec;
private var _pong_serverSessionTimeCodec:ICodec;
private var model:IModel;
public function TimeCheckerModelServer(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._pong_clientTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
this._pong_serverSessionTimeCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
}
public function pong(param1:int, param2:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._pong_clientTimeCodec.encode(this.protocolBuffer,param1);
this._pong_serverSessionTimeCodec.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._pongId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.battle {
public interface PhysicsController {
function runBeforePhysicsUpdate(param1:Number) : void;
}
}
|
package projects.tanks.client.garage.models.item.temporary {
public class TemporaryItemCC {
private var _infinityLifetimeItem:Boolean;
private var _lifeTimeInSec:int;
private var _remainingTimeInSec:int;
public function TemporaryItemCC(param1:Boolean = false, param2:int = 0, param3:int = 0) {
super();
this._infinityLifetimeItem = param1;
this._lifeTimeInSec = param2;
this._remainingTimeInSec = param3;
}
public function get infinityLifetimeItem() : Boolean {
return this._infinityLifetimeItem;
}
public function set infinityLifetimeItem(param1:Boolean) : void {
this._infinityLifetimeItem = param1;
}
public function get lifeTimeInSec() : int {
return this._lifeTimeInSec;
}
public function set lifeTimeInSec(param1:int) : void {
this._lifeTimeInSec = param1;
}
public function get remainingTimeInSec() : int {
return this._remainingTimeInSec;
}
public function set remainingTimeInSec(param1:int) : void {
this._remainingTimeInSec = param1;
}
public function toString() : String {
var local1:String = "TemporaryItemCC [";
local1 += "infinityLifetimeItem = " + this.infinityLifetimeItem + " ";
local1 += "lifeTimeInSec = " + this.lifeTimeInSec + " ";
local1 += "remainingTimeInSec = " + this.remainingTimeInSec + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.sfx {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.sfx.LevelUpEffectFactory_WaveTexture.jpg")]
public class LevelUpEffectFactory_WaveTexture extends BitmapAsset {
public function LevelUpEffectFactory_WaveTexture() {
super();
}
}
}
|
package projects.tanks.client.panel.model.garage.availableitems {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import projects.tanks.client.panel.model.garage.GarageItemInfo;
public class AvailableItemsModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:AvailableItemsModelServer;
private var client:IAvailableItemsModelBase = IAvailableItemsModelBase(this);
private var modelId:Long = Long.getLong(1203966282,1135370561);
private var _showAvailableItemsId:Long = Long.getLong(1961101871,-1859061910);
private var _showAvailableItems_itemsCodec:ICodec;
public function AvailableItemsModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new AvailableItemsModelServer(IModel(this));
this._showAvailableItems_itemsCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(GarageItemInfo,false),false,1));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._showAvailableItemsId:
this.client.showAvailableItems(this._showAvailableItems_itemsCodec.decode(param2) as Vector.<GarageItemInfo>);
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package controls.checkbox {
import assets.icons.CheckIcons;
import controls.Label;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.text.AntiAliasType;
import flash.text.GridFitType;
[Embed(source="/_assets/assets.swf", symbol="symbol1196")]
public class TankCheckBox extends MovieClip {
public static const FRIENDLY_FIRE:int = 1;
public static const INVITE_ONLY:int = 2;
public static const AUTO_BALANCE:int = 3;
public static const CHECK_SIGN:int = 4;
public static const CAPTURE_THE_FLAG:int = 5;
public static const PAY:int = 6;
public static const INVENTORY_BONUS:int = 7;
public static const UPGRADES:int = 8;
public static const PRO_BATTLE:int = 9;
public static const CRYSTAL_BONUS:int = 10;
public static const REARMOR:int = 11;
public static const DEPENDENT_COOLDOWN:int = 12;
public static const AUTO_COMPLETION:int = 13;
public var _typeIcon:CheckIcons;
private var typeChek:CheckIcons;
private var _type:int;
private var _checked:Boolean = false;
private var mouseDownState:int = 0;
public var _labelInfo:Label;
private var _enable:Boolean = true;
public function TankCheckBox() {
super();
this.typeChek = getChildByName("_typeIcon") as CheckIcons;
this.type = CHECK_SIGN;
tabEnabled = false;
this.typeChek.visible = this._checked;
gotoAndStop(1);
this.enable = true;
this._labelInfo = new Label();
this._labelInfo.x = 29;
this._labelInfo.y = 7;
this._labelInfo.antiAliasType = AntiAliasType.ADVANCED;
this._labelInfo.gridFitType = GridFitType.SUBPIXEL;
addChild(this._labelInfo);
}
public function get checked() : Boolean {
return this._checked;
}
public function set checked(param1:Boolean) : void {
this._checked = param1;
this.changeState();
}
public function set enable(param1:Boolean) : void {
this._enable = param1;
if(this._enable) {
this.addListeners();
} else {
this.removeListeners();
}
}
public function set label(param1:String) : void {
this._labelInfo.text = param1;
}
private function addListeners() : void {
gotoAndStop(1);
buttonMode = true;
mouseEnabled = true;
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent);
}
private function removeListeners() : void {
gotoAndStop(4);
buttonMode = false;
mouseEnabled = false;
removeEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent);
}
public function set type(param1:int) : void {
this._type = param1;
this.typeChek.type = this._type;
}
private function onMouseEvent(param1:MouseEvent) : void {
switch(param1.type) {
case MouseEvent.MOUSE_OVER:
--this.mouseDownState;
gotoAndStop(2);
this.typeChek.y = 0;
break;
case MouseEvent.MOUSE_OUT:
++this.mouseDownState;
gotoAndStop(1);
this.typeChek.y = 0;
break;
case MouseEvent.MOUSE_DOWN:
this.mouseDownState = 2;
gotoAndStop(3);
this.typeChek.y = 1;
break;
case MouseEvent.MOUSE_UP:
gotoAndStop(2);
this._checked = !this._checked;
if(this.mouseDownState == 2) {
this.changeState();
}
this.mouseDownState = 0;
this.typeChek.y = 0;
}
}
private function changeState() : void {
this.typeChek.visible = this._checked;
dispatchEvent(new CheckBoxEvent(CheckBoxEvent.STATE_CHANGED));
}
}
}
|
package alternativa.tanks.models.battlefield
{
import alternativa.object.ClientObject;
public interface IBattlefieldPlugin
{
function get battlefieldPluginName() : String;
function startBattle() : void;
function restartBattle() : void;
function finishBattle() : void;
function tick(param1:int, param2:int, param3:Number, param4:Number) : void;
function addUser(param1:ClientObject) : void;
function removeUser(param1:ClientObject) : void;
function addUserToField(param1:ClientObject) : void;
function removeUserFromField(param1:ClientObject) : void;
}
}
|
package projects.tanks.client.partners.impl.traffic {
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 TrafficPartnersGoalsModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function TrafficPartnersGoalsModelServer(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.sfx
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Clipping;
import alternativa.engine3d.core.Sorting;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.primitives.Plane;
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;
public class AnimatedPlaneEffectOld extends PooledObject implements IGraphicEffect
{
private static const BASE_SIZE:Number = 100;
private var framesPerMillisecond:Number;
private var frames:Vector.<Material>;
private var numFrames:int;
private var scaleSpeed:Number;
private var currentFrame:Number;
private var scale:Number;
private var baseScale:Number;
private var plane:Plane;
public function AnimatedPlaneEffectOld(objectPool:ObjectPool)
{
super(objectPool);
}
public function init(size:Number, position:Vector3, rotation:Vector3, fps:Number, frames:Vector.<Material>, scaleSpeed:Number) : void
{
this.framesPerMillisecond = 0.001 * fps;
this.frames = frames;
this.scaleSpeed = 0.001 * scaleSpeed;
this.numFrames = frames.length;
if(this.plane == null)
{
this.plane = new Plane(BASE_SIZE,BASE_SIZE);
this.plane.clipping = Clipping.FACE_CLIPPING;
this.plane.sorting = Sorting.DYNAMIC_BSP;
}
this.baseScale = size / BASE_SIZE;
this.scale = this.baseScale;
this.plane.x = position.x;
this.plane.y = position.y;
this.plane.z = position.z;
this.plane.rotationX = rotation.x;
this.plane.rotationY = rotation.y;
this.plane.rotationZ = rotation.z;
this.plane.useShadowMap = false;
this.plane.useLight = false;
this.plane.shadowMapAlphaThreshold = 2;
this.plane.depthMapAlphaThreshold = 2;
this.plane.softAttenuation = 0;
this.currentFrame = 0;
}
public function addToContainer(container:Scene3DContainer) : void
{
container.addChild(this.plane);
}
public function play(millis:int, camera:GameCamera) : Boolean
{
if(this.currentFrame >= this.numFrames)
{
return false;
}
this.plane.setMaterialToAllFaces(this.frames[int(this.currentFrame)]);
this.currentFrame += this.framesPerMillisecond * millis;
this.plane.scaleX = this.scale;
this.plane.scaleY = this.scale;
this.scale += this.baseScale * this.scaleSpeed * millis;
return true;
}
public function destroy() : void
{
this.plane.alternativa3d::removeFromParent();
this.plane.destroy();
storeInPool();
}
public function kill() : void
{
this.currentFrame = this.frames.length;
}
public function get owner() : ClientObject
{
return null;
}
override protected function getClass() : Class
{
return AnimatedPlaneEffect;
}
}
}
|
package alternativa.tanks.gui.friends {
public interface FriendsWindowButtonType {
function getType() : FriendsWindowState;
}
}
|
package alternativa.tanks.view.forms {
import alternativa.osgi.service.display.IDisplay;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.controller.events.LoginButtonPressed;
import alternativa.tanks.controller.events.NavigationEvent;
import alternativa.tanks.view.bubbles.Bubble;
import alternativa.tanks.view.bubbles.EntranceBubbleFactory;
import alternativa.tanks.view.forms.commons.RegistrationCommonElementsSection;
import alternativa.tanks.view.forms.primivites.ValidationIcon;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import controls.base.TankInputBase;
import flash.display.Bitmap;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
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.clients.flash.commons.models.captcha.CaptchaSection;
import projects.tanks.clients.flash.commons.models.captcha.RefreshCaptchaClickedEvent;
import projects.tanks.clients.flash.commons.services.nameutils.SocialNetworkNameUtils;
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 services.alertservice.Alert;
public class LinkExternalLoginForm extends Sprite {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var display:IDisplay;
[Inject]
public static var validateService:IValidateService;
[Inject]
public var injector:IInjector;
private var _margin:int = 25;
private var _windowWidth:int = 372;
private var _windowHeight:int = 208;
private var _inputsLeftMargin:int = 72;
private var _callSignOrEmail:TankInputBase;
private var _password:TankInputBase;
private var _playButton:DefaultButtonBase;
private var _backButton:DefaultButtonBase;
private var _informLabel:LabelBase;
private var _window:TankWindowWithHeader;
private var _captchaSection:CaptchaSection;
private var _symbolIsNotAllowedBubble:Bubble;
private var _callSignCheckIcon:ValidationIcon;
private var _notAllowedShowDelayTimerTimer:Timer;
private var _socialNetworkId:String;
public function LinkExternalLoginForm() {
super();
}
[PostConstruct]
public function postConstruct() : void {
this._window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_LINK,this._windowWidth,this._windowHeight);
addChild(this._window);
var local1:int = 115;
this._callSignOrEmail = new TankInputBase();
this._callSignOrEmail.label = localeService.getText(TanksLocale.TEXT_CHECK_PASSWORD_FORM_CALLSIGN);
this._callSignOrEmail.maxChars = RegistrationCommonElementsSection.MAX_CHARS_EMAIL;
this._password = new TankInputBase();
this._password.label = localeService.getText(TanksLocale.TEXT_CHECK_PASSWORD_FORM_PASSWORD);
this._inputsLeftMargin = this._margin - 3 + (Math.abs(this._callSignOrEmail._label.x) > Math.abs(this._password._label.x) ? Math.abs(this._callSignOrEmail._label.x) : Math.abs(this._password._label.x));
this._callSignOrEmail.width = this._windowWidth - this._inputsLeftMargin - this._margin;
this._callSignOrEmail.x = this._inputsLeftMargin;
this._callSignOrEmail.y = this._margin;
this._callSignOrEmail.tabIndex = 0;
this._callSignOrEmail.restrict = "@А-Яа-я.0-9a-zA-z_\\-";
this._window.addChild(this._callSignOrEmail);
display.stage.focus = this._callSignOrEmail;
this._password.width = this._windowWidth - this._inputsLeftMargin - this._margin;
this._password.x = this._inputsLeftMargin;
this._password.y = this._callSignOrEmail.y + this._callSignOrEmail.height + this._margin / 3;
this._password.hidden = true;
this._password.tabIndex = 1;
this._window.addChild(this._password);
this._callSignCheckIcon = new ValidationIcon();
this._callSignCheckIcon.x = this._windowWidth - this._margin - this._callSignCheckIcon.width - 10;
this._callSignCheckIcon.y = this._callSignOrEmail.y + 7;
this._window.addChild(this._callSignCheckIcon);
this._informLabel = new LabelBase();
this._informLabel.text = "Введите данные вашего аккаунта в \"Танках Онлайн\", чтобы\nпривязать его к сервису ВКонтакте";
this._informLabel.x = this._margin;
this._informLabel.y = this._password.y + this._password.height + this._margin - 10;
this._window.addChild(this._informLabel);
this._backButton = new DefaultButtonBase();
this._backButton.label = localeService.getText(TanksLocale.TEXT_BACK_BUTTON);
this._playButton = new DefaultButtonBase();
this._playButton.label = localeService.getText(TanksLocale.TEXT_COMPLETE_BUTTON);
this._playButton.width = this._backButton.width = Math.max(this._playButton.width,this._backButton.width,local1);
this._playButton.x = this._windowWidth - this._margin - this._playButton.width;
this._playButton.y = this._windowHeight - this._playButton.height - this._margin;
this._window.addChild(this._playButton);
this._backButton.x = this._margin;
this._backButton.y = this._playButton.y;
this._window.addChild(this._backButton);
this._notAllowedShowDelayTimerTimer = new Timer(1000,1);
this._captchaSection = this.injector.instantiate(CaptchaSection);
this._symbolIsNotAllowedBubble = EntranceBubbleFactory.symbolIsNotAllowedBubble();
this.setEvents();
this.alignYourself();
}
private function onPlayClicked(param1:MouseEvent = null) : void {
this._playButton.enable = false;
dispatchEvent(new LoginButtonPressed());
}
private function onBackClicked(param1:MouseEvent) : void {
dispatchEvent(new NavigationEvent(NavigationEvent.GO_TO_LOGIN_FORM));
}
private function onKeyDownPasswordInput(param1:KeyboardEvent) : void {
if(param1.keyCode == Keyboard.ENTER && this._playButton.enable) {
this.onPlayClicked();
}
}
public function get captchaAnswer() : String {
return this._captchaSection.captchaAnswer.value;
}
public function get mainPassword() : String {
return this._password.value;
}
public function set password(param1:String) : void {
this._password.value = param1;
}
public function get callsign() : String {
return this._callSignOrEmail.value;
}
public function set callsign(param1:String) : void {
if(param1 != null) {
this._callSignOrEmail.value = param1;
display.stage.focus = this._callSignOrEmail.textField.length == 0 ? this._callSignOrEmail.textField : this._password.textField;
}
}
public function get password() : String {
return this._password.value;
}
private function setEvents() : void {
display.stage.addEventListener(Event.RESIZE,this.alignYourself);
this._playButton.addEventListener(MouseEvent.CLICK,this.onPlayClicked);
this._backButton.addEventListener(MouseEvent.CLICK,this.onBackClicked);
this._password.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDownPasswordInput);
this._callSignOrEmail.addEventListener(LoginFormEvent.TEXT_CHANGED,this.onCallsignChanged);
this._captchaSection.captchaAnswer.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDownPasswordInput);
this._captchaSection.refreshButton.addEventListener(MouseEvent.CLICK,this.onCaptchaRefresh);
this._notAllowedShowDelayTimerTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onCallsignCheckTimerComplete);
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
}
private function onCaptchaRefresh(param1:MouseEvent = null) : void {
this._captchaSection.captchaAnswer.clear();
dispatchEvent(new RefreshCaptchaClickedEvent());
}
private function onRemoveFromStage(param1:Event) : void {
this._notAllowedShowDelayTimerTimer.stop();
this.removeEvents();
}
private function removeEvents() : void {
removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
display.stage.removeEventListener(Event.RESIZE,this.alignYourself);
this._playButton.removeEventListener(MouseEvent.CLICK,this.onPlayClicked);
this._backButton.removeEventListener(MouseEvent.CLICK,this.onBackClicked);
this._password.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDownPasswordInput);
this._callSignOrEmail.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.onCallsignChanged);
this._captchaSection.captchaAnswer.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDownPasswordInput);
this._captchaSection.refreshButton.removeEventListener(MouseEvent.CLICK,this.onCaptchaRefresh);
this._notAllowedShowDelayTimerTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.onCallsignCheckTimerComplete);
}
private function onCallsignCheckTimerComplete(param1:TimerEvent) : void {
this.hideBubbles();
}
private function onCallsignChanged(param1:LoginFormEvent) : void {
this.hideBubbles();
this._notAllowedShowDelayTimerTimer.reset();
this._notAllowedShowDelayTimerTimer.start();
if(!validateService.isValidIdentificationStringForLogin(this._callSignOrEmail.value)) {
this._callSignOrEmail.value = this._callSignOrEmail.value.replace(ValidateService.NOT_ALLOWED_PATTERN_FOR_LOGIN,"");
this._callSignOrEmail.validValue = false;
this._callSignCheckIcon.markAsInvalid();
this._callSignCheckIcon.addChild(this._symbolIsNotAllowedBubble);
}
}
private function hideBubbles() : void {
this._callSignOrEmail.validValue = true;
this._symbolIsNotAllowedBubble.hide();
this._callSignCheckIcon.turnOff();
}
public function showAlertAboutWrongPassword() : void {
this.showErrorWindow(Alert.ERROR_PASSWORD_INCORRECT);
this._playButton.enable = true;
this._password.clear();
if(this._window.contains(this._captchaSection)) {
this.onCaptchaRefresh();
}
}
private function showErrorWindow(param1:int) : void {
var local2:Alert = new Alert(param1);
this.injector.injectInto(local2);
parent.addChild(local2);
}
private function alignYourself(param1:Event = null) : void {
this.x = int((display.stage.stageWidth - this._windowWidth) / 2);
this.y = int((display.stage.stageHeight - this._windowHeight) / 2);
}
public function set captchaImage(param1:Bitmap) : void {
if(Boolean(this._captchaSection)) {
this._captchaSection.captcha = param1;
}
}
public function captchaFailed() : void {
this._playButton.enable = true;
}
public function showCaptchaSection() : void {
if(!this._window.contains(this._captchaSection)) {
this._window.addChild(this._captchaSection);
this._captchaSection.y = this._password.y + this._password.height + this._margin - 5;
this._captchaSection.x = this._inputsLeftMargin;
this._captchaSection.width = this._windowWidth - this._inputsLeftMargin - this._margin;
this._captchaSection.visible = true;
this._informLabel.y = this._captchaSection.y + this._captchaSection.height + this._margin - 10;
this._playButton.y = this._informLabel.y + this._informLabel.height + this._margin - 5;
this._backButton.y = this._playButton.y;
this._windowHeight = this._windowHeight + this._captchaSection.height + this._margin - 5;
this._window.height = this._windowHeight;
this.alignYourself();
this.onCaptchaRefresh();
this._playButton.enable = true;
}
}
public function externalLinkAlreadyExists() : void {
this._playButton.enable = true;
}
public function externalValidationFailed() : void {
this._playButton.enable = true;
}
public function set socialNetworkId(param1:String) : void {
this._socialNetworkId = param1;
this._informLabel.text = localeService.getText(TanksLocale.TEXT_LINK_EXTERNAL_LOGIN_FORM_ADVICE,SocialNetworkNameUtils.makeSocialNetworkNameFromId(this._socialNetworkId));
this._informLabel.x = (this._windowWidth - this._informLabel.width) / 2;
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf.flagindicator {
import alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf.CTFScoreIndicatorBlinker;
import flash.utils.getTimer;
public class StateLost implements IFlagIndicatorState {
private var type:int;
private var indicator:FlagIndicator;
private var blinker:CTFScoreIndicatorBlinker;
private var valueIndex:int;
public function StateLost(param1:int, param2:FlagIndicator, param3:CTFScoreIndicatorBlinker, param4:int) {
super();
this.type = param1;
this.indicator = param2;
this.blinker = param3;
this.valueIndex = param4;
}
public function getType() : int {
return this.type;
}
public function start() : void {
this.blinker.start(getTimer());
this.indicator.normalBitmap.visible = true;
this.indicator.normalBitmap.alpha = 1;
this.indicator.flashBitmap.visible = false;
this.indicator.lostBitmap.visible = true;
this.indicator.lostBitmap.alpha = 0;
}
public function stop() : void {
this.blinker.stop();
}
public function update(param1:int, param2:int) : void {
var local3:Number = this.blinker.values[this.valueIndex];
this.indicator.normalBitmap.alpha = local3;
this.indicator.lostBitmap.alpha = 1 - local3;
}
}
}
|
package platform.client.fp10.core.resource {
public final class ResourcePriority {
public static const LAZY:int = 0;
public static const NORMAL:int = 1;
public function ResourcePriority() {
super();
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapBigRank26.png")]
public class PremiumRankBitmaps_bitmapBigRank26 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapBigRank26() {
super();
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.field.score.ctf.CTFScoreIndicator_flagRedLostClass.png")]
public class CTFScoreIndicator_flagRedLostClass extends BitmapAsset {
public function CTFScoreIndicator_flagRedLostClass() {
super();
}
}
}
|
package alternativa.tanks.models.battle.battlefield.map {
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.objects.Mesh;
public class NormalsCalculator {
private static var map:Object;
private static const propNames:Array = ["hang_1","hang_2","hang_3","SmHouse008","wall_broke_1","wall_broke_2","Bk_roof1","Bk_roof2","Tree01","Tree02","tube_1","tube_2","tube_3","tube_cor","cliff_3","cliff_1","cliff_2","cliff_4","cliff_inco","cliff_cor","cliff_r2","cliff_ri","Big_Rock04","Big_Rock","Change01","Change02","Corn1","Corn2","Corn3","Corn4","Corn_B","crater","Land02","Land03","Land04","Land05","Land06","Land07","Land08","Land09","Land22","Land33","Line","Med_Rock","rise_g1","rise_g2","rise_g3","rise_g4","rise_g5","rise_g6","Rise_gr1","Rise_gr2","rise_r1","sm_rock1","sm_rock2","up_Brock","Up_Rock","Up_Rock1","Up_Rock2","Up_Rock14"];
public function NormalsCalculator() {
var local1:String = null;
super();
if(map == null) {
map = {};
for each(local1 in propNames) {
map[local1] = true;
}
}
}
public function calculateNormals(param1:Vector.<Object3D>) : void {
this.clearSmoothingGroups(param1);
Mesh.calculateVerticesNormalsBySmoothingGroupsForMeshList(param1,0.01);
}
private function clearSmoothingGroups(param1:Vector.<Object3D>) : void {
var local2:Object3D = null;
var local3:Mesh = null;
var local4:Face = null;
for each(local2 in param1) {
if(map[local2.name] == null) {
local3 = local2 as Mesh;
for each(local4 in local3.faces) {
local4.smoothingGroups = 0;
}
}
}
}
}
}
|
package alternativa.tanks.models.weapon.rocketlauncher.weapon {
import alternativa.tanks.models.weapon.rocketlauncher.sfx.RocketLauncherEffects;
import alternativa.tanks.models.weapon.rocketlauncher.weapon.salvo.RocketTargetPoint;
import alternativa.tanks.models.weapon.rocketlauncher.weapon.salvo.aim.AimWeaponStatus;
import alternativa.tanks.models.weapons.targeting.TargetingSystem;
public interface IRocketLauncherWeapon extends AimWeaponStatus {
function getTargetingSystem() : TargetingSystem;
function getTarget() : RocketTargetPoint;
function canShoot(param1:int) : Boolean;
function salvoShoot(param1:int, param2:Number) : void;
function getEffects() : RocketLauncherEffects;
function onEndingOfSalvo(param1:int) : void;
function isBuffed() : Boolean;
}
}
|
package projects.tanks.clients.flash.resources.object3ds {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class IObject3DSAdapt implements IObject3DS {
private var object:IGameObject;
private var impl:IObject3DS;
public function IObject3DSAdapt(param1:IGameObject, param2:IObject3DS) {
super();
this.object = param1;
this.impl = param2;
}
public function getResource3DS() : Tanks3DSResource {
var result:Tanks3DSResource = null;
try {
Model.object = this.object;
result = this.impl.getResource3DS();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.panel.model.shop.kitview {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class KitViewResourceModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:KitViewResourceModelServer;
private var client:IKitViewResourceModelBase = IKitViewResourceModelBase(this);
private var modelId:Long = Long.getLong(928038786,-2000755286);
public function KitViewResourceModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new KitViewResourceModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(KitViewResourceCC,false)));
}
protected function getInitParam() : KitViewResourceCC {
return KitViewResourceCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.inventory {
[ModelInterface]
public interface IInventoryModel {
function lockItem(param1:int, param2:int, param3:Boolean) : void;
function lockItems(param1:int, param2:Boolean) : void;
function lockItemsByMask(param1:Vector.<int>, param2:int, param3:Boolean) : void;
}
}
|
package projects.tanks.client.panel.model.shop.specialkit.view {
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 PayPalKitViewModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:PayPalKitViewModelServer;
private var client:IPayPalKitViewModelBase = IPayPalKitViewModelBase(this);
private var modelId:Long = Long.getLong(356896316,-88712144);
public function PayPalKitViewModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new PayPalKitViewModelServer(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 alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapHullMass.png")]
public class ItemInfoPanelBitmaps_bitmapHullMass extends BitmapAsset {
public function ItemInfoPanelBitmaps_bitmapHullMass() {
super();
}
}
}
|
package alternativa.tanks.models.weapon.smoky.sfx {
import alternativa.tanks.models.weapon.smoky.ISmokyEffects;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ISmokySFXModelEvents implements ISmokySFXModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function ISmokySFXModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getEffects() : ISmokyEffects {
var result:ISmokyEffects = null;
var i:int = 0;
var m:ISmokySFXModel = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ISmokySFXModel(this.impl[i]);
result = m.getEffects();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.controller.events.showform {
import flash.events.Event;
public class ShowBlockValidationAlertEvent extends Event {
public static const YOU_WERE_BLOCKED:String = "ShowBlockValidationAlertEvent.YOU_WERE_BLOCKED";
public static const YOU_WERE_KICKED:String = "ShowBlockValidationAlertEvent.YOU_WERE_KICKED";
public var reason:String;
public var minutes:int;
public var hours:int;
public var days:int;
public function ShowBlockValidationAlertEvent(param1:String, param2:String, param3:int = 0, param4:int = 0, param5:int = 0) {
super(param1);
this.reason = param2;
this.minutes = param3;
this.hours = param4;
this.days = param5;
}
override public function clone() : Event {
return new ShowBlockValidationAlertEvent(type,this.reason,this.minutes,this.hours,this.days);
}
}
}
|
package projects.tanks.client.battlefield.models.user.spawn {
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.Long;
import alternativa.types.Short;
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.types.Vector3d;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class TankSpawnerModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:TankSpawnerModelServer;
private var client:ITankSpawnerModelBase = ITankSpawnerModelBase(this);
private var modelId:Long = Long.getLong(490108405,-1605879749);
private var _prepareToSpawnId:Long = Long.getLong(1841708554,1107932617);
private var _prepareToSpawn_positionCodec:ICodec;
private var _prepareToSpawn_orientationCodec:ICodec;
private var _spawnId:Long = Long.getLong(937986364,-303760789);
private var _spawn_teamCodec:ICodec;
private var _spawn_positionCodec:ICodec;
private var _spawn_orientationCodec:ICodec;
private var _spawn_healthCodec:ICodec;
private var _spawn_incarnationIdCodec:ICodec;
public function TankSpawnerModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new TankSpawnerModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(TankSpawnerCC,false)));
this._prepareToSpawn_positionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._prepareToSpawn_orientationCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._spawn_teamCodec = this._protocol.getCodec(new EnumCodecInfo(BattleTeam,false));
this._spawn_positionCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._spawn_orientationCodec = this._protocol.getCodec(new TypeCodecInfo(Vector3d,false));
this._spawn_healthCodec = this._protocol.getCodec(new TypeCodecInfo(Short,false));
this._spawn_incarnationIdCodec = this._protocol.getCodec(new TypeCodecInfo(Short,false));
}
protected function getInitParam() : TankSpawnerCC {
return TankSpawnerCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._prepareToSpawnId:
this.client.prepareToSpawn(Vector3d(this._prepareToSpawn_positionCodec.decode(param2)),Vector3d(this._prepareToSpawn_orientationCodec.decode(param2)));
break;
case this._spawnId:
this.client.spawn(BattleTeam(this._spawn_teamCodec.decode(param2)),Vector3d(this._spawn_positionCodec.decode(param2)),Vector3d(this._spawn_orientationCodec.decode(param2)),int(this._spawn_healthCodec.decode(param2)),int(this._spawn_incarnationIdCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.battle.objects.tank.tankskin.turret {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Matrix4;
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.objects.tank.tankskin.TankHullSkinCacheItem;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class ArtilleryTurretSkin extends TurretSkin {
[Inject]
public static var battleService:BattleService;
public function ArtilleryTurretSkin(param1:Tanks3DSResource) {
super(param1);
setPosition(rootObject,Vector3.ZERO);
}
override public function updateTurretTransform(param1:Matrix4, param2:TankHullSkinCacheItem, param3:Number, param4:Number) : void {
super.updateTurretTransform(param1,param2,param3,param4);
this.getBarrel3D().rotationX = param4;
}
override public function getBarrel3D() : Object3D {
return turretMeshes[1].parent;
}
public function getCannon3D() : Object3D {
return turretMeshes[2];
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.jgr {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.battle.jgr.JuggernautCC;
public class CodecJuggernautCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_bossHudMarker:ICodec;
private var codec_bossKilledSound:ICodec;
private var codec_bossSpawnedSound:ICodec;
private var codec_currentBoss:ICodec;
public function CodecJuggernautCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_bossHudMarker = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_bossKilledSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_bossSpawnedSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_currentBoss = param1.getCodec(new TypeCodecInfo(IGameObject,true));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:JuggernautCC = new JuggernautCC();
local2.bossHudMarker = this.codec_bossHudMarker.decode(param1) as TextureResource;
local2.bossKilledSound = this.codec_bossKilledSound.decode(param1) as SoundResource;
local2.bossSpawnedSound = this.codec_bossSpawnedSound.decode(param1) as SoundResource;
local2.currentBoss = this.codec_currentBoss.decode(param1) as IGameObject;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:JuggernautCC = JuggernautCC(param2);
this.codec_bossHudMarker.encode(param1,local3.bossHudMarker);
this.codec_bossKilledSound.encode(param1,local3.bossKilledSound);
this.codec_bossSpawnedSound.encode(param1,local3.bossSpawnedSound);
this.codec_currentBoss.encode(param1,local3.currentBoss);
}
}
}
|
package alternativa.tanks.sound {
import alternativa.tanks.sfx.ISound3DEffect;
internal class SoundEffectData {
private static var numObjects:int;
private static var pool:Vector.<SoundEffectData> = new Vector.<SoundEffectData>();
public var distanceSqr:Number;
public var effect:ISound3DEffect;
public function SoundEffectData(param1:Number, param2:ISound3DEffect) {
super();
this.distanceSqr = param1;
this.effect = param2;
}
public static function create(param1:Number, param2:ISound3DEffect) : SoundEffectData {
var local3:SoundEffectData = null;
if(numObjects > 0) {
local3 = pool[--numObjects];
pool[numObjects] = null;
local3.distanceSqr = param1;
local3.effect = param2;
return local3;
}
return new SoundEffectData(param1,param2);
}
public static function destroy(param1:SoundEffectData) : void {
param1.effect = null;
var local2:* = numObjects++;
pool[local2] = param1;
}
}
}
|
package controls.chat
{
import flash.display.BitmapData;
import flash.display.MovieClip;
public class ChatPermissionsLevel extends MovieClip
{
[Embed(source="1119.png")]
private static const developer:Class;
[Embed(source="1161.png")]
private static const admin:Class;
[Embed(source="928.png")]
private static const moder:Class;
[Embed(source="1088.png")]
private static const candidate:Class;
[Embed(source="968.png")]
private static const event:Class;
[Embed(source="882.png")]
private static const event_org:Class;
[Embed(source="1160.png")]
private static const cm:Class;
[Embed(source="776.png")]
private static const tester:Class;
[Embed(source="1066.png")]
private static const tester_gold:Class;
[Embed(source="1042.png")]
private static const sponsor:Class;
public function ChatPermissionsLevel()
{
super();
}
public static function getBD(id:int) : BitmapData
{
switch(id)
{
case 1:
return new developer().bitmapData;
case 2:
return new admin().bitmapData;
case 3:
return new moder().bitmapData;
case 4:
return new candidate().bitmapData;
case 5:
return new event().bitmapData;
case 6:
return new event_org().bitmapData;
case 7:
return new cm().bitmapData;
case 8:
return new tester().bitmapData;
case 9:
return new tester_gold().bitmapData;
case 10:
return new sponsor().bitmapData;
default:
return new admin().bitmapData;
}
}
}
}
|
package controls.cellrenderer {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.cellrenderer.CellNormalSelected_normalRight.png")]
public class CellNormalSelected_normalRight extends BitmapAsset {
public function CellNormalSelected_normalRight() {
super();
}
}
}
|
package alternativa.osgi.service.command.impl {
import alternativa.osgi.service.command.FormattedOutput;
public class FormattedOutputToString implements FormattedOutput {
public var content:Vector.<String> = new Vector.<String>();
public function FormattedOutputToString() {
super();
}
public function addText(param1:String) : void {
this.content.push(param1);
}
public function addPrefixedText(param1:String, param2:String) : void {
this.addText(param1 + " " + param2);
}
public function addLines(param1:Vector.<String>) : void {
var local2:int = 0;
while(local2 < param1.length) {
this.addText(param1[local2]);
local2++;
}
}
public function addPrefixedLines(param1:String, param2:Vector.<String>) : void {
var local3:int = 0;
while(local3 < param2.length) {
this.addPrefixedText(param1,param2[local3]);
local3++;
}
}
}
}
|
package alternativa.tanks.models.weapon.shaft.sfx
{
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.init.Main;
import alternativa.math.Vector3;
import alternativa.object.ClientObject;
import alternativa.tanks.models.battlefield.BattlefieldModel;
import alternativa.tanks.models.battlefield.IBattleField;
import alternativa.tanks.models.sfx.MuzzlePositionProvider;
import alternativa.tanks.models.sfx.shoot.shaft.ShaftTrailEffect;
import alternativa.tanks.models.sfx.shoot.shaft.TrailEffect1;
import alternativa.tanks.models.sfx.shoot.shaft.TrailEffect2;
import alternativa.tanks.services.objectpool.IObjectPoolService;
import alternativa.tanks.sfx.AnimatedSpriteEffectNew;
import alternativa.tanks.sfx.MobileSound3DEffect;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.sfx.Sound3DEffect;
import alternativa.tanks.sfx.SoundOptions;
import alternativa.tanks.sfx.StaticObject3DPositionProvider;
import alternativa.tanks.utils.GraphicsUtils;
import alternativa.tanks.utils.objectpool.ObjectPool;
import flash.display.BitmapData;
import flash.media.Sound;
import scpacker.gui.AlertBugWindow;
import scpacker.resource.ResourceType;
import scpacker.resource.ResourceUtil;
public class ShaftSFXModel implements ShaftSFX
{
private static const ZOOM_MODE_SOUND_VOLUME:Number = 0.7;
public static const MUZZLE_FLASH_SIZE:Number = 200;
public static const EXPLOSION_WIDTH:Number = 250;
private static const EXPLOSION_OFFSET_TO_CAMERA:Number = 110;
private static const EXPLOSION_SOUND_VOLUME:Number = 0.8;
private static const CHARGING_SOUND_FADE_TIME_MS:int = 1000;
private static const vectorToHitPoint:Vector3 = new Vector3();
private static const TRAIL_DURATION:int = 1000;
private static var objectPoolService:IObjectPoolService;
private const SHOT_SOUND_VOLUME:Number = 0.4;
private var battlefieldModel:BattlefieldModel;
public function ShaftSFXModel()
{
super();
objectPoolService = IObjectPoolService(Main.osgi.getService(IObjectPoolService));
this.battlefieldModel = Main.osgi.getService(IBattleField) as BattlefieldModel;
}
public function initObject(clientObject:ClientObject, manualModeEffect:String, targetingSound:String, explosionId:String, trailTexture:String, muzzleFlashTexture:String) : void
{
var alert:AlertBugWindow = null;
var sfxData:ShaftSFXData = null;
var trailBitmapData:BitmapData = null;
var trailMaterial:TextureMaterial = null;
var exlpBitmap:BitmapData = null;
var muzzleFlash:BitmapData = null;
alert = null;
try
{
sfxData = new ShaftSFXData();
sfxData.zoomModeSound = ResourceUtil.getResource(ResourceType.SOUND,manualModeEffect).sound as Sound;
sfxData.targetingSound = ResourceUtil.getResource(ResourceType.SOUND,targetingSound).sound as Sound;
sfxData.shotSound = ResourceUtil.getResource(ResourceType.SOUND,"shaft_shot").sound as Sound;
sfxData.explosionSound = ResourceUtil.getResource(ResourceType.SOUND,"shaft_explosion_sound").sound as Sound;
trailBitmapData = ResourceUtil.getResource(ResourceType.IMAGE,trailTexture).bitmapData as BitmapData;
trailMaterial = new TextureMaterial(trailBitmapData);
sfxData.trailMaterial = trailMaterial;
exlpBitmap = ResourceUtil.getResource(ResourceType.IMAGE,explosionId).bitmapData as BitmapData;
sfxData.explosionAnimation = GraphicsUtils.getTextureAnimation(null,exlpBitmap,200,200);
sfxData.explosionAnimation.fps = 30;
muzzleFlash = ResourceUtil.getResource(ResourceType.IMAGE,muzzleFlashTexture).bitmapData as BitmapData;
sfxData.muzzleFlashAnimation = GraphicsUtils.getTextureAnimation(null,muzzleFlash,60,53);
sfxData.muzzleFlashAnimation.fps = 4;
clientObject.putParams(ShaftSFXModel,sfxData);
}
catch(e:Error)
{
alert = new AlertBugWindow();
alert.text = "Произошла ошибка: " + e.getStackTrace();
Main.stage.addChild(alert);
}
}
public function createManualModeEffects(turretObj:ClientObject, clientObject:ClientObject, obj:Object3D) : MobileSound3DEffect
{
var sfxData:ShaftSFXData = turretObj.getParams(ShaftSFXModel) as ShaftSFXData;
var soundData:ShaftSFXUserData = clientObject.getParams(ShaftSFXUserData) != null ? clientObject.getParams(ShaftSFXUserData) as ShaftSFXUserData : new ShaftSFXUserData();
soundData.manualModeEffect = MobileSound3DEffect(objectPoolService.objectPool.getObject(MobileSound3DEffect));
var sound:Sound3D = Sound3D.create(sfxData.zoomModeSound,SoundOptions.nearRadius,SoundOptions.farRadius,SoundOptions.farDelimiter,ZOOM_MODE_SOUND_VOLUME);
soundData.manualModeEffect.init(null,sound,obj,0,9999);
this.battlefieldModel.addSound3DEffect(soundData.manualModeEffect);
clientObject.putParams(ShaftSFXUserData,soundData);
return soundData.manualModeEffect;
}
public function fadeChargingEffect(turretObj:ClientObject, clientObject:ClientObject) : void
{
var sfxData:ShaftSFXData = turretObj.getParams(ShaftSFXModel) as ShaftSFXData;
var soundData:ShaftSFXUserData = clientObject.getParams(ShaftSFXUserData) != null ? clientObject.getParams(ShaftSFXUserData) as ShaftSFXUserData : new ShaftSFXUserData();
if(soundData.manualModeEffect != null)
{
soundData.manualModeEffect.fade(CHARGING_SOUND_FADE_TIME_MS);
}
}
public function createShotSoundEffect(turretObj:ClientObject, owner:ClientObject, param1:Vector3) : void
{
var sfxData:ShaftSFXData = turretObj.getParams(ShaftSFXModel) as ShaftSFXData;
var _loc2_:Sound3D = Sound3D.create(sfxData.shotSound,1000,5000,5,this.SHOT_SOUND_VOLUME);
var _loc3_:Sound3DEffect = Sound3DEffect.create(objectPoolService.objectPool,owner,param1,_loc2_);
this.battlefieldModel.addSound3DEffect(_loc3_);
}
public function createMuzzleFlashEffect(turretObj:ClientObject, param1:Vector3, param2:Object3D) : void
{
var sfxData:ShaftSFXData = turretObj.getParams(ShaftSFXModel) as ShaftSFXData;
var pool:ObjectPool = this.battlefieldModel.getObjectPool();
var pos:MuzzlePositionProvider = MuzzlePositionProvider(pool.getObject(MuzzlePositionProvider));
pos.init(param2,param1,10);
var animSprite:AnimatedSpriteEffectNew = AnimatedSpriteEffectNew(pool.getObject(AnimatedSpriteEffectNew));
animSprite.init(70,63,sfxData.muzzleFlashAnimation,0,pos);
this.battlefieldModel.addGraphicEffect(animSprite);
}
public function stopManualSound(clientObject:ClientObject) : void
{
var soundData:ShaftSFXUserData = clientObject.getParams(ShaftSFXUserData) == null ? null : clientObject.getParams(ShaftSFXUserData) as ShaftSFXUserData;
if(soundData == null)
{
soundData = new ShaftSFXUserData();
clientObject.putParams(ShaftSFXUserData,soundData);
}
if(soundData.manualModeEffect != null)
{
soundData.manualModeEffect.kill();
}
}
public function playTargetingSound(turretObj:ClientObject, clientObject:ClientObject, play:Boolean) : void
{
var alert:AlertBugWindow = null;
var sfxData:ShaftSFXData = null;
var soundData:ShaftSFXUserData = null;
alert = null;
try
{
sfxData = turretObj.getParams(ShaftSFXModel) as ShaftSFXData;
soundData = clientObject.getParams(ShaftSFXUserData) == null ? null : clientObject.getParams(ShaftSFXUserData) as ShaftSFXUserData;
if(soundData == null)
{
soundData = new ShaftSFXUserData();
clientObject.putParams(ShaftSFXUserData,soundData);
}
if(play)
{
if(soundData.turretSoundChannel == null)
{
soundData.turretSoundChannel = this.battlefieldModel.soundManager.playSound(sfxData.targetingSound,0,9999);
}
}
else if(soundData.turretSoundChannel != null)
{
this.battlefieldModel.soundManager.stopSound(soundData.turretSoundChannel);
soundData.turretSoundChannel = null;
}
}
catch(e:Error)
{
alert = new AlertBugWindow();
alert.text = "Произошла ошибка: " + e.getStackTrace();
Main.stage.addChild(alert);
}
}
public function createHitPointsGraphicEffects(turretObject:ClientObject, owner:ClientObject, pos1:Vector3, pos2:Vector3, param3:Vector3, param4:Vector3, param5:Vector3) : void
{
var sfxData:ShaftSFXData = turretObject.getParams(ShaftSFXModel) as ShaftSFXData;
if(pos1 != null)
{
this.createEffectsForPoint(turretObject,owner,sfxData,pos1,param3,param4,param5,false);
}
if(pos2 != null)
{
this.createEffectsForPoint(turretObject,owner,sfxData,pos2,param3,param4,param5,true);
}
}
private function createEffectsForPoint(turretObject:ClientObject, owner:ClientObject, sfxData:ShaftSFXData, param1:Vector3, param2:Vector3, param3:Vector3, param4:Vector3, param5:Boolean) : void
{
var _loc7_:Number = NaN;
var _loc6_:Number = sfxData.trailLength;
vectorToHitPoint.vDiff(param1,param2);
if(vectorToHitPoint.vDot(param3) > 0)
{
_loc7_ = vectorToHitPoint.vLength();
if(_loc7_ > _loc6_)
{
_loc7_ = _loc6_;
}
this.createTrailEffect(sfxData,TrailEffect1,param1,param4,_loc7_,_loc7_ / _loc6_);
if(param5)
{
this.createTrailEffect(sfxData,TrailEffect2,param1,param4,_loc7_,0.5);
}
}
this.createExplosionGraphicEffect(turretObject,owner,sfxData,param1);
this.createExplosionSoundEffect(turretObject,owner,sfxData,param1);
}
private function createExplosionGraphicEffect(turretObject:ClientObject, owner:ClientObject, sfxData:ShaftSFXData, param1:Vector3) : void
{
var _loc2_:StaticObject3DPositionProvider = StaticObject3DPositionProvider(objectPoolService.objectPool.getObject(StaticObject3DPositionProvider));
_loc2_.init(param1,EXPLOSION_OFFSET_TO_CAMERA);
var _loc3_:AnimatedSpriteEffectNew = AnimatedSpriteEffectNew(objectPoolService.objectPool.getObject(AnimatedSpriteEffectNew));
_loc3_.init(EXPLOSION_WIDTH * 3,2.5 * EXPLOSION_WIDTH,sfxData.explosionAnimation,0,_loc2_);
this.battlefieldModel.addGraphicEffect(_loc3_);
}
private function createExplosionSoundEffect(turretObject:ClientObject, owner:ClientObject, sfxData:ShaftSFXData, param1:Vector3) : void
{
var _loc2_:Sound3D = Sound3D.create(sfxData.explosionSound,1000,5000,5,EXPLOSION_SOUND_VOLUME);
var _loc3_:Sound3DEffect = Sound3DEffect(objectPoolService.objectPool.getObject(Sound3DEffect));
_loc3_.init(owner,param1,_loc2_,100);
this.battlefieldModel.addSound3DEffect(_loc3_);
}
private function createTrailEffect(sfxData:ShaftSFXData, param1:Class, param2:Vector3, param3:Vector3, param4:Number, param5:Number) : void
{
var _loc6_:ShaftTrailEffect = ShaftTrailEffect(objectPoolService.objectPool.getObject(param1));
_loc6_.init(param2,param3,param4,param5,sfxData.trailMaterial,TRAIL_DURATION);
this.battlefieldModel.addGraphicEffect(_loc6_);
}
}
}
|
package alternativa.tanks.models.weapon.railgun {
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.sfx.LightAnimation;
import flash.media.Sound;
public class RailgunSFXData {
public var trailMaterial:TextureMaterial;
public var smokeMaterial:TextureMaterial;
public var chargingAnimation:TextureAnimation;
public var ringsAnimation:TextureAnimation;
public var sphereAnimation:TextureAnimation;
public var hitMarkMaterial:TextureMaterial;
public var sound:Sound;
public var powAnimation:TextureAnimation;
public var chargeLightAnimation:LightAnimation;
public var shotLightAnimation:LightAnimation;
public var hitLightAnimation:LightAnimation;
public var railLightAnimation:LightAnimation;
public function RailgunSFXData() {
super();
}
}
}
|
package alternativa.tanks.gui.payment.forms.mobile {
import flash.events.Event;
public class PhoneNumberValidationEvent extends Event {
public static const VALIDATE:String = "PhoneNumberValidationEvent.EVENT";
private var phoneNumber:String;
public function PhoneNumberValidationEvent(param1:String) {
super(VALIDATE,true);
this.phoneNumber = param1;
}
public function getPhoneNumber() : String {
return this.phoneNumber;
}
}
}
|
package alternativa.tanks.models.effects.effectlevel {
import projects.tanks.client.battlefield.models.effects.effectlevel.EffectLevelModelBase;
import projects.tanks.client.battlefield.models.effects.effectlevel.IEffectLevelModelBase;
[ModelInfo]
public class EffectLevelModel extends EffectLevelModelBase implements IEffectLevel, IEffectLevelModelBase {
public function EffectLevelModel() {
super();
}
public function getEffectLevel() : int {
return getInitParam().effectLevel;
}
}
}
|
package alternativa.tanks.models.weapon.terminator.sfx {
import flash.media.Sound;
import platform.client.fp10.core.type.AutoClosable;
import projects.tanks.client.battlefield.models.tankparts.weapon.terminator.sfx.TerminatorSFXCC;
public class TerminatorSFXData implements AutoClosable {
public var servoSound:Sound;
public var openedSound:Sound;
public var closedSound:Sound;
public function TerminatorSFXData(param1:TerminatorSFXCC) {
super();
this.servoSound = param1.servoSound.sound;
this.openedSound = param1.openedSound.sound;
this.closedSound = param1.closedSound.sound;
}
public function close() : void {
this.servoSound = null;
this.openedSound = null;
this.closedSound = null;
}
}
}
|
package alternativa.physics.constraints
{
import alternativa.physics.PhysicsScene;
import alternativa.physics.altphysics;
public class Constraint
{
altphysics var satisfied:Boolean;
altphysics var world:PhysicsScene;
public function Constraint()
{
super();
}
public function preProcess(dt:Number) : void
{
}
public function apply(dt:Number) : void
{
}
}
}
|
package alternativa.tanks.gui.clanmanagement.clanmemberlist {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.components.helpers.BubbleItem;
import alternativa.types.Long;
import base.DiscreteSprite;
import controls.ValidationIcon;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import controls.base.TankInputBase;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.ui.Keyboard;
import flash.utils.clearTimeout;
import flash.utils.setTimeout;
import forms.ColorConstants;
import forms.events.LoginFormEvent;
import projects.tanks.clients.fp10.libraries.tanksservices.service.blur.IBlurService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
public class SearchInputView extends DiscreteSprite implements ISearchInput {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var blurService:IBlurService;
[Inject]
public static var userPropertiesService:IUserPropertiesService;
private static const SEARCH_TIMEOUT:int = 600;
private var _searchTextInput:TankInputBase;
private var _searchLabel:LabelBase;
private var _sendRequestButton:DefaultButtonBase;
private var _validateCheckUidIcon:ValidationIcon;
private var _searchTimeOut:uint;
private var _searchName:String;
private var _searchExist:Boolean;
private var _searchUserId:Long;
private var _searchLabelText:String;
private var _searchLabelDisabledText:String;
private var _sendButtonText:String;
private var _sendButtonDisabledText:String;
private var _sourceData:ISourceData;
private var _width:Number;
public function SearchInputView(param1:ISourceData, param2:String, param3:String, param4:String, param5:String) {
super();
this._sourceData = param1;
this._searchLabelText = param2;
this._sendButtonText = param3;
this._searchLabelDisabledText = param4;
this._sendButtonDisabledText = param5;
param1.setSearchInput(this);
this.init();
}
private function init() : void {
this._searchTextInput = new TankInputBase();
this._searchTextInput.maxChars = 20;
this._searchTextInput.restrict = "0-9.a-zA-z_ \\-*";
addChild(this._searchTextInput);
this._searchLabel = new LabelBase();
addChild(this._searchLabel);
this._searchLabel.mouseEnabled = false;
this._searchLabel.color = ColorConstants.LIST_LABEL_HINT;
this._searchLabel.text = this._searchLabelText;
this._validateCheckUidIcon = new ValidationIcon();
addChild(this._validateCheckUidIcon);
this._sendRequestButton = new DefaultButtonBase();
this._sendRequestButton.width = 120;
addChild(this._sendRequestButton);
this._sendRequestButton.label = this._sendButtonText;
this._sendRequestButton.enable = false;
this.resize(100);
this.show();
}
override public function get width() : Number {
return this._width;
}
override public function set width(param1:Number) : void {
this._width = param1;
this.resize(this._width);
}
public function resize(param1:Number) : void {
this._searchTextInput.width = param1 - this._sendRequestButton.width - 11;
this._searchTextInput.x = 0;
this._searchLabel.x = this._searchTextInput.x + 3;
this._searchLabel.y = this._searchTextInput.y + 7;
this._validateCheckUidIcon.x = this._searchTextInput.x + this._searchTextInput.width - this._validateCheckUidIcon.width - 15;
this._validateCheckUidIcon.y = this._searchTextInput.y + 7;
this._sendRequestButton.x = this._searchTextInput.width;
}
public function hide() : void {
clearTimeout(this._searchTimeOut);
this.removeEvents();
this.clearSearchFriendTextInput();
this.visible = false;
}
private function removeEvents() : void {
this._sendRequestButton.removeEventListener(MouseEvent.CLICK,this.onClickAddRequestButton);
this._searchTextInput.removeEventListener(FocusEvent.FOCUS_IN,this.onFocusInSearchFriend);
this._searchTextInput.removeEventListener(FocusEvent.FOCUS_OUT,this.onFocusOutSearchFriend);
this._searchTextInput.removeEventListener(LoginFormEvent.TEXT_CHANGED,this.onSearchFriendTextChange);
this._searchTextInput.removeEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
}
public function show() : void {
this.visible = true;
this.setEvents();
this._searchTextInput.value = "";
this.updateVisibleSearchFriendLabel();
}
private function setEvents() : void {
this._sendRequestButton.addEventListener(MouseEvent.CLICK,this.onClickAddRequestButton);
this._searchTextInput.addEventListener(FocusEvent.FOCUS_IN,this.onFocusInSearchFriend);
this._searchTextInput.addEventListener(FocusEvent.FOCUS_OUT,this.onFocusOutSearchFriend);
this._searchTextInput.addEventListener(LoginFormEvent.TEXT_CHANGED,this.onSearchFriendTextChange);
this._searchTextInput.addEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
}
private function onClickAddRequestButton(param1:MouseEvent = null) : void {
if(this._searchExist && this._searchName != null) {
this._sourceData.addByUid(this._searchName);
this.clearSearchFriendTextInput();
}
}
private function clearSearchFriendTextInput() : void {
this._searchTextInput.value = "";
this._sendRequestButton.enable = false;
this._validateCheckUidIcon.turnOff();
this._searchExist = false;
this._searchName = null;
}
private function onFocusInSearchFriend(param1:FocusEvent) : void {
this._searchLabel.visible = false;
}
private function onFocusOutSearchFriend(param1:FocusEvent) : void {
this.updateVisibleSearchFriendLabel();
}
private function updateVisibleSearchFriendLabel() : void {
if(this._searchTextInput.value.length == 0) {
this._searchLabel.visible = true;
this._validateCheckUidIcon.turnOff();
this._searchTextInput.validValue = true;
}
}
private function onSearchFriendTextChange(param1:LoginFormEvent) : void {
this._searchExist = false;
this._sendRequestButton.enable = false;
this._validateCheckUidIcon.startProgress();
this._validateCheckUidIcon.y = this._searchTextInput.y + 5;
if(this._searchTextInput.value.length > 0) {
this._searchLabel.visible = false;
}
clearTimeout(this._searchTimeOut);
this._searchTimeOut = setTimeout(this.searchFriendTextChange,SEARCH_TIMEOUT);
}
private function searchFriendTextChange() : void {
if(this._searchTextInput.value.length == 0) {
this._validateCheckUidIcon.turnOff();
this._searchTextInput.validValue = true;
BubbleItem.hide();
} else {
this._searchName = this._searchTextInput.value;
this._sourceData.checkUid(this._searchName);
}
}
private function onKeyUp(param1:KeyboardEvent) : void {
if(param1.keyCode == Keyboard.ENTER) {
this.onClickAddRequestButton();
}
}
public function onUidExist() : void {
BubbleItem.hide();
this._searchTextInput.validValue = true;
this._validateCheckUidIcon.markAsValid();
this._validateCheckUidIcon.y = this._searchTextInput.y + 7;
if(userPropertiesService.userName.toLowerCase() != this._searchName.toLowerCase()) {
this._searchExist = true;
this._sendRequestButton.enable = true;
}
}
public function onUidNotExist() : void {
BubbleItem.hide();
this._searchName = null;
this.markAsInvalidInput();
}
public function onUserLowRank(param1:String) : void {
BubbleItem.createBubble(param1,this._searchTextInput,this);
this.markAsInvalidInput();
}
private function markAsInvalidInput() : void {
this._searchTextInput.validValue = false;
this._validateCheckUidIcon.markAsInvalid();
this._validateCheckUidIcon.y = this._searchTextInput.y + 7;
this._sendRequestButton.enable = false;
}
public function onAlreadyInAccepted(param1:String) : void {
BubbleItem.createBubble(param1,this._searchTextInput,this);
this.markAsInvalidInput();
}
public function onAlreadyInOutgoing(param1:String) : void {
BubbleItem.createBubble(param1,this._searchTextInput,this);
this.markAsInvalidInput();
}
public function onAlreadyInIncoming(param1:Long, param2:String) : void {
this._searchUserId = param1;
BubbleItem.createBubble(param2,this._searchTextInput,this);
this.markAsInvalidInput();
}
public function onAlreadyInClan(param1:String) : void {
this.markAsInvalidInput();
BubbleItem.createBubble(param1,this._searchTextInput,this);
}
public function onRestrictionOnJoin(param1:String) : void {
this.markAsInvalidInput();
BubbleItem.createBubble(param1,this._searchTextInput,this);
}
public function clanBlocked(param1:String) : void {
this.markAsInvalidInput();
BubbleItem.createBubble(param1,this._searchTextInput,this);
}
public function incomingRequestDisabled(param1:String) : void {
this.markAsInvalidInput();
BubbleItem.createBubble(param1,this._searchTextInput,this);
}
public function set enable(param1:Boolean) : void {
this._sendRequestButton.enable = param1;
this._searchTextInput.enable = param1;
if(param1) {
this._sendRequestButton.label = this._sendButtonText;
this._searchLabel.text = this._searchLabelText;
} else {
this._sendRequestButton.label = this._sendButtonDisabledText;
this._searchLabel.text = this._searchLabelDisabledText;
}
}
public function get sendRequestButton() : DefaultButtonBase {
return this._sendRequestButton;
}
}
}
|
package projects.tanks.client.tanksservices.model.reconnect {
public class ReconnectCC {
private var _configUrlTemplate:String;
private var _serverNumber:int;
public function ReconnectCC(param1:String = null, param2:int = 0) {
super();
this._configUrlTemplate = param1;
this._serverNumber = param2;
}
public function get configUrlTemplate() : String {
return this._configUrlTemplate;
}
public function set configUrlTemplate(param1:String) : void {
this._configUrlTemplate = param1;
}
public function get serverNumber() : int {
return this._serverNumber;
}
public function set serverNumber(param1:int) : void {
this._serverNumber = param1;
}
public function toString() : String {
var local1:String = "ReconnectCC [";
local1 += "configUrlTemplate = " + this.configUrlTemplate + " ";
local1 += "serverNumber = " + this.serverNumber + " ";
return local1 + "]";
}
}
}
|
package _codec.projects.tanks.client.tanksservices.model.notifier.socialnetworks {
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.tanksservices.model.notifier.socialnetworks.SNUidNotifierData;
public class VectorCodecSNUidNotifierDataLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecSNUidNotifierDataLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(SNUidNotifierData,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.<SNUidNotifierData> = new Vector.<SNUidNotifierData>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = SNUidNotifierData(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:SNUidNotifierData = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<SNUidNotifierData> = Vector.<SNUidNotifierData>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.kits.description.panel {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.shop.shopitems.item.kits.description.panel.KitPackageDescriptionPanelBitmaps_bitmapBackgroundPixel.png")]
public class KitPackageDescriptionPanelBitmaps_bitmapBackgroundPixel extends BitmapAsset {
public function KitPackageDescriptionPanelBitmaps_bitmapBackgroundPixel() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.battle.pointbased.ctf {
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class CaptureTheFlagCC {
private var _blueFlagSprite:TextureResource;
private var _bluePedestalModel:Tanks3DSResource;
private var _redFlagSprite:TextureResource;
private var _redPedestalModel:Tanks3DSResource;
private var _sounds:CaptureTheFlagSoundFX;
public function CaptureTheFlagCC(param1:TextureResource = null, param2:Tanks3DSResource = null, param3:TextureResource = null, param4:Tanks3DSResource = null, param5:CaptureTheFlagSoundFX = null) {
super();
this._blueFlagSprite = param1;
this._bluePedestalModel = param2;
this._redFlagSprite = param3;
this._redPedestalModel = param4;
this._sounds = param5;
}
public function get blueFlagSprite() : TextureResource {
return this._blueFlagSprite;
}
public function set blueFlagSprite(param1:TextureResource) : void {
this._blueFlagSprite = param1;
}
public function get bluePedestalModel() : Tanks3DSResource {
return this._bluePedestalModel;
}
public function set bluePedestalModel(param1:Tanks3DSResource) : void {
this._bluePedestalModel = param1;
}
public function get redFlagSprite() : TextureResource {
return this._redFlagSprite;
}
public function set redFlagSprite(param1:TextureResource) : void {
this._redFlagSprite = param1;
}
public function get redPedestalModel() : Tanks3DSResource {
return this._redPedestalModel;
}
public function set redPedestalModel(param1:Tanks3DSResource) : void {
this._redPedestalModel = param1;
}
public function get sounds() : CaptureTheFlagSoundFX {
return this._sounds;
}
public function set sounds(param1:CaptureTheFlagSoundFX) : void {
this._sounds = param1;
}
public function toString() : String {
var local1:String = "CaptureTheFlagCC [";
local1 += "blueFlagSprite = " + this.blueFlagSprite + " ";
local1 += "bluePedestalModel = " + this.bluePedestalModel + " ";
local1 += "redFlagSprite = " + this.redFlagSprite + " ";
local1 += "redPedestalModel = " + this.redPedestalModel + " ";
local1 += "sounds = " + this.sounds + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.model.item.skins {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class AvailableSkinsEvents implements AvailableSkins {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function AvailableSkinsEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getSkins() : Vector.<IGameObject> {
var result:Vector.<IGameObject> = null;
var i:int = 0;
var m:AvailableSkins = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = AvailableSkins(this.impl[i]);
result = m.getSkins();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.onlyurl {
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 projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
public class OnlyUrlPaymentModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:OnlyUrlPaymentModelServer;
private var client:IOnlyUrlPaymentModelBase = IOnlyUrlPaymentModelBase(this);
private var modelId:Long = Long.getLong(969748537,-1870265676);
private var _receiveUrlId:Long = Long.getLong(698903513,383981781);
private var _receiveUrl_urlCodec:ICodec;
public function OnlyUrlPaymentModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new OnlyUrlPaymentModelServer(IModel(this));
this._receiveUrl_urlCodec = this._protocol.getCodec(new TypeCodecInfo(PaymentRequestUrl,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._receiveUrlId:
this.client.receiveUrl(PaymentRequestUrl(this._receiveUrl_urlCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.weapon.freeze {
import alternativa.math.Vector3;
import alternativa.physics.Body;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.BattleEventSupport;
import alternativa.tanks.battle.events.StateCorrectionEvent;
import alternativa.tanks.battle.events.TankUnloadedEvent;
import alternativa.tanks.battle.objects.tank.ConfigurableWeapon;
import alternativa.tanks.battle.objects.tank.Tank;
import alternativa.tanks.battle.objects.tank.Weapon;
import alternativa.tanks.models.tank.ultimate.hunter.stun.UltimateStunListener;
import alternativa.tanks.models.weapon.ConicAreaData;
import alternativa.tanks.models.weapon.IWeaponModel;
import alternativa.tanks.models.weapon.common.WeaponBuffListener;
import alternativa.tanks.models.weapon.flamethrower.RemoteFlamethrower;
import alternativa.tanks.models.weapon.shared.ConicAreaTargetingSystem;
import alternativa.tanks.models.weapon.shared.SimpleWeaponController;
import alternativa.tanks.models.weapon.shared.streamweapon.IStreamWeaponCallback;
import alternativa.tanks.models.weapon.shared.streamweapon.StreamWeapon;
import alternativa.tanks.models.weapon.shared.streamweapon.StreamWeaponEffects;
import alternativa.tanks.models.weapon.streamweapon.IStreamWeaponModel;
import alternativa.tanks.models.weapon.streamweapon.StreamConeParams;
import alternativa.tanks.models.weapon.streamweapon.StreamWeaponData;
import alternativa.tanks.models.weapon.streamweapon.StreamWeaponReconfiguredListener;
import alternativa.tanks.physics.TanksCollisionDetector;
import flash.utils.Dictionary;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapon.freeze.FreezeCC;
import projects.tanks.client.battlefield.models.tankparts.weapon.freeze.FreezeModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapon.freeze.IFreezeModelBase;
import projects.tanks.client.battlefield.types.Vector3d;
import projects.tanks.client.garage.models.item.properties.ItemProperty;
[ModelInfo]
public class FreezeModel extends FreezeModelBase implements IFreezeModelBase, ObjectLoadListener, IWeaponModel, IStreamWeaponCallback, StreamWeaponReconfiguredListener, WeaponBuffListener, UltimateStunListener {
[Inject]
public static var battleService:BattleService;
[Inject]
public static var battleEventDispatcher:BattleEventDispatcher;
private const targets:Vector.<IGameObject> = new Vector.<IGameObject>();
private const targetIncarnations:Vector.<int> = new Vector.<int>();
private var localUser:IGameObject;
private var weapons:Dictionary = new Dictionary();
private var battleEventSupport:BattleEventSupport;
public function FreezeModel() {
super();
this.battleEventSupport = new BattleEventSupport(battleEventDispatcher);
this.battleEventSupport.addEventHandler(TankUnloadedEvent,this.onTankUnloaded);
this.battleEventSupport.activateHandlers();
}
private static function getStreamWeaponData() : StreamWeaponData {
var local1:IStreamWeaponModel = IStreamWeaponModel(object.adapt(IStreamWeaponModel));
return local1.getStreamWeaponData();
}
[Obfuscation(rename="false")]
public function objectLoaded() : void {
var local1:FreezeCC = getInitParam();
var local2:ConicAreaData = new ConicAreaData(local1.damageAreaConeAngle,BattleUtils.toClientScale(local1.damageAreaRange));
putData(ConicAreaData,local2);
}
[Obfuscation(rename="false")]
public function startFire(param1:IGameObject) : void {
var local2:RemoteFlamethrower = this.weapons[param1];
if(local2 != null) {
local2.startFire();
}
}
[Obfuscation(rename="false")]
public function stopFire(param1:IGameObject) : void {
var local2:RemoteFlamethrower = this.weapons[param1];
if(local2 != null) {
local2.stopFire();
}
}
private function onTankUnloaded(param1:TankUnloadedEvent) : void {
var local2:IGameObject = param1.tank.getUser();
if(local2 == this.localUser) {
this.localUser = null;
}
delete this.weapons[local2];
}
public function createLocalWeapon(param1:IGameObject) : Weapon {
this.localUser = param1;
var local2:StreamWeaponEffects = this.getEffects();
var local3:TanksCollisionDetector = battleService.getBattleRunner().getCollisionDetector();
var local4:ConicAreaData = ConicAreaData(getData(ConicAreaData));
var local5:ConicAreaTargetingSystem = new ConicAreaTargetingSystem(local4.getRange(),local4.getConeAngle(),StreamConeParams.NUM_RADIAL_RAYS,StreamConeParams.NUM_STEPS,local3,battleService.getConicAreaTargetValidator());
var local6:SimpleWeaponController = new SimpleWeaponController();
var local7:StreamWeaponData = getStreamWeaponData();
var local8:Weapon = new StreamWeapon(local7.getEnergyCapacity(),local7.getEnergyDischargeSpeed(),local7.getEnergyRechargeSpeed(),local7.getTickIntervalMsec(),local5,local6,IStreamWeaponCallback(object.adapt(IStreamWeaponCallback)),local2,ItemProperty.FREEZE_RESISTANCE);
this.weapons[param1] = local8;
return local8;
}
private function getEffects() : StreamWeaponEffects {
var local1:ConicAreaData = ConicAreaData(getData(ConicAreaData));
var local2:IFreezeSFXModel = IFreezeSFXModel(object.adapt(IFreezeSFXModel));
return local2.getFreezeEffects(local1.getRange(),local1.getConeAngle());
}
public function createRemoteWeapon(param1:IGameObject) : Weapon {
var local2:Weapon = new RemoteFlamethrower(this.getEffects());
this.weapons[param1] = local2;
return local2;
}
public function start(param1:int) : void {
server.startFireCommand(param1);
}
public function stop(param1:int) : void {
server.stopFireCommand(param1);
}
public function onTick(param1:Weapon, param2:Vector.<Body>, param3:Vector.<Number>, param4:Vector.<Vector3>, param5:int) : void {
var local6:Vector.<Vector3d> = null;
var local7:Vector.<Vector3d> = null;
var local8:int = 0;
var local9:Body = null;
if(param1 == this.weapons[this.localUser]) {
this.collectTargetsData(param2);
local6 = new Vector.<Vector3d>(param2.length);
local7 = new Vector.<Vector3d>(param2.length);
local8 = 0;
while(local8 < param2.length) {
local9 = param2[local8];
local6[local8] = BattleUtils.getVector3d(local9.state.position);
local7[local8] = BattleUtils.getVector3d(param4[local8]);
local8++;
}
this.battleEventSupport.dispatchEvent(StateCorrectionEvent.MANDATORY_UPDATE);
server.hitCommand(param5,this.targets,this.targetIncarnations,local6,local7);
this.targets.length = 0;
this.targetIncarnations.length = 0;
}
}
private function collectTargetsData(param1:Vector.<Body>) : void {
var local3:Body = null;
var local4:Tank = null;
var local2:int = 0;
while(local2 < param1.length) {
local3 = Body(param1[local2]);
local4 = local3.tank;
this.targets[local2] = local4.getUser();
this.targetIncarnations[local2] = local4.incarnation;
local2++;
}
this.targets.length = param1.length;
this.targetIncarnations.length = param1.length;
}
public function streamWeaponReconfigured(param1:IGameObject, param2:Number) : void {
var local3:StreamWeapon = null;
if(this.isLocal(param1)) {
local3 = this.weapons[param1];
local3.updateDischargeRate(param2);
}
}
public function streamWeaponDistanceChanged(param1:IGameObject, param2:Number) : void {
var local3:StreamWeapon = null;
var local4:ConfigurableWeapon = null;
if(this.isLocal(param1)) {
local3 = this.weapons[param1];
local3.updateRange(param2);
} else {
local4 = this.weapons[param1];
local4.updateRange(param2);
}
}
private function isLocal(param1:IGameObject) : Boolean {
return this.localUser == param1;
}
public function weaponBuffStateChanged(param1:IGameObject, param2:Boolean, param3:Number) : void {
var local4:StreamWeapon = null;
var local5:ConfigurableWeapon = null;
if(this.isLocal(param1)) {
local4 = this.weapons[param1];
local4.setBuffedMode(param2);
local4.fullyRecharge();
} else {
local5 = this.weapons[param1];
local5.setBuffedMode(param2);
}
}
public function onStun(param1:Tank, param2:Boolean) : void {
if(param2) {
StreamWeapon(this.weapons[param1.user]).stun();
}
}
public function onCalm(param1:Tank, param2:Boolean, param3:int) : void {
if(param2) {
StreamWeapon(this.weapons[param1.user]).calm(param3);
}
}
}
}
|
package platform.client.core.general.socialnetwork.models.google {
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 GoogleExternalLoginModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:GoogleExternalLoginModelServer;
private var client:IGoogleExternalLoginModelBase = IGoogleExternalLoginModelBase(this);
private var modelId:Long = Long.getLong(132443900,-1454404345);
public function GoogleExternalLoginModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new GoogleExternalLoginModelServer(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 alternativa.types
{
import flash.utils.ByteArray;
import flash.utils.Dictionary;
public class LongFactory
{
private static var long:Dictionary = new Dictionary(false);
private static var longArray:ByteArray = new ByteArray();
public function LongFactory()
{
super();
}
public static function getLong(high:int, low:int) : Long
{
var value:Long = null;
if(long[low] != null)
{
if(long[low][high] != null)
{
value = long[low][high];
}
else
{
value = new Long(low,high);
long[low][high] = value;
}
}
else
{
long[low] = new Dictionary(false);
value = new Long(low,high);
long[low][high] = value;
}
return value;
}
public static function getLongByString(s:String) : Long
{
var high:int = 0;
var low:int = 0;
while(s.length < 16)
{
s = "0" + s;
}
high = int("0x" + s.substr(0,8));
low = int("0x" + s.substr(8,16));
return getLong(high,low);
}
public static function LongToByteArray(value:Long) : ByteArray
{
longArray.position = 0;
longArray.writeInt(value.high);
longArray.writeInt(value.low);
longArray.position = 0;
return longArray;
}
public static function integerToLong(value:int) : Long
{
if(value < 0)
{
return LongFactory.getLong(2147483648,value);
}
return LongFactory.getLong(0,value);
}
}
}
|
package alternativa.tanks.display.usertitle
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ProgressBarSkin_hpLeftDmCls extends BitmapAsset
{
public function ProgressBarSkin_hpLeftDmCls()
{
super();
}
}
}
|
package alternativa.engine3d.loaders.collada {
public namespace daeAlternativa3DLibrary = "http://alternativaplatform.com/a3d/Library";
}
|
package projects.tanks.client.panel.model.payment
{
import scpacker.Base;
public class PaymentModelBase extends Base
{
public function PaymentModelBase()
{
super();
}
}
}
|
package projects.tanks.clients.flash.commons.models.layout.notify {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.commons.models.layout.LayoutState;
public class ILobbyLayoutNotifyAdapt implements ILobbyLayoutNotify {
private var object:IGameObject;
private var impl:ILobbyLayoutNotify;
public function ILobbyLayoutNotifyAdapt(param1:IGameObject, param2:ILobbyLayoutNotify) {
super();
this.object = param1;
this.impl = param2;
}
public function layoutSwitchPredicted() : void {
try {
Model.object = this.object;
this.impl.layoutSwitchPredicted();
}
finally {
Model.popObject();
}
}
public function isSwitchInProgress() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.isSwitchInProgress());
}
finally {
Model.popObject();
}
return result;
}
public function getCurrentState() : LayoutState {
var result:LayoutState = null;
try {
Model.object = this.object;
result = this.impl.getCurrentState();
}
finally {
Model.popObject();
}
return result;
}
public function inBattle() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.inBattle());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.partners.impl.asiasoft {
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 AsiasoftPaymentModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _checkBalanceId:Long = Long.getLong(1295730514,-1432492069);
private var _checkBalance_shopItemCodec:ICodec;
private var _requestPaymentId:Long = Long.getLong(754337062,-1587724200);
private var _requestPayment_shopItemIdCodec:ICodec;
private var model:IModel;
public function AsiasoftPaymentModelServer(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._checkBalance_shopItemCodec = this.protocol.getCodec(new TypeCodecInfo(IGameObject,false));
this._requestPayment_shopItemIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
}
public function checkBalance(param1:IGameObject) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._checkBalance_shopItemCodec.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._checkBalanceId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function requestPayment(param1:Long) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._requestPayment_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._requestPaymentId,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.battle.cp.resources {
import platform.client.fp10.core.resource.types.ImageResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.clients.flash.resources.resource.Tanks3DSResource;
public class DominationResources {
private var _bigLetters:ImageResource;
private var _blueCircle:ImageResource;
private var _bluePedestalTexture:TextureResource;
private var _blueRay:TextureResource;
private var _blueRayTip:TextureResource;
private var _neutralCircle:ImageResource;
private var _neutralPedestalTexture:TextureResource;
private var _pedestal:Tanks3DSResource;
private var _redCircle:ImageResource;
private var _redPedestalTexture:TextureResource;
private var _redRay:TextureResource;
private var _redRayTip:TextureResource;
public function DominationResources(param1:ImageResource = null, param2:ImageResource = null, param3:TextureResource = null, param4:TextureResource = null, param5:TextureResource = null, param6:ImageResource = null, param7:TextureResource = null, param8:Tanks3DSResource = null, param9:ImageResource = null, param10:TextureResource = null, param11:TextureResource = null, param12:TextureResource = null) {
super();
this._bigLetters = param1;
this._blueCircle = param2;
this._bluePedestalTexture = param3;
this._blueRay = param4;
this._blueRayTip = param5;
this._neutralCircle = param6;
this._neutralPedestalTexture = param7;
this._pedestal = param8;
this._redCircle = param9;
this._redPedestalTexture = param10;
this._redRay = param11;
this._redRayTip = param12;
}
public function get bigLetters() : ImageResource {
return this._bigLetters;
}
public function set bigLetters(param1:ImageResource) : void {
this._bigLetters = param1;
}
public function get blueCircle() : ImageResource {
return this._blueCircle;
}
public function set blueCircle(param1:ImageResource) : void {
this._blueCircle = param1;
}
public function get bluePedestalTexture() : TextureResource {
return this._bluePedestalTexture;
}
public function set bluePedestalTexture(param1:TextureResource) : void {
this._bluePedestalTexture = param1;
}
public function get blueRay() : TextureResource {
return this._blueRay;
}
public function set blueRay(param1:TextureResource) : void {
this._blueRay = param1;
}
public function get blueRayTip() : TextureResource {
return this._blueRayTip;
}
public function set blueRayTip(param1:TextureResource) : void {
this._blueRayTip = param1;
}
public function get neutralCircle() : ImageResource {
return this._neutralCircle;
}
public function set neutralCircle(param1:ImageResource) : void {
this._neutralCircle = param1;
}
public function get neutralPedestalTexture() : TextureResource {
return this._neutralPedestalTexture;
}
public function set neutralPedestalTexture(param1:TextureResource) : void {
this._neutralPedestalTexture = param1;
}
public function get pedestal() : Tanks3DSResource {
return this._pedestal;
}
public function set pedestal(param1:Tanks3DSResource) : void {
this._pedestal = param1;
}
public function get redCircle() : ImageResource {
return this._redCircle;
}
public function set redCircle(param1:ImageResource) : void {
this._redCircle = param1;
}
public function get redPedestalTexture() : TextureResource {
return this._redPedestalTexture;
}
public function set redPedestalTexture(param1:TextureResource) : void {
this._redPedestalTexture = param1;
}
public function get redRay() : TextureResource {
return this._redRay;
}
public function set redRay(param1:TextureResource) : void {
this._redRay = param1;
}
public function get redRayTip() : TextureResource {
return this._redRayTip;
}
public function set redRayTip(param1:TextureResource) : void {
this._redRayTip = param1;
}
public function toString() : String {
var local1:String = "DominationResources [";
local1 += "bigLetters = " + this.bigLetters + " ";
local1 += "blueCircle = " + this.blueCircle + " ";
local1 += "bluePedestalTexture = " + this.bluePedestalTexture + " ";
local1 += "blueRay = " + this.blueRay + " ";
local1 += "blueRayTip = " + this.blueRayTip + " ";
local1 += "neutralCircle = " + this.neutralCircle + " ";
local1 += "neutralPedestalTexture = " + this.neutralPedestalTexture + " ";
local1 += "pedestal = " + this.pedestal + " ";
local1 += "redCircle = " + this.redCircle + " ";
local1 += "redPedestalTexture = " + this.redPedestalTexture + " ";
local1 += "redRay = " + this.redRay + " ";
local1 += "redRayTip = " + this.redRayTip + " ";
return local1 + "]";
}
}
}
|
package platform.client.core.general.resourcelocale.format {
public class StringPair {
private var _key:String;
private var _value:String;
public function StringPair(param1:String = null, param2:String = null) {
super();
this._key = param1;
this._value = param2;
}
public function get key() : String {
return this._key;
}
public function set key(param1:String) : void {
this._key = param1;
}
public function get value() : String {
return this._value;
}
public function set value(param1:String) : void {
this._value = param1;
}
public function toString() : String {
var local1:String = "StringPair [";
local1 += "key = " + this.key + " ";
local1 += "value = " + this.value + " ";
return local1 + "]";
}
}
}
|
package controls {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.TankWindowInner_bottomRightClass.png")]
public class TankWindowInner_bottomRightClass extends BitmapAsset {
public function TankWindowInner_bottomRightClass() {
super();
}
}
}
|
package assets.windowinner.elemets {
import flash.display.Sprite;
[Embed(source="/_assets/assets.swf", symbol="symbol25")]
public class WindowInnerBottomLeftCorner extends Sprite {
public function WindowInnerBottomLeftCorner() {
super();
}
}
}
|
package projects.tanks.client.panel.model.androidapprating {
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 AndroidAppRatingModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _goToMarketId:Long = Long.getLong(610268383,148497816);
private var _setAppRatingId:Long = Long.getLong(1873333254,1067243371);
private var _setAppRating_ratingCodec:ICodec;
private var model:IModel;
public function AndroidAppRatingModelServer(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._setAppRating_ratingCodec = this.protocol.getCodec(new TypeCodecInfo(int,false));
}
public function goToMarket() : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local1:SpaceCommand = new SpaceCommand(Model.object.id,this._goToMarketId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function setAppRating(param1:int) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._setAppRating_ratingCodec.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._setAppRatingId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package projects.tanks.client.panel.model.shop.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 ShopNotifierModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function ShopNotifierModelServer(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 projects.tanks.client.entrance.model.entrance.entrance {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class EntranceModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:EntranceModelServer;
private var client:IEntranceModelBase = IEntranceModelBase(this);
private var modelId:Long = Long.getLong(687101726,-1582366168);
public function EntranceModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new EntranceModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(EntranceModelCC,false)));
}
protected function getInitParam() : EntranceModelCC {
return EntranceModelCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package com.lorentz.SVG.utils
{
import flash.geom.Point;
public final class MathUtils
{
/**
Robert Penner's Math intersect2Lines.
Returns the point of intersection between two lines.
Parameters:
p1, p2 - two points on first line
p3, p4 - two points on second line
Returns:
Point of intersection
*/
public static function intersect2Lines(p1:Point, p2:Point, p3:Point, p4:Point):Point
{
var x1:Number = p1.x; var y1:Number = p1.y;
var x4:Number = p4.x; var y4:Number = p4.y;
var dx1:Number = p2.x - x1;
var dx2:Number = p3.x - x4;
if (!dx1 && !dx2) return null; // new Point(NaN, NaN);
var m1:Number = (p2.y - y1) / dx1;
var m2:Number = (p3.y - y4) / dx2;
if (!dx1) {
// infinity
return new Point(x1, m2 * (x1 - x4) + y4);
} else if (!dx2) {
// infinity
return new Point(x4, m1 * (x4 - x1) + y1);
}
var xInt:Number = (-m2 * x4 + y4 + m1 * x1 - y1) / (m1 - m2);
var yInt:Number = m1 * (xInt - x1) + y1;
return new Point(xInt, yInt);
}
/**
Returns the midpoint of a line segment.
Parameters:
a, b - endpoints of line segment (each with .x and .y properties)
*/
public static function midLine(a:Point, b:Point):Point
{
return Point.interpolate(a, b, 0.5);
}
/**
Robert Penner's Math method bezierSplit.
Divides a cubic bezier curve into two halves (each also cubic beziers).
Parameters:
p0 - first anchor (Point object)
p1 - first control (Point object)
p2 - second control (Point object)
p3 - second anchor (Point object)
Returns:
An object with
b0 - 1st cubic bezier (with properties a,b,c,d corresp to p0,p1,p2,p3)
b1 - 2nd cubic bezier (same)
*/
public static function bezierSplit(p0:Point, p1:Point, p2:Point, p3:Point):Object
{
var m:Function = MathUtils.midLine;
var p01:Point = m(p0, p1);
var p12:Point = m(p1, p2);
var p23:Point = m(p2, p3);
var p02:Point = m(p01, p12);
var p13:Point = m(p12, p23);
var p03:Point = m(p02, p13);
return {
b0:{a:p0, b:p01, c:p02, d:p03},
b1:{a:p03, b:p13, c:p23, d:p3 }
};
}
public static function degressToRadius(angle:Number):Number{
return angle*(Math.PI/180);
}
public static function radiusToDegress(angle:Number):Number{
return angle*(180/Math.PI);
}
public static function quadCurveSliceUpTo(sx:Number, sy:Number, cx:Number, cy:Number, ex:Number, ey:Number, t:Number):Array {
if (isNaN(t)) t = 1;
if (t != 1) {
var midx:Number = cx + (ex-cx)*t;
var midy:Number = cy + (ey-cy)*t;
cx = sx + (cx-sx)*t;
cy = sy + (cy-sy)*t;
ex = cx + (midx-cx)*t;
ey = cy + (midy-cy)*t;
}
return [sx, sy, cx, cy, ex, ey];
}
public static function quadCurveSliceFrom(sx:Number, sy:Number, cx:Number, cy:Number, ex:Number, ey:Number, t:Number):Array {
if (isNaN(t)) t = 1;
if (t != 1) {
var midx:Number = sx + (cx-sx)*t;
var midy:Number = sy + (cy-sy)*t;
cx = cx + (ex-cx)*t;
cy = cy + (ey-cy)*t;
sx = midx + (cx-midx)*t;
sy = midy + (cy-midy)*t;
}
return [sx, sy, cx, cy, ex, ey];
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_powerBoostClass.png")]
public class ItemInfoPanelBitmaps_powerBoostClass extends BitmapAsset {
public function ItemInfoPanelBitmaps_powerBoostClass() {
super();
}
}
}
|
package _codec.platform.client.core.general.pushnotification.api {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import platform.client.core.general.pushnotification.api.NotificationClientPlatform;
public class VectorCodecNotificationClientPlatformLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecNotificationClientPlatformLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(NotificationClientPlatform,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.<NotificationClientPlatform> = new Vector.<NotificationClientPlatform>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = NotificationClientPlatform(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:NotificationClientPlatform = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<NotificationClientPlatform> = Vector.<NotificationClientPlatform>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package projects.tanks.client.panel.model.videoads {
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 VideoAdsModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _clickShowId:Long = Long.getLong(1971502304,1939633364);
private var _clickShow_placementCodec:ICodec;
private var model:IModel;
public function VideoAdsModelServer(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._clickShow_placementCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function clickShow(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._clickShow_placementCodec.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._clickShowId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package projects.tanks.client.entrance.model.entrance.loginwithoutregistration {
public interface ILoginWithoutRegistrationModelBase {
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapSmallRank21.png")]
public class PremiumRankBitmaps_bitmapSmallRank21 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapSmallRank21() {
super();
}
}
}
|
package _codec.projects.tanks.client.battleselect.model.matchmaking.group.notify {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import projects.tanks.client.battleselect.model.matchmaking.group.notify.MatchmakingUserData;
public class CodecMatchmakingUserData implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_armorModification:ICodec;
private var codec_armorName:ICodec;
private var codec_armorUpgradeLevel:ICodec;
private var codec_id:ICodec;
private var codec_leader:ICodec;
private var codec_local:ICodec;
private var codec_rank:ICodec;
private var codec_uid:ICodec;
private var codec_userIsReady:ICodec;
private var codec_weaponModification:ICodec;
private var codec_weaponName:ICodec;
private var codec_weaponUpgradeLevel:ICodec;
public function CodecMatchmakingUserData() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_armorModification = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_armorName = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_armorUpgradeLevel = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_id = param1.getCodec(new TypeCodecInfo(Long,false));
this.codec_leader = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_local = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_rank = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_uid = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_userIsReady = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_weaponModification = param1.getCodec(new TypeCodecInfo(int,false));
this.codec_weaponName = param1.getCodec(new TypeCodecInfo(String,false));
this.codec_weaponUpgradeLevel = param1.getCodec(new TypeCodecInfo(int,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:MatchmakingUserData = new MatchmakingUserData();
local2.armorModification = this.codec_armorModification.decode(param1) as int;
local2.armorName = this.codec_armorName.decode(param1) as String;
local2.armorUpgradeLevel = this.codec_armorUpgradeLevel.decode(param1) as int;
local2.id = this.codec_id.decode(param1) as Long;
local2.leader = this.codec_leader.decode(param1) as Boolean;
local2.local = this.codec_local.decode(param1) as Boolean;
local2.rank = this.codec_rank.decode(param1) as int;
local2.uid = this.codec_uid.decode(param1) as String;
local2.userIsReady = this.codec_userIsReady.decode(param1) as Boolean;
local2.weaponModification = this.codec_weaponModification.decode(param1) as int;
local2.weaponName = this.codec_weaponName.decode(param1) as String;
local2.weaponUpgradeLevel = this.codec_weaponUpgradeLevel.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:MatchmakingUserData = MatchmakingUserData(param2);
this.codec_armorModification.encode(param1,local3.armorModification);
this.codec_armorName.encode(param1,local3.armorName);
this.codec_armorUpgradeLevel.encode(param1,local3.armorUpgradeLevel);
this.codec_id.encode(param1,local3.id);
this.codec_leader.encode(param1,local3.leader);
this.codec_local.encode(param1,local3.local);
this.codec_rank.encode(param1,local3.rank);
this.codec_uid.encode(param1,local3.uid);
this.codec_userIsReady.encode(param1,local3.userIsReady);
this.codec_weaponModification.encode(param1,local3.weaponModification);
this.codec_weaponName.encode(param1,local3.weaponName);
this.codec_weaponUpgradeLevel.encode(param1,local3.weaponUpgradeLevel);
}
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.partners.rambler {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.GoToUrlForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.asyncurl.AsyncUrlPayMode;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import flash.external.ExternalInterface;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.partners.impl.rambler.payment.IRamblerPaymentModelBase;
import projects.tanks.client.partners.impl.rambler.payment.RamblerPaymentModelBase;
[ModelInfo]
public class RamblerPaymentModel extends RamblerPaymentModelBase implements IRamblerPaymentModelBase, AsyncUrlPayMode, ObjectLoadListener, PayModeView, ObjectUnloadListener {
[Inject]
public static var paymentWindowService:PaymentWindowService;
public function RamblerPaymentModel() {
super();
}
public function requestAsyncUrl() : void {
server.getPaymentTransaction(paymentWindowService.getChosenItem().id);
}
public function receivePaymentTransaction(param1:String) : void {
if(ExternalInterface.available) {
ExternalInterface.call("showRamblerPaymentForItem",param1);
}
paymentWindowService.switchToBeginning();
}
public function getView() : PayModeForm {
return PayModeForm(getData(PayModeForm));
}
public function objectLoaded() : void {
putData(PayModeForm,new GoToUrlForm(object));
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(PayModeForm);
}
}
}
|
package alternativa.tanks.battle.events {
public class AfterBattleRunnerTickEvent {
public static const EVENT:AfterBattleRunnerTickEvent = new AfterBattleRunnerTickEvent();
public function AfterBattleRunnerTickEvent() {
super();
}
}
}
|
package alternativa.tanks.models.inventory {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IInventoryModelEvents implements IInventoryModel {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IInventoryModelEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function lockItem(param1:int, param2:int, param3:Boolean) : void {
var i:int = 0;
var m:IInventoryModel = null;
var itemType:int = param1;
var lockMask:int = param2;
var lock:Boolean = param3;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IInventoryModel(this.impl[i]);
m.lockItem(itemType,lockMask,lock);
i++;
}
}
finally {
Model.popObject();
}
}
public function lockItems(param1:int, param2:Boolean) : void {
var i:int = 0;
var m:IInventoryModel = null;
var lockMask:int = param1;
var lock:Boolean = param2;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IInventoryModel(this.impl[i]);
m.lockItems(lockMask,lock);
i++;
}
}
finally {
Model.popObject();
}
}
public function lockItemsByMask(param1:Vector.<int>, param2:int, param3:Boolean) : void {
var i:int = 0;
var m:IInventoryModel = null;
var affectedSlots:Vector.<int> = param1;
var lockMask:int = param2;
var lock:Boolean = param3;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IInventoryModel(this.impl[i]);
m.lockItemsByMask(affectedSlots,lockMask,lock);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package com.lorentz.SVG.utils
{
import com.lorentz.SVG.display.base.SVGElement;
import flash.display.DisplayObject;
import flash.geom.Rectangle;
public class DisplayUtils
{
public static function safeGetBounds(target:DisplayObject, targetCoordinateSpace:DisplayObject):Rectangle {
if(target.width == 0 || target.height == 0)
return new Rectangle();
return target.getBounds(targetCoordinateSpace);
}
public static function getSVGElement(object:DisplayObject):SVGElement {
while(object != null && !(object is SVGElement))
object = object.parent;
return object as SVGElement;
}
}
} |
package projects.tanks.clients.fp10.libraries.tanksservices.model.friends.incoming {
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadListener;
import projects.tanks.client.users.model.friends.container.UserContainerCC;
import projects.tanks.client.users.model.friends.incoming.FriendsIncomingModelBase;
import projects.tanks.client.users.model.friends.incoming.IFriendsIncomingModelBase;
import projects.tanks.clients.fp10.libraries.tanksservices.model.IFriends;
import projects.tanks.clients.fp10.libraries.tanksservices.model.friends.FriendState;
import projects.tanks.clients.fp10.libraries.tanksservices.service.friend.IFriendInfoService;
[ModelInfo]
public class FriendsIncomingModel extends FriendsIncomingModelBase implements IFriendsIncomingModelBase, ObjectLoadListener {
[Inject]
public static var friendsInfoService:IFriendInfoService;
public function FriendsIncomingModel() {
super();
}
public function objectLoaded() : void {
var local1:UserContainerCC = null;
var local2:Long = null;
if(IFriends(object.adapt(IFriends)).isLocal()) {
local1 = getInitParam();
for each(local2 in local1.users) {
friendsInfoService.setFriendState(local2,FriendState.INCOMING);
}
}
}
public function onAdding(param1:Long) : void {
if(IFriends(object.adapt(IFriends)).isLocal()) {
friendsInfoService.setFriendState(param1,FriendState.INCOMING);
}
}
public function onRemoved(param1:Long) : void {
if(IFriends(object.adapt(IFriends)).isLocal()) {
friendsInfoService.deleteFriend(param1,FriendState.INCOMING);
}
}
}
}
|
package alternativa.network.handler
{
import alternativa.debug.IDebugCommandProvider;
import alternativa.init.Main;
import alternativa.model.IModel;
import alternativa.network.AlternativaNetworkClient;
import alternativa.network.ICommandHandler;
import alternativa.network.ICommandSender;
import alternativa.network.command.ControlCommand;
import alternativa.network.command.SpaceCommand;
import alternativa.osgi.service.alert.IAlertService;
import alternativa.osgi.service.console.IConsoleService;
import alternativa.osgi.service.loader.ILoaderService;
import alternativa.osgi.service.log.ILogService;
import alternativa.osgi.service.log.LogLevel;
import alternativa.osgi.service.network.INetworkListener;
import alternativa.osgi.service.network.INetworkService;
import alternativa.osgi.service.storage.IStorageService;
import alternativa.protocol.Protocol;
import alternativa.protocol.codec.ICodec;
import alternativa.protocol.codec.NullMap;
import alternativa.register.ClassInfo;
import alternativa.register.ClientClass;
import alternativa.register.SpaceInfo;
import alternativa.resource.BatchLoaderManager;
import alternativa.resource.BatchResourceLoader;
import alternativa.resource.IResource;
import alternativa.resource.ResourceInfo;
import alternativa.service.DummyLogService;
import alternativa.service.IClassService;
import alternativa.service.IModelService;
import alternativa.service.IProtocolService;
import alternativa.service.IResourceService;
import alternativa.service.ISpaceService;
import flash.events.TimerEvent;
import flash.net.SharedObject;
import flash.utils.ByteArray;
import flash.utils.IDataInput;
import flash.utils.Timer;
public class ControlCommandHandler implements ICommandHandler, INetworkService
{
private var sender:ICommandSender;
private var hashCode:ByteArray;
private var _modelRegister:IModelService;
private var _resourceRegister:IResourceService;
private var _spaceRegister:ISpaceService;
private var spaceClient:AlternativaNetworkClient;
private var batchLoaderManager:BatchLoaderManager;
private var _server:String;
private var _port:int;
private var _proxyHost:String;
private var _proxyPort:int;
private var connected:Boolean = false;
private var _ports:Array;
private var _resourcesPath:String;
private var listeners:Vector.<INetworkListener>;
private var closed:Boolean = false;
private const pingDelay:int = 60000;
private var pingTimer:Timer;
public function ControlCommandHandler(_server:String)
{
super();
this.listeners = new Vector.<INetworkListener>();
this._server = _server;
this._resourceRegister = IResourceService(Main.osgi.getService(IResourceService));
this._modelRegister = IModelService(Main.osgi.getService(IModelService));
this._spaceRegister = ISpaceService(Main.osgi.getService(ISpaceService));
var spaceProtocol:Protocol = new Protocol(Main.codecFactory,SpaceCommand);
this.spaceClient = new AlternativaNetworkClient(_server,spaceProtocol);
var networkService:INetworkService = Main.osgi.getService(INetworkService) as INetworkService;
_server = networkService.server;
this._ports = networkService.ports;
this._proxyHost = networkService.proxyHost;
this._proxyPort = networkService.proxyPort;
this._resourcesPath = networkService.resourcesPath;
Main.osgi.unregisterService(INetworkService);
Main.osgi.registerService(INetworkService,this);
}
public function open() : void
{
IConsoleService(Main.osgi.getService(IConsoleService)).writeToConsoleChannel("CONTROLCMD","socket open");
this.connected = true;
var loaderService:ILoaderService = Main.osgi.getService(ILoaderService) as ILoaderService;
loaderService.loadingProgress.setProgress(0,1);
loaderService.loadingProgress.stopProgress(0);
var ports:Array = INetworkService(Main.osgi.getService(INetworkService)).ports;
this.port = ports[Main.currentPortIndex];
var storage:SharedObject = IStorageService(Main.osgi.getService(IStorageService)).getStorage();
storage.data.port = this._port;
IConsoleService(Main.osgi.getService(IConsoleService)).writeToConsole("ControlCommandHandler socket opened");
for(var i:int = 0; i < this.listeners.length; i++)
{
INetworkListener(this.listeners[i]).connect();
}
this.sender.sendCommand(new ControlCommand(ControlCommand.HASH_REQUEST,"hashRequest",new Array()),false);
this.pingTimer = new Timer(this.pingDelay,int.MAX_VALUE);
this.pingTimer.addEventListener(TimerEvent.TIMER,this.ping);
this.pingTimer.start();
}
private function ping(e:TimerEvent) : void
{
this.sender.sendCommand(new ControlCommand(ControlCommand.LOG,"log",[LogLevel.LOG_INFO,"ping"]));
}
public function close() : void
{
IConsoleService(Main.osgi.getService(IConsoleService)).writeToConsoleChannel("CONTROLCMD","socket closed");
this.pingTimer.stop();
this.pingTimer.removeEventListener(TimerEvent.TIMER,this.ping);
this.pingTimer = null;
this.registerDummyLogService();
for(var i:int = 0; i < this.listeners.length; i++)
{
INetworkListener(this.listeners[i]).disconnect();
}
var alertService:IAlertService = Main.osgi.getService(IAlertService) as IAlertService;
alertService.showAlert("Connection to server " + this._server + " closed");
this.closed = true;
}
public function disconnect(errorMessage:String) : void
{
var alertService:IAlertService = null;
IConsoleService(Main.osgi.getService(IConsoleService)).writeToConsoleChannel("CONTROLCMD","socket disconnect");
this.registerDummyLogService();
if(!this.connected)
{
Main.tryNextPort();
}
else if(!this.closed)
{
alertService = Main.osgi.getService(IAlertService) as IAlertService;
alertService.showAlert("Connection to server " + this._server + " failed. ERROR: " + errorMessage);
}
}
private function registerDummyLogService() : void
{
Main.osgi.unregisterService(ILogService);
Main.osgi.registerService(ILogService,new DummyLogService());
}
public function executeCommand(commandsList:Object) : void
{
var command:Object = null;
var controlCommand:ControlCommand = null;
var handler:ICommandHandler = null;
var spaceSocket:ICommandSender = null;
var info:SpaceInfo = null;
var batchId:int = 0;
var resources:Array = null;
var request:String = null;
var type:int = 0;
Main.writeToConsole("ControlCommandHandler executeCommand");
var commands:Array = commandsList as Array;
var len:int = commands.length;
for(var i:int = 0; i < len; i++)
{
command = commands[i];
if(command is ByteArray)
{
if(this.hashCode == null)
{
this.hashCode = command as ByteArray;
this.hashCode.position = 0;
Main.writeToConsole("Hash принят (" + this.hashCode.bytesAvailable + " bytes)",204);
this.sender.sendCommand(new ControlCommand(ControlCommand.HASH_ACCEPT,"hashAccepted",new Array()),false);
}
}
else if(command is ControlCommand)
{
controlCommand = ControlCommand(command);
Main.writeToConsole(" id: " + controlCommand.id);
Main.writeToConsole(" name: " + controlCommand.name);
Main.writeToConsole(" params: " + controlCommand.params);
switch(controlCommand.id)
{
case ControlCommand.OPEN_SPACE:
handler = new SpaceCommandHandler(this.hashCode);
spaceSocket = ICommandSender(this.spaceClient.newConnection(this._port,handler));
info = new SpaceInfo(handler,spaceSocket,SpaceCommandHandler(handler).objectRegister);
ISpaceService(Main.osgi.getService(ISpaceService)).addSpace(info);
continue;
case ControlCommand.LOAD_RESOURCES:
batchId = int(controlCommand.params[0]);
resources = controlCommand.params[1] as Array;
this.dumpResourcesToConsole(batchId,resources);
this.batchLoaderManager.addLoader(new BatchResourceLoader(batchId,resources));
continue;
case ControlCommand.UNLOAD_CLASSES_AND_RESOURCES:
this.unloadClasses(controlCommand.params[0] as Array);
this.unloadResources(controlCommand.params[1] as Array);
continue;
case ControlCommand.COMMAND_REQUEST:
request = String(controlCommand.params[0]);
this.sender.sendCommand(new ControlCommand(ControlCommand.COMMAND_RESPONCE,"commandResponce",[IDebugCommandProvider(Main.debug).executeCommand(request)]));
continue;
case ControlCommand.SERVER_MESSAGE:
type = int(controlCommand.params[0]);
Main.debug.showServerMessageWindow(String(controlCommand.params[1]));
continue;
case ControlCommand.LOAD_CLASSES:
this.loadClasses(controlCommand);
}
}
}
}
public function set port(value:int) : void
{
this._port = value;
}
public function get commandSender() : ICommandSender
{
return this.sender;
}
public function set commandSender(sender:ICommandSender) : void
{
Main.writeToConsole("ControlCommandHandler set sender: " + sender);
this.sender = sender;
this.batchLoaderManager = new BatchLoaderManager(2,sender);
}
public function addEventListener(listener:INetworkListener) : void
{
var index:int = this.listeners.indexOf(listener);
if(index == -1)
{
this.listeners.push(listener);
}
}
public function removeEventListener(listener:INetworkListener) : void
{
var index:int = this.listeners.indexOf(listener);
if(index != -1)
{
this.listeners.splice(index,1);
}
}
public function get server() : String
{
return this._server;
}
public function get ports() : Array
{
return this._ports;
}
public function get resourcesPath() : String
{
return this._resourcesPath;
}
public function get proxyHost() : String
{
return this._proxyHost;
}
public function get proxyPort() : int
{
return this._proxyPort;
}
private function unloadClasses(id:Array) : void
{
var classRegister:IClassService = null;
var length:uint = id.length;
for(var i:uint = 0; i < length; i++)
{
classRegister = IClassService(Main.osgi.getService(IClassService));
classRegister.destroyClass(id[i]);
}
}
private function unloadResources(resources:Array) : void
{
var resource:IResource = null;
var resourceRegister:IResourceService = null;
var length:uint = resources.length;
for(var i:uint = 0; i < length; i++)
{
resourceRegister = IResourceService(Main.osgi.getService(IResourceService));
resource = resourceRegister.getResource(ResourceInfo(resources[i]).id);
resource.unload();
resourceRegister.unregisterResource(ResourceInfo(resources[i]).id);
}
}
private function dumpResourcesToConsole(batchId:int, resources:Array) : void
{
var len:int = 0;
var j:int = 0;
Main.writeVarsToConsole("\n[ControlCommandHandler.executeCommand] LOAD [%1]",batchId);
for(var i:int = 0; i < resources.length; i++)
{
len = (resources[i] as Array).length;
for(j = 0; j < len; j++)
{
Main.writeToConsole("[ControlCommandHandler.executeCommand] load resource id: " + ResourceInfo(resources[i][j]).id);
}
}
}
private function loadClasses(controlCommand:ControlCommand) : void
{
var logger:ILogService = null;
var classInfo:ClassInfo = null;
logger = null;
classInfo = null;
var classRegister:IClassService = null;
var clientClass:ClientClass = null;
var models:Vector.<String> = null;
var numModels:int = 0;
var m:int = 0;
var modelId:String = null;
var model:IModel = null;
var paramsCodec:ICodec = null;
var map:NullMap = null;
var mapString:String = null;
var modelParams:Object = null;
var processId:int = int(controlCommand.params[0]);
var classInfoArray:Array = controlCommand.params[1] as Array;
Main.writeVarsToConsoleChannel("LOAD CLASSES","ControlCommandHandler LOAD_CLASSES");
var reader:IDataInput = IDataInput(controlCommand.params[2]);
var nullMap:NullMap = NullMap(controlCommand.params[3]);
logger = Main.osgi.getService(ILogService) as ILogService;
for(var c:int = 0; c < classInfoArray.length; c++)
{
classInfo = ClassInfo(classInfoArray[c]);
Main.writeVarsToConsoleChannel("LOAD CLASSES"," class id: " + classInfo.id);
classRegister = IClassService(Main.osgi.getService(IClassService));
if(classInfo.modelsToAdd != null)
{
Main.writeVarsToConsoleChannel("LOAD CLASSES"," modelsToAdd: " + classInfo.modelsToAdd);
}
if(classInfo.modelsToRemove != null)
{
Main.writeVarsToConsoleChannel("LOAD CLASSES"," modelsToRemove: " + classInfo.modelsToRemove);
}
models = clientClass.models;
Main.writeVarsToConsoleChannel("LOAD CLASSES"," models: " + models);
numModels = models.length;
for(m = 0; m < numModels; m++)
{
modelId = models[m];
model = this._modelRegister.getModel(modelId);
paramsCodec = IProtocolService(Main.osgi.getService(IProtocolService)).codecFactory.getCodec(this._modelRegister.getModelsParamsStruct(modelId));
if(paramsCodec != null)
{
try
{
Main.writeVarsToConsoleChannel("LOAD CLASSES","decode modelParams");
map = nullMap.clone();
mapString = "";
while(map.hasNextBit())
{
mapString += !!map.getNextBit() ? "1" : "0";
}
Main.writeVarsToConsoleChannel("LOAD CLASSES"," nullMap: " + mapString);
Main.writeVarsToConsoleChannel("LOAD CLASSES"," ");
modelParams = paramsCodec.decode(reader,nullMap,false);
}
catch(e:Error)
{
logger.log(LogLevel.LOG_ERROR,"[ControlCommandHandler.executeCommand] Error on model params decoding: " + e.toString() + " " + e.getStackTrace());
Main.writeVarsToConsoleChannel("LOAD CLASSES","Error on model params decoding. classInfo.name: " + classInfo.name + "\n" + e.toString());
}
if(modelParams != null)
{
Main.writeVarsToConsoleChannel("LOAD CLASSES"," model " + modelId + " params: " + modelParams);
clientClass.setModelParams(modelId,modelParams);
}
}
}
Main.writeToConsole(clientClass.toString());
}
this.sender.sendCommand(new ControlCommand(ControlCommand.CLASSES_LOADED,"classesLoaded",[processId]));
}
}
}
|
package alternativa.tanks.help {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.locale.ILocaleService;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.helper.HelperAlign;
public class ButtonBarHelper extends PanelBubbleHelper {
public function ButtonBarHelper(param1:Number, param2:Number, param3:Number, param4:Boolean, param5:Boolean) {
super(param1,param2,param3);
var local6:ILocaleService = ILocaleService(OSGi.getInstance().getService(ILocaleService));
var local7:String = local6.getText(param4 ? TanksLocale.TEXT_PARTNER_HELP_PANEL_BUTTON_BAR_HELPER_TEXT : TanksLocale.TEXT_HELP_PANEL_BUTTON_BAR_HELPER_TEXT);
if(param5) {
local7 += local6.getText(TanksLocale.TEXT_HELP_PANEL_BUTTON_BAR_FULLSCREEN_TEXT);
}
text = local7;
arrowLehgth = int(local6.getText(TanksLocale.TEXT_HELP_PANEL_BUTTON_BAR_HELPER_ARROW_LENGTH));
arrowAlign = HelperAlign.TOP_RIGHT;
}
}
}
|
package _codec.projects.tanks.client.panel.model.socialnetwork {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.socialnetwork.SocialNetworkPanelParams;
public class CodecSocialNetworkPanelParams implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_authorizationUrl:ICodec;
private var codec_enabled:ICodec;
private var codec_linkExists:ICodec;
private var codec_snId:ICodec;
public function CodecSocialNetworkPanelParams() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_authorizationUrl = param1.getCodec(new TypeCodecInfo(String,true));
this.codec_enabled = param1.getCodec(new TypeCodecInfo(Boolean,true));
this.codec_linkExists = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_snId = param1.getCodec(new TypeCodecInfo(String,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:SocialNetworkPanelParams = new SocialNetworkPanelParams();
local2.authorizationUrl = this.codec_authorizationUrl.decode(param1) as String;
local2.enabled = this.codec_enabled.decode(param1) as Boolean;
local2.linkExists = this.codec_linkExists.decode(param1) as Boolean;
local2.snId = this.codec_snId.decode(param1) as String;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:SocialNetworkPanelParams = SocialNetworkPanelParams(param2);
this.codec_authorizationUrl.encode(param1,local3.authorizationUrl);
this.codec_enabled.encode(param1,local3.enabled);
this.codec_linkExists.encode(param1,local3.linkExists);
this.codec_snId.encode(param1,local3.snId);
}
}
}
|
package projects.tanks.client.battlefield.models.effects.effectlevel {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class EffectLevelModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:EffectLevelModelServer;
private var client:IEffectLevelModelBase = IEffectLevelModelBase(this);
private var modelId:Long = Long.getLong(735266884,-238307683);
public function EffectLevelModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new EffectLevelModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(EffectLevelCC,false)));
}
protected function getInitParam() : EffectLevelCC {
return EffectLevelCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package com.lorentz.SVG.utils
{
public class TextUtils
{
public static const SUPERSCRIPT_OFFSET:Number = 0.33;
public static const SUBSCRIPT_OFFSET:Number = 0.2;
public static function getParagraphDirection(text:String):String {
for(var i:int = text.length - 1; i >=0; i--){
var type:String = getBidiCharacterType(text.charAt(i));
if(type){
switch(type){
case "L" :
return "lr";
case "R" :
case "AL" :
return "rl";
}
}
}
return null;
}
private static function getBidiCharacterType(char:String):String{
var bidiCharacterTypes:Array = [
{ type: "L", ranges: LRanges },
{ type: "R", ranges: RRanges },
{ type: "AL", ranges: ALRanges }
];
var code:int = char.charCodeAt(0);
for each(var characterType:Object in bidiCharacterTypes){
for each(var range:Array in characterType.ranges){
if(range.length == 1)
{
if(code == range[0])
return characterType.type;
} else {
if(code >= range[0] && code <= range[1])
return characterType.type;
}
}
}
return null;
}
private static var LRanges:Array = [
[0x0041, 0x005A],
[0x0061, 0x007A],
[0x00AA],
[0x00B5],
[0x00BA],
[0x00C0, 0x00D6],
[0x00D8, 0x00F6],
[0x00F8, 0x01BA],
[0x01BB],
[0x01BC, 0x01BF],
[0x01C0, 0x01C3],
[0x01C4, 0x0293],
[0x0294],
[0x0295, 0x02AF],
[0x02B0, 0x02B8],
[0x02BB, 0x02C1],
[0x02D0, 0x02D1],
[0x02E0, 0x02E4],
[0x02EE],
[0x0370, 0x0373],
[0x0376, 0x0377],
[0x037A],
[0x037B, 0x037D],
[0x0386],
[0x0388, 0x038A],
[0x038C],
[0x038E, 0x03A1],
[0x03A3, 0x03F5],
[0x03F7, 0x0481],
[0x0482],
[0x048A, 0x0527],
[0x0531, 0x0556],
[0x0559],
[0x055A, 0x055F],
[0x0561, 0x0587],
[0x0589],
[0x0903],
[0x0904, 0x0939],
[0x093B],
[0x093D],
[0x093E, 0x0940],
[0x0949, 0x094C],
[0x094E, 0x094F],
[0x0950],
[0x0958, 0x0961],
[0x0964, 0x0965],
[0x0966, 0x096F],
[0x0970],
[0x0971],
[0x0972, 0x0977],
[0x0979, 0x097F],
[0x0982, 0x0983],
[0x0985, 0x098C],
[0x098F, 0x0990],
[0x0993, 0x09A8],
[0x09AA, 0x09B0],
[0x09B2],
[0x09B6, 0x09B9],
[0x09BD],
[0x09BE, 0x09C0],
[0x09C7, 0x09C8],
[0x09CB, 0x09CC],
[0x09CE],
[0x09D7],
[0x09DC, 0x09DD],
[0x09DF, 0x09E1],
[0x09E6, 0x09EF],
[0x09F0, 0x09F1],
[0x09F4, 0x09F9],
[0x09FA],
[0x0A03],
[0x0A05, 0x0A0A],
[0x0A0F, 0x0A10],
[0x0A13, 0x0A28],
[0x0A2A, 0x0A30],
[0x0A32, 0x0A33],
[0x0A35, 0x0A36],
[0x0A38, 0x0A39],
[0x0A3E, 0x0A40],
[0x0A59, 0x0A5C],
[0x0A5E],
[0x0A66, 0x0A6F],
[0x0A72, 0x0A74],
[0x0A83],
[0x0A85, 0x0A8D],
[0x0A8F, 0x0A91],
[0x0A93, 0x0AA8],
[0x0AAA, 0x0AB0],
[0x0AB2, 0x0AB3],
[0x0AB5, 0x0AB9],
[0x0ABD],
[0x0ABE, 0x0AC0],
[0x0AC9],
[0x0ACB, 0x0ACC],
[0x0AD0],
[0x0AE0, 0x0AE1],
[0x0AE6, 0x0AEF],
[0x0B02, 0x0B03],
[0x0B05, 0x0B0C],
[0x0B0F, 0x0B10],
[0x0B13, 0x0B28],
[0x0B2A, 0x0B30],
[0x0B32, 0x0B33],
[0x0B35, 0x0B39],
[0x0B3D],
[0x0B3E],
[0x0B40],
[0x0B47, 0x0B48],
[0x0B4B, 0x0B4C],
[0x0B57],
[0x0B5C, 0x0B5D],
[0x0B5F, 0x0B61],
[0x0B66, 0x0B6F],
[0x0B70],
[0x0B71],
[0x0B72, 0x0B77],
[0x0B83],
[0x0B85, 0x0B8A],
[0x0B8E, 0x0B90],
[0x0B92, 0x0B95],
[0x0B99, 0x0B9A],
[0x0B9C],
[0x0B9E, 0x0B9F],
[0x0BA3, 0x0BA4],
[0x0BA8, 0x0BAA],
[0x0BAE, 0x0BB9],
[0x0BBE, 0x0BBF],
[0x0BC1, 0x0BC2],
[0x0BC6, 0x0BC8],
[0x0BCA, 0x0BCC],
[0x0BD0],
[0x0BD7],
[0x0BE6, 0x0BEF],
[0x0BF0, 0x0BF2],
[0x0C01, 0x0C03],
[0x0C05, 0x0C0C],
[0x0C0E, 0x0C10],
[0x0C12, 0x0C28],
[0x0C2A, 0x0C33],
[0x0C35, 0x0C39],
[0x0C3D],
[0x0C41, 0x0C44],
[0x0C58, 0x0C59],
[0x0C60, 0x0C61],
[0x0C66, 0x0C6F],
[0x0C7F],
[0x0C82, 0x0C83],
[0x0C85, 0x0C8C],
[0x0C8E, 0x0C90],
[0x0C92, 0x0CA8],
[0x0CAA, 0x0CB3],
[0x0CB5, 0x0CB9],
[0x0CBD],
[0x0CBE],
[0x0CBF],
[0x0CC0, 0x0CC4],
[0x0CC6],
[0x0CC7, 0x0CC8],
[0x0CCA, 0x0CCB],
[0x0CD5, 0x0CD6],
[0x0CDE],
[0x0CE0, 0x0CE1],
[0x0CE6, 0x0CEF],
[0x0CF1, 0x0CF2],
[0x0D02, 0x0D03],
[0x0D05, 0x0D0C],
[0x0D0E, 0x0D10],
[0x0D12, 0x0D3A],
[0x0D3D],
[0x0D3E, 0x0D40],
[0x0D46, 0x0D48],
[0x0D4A, 0x0D4C],
[0x0D4E],
[0x0D57],
[0x0D60, 0x0D61],
[0x0D66, 0x0D6F],
[0x0D70, 0x0D75],
[0x0D79],
[0x0D7A, 0x0D7F],
[0x0D82, 0x0D83],
[0x0D85, 0x0D96],
[0x0D9A, 0x0DB1],
[0x0DB3, 0x0DBB],
[0x0DBD],
[0x0DC0, 0x0DC6],
[0x0DCF, 0x0DD1],
[0x0DD8, 0x0DDF],
[0x0DF2, 0x0DF3],
[0x0DF4],
[0x0E01, 0x0E30],
[0x0E32, 0x0E33],
[0x0E40, 0x0E45],
[0x0E46],
[0x0E4F],
[0x0E50, 0x0E59],
[0x0E5A, 0x0E5B],
[0x0E81, 0x0E82],
[0x0E84],
[0x0E87, 0x0E88],
[0x0E8A],
[0x0E8D],
[0x0E94, 0x0E97],
[0x0E99, 0x0E9F],
[0x0EA1, 0x0EA3],
[0x0EA5],
[0x0EA7],
[0x0EAA, 0x0EAB],
[0x0EAD, 0x0EB0],
[0x0EB2, 0x0EB3],
[0x0EBD],
[0x0EC0, 0x0EC4],
[0x0EC6],
[0x0ED0, 0x0ED9],
[0x0EDC, 0x0EDD],
[0x0F00],
[0x0F01, 0x0F03],
[0x0F04, 0x0F12],
[0x0F13, 0x0F17],
[0x0F1A, 0x0F1F],
[0x0F20, 0x0F29],
[0x0F2A, 0x0F33],
[0x0F34],
[0x0F36],
[0x0F38],
[0x0F3E, 0x0F3F],
[0x0F40, 0x0F47],
[0x0F49, 0x0F6C],
[0x0F7F],
[0x0F85],
[0x0F88, 0x0F8C],
[0x0FBE, 0x0FC5],
[0x0FC7, 0x0FCC],
[0x0FCE, 0x0FCF],
[0x0FD0, 0x0FD4],
[0x0FD5, 0x0FD8],
[0x0FD9, 0x0FDA],
[0x1000, 0x102A],
[0x102B, 0x102C],
[0x1031],
[0x1038],
[0x103B, 0x103C],
[0x103F],
[0x1040, 0x1049],
[0x104A, 0x104F],
[0x1050, 0x1055],
[0x1056, 0x1057],
[0x105A, 0x105D],
[0x1061],
[0x1062, 0x1064],
[0x1065, 0x1066],
[0x1067, 0x106D],
[0x106E, 0x1070],
[0x1075, 0x1081],
[0x1083, 0x1084],
[0x1087, 0x108C],
[0x108E],
[0x108F],
[0x1090, 0x1099],
[0x109A, 0x109C],
[0x109E, 0x109F],
[0x10A0, 0x10C5],
[0x10D0, 0x10FA],
[0x10FB],
[0x10FC],
[0x1100, 0x1248],
[0x124A, 0x124D],
[0x1250, 0x1256],
[0x1258],
[0x125A, 0x125D],
[0x1260, 0x1288],
[0x128A, 0x128D],
[0x1290, 0x12B0],
[0x12B2, 0x12B5],
[0x12B8, 0x12BE],
[0x12C0],
[0x12C2, 0x12C5],
[0x12C8, 0x12D6],
[0x12D8, 0x1310],
[0x1312, 0x1315],
[0x1318, 0x135A],
[0x1360],
[0x1361, 0x1368],
[0x1369, 0x137C],
[0x1380, 0x138F],
[0x13A0, 0x13F4],
[0x1401, 0x166C],
[0x166D, 0x166E],
[0x166F, 0x167F],
[0x1681, 0x169A],
[0x16A0, 0x16EA],
[0x16EB, 0x16ED],
[0x16EE, 0x16F0],
[0x1700, 0x170C],
[0x170E, 0x1711],
[0x1720, 0x1731],
[0x1735, 0x1736],
[0x1740, 0x1751],
[0x1760, 0x176C],
[0x176E, 0x1770],
[0x1780, 0x17B3],
[0x17B4, 0x17B5],
[0x17B6],
[0x17BE, 0x17C5],
[0x17C7, 0x17C8],
[0x17D4, 0x17D6],
[0x17D7],
[0x17D8, 0x17DA],
[0x17DC],
[0x17E0, 0x17E9],
[0x1810, 0x1819],
[0x1820, 0x1842],
[0x1843],
[0x1844, 0x1877],
[0x1880, 0x18A8],
[0x18AA],
[0x18B0, 0x18F5],
[0x1900, 0x191C],
[0x1923, 0x1926],
[0x1929, 0x192B],
[0x1930, 0x1931],
[0x1933, 0x1938],
[0x1946, 0x194F],
[0x1950, 0x196D],
[0x1970, 0x1974],
[0x1980, 0x19AB],
[0x19B0, 0x19C0],
[0x19C1, 0x19C7],
[0x19C8, 0x19C9],
[0x19D0, 0x19D9],
[0x19DA],
[0x1A00, 0x1A16],
[0x1A19, 0x1A1B],
[0x1A1E, 0x1A1F],
[0x1A20, 0x1A54],
[0x1A55],
[0x1A57],
[0x1A61],
[0x1A63, 0x1A64],
[0x1A6D, 0x1A72],
[0x1A80, 0x1A89],
[0x1A90, 0x1A99],
[0x1AA0, 0x1AA6],
[0x1AA7],
[0x1AA8, 0x1AAD],
[0x1B04],
[0x1B05, 0x1B33],
[0x1B35],
[0x1B3B],
[0x1B3D, 0x1B41],
[0x1B43, 0x1B44],
[0x1B45, 0x1B4B],
[0x1B50, 0x1B59],
[0x1B5A, 0x1B60],
[0x1B61, 0x1B6A],
[0x1B74, 0x1B7C],
[0x1B82],
[0x1B83, 0x1BA0],
[0x1BA1],
[0x1BA6, 0x1BA7],
[0x1BAA],
[0x1BAE, 0x1BAF],
[0x1BB0, 0x1BB9],
[0x1BC0, 0x1BE5],
[0x1BE7],
[0x1BEA, 0x1BEC],
[0x1BEE],
[0x1BF2, 0x1BF3],
[0x1BFC, 0x1BFF],
[0x1C00, 0x1C23],
[0x1C24, 0x1C2B],
[0x1C34, 0x1C35],
[0x1C3B, 0x1C3F],
[0x1C40, 0x1C49],
[0x1C4D, 0x1C4F],
[0x1C50, 0x1C59],
[0x1C5A, 0x1C77],
[0x1C78, 0x1C7D],
[0x1C7E, 0x1C7F],
[0x1CD3],
[0x1CE1],
[0x1CE9, 0x1CEC],
[0x1CEE, 0x1CF1],
[0x1CF2],
[0x1D00, 0x1D2B],
[0x1D2C, 0x1D61],
[0x1D62, 0x1D77],
[0x1D78],
[0x1D79, 0x1D9A],
[0x1D9B, 0x1DBF],
[0x1E00, 0x1F15],
[0x1F18, 0x1F1D],
[0x1F20, 0x1F45],
[0x1F48, 0x1F4D],
[0x1F50, 0x1F57],
[0x1F59],
[0x1F5B],
[0x1F5D],
[0x1F5F, 0x1F7D],
[0x1F80, 0x1FB4],
[0x1FB6, 0x1FBC],
[0x1FBE],
[0x1FC2, 0x1FC4],
[0x1FC6, 0x1FCC],
[0x1FD0, 0x1FD3],
[0x1FD6, 0x1FDB],
[0x1FE0, 0x1FEC],
[0x1FF2, 0x1FF4A],
[0x1FF6, 0x1FFC],
[0x200E],
[0x2071],
[0x207F],
[0x2090, 0x209C],
[0x2102],
[0x2107],
[0x210A, 0x2113],
[0x2115],
[0x2119, 0x211D],
[0x2124],
[0x2126],
[0x2128],
[0x212A, 0x212D],
[0x212F, 0x2134],
[0x2135, 0x2138],
[0x2139],
[0x213C, 0x213F],
[0x2145, 0x2149],
[0x214E],
[0x214F],
[0x2160, 0x2182],
[0x2183, 0x2184],
[0x2185, 0x2188],
[0x2336, 0x237A],
[0x2395],
[0x249C, 0x24E9],
[0x26AC],
[0x2800, 0x28FF],
[0x2C00, 0x2C2E],
[0x2C30, 0x2C5E],
[0x2C60, 0x2C7C],
[0x2C7D],
[0x2C7E, 0x2CE4],
[0x2CEB, 0x2CEE],
[0x2D00, 0x2D25],
[0x2D30, 0x2D65],
[0x2D6F],
[0x2D70],
[0x2D80, 0x2D96],
[0x2DA0, 0x2DA6],
[0x2DA8, 0x2DAE],
[0x2DB0, 0x2DB6],
[0x2DB8, 0x2DBE],
[0x2DC0, 0x2DC6],
[0x2DC8, 0x2DCE],
[0x2DD0, 0x2DD6],
[0x2DD8, 0x2DDE],
[0x3005],
[0x3006],
[0x3007],
[0x3021, 0x3029],
[0x3031, 0x3035],
[0x3038, 0x303A],
[0x303B],
[0x303C],
[0x3041, 0x3096],
[0x309D, 0x309E],
[0x309F],
[0x30A1, 0x30FA],
[0x30FC, 0x30FE],
[0x30FF],
[0x3105, 0x312D],
[0x3131, 0x318E],
[0x3190, 0x3191],
[0x3192, 0x3195],
[0x3196, 0x319F],
[0x31A0, 0x31BA],
[0x31F0, 0x31FF],
[0x3200, 0x321C],
[0x3220, 0x3229],
[0x322A, 0x324F],
[0x3260, 0x327B],
[0x327F],
[0x3280, 0x3289],
[0x328A, 0x32B0],
[0x32C0, 0x32CB],
[0x32D0, 0x32FE],
[0x3300, 0x3376],
[0x337B, 0x33DD],
[0x33E0, 0x33FE],
[0x3400, 0x4DB5],
[0x4E00, 0x9FCB],
[0xA000, 0xA014],
[0xA015],
[0xA016, 0xA48C],
[0xA4D0, 0xA4F7],
[0xA4F8, 0xA4FD],
[0xA4FE, 0xA4FF],
[0xA500, 0xA60B],
[0xA60C],
[0xA610, 0xA61F],
[0xA620, 0xA629],
[0xA62A, 0xA62B],
[0xA640, 0xA66D],
[0xA66E],
[0xA680, 0xA697],
[0xA6A0, 0xA6E5],
[0xA6E6, 0xA6EF],
[0xA6F2, 0xA6F7],
[0xA722, 0xA76F],
[0xA770],
[0xA771, 0xA787],
[0xA789, 0xA78A],
[0xA78B, 0xA78E],
[0xA790, 0xA791],
[0xA7A0, 0xA7A9],
[0xA7FA],
[0xA7FB, 0xA801],
[0xA803, 0xA805],
[0xA807, 0xA80A],
[0xA80C, 0xA822],
[0xA823, 0xA824],
[0xA827],
[0xA830, 0xA835],
[0xA836, 0xA837],
[0xA840, 0xA873],
[0xA880, 0xA881],
[0xA882, 0xA8B3],
[0xA8B4, 0xA8C3],
[0xA8CE, 0xA8CF],
[0xA8D0, 0xA8D9],
[0xA8F2, 0xA8F7],
[0xA8F8, 0xA8FA],
[0xA8FB],
[0xA900, 0xA909],
[0xA90A, 0xA925],
[0xA92E, 0xA92F],
[0xA930, 0xA946],
[0xA952, 0xA953],
[0xA95F],
[0xA960, 0xA97C],
[0xA983],
[0xA984, 0xA9B2],
[0xA9B4, 0xA9B5],
[0xA9BA, 0xA9BB],
[0xA9BD, 0xA9C0],
[0xA9C1, 0xA9CD],
[0xA9CF],
[0xA9D0, 0xA9D9],
[0xA9DE, 0xA9DF],
[0xAA00, 0xAA28],
[0xAA2F, 0xAA30],
[0xAA33, 0xAA34],
[0xAA40, 0xAA42],
[0xAA44, 0xAA4B],
[0xAA4D],
[0xAA50, 0xAA59],
[0xAA5C, 0xAA5F],
[0xAA60, 0xAA6F],
[0xAA70],
[0xAA71, 0xAA76],
[0xAA77, 0xAA79],
[0xAA7A],
[0xAA7B],
[0xAA80, 0xAAAF],
[0xAAB1],
[0xAAB5, 0xAAB6],
[0xAAB9, 0xAABD],
[0xAAC0],
[0xAAC2],
[0xAADB, 0xAADC],
[0xAADD],
[0xAADE, 0xAADF],
[0xAB01, 0xAB06],
[0xAB09, 0xAB0E],
[0xAB11, 0xAB16],
[0xAB20, 0xAB26],
[0xAB28, 0xAB2E],
[0xABC0, 0xABE2],
[0xABE3, 0xABE4],
[0xABE6, 0xABE7],
[0xABE9, 0xABEA],
[0xABEB],
[0xABEC],
[0xABF0, 0xABF9],
[0xAC00, 0xD7A3],
[0xD7B0, 0xD7C6],
[0xD7CB, 0xD7FB],
[0xE000, 0xF8FF],
[0xF900, 0xFA2D],
[0xFA30, 0xFA6D],
[0xFA70, 0xFAD9],
[0xFB00, 0xFB06],
[0xFB13, 0xFB17],
[0xFF21, 0xFF3A],
[0xFF41, 0xFF5A],
[0xFF66, 0xFF6F],
[0xFF70],
[0xFF71, 0xFF9D],
[0xFF9E, 0xFF9F],
[0xFFA0, 0xFFBE],
[0xFFC2, 0xFFC7],
[0xFFCA, 0xFFCF],
[0xFFD2, 0xFFD7],
[0xFFDA, 0xFFDC],
[0x10000, 0x1000B],
[0x1000D, 0x10026],
[0x10028, 0x1003A],
[0x1003C, 0x1003D],
[0x1003F, 0x1004D],
[0x10050, 0x1005D],
[0x10080, 0x100FA],
[0x10100],
[0x10102],
[0x10107, 0x10133],
[0x10137, 0x1013F],
[0x101D0, 0x101FC],
[0x10280, 0x1029C],
[0x102A0, 0x102D0],
[0x10300, 0x1031E],
[0x10320, 0x10323],
[0x10330, 0x10340],
[0x10341],
[0x10342, 0x10349],
[0x1034A],
[0x10380, 0x1039D],
[0x1039F],
[0x103A0, 0x103C3],
[0x103C8, 0x103CF],
[0x103D0],
[0x103D1, 0x103D5],
[0x10400, 0x1044F],
[0x10450, 0x1049D],
[0x104A0, 0x104A9],
[0x11000],
[0x11002],
[0x11003, 0x11037],
[0x11047, 0x1104D],
[0x11066, 0x1106F],
[0x11082],
[0x11083, 0x110AF],
[0x110B0, 0x110B2],
[0x110B7, 0x110B8],
[0x110BB, 0x110BC],
[0x110BD],
[0x110BE, 0x110C1],
[0x12000, 0x1236E],
[0x12400, 0x12462],
[0x12470, 0x12473],
[0x13000, 0x1342E],
[0x16800, 0x16A38],
[0x1B000, 0x1B001],
[0x1D000, 0x1D0F5],
[0x1D100, 0x1D126],
[0x1D129, 0x1D164],
[0x1D165, 0x1D166],
[0x1D16A, 0x1D16C],
[0x1D16D, 0x1D172],
[0x1D183, 0x1D184],
[0x1D18C, 0x1D1A9],
[0x1D1AE, 0x1D1DD],
[0x1D360, 0x1D371],
[0x1D400, 0x1D454],
[0x1D456, 0x1D49C],
[0x1D49E, 0x1D49F],
[0x1D4A2],
[0x1D4A5, 0x1D4A6],
[0x1D4A9, 0x1D4AC],
[0x1D4AE, 0x1D4B9],
[0x1D4BB],
[0x1D4BD, 0x1D4C3],
[0x1D4C5, 0x1D505],
[0x1D507, 0x1D50A],
[0x1D50D, 0x1D514],
[0x1D516, 0x1D51C],
[0x1D51E, 0x1D539],
[0x1D53B, 0x1D53E],
[0x1D540, 0x1D544],
[0x1D546],
[0x1D54A, 0x1D550],
[0x1D552, 0x1D6A5],
[0x1D6A8, 0x1D6C0],
[0x1D6C1],
[0x1D6C2, 0x1D6DA],
[0x1D6DC, 0x1D6FA],
[0x1D6FB],
[0x1D6FC, 0x1D714],
[0x1D716, 0x1D734],
[0x1D735],
[0x1D736, 0x1D74E],
[0x1D750, 0x1D76E],
[0x1D76F],
[0x1D770, 0x1D788],
[0x1D78A, 0x1D7A8],
[0x1D7A9],
[0x1D7AA, 0x1D7C2],
[0x1D7C4, 0x1D7CB],
[0x1F110, 0x1F12E],
[0x1F130, 0x1F169],
[0x1F170, 0x1F19A],
[0x1F1E6, 0x1F202],
[0x1F210, 0x1F23A],
[0x1F240, 0x1F248],
[0x1F250, 0x1F251],
[0x1F48C],
[0x1F524],
[0x20000, 0x2A6D6],
[0x2A700, 0x2B734],
[0x2B740, 0x2B81D],
[0x2F800, 0x2FA1D],
[0xF0000, 0xFFFFD],
[0x100000, 0x10FFFD],
];
private static var RRanges:Array = [
[0x0590],
[0x05BE],
[0x05C0],
[0x05C3],
[0x05C6],
[0x05C8, 0x05CF],
[0x05D0, 0x05EA],
[0x05EB, 0x05EF],
[0x05F0, 0x05F2],
[0x05F3, 0x05F4],
[0x05F5, 0x05FF],
[0x07C0, 0x07C9],
[0x07CA, 0x07EA],
[0x07F4, 0x07F5],
[0x07FA],
[0x07FB, 0x07FF],
[0x0800, 0x0815],
[0x081A],
[0x0824],
[0x0828],
[0x082E, 0x082F],
[0x0830, 0x083E],
[0x083F],
[0x0840, 0x0858],
[0x085C, 0x085D],
[0x085E],
[0x085F, 0x08FF],
[0x200F],
[0xFB1D],
[0xFB1F, 0xFB28],
[0xFB2A, 0xFB36],
[0xFB37],
[0xFB38, 0xFB3C],
[0xFB3D],
[0xFB3E],
[0xFB3F],
[0xFB40, 0xFB41],
[0xFB42],
[0xFB43, 0xFB44],
[0xFB45],
[0xFB46, 0xFB4F],
[0x10800, 0x10805],
[0x10806, 0x10807],
[0x10808],
[0x10809],
[0x1080A, 0x10835],
[0x10836],
[0x10837, 0x10838],
[0x10839, 0x1083B],
[0x1083C],
[0x1083D, 0x1083E],
[0x1083F, 0x10855],
[0x10856],
[0x10857],
[0x10858, 0x1085F],
[0x10860, 0x108FF],
[0x10900, 0x10915],
[0x10916, 0x1091B],
[0x1091C, 0x1091E],
[0x10920, 0x10939],
[0x1093A, 0x1093E],
[0x1093F],
[0x10940, 0x109FF],
[0x10A00],
[0x10A04],
[0x10A07, 0x10A0B],
[0x10A10, 0x10A13],
[0x10A14],
[0x10A15, 0x10A17],
[0x10A18],
[0x10A19, 0x10A33],
[0x10A34, 0x10A37],
[0x10A3B, 0x10A3E],
[0x10A40, 0x10A47],
[0x10A48, 0x10A4F],
[0x10A50, 0x10A58],
[0x10A59, 0x10A5F],
[0x10A60, 0x10A7C],
[0x10A7D, 0x10A7E],
[0x10A7F],
[0x10A80, 0x10AFF],
[0x10B00, 0x10B35],
[0x10B36, 0x10B38],
[0x10B40, 0x10B55],
[0x10B56, 0x10B57],
[0x10B58, 0x10B5F],
[0x10B60, 0x10B72],
[0x10B73, 0x10B77],
[0x10B78, 0x10B7F],
[0x10B80, 0x10BFF],
[0x10C00, 0x10C48],
[0x10C49, 0x10E5F],
[0x10E7F, 0x10FFF],
[0x1E800, 0x1EFFF]
];
private static var ALRanges:Array = [
[0x0604, 0x0605],
[0x0608],
[0x060B],
[0x060D],
[0x061B],
[0x061C, 0x061D],
[0x061E, 0x061F],
[0x0620, 0x063F],
[0x0640],
[0x0641, 0x064A],
[0x066D],
[0x066E, 0x066F],
[0x0671, 0x06D3],
[0x06D4],
[0x06D5],
[0x06E5, 0x06E6],
[0x06EE, 0x06EF],
[0x06FA, 0x06FC],
[0x06FD, 0x06FE],
[0x06FF],
[0x0700, 0x070D],
[0x070E],
[0x0710],
[0x0712, 0x072F],
[0x074B, 0x074C],
[0x074D, 0x07A5],
[0x07B1],
[0x07B2, 0x07BF],
[0xFB50, 0xFBB1],
[0xFBB2, 0xFBC1],
[0xFBC2, 0xFBD2],
[0xFBD3, 0xFD3D],
[0xFD40, 0xFD4F],
[0xFD50, 0xFD8F],
[0xFD90, 0xFD91],
[0xFD92, 0xFDC7],
[0xFDC8, 0xFDCF],
[0xFDF0, 0xFDFB],
[0xFDFC],
[0xFDFE, 0xFDFF],
[0xFE70, 0xFE74],
[0xFE75],
[0xFE76, 0xFEFC],
[0xFEFD, 0xFEFE]
];
}
} |
package alternativa.tanks.gui.friends.button.friends {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.friends.button.friends.RequestCountIndicator_leftIconClass.png")]
public class RequestCountIndicator_leftIconClass extends BitmapAsset {
public function RequestCountIndicator_leftIconClass() {
super();
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank15.png")]
public class DefaultRanksBitmaps_bitmapBigRank15 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapBigRank15() {
super();
}
}
}
|
package platform.client.core.general.pushnotification.osgi {
import _codec.platform.client.core.general.pushnotification.api.CodecNotificationClientPlatform;
import _codec.platform.client.core.general.pushnotification.api.VectorCodecNotificationClientPlatformLevel1;
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.EnumCodecInfo;
import platform.client.core.general.pushnotification.api.NotificationClientPlatform;
public class Activator implements IBundleActivator {
public static var osgi:OSGi;
public function Activator() {
super();
}
public function start(param1:OSGi) : void {
var local3:ICodec = null;
osgi = param1;
var local2:IProtocol = IProtocol(osgi.getService(IProtocol));
local3 = new CodecNotificationClientPlatform();
local2.registerCodec(new EnumCodecInfo(NotificationClientPlatform,false),local3);
local2.registerCodec(new EnumCodecInfo(NotificationClientPlatform,true),new OptionalCodecDecorator(local3));
local3 = new VectorCodecNotificationClientPlatformLevel1(false);
local2.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(NotificationClientPlatform,false),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(NotificationClientPlatform,false),true,1),new OptionalCodecDecorator(local3));
local3 = new VectorCodecNotificationClientPlatformLevel1(true);
local2.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(NotificationClientPlatform,true),false,1),local3);
local2.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(NotificationClientPlatform,true),true,1),new OptionalCodecDecorator(local3));
}
public function stop(param1:OSGi) : void {
}
}
}
|
package platform.client.models.commons.periodtime {
public class TimePeriodModelCC {
private var _isEnabled:Boolean;
private var _isTimeless:Boolean;
private var _timeLeftInSeconds:int;
private var _timeToStartInSeconds:int;
public function TimePeriodModelCC(param1:Boolean = false, param2:Boolean = false, param3:int = 0, param4:int = 0) {
super();
this._isEnabled = param1;
this._isTimeless = param2;
this._timeLeftInSeconds = param3;
this._timeToStartInSeconds = param4;
}
public function get isEnabled() : Boolean {
return this._isEnabled;
}
public function set isEnabled(param1:Boolean) : void {
this._isEnabled = param1;
}
public function get isTimeless() : Boolean {
return this._isTimeless;
}
public function set isTimeless(param1:Boolean) : void {
this._isTimeless = param1;
}
public function get timeLeftInSeconds() : int {
return this._timeLeftInSeconds;
}
public function set timeLeftInSeconds(param1:int) : void {
this._timeLeftInSeconds = param1;
}
public function get timeToStartInSeconds() : int {
return this._timeToStartInSeconds;
}
public function set timeToStartInSeconds(param1:int) : void {
this._timeToStartInSeconds = param1;
}
public function toString() : String {
var local1:String = "TimePeriodModelCC [";
local1 += "isEnabled = " + this.isEnabled + " ";
local1 += "isTimeless = " + this.isTimeless + " ";
local1 += "timeLeftInSeconds = " + this.timeLeftInSeconds + " ";
local1 += "timeToStartInSeconds = " + this.timeToStartInSeconds + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.tank {
import alternativa.tanks.battle.objects.tank.Tank;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class InitTankPartEvents implements InitTankPart {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function InitTankPartEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function initTankPart(param1:Tank) : void {
var i:int = 0;
var m:InitTankPart = null;
var tank:Tank = param1;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = InitTankPart(this.impl[i]);
m.initTankPart(tank);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.makeup {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_gplusIcon.png")]
public class MakeUp_gplusIcon extends BitmapAsset {
public function MakeUp_gplusIcon() {
super();
}
}
}
|
package controls.resultassets {
import assets.resultwindow.bres_NORMAL_BLUE_PIXEL;
import assets.resultwindow.bres_NORMAL_BLUE_TL;
import controls.statassets.StatLineBase;
public class ResultWindowBlueNormal extends StatLineBase {
public function ResultWindowBlueNormal() {
super();
tl = new bres_NORMAL_BLUE_TL(1,1);
px = new bres_NORMAL_BLUE_PIXEL(1,1);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapons.artillery.sfx {
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.MultiframeTextureResource;
import platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
import projects.tanks.client.battlefield.models.tankparts.weapons.artillery.sfx.ArtillerySfxCC;
public class CodecArtillerySfxCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_chargingSound:ICodec;
private var codec_explosionSound:ICodec;
private var codec_explosionTexture:ICodec;
private var codec_farShotSound:ICodec;
private var codec_flameTexture:ICodec;
private var codec_flyBySound:ICodec;
private var codec_lightingSFXEntity:ICodec;
private var codec_markTexture:ICodec;
private var codec_reloadSound:ICodec;
private var codec_shot1Sound:ICodec;
private var codec_shot2Sound:ICodec;
private var codec_shot3Sound:ICodec;
private var codec_shot4Sound:ICodec;
private var codec_smokeTexture:ICodec;
private var codec_streamTexture:ICodec;
private var codec_trailTexture:ICodec;
public function CodecArtillerySfxCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_chargingSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_explosionSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_explosionTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
this.codec_farShotSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_flameTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_flyBySound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_lightingSFXEntity = param1.getCodec(new TypeCodecInfo(LightingSFXEntity,false));
this.codec_markTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_reloadSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_shot1Sound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_shot2Sound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_shot3Sound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_shot4Sound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_smokeTexture = param1.getCodec(new TypeCodecInfo(MultiframeTextureResource,false));
this.codec_streamTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_trailTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ArtillerySfxCC = new ArtillerySfxCC();
local2.chargingSound = this.codec_chargingSound.decode(param1) as SoundResource;
local2.explosionSound = this.codec_explosionSound.decode(param1) as SoundResource;
local2.explosionTexture = this.codec_explosionTexture.decode(param1) as MultiframeTextureResource;
local2.farShotSound = this.codec_farShotSound.decode(param1) as SoundResource;
local2.flameTexture = this.codec_flameTexture.decode(param1) as TextureResource;
local2.flyBySound = this.codec_flyBySound.decode(param1) as SoundResource;
local2.lightingSFXEntity = this.codec_lightingSFXEntity.decode(param1) as LightingSFXEntity;
local2.markTexture = this.codec_markTexture.decode(param1) as TextureResource;
local2.reloadSound = this.codec_reloadSound.decode(param1) as SoundResource;
local2.shot1Sound = this.codec_shot1Sound.decode(param1) as SoundResource;
local2.shot2Sound = this.codec_shot2Sound.decode(param1) as SoundResource;
local2.shot3Sound = this.codec_shot3Sound.decode(param1) as SoundResource;
local2.shot4Sound = this.codec_shot4Sound.decode(param1) as SoundResource;
local2.smokeTexture = this.codec_smokeTexture.decode(param1) as MultiframeTextureResource;
local2.streamTexture = this.codec_streamTexture.decode(param1) as TextureResource;
local2.trailTexture = this.codec_trailTexture.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:ArtillerySfxCC = ArtillerySfxCC(param2);
this.codec_chargingSound.encode(param1,local3.chargingSound);
this.codec_explosionSound.encode(param1,local3.explosionSound);
this.codec_explosionTexture.encode(param1,local3.explosionTexture);
this.codec_farShotSound.encode(param1,local3.farShotSound);
this.codec_flameTexture.encode(param1,local3.flameTexture);
this.codec_flyBySound.encode(param1,local3.flyBySound);
this.codec_lightingSFXEntity.encode(param1,local3.lightingSFXEntity);
this.codec_markTexture.encode(param1,local3.markTexture);
this.codec_reloadSound.encode(param1,local3.reloadSound);
this.codec_shot1Sound.encode(param1,local3.shot1Sound);
this.codec_shot2Sound.encode(param1,local3.shot2Sound);
this.codec_shot3Sound.encode(param1,local3.shot3Sound);
this.codec_shot4Sound.encode(param1,local3.shot4Sound);
this.codec_smokeTexture.encode(param1,local3.smokeTexture);
this.codec_streamTexture.encode(param1,local3.streamTexture);
this.codec_trailTexture.encode(param1,local3.trailTexture);
}
}
}
|
package alternativa.tanks.gui.friends.list.renderer.background {
import controls.cellrenderer.ButtonState;
import flash.display.DisplayObject;
import flash.display.Sprite;
public class RendererBackGroundIncomingList extends Sprite {
private var _width:int = 100;
public function RendererBackGroundIncomingList(param1:Boolean) {
var local2:ButtonState = null;
super();
if(param1) {
local2 = new FriendCellSelected();
} else {
local2 = new FriendCellNormal();
}
addChild(local2);
this.resize();
}
protected function resize() : void {
var local1:DisplayObject = getChildAt(0);
local1.width = this._width - 3;
local1.height = 18;
}
override public function set width(param1:Number) : void {
this._width = Math.floor(param1);
this.resize();
}
}
}
|
package alternativa.tanks.models.battle.rugby.explosion {
import alternativa.math.Vector3;
[ModelInterface]
public interface BallExplosion {
function createExplosionEffects(param1:Vector3) : void;
}
}
|
package alternativa.debug
{
import alternativa.init.Main;
import alternativa.osgi.service.alert.IAlertService;
import alternativa.osgi.service.console.IConsoleService;
import alternativa.osgi.service.dump.IDumpService;
import alternativa.service.IAddressService;
import flash.display.DisplayObjectContainer;
import flash.display.Shape;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.utils.Dictionary;
import flash.utils.setInterval;
public class Debug implements IDebugCommandProvider, IDebugCommandHandler, IAlertService
{
private static var errorWindow:ErrorWindow;
private static var serverMessageWindow:ServerMessageWindow;
private var _handlers:Dictionary;
private var _commandList:Array;
private var layer:DisplayObjectContainer;
public function Debug()
{
super();
this.layer = Main.noticesLayer;
errorWindow = new ErrorWindow();
serverMessageWindow = new ServerMessageWindow();
this._handlers = new Dictionary();
this._commandList = new Array();
this.registerCommand("dump",this);
this.registerCommand("hide",this);
this.registerCommand("show",this);
this.registerCommand("help",this);
this.registerCommand("clear",this);
this.registerCommand("spam",this);
this.registerCommand("reload",this);
this.registerCommand("getPath",this);
var console:EventDispatcher = IConsoleService(Main.osgi.getService(IConsoleService)).console as EventDispatcher;
if(console != null)
{
console.addEventListener(Event.COMPLETE,this.consoleCommand);
}
Main.stage.addEventListener(Event.RESIZE,this.onStageResize);
}
private function consoleCommand(e:Event) : void
{
var command:String = IConsoleService(Main.osgi.getService(IConsoleService)).console.getCommand();
var result:String = this.executeCommand(command);
if(result != null && result != "")
{
IConsoleService(Main.osgi.getService(IConsoleService)).writeToConsoleChannel("COMMAND",result);
}
}
public function execute(command:String) : String
{
var result:String = null;
var stringsArray:Array = null;
var strings:Vector.<String> = null;
var dumpService:IDumpService = null;
var i:int = 0;
stringsArray = command.split(" ");
var name:String = stringsArray.shift();
switch(name)
{
case "help":
result = "\n";
for(i = 0; i < this._commandList.length; i++)
{
result += "\t " + this._commandList[i] + "\n";
}
result += "\n";
break;
case "dump":
strings = Vector.<String>(stringsArray);
dumpService = IDumpService(Main.osgi.getService(IDumpService));
if(dumpService != null)
{
result = dumpService.dump(strings);
}
break;
case "hide":
IConsoleService(Main.osgi.getService(IConsoleService)).hideConsole();
break;
case "show":
IConsoleService(Main.osgi.getService(IConsoleService)).showConsole();
break;
case "clear":
IConsoleService(Main.osgi.getService(IConsoleService)).clearConsole();
break;
case "spam":
setInterval(this.spam,25);
break;
case "reload":
IAddressService(Main.osgi.getService(IAddressService)).reload();
break;
case "getPath":
result = IAddressService(Main.osgi.getService(IAddressService)).getPath();
break;
default:
result = "Unknown command";
}
return result;
}
private function spam() : void
{
var s:Shape = null;
for(var i:int = 0; i < 3000; i++)
{
s = new Shape();
}
}
public function executeCommand(command:String) : String
{
var result:String = null;
var name:String = command.split(" ")[0];
if(this._handlers[name] != null)
{
result = IDebugCommandHandler(this._handlers[name]).execute(command);
}
else
{
result = "Unknown command";
}
return result;
}
public function registerCommand(command:String, handler:IDebugCommandHandler) : void
{
this._handlers[command] = handler;
this._commandList.push(command);
}
public function unregisterCommand(command:String) : void
{
this._commandList.splice(this._commandList.indexOf(command),1);
delete this._handlers[command];
}
private function onStageResize(e:Event = null) : void
{
if(this.layer.contains(errorWindow))
{
errorWindow.x = Math.round((Main.stage.stageWidth - errorWindow.currentSize.x) * 0.5);
errorWindow.y = Math.round((Main.stage.stageHeight - errorWindow.currentSize.y) * 0.5);
}
if(this.layer.contains(serverMessageWindow))
{
serverMessageWindow.x = Math.round((Main.stage.stageWidth - serverMessageWindow.currentSize.x) * 0.5);
serverMessageWindow.y = Math.round((Main.stage.stageHeight - serverMessageWindow.currentSize.y) * 0.5);
}
}
private function openWindow() : void
{
if(!this.layer.contains(errorWindow))
{
this.layer.addChild(errorWindow);
this.onStageResize();
}
}
private function closeWindow() : void
{
if(this.layer.contains(errorWindow))
{
this.layer.removeChild(errorWindow);
}
}
public function showAlert(message:String) : void
{
this.showServerMessageWindow(message);
}
public function showErrorWindow(message:String) : void
{
errorWindow.text = message;
this.openWindow();
}
public function hideErrorWindow() : void
{
this.closeWindow();
}
public function showServerMessageWindow(message:String) : void
{
serverMessageWindow.text = message;
if(!this.layer.contains(serverMessageWindow))
{
this.layer.addChild(serverMessageWindow);
this.onStageResize();
}
}
public function hideServerMessageWindow() : void
{
if(this.layer.contains(serverMessageWindow))
{
this.layer.removeChild(serverMessageWindow);
}
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.messages {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.messages.KillMessageOutputLine_thunderIconClass.png")]
public class KillMessageOutputLine_thunderIconClass extends BitmapAsset {
public function KillMessageOutputLine_thunderIconClass() {
super();
}
}
}
|
package alternativa.tanks.models.tank.ultimate.dictator {
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.materials.TextureMaterial;
import alternativa.engine3d.objects.Mesh;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.tanks.battle.scene3d.scene3dcontainer.Scene3DContainer;
import alternativa.tanks.camera.GameCamera;
import alternativa.tanks.sfx.GraphicEffect;
import alternativa.tanks.utils.objectpool.Pool;
import alternativa.tanks.utils.objectpool.PooledObject;
import flash.display.BlendMode;
import flash.geom.Vector3D;
public class DictatorStreamEffect extends PooledObject implements GraphicEffect {
public static const OFFSET:Number = 150;
public static const MID:Number = 30 / 60;
public static const KEY1:Number = 40 / 60;
public static const KEY2:Number = 60 / 60;
public static const END:Number = 100 / 60;
private static const SIZE:Number = 300;
private static const DX:Number = 15;
private static const MAX:Number = 4;
private static const TOP:Number = 800;
private static const D:Number = 40;
private static const H:Number = 150;
private static const vector:Vector3D = new Vector3D();
private var beam:Mesh;
private var center:Mesh;
private var star1:Sprite3D;
private var star2:Sprite3D;
private var star3:Sprite3D;
private var star4:Sprite3D;
private var origin1:Vector3D;
private var origin2:Vector3D;
private var origin3:Vector3D;
private var origin4:Vector3D;
private var time:Number;
private var container:Scene3DContainer;
private var targetObject:Object3D;
private var scaleXY:Number;
private var scaleZ:Number;
private var timeScale:Number;
private var zOffset:Number;
private var offsetVector:Vector3D = new Vector3D();
public function DictatorStreamEffect(param1:Pool) {
super(param1);
this.beam = new Mesh();
var local2:Vertex = this.beam.addVertex(-SIZE / 2 - DX,0,SIZE,0,0);
var local3:Vertex = this.beam.addVertex(-SIZE / 2 - DX,0,0,0,1);
var local4:Vertex = this.beam.addVertex(SIZE / 2 - DX,0,0,1,1);
var local5:Vertex = this.beam.addVertex(SIZE / 2 - DX,0,SIZE,1,0);
this.beam.addQuadFace(local2,local3,local4,local5);
local2 = this.beam.addVertex(-SIZE / 2 + DX,0,SIZE,0,0);
local3 = this.beam.addVertex(-SIZE / 2 + DX,0,0,0,1);
local4 = this.beam.addVertex(SIZE / 2 + DX,0,0,1,1);
local5 = this.beam.addVertex(SIZE / 2 + DX,0,SIZE,1,0);
this.beam.addQuadFace(local2,local3,local4,local5);
this.beam.calculateFacesNormals();
this.beam.calculateBounds();
this.beam.useLight = false;
this.beam.useShadowMap = false;
this.beam.shadowMapAlphaThreshold = 2;
this.beam.depthMapAlphaThreshold = 2;
this.beam.blendMode = BlendMode.ADD;
this.beam.softAttenuation = 150;
this.center = new Mesh();
local2 = this.center.addVertex(-SIZE / 2 * 1.4,0,SIZE,0,0);
local3 = this.center.addVertex(-SIZE / 2 * 1.4,0,0,0,1);
local4 = this.center.addVertex(SIZE / 2 * 1.4,0,0,1,1);
local5 = this.center.addVertex(SIZE / 2 * 1.4,0,SIZE,1,0);
this.center.addQuadFace(local2,local3,local4,local5);
this.center.calculateFacesNormals();
this.center.calculateBounds();
this.center.useLight = false;
this.center.useShadowMap = false;
this.center.shadowMapAlphaThreshold = 2;
this.center.depthMapAlphaThreshold = 2;
this.center.blendMode = BlendMode.ADD;
this.center.softAttenuation = 150;
this.origin1 = new Vector3D(-D,D,0);
this.origin2 = new Vector3D(-D,-D,H);
this.origin3 = new Vector3D(D,-D,H + H);
this.origin4 = new Vector3D(D,D,H + H + H);
this.star1 = new Sprite3D(100,100);
this.star1.useLight = false;
this.star1.useShadowMap = false;
this.star1.blendMode = BlendMode.ADD;
this.star1.softAttenuation = 150;
this.star2 = this.star1.clone() as Sprite3D;
this.star3 = this.star1.clone() as Sprite3D;
this.star4 = this.star1.clone() as Sprite3D;
}
public function init(param1:TextureMaterial, param2:TextureMaterial, param3:Object3D, param4:Number, param5:Number, param6:Number = 150, param7:Number = 1) : * {
this.targetObject = param3;
this.scaleXY = param4;
this.scaleZ = param5;
this.timeScale = param7;
this.zOffset = param6;
this.offsetVector.x = 0;
this.offsetVector.y = 0;
this.offsetVector.z = param6;
this.beam.setMaterialToAllFaces(param1);
this.center.setMaterialToAllFaces(param1);
var local8:Number = Math.max(param4,param5);
this.star1.material = param2;
this.star1.scaleX = local8;
this.star1.scaleY = local8;
this.star1.scaleZ = local8;
this.star2.material = param2;
this.star2.scaleX = local8;
this.star2.scaleY = local8;
this.star2.scaleZ = local8;
this.star3.material = param2;
this.star3.scaleX = local8;
this.star3.scaleY = local8;
this.star3.scaleZ = local8;
this.star4.material = param2;
this.star4.scaleX = local8;
this.star4.scaleY = local8;
this.star4.scaleZ = local8;
this.time = 0;
}
public function addedToScene(param1:Scene3DContainer) : void {
this.container = param1;
param1.addChild(this.beam);
param1.addChild(this.center);
param1.addChild(this.star1);
param1.addChild(this.star2);
param1.addChild(this.star3);
param1.addChild(this.star4);
}
public function play(param1:int, param2:GameCamera) : Boolean {
var local4:Number = NaN;
this.time += this.timeScale * param1 / 1000;
var local3:Vector3D = this.targetObject.localToGlobal(this.offsetVector);
vector.x = param2.x - local3.x;
vector.y = param2.y - local3.y;
vector.z = param2.z - local3.z;
vector.normalize();
this.beam.x = local3.x + vector.x * OFFSET;
this.beam.y = local3.y + vector.y * OFFSET;
this.beam.z = local3.z + vector.z * OFFSET;
this.beam.rotationZ = Math.atan2(param2.y - local3.y,param2.x - local3.x) + Math.PI / 2;
this.center.x = this.beam.x;
this.center.y = this.beam.y;
this.center.z = this.beam.z;
this.center.rotationZ = this.beam.rotationZ;
this.beam.scaleX = this.scaleXY;
this.beam.scaleY = this.scaleXY;
this.center.scaleX = this.scaleXY;
this.center.scaleY = this.scaleXY;
this.center.scaleZ = this.scaleZ;
if(this.time <= KEY2) {
local4 = TOP * this.time / KEY2 * this.scaleZ;
this.star1.x = local3.x + this.origin1.x * this.scaleXY;
this.star1.y = local3.y + this.origin1.y * this.scaleXY;
this.star1.z = local3.z + this.origin1.z * this.scaleZ + local4;
this.star2.x = local3.x + this.origin2.x * this.scaleXY;
this.star2.y = local3.y + this.origin2.y * this.scaleXY;
this.star2.z = local3.z + this.origin2.z * this.scaleZ + local4;
this.star3.x = local3.x + this.origin3.x * this.scaleXY;
this.star3.y = local3.y + this.origin3.y * this.scaleXY;
this.star3.z = local3.z + this.origin3.z * this.scaleZ + local4;
this.star4.x = local3.x + this.origin4.x * this.scaleXY;
this.star4.y = local3.y + this.origin4.y * this.scaleXY;
this.star4.z = local3.z + this.origin4.z * this.scaleZ + local4;
if(this.time <= MID) {
this.star1.alpha = this.time / MID;
} else {
this.star1.alpha = 1 - (this.time - MID) / (KEY2 - MID);
}
this.star2.alpha = this.star1.alpha;
this.star3.alpha = this.star1.alpha;
this.star4.alpha = this.star1.alpha;
this.star1.visible = true;
this.star2.visible = true;
this.star3.visible = true;
this.star3.visible = true;
this.star4.visible = true;
} else {
this.star1.visible = false;
this.star2.visible = false;
this.star3.visible = false;
this.star4.visible = false;
}
if(this.time <= KEY1) {
local4 = this.time / KEY1;
this.beam.scaleZ = (1 + (MAX - 1) * local4) * this.scaleZ;
this.beam.alpha = local4;
this.center.alpha = this.beam.alpha;
return true;
}
if(this.time <= END) {
if(this.time <= KEY2) {
this.beam.alpha = 1;
} else {
this.beam.alpha = 1 - (this.time - KEY2) / (END - KEY2);
}
this.center.alpha = 1 - (this.time - KEY1) / (END - KEY1);
return true;
}
return false;
}
public function destroy() : void {
this.container.removeChild(this.beam);
this.container.removeChild(this.center);
this.container.removeChild(this.star1);
this.container.removeChild(this.star2);
this.container.removeChild(this.star3);
this.container.removeChild(this.star4);
this.beam.setMaterialToAllFaces(null);
this.center.setMaterialToAllFaces(null);
this.star1.material = null;
this.star1.scaleX = 0;
this.star1.scaleY = 0;
this.star1.scaleZ = 0;
this.star2.material = null;
this.star2.scaleX = 0;
this.star2.scaleY = 0;
this.star2.scaleZ = 0;
this.star3.material = null;
this.star3.scaleX = 0;
this.star3.scaleY = 0;
this.star3.scaleZ = 0;
this.star4.material = null;
this.star4.scaleX = 0;
this.star4.scaleY = 0;
this.star4.scaleZ = 0;
this.container = null;
recycle();
}
public function kill() : void {
this.beam.alpha = 0;
this.center.alpha = 0;
this.star1.alpha = 0;
this.star2.alpha = 0;
this.star3.alpha = 0;
this.star4.alpha = 0;
}
}
}
|
package alternativa.tanks.gui.alerts {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.startup.CacheLoader;
import alternativa.tanks.gui.labels.TextWithCrystalsSmall;
import controls.TankWindowInner;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import forms.TankWindowWithHeader;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
import services.alertservice.AlertAnswer;
public class RankUpBonusAlert extends DialogWindow {
[Inject]
public static var localeService:ILocaleService;
[Inject]
public static var userPropertiesService:IUserPropertiesService;
private const PIC_WIDTH:int = 400;
private const PIC_HEIGHT:int = 234;
private const windowWidth:int = 460;
private const margin:int = 20;
private const windowMargin:int = 12;
private const picMarginTop:int = 5;
private const picMarginBottom:int = -21;
private const buttonMargin:int = 22;
private var windowHeight:int;
private var window:TankWindowWithHeader;
public var button:DefaultButtonBase;
public function RankUpBonusAlert(param1:int, param2:String) {
var local6:LabelBase = null;
var local7:TankWindowInner = null;
this.button = new DefaultButtonBase();
super();
var local3:LabelBase = new LabelBase();
local3.color = 4772391;
local3.align = TextFormatAlign.CENTER;
local3.size = 16;
local3.bold = true;
local3.text = localeService.getText(TanksLocale.TEXT_MAIN_PANEL_RANK_UP_ACCRUED_CRYSTALS_CONGRATULATIONS,userPropertiesService.userName);
local3.x = this.windowWidth - local3.width >> 1;
local3.y = this.margin;
addChild(local3);
var local4:TextWithCrystalsSmall = new TextWithCrystalsSmall(localeService.getText(TanksLocale.TEXT_MAIN_PANEL_RANK_UP_ACCRUED_CRYSTALS_SUM,param1.toString()));
local4.x = this.windowWidth - local4.width >> 1;
local4.y = local3.y + local3.height - 3;
addChild(local4);
this.windowHeight = local4.y + local4.height;
var local5:CacheLoader = new CacheLoader();
local5.load(new URLRequest(param2));
local5.x = this.windowWidth - this.PIC_WIDTH >> 1;
local5.y = local4.y + local4.height + this.picMarginTop;
addChild(local5);
this.windowHeight += this.PIC_HEIGHT + this.picMarginTop;
local6 = new LabelBase();
local6.color = 4576301;
local6.align = TextFormatAlign.LEFT;
local6.multiline = true;
local6.autoSize = TextFieldAutoSize.LEFT;
local6.wordWrap = true;
local6.size = 13;
local6.text = localeService.getText(TanksLocale.TEXT_MAIN_PANEL_RANK_UP_ACCRUED_CRYSTALS_TEXT_MIDDLE_RANK);
local6.x = 31;
local6.y = local5.y + this.PIC_HEIGHT + this.picMarginBottom;
local6.width = this.windowWidth - 27 - 31;
addChild(local6);
this.windowHeight += local6.height + this.picMarginBottom;
this.button.label = AlertAnswer.OK;
this.button.x = this.windowWidth - this.button.width >> 1;
this.button.y = local6.y + local6.height + this.buttonMargin;
addChild(this.button);
this.windowHeight += this.button.height + this.buttonMargin + this.windowMargin + 1;
local7 = new TankWindowInner(0,0,TankWindowInner.GREEN);
local7.width = this.windowWidth - this.windowMargin * 2;
local7.height = this.windowHeight - this.windowMargin * 2 - this.button.height - this.margin + 15;
local7.x = this.windowMargin;
local7.y = this.windowMargin;
addChildAt(local7,0);
this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_ATTENTION,this.windowWidth,this.windowHeight);
addChildAt(this.window,0);
this.button.addEventListener(MouseEvent.CLICK,this.onClickCloseButton);
dialogService.enqueueDialog(this);
}
private function onClickCloseButton(param1:MouseEvent = null) : void {
this.button.removeEventListener(MouseEvent.CLICK,this.onClickCloseButton);
dialogService.removeDialog(this);
}
override protected function cancelKeyPressed() : void {
this.onClickCloseButton();
}
override protected function confirmationKeyPressed() : void {
this.onClickCloseButton();
}
}
}
|
package alternativa.tanks.models.tank.ultimate.viking {
import alternativa.engine3d.core.Camera3D;
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 BurningEffect extends PooledObject implements GraphicEffect {
private static const FLAME_SIZE:int = 300;
private static const SMOKE_SIZE:int = 500;
public static const FADE:Number = 1;
public static const MIN:Number = 0.7;
public static const HALF:Number = (1 - MIN) / 2;
public static const FLAME_OFFSET:Number = 330;
public static const SMOKE_OFFSET:Number = 300;
private static const vector:Vector3D = new Vector3D();
private static const vector3:Vector3 = new Vector3();
public static const EFFECT_OPACITY:Number = 0.5;
private var container:Scene3DContainer;
private var camera:Camera3D;
private var target:Object3D;
private var flame1:Sprite3D;
private var flame2:Sprite3D;
private var smoke1:Sprite3D;
private var smoke2:Sprite3D;
private var time:Number;
private var fadeOut:Boolean;
private var fadeOutTime:Number;
private var sound:Sound3D;
public function BurningEffect(param1:Pool) {
super(param1);
this.flame1 = new Sprite3D(FLAME_SIZE,FLAME_SIZE);
this.flame1.useLight = false;
this.flame1.useShadowMap = false;
this.flame1.blendMode = BlendMode.ADD;
this.flame1.softAttenuation = 200;
this.flame2 = new Sprite3D(FLAME_SIZE,FLAME_SIZE);
this.flame2.useLight = false;
this.flame2.useShadowMap = false;
this.flame2.blendMode = BlendMode.ADD;
this.flame2.rotation = Math.PI;
this.flame2.softAttenuation = 200;
this.smoke1 = new Sprite3D(SMOKE_SIZE,SMOKE_SIZE);
this.smoke1.useLight = false;
this.smoke1.useShadowMap = false;
this.smoke1.rotation = Math.PI / 2;
this.smoke1.softAttenuation = 200;
this.smoke2 = new Sprite3D(SMOKE_SIZE,SMOKE_SIZE);
this.smoke2.useLight = false;
this.smoke2.useShadowMap = false;
this.smoke2.rotation = -Math.PI / 2;
this.smoke2.softAttenuation = 200;
this.flame1.alpha = EFFECT_OPACITY;
this.flame2.alpha = EFFECT_OPACITY;
this.smoke1.alpha = EFFECT_OPACITY;
this.smoke2.alpha = EFFECT_OPACITY;
this.fadeOut = false;
this.fadeOutTime = 0;
}
private static function coerce(param1:Number, param2:Number, param3:Number) : Number {
if(param1 < param2) {
return param2;
}
if(param1 > param3) {
return param3;
}
return param1;
}
public function init(param1:TextureMaterial, param2:TextureMaterial, param3:Object3D, param4:Sound3D) : void {
this.target = param3;
this.sound = param4;
this.flame1.material = param1;
this.flame2.material = param1;
this.smoke1.material = param2;
this.smoke2.material = param2;
this.flame2.scaleX = MIN + HALF;
this.flame2.scaleY = MIN + HALF;
this.flame2.scaleZ = MIN + HALF;
this.smoke2.scaleX = MIN + HALF;
this.smoke2.scaleY = MIN + HALF;
this.smoke2.scaleZ = MIN + HALF;
this.time = 0;
this.fadeOut = false;
this.fadeOutTime = 0;
}
public function addedToScene(param1:Scene3DContainer) : void {
this.container = param1;
param1.addChild(this.flame1);
param1.addChild(this.flame2);
param1.addChild(this.smoke1);
param1.addChild(this.smoke2);
this.time = 0;
this.fadeOut = false;
this.fadeOutTime = 0;
this.sound.play(0,1000);
}
public function play(param1:int, param2:GameCamera) : Boolean {
var local3:Number = NaN;
var local6:Number = NaN;
local3 = param1 / 1000;
this.time += local3;
vector3.reset(this.target.x,this.target.y,this.target.z);
this.sound.checkVolume(param2.position,vector3,param2.xAxis);
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.flame1.x = this.target.x + vector.x * FLAME_OFFSET;
this.flame1.y = this.target.y + vector.y * FLAME_OFFSET;
this.flame1.z = this.target.z + vector.z * FLAME_OFFSET + 50;
this.flame2.x = this.flame1.x;
this.flame2.y = this.flame1.y;
this.flame2.z = this.flame1.z;
this.smoke1.x = this.target.x + vector.x * SMOKE_OFFSET;
this.smoke1.y = this.target.y + vector.y * SMOKE_OFFSET;
this.smoke1.z = this.target.z + vector.z * SMOKE_OFFSET + 50;
this.smoke2.x = this.smoke1.x;
this.smoke2.y = this.smoke1.y;
this.smoke2.z = this.smoke1.z;
var local4:Number = local3 * 0.4;
var local5:Number = this.flame1.scaleX + local4;
if(local5 > 1) {
local5 = MIN;
}
this.flame1.scaleX = local5;
this.flame1.scaleY = local5;
this.flame1.scaleZ = local5;
this.flame1.alpha = 1 - Math.abs(MIN + HALF - local5) / HALF;
local5 = this.flame2.scaleX + local4;
if(local5 > 1) {
local5 = MIN;
}
this.flame2.scaleX = local5;
this.flame2.scaleY = local5;
this.flame2.scaleZ = local5;
this.flame2.alpha = 1 - Math.abs(MIN + HALF - local5) / HALF;
local5 = this.smoke1.scaleX - local4;
if(local5 < MIN) {
local5 = 1;
}
this.smoke1.scaleX = local5;
this.smoke1.scaleY = local5;
this.smoke1.scaleZ = local5;
this.smoke1.alpha = 1 - Math.abs(MIN + HALF - local5) / HALF;
local5 = this.smoke2.scaleX - local4;
if(local5 < MIN) {
local5 = 1;
}
this.smoke2.scaleX = local5;
this.smoke2.scaleY = local5;
this.smoke2.scaleZ = local5;
this.smoke2.alpha = 1 - Math.abs(MIN + HALF - local5) / HALF;
this.applyOpacity();
if(this.fadeOut) {
local6 = 1 - this.time / FADE;
this.flame1.alpha = coerce(this.flame1.alpha * local6,0,1);
this.flame2.alpha = coerce(this.flame2.alpha * local6,0,1);
this.smoke1.alpha = coerce(this.smoke1.alpha * local6,0,1);
this.smoke2.alpha = coerce(this.smoke2.alpha * local6,0,1);
this.applyOpacity();
return local6 > 0;
}
local6 = this.time / FADE;
this.flame1.alpha = coerce(this.flame1.alpha * local6,0,1);
this.flame2.alpha = coerce(this.flame2.alpha * local6,0,1);
this.smoke1.alpha = coerce(this.smoke1.alpha * local6,0,1);
this.smoke2.alpha = coerce(this.smoke2.alpha * local6,0,1);
this.applyOpacity();
return true;
}
private function applyOpacity() : void {
this.flame1.alpha *= EFFECT_OPACITY;
this.flame2.alpha *= EFFECT_OPACITY;
this.smoke1.alpha *= EFFECT_OPACITY;
this.smoke2.alpha *= EFFECT_OPACITY;
}
public function destroy() : void {
this.container.removeChild(this.flame1);
this.container.removeChild(this.flame2);
this.container.removeChild(this.smoke1);
this.container.removeChild(this.smoke2);
this.flame1.material = null;
this.flame2.material = null;
this.smoke2.material = null;
this.smoke1.material = null;
this.camera = null;
this.container = null;
this.target = null;
if(this.sound != null) {
this.sound.stop();
}
this.sound = null;
recycle();
}
public function stop() : void {
this.fadeOut = true;
if(this.sound != null) {
this.sound.stop();
}
}
public function kill() : void {
this.sound.stop();
this.flame1.alpha = 0;
this.flame2.alpha = 0;
this.smoke2.alpha = 0;
this.smoke1.alpha = 0;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.battle.activator {
import alternativa.types.Long;
import flash.events.Event;
public class BattleLinkActivatorServiceEvent extends Event {
public static const ACTIVATE_LINK:String = "BattleLinkActivatorServiceEvent.ACTIVATE_LINK";
public static const CONFIRMED_NAVIGATE:String = "BattleLinkActivatorServiceEvent.CONFIRMED_NAVIGATE";
public static const NOT_CONFIRMED_NAVIGATE:String = "BattleLinkActivatorServiceEvent.NOT_CONFIRMED_NAVIGATE";
public var battleId:Long;
public function BattleLinkActivatorServiceEvent(param1:String, param2:Long = null) {
super(param1);
this.battleId = param2;
}
}
}
|
package alternativa.tanks.gui.icons {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.icons.AcceptedIndicator_acceptedIconClass.png")]
public class AcceptedIndicator_acceptedIconClass extends BitmapAsset {
public function AcceptedIndicator_acceptedIconClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.common {
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.types.Vector3d;
public class TargetPosition {
private var _orientation:Vector3d;
private var _position:Vector3d;
private var _target:IGameObject;
private var _turretAngle:Number;
public function TargetPosition(param1:Vector3d = null, param2:Vector3d = null, param3:IGameObject = null, param4:Number = 0) {
super();
this._orientation = param1;
this._position = param2;
this._target = param3;
this._turretAngle = param4;
}
public function get orientation() : Vector3d {
return this._orientation;
}
public function set orientation(param1:Vector3d) : void {
this._orientation = param1;
}
public function get position() : Vector3d {
return this._position;
}
public function set position(param1:Vector3d) : void {
this._position = param1;
}
public function get target() : IGameObject {
return this._target;
}
public function set target(param1:IGameObject) : void {
this._target = param1;
}
public function get turretAngle() : Number {
return this._turretAngle;
}
public function set turretAngle(param1:Number) : void {
this._turretAngle = param1;
}
public function toString() : String {
var local1:String = "TargetPosition [";
local1 += "orientation = " + this.orientation + " ";
local1 += "position = " + this.position + " ";
local1 += "target = " + this.target + " ";
local1 += "turretAngle = " + this.turretAngle + " ";
return local1 + "]";
}
}
}
|
package alternativa.engine3d.materials
{
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.objects.Decal;
import alternativa.engine3d.objects.SkyBox;
import alternativa.engine3d.objects.Sprite3D;
import alternativa.gfx.core.BitmapTextureResource;
import alternativa.gfx.core.CompressedTextureResource;
import alternativa.gfx.core.Device;
import alternativa.gfx.core.IndexBufferResource;
import alternativa.gfx.core.ProgramResource;
import alternativa.gfx.core.VertexBufferResource;
import flash.display.BitmapData;
import flash.display3D.Context3DProgramType;
import flash.display3D.Context3DVertexBufferFormat;
import flash.utils.ByteArray;
use namespace alternativa3d;
public class TextureMaterial extends Material
{
protected static const skyFogConst:Vector.<Number> = Vector.<Number>([0,0,0,1]);
protected static const correctionConst:Vector.<Number> = Vector.<Number>([0,0,0,1,0,0,0,1]);
protected static const uvCorrection:Vector.<Number> = Vector.<Number>([1,1,0,1]);
protected static const fragmentConst:Vector.<Number> = Vector.<Number>([0,0,0,1]);
private static var programs:Array = new Array();
protected var uvTransformConst:Vector.<Number>;
public var diffuseMapURL:String;
public var opacityMapURL:String;
public var repeat:Boolean = false;
public var smooth:Boolean = true;
public var resolution:Number = 1;
public var threshold:Number = 0.01;
public var correctUV:Boolean = false;
alternativa3d var _textureATF:ByteArray;
alternativa3d var _textureATFAlpha:ByteArray;
alternativa3d var _mipMapping:int = 0;
alternativa3d var _hardwareMipMaps:Boolean = false;
alternativa3d var textureResource:BitmapTextureResource;
alternativa3d var textureATFResource:CompressedTextureResource;
alternativa3d var textureATFAlphaResource:CompressedTextureResource;
protected var bitmap:BitmapData;
public function TextureMaterial(bitmapData:BitmapData = null, repeat:Boolean = false, smooth:Boolean = true, mipMapping:int = 0, resolution:Number = 1)
{
this.uvTransformConst = Vector.<Number>([1,0,0,0,0,1,0,0]);
super();
this.repeat = repeat;
this.smooth = smooth;
this._mipMapping = mipMapping;
this.resolution = resolution;
if(bitmapData != null)
{
this.bitmap = bitmapData;
this.textureResource = TextureResourcesRegistry.getTextureResource(bitmapData,this._mipMapping > 0,repeat,this._hardwareMipMaps);
}
}
public function get texture() : BitmapData
{
if(this.textureResource != null)
{
return this.textureResource.bitmapData;
}
return null;
}
public function set texture(param1:BitmapData) : void
{
var _loc2_:BitmapData = this.texture;
if(param1 != _loc2_)
{
if(_loc2_ != null)
{
this.textureResource.dispose();
this.textureResource = null;
}
if(param1 != null)
{
this.textureResource = TextureResourcesRegistry.getTextureResource(param1,this._mipMapping > 0,this.repeat,this._hardwareMipMaps);
}
}
}
public function getTextureResource() : BitmapTextureResource
{
return this.textureResource;
}
public function get textureATF() : ByteArray
{
return this._textureATF;
}
public function set textureATF(param1:ByteArray) : void
{
if(param1 != this._textureATF)
{
if(this._textureATF != null)
{
this.textureATFResource.dispose();
this.textureATFResource = null;
}
this._textureATF = param1;
if(this._textureATF != null)
{
this.textureATFResource = new CompressedTextureResource(this._textureATF);
}
}
}
public function get textureATFAlpha() : ByteArray
{
return this._textureATFAlpha;
}
public function set textureATFAlpha(param1:ByteArray) : void
{
if(param1 != this._textureATFAlpha)
{
if(this._textureATFAlpha != null)
{
this.textureATFAlphaResource.dispose();
this.textureATFAlphaResource = null;
}
this._textureATFAlpha = param1;
if(this._textureATFAlpha != null)
{
this.textureATFAlphaResource = new CompressedTextureResource(this._textureATFAlpha);
}
}
}
public function get mipMapping() : int
{
return this._mipMapping;
}
public function set mipMapping(param1:int) : void
{
this._mipMapping = param1;
if(this.bitmap != null)
{
this.textureResource = TextureResourcesRegistry.getTextureResource(this.bitmap,this._mipMapping > 0,this.repeat,this._hardwareMipMaps);
}
}
public function disposeResource() : void
{
if(this.textureResource != null)
{
this.textureResource.dispose();
this.textureResource = null;
}
}
public function get hardwareMipMaps() : Boolean
{
return this._hardwareMipMaps;
}
public function set hardwareMipMaps(param1:Boolean) : void
{
if(param1 != this._hardwareMipMaps)
{
this._hardwareMipMaps = param1;
if(this.texture != null)
{
this.textureResource.calculateMipMapsUsingGPU = this._hardwareMipMaps;
}
}
}
override public function clone() : Material
{
var _loc1_:TextureMaterial = new TextureMaterial(this.texture,this.repeat,this.smooth,this._mipMapping,this.resolution);
_loc1_.clonePropertiesFrom(this);
return _loc1_;
}
override protected function clonePropertiesFrom(param1:Material) : void
{
super.clonePropertiesFrom(param1);
var _loc2_:TextureMaterial = param1 as TextureMaterial;
this.diffuseMapURL = _loc2_.diffuseMapURL;
this.opacityMapURL = _loc2_.opacityMapURL;
this.threshold = _loc2_.threshold;
this.correctUV = _loc2_.correctUV;
this.textureATF = _loc2_.textureATF;
this.textureATFAlpha = _loc2_.textureATFAlpha;
this.hardwareMipMaps = _loc2_.hardwareMipMaps;
}
override alternativa3d function get transparent() : Boolean
{
if(super.transparent)
{
return true;
}
if(this.texture != null)
{
return this.texture.transparent;
}
if(this._textureATF != null)
{
return this._textureATFAlpha != null;
}
return false;
}
override alternativa3d function drawOpaque(param1:Camera3D, param2:VertexBufferResource, param3:IndexBufferResource, param4:int, param5:int, param6:Object3D) : void
{
var _loc7_:BitmapData = this.texture;
if(_loc7_ == null && this._textureATF == null)
{
return;
}
var _loc8_:Device = param1.device;
var _loc9_:Boolean = param6 is Decal;
var _loc10_:Boolean = !_loc9_ && zOffset;
var _loc11_:Boolean = param6 is SkyBox && SkyBox(param6).autoSize;
var _loc12_:Boolean = param1.fogAlpha > 0 && param1.fogStrength > 0;
var _loc13_:Boolean = !param1.view.constrained && param1.ssao && param1.ssaoStrength > 0 && param6.useDepth && !_loc11_;
var _loc14_:Boolean = !param1.view.constrained && param1.directionalLight != null && param1.directionalLightStrength > 0 && param6.useLight && !_loc11_;
var _loc15_:Boolean = !param1.view.constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && param6.useLight && param6.useShadowMap && !_loc11_;
var _loc16_:Boolean = !param1.view.constrained && param1.deferredLighting && param1.deferredLightingStrength > 0 && param6.useDepth && param6.useLight && !_loc11_;
var _loc17_:Boolean = alphaTestThreshold > 0 && this.transparent;
_loc8_.setProgram(this.getProgram(!_loc9_ && !_loc17_,_loc11_,_loc9_ || _loc10_,false,param1.view.quality,this.repeat,this._mipMapping > 0,param6.concatenatedColorTransform != null,_loc9_ && param6.concatenatedAlpha < 1,_loc12_,false,_loc13_,_loc14_,_loc15_,_loc7_ == null,false,_loc16_,false,param1.view.correction,param6.concatenatedBlendMode != "normal",_loc17_,false));
if(_loc7_ != null)
{
if(uploadEveryFrame && drawId != Camera3D.renderId)
{
_loc8_.uploadResource(this.textureResource);
drawId = Camera3D.renderId;
}
_loc8_.setTextureAt(0,this.textureResource);
uvCorrection[0] = this.textureResource.correctionU;
uvCorrection[1] = this.textureResource.correctionV;
}
else
{
_loc8_.setTextureAt(0,this.textureATFResource);
uvCorrection[0] = 1;
uvCorrection[1] = 1;
}
if(_loc13_)
{
_loc8_.setTextureAt(1,param1.depthMap);
}
else
{
_loc8_.setTextureAt(1,null);
}
if(_loc15_)
{
_loc8_.setTextureAt(2,param1.shadowMap.map);
_loc8_.setTextureAt(3,param1.shadowMap.noise);
}
else
{
_loc8_.setTextureAt(2,null);
_loc8_.setTextureAt(3,null);
}
_loc8_.setTextureAt(4,null);
_loc8_.setTextureAt(6,null);
if(_loc16_)
{
_loc8_.setTextureAt(5,param1.lightMap);
}
else
{
_loc8_.setTextureAt(5,null);
}
_loc8_.setVertexBufferAt(0,param2,0,Context3DVertexBufferFormat.FLOAT_3);
_loc8_.setVertexBufferAt(1,param2,3,Context3DVertexBufferFormat.FLOAT_2);
if(_loc14_)
{
_loc8_.setVertexBufferAt(2,param2,5,Context3DVertexBufferFormat.FLOAT_3);
}
else
{
_loc8_.setVertexBufferAt(2,null);
}
_loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,param6.transformConst,3,false);
_loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,4,uvCorrection,1);
if(_loc9_)
{
correctionConst[0] = param6.md * param1.correctionX;
correctionConst[1] = param6.mh * param1.correctionY;
correctionConst[2] = param6.ml;
correctionConst[3] = param1.correctionX;
correctionConst[4] = param6.mc * param1.correctionX / Decal(param6).attenuation;
correctionConst[5] = param6.mg * param1.correctionY / Decal(param6).attenuation;
correctionConst[6] = param6.mk / Decal(param6).attenuation;
correctionConst[7] = param1.correctionY;
_loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,11,correctionConst,2,false);
}
else if(_loc10_)
{
correctionConst[0] = 0;
correctionConst[1] = 0;
correctionConst[2] = 0;
correctionConst[3] = param1.correctionX;
correctionConst[4] = 0;
correctionConst[5] = 0;
correctionConst[6] = 0;
correctionConst[7] = param1.correctionY;
_loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,11,correctionConst,2,false);
}
else if(_loc11_)
{
_loc8_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,11,SkyBox(param6).reduceConst,1);
if(_loc12_)
{
skyFogConst[0] = param1.fogFragment[0] * param1.fogFragment[3];
skyFogConst[1] = param1.fogFragment[1] * param1.fogFragment[3];
skyFogConst[2] = param1.fogFragment[2] * param1.fogFragment[3];
skyFogConst[3] = 1 - param1.fogFragment[3];
_loc8_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,13,skyFogConst,1);
}
}
if(param6.concatenatedColorTransform != null)
{
_loc8_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.colorConst,2,false);
}
else if(_loc9_ && param6.concatenatedAlpha < 1)
{
_loc8_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.colorConst,1);
}
if(_loc17_)
{
fragmentConst[3] = alphaTestThreshold;
_loc8_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,14,fragmentConst,1,false);
}
_loc8_.drawTriangles(param3,param4,param5);
++param1.numDraws;
param1.numTriangles += param5;
}
override alternativa3d function drawTransparent(param1:Camera3D, param2:VertexBufferResource, param3:IndexBufferResource, param4:int, param5:int, param6:Object3D, param7:Boolean = false) : void
{
var _loc8_:BitmapData = this.texture;
if(_loc8_ == null && this._textureATF == null)
{
return;
}
var _loc9_:Device = param1.device;
var _loc10_:Boolean = zOffset;
var _loc11_:Boolean = param1.fogAlpha > 0 && param1.fogStrength > 0;
var _loc12_:Boolean = param6 is Sprite3D;
var _loc13_:Boolean = !param1.view.constrained && param1.softTransparency && param1.softTransparencyStrength > 0 && param6.softAttenuation > 0;
var _loc14_:Boolean = !param1.view.constrained && param1.ssao && param1.ssaoStrength > 0 && param6.useDepth;
var _loc15_:Boolean = !param1.view.constrained && param1.directionalLight != null && param1.directionalLightStrength > 0 && param6.useLight;
var _loc16_:Boolean = !param1.view.constrained && param1.shadowMap != null && param1.shadowMapStrength > 0 && param6.useLight && param6.useShadowMap;
var _loc17_:Boolean = !param1.view.constrained && param1.deferredLighting && param1.deferredLightingStrength > 0;
var _loc18_:Boolean = _loc17_ && param6.useDepth && param6.useLight && !_loc12_;
var _loc19_:Boolean = _loc17_ && _loc12_ && param6.useLight;
_loc9_.setProgram(this.getProgram(false,false,_loc10_,_loc12_,param1.view.quality,this.repeat,this._mipMapping > 0,param6.concatenatedColorTransform != null,param6.concatenatedAlpha < 1,_loc11_,_loc13_,_loc14_,_loc15_,_loc16_,_loc8_ == null,_loc8_ == null && this._textureATFAlpha != null,_loc18_,_loc19_,param1.view.correction,param6.concatenatedBlendMode != "normal",false,param7));
if(_loc8_ != null)
{
if(uploadEveryFrame && drawId != Camera3D.renderId)
{
_loc9_.uploadResource(this.textureResource);
drawId = Camera3D.renderId;
}
_loc9_.setTextureAt(0,this.textureResource);
uvCorrection[0] = this.textureResource.correctionU;
uvCorrection[1] = this.textureResource.correctionV;
}
else
{
_loc9_.setTextureAt(0,this.textureATFResource);
if(this._textureATFAlpha != null)
{
_loc9_.setTextureAt(4,this.textureATFAlphaResource);
}
else
{
_loc9_.setTextureAt(4,null);
}
uvCorrection[0] = 1;
uvCorrection[1] = 1;
}
if(_loc14_ || _loc13_)
{
_loc9_.setTextureAt(1,param1.depthMap);
}
else
{
_loc9_.setTextureAt(1,null);
}
if(_loc16_)
{
_loc9_.setTextureAt(2,param1.shadowMap.map);
_loc9_.setTextureAt(3,param1.shadowMap.noise);
}
else
{
_loc9_.setTextureAt(2,null);
_loc9_.setTextureAt(3,null);
}
_loc9_.setTextureAt(4,null);
_loc9_.setTextureAt(6,null);
if(_loc18_)
{
_loc9_.setTextureAt(5,param1.lightMap);
}
else
{
_loc9_.setTextureAt(5,null);
}
_loc9_.setVertexBufferAt(0,param2,0,Context3DVertexBufferFormat.FLOAT_1);
_loc9_.setVertexBufferAt(1,null);
_loc9_.setVertexBufferAt(2,null);
if(!_loc12_)
{
_loc9_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,param6.transformConst,3,false);
}
_loc9_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,4,uvCorrection,1);
if(_loc13_)
{
fragmentConst[2] = param6.softAttenuation;
_loc9_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,14,fragmentConst,1);
}
if(_loc10_)
{
correctionConst[0] = 0;
correctionConst[1] = 0;
correctionConst[2] = 0;
correctionConst[3] = param1.correctionX;
correctionConst[4] = 0;
correctionConst[5] = 0;
correctionConst[6] = 0;
correctionConst[7] = param1.correctionY;
_loc9_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,11,correctionConst,2,false);
}
else if(_loc12_)
{
if(_loc15_)
{
correctionConst[0] = param1.correctionX;
correctionConst[1] = param1.correctionY;
correctionConst[2] = 1;
correctionConst[3] = 0.5;
_loc9_.setProgramConstantsFromVector(Context3DProgramType.VERTEX,11,correctionConst,1,false);
}
if(_loc19_)
{
_loc9_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,13,Sprite3D(param6).lightConst,1,false);
}
}
if(param6.concatenatedColorTransform != null)
{
_loc9_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.colorConst,2,false);
}
else if(param6.concatenatedAlpha < 1)
{
_loc9_.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,param6.colorConst,1);
}
_loc9_.drawTriangles(param3,param4,param5);
++param1.numDraws;
param1.numTriangles += param5;
}
protected function getProgram(param1:Boolean, param2:Boolean, param3:Boolean, param4:Boolean, param5:Boolean, param6:Boolean, param7:Boolean, param8:Boolean, param9:Boolean, param10:Boolean, param11:Boolean, param12:Boolean, param13:Boolean, param14:Boolean, param15:Boolean, param16:Boolean, param17:Boolean, param18:Boolean, param19:Boolean, param20:Boolean, param21:Boolean, param22:Boolean) : ProgramResource
{
var _loc25_:ByteArray = null;
var _loc26_:ByteArray = null;
var _loc23_:int = int(param1) | int(param2) << 1 | int(param3) << 2 | int(param4) << 3 | int(param5) << 4 | int(param6) << 5 | int(param7) << 6 | int(param8) << 7 | int(param9) << 8 | int(param10) << 9 | int(param11) << 10 | int(param12) << 11 | int(param13) << 12 | int(param14) << 13 | int(param15) << 14 | int(param16) << 15 | int(param17) << 16 | int(param18) << 17 | int(param19) << 18 | int(param20) << 19 | int(param21) << 20 | int(param22) << 21;
var _loc24_:ProgramResource = programs[_loc23_];
if(_loc24_ == null)
{
_loc25_ = new TextureMaterialVertexShader(!param22,param14 || param11 || param12 || param17,param13,param4,param14,param10,param2,param3,param3,param19).agalcode;
_loc26_ = new TextureMaterialFragmentShader(param6,param5,param7,param15,param16,param21,!param1 && !param16 && !param15,param8,param9,param3,param13,param11,param12,param17,param18,param14,param10,param2,param20).agalcode;
_loc24_ = new ProgramResource(_loc25_,_loc26_);
programs[_loc23_] = _loc24_;
}
return _loc24_;
}
override public function dispose() : void
{
this.disposeResource();
delete this;
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.