code
stringlengths 57
237k
|
|---|
package alternativa.tanks.model.tempdiscount
{
import alternativa.init.Main;
import alternativa.model.IResourceLoadListener;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.locale.constants.TextConst;
import alternativa.types.Long;
import assets.icons.GarageItemBackground;
import controls.DefaultButton;
import controls.Label;
import controls.TankWindowInner;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import forms.TankWindowWithHeader;
import scpacker.resource.ResourceType;
import scpacker.resource.ResourceUtil;
import scpacker.resource.images.ImageResource;
public class TempDiscountWindow extends Sprite implements IResourceLoadListener
{
[Embed(source="1036.png")]
private static var _discountImage:Class;
private static var discountBitmap:BitmapData = new _discountImage().bitmapData;
private var window:TankWindowWithHeader;
private var innerWindow:TankWindowInner;
private var congratsText:Label;
private var panel:GarageItemBackground;
private var preview:Bitmap;
private var discount:String;
public var closeBtn:DefaultButton;
public var windowWidth;
public var windowHeight;
public function TempDiscountWindow(congrats:String, itemId:String, disc:String)
{
var discountLabel:Bitmap = null;
var label:Label = null;
this.window = TankWindowWithHeader.createWindow("СКИДКА");
this.innerWindow = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.congratsText = new Label();
this.closeBtn = new DefaultButton();
super();
this.window.width = 350;
this.windowWidth = 350;
this.window.height = 280;
this.windowHeight = 280;
addChild(this.window);
this.innerWindow.width = this.window.width - 30;
this.innerWindow.height = this.window.height - 65;
this.innerWindow.x = 15;
this.innerWindow.y = 15;
addChild(this.innerWindow);
this.congratsText.color = 5898034;
this.congratsText.text = congrats;
this.congratsText.x = this.innerWindow.width / 2 - this.congratsText.width / 2;
this.congratsText.y = 10;
this.innerWindow.addChild(this.congratsText);
this.panel = new GarageItemBackground(GarageItemBackground.ENGINE_NORMAL);
this.panel.x = this.innerWindow.width / 2 - this.panel.width / 2;
this.panel.y = this.congratsText.y + this.congratsText.height + 10;
this.innerWindow.addChild(this.panel);
this.discount = disc;
var imageResource:ImageResource = (ResourceUtil.getResource(ResourceType.IMAGE,itemId + "_preview") as ImageResource).clone();
if(imageResource != null)
{
if(imageResource.loaded())
{
this.preview = new Bitmap(imageResource.bitmapData as BitmapData);
this.preview.x = this.panel.width / 2 - this.preview.width / 2;
this.preview.y = this.panel.height / 2 - this.preview.height / 2;
this.panel.addChild(this.preview);
discountLabel = new Bitmap(discountBitmap);
discountLabel.x = 0;
discountLabel.y = this.panel.height - discountLabel.height;
this.panel.addChild(discountLabel);
label = new Label();
label.color = 16777215;
label.align = TextFormatAlign.LEFT;
label.text = "-" + this.discount + "%";
label.height = 35;
label.width = 100;
label.thickness = 0;
label.autoSize = TextFieldAutoSize.NONE;
label.size = 16;
label.x = 10;
label.y = 90;
label.rotation = 45;
this.panel.addChild(label);
}
else if(imageResource != null && !imageResource.loaded())
{
imageResource.completeLoadListener = this;
imageResource.load();
}
}
this.closeBtn.x = this.window.width - this.closeBtn.width - 15;
this.closeBtn.y = this.window.height - this.closeBtn.height - 15;
this.closeBtn.label = ILocaleService(Main.osgi.getService(ILocaleService)).getText(TextConst.FREE_BONUSES_WINDOW_BUTTON_CLOSE_TEXT);
addChild(this.closeBtn);
}
public function resourceLoaded(resource:Object) : void
{
this.preview = new Bitmap((resource as ImageResource).bitmapData as BitmapData);
this.preview.x = this.panel.width / 2 - this.preview.width / 2;
this.preview.y = this.panel.height / 2 - this.preview.height / 2;
this.panel.addChild(this.preview);
var discountLabel:Bitmap = new Bitmap(discountBitmap);
discountLabel.x = 0;
discountLabel.y = this.panel.height - discountLabel.height;
this.panel.addChild(discountLabel);
var label:Label = new Label();
label.color = 16777215;
label.align = TextFormatAlign.LEFT;
label.text = "-" + this.discount + "%";
label.height = 35;
label.width = 100;
label.thickness = 0;
label.autoSize = TextFieldAutoSize.NONE;
label.size = 16;
label.x = 10;
label.y = 90;
label.rotation = 45;
this.panel.addChild(label);
}
public function resourceUnloaded(resource:Long) : void
{
}
}
}
|
package alternativa.tanks.models.clan.incoming {
import alternativa.tanks.gui.clanmanagement.ClanIncomingRequestsDialog;
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadListener;
import projects.tanks.client.clans.clan.incoming.ClanIncomingModelBase;
import projects.tanks.client.clans.clan.incoming.IClanIncomingModelBase;
[ModelInfo]
public class ClanIncomingModel extends ClanIncomingModelBase implements IClanIncomingModelBase, IClanIncomingModel, ObjectLoadListener {
private var _users:Vector.<Long>;
private var _incomingWindow:ClanIncomingRequestsDialog;
public function ClanIncomingModel() {
super();
}
public function objectLoaded() : void {
this._users = getInitParam().objects.concat();
}
public function onAdding(param1:Long) : void {
this._users.push(param1);
if(this._incomingWindow != null) {
this._incomingWindow.addUser(param1);
}
}
public function onRemoved(param1:Long) : void {
var local2:Number = Number(this._users.indexOf(param1));
this._users.splice(local2,1);
if(this._incomingWindow != null) {
this._incomingWindow.removeUser(param1);
}
}
public function getUsers() : Vector.<Long> {
return this._users;
}
public function setClanIncomingWindow(param1:ClanIncomingRequestsDialog) : void {
this._incomingWindow = param1;
}
}
}
|
package projects.tanks.client.panel.model.tutorialhints {
public class TutorialHintsCC {
private var _tutorialHintsData:TutorialHintsData;
public function TutorialHintsCC(param1:TutorialHintsData = null) {
super();
this._tutorialHintsData = param1;
}
public function get tutorialHintsData() : TutorialHintsData {
return this._tutorialHintsData;
}
public function set tutorialHintsData(param1:TutorialHintsData) : void {
this._tutorialHintsData = param1;
}
public function toString() : String {
var local1:String = "TutorialHintsCC [";
local1 += "tutorialHintsData = " + this.tutorialHintsData + " ";
return local1 + "]";
}
}
}
|
package platform.clients.fp10.libraries.alternativapartners.models.socialnetworkparameters {
[ModelInterface]
public interface SocialNetworkParameters {
function hasOwnPaymentSystem() : Boolean;
function hasSocialFunction() : Boolean;
}
}
|
package alternativa.tanks.model
{
import alternativa.object.ClientObject;
public interface IItem
{
function getParams(param1:ClientObject) : ItemParams;
}
}
|
package projects.tanks.client.panel.model.bonus.showing.items {
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 BonusItemModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function BonusItemModelServer(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.battlefield.models.tankparts.weapon.terminator.sfx {
public interface ITerminatorSFXModelBase {
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.rocketlauncher {
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 RocketLauncherModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function RocketLauncherModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.models.battle.battlefield {
public class BattleUnloadEvent {
public function BattleUnloadEvent() {
super();
}
}
}
|
package alternativa.tanks.models.statistics {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.battle.events.BattleEventDispatcher;
import alternativa.tanks.battle.events.BattleEventListener;
import alternativa.tanks.battle.events.death.TankKilledEvent;
import alternativa.tanks.battle.events.death.TankReloadedEvent;
import alternativa.tanks.battle.events.death.TankSuicideEvent;
import alternativa.tanks.models.battle.gui.BattlefieldGUI;
import alternativa.tanks.models.battle.gui.gui.statistics.messages.UserAction;
import platform.client.fp10.core.type.AutoClosable;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.types.DamageType;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class TankKillLogger implements AutoClosable, BattleEventListener {
[Inject]
public static var battleEventDispatcher:BattleEventDispatcher;
[Inject]
public static var localeService:ILocaleService;
private var battleObject:IGameObject;
private var suicideMessage:String;
private var killMessage:String;
private var reloadedMessage:String;
public function TankKillLogger(param1:IGameObject) {
super();
this.battleObject = param1;
this.init();
}
private function init() : void {
this.suicideMessage = localeService.getText(TanksLocale.TEXT_BATTLE_PLAYER_SUICIDED);
this.killMessage = localeService.getText(TanksLocale.TEXT_BATTLE_PLAYER_KILLED);
this.reloadedMessage = localeService.getText(TanksLocale.TEXT_REARM_BATTLE_EVENT);
battleEventDispatcher.addBattleEventListener(TankKilledEvent,this);
battleEventDispatcher.addBattleEventListener(TankSuicideEvent,this);
battleEventDispatcher.addBattleEventListener(TankReloadedEvent,this);
}
public function handleBattleEvent(param1:Object) : void {
var local3:TankKilledEvent = null;
var local4:TankSuicideEvent = null;
var local5:TankReloadedEvent = null;
var local2:BattlefieldGUI = BattlefieldGUI(this.battleObject.adapt(BattlefieldGUI));
if(param1 is TankKilledEvent) {
local3 = TankKilledEvent(param1);
if(local3.killerId != local3.victimId) {
if(local3.damageType != DamageType.BOMB) {
local2.logKillAction(local3.killerId,local3.victimId,local3.damageType);
}
} else {
local2.showUserBattleLogMessage(local3.victimId,UserAction.PLAYER_SELF_DESTROY);
}
} else if(param1 is TankSuicideEvent) {
local4 = TankSuicideEvent(param1);
local2.showUserBattleLogMessage(local4.victim.id,UserAction.PLAYER_SELF_DESTROY);
} else if(param1 is TankReloadedEvent) {
local5 = TankReloadedEvent(param1);
local2.showUserBattleLogMessage(local5.userId,UserAction.PLAYER_CHANGE_EQUIPMENT);
}
}
[Obfuscation(rename="false")]
public function close() : void {
this.battleObject = null;
battleEventDispatcher.removeBattleEventListener(TankKilledEvent,this);
battleEventDispatcher.removeBattleEventListener(TankSuicideEvent,this);
battleEventDispatcher.removeBattleEventListener(TankReloadedEvent,this);
}
}
}
|
package alternativa.tanks.models.panel.create {
import alternativa.osgi.service.locale.ILocaleService;
import flash.events.EventDispatcher;
import projects.tanks.client.clans.clan.clanflag.ClanFlag;
public class ClanCreateServiceImpl extends EventDispatcher implements ClanCreateService {
[Inject]
public static var localeService:ILocaleService;
private var _flags:Vector.<ClanFlag> = new Vector.<ClanFlag>();
public function ClanCreateServiceImpl() {
super();
}
public function validateName(param1:String) : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.VALIDATE_NAME,param1));
}
public function validateTag(param1:String) : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.VALIDATE_TAG,null,param1));
}
public function createClan(param1:String, param2:String, param3:String, param4:ClanFlag) : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.CREATE,param1,param2,param3,param4));
}
public function incorrectName() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.INCORRECT_NAME));
}
public function incorrectTag() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.INCORRECT_TAG));
}
public function correctName() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.CORRECT_NAME));
}
public function correctTag() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.CORRECT_TAG));
}
public function notUniqueName() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.NOT_UNIQUE_NAME));
}
public function notUniqueTag() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.NOT_UNIQUE_TAG));
}
public function otherError() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.OTHER_ERROR));
}
public function alreadyInClan() : void {
dispatchEvent(new CreateClanServiceEvent(CreateClanServiceEvent.ALREADY_IN_CLAN));
}
public function get flags() : Vector.<ClanFlag> {
return this._flags;
}
public function set flags(param1:Vector.<ClanFlag>) : void {
this._flags = param1;
}
public function get defaultFlag() : ClanFlag {
var local1:ClanFlag = null;
for each(local1 in this._flags) {
if(local1.name.toLowerCase() == localeService.language.toLowerCase()) {
return local1;
}
}
return this._flags[0];
}
}
}
|
package platform.client.fp10.core.resource {
public class ResourceLogChannel {
public static const NAME:String = "resource";
public function ResourceLogChannel() {
super();
}
}
}
|
package projects.tanks.client.panel.model.battleinvite {
import alternativa.types.Long;
public interface IBattleInviteModelBase {
function accepted(param1:Long) : void;
function notify(param1:Long, param2:BattleInviteMessage) : void;
function rejected(param1:Long) : void;
function rejectedBattleNotFound(param1:Long) : void;
function rejectedInvitationToBattleDisabled(param1:Long) : void;
function rejectedPanelNotLoaded(param1:Long) : void;
function rejectedUserAlreadyInBattle(param1:Long) : void;
function rejectedUserInMatchBattle(param1:Long) : void;
function rejectedUserOffline(param1:Long) : void;
}
}
|
package alternativa.physics.contactislands {
import alternativa.physics.BodyContact;
import alternativa.physics.PhysicsScene;
import alternativa.physics.QuickUnionFind;
import alternativa.utils.clearDictionary;
import flash.utils.Dictionary;
public class IslandsGenerator {
public const contactIslands:Vector.<ContactIsland> = new Vector.<ContactIsland>();
private const contactIslandsByRootId:Dictionary = new Dictionary();
private const uf:QuickUnionFind = new QuickUnionFind();
private var physicsScene:PhysicsScene;
public function IslandsGenerator(param1:PhysicsScene) {
super();
this.physicsScene = param1;
}
public function generate(param1:Vector.<BodyContact>, param2:int) : void {
this.createUnions(param1,param2);
this.createIslands(param1);
}
private function createUnions(param1:Vector.<BodyContact>, param2:int) : void {
var local5:BodyContact = null;
this.uf.init(param2);
var local3:int = int(param1.length);
var local4:int = 0;
while(local4 < local3) {
local5 = param1[local4];
if(local5.body1.movable && local5.body2.movable) {
this.uf.union(local5.body1.id,local5.body2.id);
}
local4++;
}
}
private function createIslands(param1:Vector.<BodyContact>) : void {
var local6:BodyContact = null;
var local7:int = 0;
var local8:ContactIsland = null;
var local2:int = int(param1.length);
var local3:int = 0;
while(local3 < local2) {
local6 = param1[local3];
if(local6.body1.movable) {
local7 = this.uf.root(local6.body1.id);
} else {
local7 = this.uf.root(local6.body2.id);
}
local8 = this.contactIslandsByRootId[local7];
if(local8 == null) {
local8 = ContactIsland.create();
this.contactIslands[this.contactIslands.length] = local8;
this.contactIslandsByRootId[local7] = local8;
}
local8.bodyContacts[local8.bodyContacts.length] = local6;
local3++;
}
var local4:int = int(this.contactIslands.length);
var local5:int = 0;
while(local5 < local4) {
local8 = this.contactIslands[local5];
local8.init(this.physicsScene);
local5++;
}
clearDictionary(this.contactIslandsByRootId);
}
public function clear() : void {
var local3:ContactIsland = null;
var local1:int = int(this.contactIslands.length);
var local2:int = 0;
while(local2 < local1) {
local3 = this.contactIslands[local2];
local3.dispose();
local2++;
}
this.contactIslands.length = 0;
}
}
}
|
package alternativa.tanks.gui.category {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.category.ItemCategoryButton_droneIconClass.png")]
public class ItemCategoryButton_droneIconClass extends BitmapAsset {
public function ItemCategoryButton_droneIconClass() {
super();
}
}
}
|
package controls.windowinner {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.windowinner.WindowInner_rightClass.png")]
public class WindowInner_rightClass extends BitmapAsset {
public function WindowInner_rightClass() {
super();
}
}
}
|
package {
import assets.scroller.ScrollTrackSkin;
[Embed(source="/_assets/assets.swf", symbol="symbol48")]
public dynamic class ScrollTrack_skin extends ScrollTrackSkin {
public function ScrollTrack_skin() {
super();
}
}
}
|
package projects.tanks.client.entrance.model.entrance.partners {
public class CompositePartnerCC {
private var _forceSocialNetwork:String;
public function CompositePartnerCC(param1:String = null) {
super();
this._forceSocialNetwork = param1;
}
public function get forceSocialNetwork() : String {
return this._forceSocialNetwork;
}
public function set forceSocialNetwork(param1:String) : void {
this._forceSocialNetwork = param1;
}
public function toString() : String {
var local1:String = "CompositePartnerCC [";
local1 += "forceSocialNetwork = " + this.forceSocialNetwork + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.gui.settings.tabs.game {
import alternativa.tanks.gui.settings.SettingEvent;
public class ReceivePersonalMessagesSettingEvent extends SettingEvent {
public static var RECEIVE_PERSONAL_MESSAGES_CHANGE:String = "ReceivePersonalMessagesSettingEvent";
private var value:Boolean;
public function ReceivePersonalMessagesSettingEvent(param1:String, param2:Boolean) {
super(param1);
this.value = param2;
}
public function getValue() : Boolean {
return this.value;
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.gate2shop {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
public class Gate2ShopPaymentModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:Gate2ShopPaymentModelServer;
private var client:IGate2ShopPaymentModelBase = IGate2ShopPaymentModelBase(this);
private var modelId:Long = Long.getLong(1004681856,-270220968);
private var _receiveUrlId:Long = Long.getLong(1018287029,-103071689);
private var _receiveUrl_urlCodec:ICodec;
private var _showEmailIsBusyId:Long = Long.getLong(996435325,2910117);
private var _showEmailIsBusy_emailCodec:ICodec;
private var _showEmailIsForbiddenId:Long = Long.getLong(1910558556,-1549323827);
private var _showEmailIsForbidden_emailCodec:ICodec;
private var _showEmailIsFreeId:Long = Long.getLong(996435325,3025944);
private var _showEmailIsFree_emailCodec:ICodec;
public function Gate2ShopPaymentModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new Gate2ShopPaymentModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(Gate2ShopPaymentCC,false)));
this._receiveUrl_urlCodec = this._protocol.getCodec(new TypeCodecInfo(PaymentRequestUrl,false));
this._showEmailIsBusy_emailCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._showEmailIsForbidden_emailCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
this._showEmailIsFree_emailCodec = this._protocol.getCodec(new TypeCodecInfo(String,false));
}
protected function getInitParam() : Gate2ShopPaymentCC {
return Gate2ShopPaymentCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._receiveUrlId:
this.client.receiveUrl(PaymentRequestUrl(this._receiveUrl_urlCodec.decode(param2)));
break;
case this._showEmailIsBusyId:
this.client.showEmailIsBusy(String(this._showEmailIsBusy_emailCodec.decode(param2)));
break;
case this._showEmailIsForbiddenId:
this.client.showEmailIsForbidden(String(this._showEmailIsForbidden_emailCodec.decode(param2)));
break;
case this._showEmailIsFreeId:
this.client.showEmailIsFree(String(this._showEmailIsFree_emailCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.model.user
{
public interface IUserDataListener
{
function userDataChanged(param1:String) : void;
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_instantHealClass.png")]
public class ItemInfoPanelBitmaps_instantHealClass extends BitmapAsset {
public function ItemInfoPanelBitmaps_instantHealClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.effects.activeafterdeath {
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 ActiveAfterDeathModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ActiveAfterDeathModelServer;
private var client:IActiveAfterDeathModelBase = IActiveAfterDeathModelBase(this);
private var modelId:Long = Long.getLong(1901483815,1408063475);
public function ActiveAfterDeathModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ActiveAfterDeathModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ActiveAfterDeathCC,false)));
}
protected function getInitParam() : ActiveAfterDeathCC {
return ActiveAfterDeathCC(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.engine3d.animation.events {
import alternativa.engine3d.animation.AnimationNotify;
import flash.events.Event;
public class NotifyEvent extends Event {
public static const NOTIFY:String = "notify";
public function NotifyEvent(param1:AnimationNotify) {
super(NOTIFY);
}
public function get notify() : AnimationNotify {
return AnimationNotify(target);
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.artillery.sfx {
public interface IArtillerySfxModelBase {
}
}
|
package alternativa.tanks.gui.presents {
import flash.events.Event;
public class NewPresentsAlertEvent extends Event {
public static const ACCEPT:String = "NewPresentsAlertEvent.Accept";
public static const CANCEL:String = "NewPresentsAlertEvent.Cancel";
public function NewPresentsAlertEvent(param1:String) {
super(param1);
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.kits.paypal {
import alternativa.tanks.gui.shop.shopitems.item.base.ShopItemButton;
import alternativa.tanks.gui.shop.shopitems.item.kits.SpecialKitIcons;
import alternativa.tanks.gui.shop.shopitems.item.utils.FormatUtils;
import alternativa.tanks.model.payment.shop.specialkit.SpecialKitPackage;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.text.TextFieldAutoSize;
import forms.ColorConstants;
import platform.client.fp10.core.type.IGameObject;
public class PayPalKitPackageButton extends ShopItemButton {
private static const SIDE_PADDING:int = 25;
private static const TOP_PADDING:int = 10;
private var crystalIcon:Bitmap;
private var premiumIcon:Bitmap;
private var payPalIcon:Bitmap;
public function PayPalKitPackageButton(param1:IGameObject) {
super(param1,new PayPallKitShopItemSkin());
}
override protected function initOldPriceParams() : void {
super.initOldPriceParams();
strikeoutLineThickness = 3;
oldPriceLabelSize = 35;
}
override protected function initLabels() : void {
this.addCrystalsAndPriceLabels();
this.addPremiumIconAndLabel();
this.addSuppliesIconAndLabel();
}
private function addCrystalsAndPriceLabels() : void {
var local1:LabelBase = null;
local1 = new LabelBase();
local1.text = FormatUtils.valueToString(this.newbieKitPackage.getCrystalsAmount(),0,false);
local1.color = ColorConstants.SHOP_CRYSTALS_TEXT_LABEL_COLOR;
local1.autoSize = TextFieldAutoSize.LEFT;
local1.size = 75;
local1.x = SIDE_PADDING;
local1.y = TOP_PADDING;
local1.bold = true;
local1.mouseEnabled = false;
addChild(local1);
this.crystalIcon = new Bitmap(SpecialKitIcons.crystal);
this.crystalIcon.x = local1.x + local1.width + 5;
this.crystalIcon.y = local1.y + 20;
addChild(this.crystalIcon);
addPriceLabel();
priceLabel.size = 35;
priceLabel.x = local1.x;
priceLabel.y = local1.y + local1.height - 12;
this.addPayPalIcon();
}
private function addPayPalIcon() : void {
this.payPalIcon = new Bitmap(PayPalKitPackageItemIcons.payPalIcon);
this.payPalIcon.x = priceLabel.x + 206;
this.payPalIcon.y = priceLabel.y + 5;
addChild(this.payPalIcon);
}
private function addPremiumIconAndLabel() : void {
var local1:LabelBase = null;
this.premiumIcon = new Bitmap(SpecialKitIcons.premium);
this.premiumIcon.x = this.crystalIcon.x + this.crystalIcon.height + 100;
this.premiumIcon.y = TOP_PADDING + 5;
addChild(this.premiumIcon);
local1 = new LabelBase();
local1.text = "+" + timeUnitService.getLocalizedDaysString(this.newbieKitPackage.getPremiumDurationInDays());
local1.x = this.premiumIcon.x + 12;
local1.y = this.premiumIcon.y + this.premiumIcon.height - 10;
local1.color = ColorConstants.WHITE;
local1.autoSize = TextFieldAutoSize.LEFT;
local1.size = 35;
local1.bold = true;
local1.mouseEnabled = false;
addChild(local1);
}
private function addSuppliesIconAndLabel() : void {
var local1:Bitmap = new Bitmap(SpecialKitIcons.supplies);
local1.x = this.premiumIcon.x + this.premiumIcon.width + 30;
local1.y = -8;
addChild(local1);
var local2:LabelBase = new LabelBase();
local2.text = "+" + this.newbieKitPackage.getEverySupplyAmount().toString();
local2.x = local1.x - 12;
local2.y = TOP_PADDING;
local2.color = ColorConstants.WHITE;
local2.autoSize = TextFieldAutoSize.LEFT;
local2.size = 71;
local2.bold = true;
local2.mouseEnabled = false;
addChild(local2);
}
private function get newbieKitPackage() : SpecialKitPackage {
return SpecialKitPackage(item.adapt(SpecialKitPackage));
}
override public function get widthInCells() : int {
return 3;
}
override protected function initPreview() : void {
}
override protected function setPreview() : void {
}
override protected function align() : void {
if(hasDiscount()) {
oldPriceSprite.x = SIDE_PADDING;
priceLabel.x = oldPriceSprite.x + oldPriceSprite.width + 10;
oldPriceSprite.y = priceLabel.y;
}
}
}
}
|
package alternativa.tanks.models.battlefield.gui.statistics.field
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class CTFScoreIndicator_flagBlueClass extends BitmapAsset
{
public function CTFScoreIndicator_flagBlueClass()
{
super();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.cp {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.battle.cp.ClientPointData;
public class VectorCodecClientPointDataLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecClientPointDataLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ClientPointData,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = int(LengthCodecHelper.decodeLength(param1));
var local3:Vector.<ClientPointData> = new Vector.<ClientPointData>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ClientPointData(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ClientPointData = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ClientPointData> = Vector.<ClientPointData>(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.model.item.skins {
import platform.client.fp10.core.type.IGameObject;
[ModelInterface]
public interface AvailableSkins {
function getSkins() : Vector.<IGameObject>;
}
}
|
package _codec.projects.tanks.client.commons.types {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.EnumCodecInfo;
import projects.tanks.client.commons.types.ItemCategoryEnum;
public class VectorCodecItemCategoryEnumLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecItemCategoryEnumLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(ItemCategoryEnum,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.<ItemCategoryEnum> = new Vector.<ItemCategoryEnum>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ItemCategoryEnum(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ItemCategoryEnum = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ItemCategoryEnum> = Vector.<ItemCategoryEnum>(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.model.gift
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class GilfRoller_roller extends BitmapAsset
{
public function GilfRoller_roller()
{
super();
}
}
}
|
package alternativa.register
{
import alternativa.init.Main;
import alternativa.model.IObjectLoadListener;
import alternativa.network.ICommandHandler;
import alternativa.object.ClientObject;
import alternativa.osgi.service.log.ILogService;
import alternativa.osgi.service.log.LogLevel;
import alternativa.service.IModelService;
import alternativa.service.Logger;
import flash.utils.Dictionary;
public class ObjectRegister
{
private static const CHANNEL:String = "OBJREG";
private static var counter:int;
private var objects:Dictionary;
private var _objectsList:Array;
private var commandHandler:ICommandHandler;
public var id:int;
public var space:SpaceInfo;
public function ObjectRegister(commandHandler:ICommandHandler)
{
super();
this.commandHandler = commandHandler;
this.objects = new Dictionary();
this._objectsList = new Array();
this.id = counter++;
}
public function createObject(objectId:String, clientClass:ClientClass, name:String) : ClientObject
{
var object:ClientObject = null;
if(this.objects[objectId] != null)
{
Logger.log(LogLevel.LOG_ERROR,"FATAL ERROR: ПОПЫТКА СОЗДАНИЯ 2-ГО ДИСПЕТЧЕРА!!! (spaceId: " + this.space.id + ")");
}
else if(this.objects[objectId] != null)
{
Logger.log(LogLevel.LOG_ERROR,"FATAL ERROR: Повторная загрузка объекта (objectId: " + objectId + ", name: " + name + ")");
}
else
{
object = new ClientObject(objectId,clientClass,name,this.commandHandler);
this.registerObject(object);
Main.writeVarsToConsoleChannel(CHANNEL,"Object ADDED: space id=%1, register id=%2, object id=%3",this.space == null ? "none" : this.space.id,this.id,objectId);
}
return this.objects[objectId];
}
public function destroyObject(objectId:String) : void
{
var models:Vector.<String> = null;
var i:int = 0;
var m:IObjectLoadListener = null;
var clientObject:ClientObject = this.objects[objectId];
if(clientObject == null)
{
(Main.osgi.getService(ILogService) as ILogService).log(LogLevel.LOG_ERROR,"[ObjectRegister::destroyObject] ERROR: clientObject == null! (id: " + objectId + ")");
}
else
{
Main.writeVarsToConsoleChannel(CHANNEL,"Destroying object: space id=%1, register id=%2, object id=%3",this.space == null ? "none" : this.space.id,this.id,objectId);
models = clientObject.getModels();
if(models != null)
{
for(i = 0; i < models.length; i++)
{
m = IModelService(Main.osgi.getService(IModelService)).getModel(models[i]) as IObjectLoadListener;
if(m != null)
{
m.objectUnloaded(clientObject);
}
}
}
this._objectsList.splice(this._objectsList.indexOf(this.objects[objectId]),1);
delete this.objects[objectId];
Main.writeVarsToConsoleChannel(CHANNEL,"Object DESTROYED");
}
}
private function registerObject(object:ClientObject) : void
{
this.objects[object.id] = object;
this._objectsList.push(object);
object.register = this;
}
public function getObject(id:String) : ClientObject
{
return this.objects[id];
}
public function getObjects() : Dictionary
{
return this.objects;
}
public function get objectsList() : Array
{
return this._objectsList;
}
}
}
|
package assets.icons {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.icons.play_icons_ALL.png")]
public dynamic class play_icons_ALL extends BitmapData {
public function play_icons_ALL(param1:int = 46, param2:int = 26) {
super(param1,param2);
}
}
}
|
package alternativa.tanks.servermodels.login {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ILoginEvents implements ILogin {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function ILoginEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function login(param1:String, param2:String, param3:Boolean) : void {
var i:int = 0;
var m:ILogin = null;
var uid:String = param1;
var password:String = param2;
var remember:Boolean = param3;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = ILogin(this.impl[i]);
m.login(uid,password,remember);
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.weapons.artillery {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.tankparts.weapons.artillery.ArtilleryCC;
public class VectorCodecArtilleryCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecArtilleryCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(ArtilleryCC,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = int(LengthCodecHelper.decodeLength(param1));
var local3:Vector.<ArtilleryCC> = new Vector.<ArtilleryCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = ArtilleryCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:ArtilleryCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<ArtilleryCC> = Vector.<ArtilleryCC>(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.view.mainview.button {
import alternativa.tanks.controllers.mainview.SwitchToBattleSelectEvent;
import flash.display.Bitmap;
import flash.events.MouseEvent;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class ShowBattleSelectButton extends MatchmakingButton {
private static const battlesBtnClass:Class = ShowBattleSelectButton_battlesBtnClass;
private static const battlesButton:Bitmap = new Bitmap(new battlesBtnClass().bitmapData);
public function ShowBattleSelectButton(param1:int) {
super(TanksLocale.TEXT_BATTLE_LIST_NAME,TanksLocale.TEXT_BATTLE_LIST_DESCRIPTION,battlesButton,null,param1);
graphics.drawRect(0,0,0,frame.height + 2 * PADDING);
button.setText(localeService.getText(TanksLocale.TEXT_OPEN_BATTLE_LIST_BUTTON));
}
override protected function onClick(param1:MouseEvent) : void {
dispatchEvent(new SwitchToBattleSelectEvent());
}
override public function setSpectatorsButtonVisible(param1:Boolean) : void {
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.cashpackage {
import alternativa.tanks.gui.shop.shopitems.item.base.ShopItemButton;
import alternativa.tanks.gui.shop.shopitems.item.base.ShopItemSkins;
import alternativa.tanks.gui.shop.shopitems.item.crystalitem.CrystalPackageItemIcons;
import alternativa.tanks.gui.shop.shopitems.item.utils.FormatUtils;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import alternativa.tanks.model.payment.shop.cashpackage.CashPackage;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.text.TextFieldAutoSize;
import forms.ColorConstants;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class CashPackageButton extends ShopItemButton {
[Inject]
public static var paymentWindowService:PaymentWindowService;
protected static const LEFT_PADDING:int = 18;
private static const RIGHT_PADDING:int = 18;
private static const TOP_PADDING:int = 17;
protected static const BOTTOM_PADDING:int = 17;
private static const CASH_ICON_X:int = 153;
private static const CASH_ICON_Y:int = -2;
protected var cashLabel:LabelBase;
protected var cashIcon:Bitmap;
private var bonusCashLabel:LabelBase;
private var bonusCashSecondLabel:LabelBase;
private var bonusCashIcon:Bitmap;
public function CashPackageButton(param1:IGameObject) {
super(param1,ShopItemSkins.GREEN);
}
override protected function initLabels() : void {
if(this.hasBonusCash) {
this.initPackageWithBonusAmount();
} else {
this.initPackageWithoutBonus();
}
this.initCashAmountAndPriceInnerLabels();
}
private function getCashLabelSize() : int {
switch(localeService.language) {
case "fa":
return 25;
default:
return 30;
}
}
private function getBonusSecondCashLabelSize() : int {
switch(localeService.language) {
case "fa":
return 15;
default:
return 19;
}
}
private function getBonusCashLabelSize() : int {
switch(localeService.language) {
case "fa":
return 15;
default:
return 22;
}
}
private function initCashAmountAndPriceInnerLabels() : void {
this.cashLabel = new LabelBase();
this.cashLabel.text = FormatUtils.valueToString(this.cashPackage.getAmount(),0,false);
this.cashLabel.color = ColorConstants.SHOP_CRYSTALS_TEXT_LABEL_COLOR;
this.cashLabel.autoSize = TextFieldAutoSize.LEFT;
this.cashLabel.size = this.getCashLabelSize();
this.cashLabel.bold = true;
this.cashLabel.mouseEnabled = false;
addChild(this.cashLabel);
this.cashIcon = new Bitmap(CrystalPackageItemIcons.crystalBlue);
addChild(this.cashIcon);
addPriceLabel();
}
private function initPackageWithBonusAmount() : void {
if(paymentWindowService.hasBonusForItem(item)) {
setSkin(ShopItemSkins.RED);
}
this.bonusCashLabel = new LabelBase();
this.bonusCashLabel.text = "+" + FormatUtils.valueToString(this.cashPackage.getBonusAmount(),0,false);
this.bonusCashLabel.color = 16777215;
this.bonusCashLabel.autoSize = TextFieldAutoSize.LEFT;
this.bonusCashLabel.size = this.getBonusCashLabelSize();
this.bonusCashLabel.bold = true;
this.bonusCashLabel.mouseEnabled = false;
addChild(this.bonusCashLabel);
this.bonusCashSecondLabel = new LabelBase();
this.bonusCashSecondLabel.text = localeService.getText(TanksLocale.TEXT_CRYSTALS_PACKAGE_AS_GIFT);
this.bonusCashSecondLabel.color = 16777215;
this.bonusCashSecondLabel.autoSize = TextFieldAutoSize.LEFT;
this.bonusCashSecondLabel.size = this.getBonusSecondCashLabelSize();
this.bonusCashSecondLabel.mouseEnabled = false;
addChild(this.bonusCashSecondLabel);
this.bonusCashIcon = new Bitmap(CrystalPackageItemIcons.crystalWhite);
addChild(this.bonusCashIcon);
}
private function initPackageWithoutBonus() : void {
setSkin(ShopItemSkins.GREY);
}
private function get hasBonusCash() : Boolean {
return this.cashPackage.getBonusAmount() != 0;
}
private function get cashPackage() : CashPackage {
return CashPackage(item.adapt(CashPackage));
}
override protected function align() : void {
this.cashLabel.x = LEFT_PADDING;
this.cashLabel.y = TOP_PADDING;
this.cashIcon.x = this.cashLabel.x + this.cashLabel.width + 3;
this.cashIcon.y = TOP_PADDING + 8;
priceLabel.x = LEFT_PADDING;
priceLabel.y = this.cashLabel.y + this.cashLabel.height - 5;
if(preview != null) {
preview.x = CASH_ICON_X;
preview.y = CASH_ICON_Y;
}
if(this.hasBonusCash) {
this.bonusCashIcon.x = WIDTH - RIGHT_PADDING - this.bonusCashIcon.width;
this.bonusCashLabel.x = this.bonusCashIcon.x - this.bonusCashLabel.width;
this.bonusCashSecondLabel.x = this.bonusCashLabel.x;
this.bonusCashSecondLabel.y = HEIGHT - BOTTOM_PADDING - this.bonusCashSecondLabel.height;
this.bonusCashLabel.y = this.bonusCashSecondLabel.y - this.bonusCashSecondLabel.height + 4;
this.bonusCashIcon.y = this.bonusCashLabel.y + 5;
}
if(hasDiscount()) {
oldPriceSprite.x = priceLabel.x;
oldPriceSprite.y = priceLabel.y + priceLabel.height - 5;
}
}
}
}
|
/**
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
* If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
* You may add additional accurate notices of copyright ownership.
*
* It is desirable to notify that Covered Software was "Powered by AlternativaPlatform" with link to http://www.alternativaplatform.com/
* */
package alternativa.osgi.service.clientlog {
/**
* @private
*/
public interface IClientLogChannelListener {
function onLogEntryAdded(channelName:String, logText:String):void;
}
}
|
package alternativa.tanks.models.battlefield.gui.statistics.table
{
import alternativa.init.Main;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.locale.constants.TextConst;
import assets.scroller.color.ScrollThumbSkinBlue;
import assets.scroller.color.ScrollThumbSkinGreen;
import assets.scroller.color.ScrollThumbSkinRed;
import assets.scroller.color.ScrollTrackBlue;
import assets.scroller.color.ScrollTrackGreen;
import assets.scroller.color.ScrollTrackRed;
import controls.Label;
import controls.resultassets.ResultWindowBase;
import controls.resultassets.ResultWindowBlue;
import controls.resultassets.ResultWindowBlueHeader;
import controls.resultassets.ResultWindowGreen;
import controls.resultassets.ResultWindowGreenHeader;
import controls.resultassets.ResultWindowRed;
import controls.resultassets.ResultWindowRedHeader;
import fl.controls.List;
import fl.data.DataProvider;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import flash.utils.Dictionary;
public class ViewStatistics extends Sprite
{
public static const BLUE:int = 0;
public static const RED:int = 1;
public static const GREEN:int = 2;
private static const MIN_HEIGHT:int = 52;
private static const TABLE_MARGIN:int = 7;
private static const EXTRA_HEIGHT:int = 12;
private static const EXTRA_WIDTH:int = 20;
private static var scrollBarStyles:Object;
private var list:List;
private var dp:DataProvider;
private var inner:ResultWindowBase;
private var type:int;
private var localUserId:String;
private var finish:Boolean;
private var header:Sprite;
private var captionCallsign:String;
private var captionScore:String;
private var captionKills:String;
private var captionDeaths:String;
private var captionKDRatio:String;
private var captionReward:String;
public function ViewStatistics(type:int, localUserId:String, finish:Boolean)
{
this.dp = new DataProvider();
super();
if(scrollBarStyles == null)
{
this.initScrollBarStyles();
}
this.type = type;
this.localUserId = localUserId;
this.finish = finish;
this.tabEnabled = false;
this.tabChildren = false;
var localerService:ILocaleService = ILocaleService(Main.osgi.getService(ILocaleService));
this.captionCallsign = localerService.getText(TextConst.BATTLE_STAT_CALLSIGN);
this.captionScore = localerService.getText(TextConst.BATTLE_STAT_SCORE);
this.captionKills = localerService.getText(TextConst.BATTLE_STAT_KILLS);
this.captionDeaths = localerService.getText(TextConst.BATTLE_STAT_DEATHS);
this.captionKDRatio = localerService.getText(TextConst.BATTLE_STAT_KDRATIO);
this.captionReward = localerService.getText(TextConst.BATTLE_STAT_REWARD);
this.init();
}
private function initScrollBarStyles() : void
{
scrollBarStyles = {};
this.addScrollBarStyle("downArrowUpSkin",ScrollArrowDownGreen,ScrollArrowDownRed,ScrollArrowDownBlue);
this.addScrollBarStyle("downArrowDownSkin",ScrollArrowDownGreen,ScrollArrowDownRed,ScrollArrowDownBlue);
this.addScrollBarStyle("downArrowOverSkin",ScrollArrowDownGreen,ScrollArrowDownRed,ScrollArrowDownBlue);
this.addScrollBarStyle("downArrowDisabledSkin",ScrollArrowDownGreen,ScrollArrowDownRed,ScrollArrowDownBlue);
this.addScrollBarStyle("upArrowUpSkin",ScrollArrowUpGreen,ScrollArrowUpRed,ScrollArrowUpBlue);
this.addScrollBarStyle("upArrowDownSkin",ScrollArrowUpGreen,ScrollArrowUpRed,ScrollArrowUpBlue);
this.addScrollBarStyle("upArrowOverSkin",ScrollArrowUpGreen,ScrollArrowUpRed,ScrollArrowUpBlue);
this.addScrollBarStyle("upArrowDisabledSkin",ScrollArrowUpGreen,ScrollArrowUpRed,ScrollArrowUpBlue);
this.addScrollBarStyle("trackUpSkin",ScrollTrackGreen,ScrollTrackRed,ScrollTrackBlue);
this.addScrollBarStyle("trackDownSkin",ScrollTrackGreen,ScrollTrackRed,ScrollTrackBlue);
this.addScrollBarStyle("trackOverSkin",ScrollTrackGreen,ScrollTrackRed,ScrollTrackBlue);
this.addScrollBarStyle("trackDisabledSkin",ScrollTrackGreen,ScrollTrackRed,ScrollTrackBlue);
this.addScrollBarStyle("thumbUpSkin",ScrollThumbSkinGreen,ScrollThumbSkinRed,ScrollThumbSkinBlue);
this.addScrollBarStyle("thumbDownSkin",ScrollThumbSkinGreen,ScrollThumbSkinRed,ScrollThumbSkinBlue);
this.addScrollBarStyle("thumbOverSkin",ScrollThumbSkinGreen,ScrollThumbSkinRed,ScrollThumbSkinBlue);
this.addScrollBarStyle("thumbDisabledSkin",ScrollThumbSkinGreen,ScrollThumbSkinRed,ScrollThumbSkinBlue);
}
private function addScrollBarStyle(styleName:String, greenStyle:Class, redStyle:Class, blueStyle:Class) : void
{
var styles:Dictionary = new Dictionary();
styles[ViewStatistics.GREEN] = greenStyle;
styles[ViewStatistics.RED] = redStyle;
styles[ViewStatistics.BLUE] = blueStyle;
scrollBarStyles[styleName] = styles;
}
public function updatePlayer(id:Object, name:String, rank:int, kills:int, deaths:int, score:int, reward:int) : void
{
var dataItem:StatisticsData = new StatisticsData();
dataItem.id = id;
dataItem.playerRank = rank;
dataItem.playerName = name;
dataItem.kills = kills;
dataItem.deaths = deaths;
dataItem.score = score;
dataItem.reward = reward;
dataItem.type = this.type;
dataItem.self = id == this.localUserId;
var index:int = id == null ? int(int(-1)) : int(int(this.indexById(id)));
if(index < 0)
{
this.dp.addItem(dataItem);
}
else
{
this.dp.replaceItemAt(dataItem,index);
}
if(this.type == GREEN)
{
this.dp.sortOn(["kills","deaths"],[Array.DESCENDING | Array.NUMERIC,Array.NUMERIC]);
}
else
{
this.dp.sortOn(["score","kills","deaths"],[Array.DESCENDING | Array.NUMERIC,Array.DESCENDING | Array.NUMERIC,Array.NUMERIC]);
}
}
public function removePlayer(id:Object) : void
{
var index:int = this.indexById(id);
this.dp.removeItemAt(index);
}
public function removeAll() : void
{
this.dp.removeAll();
}
public function resize(maxHeight:Number) : void
{
var h:Number = (this.dp.length + 1) * TableConst.ROW_HEIGHT + EXTRA_HEIGHT;
if(h > maxHeight)
{
h = int(maxHeight / this.header.height) * this.header.height + EXTRA_HEIGHT;
}
this.inner.height = h < MIN_HEIGHT ? Number(Number(MIN_HEIGHT)) : Number(Number(h));
this.list.setSize(this.inner.width - 2 * TableConst.TABLE_MARGIN,this.inner.height - this.header.y - this.header.height - 5);
}
override public function get height() : Number
{
return this.inner.height;
}
public function get rowCount() : int
{
return this.dp.length;
}
private function indexById(id:Object) : int
{
var dataItem:StatisticsData = null;
var len:int = this.dp.length;
for(var i:int = 0; i < len; i++)
{
dataItem = this.dp.getItemAt(i) as StatisticsData;
if(dataItem != null && dataItem.id == id)
{
return i;
}
}
return -1;
}
private function setScrollbarStyle() : void
{
this.setListStyle("downArrowUpSkin");
this.setListStyle("downArrowDownSkin");
this.setListStyle("downArrowOverSkin");
this.setListStyle("downArrowDisabledSkin");
this.setListStyle("upArrowUpSkin");
this.setListStyle("upArrowDownSkin");
this.setListStyle("upArrowOverSkin");
this.setListStyle("upArrowDisabledSkin");
this.setListStyle("trackUpSkin");
this.setListStyle("trackDownSkin");
this.setListStyle("trackOverSkin");
this.setListStyle("trackDisabledSkin");
this.setListStyle("thumbUpSkin");
this.setListStyle("thumbDownSkin");
this.setListStyle("thumbOverSkin");
this.setListStyle("thumbDisabledSkin");
}
private function setListStyle(styleName:String) : void
{
this.list.setStyle(styleName,scrollBarStyles[styleName][this.type]);
}
private function init() : void
{
switch(this.type)
{
case RED:
this.inner = new ResultWindowRed();
break;
case GREEN:
this.inner = new ResultWindowGreen();
break;
case BLUE:
this.inner = new ResultWindowBlue();
}
this.inner.width = TableConst.LAST_COLUMN_EXTRA_WIDTH + 2 * TableConst.TABLE_MARGIN + TableConst.LABELS_OFFSET + TableConst.CALLSIGN_WIDTH + TableConst.KILLS_WIDTH + TableConst.DEATHS_WIDTH + TableConst.RATIO_WIDTH + (this.type != GREEN ? TableConst.SCORE_WIDTH : 0) + (!!this.finish ? TableConst.REWARD_WIDTH : 0) + EXTRA_WIDTH;
this.inner.height = MIN_HEIGHT;
addChild(this.inner);
this.header = this.getHeader();
this.inner.addChild(this.header);
this.header.x = TABLE_MARGIN;
this.header.y = TABLE_MARGIN;
this.dp = new DataProvider();
this.list = new List();
this.setScrollbarStyle();
this.inner.addChild(this.list);
this.list.rowHeight = TableConst.ROW_HEIGHT;
this.list.x = TABLE_MARGIN;
this.list.setStyle("cellRenderer",StatisticsListRenderer);
this.list.y = this.header.y + this.header.height;
this.list.focusEnabled = false;
this.list.dataProvider = this.dp;
}
private function getHeader() : Sprite
{
var bg:DisplayObject = null;
var color:uint = 0;
var label:Label = null;
switch(this.type)
{
case BLUE:
bg = new ResultWindowBlueHeader();
color = 11590;
break;
case GREEN:
bg = new ResultWindowGreenHeader();
color = 83457;
break;
case RED:
bg = new ResultWindowRedHeader();
color = 4655104;
}
var header:Sprite = new Sprite();
header.addChild(bg);
var x:int = TableConst.LABELS_OFFSET;
label = this.createHeaderLabel(header,this.captionCallsign,color,TextFormatAlign.LEFT,TableConst.CALLSIGN_WIDTH,x);
x += label.width;
if(this.type != GREEN)
{
label = this.createHeaderLabel(header,this.captionScore,color,TextFormatAlign.RIGHT,TableConst.SCORE_WIDTH,x);
x += label.width;
}
label = this.createHeaderLabel(header,this.captionKills,color,TextFormatAlign.RIGHT,TableConst.KILLS_WIDTH,x);
x += label.width;
label = this.createHeaderLabel(header,this.captionDeaths,color,TextFormatAlign.RIGHT,TableConst.DEATHS_WIDTH,x);
x += label.width;
label = this.createHeaderLabel(header,this.captionKDRatio,color,TextFormatAlign.RIGHT,TableConst.RATIO_WIDTH,x);
x += label.width;
if(this.finish)
{
label = this.createHeaderLabel(header,this.captionReward,color,TextFormatAlign.RIGHT,TableConst.REWARD_WIDTH,x);
}
bg.width = width - 2 * TABLE_MARGIN;
bg.height = TableConst.ROW_HEIGHT - 2;
return header;
}
private function createHeaderLabel(header:Sprite, text:String, color:uint, align:String, width:int, x:int) : Label
{
var label:Label = new Label();
label.autoSize = TextFieldAutoSize.NONE;
label.text = text;
label.color = color;
label.align = align;
label.x = x;
label.width = width;
label.height = TableConst.ROW_HEIGHT;
header.addChild(label);
return label;
}
}
}
|
package alternativa.tanks.gui {
import alternativa.osgi.service.locale.ILocaleService;
import controls.TankWindowInner;
import controls.base.DefaultButtonBase;
import controls.base.LabelBase;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.events.Event;
import flash.events.MouseEvent;
import forms.TankWindowWithHeader;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.dialogs.gui.DialogWindow;
public class EmailReminderWindow extends DialogWindow {
[Inject]
public static var localeService:ILocaleService;
private static var enterEmailReminderBitmapDataClass:Class = EmailReminderWindow_enterEmailReminderBitmapDataClass;
private static var enterEmailReminderBitmapData:BitmapData = Bitmap(new enterEmailReminderBitmapDataClass()).bitmapData;
private static var confirmEmailReminderBitmapDataClass:Class = EmailReminderWindow_confirmEmailReminderBitmapDataClass;
protected static var confirmEmailReminderBitmapData:BitmapData = Bitmap(new confirmEmailReminderBitmapDataClass()).bitmapData;
protected static const WINDOW_WIDTH:int = 350;
protected static const WINDOW_MARGIN:int = 11;
protected static const GAP:int = 5;
protected var window:TankWindowWithHeader;
protected var labelInnerWindow:TankWindowInner;
protected var closeButton:DefaultButtonBase;
private var imageInnerWindow:TankWindowInner;
private var emailBlock:EmailBlock;
private var saveButton:DefaultButtonBase;
public function EmailReminderWindow() {
super();
this.addWindow();
}
public function showEnterEmailReminder() : void {
this.addCautionImage(enterEmailReminderBitmapData);
this.addCautionLabel(localeService.getText(TanksLocale.TEXT_NEED_OF_EMAIL_SET));
this.addOtherElements();
this.show();
}
public function showConfirmEmailReminder(param1:String) : void {
this.addCautionImage(confirmEmailReminderBitmapData);
this.addCautionLabel(localeService.getText(TanksLocale.TEXT_NEED_OF_EMAIL_CONFIRMATION));
this.addOtherElements();
this.emailBlock.email = param1;
this.saveButton.enable = true;
this.show();
}
public function showNeedEmailAlert() : void {
this.addCautionImage(enterEmailReminderBitmapData);
this.addCautionLabel(localeService.getText(TanksLocale.TEXT_NEED_EMAIL_ALERT_MESSAGE));
this.addCloseButton(this.labelInnerWindow);
this.setWindowSize();
this.show();
}
private function addOtherElements() : void {
this.addEmailBlock();
this.addCloseButton(this.emailBlock);
this.addSaveButton();
this.setWindowSize();
}
private function addWindow() : void {
this.window = new TankWindowWithHeader(localeService.getText(TanksLocale.TEXT_HEADER_SECURITY));
this.window.width = WINDOW_WIDTH;
addChild(this.window);
}
protected function addCautionImage(param1:BitmapData) : void {
var local2:Bitmap = null;
local2 = new Bitmap(param1);
local2.x = WINDOW_MARGIN;
this.imageInnerWindow = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.imageInnerWindow.x = WINDOW_MARGIN;
this.imageInnerWindow.y = WINDOW_MARGIN;
this.imageInnerWindow.width = WINDOW_WIDTH - WINDOW_MARGIN * 2;
this.imageInnerWindow.height = local2.height;
this.window.addChild(this.imageInnerWindow);
this.imageInnerWindow.addChild(local2);
}
protected function addCautionLabel(param1:String) : void {
this.labelInnerWindow = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.labelInnerWindow.x = WINDOW_MARGIN;
this.labelInnerWindow.width = WINDOW_WIDTH - WINDOW_MARGIN * 2;
this.window.addChild(this.labelInnerWindow);
var local2:LabelBase = new LabelBase();
local2.wordWrap = true;
local2.multiline = true;
local2.htmlText = param1;
local2.size = 12;
local2.x = WINDOW_MARGIN;
local2.y = WINDOW_MARGIN;
local2.width = WINDOW_WIDTH - WINDOW_MARGIN * 4;
this.labelInnerWindow.addChild(local2);
this.labelInnerWindow.height = local2.height + WINDOW_MARGIN * 2;
this.labelInnerWindow.y = this.imageInnerWindow.y + this.imageInnerWindow.height + GAP;
}
private function addEmailBlock() : void {
this.emailBlock = new EmailBlock(WINDOW_WIDTH,WINDOW_MARGIN);
this.emailBlock.addEventListener(EmailBlockValidationEvent.EMAIL_VALIDATED_EVENT,this.onEmailValidationEvent);
this.emailBlock.y = this.labelInnerWindow.y + this.labelInnerWindow.height + GAP;
this.window.addChild(this.emailBlock);
}
private function onEmailValidationEvent(param1:EmailBlockValidationEvent) : void {
this.saveButton.enable = param1.isValid;
}
private function addCloseButton(param1:DisplayObject) : void {
this.closeButton = new DefaultButtonBase();
this.closeButton.label = localeService.getText(TanksLocale.TEXT_CLOSE_LABEL);
this.closeButton.x = WINDOW_WIDTH - WINDOW_MARGIN - this.closeButton.width;
this.closeButton.y = param1.y + param1.height + GAP;
this.closeButton.addEventListener(MouseEvent.CLICK,this.onCloseButtonClick);
this.window.addChild(this.closeButton);
}
private function addSaveButton() : void {
this.saveButton = new DefaultButtonBase();
this.saveButton.enable = false;
this.saveButton.label = localeService.getText(TanksLocale.TEXT_SETTINGS_BUTTON_SAVE_TEXT);
this.saveButton.x = this.closeButton.x - WINDOW_MARGIN - this.saveButton.width;
this.saveButton.y = this.closeButton.y;
this.saveButton.addEventListener(MouseEvent.CLICK,this.onSaveButtonClick);
this.window.addChild(this.saveButton);
}
private function onSaveButtonClick(param1:MouseEvent = null) : void {
var local2:String = this.emailBlock.email;
dispatchEvent(local2.indexOf("*") != -1 ? new EnterEmailReminderWindowEvent(EnterEmailReminderWindowEvent.EMAIL_CONFIRMATION) : new EnterEmailReminderWindowEvent(EnterEmailReminderWindowEvent.EMAIL_SAVING_AND_CONFIRMATION,local2));
this.onCloseButtonClick();
}
protected function show() : void {
dialogService.addDialog(this);
}
protected function setWindowSize() : void {
this.window.height = this.closeButton.y + this.closeButton.height + WINDOW_MARGIN;
}
override protected function cancelKeyPressed() : void {
this.onCloseButtonClick();
}
override protected function confirmationKeyPressed() : void {
if(this.saveButton.enable) {
this.onSaveButtonClick();
}
}
protected function onCloseButtonClick(param1:MouseEvent = null) : void {
this.closeButton.removeEventListener(MouseEvent.CLICK,this.onCloseButtonClick);
if(Boolean(this.saveButton)) {
this.saveButton.removeEventListener(MouseEvent.CLICK,this.onSaveButtonClick);
}
if(Boolean(this.emailBlock)) {
this.emailBlock.removeEventListener(EmailBlockValidationEvent.EMAIL_VALIDATED_EVENT,this.onEmailValidationEvent);
this.emailBlock.destroy();
this.emailBlock = null;
}
dispatchEvent(new EnterEmailReminderWindowEvent(EnterEmailReminderWindowEvent.WINDOW_CLOSING));
dialogService.removeDialog(this);
}
public function showEmailIsBusy(param1:String) : void {
this.emailBlock.showEmailIsBusy(param1);
}
public function showEmailIsForbidden(param1:String) : void {
this.emailBlock.showEmailIsForbidden(param1);
}
public function showEmailIsFree(param1:String) : void {
this.emailBlock.showEmailIsFree(param1);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import projects.tanks.client.battlefield.models.battle.battlefield.facilities.facillity.FacilitySphericalZoneCC;
public class CodecFacilitySphericalZoneCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_centerOffsetZ:ICodec;
private var codec_radius:ICodec;
public function CodecFacilitySphericalZoneCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_centerOffsetZ = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_radius = param1.getCodec(new TypeCodecInfo(Float,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:FacilitySphericalZoneCC = new FacilitySphericalZoneCC();
local2.centerOffsetZ = this.codec_centerOffsetZ.decode(param1) as Number;
local2.radius = this.codec_radius.decode(param1) as Number;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:FacilitySphericalZoneCC = FacilitySphericalZoneCC(param2);
this.codec_centerOffsetZ.encode(param1,local3.centerOffsetZ);
this.codec_radius.encode(param1,local3.radius);
}
}
}
|
package projects.tanks.client.panel.model.payment.modes.sms.types {
public class SMSOperator {
private var _id:int;
private var _name:String;
public function SMSOperator(param1:int = 0, param2:String = null) {
super();
this._id = param1;
this._name = param2;
}
public function get id() : int {
return this._id;
}
public function set id(param1:int) : void {
this._id = param1;
}
public function get name() : String {
return this._name;
}
public function set name(param1:String) : void {
this._name = param1;
}
public function toString() : String {
var local1:String = "SMSOperator [";
local1 += "id = " + this.id + " ";
local1 += "name = " + this.name + " ";
return local1 + "]";
}
}
}
|
package _codec.projects.tanks.client.panel.model.usercountry {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.usercountry.UserCountryCC;
public class VectorCodecUserCountryCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecUserCountryCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(UserCountryCC,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.<UserCountryCC> = new Vector.<UserCountryCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = UserCountryCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:UserCountryCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<UserCountryCC> = Vector.<UserCountryCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package projects.tanks.client.battlefield.models.ultimate.common {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class UltimateModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _activateUltimateId:Long = Long.getLong(947963421,350615309);
private var model:IModel;
public function UltimateModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
public function activateUltimate() : 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._activateUltimateId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.view.timeleftindicator {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.timeleftindicator.GreyTimeLeftIndicator_emptyMarkerClass.png")]
public class GreyTimeLeftIndicator_emptyMarkerClass extends BitmapAsset {
public function GreyTimeLeftIndicator_emptyMarkerClass() {
super();
}
}
}
|
package alternativa.tanks.models.battle.battlefield.keyboard {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.battlefield.keyboard.DeviceIcons_fasterhorizontaltrackingvulcanIconClass.png")]
public class DeviceIcons_fasterhorizontaltrackingvulcanIconClass extends BitmapAsset {
public function DeviceIcons_fasterhorizontaltrackingvulcanIconClass() {
super();
}
}
}
|
package projects.tanks.client.battlefield.models.map {
public class DynamicShadowParams {
private var _angleX:Number;
private var _angleZ:Number;
private var _lightColor:int;
private var _shadowColor:int;
public function DynamicShadowParams(param1:Number = 0, param2:Number = 0, param3:int = 0, param4:int = 0) {
super();
this._angleX = param1;
this._angleZ = param2;
this._lightColor = param3;
this._shadowColor = param4;
}
public function get angleX() : Number {
return this._angleX;
}
public function set angleX(param1:Number) : void {
this._angleX = param1;
}
public function get angleZ() : Number {
return this._angleZ;
}
public function set angleZ(param1:Number) : void {
this._angleZ = param1;
}
public function get lightColor() : int {
return this._lightColor;
}
public function set lightColor(param1:int) : void {
this._lightColor = param1;
}
public function get shadowColor() : int {
return this._shadowColor;
}
public function set shadowColor(param1:int) : void {
this._shadowColor = param1;
}
public function toString() : String {
var local1:String = "DynamicShadowParams [";
local1 += "angleX = " + this.angleX + " ";
local1 += "angleZ = " + this.angleZ + " ";
local1 += "lightColor = " + this.lightColor + " ";
local1 += "shadowColor = " + this.shadowColor + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.model.item.countable {
[ModelInterface]
public interface ICountableItem {
function getCount() : int;
function setCount(param1:int) : void;
}
}
|
package alternativa.tanks.models.sfx.flame
{
import alternativa.engine3d.materials.Material;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.models.sfx.colortransform.ColorTransformEntry;
import flash.media.Sound;
public class FlamethrowerSFXData
{
public var materials:Vector.<Material>;
public var flameSound:Sound;
public var colorTransformPoints:Vector.<ColorTransformEntry>;
public var data:TextureAnimation;
public function FlamethrowerSFXData()
{
super();
}
}
}
|
package projects.tanks.client.battlefield.models.anticheat.timechecker {
public interface ITimeCheckerModelBase {
function ping(param1:int, param2:Number) : void;
}
}
|
package projects.tanks.client.panel.model.donationalert {
import platform.client.fp10.core.resource.types.LocalizedImageResource;
public class DonationAlertCC {
private var _imageWithEmail:LocalizedImageResource;
private var _imageWithoutEmail:LocalizedImageResource;
private var _message:String;
public function DonationAlertCC(param1:LocalizedImageResource = null, param2:LocalizedImageResource = null, param3:String = null) {
super();
this._imageWithEmail = param1;
this._imageWithoutEmail = param2;
this._message = param3;
}
public function get imageWithEmail() : LocalizedImageResource {
return this._imageWithEmail;
}
public function set imageWithEmail(param1:LocalizedImageResource) : void {
this._imageWithEmail = param1;
}
public function get imageWithoutEmail() : LocalizedImageResource {
return this._imageWithoutEmail;
}
public function set imageWithoutEmail(param1:LocalizedImageResource) : void {
this._imageWithoutEmail = param1;
}
public function get message() : String {
return this._message;
}
public function set message(param1:String) : void {
this._message = param1;
}
public function toString() : String {
var local1:String = "DonationAlertCC [";
local1 += "imageWithEmail = " + this.imageWithEmail + " ";
local1 += "imageWithoutEmail = " + this.imageWithoutEmail + " ";
local1 += "message = " + this.message + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.models.tank {
import alternativa.tanks.utils.EncryptedInt;
import alternativa.tanks.utils.EncryptedIntImpl;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class LocalTankParams {
public static var teamType:BattleTeam = BattleTeam.NONE;
private static const specificationId:EncryptedInt = new EncryptedIntImpl();
public function LocalTankParams() {
super();
}
public static function setSpecificationId(param1:int) : void {
specificationId.setInt(param1);
}
public static function getSpecificationId() : int {
return specificationId.getInt();
}
}
}
|
package alternativa.tanks.physics {
import alternativa.math.Vector3;
public class SweptSphereTest {
private static const A:Vector3 = new Vector3();
private static const V:Vector3 = new Vector3();
public function SweptSphereTest() {
super();
}
public static function test(param1:Vector3, param2:Vector3, param3:Number, param4:Vector3, param5:Vector3, param6:Number, param7:Number) : Boolean {
A.diff(param1,param4);
var local8:Number = param3 + param6;
var local9:Number = A.dot(A) - local8 * local8;
if(local9 < 0) {
return true;
}
V.diff(param2,param5);
var local10:Number = V.dot(V);
if(local10 < 0.0001) {
return false;
}
var local11:Number = A.dot(V);
if(local11 > 0) {
return false;
}
var local12:Number = local11 * local11 - local10 * local9;
if(local12 < 0) {
return false;
}
var local13:Number = Math.sqrt(local12);
var local14:Number = (-local11 - local13) / local10;
return local14 < param7;
}
}
}
|
package alternativa.gfx.core
{
import alternativa.engine3d.materials.TextureResourcesRegistry;
import alternativa.gfx.alternativagfx;
import flash.display.BitmapData;
import flash.display3D.Context3D;
import flash.display3D.Context3DTextureFormat;
import flash.display3D.textures.Texture;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.geom.Rectangle;
public class BitmapTextureResource extends TextureResource
{
private static const point:Point = new Point();
private static const rectangle:Rectangle = new Rectangle();
private static const matrix:Matrix = new Matrix();
private static var nullTexture:Texture;
private static var nullTextureContext:Context3D;
private var referencesCount:int = 1;
private var _bitmapData:BitmapData;
private var _mipMapping:Boolean;
private var _stretchNotPowerOf2Textures:Boolean;
private var _calculateMipMapsUsingGPU:Boolean;
private var _correctionU:Number = 1;
private var _correctionV:Number = 1;
private var correctedWidth:int;
private var correctedHeight:int;
private var cachedBitmap:BitmapData;
public function BitmapTextureResource(param1:BitmapData, param2:Boolean, param3:Boolean = false, param4:Boolean = false)
{
super();
this._bitmapData = param1;
this._mipMapping = param2;
this._stretchNotPowerOf2Textures = param3;
this._calculateMipMapsUsingGPU = param4;
this.correctedWidth = Math.pow(2,Math.ceil(Math.log(this._bitmapData.width) / Math.LN2));
this.correctedHeight = Math.pow(2,Math.ceil(Math.log(this._bitmapData.height) / Math.LN2));
if(this.correctedWidth > 2048)
{
this.correctedWidth = 2048;
}
if(this.correctedHeight > 2048)
{
this.correctedHeight = 2048;
}
if((this._bitmapData.width != this.correctedWidth || this._bitmapData.height != this.correctedHeight) && !this._stretchNotPowerOf2Textures && this._bitmapData.width <= 2048 && this._bitmapData.height <= 2048)
{
this._correctionU = this._bitmapData.width / this.correctedWidth;
this._correctionV = this._bitmapData.height / this.correctedHeight;
}
}
public function get bitmapData() : BitmapData
{
return this._bitmapData;
}
public function get mipMapping() : Boolean
{
return this._mipMapping;
}
public function get stretchNotPowerOf2Textures() : Boolean
{
return this._stretchNotPowerOf2Textures;
}
public function get correctionU() : Number
{
return this._correctionU;
}
public function get correctionV() : Number
{
return this._correctionV;
}
public function get calculateMipMapsUsingGPU() : Boolean
{
return this._calculateMipMapsUsingGPU;
}
public function set calculateMipMapsUsingGPU(param1:Boolean) : void
{
this._calculateMipMapsUsingGPU = param1;
}
public function forceDispose() : void
{
this.referencesCount = 1;
this.dispose();
if(this._bitmapData != null)
{
this._bitmapData.dispose();
}
this._bitmapData = null;
}
override public function dispose() : void
{
if(this.referencesCount == 0)
{
return;
}
--this.referencesCount;
if(this.referencesCount == 0)
{
TextureResourcesRegistry.release(this._bitmapData);
this._bitmapData = null;
super.dispose();
}
}
override public function get available() : Boolean
{
return this._bitmapData != null;
}
override protected function getNullTexture() : Texture
{
return nullTexture;
}
private function freeMemory() : void
{
useNullTexture = true;
this._mipMapping = false;
this.forceDispose();
}
override public function create(param1:Context3D) : void
{
var context:Context3D = param1;
super.create(context);
if(nullTexture == null || nullTextureContext != context)
{
nullTexture = context.createTexture(1,1,Context3DTextureFormat.BGRA,false);
nullTexture.uploadFromBitmapData(new BitmapData(1,1,true,1439485132));
nullTextureContext = context;
}
if(!useNullTexture)
{
try
{
texture = context.createTexture(this.correctedWidth,this.correctedHeight,Context3DTextureFormat.BGRA,false);
return;
}
catch(e:Error)
{
freeMemory();
return;
}
}
return;
}
override public function upload() : void
{
var _loc1_:BitmapData = null;
var _loc2_:BitmapData = null;
var _loc3_:int = 0;
var _loc4_:int = 0;
var _loc5_:int = 0;
var _loc6_:BitmapData = null;
if(useNullTexture)
{
return;
}
if(this._bitmapData.width == this.correctedWidth && this._bitmapData.height == this.correctedHeight)
{
_loc1_ = this._bitmapData;
}
else
{
_loc1_ = new BitmapData(this.correctedWidth,this.correctedHeight,this._bitmapData.transparent,0);
if(this._bitmapData.width <= 2048 && this._bitmapData.height <= 2048 && !this._stretchNotPowerOf2Textures)
{
_loc1_.copyPixels(this._bitmapData,this._bitmapData.rect,point);
if(this._bitmapData.width < _loc1_.width)
{
_loc2_ = new BitmapData(1,this._bitmapData.height,this._bitmapData.transparent,0);
rectangle.setTo(this._bitmapData.width - 1,0,1,this._bitmapData.height);
_loc2_.copyPixels(this._bitmapData,rectangle,point);
matrix.setTo(_loc1_.width - this._bitmapData.width,0,0,1,this._bitmapData.width,0);
_loc1_.draw(_loc2_,matrix,null,null,null,false);
_loc2_.dispose();
}
if(this._bitmapData.height < _loc1_.height)
{
_loc2_ = new BitmapData(this._bitmapData.width,1,this._bitmapData.transparent,0);
rectangle.setTo(0,this._bitmapData.height - 1,this._bitmapData.width,1);
_loc2_.copyPixels(this._bitmapData,rectangle,point);
matrix.setTo(1,0,0,_loc1_.height - this._bitmapData.height,0,this._bitmapData.height);
_loc1_.draw(_loc2_,matrix,null,null,null,false);
_loc2_.dispose();
}
if(this._bitmapData.width < _loc1_.width && this._bitmapData.height < _loc1_.height)
{
_loc2_ = new BitmapData(1,1,this._bitmapData.transparent,0);
rectangle.setTo(this._bitmapData.width - 1,this._bitmapData.height - 1,1,1);
_loc2_.copyPixels(this._bitmapData,rectangle,point);
matrix.setTo(_loc1_.width - this._bitmapData.width,0,0,_loc1_.height - this._bitmapData.height,this._bitmapData.width,this._bitmapData.height);
_loc1_.draw(_loc2_,matrix,null,null,null,false);
_loc2_.dispose();
}
}
else
{
matrix.setTo(this.correctedWidth / this._bitmapData.width,0,0,this.correctedHeight / this._bitmapData.height,0,0);
_loc1_.draw(this._bitmapData,matrix,null,null,null,true);
}
}
if(this._mipMapping > 0)
{
this.uploadTexture(_loc1_,0);
matrix.identity();
_loc3_ = 1;
_loc4_ = _loc1_.width;
_loc5_ = _loc1_.height;
while(_loc4_ % 2 == 0 || _loc5_ % 2 == 0)
{
_loc4_ >>= 1;
_loc5_ >>= 1;
if(_loc4_ == 0)
{
_loc4_ = 1;
}
if(_loc5_ == 0)
{
_loc5_ = 1;
}
_loc6_ = new BitmapData(_loc4_,_loc5_,_loc1_.transparent,0);
matrix.a = _loc4_ / _loc1_.width;
matrix.d = _loc5_ / _loc1_.height;
_loc6_.draw(_loc1_,matrix,null,null,null,false);
this.uploadTexture(_loc6_,_loc3_++);
_loc6_.dispose();
}
}
else
{
this.uploadTexture(_loc1_,0);
}
if(_loc1_ != this._bitmapData)
{
_loc1_.dispose();
_loc1_ = null;
}
if(_loc1_ != null)
{
this.cachedBitmap = _loc1_;
}
}
protected function uploadTexture(param1:BitmapData, param2:uint) : void
{
var source:BitmapData = param1;
var mipLevel:uint = param2;
try
{
if(texture != nullTexture)
{
texture.uploadFromBitmapData(source,mipLevel);
}
return;
}
catch(e:Error)
{
freeMemory();
return;
}
}
public function increaseReferencesCount() : void
{
++this.referencesCount;
}
override public function destroy(b:Boolean) : *
{
if(this.cachedBitmap != null)
{
this.cachedBitmap.dispose();
}
this.cachedBitmap = null;
this.freeMemory();
delete this;
}
}
}
|
package alternativa.tanks.models.battle.gui.gui.statistics.field.fund {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.gui.statistics.field.fund.FundAndLimits_rugbyIconClass.png")]
public class FundAndLimits_rugbyIconClass extends BitmapAsset {
public function FundAndLimits_rugbyIconClass() {
super();
}
}
}
|
package alternativa.engine3d.primitives {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.core.Wrapper;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.objects.Mesh;
use namespace alternativa3d;
public class Box extends Mesh {
public function Box(param1:Number = 100, param2:Number = 100, param3:Number = 100, param4:uint = 1, param5:uint = 1, param6:uint = 1, param7:Boolean = false, param8:Boolean = false, param9:Material = null, param10:Material = null, param11:Material = null, param12:Material = null, param13:Material = null, param14:Material = null) {
var local15:int = 0;
var local16:int = 0;
var local17:int = 0;
super();
if(param4 < 1) {
throw new ArgumentError(param4 + " width segments not enough.");
}
if(param5 < 1) {
throw new ArgumentError(param5 + " length segments not enough.");
}
if(param6 < 1) {
throw new ArgumentError(param6 + " height segments not enough.");
}
var local18:int = param4 + 1;
var local19:int = param5 + 1;
var local20:int = param6 + 1;
var local21:Number = param1 * 0.5;
var local22:Number = param2 * 0.5;
var local23:Number = param3 * 0.5;
var local24:Number = 1 / param4;
var local25:Number = 1 / param5;
var local26:Number = 1 / param6;
var local27:Number = param1 / param4;
var local28:Number = param2 / param5;
var local29:Number = param3 / param6;
var local30:Vector.<Vertex> = new Vector.<Vertex>();
var local31:int = 0;
local15 = 0;
while(local15 < local18) {
local16 = 0;
while(local16 < local19) {
var local33:* = local31++;
local30[local33] = this.createVertex(local15 * local27 - local21,local16 * local28 - local22,-local23,(param4 - local15) * local24,(param5 - local16) * local25);
local16++;
}
local15++;
}
local15 = 0;
while(local15 < local18) {
local16 = 0;
while(local16 < local19) {
if(local15 < param4 && local16 < param5) {
this.createFace(local30[(local15 + 1) * local19 + local16 + 1],local30[(local15 + 1) * local19 + local16],local30[local15 * local19 + local16],local30[local15 * local19 + local16 + 1],0,0,-1,local23,param7,param8,param13);
}
local16++;
}
local15++;
}
var local32:uint = uint(local18 * local19);
local15 = 0;
while(local15 < local18) {
local16 = 0;
while(local16 < local19) {
local33 = local31++;
local30[local33] = this.createVertex(local15 * local27 - local21,local16 * local28 - local22,local23,local15 * local24,(param5 - local16) * local25);
local16++;
}
local15++;
}
local15 = 0;
while(local15 < local18) {
local16 = 0;
while(local16 < local19) {
if(local15 < param4 && local16 < param5) {
this.createFace(local30[local32 + local15 * local19 + local16],local30[local32 + (local15 + 1) * local19 + local16],local30[local32 + (local15 + 1) * local19 + local16 + 1],local30[local32 + local15 * local19 + local16 + 1],0,0,1,local23,param7,param8,param14);
}
local16++;
}
local15++;
}
local32 += local18 * local19;
local15 = 0;
while(local15 < local18) {
local17 = 0;
while(local17 < local20) {
local33 = local31++;
local30[local33] = this.createVertex(local15 * local27 - local21,-local22,local17 * local29 - local23,local15 * local24,(param6 - local17) * local26);
local17++;
}
local15++;
}
local15 = 0;
while(local15 < local18) {
local17 = 0;
while(local17 < local20) {
if(local15 < param4 && local17 < param6) {
this.createFace(local30[local32 + local15 * local20 + local17],local30[local32 + (local15 + 1) * local20 + local17],local30[local32 + (local15 + 1) * local20 + local17 + 1],local30[local32 + local15 * local20 + local17 + 1],0,-1,0,local22,param7,param8,param11);
}
local17++;
}
local15++;
}
local32 += local18 * local20;
local15 = 0;
while(local15 < local18) {
local17 = 0;
while(local17 < local20) {
local33 = local31++;
local30[local33] = this.createVertex(local15 * local27 - local21,local22,local17 * local29 - local23,(param4 - local15) * local24,(param6 - local17) * local26);
local17++;
}
local15++;
}
local15 = 0;
while(local15 < local18) {
local17 = 0;
while(local17 < local20) {
if(local15 < param4 && local17 < param6) {
this.createFace(local30[local32 + local15 * local20 + local17],local30[local32 + local15 * local20 + local17 + 1],local30[local32 + (local15 + 1) * local20 + local17 + 1],local30[local32 + (local15 + 1) * local20 + local17],0,1,0,local22,param7,param8,param12);
}
local17++;
}
local15++;
}
local32 += local18 * local20;
local16 = 0;
while(local16 < local19) {
local17 = 0;
while(local17 < local20) {
local33 = local31++;
local30[local33] = this.createVertex(-local21,local16 * local28 - local22,local17 * local29 - local23,(param5 - local16) * local25,(param6 - local17) * local26);
local17++;
}
local16++;
}
local16 = 0;
while(local16 < local19) {
local17 = 0;
while(local17 < local20) {
if(local16 < param5 && local17 < param6) {
this.createFace(local30[local32 + local16 * local20 + local17],local30[local32 + local16 * local20 + local17 + 1],local30[local32 + (local16 + 1) * local20 + local17 + 1],local30[local32 + (local16 + 1) * local20 + local17],-1,0,0,local21,param7,param8,param9);
}
local17++;
}
local16++;
}
local32 += local19 * local20;
local16 = 0;
while(local16 < local19) {
local17 = 0;
while(local17 < local20) {
local33 = local31++;
local30[local33] = this.createVertex(local21,local16 * local28 - local22,local17 * local29 - local23,local16 * local25,(param6 - local17) * local26);
local17++;
}
local16++;
}
local16 = 0;
while(local16 < local19) {
local17 = 0;
while(local17 < local20) {
if(local16 < param5 && local17 < param6) {
this.createFace(local30[local32 + local16 * local20 + local17],local30[local32 + (local16 + 1) * local20 + local17],local30[local32 + (local16 + 1) * local20 + local17 + 1],local30[local32 + local16 * local20 + local17 + 1],1,0,0,local21,param7,param8,param10);
}
local17++;
}
local16++;
}
boundMinX = -local21;
boundMinY = -local22;
boundMinZ = -local23;
boundMaxX = local21;
boundMaxY = local22;
boundMaxZ = local23;
}
private function createVertex(param1:Number, param2:Number, param3:Number, param4:Number, param5:Number) : Vertex {
var local6:Vertex = new Vertex();
local6.x = param1;
local6.y = param2;
local6.z = param3;
local6.u = param4;
local6.v = param5;
local6.alternativa3d::next = alternativa3d::vertexList;
alternativa3d::vertexList = local6;
return local6;
}
private function createFace(param1:Vertex, param2:Vertex, param3:Vertex, param4:Vertex, param5:Number, param6:Number, param7:Number, param8:Number, param9:Boolean, param10:Boolean, param11:Material) : void {
var local12:Vertex = null;
var local13:Face = null;
if(param9) {
param5 = -param5;
param6 = -param6;
param7 = -param7;
param8 = -param8;
local12 = param1;
param1 = param4;
param4 = local12;
local12 = param2;
param2 = param3;
param3 = local12;
}
if(param10) {
local13 = new Face();
local13.material = param11;
local13.alternativa3d::wrapper = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::vertex = param1;
local13.alternativa3d::wrapper.alternativa3d::next = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::vertex = param2;
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::vertex = param3;
local13.alternativa3d::normalX = param5;
local13.alternativa3d::normalY = param6;
local13.alternativa3d::normalZ = param7;
local13.alternativa3d::offset = param8;
local13.alternativa3d::next = alternativa3d::faceList;
alternativa3d::faceList = local13;
local13 = new Face();
local13.material = param11;
local13.alternativa3d::wrapper = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::vertex = param1;
local13.alternativa3d::wrapper.alternativa3d::next = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::vertex = param3;
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::vertex = param4;
local13.alternativa3d::normalX = param5;
local13.alternativa3d::normalY = param6;
local13.alternativa3d::normalZ = param7;
local13.alternativa3d::offset = param8;
local13.alternativa3d::next = alternativa3d::faceList;
alternativa3d::faceList = local13;
} else {
local13 = new Face();
local13.material = param11;
local13.alternativa3d::wrapper = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::vertex = param1;
local13.alternativa3d::wrapper.alternativa3d::next = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::vertex = param2;
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::vertex = param3;
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::next = new Wrapper();
local13.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next.alternativa3d::next.alternativa3d::vertex = param4;
local13.alternativa3d::normalX = param5;
local13.alternativa3d::normalY = param6;
local13.alternativa3d::normalZ = param7;
local13.alternativa3d::offset = param8;
local13.alternativa3d::next = alternativa3d::faceList;
alternativa3d::faceList = local13;
}
}
override public function clone() : Object3D {
var local1:Box = new Box();
local1.clonePropertiesFrom(this);
return local1;
}
}
}
|
package controls {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.utils.getTimer;
[Embed(source="/_assets/assets.swf", symbol="symbol591")]
public class SuicideIndicator extends Sprite {
public var che:MovieClip;
private var _che:MovieClip;
private var endTime:int;
private var nextTime:int;
private const RATIO:int = 10;
public function SuicideIndicator() {
super();
this._che = getChildByName("che") as MovieClip;
visible = false;
}
public function show(param1:int) : void {
var local2:int = getTimer();
this.endTime = local2 + param1;
this.nextTime = local2 + (this.endTime - local2) / this.RATIO;
visible = true;
this._che.visible = true;
addEventListener(Event.ENTER_FRAME,this.triggerCherep);
}
private function triggerCherep(param1:Event) : void {
var local2:int = getTimer();
if(local2 >= this.nextTime) {
this._che.visible = !this._che.visible;
this.nextTime += (this.endTime - local2) / this.RATIO;
}
if(local2 >= this.endTime) {
visible = false;
removeEventListener(Event.ENTER_FRAME,this.triggerCherep);
}
}
}
}
|
package alternativa.tanks.model.shop
{
import flash.display.Sprite;
public class ShopCategoryView extends Sprite
{
private static const GAP:int = 10;
public var headerText:String;
public var descriptionText:String;
public var categoryId:String;
public var header:ShopCategoryHeader;
public var items:ShopCategoryViewGrid;
public function ShopCategoryView(param1:String, param2:String, param3:String)
{
super();
this.headerText = param1;
this.descriptionText = param2;
this.categoryId = param3;
this.init();
}
private function init() : void
{
this.header = new ShopCategoryHeader(this.headerText,this.descriptionText);
addChild(this.header);
this.items = new ShopCategoryViewGrid();
addChild(this.items);
}
public function addItem(param1:ItemBase) : void
{
this.items.addItem(param1);
}
public function render(param1:int) : void
{
this.header.render(param1);
this.items.render();
this.items.y = this.header.y + this.header.height + GAP;
}
public function destroy() : void
{
this.header = null;
this.items.destroy();
this.items = null;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.battlefield.types {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.battlefield.models.battle.battlefield.types.BattlefieldSounds;
public class VectorCodecBattlefieldSoundsLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecBattlefieldSoundsLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(BattlefieldSounds,false));
if(this.optionalElement) {
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:int = int(LengthCodecHelper.decodeLength(param1));
var local3:Vector.<BattlefieldSounds> = new Vector.<BattlefieldSounds>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = BattlefieldSounds(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:BattlefieldSounds = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<BattlefieldSounds> = Vector.<BattlefieldSounds>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.armor.common {
public interface IHullCommonModelBase {
}
}
|
package alternativa.tanks.view.mainview {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.mainview.BattleTypesPanel_rugbyBtnClass.png")]
public class BattleTypesPanel_rugbyBtnClass extends BitmapAsset {
public function BattleTypesPanel_rugbyBtnClass() {
super();
}
}
}
|
package {
import controls.panel.BaseButton;
[Embed(source="/_assets/assets.swf", symbol="symbol919")]
public dynamic class MainPanelCloseButton extends BaseButton {
public function MainPanelCloseButton() {
super();
}
}
}
|
package alternativa.tanks.model.item.modification {
import alternativa.types.Long;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class IModificationAdapt implements IModification {
private var object:IGameObject;
private var impl:IModification;
public function IModificationAdapt(param1:IGameObject, param2:IModification) {
super();
this.object = param1;
this.impl = param2;
}
public function getBaseItemId() : Long {
var result:Long = null;
try {
Model.object = this.object;
result = this.impl.getBaseItemId();
}
finally {
Model.popObject();
}
return result;
}
public function getModificationIndex() : int {
var result:int = 0;
try {
Model.object = this.object;
result = int(this.impl.getModificationIndex());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.panel.model.shop.shopitemcategory {
import platform.client.fp10.core.type.IGameObject;
public class ShopItemCategoryCC {
private var _category:IGameObject;
public function ShopItemCategoryCC(param1:IGameObject = null) {
super();
this._category = param1;
}
public function get category() : IGameObject {
return this._category;
}
public function set category(param1:IGameObject) : void {
this._category = param1;
}
public function toString() : String {
var local1:String = "ShopItemCategoryCC [";
local1 += "category = " + this.category + " ";
return local1 + "]";
}
}
}
|
package com.alternativaplatform.projects.tanks.client.commons.types
{
public class DeathReason
{
public static var SUICIDE:DeathReason = new DeathReason();
public static var KILLED_IN_BATTLE:DeathReason = new DeathReason();
public function DeathReason()
{
super();
}
public static function getReason(str:String) : DeathReason
{
if(str == "suicide")
{
return SUICIDE;
}
return KILLED_IN_BATTLE;
}
}
}
|
package projects.tanks.client.tanksservices.model.uidcheck {
import platform.client.models.commons.types.ValidationStatus;
public interface IUidCheckModelBase {
function validateResult(param1:ValidationStatus) : void;
}
}
|
package alternativa.tanks.vehicles.tanks
{
import flash.display.BitmapData;
import flash.utils.Dictionary;
public class SkinTextureRegistry implements ISkinTextureRegistry
{
private var textures:Dictionary;
public function SkinTextureRegistry()
{
this.textures = new Dictionary();
super();
}
public function getTexture(tankPart:TankSkinPart, colormap:BitmapData) : BitmapData
{
var partTextures:Dictionary = this.textures[tankPart.partId];
if(partTextures == null)
{
partTextures = new Dictionary();
this.textures[tankPart.partId] = partTextures;
}
var textureEntry:TextureEntry = partTextures[colormap];
if(textureEntry == null)
{
textureEntry = new TextureEntry(tankPart.createTexture(colormap,false));
partTextures[colormap] = textureEntry;
}
++textureEntry.refCount;
return textureEntry.texture;
}
public function releaseTexture(tankPart:TankSkinPart, colormap:BitmapData) : void
{
var partTextures:Dictionary = this.textures[tankPart.partId];
if(partTextures == null)
{
return;
}
var textureEntry:TextureEntry = partTextures[colormap];
if(textureEntry == null)
{
return;
}
--textureEntry.refCount;
if(textureEntry.refCount == 0)
{
textureEntry.texture.dispose();
delete partTextures[colormap];
}
}
public function clear() : void
{
}
}
}
import flash.display.BitmapData;
class TextureEntry
{
public var refCount:int;
public var texture:BitmapData;
function TextureEntry(texture:BitmapData)
{
super();
this.texture = texture;
}
}
|
package alternativa.tanks.models.weapon.twins {
import alternativa.engine3d.core.Object3D;
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.sfx.AnimatedLightEffect;
import alternativa.tanks.sfx.MuzzlePositionProvider;
import alternativa.tanks.sfx.PlaneMuzzleFlashEffect;
import alternativa.tanks.sfx.Sound3D;
import alternativa.tanks.sfx.Sound3DEffect;
public class TwinsEffects {
public static const FLASH_SIZE:int = 120;
private static const FLASH_LIFE_TIME:int = 50;
private var battleService:BattleService;
private var sfxData:TwinsSFXData;
public function TwinsEffects(param1:BattleService, param2:TwinsSFXData) {
super();
this.battleService = param1;
this.sfxData = param2;
}
public function createShotEffects(param1:Object3D, param2:Vector3) : void {
this.createGraphicEffect(param2,param1);
this.createMuzzleLightEffect(param2,param1);
this.createSoundEffect(param1);
}
private function createGraphicEffect(param1:Vector3, param2:Object3D) : void {
var local3:PlaneMuzzleFlashEffect = PlaneMuzzleFlashEffect(this.battleService.getObjectPool().getObject(PlaneMuzzleFlashEffect));
local3.init(param1,param2,this.sfxData.muzzleFlashMaterial,FLASH_LIFE_TIME,FLASH_SIZE,FLASH_SIZE);
this.battleService.addGraphicEffect(local3);
}
private function createMuzzleLightEffect(param1:Vector3, param2:Object3D) : void {
var local3:AnimatedLightEffect = AnimatedLightEffect(this.battleService.getObjectPool().getObject(AnimatedLightEffect));
var local4:MuzzlePositionProvider = MuzzlePositionProvider(this.battleService.getObjectPool().getObject(MuzzlePositionProvider));
local4.init(param2,param1);
local3.init(local4,this.sfxData.shotLightingAnimation);
this.battleService.addGraphicEffect(local3);
}
private function createSoundEffect(param1:Object3D) : void {
var local2:Number = NaN;
var local3:Sound3D = null;
if(this.sfxData.shotSound != null) {
local2 = 0.8;
local3 = Sound3D.create(this.sfxData.shotSound,local2);
BattleUtils.tmpVector.reset(param1.x,param1.y,param1.z);
this.battleService.addSound3DEffect(Sound3DEffect.create(BattleUtils.tmpVector,local3));
}
}
}
}
|
package controls.base {
import controls.TextFieldUtf8;
import flash.events.MouseEvent;
import flash.ui.Mouse;
import flash.ui.MouseCursor;
public class TextFieldUtf8Base extends TextFieldUtf8 {
public function TextFieldUtf8Base() {
super();
}
override public function set selectable(param1:Boolean) : void {
super.selectable = param1;
if(param1) {
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseOver);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseOut);
} else {
removeEventListener(MouseEvent.MOUSE_OVER,this.onMouseOver);
removeEventListener(MouseEvent.MOUSE_OUT,this.onMouseOut);
}
}
private function onMouseOver(param1:MouseEvent) : void {
Mouse.cursor = MouseCursor.IBEAM;
}
private function onMouseOut(param1:MouseEvent) : void {
Mouse.cursor = MouseCursor.AUTO;
}
}
}
|
package platform.client.fp10.core.resource {
import alternativa.osgi.service.logging.LogService;
import alternativa.osgi.service.logging.Logger;
import platform.client.fp10.core.registry.ResourceRegistry;
import platform.client.fp10.core.service.errormessage.IErrorMessageService;
import platform.client.fp10.core.service.errormessage.errors.ResourceError;
import platform.client.fp10.core.type.AutoClosable;
public class BatchResourceLoader implements IResourceLoadingListener, AutoClosable {
[Inject]
public static var logService:LogService;
private static var logger:Logger;
[Inject]
public static var messageBoxService:IErrorMessageService;
[Inject]
public static var resourceLoader:IResourceLoader;
[Inject]
public static var resourceRegistry:ResourceRegistry;
private var callback:Function;
private var numLoadedResources:int;
private var numResources:int;
public function BatchResourceLoader(param1:Function) {
super();
if(param1 == null) {
throw new ArgumentError("Parameter listener is null");
}
this.callback = param1;
}
private static function getLogger() : Logger {
return logger || (logger = logService.getLogger(ResourceLogChannel.NAME));
}
public function load(param1:Vector.<Resource>) : void {
var local2:Resource = null;
if(param1 == null) {
throw new ArgumentError("Parameter resources is null");
}
if(param1.length == 0) {
throw new ArgumentError("Number of resources is zero");
}
++this.numResources;
for each(local2 in param1) {
if(local2.isHasDependencies()) {
local2.setBatchLoader(this);
} else {
this.loadResource(local2);
}
}
this.onResourceLoadingComplete(null);
}
public function loadResource(param1:Resource) : void {
++this.numResources;
resourceLoader.loadResource(param1,this,ResourcePriority.NORMAL);
}
public function onResourceLoadingStart(param1:Resource) : void {
}
public function onResourceLoadingComplete(param1:Resource) : void {
++this.numLoadedResources;
if(this.numLoadedResources == this.numResources) {
this.completeBatchLoading();
}
}
public function onResourceLoadingError(param1:Resource, param2:String) : void {
getLogger().error("resource: %1, error: %2",[param1,param2]);
this.onResourceLoadingComplete(param1);
}
public function onResourceLoadingFatalError(param1:Resource, param2:String) : void {
var local3:ResourceError = new ResourceError(param1,param2);
getLogger().error(local3.getMessage());
messageBoxService.showMessage(local3);
}
public function close() : void {
this.numResources = -1;
this.callback = null;
}
private function completeBatchLoading() : void {
this.numResources = 0;
this.callback.call();
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.machinegun.sfx {
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;
public class MachineGunSFXCC {
private var _chainStartSound:SoundResource;
private var _crumbsTexture:TextureResource;
private var _dustTexture:MultiframeTextureResource;
private var _fireAcrossTexture:MultiframeTextureResource;
private var _fireAlongTexture:MultiframeTextureResource;
private var _hitSound:SoundResource;
private var _lightingSFXEntity:LightingSFXEntity;
private var _longFailSound:SoundResource;
private var _shootEndSound:SoundResource;
private var _shootSound:SoundResource;
private var _smokeTexture:MultiframeTextureResource;
private var _sparklesTexture:MultiframeTextureResource;
private var _tankHitSound:SoundResource;
private var _tankSparklesTexture:MultiframeTextureResource;
private var _tracerTexture:TextureResource;
private var _turbineStartSound:SoundResource;
public function MachineGunSFXCC(param1:SoundResource = null, param2:TextureResource = null, param3:MultiframeTextureResource = null, param4:MultiframeTextureResource = null, param5:MultiframeTextureResource = null, param6:SoundResource = null, param7:LightingSFXEntity = null, param8:SoundResource = null, param9:SoundResource = null, param10:SoundResource = null, param11:MultiframeTextureResource = null, param12:MultiframeTextureResource = null, param13:SoundResource = null, param14:MultiframeTextureResource = null, param15:TextureResource = null, param16:SoundResource = null) {
super();
this._chainStartSound = param1;
this._crumbsTexture = param2;
this._dustTexture = param3;
this._fireAcrossTexture = param4;
this._fireAlongTexture = param5;
this._hitSound = param6;
this._lightingSFXEntity = param7;
this._longFailSound = param8;
this._shootEndSound = param9;
this._shootSound = param10;
this._smokeTexture = param11;
this._sparklesTexture = param12;
this._tankHitSound = param13;
this._tankSparklesTexture = param14;
this._tracerTexture = param15;
this._turbineStartSound = param16;
}
public function get chainStartSound() : SoundResource {
return this._chainStartSound;
}
public function set chainStartSound(param1:SoundResource) : void {
this._chainStartSound = param1;
}
public function get crumbsTexture() : TextureResource {
return this._crumbsTexture;
}
public function set crumbsTexture(param1:TextureResource) : void {
this._crumbsTexture = param1;
}
public function get dustTexture() : MultiframeTextureResource {
return this._dustTexture;
}
public function set dustTexture(param1:MultiframeTextureResource) : void {
this._dustTexture = param1;
}
public function get fireAcrossTexture() : MultiframeTextureResource {
return this._fireAcrossTexture;
}
public function set fireAcrossTexture(param1:MultiframeTextureResource) : void {
this._fireAcrossTexture = param1;
}
public function get fireAlongTexture() : MultiframeTextureResource {
return this._fireAlongTexture;
}
public function set fireAlongTexture(param1:MultiframeTextureResource) : void {
this._fireAlongTexture = param1;
}
public function get hitSound() : SoundResource {
return this._hitSound;
}
public function set hitSound(param1:SoundResource) : void {
this._hitSound = param1;
}
public function get lightingSFXEntity() : LightingSFXEntity {
return this._lightingSFXEntity;
}
public function set lightingSFXEntity(param1:LightingSFXEntity) : void {
this._lightingSFXEntity = param1;
}
public function get longFailSound() : SoundResource {
return this._longFailSound;
}
public function set longFailSound(param1:SoundResource) : void {
this._longFailSound = param1;
}
public function get shootEndSound() : SoundResource {
return this._shootEndSound;
}
public function set shootEndSound(param1:SoundResource) : void {
this._shootEndSound = param1;
}
public function get shootSound() : SoundResource {
return this._shootSound;
}
public function set shootSound(param1:SoundResource) : void {
this._shootSound = param1;
}
public function get smokeTexture() : MultiframeTextureResource {
return this._smokeTexture;
}
public function set smokeTexture(param1:MultiframeTextureResource) : void {
this._smokeTexture = param1;
}
public function get sparklesTexture() : MultiframeTextureResource {
return this._sparklesTexture;
}
public function set sparklesTexture(param1:MultiframeTextureResource) : void {
this._sparklesTexture = param1;
}
public function get tankHitSound() : SoundResource {
return this._tankHitSound;
}
public function set tankHitSound(param1:SoundResource) : void {
this._tankHitSound = param1;
}
public function get tankSparklesTexture() : MultiframeTextureResource {
return this._tankSparklesTexture;
}
public function set tankSparklesTexture(param1:MultiframeTextureResource) : void {
this._tankSparklesTexture = param1;
}
public function get tracerTexture() : TextureResource {
return this._tracerTexture;
}
public function set tracerTexture(param1:TextureResource) : void {
this._tracerTexture = param1;
}
public function get turbineStartSound() : SoundResource {
return this._turbineStartSound;
}
public function set turbineStartSound(param1:SoundResource) : void {
this._turbineStartSound = param1;
}
public function toString() : String {
var local1:String = "MachineGunSFXCC [";
local1 += "chainStartSound = " + this.chainStartSound + " ";
local1 += "crumbsTexture = " + this.crumbsTexture + " ";
local1 += "dustTexture = " + this.dustTexture + " ";
local1 += "fireAcrossTexture = " + this.fireAcrossTexture + " ";
local1 += "fireAlongTexture = " + this.fireAlongTexture + " ";
local1 += "hitSound = " + this.hitSound + " ";
local1 += "lightingSFXEntity = " + this.lightingSFXEntity + " ";
local1 += "longFailSound = " + this.longFailSound + " ";
local1 += "shootEndSound = " + this.shootEndSound + " ";
local1 += "shootSound = " + this.shootSound + " ";
local1 += "smokeTexture = " + this.smokeTexture + " ";
local1 += "sparklesTexture = " + this.sparklesTexture + " ";
local1 += "tankHitSound = " + this.tankHitSound + " ";
local1 += "tankSparklesTexture = " + this.tankSparklesTexture + " ";
local1 += "tracerTexture = " + this.tracerTexture + " ";
local1 += "turbineStartSound = " + this.turbineStartSound + " ";
return local1 + "]";
}
}
}
|
package controls.panel {
import controls.Label;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
public class BaseButton extends MovieClip {
public var icon:MovieClip;
public var b:MovieClip;
protected var bg:MovieClip;
protected var _label:Label = new Label();
private var _short:Boolean = false;
public var type:int = 0;
private var _enable:Boolean = true;
private var _labeltext:String;
private var _selected:Boolean;
public function BaseButton() {
super();
this.configUI();
this.enable = true;
tabEnabled = false;
}
public function set enable(param1:Boolean) : void {
this._enable = param1;
if(this._enable) {
this.addListeners();
} else {
this.removeListeners();
}
}
public function get enable() : Boolean {
return this._enable;
}
public function set short(param1:Boolean) : void {
this._short = param1;
this._label.visible = !this._short;
this._label.width = this._short ? 1 : this.bg.width - this._label.x - 3;
this._label.text = this._short ? "" : this._labeltext;
this.enable = this._enable;
}
public function set label(param1:String) : void {
this._label.autoSize = TextFieldAutoSize.NONE;
this._label.align = TextFormatAlign.CENTER;
this._label.height = 19;
this._label.x = this.icon.x + this.icon.width - 3;
this._label.y = 4;
this._label.width = this.bg.width - this._label.x - 3;
this._label.mouseEnabled = false;
this._label.filters = [new DropShadowFilter(1,45,0,0.7,1,1,1)];
this._label.text = param1;
this._labeltext = param1;
}
protected function configUI() : void {
this.bg = getChildByName("b") as MovieClip;
addChild(this._label);
}
protected function addListeners() : void {
gotoAndStop(2);
this.bg.gotoAndStop(2 + (this._short ? 4 : 0));
buttonMode = true;
mouseEnabled = true;
mouseChildren = true;
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent);
}
protected function removeListeners() : void {
gotoAndStop(1);
this.bg.gotoAndStop(1 + (this._short ? 4 : 0));
this._label.y = 4;
buttonMode = false;
mouseEnabled = false;
mouseChildren = false;
removeEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent);
removeEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent);
}
protected function onMouseEvent(param1:MouseEvent) : void {
switch(param1.type) {
case MouseEvent.MOUSE_OVER:
this._label.y = 4;
gotoAndStop(3);
this.bg.gotoAndStop(3 + (this._short ? 4 : 0));
break;
case MouseEvent.MOUSE_OUT:
this._label.y = 4;
gotoAndStop(2);
this.bg.gotoAndStop(2 + (this._short ? 4 : 0));
break;
case MouseEvent.MOUSE_DOWN:
this._label.y = 5;
gotoAndStop(4);
this.bg.gotoAndStop(4 + (this._short ? 4 : 0));
break;
case MouseEvent.MOUSE_UP:
this._label.y = 4;
gotoAndStop(2);
this.bg.gotoAndStop(2 + (this._short ? 4 : 0));
}
}
public function get selected() : Boolean {
return this._selected;
}
public function set selected(param1:Boolean) : void {
this._selected = param1;
if(this.selected) {
buttonMode = true;
mouseEnabled = true;
mouseChildren = true;
}
}
}
}
|
package _codec.projects.tanks.client.panel.model.battleinvite {
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 projects.tanks.client.panel.model.battleinvite.BattleInviteCC;
public class CodecBattleInviteCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_soundNotification:ICodec;
public function CodecBattleInviteCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_soundNotification = param1.getCodec(new TypeCodecInfo(SoundResource,true));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BattleInviteCC = new BattleInviteCC();
local2.soundNotification = this.codec_soundNotification.decode(param1) as SoundResource;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:BattleInviteCC = BattleInviteCC(param2);
this.codec_soundNotification.encode(param1,local3.soundNotification);
}
}
}
|
package projects.tanks.client.panel.model.shop.challenges.battlepass {
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 BattlePassPackageModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:BattlePassPackageModelServer;
private var client:IBattlePassPackageModelBase = IBattlePassPackageModelBase(this);
private var modelId:Long = Long.getLong(357593452,1584643062);
public function BattlePassPackageModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new BattlePassPackageModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(BattlePassPackageCC,false)));
}
protected function getInitParam() : BattlePassPackageCC {
return BattlePassPackageCC(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 projects.tanks.client.battlefield.models.tankparts.weapons.common.discrete {
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.types.Vector3d;
public class TargetHit {
private var _direction:Vector3d;
private var _localHitPoint:Vector3d;
private var _numberHits:int;
private var _target:IGameObject;
public function TargetHit(param1:Vector3d = null, param2:Vector3d = null, param3:int = 0, param4:IGameObject = null) {
super();
this._direction = param1;
this._localHitPoint = param2;
this._numberHits = param3;
this._target = param4;
}
public function get direction() : Vector3d {
return this._direction;
}
public function set direction(param1:Vector3d) : void {
this._direction = param1;
}
public function get localHitPoint() : Vector3d {
return this._localHitPoint;
}
public function set localHitPoint(param1:Vector3d) : void {
this._localHitPoint = param1;
}
public function get numberHits() : int {
return this._numberHits;
}
public function set numberHits(param1:int) : void {
this._numberHits = param1;
}
public function get target() : IGameObject {
return this._target;
}
public function set target(param1:IGameObject) : void {
this._target = param1;
}
public function toString() : String {
var local1:String = "TargetHit [";
local1 += "direction = " + this.direction + " ";
local1 += "localHitPoint = " + this.localHitPoint + " ";
local1 += "numberHits = " + this.numberHits + " ";
local1 += "target = " + this.target + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.makeup {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/projects.tanks.clients.fp10.Prelauncher.makeup.MakeUp_tournamentsActiveIconMakeUp.png")]
public class MakeUp_tournamentsActiveIconMakeUp extends BitmapAsset {
public function MakeUp_tournamentsActiveIconMakeUp() {
super();
}
}
}
|
package projects.tanks.client.panel.model.referals
{
import scpacker.Base;
public class ReferalsModelBase extends Base
{
public function ReferalsModelBase()
{
super();
}
}
}
|
package alternativa.engine3d.core
{
import alternativa.gfx.agal.VertexShader;
public class ShadowVolumeVertexShader extends VertexShader
{
public function ShadowVolumeVertexShader()
{
super();
mul(vt1,va0,vc[14]);
add(vt1.xyz,vt1,vc[15]);
dp4(vt0.x,vt1,vc[11]);
dp4(vt0.y,vt1,vc[12]);
dp4(vt0.z,vt1,vc[13]);
mov(vt0.w,vt1);
mul(vt0.xy,vt0,vc[17]);
mul(vt1.xy,vc[17].zw,vt0.z);
add(vt0.xy,vt0,vt1);
mov(op.xw,vt0.xz);
neg(op.y,vt0);
mul(vt0.z,vt0,vc[16]);
add(op.z,vt0,vc[16].w);
}
}
}
|
package com.lorentz.SVG.data.path
{
public class SVGLineToHorizontalCommand extends SVGPathCommand
{
public var x:Number = 0;
public var absolute:Boolean = false;
public function SVGLineToHorizontalCommand(absolute:Boolean, x:Number = 0)
{
super();
this.absolute = absolute;
this.x = x;
}
override public function get type():String {
return absolute ? "H" : "h";
}
override public function clone():Object {
var copy:SVGLineToHorizontalCommand = new SVGLineToHorizontalCommand(absolute);
copy.x = x;
return copy;
}
}
}
|
package assets.button {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.button.button_blue_DOWN_RIGHT.png")]
public dynamic class button_blue_DOWN_RIGHT extends BitmapData {
public function button_blue_DOWN_RIGHT(param1:int = 7, param2:int = 30) {
super(param1,param2);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.user.bossstate {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.battlefield.models.user.bossstate.BossRelationRole;
public class CodecBossRelationRole implements ICodec {
public function CodecBossRelationRole() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:BossRelationRole = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = BossRelationRole.VICTIM;
break;
case 1:
local2 = BossRelationRole.INCARNATION;
break;
case 2:
local2 = BossRelationRole.BOSS;
}
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:int = int(param2.value);
param1.writer.writeInt(local3);
}
}
}
|
package alternativa.tanks.controllers.battleinfo {
import alternativa.types.Long;
import flash.events.IEventDispatcher;
import platform.client.fp10.core.type.IGameObject;
public interface IBattleInfoController extends IEventDispatcher {
function addFormToStage() : void;
function removeFormFromStage() : void;
function hideForm() : void;
function removeUser(param1:Long) : void;
function updateBattleName() : void;
function updateUserScore(param1:Long, param2:int) : void;
function updateUserSuspiciousState(param1:Long, param2:Boolean) : void;
function roundStart(param1:int) : void;
function roundFinish() : void;
function battleStop() : void;
function getSelectedBattle() : IGameObject;
}
}
|
package alternativa.engine3d.core {
import alternativa.gfx.agal.VertexShader;
public class DepthRendererDepthVertexShader extends VertexShader {
public function DepthRendererDepthVertexShader(param1:Boolean, param2:Boolean) {
super();
mov(vt0,vc[0]);
dp4(vt0.x,va0,vc[0]);
dp4(vt0.y,va0,vc[1]);
dp4(vt0.z,va0,vc[2]);
mul(vt0.xy,vt0,vc[4]);
mul(vt1,vc[5],vt0.z);
sub(vt0.xy,vt0,vt1);
mul(v0,vt0,vc[4]);
if(param1) {
dp3(vt1,va1,vc[0]);
dp3(vt1.y,va1,vc[1]);
mul(v0.xy,vt1,vc[6]);
dp3(v0.w,va1,vc[2]);
}
mov(op.xw,vt0.xz);
neg(op.y,vt0);
mul(vt0.z,vt0,vc[3]);
add(op.z,vt0,vc[3].w);
if(param2) {
mul(v1,va2,vc[7]);
}
}
}
}
|
package projects.tanks.client.clans.clan.outgoing {
import alternativa.types.Long;
public interface IClanOutgoingModelBase {
function onAdding(param1:Long) : void;
function onRemoved(param1:Long) : void;
}
}
|
package projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity {
public class LightEffectItem {
private var _attenuationBegin:Number;
private var _attenuationEnd:Number;
private var _color:String;
private var _intensity:Number;
private var _time:int;
public function LightEffectItem(param1:Number = 0, param2:Number = 0, param3:String = null, param4:Number = 0, param5:int = 0) {
super();
this._attenuationBegin = param1;
this._attenuationEnd = param2;
this._color = param3;
this._intensity = param4;
this._time = param5;
}
public function get attenuationBegin() : Number {
return this._attenuationBegin;
}
public function set attenuationBegin(param1:Number) : void {
this._attenuationBegin = param1;
}
public function get attenuationEnd() : Number {
return this._attenuationEnd;
}
public function set attenuationEnd(param1:Number) : void {
this._attenuationEnd = param1;
}
public function get color() : String {
return this._color;
}
public function set color(param1:String) : void {
this._color = param1;
}
public function get intensity() : Number {
return this._intensity;
}
public function set intensity(param1:Number) : void {
this._intensity = param1;
}
public function get time() : int {
return this._time;
}
public function set time(param1:int) : void {
this._time = param1;
}
public function toString() : String {
var local1:String = "LightEffectItem [";
local1 += "attenuationBegin = " + this.attenuationBegin + " ";
local1 += "attenuationEnd = " + this.attenuationEnd + " ";
local1 += "color = " + this.color + " ";
local1 += "intensity = " + this.intensity + " ";
local1 += "time = " + this.time + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.shaft {
import platform.client.fp10.core.resource.types.TextureResource;
public class ShaftCC {
private var _afterShotPause:int;
private var _aimingImpact:Number;
private var _chargeRate:Number;
private var _dischargeRate:Number;
private var _fastShotEnergy:Number;
private var _horizontalTargetingSpeed:Number;
private var _initialFOV:Number;
private var _maxEnergy:Number;
private var _minAimedShotEnergy:Number;
private var _minimumFOV:Number;
private var _reticleImage:TextureResource;
private var _rotationCoeffKmin:Number;
private var _rotationCoeffT1:Number;
private var _rotationCoeffT2:Number;
private var _shrubsHidingRadiusMax:Number;
private var _shrubsHidingRadiusMin:Number;
private var _targetingAcceleration:Number;
private var _targetingTransitionTime:int;
private var _verticalTargetingSpeed:Number;
public function ShaftCC(param1:int = 0, param2:Number = 0, param3:Number = 0, param4:Number = 0, param5:Number = 0, param6:Number = 0, param7:Number = 0, param8:Number = 0, param9:Number = 0, param10:Number = 0, param11:TextureResource = null, param12:Number = 0, param13:Number = 0, param14:Number = 0, param15:Number = 0, param16:Number = 0, param17:Number = 0, param18:int = 0, param19:Number = 0) {
super();
this._afterShotPause = param1;
this._aimingImpact = param2;
this._chargeRate = param3;
this._dischargeRate = param4;
this._fastShotEnergy = param5;
this._horizontalTargetingSpeed = param6;
this._initialFOV = param7;
this._maxEnergy = param8;
this._minAimedShotEnergy = param9;
this._minimumFOV = param10;
this._reticleImage = param11;
this._rotationCoeffKmin = param12;
this._rotationCoeffT1 = param13;
this._rotationCoeffT2 = param14;
this._shrubsHidingRadiusMax = param15;
this._shrubsHidingRadiusMin = param16;
this._targetingAcceleration = param17;
this._targetingTransitionTime = param18;
this._verticalTargetingSpeed = param19;
}
public function get afterShotPause() : int {
return this._afterShotPause;
}
public function set afterShotPause(param1:int) : void {
this._afterShotPause = param1;
}
public function get aimingImpact() : Number {
return this._aimingImpact;
}
public function set aimingImpact(param1:Number) : void {
this._aimingImpact = param1;
}
public function get chargeRate() : Number {
return this._chargeRate;
}
public function set chargeRate(param1:Number) : void {
this._chargeRate = param1;
}
public function get dischargeRate() : Number {
return this._dischargeRate;
}
public function set dischargeRate(param1:Number) : void {
this._dischargeRate = param1;
}
public function get fastShotEnergy() : Number {
return this._fastShotEnergy;
}
public function set fastShotEnergy(param1:Number) : void {
this._fastShotEnergy = param1;
}
public function get horizontalTargetingSpeed() : Number {
return this._horizontalTargetingSpeed;
}
public function set horizontalTargetingSpeed(param1:Number) : void {
this._horizontalTargetingSpeed = param1;
}
public function get initialFOV() : Number {
return this._initialFOV;
}
public function set initialFOV(param1:Number) : void {
this._initialFOV = param1;
}
public function get maxEnergy() : Number {
return this._maxEnergy;
}
public function set maxEnergy(param1:Number) : void {
this._maxEnergy = param1;
}
public function get minAimedShotEnergy() : Number {
return this._minAimedShotEnergy;
}
public function set minAimedShotEnergy(param1:Number) : void {
this._minAimedShotEnergy = param1;
}
public function get minimumFOV() : Number {
return this._minimumFOV;
}
public function set minimumFOV(param1:Number) : void {
this._minimumFOV = param1;
}
public function get reticleImage() : TextureResource {
return this._reticleImage;
}
public function set reticleImage(param1:TextureResource) : void {
this._reticleImage = param1;
}
public function get rotationCoeffKmin() : Number {
return this._rotationCoeffKmin;
}
public function set rotationCoeffKmin(param1:Number) : void {
this._rotationCoeffKmin = param1;
}
public function get rotationCoeffT1() : Number {
return this._rotationCoeffT1;
}
public function set rotationCoeffT1(param1:Number) : void {
this._rotationCoeffT1 = param1;
}
public function get rotationCoeffT2() : Number {
return this._rotationCoeffT2;
}
public function set rotationCoeffT2(param1:Number) : void {
this._rotationCoeffT2 = param1;
}
public function get shrubsHidingRadiusMax() : Number {
return this._shrubsHidingRadiusMax;
}
public function set shrubsHidingRadiusMax(param1:Number) : void {
this._shrubsHidingRadiusMax = param1;
}
public function get shrubsHidingRadiusMin() : Number {
return this._shrubsHidingRadiusMin;
}
public function set shrubsHidingRadiusMin(param1:Number) : void {
this._shrubsHidingRadiusMin = param1;
}
public function get targetingAcceleration() : Number {
return this._targetingAcceleration;
}
public function set targetingAcceleration(param1:Number) : void {
this._targetingAcceleration = param1;
}
public function get targetingTransitionTime() : int {
return this._targetingTransitionTime;
}
public function set targetingTransitionTime(param1:int) : void {
this._targetingTransitionTime = param1;
}
public function get verticalTargetingSpeed() : Number {
return this._verticalTargetingSpeed;
}
public function set verticalTargetingSpeed(param1:Number) : void {
this._verticalTargetingSpeed = param1;
}
public function toString() : String {
var local1:String = "ShaftCC [";
local1 += "afterShotPause = " + this.afterShotPause + " ";
local1 += "aimingImpact = " + this.aimingImpact + " ";
local1 += "chargeRate = " + this.chargeRate + " ";
local1 += "dischargeRate = " + this.dischargeRate + " ";
local1 += "fastShotEnergy = " + this.fastShotEnergy + " ";
local1 += "horizontalTargetingSpeed = " + this.horizontalTargetingSpeed + " ";
local1 += "initialFOV = " + this.initialFOV + " ";
local1 += "maxEnergy = " + this.maxEnergy + " ";
local1 += "minAimedShotEnergy = " + this.minAimedShotEnergy + " ";
local1 += "minimumFOV = " + this.minimumFOV + " ";
local1 += "reticleImage = " + this.reticleImage + " ";
local1 += "rotationCoeffKmin = " + this.rotationCoeffKmin + " ";
local1 += "rotationCoeffT1 = " + this.rotationCoeffT1 + " ";
local1 += "rotationCoeffT2 = " + this.rotationCoeffT2 + " ";
local1 += "shrubsHidingRadiusMax = " + this.shrubsHidingRadiusMax + " ";
local1 += "shrubsHidingRadiusMin = " + this.shrubsHidingRadiusMin + " ";
local1 += "targetingAcceleration = " + this.targetingAcceleration + " ";
local1 += "targetingTransitionTime = " + this.targetingTransitionTime + " ";
local1 += "verticalTargetingSpeed = " + this.verticalTargetingSpeed + " ";
return local1 + "]";
}
}
}
|
package alternativa.tanks.bg
{
import alternativa.init.OSGi;
import alternativa.init.TanksServicesActivator;
import alternativa.osgi.service.mainContainer.IMainContainerService;
import flash.display.BitmapData;
import flash.display.DisplayObjectContainer;
import flash.display.Shape;
import flash.display.Stage;
import flash.events.Event;
import flash.geom.Rectangle;
public class BackgroundService implements IBackgroundService
{
[Embed(source="1008.png")]
private static const bitmapBg:Class;
private static const bgBitmap:BitmapData = new bitmapBg().bitmapData;
private var osgi:OSGi;
private var stage:Stage;
private var bgLayer:DisplayObjectContainer;
private var bg:Shape;
private var bgCropRect:Rectangle;
public function BackgroundService()
{
super();
this.osgi = TanksServicesActivator.osgi;
var mainContainerService:IMainContainerService = this.osgi.getService(IMainContainerService) as IMainContainerService;
this.stage = mainContainerService.stage;
this.bgLayer = mainContainerService.backgroundLayer;
this.bg = new Shape();
}
public function showBg() : void
{
if(!this.bgLayer.contains(this.bg))
{
this.redrawBg();
this.bgLayer.addChild(this.bg);
this.stage.addEventListener(Event.RESIZE,this.redrawBg);
}
}
public function hideBg() : void
{
if(this.bgLayer.contains(this.bg))
{
this.stage.removeEventListener(Event.RESIZE,this.redrawBg);
this.bgLayer.removeChild(this.bg);
}
}
public function drawBg(cropRect:Rectangle = null) : void
{
this.bgCropRect = cropRect;
this.redrawBg();
}
private function redrawBg(e:Event = null) : void
{
this.bg.graphics.clear();
this.bg.graphics.beginBitmapFill(bgBitmap);
this.bg.graphics.drawRect(0,0,this.stage.stageWidth,this.stage.stageHeight);
if(this.bgCropRect != null)
{
this.bg.graphics.drawRect(this.bgCropRect.x,this.bgCropRect.y,this.bgCropRect.width,this.bgCropRect.height);
}
}
}
}
|
package alternativa.engine3d.loaders.collada {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.animation.keys.NumberKey;
import alternativa.engine3d.animation.keys.NumberTrack;
import alternativa.engine3d.animation.keys.Track;
use namespace alternativa3d;
public class DaeChannel extends DaeElement {
public static const PARAM_UNDEFINED:String = "undefined";
public static const PARAM_TRANSLATE_X:String = "x";
public static const PARAM_TRANSLATE_Y:String = "y";
public static const PARAM_TRANSLATE_Z:String = "z";
public static const PARAM_SCALE_X:String = "scaleX";
public static const PARAM_SCALE_Y:String = "scaleY";
public static const PARAM_SCALE_Z:String = "scaleZ";
public static const PARAM_ROTATION_X:String = "rotationX";
public static const PARAM_ROTATION_Y:String = "rotationY";
public static const PARAM_ROTATION_Z:String = "rotationZ";
public static const PARAM_TRANSLATE:String = "translate";
public static const PARAM_SCALE:String = "scale";
public static const PARAM_MATRIX:String = "matrix";
public var tracks:Vector.<Track>;
public var animatedParam:String = "undefined";
public var animName:String;
public function DaeChannel(param1:XML, param2:DaeDocument) {
super(param1,param2);
}
public function get node() : DaeNode {
var local2:Array = null;
var local3:DaeNode = null;
var local4:int = 0;
var local5:int = 0;
var local6:String = null;
var local1:XML = data.@target[0];
if(local1 != null) {
local2 = local1.toString().split("/");
local3 = document.findNodeByID(local2[0]);
if(local3 != null) {
local2.pop();
local4 = 1;
local5 = int(local2.length);
while(local4 < local5) {
local6 = local2[local4];
local3 = local3.getNodeBySid(local6);
if(local3 == null) {
return null;
}
local4++;
}
return local3;
}
}
return null;
}
override protected function parseImplementation() : Boolean {
this.parseTransformationType();
this.parseSampler();
return true;
}
private function parseTransformationType() : void {
var local6:XML = null;
var local12:XML = null;
var local13:XML = null;
var local14:String = null;
var local15:Array = null;
var local1:XML = data.@target[0];
if(local1 == null) {
return;
}
var local2:Array = local1.toString().split("/");
var local3:String = local2.pop();
var local4:Array = local3.split(".");
var local5:int = int(local4.length);
var local7:DaeNode = this.node;
if(local7 == null) {
return;
}
this.animName = local7.animName;
var local8:XMLList = local7.data.children();
var local9:int = 0;
var local10:int = int(local8.length());
while(local9 < local10) {
local12 = local8[local9];
local13 = local12.@sid[0];
if(local13 != null && local13.toString() == local4[0]) {
local6 = local12;
break;
}
local9++;
}
var local11:String = local6 != null ? local6.localName() as String : null;
if(local5 > 1) {
local14 = local4[1];
switch(local11) {
case "translate":
switch(local14) {
case "X":
this.animatedParam = PARAM_TRANSLATE_X;
break;
case "Y":
this.animatedParam = PARAM_TRANSLATE_Y;
break;
case "Z":
this.animatedParam = PARAM_TRANSLATE_Z;
}
break;
case "rotate":
local15 = parseNumbersArray(local6);
switch(local15.indexOf(1)) {
case 0:
this.animatedParam = PARAM_ROTATION_X;
break;
case 1:
this.animatedParam = PARAM_ROTATION_Y;
break;
case 2:
this.animatedParam = PARAM_ROTATION_Z;
}
break;
case "scale":
switch(local14) {
case "X":
this.animatedParam = PARAM_SCALE_X;
break;
case "Y":
this.animatedParam = PARAM_SCALE_Y;
break;
case "Z":
this.animatedParam = PARAM_SCALE_Z;
}
}
} else {
switch(local11) {
case "translate":
this.animatedParam = PARAM_TRANSLATE;
break;
case "scale":
this.animatedParam = PARAM_SCALE;
break;
case "matrix":
this.animatedParam = PARAM_MATRIX;
}
}
}
private function parseSampler() : void {
var local2:NumberTrack = null;
var local3:Number = NaN;
var local4:NumberKey = null;
var local1:DaeSampler = document.findSampler(data.@source[0]);
if(local1 != null) {
local1.parse();
if(this.animatedParam == PARAM_MATRIX) {
this.tracks = Vector.<Track>([local1.parseTransformationTrack(this.animName)]);
return;
}
if(this.animatedParam == PARAM_TRANSLATE) {
this.tracks = local1.parsePointsTracks(this.animName,"x","y","z");
return;
}
if(this.animatedParam == PARAM_SCALE) {
this.tracks = local1.parsePointsTracks(this.animName,"scaleX","scaleY","scaleZ");
return;
}
if(this.animatedParam == PARAM_ROTATION_X || this.animatedParam == PARAM_ROTATION_Y || this.animatedParam == PARAM_ROTATION_Z) {
local2 = local1.parseNumbersTrack(this.animName,this.animatedParam);
local3 = Math.PI / 180;
local4 = local2.alternativa3d::keyList;
while(local4 != null) {
local4.alternativa3d::_value *= local3;
local4 = local4.alternativa3d::next;
}
this.tracks = Vector.<Track>([local2]);
return;
}
if(this.animatedParam == PARAM_TRANSLATE_X || this.animatedParam == PARAM_TRANSLATE_Y || this.animatedParam == PARAM_TRANSLATE_Z || this.animatedParam == PARAM_SCALE_X || this.animatedParam == PARAM_SCALE_Y || this.animatedParam == PARAM_SCALE_Z) {
this.tracks = Vector.<Track>([local1.parseNumbersTrack(this.animName,this.animatedParam)]);
}
} else {
document.logger.logNotFoundError(data.@source[0]);
}
}
}
}
|
package alternativa.protocol.type
{
public class Short
{
public function Short()
{
super();
}
}
}
|
package platform.client.fp10.core.service.errormessage {
import platform.client.fp10.core.service.errormessage.errors.ErrorType;
public interface IErrorMessageService {
function showMessage(param1:ErrorType) : void;
function hideMessage() : void;
function setMessageBox(param1:IMessageBox) : void;
}
}
|
package controls.scroller.green {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.scroller.green.ScrollSkinGreen_track.png")]
public class ScrollSkinGreen_track extends BitmapAsset {
public function ScrollSkinGreen_track() {
super();
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.DefaultRanksBitmaps_bitmapBigRank04.png")]
public class DefaultRanksBitmaps_bitmapBigRank04 extends BitmapAsset {
public function DefaultRanksBitmaps_bitmapBigRank04() {
super();
}
}
}
|
package alternativa.tanks.view.mainview.grouplist.item.background {
import alternativa.tanks.gui.friends.list.renderer.background.FriendCellSelected;
public class GroupListBackgroundRendererSelected extends GroupListBackgroundRenderer {
public function GroupListBackgroundRendererSelected() {
super(FriendCellSelected);
}
}
}
|
package alternativa.tanks.gui.garagelist {
import fl.controls.listClasses.CellRenderer;
import fl.controls.listClasses.ListData;
import flash.display.DisplayObject;
import platform.client.fp10.core.resource.types.ImageResource;
import utils.preview.IImageResource;
import utils.preview.ImageResourceLoadingWrapper;
public class GarageListRenderer extends CellRenderer implements IImageResource {
private var nicon:DisplayObject;
private var sicon:DisplayObject;
public function GarageListRenderer() {
super();
this.buttonMode = true;
this.useHandCursor = true;
}
override public function set data(param1:Object) : void {
_data = param1;
this.nicon = param1.iconNormal;
this.sicon = param1.iconSelected;
}
override public function set listData(param1:ListData) : void {
this.loadLazyResource();
_listData = param1;
label = _listData.label;
if(this.nicon != null && this.sicon != null) {
setStyle("icon",this.nicon);
setStyle("selectedUpIcon",this.sicon);
setStyle("selectedOverIcon",this.sicon);
setStyle("selectedDownIcon",this.sicon);
}
}
private function loadLazyResource() : void {
var local1:ImageResource = _data.preview as ImageResource;
if(local1 != null && !local1.isLoaded) {
local1.loadLazyResource(new ImageResourceLoadingWrapper(this));
}
}
public function setPreviewResource(param1:ImageResource) : void {
}
override protected function drawBackground() : void {
}
override protected function drawLayout() : void {
}
override protected function drawIcon() : void {
var local2:String = null;
var local1:DisplayObject = icon;
local2 = !!enabled ? mouseState : "disabled";
if(selected) {
local2 = "selected" + local2.substr(0,1).toUpperCase() + local2.substr(1);
}
local2 += "Icon";
var local3:Object = getStyleValue(local2);
if(local3 == null) {
local3 = getStyleValue("icon");
}
if(local3 != null) {
icon = getDisplayObjectInstance(local3);
}
if(icon != null) {
addChildAt(icon,1);
}
if(local1 != null && local1 != icon && local1.parent == this) {
removeChild(local1);
}
}
}
}
|
package alternativa.tanks.gui.shop.paymentform.item {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.components.item.GridItemBase;
import controls.TankWindow;
public class PaymentFormItemBase extends GridItemBase {
private static var WINDOW_PADDING:int = 25;
private var form:PayModeForm;
private var background:TankWindow;
public function PaymentFormItemBase(param1:PayModeForm) {
super();
this.background = new TankWindow();
addChild(this.background);
this.form = param1;
addChild(param1);
this.render();
}
private function render() : void {
this.form.x = this.form.y = WINDOW_PADDING;
this.background.width = this.width;
this.background.height = this.height;
}
override public function destroy() : void {
super.destroy();
this.form = null;
this.background = null;
}
override public function get width() : Number {
return this.form.width + (WINDOW_PADDING << 1);
}
override public function get height() : Number {
return this.form.height + (WINDOW_PADDING << 1);
}
}
}
|
package controls.resultassets {
import assets.resultwindow.bres_BG_GRAY_PIXEL;
import assets.resultwindow.bres_BG_GRAY_TL;
public class ResultWindowGray extends ResultWindowBase {
public function ResultWindowGray() {
super();
tl = new bres_BG_GRAY_TL(1,1);
px = new bres_BG_GRAY_PIXEL(1,1);
}
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapSmallRank05.png")]
public class PremiumRankBitmaps_bitmapSmallRank05 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapSmallRank05() {
super();
}
}
}
|
package alternativa.tanks.controller.events {
import flash.events.Event;
public class AccountLoginEvent extends Event {
public static const EVENT_TYPE:String = "AccountLoginEvent.EVENT_TYPE";
private var _hash:String;
public function AccountLoginEvent(param1:String) {
this._hash = param1;
super(EVENT_TYPE);
}
public function get hash() : String {
return this._hash;
}
}
}
|
package alternativa.tanks.models.sfx.healing
{
import alternativa.engine3d.core.Object3D;
import alternativa.engine3d.materials.Material;
import alternativa.init.Main;
import alternativa.math.Vector3;
import alternativa.model.IModel;
import alternativa.object.ClientObject;
import alternativa.service.IModelService;
import alternativa.tanks.engine3d.MaterialType;
import alternativa.tanks.engine3d.TextureAnimation;
import alternativa.tanks.models.battlefield.IBattleField;
import alternativa.tanks.models.tank.TankData;
import alternativa.tanks.models.weapon.common.IWeaponCommonModel;
import alternativa.tanks.models.weapon.common.WeaponCommonData;
import alternativa.tanks.services.materialregistry.IMaterialRegistry;
import alternativa.tanks.services.objectpool.IObjectPoolService;
import alternativa.tanks.utils.GraphicsUtils;
import com.alternativaplatform.projects.tanks.client.warfare.models.sfx.healing.HealingSFXModelBase;
import com.alternativaplatform.projects.tanks.client.warfare.models.sfx.healing.IHealingSFXModelBase;
import com.alternativaplatform.projects.tanks.client.warfare.models.tankparts.weapon.healing.IsisActionType;
import flash.display.BitmapData;
import flash.utils.Dictionary;
import scpacker.resource.ResourceType;
import scpacker.resource.ResourceUtil;
public class HealingGunSFXModel extends HealingSFXModelBase implements IHealingSFXModelBase, IHealingSFXModel
{
private static const MIPMAP_RESOLUTION:Number = 1;
private static var materialRegistry:IMaterialRegistry;
private static var objectPoolService:IObjectPoolService;
private var battlefield:IBattleField;
private var weaponCommonModel:IWeaponCommonModel;
private var targetPosLocal:Vector3;
private var activeEffects:Dictionary;
public function HealingGunSFXModel()
{
this.targetPosLocal = new Vector3();
this.activeEffects = new Dictionary();
super();
_interfaces.push(IModel,IHealingSFXModelBase,IHealingSFXModel);
HealingGunCameraEffect.initVars();
materialRegistry = IMaterialRegistry(Main.osgi.getService(IMaterialRegistry));
objectPoolService = IObjectPoolService(Main.osgi.getService(IObjectPoolService));
}
public function initObject(clientObject:ClientObject, damagingRayId:String, damagingSoundId:String, damagingTargetBallId:String, damagingWeaponBallId:String, healingRayId:String, healingSoundId:String, healingTargetBallId:String, healingWeaponBallId:String, idleSoundId:String, idleWeaponBallId:String) : void
{
var modelService:IModelService = null;
if(this.battlefield == null)
{
modelService = IModelService(Main.osgi.getService(IModelService));
this.battlefield = IBattleField(modelService.getModelsByInterface(IBattleField)[0]);
this.weaponCommonModel = IWeaponCommonModel(modelService.getModelsByInterface(IWeaponCommonModel)[0]);
}
var data:HealingGunSFXData = new HealingGunSFXData();
data.idleSparkMaterials = this.createSpriteMaterials(ResourceUtil.getResource(ResourceType.IMAGE,idleWeaponBallId).bitmapData);
data.idleSound = ResourceUtil.getResource(ResourceType.SOUND,idleSoundId).sound;
data.healShaftMaterials = this.createShaftMaterials(ResourceUtil.getResource(ResourceType.IMAGE,healingRayId).bitmapData);
data.healSparkMaterials = this.createSpriteMaterials(ResourceUtil.getResource(ResourceType.IMAGE,healingWeaponBallId).bitmapData);
data.healShaftEndMaterials = this.createSpriteMaterials(ResourceUtil.getResource(ResourceType.IMAGE,healingTargetBallId).bitmapData);
data.healSound = ResourceUtil.getResource(ResourceType.SOUND,damagingSoundId).sound;
data.damageShaftMaterials = this.createShaftMaterials(ResourceUtil.getResource(ResourceType.IMAGE,damagingRayId).bitmapData);
data.damageSparkMaterials = this.createSpriteMaterials(ResourceUtil.getResource(ResourceType.IMAGE,damagingWeaponBallId).bitmapData);
data.damageShaftEndMaterials = this.createSpriteMaterials(ResourceUtil.getResource(ResourceType.IMAGE,damagingTargetBallId).bitmapData);
data.damageSound = ResourceUtil.getResource(ResourceType.SOUND,damagingSoundId).sound;
data.idleSparkData = this.getTextureAnimation(ResourceUtil.getResource(ResourceType.IMAGE,idleWeaponBallId).bitmapData,150,30);
data.healSparkData = this.getTextureAnimation(ResourceUtil.getResource(ResourceType.IMAGE,healingWeaponBallId).bitmapData,150);
data.healShaftData = this.getTextureAnimation(ResourceUtil.getResource(ResourceType.IMAGE,healingRayId).bitmapData,100,20);
data.healShaftEndData = this.getTextureAnimation(ResourceUtil.getResource(ResourceType.IMAGE,healingTargetBallId).bitmapData,100);
data.damageShaftData = this.getTextureAnimation(ResourceUtil.getResource(ResourceType.IMAGE,damagingRayId).bitmapData,100,10);
data.damageSparkData = this.getTextureAnimation(ResourceUtil.getResource(ResourceType.IMAGE,damagingWeaponBallId).bitmapData,150);
data.damageShaftEndData = this.getTextureAnimation(ResourceUtil.getResource(ResourceType.IMAGE,damagingTargetBallId).bitmapData,100);
clientObject.putParams(HealingGunSFXModel,data);
}
private function getTextureAnimation(data:BitmapData, size:int, fps:int = 30) : TextureAnimation
{
var data_:TextureAnimation = GraphicsUtils.getTextureAnimation(null,data,size,size);
data_.fps = fps;
return data_;
}
public function createOrUpdateEffects(ownerData:TankData, mode:IsisActionType, targetData:TankData) : void
{
var effects:HealingGunSFX = null;
if(targetData != null && !targetData.enabled)
{
return;
}
var ownerTurret:ClientObject = ownerData.turret;
var sfxData:HealingGunSFXData = HealingGunSFXData(ownerTurret.getParams(HealingGunSFXModel));
var weaponCommonData:WeaponCommonData = this.weaponCommonModel.getCommonData(ownerTurret);
var turret:Object3D = ownerData.tank.skin.turretMesh;
var srcPosLocal:Vector3 = weaponCommonData.muzzles[0];
var target:Object3D = targetData == null ? null : targetData.tank.skin.turretMesh;
var turretId:String = ownerTurret.id;
var turretEffects:Dictionary = this.activeEffects[turretId];
if(turretEffects == null)
{
turretEffects = new Dictionary();
this.activeEffects[turretId] = turretEffects;
}
else
{
effects = turretEffects[ownerData.user.id];
}
if(effects == null)
{
effects = HealingGunSFX(objectPoolService.objectPool.getObject(HealingGunSFX));
effects.init(mode,sfxData,turret,srcPosLocal,ownerData);
if(targetData != null)
{
effects.setTargetParams(targetData,ownerData,target,this.targetPosLocal,mode);
}
turretEffects[ownerData.user.id] = effects;
effects.addToBattlefield(this.battlefield);
}
else
{
effects.mode = mode;
effects.setTargetParams(targetData,ownerData,target,this.targetPosLocal,mode);
}
}
public function destroyEffectsByOwner(ownerData:TankData) : void
{
var turretEffects:Dictionary = this.activeEffects[ownerData.turret.id];
if(turretEffects == null)
{
return;
}
var userId:String = ownerData.user.id;
var effects:HealingGunSFX = turretEffects[userId];
if(effects != null)
{
if(effects)
{
effects.destroy();
}
delete turretEffects[userId];
}
}
public function destroyEffectsByTarget(targetData:TankData) : void
{
var turretEffects:Dictionary = null;
var userId:* = undefined;
var effects:HealingGunSFX = null;
for each(turretEffects in this.activeEffects)
{
for(userId in turretEffects)
{
effects = turretEffects[userId];
if(effects.targetData == targetData)
{
effects.destroy();
delete turretEffects[userId];
}
}
}
}
private function createShaftMaterials(source:BitmapData) : Vector.<Material>
{
return materialRegistry.materialSequenceRegistry.getSequence(MaterialType.EFFECT,source,100,MIPMAP_RESOLUTION,false,true).materials;
}
private function createSpriteMaterials(source:BitmapData) : Vector.<Material>
{
return materialRegistry.materialSequenceRegistry.getSequence(MaterialType.EFFECT,source,source.height,MIPMAP_RESOLUTION).materials;
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.