code
stringlengths 57
237k
|
|---|
package projects.tanks.client.panel.model.profile.useremailpassword {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class UserEmailAndPasswordModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _checkPasswordCorrectnessId:Long = Long.getLong(559593111,-952813339);
private var _checkPasswordCorrectness_passwordCodec:ICodec;
private var _checkPasswordIsSetId:Long = Long.getLong(1242173665,-1316000690);
private var _sendPasswordAndEmailChangeInstructionId:Long = Long.getLong(802671902,-818419143);
private var _setPasswordId:Long = Long.getLong(1424798338,1718503200);
private var _setPassword_passwordCodec:ICodec;
private var _updateEmailId:Long = Long.getLong(1424352018,1227515882);
private var _updateEmail_emailCodec:ICodec;
private var _updatePasswordId:Long = Long.getLong(1405907795,-1118149663);
private var _updatePassword_oldPasswordCodec:ICodec;
private var _updatePassword_passwordCodec:ICodec;
private var model:IModel;
public function UserEmailAndPasswordModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._checkPasswordCorrectness_passwordCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._setPassword_passwordCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._updateEmail_emailCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._updatePassword_oldPasswordCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._updatePassword_passwordCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function checkPasswordCorrectness(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._checkPasswordCorrectness_passwordCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._checkPasswordCorrectnessId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function checkPasswordIsSet() : 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._checkPasswordIsSetId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function sendPasswordAndEmailChangeInstruction() : 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._sendPasswordAndEmailChangeInstructionId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function setPassword(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._setPassword_passwordCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._setPasswordId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function updateEmail(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._updateEmail_emailCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._updateEmailId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function updatePassword(param1:String, param2:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._updatePassword_oldPasswordCodec.encode(this.protocolBuffer,param1);
this._updatePassword_passwordCodec.encode(this.protocolBuffer,param2);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local3:SpaceCommand = new SpaceCommand(Model.object.id,this._updatePasswordId,this.protocolBuffer);
var local4:IGameObject = Model.object;
var local5:ISpace = local4.space;
local5.commandSender.sendCommand(local3);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.tanks.model.matchmaking {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class MatchmakingQueueEvents implements MatchmakingQueue {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function MatchmakingQueueEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function registrationSuccessful() : void {
var i:int = 0;
var m:MatchmakingQueue = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = MatchmakingQueue(this.impl[i]);
m.registrationSuccessful();
i++;
}
}
finally {
Model.popObject();
}
}
public function registrationCancelled() : void {
var i:int = 0;
var m:MatchmakingQueue = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = MatchmakingQueue(this.impl[i]);
m.registrationCancelled();
i++;
}
}
finally {
Model.popObject();
}
}
}
}
|
package projects.tanks.client.battlefield.models.battle.battlefield.mine {
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 BattleMinesModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function BattleMinesModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package alternativa.tanks.model.donationalert {
import alternativa.tanks.gui.ThanksForPurchaseWindow;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.panel.model.donationalert.types.GoodInfoData;
public class ThanksForDonationFormServiceAdapt implements ThanksForDonationFormService {
private var object:IGameObject;
private var impl:ThanksForDonationFormService;
public function ThanksForDonationFormServiceAdapt(param1:IGameObject, param2:ThanksForDonationFormService) {
super();
this.object = param1;
this.impl = param2;
}
public function getThanksForPurchaseForm(param1:Vector.<GoodInfoData>, param2:Boolean) : ThanksForPurchaseWindow {
var result:ThanksForPurchaseWindow = null;
var items:Vector.<GoodInfoData> = param1;
var requiredEmail:Boolean = param2;
try {
Model.object = this.object;
result = this.impl.getThanksForPurchaseForm(items,requiredEmail);
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package forms.battlelist
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class BattleInfo__domIcon extends BitmapAsset
{
public function BattleInfo__domIcon()
{
super();
}
}
}
|
package alternativa.tanks.gui
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class ItemInfoPanel_bitmapArea extends BitmapAsset
{
public function ItemInfoPanel_bitmapArea()
{
super();
}
}
}
|
package projects.tanks.client.commons.models.runtime {
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 DataOwnerModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var model:IModel;
public function DataOwnerModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
}
}
}
|
package com.lorentz.SVG.display {
import com.lorentz.SVG.display.base.SVGContainer;
public class SVGG extends SVGContainer {
public function SVGG(){
super("g");
}
}
}
|
package alternativa.tanks.gui.clanchat {
import flash.events.Event;
public class SendChatMessageEvent extends Event {
public static const SEND_CHAT_MESSAGE:String = "SendChatMessageEvent.SEND_CHAT_MESSAGE";
public var message:String;
public var recipientUid:String;
public function SendChatMessageEvent(param1:String, param2:String = "") {
this.message = param1;
this.recipientUid = param2;
super(SEND_CHAT_MESSAGE,true);
}
}
}
|
package alternativa.tanks.model.item.discount.proabonement {
[ModelInterface]
public interface ProAbonementRankDiscount {
function getRankDiscount() : int;
}
}
|
package projects.tanks.client.battlefield.models.bonus.battle.battlefield {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class BattlefieldBonusesModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _attemptToTakeBonusId:Long = Long.getLong(1669375812,-973745790);
private var _attemptToTakeBonus_bonusIdCodec:ICodec;
private var model:IModel;
public function BattlefieldBonusesModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._attemptToTakeBonus_bonusIdCodec = this.protocol.getCodec(new TypeCodecInfo(Long,false));
}
public function attemptToTakeBonus(param1:Long) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._attemptToTakeBonus_bonusIdCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._attemptToTakeBonusId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.premium {
import flash.events.IEventDispatcher;
public interface PremiumService extends IEventDispatcher {
function hasPremium() : Boolean;
function updateTimeLeft(param1:int) : void;
function getTimeLeft() : int;
function destroy() : void;
}
}
|
package forms.ranks {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/forms.ranks.PremiumRankBitmaps_bitmapSmallRank23.png")]
public class PremiumRankBitmaps_bitmapSmallRank23 extends BitmapAsset {
public function PremiumRankBitmaps_bitmapSmallRank23() {
super();
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.premium {
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.utils.clearInterval;
import flash.utils.getTimer;
import flash.utils.setInterval;
public class PremiumServiceImpl extends EventDispatcher implements PremiumService {
private const HOUR_IN_SECONDS:int = 3600;
private const DAY_IN_SECONDS:int = 86400;
private const UPDATE_INTERVAL:int = 60000;
private var endTime:int;
private var intervalId:uint = 0;
public function PremiumServiceImpl() {
super();
}
private function update() : void {
if(!this.hasPremium()) {
dispatchEvent(new Event(Event.CHANGE));
this.destroyInterval();
}
}
public function hasPremium() : Boolean {
return getTimer() < this.endTime;
}
public function updateTimeLeft(param1:int) : void {
param1 = Math.min(param1,this.DAY_IN_SECONDS * 2);
this.endTime = getTimer() + param1 * 1000;
this.destroyInterval();
if(param1 > 0) {
this.intervalId = setInterval(this.update,this.UPDATE_INTERVAL);
}
dispatchEvent(new Event(Event.CHANGE));
}
public function getTimeLeft() : int {
return this.endTime - getTimer();
}
public function destroy() : void {
this.destroyInterval();
}
private function destroyInterval() : void {
if(this.intervalId != 0) {
clearInterval(this.intervalId);
this.intervalId = 0;
}
}
}
}
|
package alternativa.tanks.model.garage.resistance {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.model.garage.resistance.ResistancesIcons_bitmapMechResistance_x2.png")]
public class ResistancesIcons_bitmapMechResistance_x2 extends BitmapAsset {
public function ResistancesIcons_bitmapMechResistance_x2() {
super();
}
}
}
|
package alternativa.engine3d.materials {
import alternativa.gfx.core.BitmapTextureResource;
import flash.display.BitmapData;
import flash.utils.Dictionary;
public class TextureResourcesRegistry {
public static var texture2Resource:Dictionary = new Dictionary();
public function TextureResourcesRegistry() {
super();
}
public static function getTextureResource(param1:BitmapData, param2:Boolean, param3:Boolean, param4:Boolean) : BitmapTextureResource {
var local5:BitmapTextureResource = null;
if(param1 in texture2Resource) {
local5 = texture2Resource[param1];
local5.increaseReferencesCount();
return local5;
}
var local6:BitmapTextureResource = new BitmapTextureResource(param1,param2,param3,param4);
texture2Resource[param1] = local6;
return local6;
}
public static function releaseTextureResources() : void {
var local1:* = undefined;
var local2:BitmapTextureResource = null;
for(local1 in texture2Resource) {
local2 = texture2Resource[local1];
local2.forceDispose();
}
}
public static function release(param1:BitmapData) : void {
if(param1 in texture2Resource) {
delete texture2Resource[param1];
}
}
}
}
|
package projects.tanks.client.entrance.model.entrance.email {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class EmailRegistrationModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _checkEmailId:Long = Long.getLong(1952335727,-1340357092);
private var _checkEmail_emailCodec:ICodec;
private var _registerUserRequiredEmailId:Long = Long.getLong(114502285,831250527);
private var _registerUserRequiredEmail_userUidCodec:ICodec;
private var _registerUserRequiredEmail_emailCodec:ICodec;
private var _registerUserRequiredEmail_registeredUrlCodec:ICodec;
private var _registerUserRequiredEmail_referralHashCodec:ICodec;
private var _registerUserRequiredEmail_realNameCodec:ICodec;
private var _registerUserRequiredEmail_idNumberCodec:ICodec;
private var model:IModel;
public function EmailRegistrationModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._checkEmail_emailCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._registerUserRequiredEmail_userUidCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._registerUserRequiredEmail_emailCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._registerUserRequiredEmail_registeredUrlCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._registerUserRequiredEmail_referralHashCodec = this.protocol.getCodec(new TypeCodecInfo(String,true));
this._registerUserRequiredEmail_realNameCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
this._registerUserRequiredEmail_idNumberCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function checkEmail(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._checkEmail_emailCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._checkEmailId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function registerUserRequiredEmail(param1:String, param2:String, param3:String, param4:String, param5:String, param6:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._registerUserRequiredEmail_userUidCodec.encode(this.protocolBuffer,param1);
this._registerUserRequiredEmail_emailCodec.encode(this.protocolBuffer,param2);
this._registerUserRequiredEmail_registeredUrlCodec.encode(this.protocolBuffer,param3);
this._registerUserRequiredEmail_referralHashCodec.encode(this.protocolBuffer,param4);
this._registerUserRequiredEmail_realNameCodec.encode(this.protocolBuffer,param5);
this._registerUserRequiredEmail_idNumberCodec.encode(this.protocolBuffer,param6);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local7:SpaceCommand = new SpaceCommand(Model.object.id,this._registerUserRequiredEmailId,this.protocolBuffer);
var local8:IGameObject = Model.object;
var local9:ISpace = local8.space;
local9.commandSender.sendCommand(local7);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package controls.base {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.base.MainPanelBattlesButtonBase_iconClass.png")]
public class MainPanelBattlesButtonBase_iconClass extends BitmapAsset {
public function MainPanelBattlesButtonBase_iconClass() {
super();
}
}
}
|
package controls.lifeindicator
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class LineCharge_bitmapLeft extends BitmapAsset
{
public function LineCharge_bitmapLeft()
{
super();
}
}
}
|
package projects.tanks.client.battlefield.models.inventory.cooldown {
public interface IInventoryCooldownModelBase {
function activateCooldown(param1:int) : void;
function activateDependentCooldown(param1:Vector.<DependedCooldownItem>) : void;
function ready() : void;
function setCooldownDuration(param1:int) : void;
}
}
|
package projects.tanks.client.panel.model.shop.coinpackage {
public class CoinPackageCC {
private var _amount:int;
private var _bonusAmount:int;
public function CoinPackageCC(param1:int = 0, param2:int = 0) {
super();
this._amount = param1;
this._bonusAmount = param2;
}
public function get amount() : int {
return this._amount;
}
public function set amount(param1:int) : void {
this._amount = param1;
}
public function get bonusAmount() : int {
return this._bonusAmount;
}
public function set bonusAmount(param1:int) : void {
this._bonusAmount = param1;
}
public function toString() : String {
var local1:String = "CoinPackageCC [";
local1 += "amount = " + this.amount + " ";
local1 += "bonusAmount = " + this.bonusAmount + " ";
return local1 + "]";
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapons.rocketlauncher.radio {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class RocketLauncherRadioExplosionModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:RocketLauncherRadioExplosionModelServer;
private var client:IRocketLauncherRadioExplosionModelBase = IRocketLauncherRadioExplosionModelBase(this);
private var modelId:Long = Long.getLong(993900446,591673085);
private var _shellDestroyedId:Long = Long.getLong(189748645,-2129436767);
private var _shellDestroyed_shellIdCodec:ICodec;
public function RocketLauncherRadioExplosionModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new RocketLauncherRadioExplosionModelServer(IModel(this));
this._shellDestroyed_shellIdCodec = this._protocol.getCodec(new TypeCodecInfo(int,false));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._shellDestroyedId:
this.client.shellDestroyed(int(this._shellDestroyed_shellIdCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.drone {
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.drone.DroneIndicatorCC;
public class VectorCodecDroneIndicatorCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecDroneIndicatorCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(DroneIndicatorCC,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.<DroneIndicatorCC> = new Vector.<DroneIndicatorCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = DroneIndicatorCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:DroneIndicatorCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<DroneIndicatorCC> = Vector.<DroneIndicatorCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.gui.chat {
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.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 CautionExternalLinkWindow extends DialogWindow {
[Inject]
public static var localeService:ILocaleService;
private static var bitmapDataClass:Class = CautionExternalLinkWindow_bitmapDataClass;
private static var bitmapData:BitmapData = Bitmap(new bitmapDataClass()).bitmapData;
private static const WINDOW_WIDTH:int = 608;
private static const WINDOW_MARGIN:int = 11;
private var closeButton:DefaultButtonBase;
private var window:TankWindowWithHeader;
private var cautionImage:Bitmap;
private var linkLabel:LabelBase;
private var innerWindow:TankWindowInner;
public function CautionExternalLinkWindow(param1:String) {
super();
this.addWindow();
this.addCautionImage();
this.addLinkBlock(param1);
this.addCautionLabel();
this.addCloseButton();
this.setWindowSize();
}
private function addWindow() : void {
this.window = TankWindowWithHeader.createWindow(TanksLocale.TEXT_HEADER_CAUTION_EXTERNAL_LINK);
addChild(this.window);
this.window.width = WINDOW_WIDTH;
}
private function addCautionImage() : void {
this.cautionImage = new Bitmap(bitmapData);
this.cautionImage.x = WINDOW_MARGIN - 2;
this.cautionImage.y = WINDOW_MARGIN;
this.window.addChild(this.cautionImage);
}
private function addLinkBlock(param1:String) : void {
this.innerWindow = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.innerWindow.x = WINDOW_MARGIN;
this.innerWindow.width = WINDOW_WIDTH - WINDOW_MARGIN * 2;
this.window.addChild(this.innerWindow);
this.linkLabel = new LabelBase();
this.linkLabel.wordWrap = true;
this.linkLabel.multiline = true;
this.linkLabel.text = localeService.getText(TanksLocale.TEXT_FOLLOW_EXTERNAL_LINK).replace("%link%",param1);
this.linkLabel.size = 12;
this.linkLabel.x = WINDOW_MARGIN * 2;
this.linkLabel.y = this.cautionImage.y + this.cautionImage.height + WINDOW_MARGIN * 2;
this.linkLabel.width = WINDOW_WIDTH - WINDOW_MARGIN * 4;
this.window.addChild(this.linkLabel);
}
private function addCautionLabel() : void {
var local1:LabelBase = new LabelBase();
local1.wordWrap = true;
local1.multiline = true;
local1.text = localeService.getText(TanksLocale.TEXT_CONSEQUENCES_EXTERNAL_LINK_FOLLOWING);
local1.size = 12;
local1.x = this.linkLabel.x;
local1.y = this.linkLabel.y + this.linkLabel.height + WINDOW_MARGIN;
local1.width = this.linkLabel.width;
this.window.addChild(local1);
this.innerWindow.y = this.linkLabel.y - WINDOW_MARGIN;
this.innerWindow.height = local1.height + this.linkLabel.height + WINDOW_MARGIN * 3;
}
private function addCloseButton() : 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 = this.innerWindow.y + this.innerWindow.height + WINDOW_MARGIN;
this.closeButton.addEventListener(MouseEvent.CLICK,this.onCloseButtonClick);
this.window.addChild(this.closeButton);
}
public function show() : void {
dialogService.enqueueDialog(this);
}
private 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 {
this.onCloseButtonClick();
}
private function onCloseButtonClick(param1:MouseEvent = null) : void {
this.closeButton.removeEventListener(MouseEvent.CLICK,this.onCloseButtonClick);
dialogService.removeDialog(this);
dispatchEvent(new CautionExternalLinkWindowEvent(CautionExternalLinkWindowEvent.CLOSING));
}
}
}
|
package platform.client.core.general.socialnetwork.models.socialnetworkparameters {
public interface ISocialNetworkParametersModelBase {
}
}
|
package alternativa.tanks.model.challenge.greenpanel
{
public class State
{
public static const CURRENT:State = new State();
public static const BLOCKED:State = new State();
public static const COMPLETED:State = new State();
public function State()
{
super();
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.armor.common {
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 platform.client.fp10.core.resource.types.SoundResource;
import platform.client.fp10.core.resource.types.TextureResource;
import projects.tanks.client.battlefield.models.tankparts.armor.common.HullCommonCC;
import projects.tanks.client.battlefield.models.tankparts.sfx.lighting.entity.LightingSFXEntity;
public class CodecHullCommonCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_deadColoring:ICodec;
private var codec_deathSound:ICodec;
private var codec_lightingSFXEntity:ICodec;
private var codec_mass:ICodec;
private var codec_stunEffectTexture:ICodec;
private var codec_stunSound:ICodec;
private var codec_ultimateHudIndicator:ICodec;
private var codec_ultimateIconIndex:ICodec;
public function CodecHullCommonCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_deadColoring = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_deathSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_lightingSFXEntity = param1.getCodec(new TypeCodecInfo(LightingSFXEntity,false));
this.codec_mass = param1.getCodec(new TypeCodecInfo(Float,false));
this.codec_stunEffectTexture = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_stunSound = param1.getCodec(new TypeCodecInfo(SoundResource,false));
this.codec_ultimateHudIndicator = param1.getCodec(new TypeCodecInfo(TextureResource,false));
this.codec_ultimateIconIndex = param1.getCodec(new TypeCodecInfo(int,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:HullCommonCC = new HullCommonCC();
local2.deadColoring = this.codec_deadColoring.decode(param1) as TextureResource;
local2.deathSound = this.codec_deathSound.decode(param1) as SoundResource;
local2.lightingSFXEntity = this.codec_lightingSFXEntity.decode(param1) as LightingSFXEntity;
local2.mass = this.codec_mass.decode(param1) as Number;
local2.stunEffectTexture = this.codec_stunEffectTexture.decode(param1) as TextureResource;
local2.stunSound = this.codec_stunSound.decode(param1) as SoundResource;
local2.ultimateHudIndicator = this.codec_ultimateHudIndicator.decode(param1) as TextureResource;
local2.ultimateIconIndex = this.codec_ultimateIconIndex.decode(param1) as int;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:HullCommonCC = HullCommonCC(param2);
this.codec_deadColoring.encode(param1,local3.deadColoring);
this.codec_deathSound.encode(param1,local3.deathSound);
this.codec_lightingSFXEntity.encode(param1,local3.lightingSFXEntity);
this.codec_mass.encode(param1,local3.mass);
this.codec_stunEffectTexture.encode(param1,local3.stunEffectTexture);
this.codec_stunSound.encode(param1,local3.stunSound);
this.codec_ultimateHudIndicator.encode(param1,local3.ultimateHudIndicator);
this.codec_ultimateIconIndex.encode(param1,local3.ultimateIconIndex);
}
}
}
|
package projects.tanks.client.battlefield.models.tankparts.weapon.turret {
import projects.tanks.client.battlefield.models.user.tank.commands.TurretStateCommand;
public interface IRotatingTurretModelBase {
function update(param1:TurretStateCommand) : void;
}
}
|
package alternativa.init
{
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.service.IModelService;
import alternativa.tanks.model.GarageModel;
import alternativa.tanks.model.Item3DModel;
import alternativa.tanks.model.ItemEffectModel;
import alternativa.tanks.model.ItemModel;
public class GarageModelActivator implements IBundleActivator
{
public static var osgi:OSGi;
public var garageModel:GarageModel;
public var itemModel:ItemModel;
public var item3DModel:Item3DModel;
public var itemEffectModel:ItemEffectModel;
public function GarageModelActivator()
{
super();
}
public function start(osgi:OSGi) : void
{
GarageModelActivator.osgi = osgi;
var modelRegister:IModelService = osgi.getService(IModelService) as IModelService;
this.garageModel = new GarageModel();
modelRegister.add(this.garageModel);
this.itemModel = new ItemModel();
modelRegister.add(this.itemModel);
this.item3DModel = new Item3DModel();
modelRegister.add(this.item3DModel);
this.itemEffectModel = new ItemEffectModel();
modelRegister.add(this.itemEffectModel);
}
public function stop(osgi:OSGi) : void
{
var modelRegister:IModelService = osgi.getService(IModelService) as IModelService;
modelRegister.remove(this.garageModel.id);
modelRegister.remove(this.itemModel.id);
modelRegister.remove(this.itemEffectModel.id);
this.garageModel = null;
this.itemModel = null;
this.item3DModel = null;
this.itemEffectModel = null;
GarageModelActivator.osgi = null;
}
}
}
|
package alternativa.tanks.gui
{
import alternativa.init.Main;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.service.IModelService;
import alternativa.tanks.locale.constants.ImageConst;
import alternativa.tanks.locale.constants.TextConst;
import alternativa.tanks.model.panel.IPanel;
import alternativa.tanks.model.panel.PanelModel;
import assets.Diamond;
import assets.icons.CheckIcons;
import controls.DefaultButton;
import controls.Label;
import controls.TankInput;
import controls.TankWindow;
import controls.TankWindowHeader;
import controls.TankWindowInner;
import controls.TextArea;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;
import flash.system.LoaderContext;
import flash.system.System;
import flash.text.TextFieldAutoSize;
import flash.text.TextFieldType;
import forms.RegisterForm;
import forms.stat.ReferralStatList;
import forms.stat.ReferralWindowBigButton;
import projects.tanks.client.panel.model.referals.RefererIncomeData;
public class NewReferalWindow extends Sprite
{
[Embed(source="1151.png")]
private static const bitmapIntroPict:Class;
private static const introPictBd:BitmapData = new bitmapIntroPict().bitmapData;
[Embed(source="1157.png")]
private static const bitmapIconMail:Class;
private static const iconMailBd:BitmapData = new bitmapIconMail().bitmapData;
[Embed(source="1196.png")]
private static const bitmapIconLink:Class;
private static const iconLinkBd:BitmapData = new bitmapIconLink().bitmapData;
[Embed(source="846.png")]
private static const bitmapIconCode:Class;
private static const iconCodeBd:BitmapData = new bitmapIconCode().bitmapData;
private var localeService:ILocaleService;
private var getLinkButton:ReferralWindowBigButton;
private var getBannerButton:ReferralWindowBigButton;
private var inviteByMailButton:ReferralWindowBigButton;
public var closeButton:DefaultButton;
public var statButton:ReferalStatButton;
private var copyLinkButton:DefaultButton;
private var copyBannerButton:DefaultButton;
private var sendButton:DefaultButton;
private var window:TankWindow;
private var windowInner:TankWindowInner;
private var introInner:TankWindowInner;
private var statInner:TankWindowInner;
private var countInner:TankWindowInner;
private var crystalsInner:TankWindowInner;
private var descrInner:TankWindowInner;
private var introHeader:Bitmap;
private var introPic:Bitmap;
public var referalList:ReferralStatList;
private var introContainer:Sprite;
private var linkContainer:Sprite;
private var bannerContainer:Sprite;
private var mailContainer:Sprite;
private var statContainer:Sprite;
private var banner:DisplayObject;
private var bannerLoadEffect:CheckIcons;
private var infoLabel:Label;
private var descrLabel:Label;
private var linkURL:TankInput;
private var bannerCode:TextArea;
private var nameInputLabel:Label;
public var nameInput:TankInput;
private var enterMailLabel:Label;
private var mailTextLabel:Label;
private var addressInput:TankInput;
private var mailText:TextArea;
private var countLabel:Label;
private var countLabelHeader:Label;
private var crystalLabel:Label;
private var crystalLabelHeader:Label;
private var loader:Loader;
public var windowSize:Point;
private const windowMargin:int = 12;
private const margin:int = 9;
private const listmargin:int = 4;
private const buttonSize:Point = new Point(104,33);
private const bannerSize:Point = new Point(468,120);
private const space:int = 0;
private var state:int;
private const STATE_INTRO:int = 0;
private const STATE_LINK:int = 1;
private const STATE_BANNER:int = 2;
private const STATE_MAIL:int = 3;
private const STATE_STAT:int = 4;
private var messageTemplate:String;
private var panelModel:IPanel;
private const bottomMargin:int = 104;
public var crystalIcon:Diamond;
public function NewReferalWindow(hash:String, bannerCodeString:String, url:String, messageTemplate:String)
{
var tableLinkURL:String = null;
super();
this.messageTemplate = messageTemplate.split("\n\r").join("\n").split("\r\n").join("\n");
this.localeService = Main.osgi.getService(ILocaleService) as ILocaleService;
var modelRegister:IModelService = Main.osgi.getService(IModelService) as IModelService;
this.panelModel = Main.osgi.getService(IPanel) as PanelModel;
this.window = new TankWindow();
addChild(this.window);
this.window.headerLang = this.localeService.getText(TextConst.GUI_LANG);
this.window.header = TankWindowHeader.REFERALS;
this.getLinkButton = new ReferralWindowBigButton();
this.getLinkButton.icon = iconLinkBd;
addChild(this.getLinkButton);
this.getLinkButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_GET_LINK_TEXT);
this.getLinkButton.addEventListener(MouseEvent.CLICK,this.onLinkClick);
this.getBannerButton = new ReferralWindowBigButton();
this.getBannerButton.icon = iconCodeBd;
addChild(this.getBannerButton);
this.getBannerButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_GET_BANNER_TEXT);
this.getBannerButton.addEventListener(MouseEvent.CLICK,this.onBannerClick);
this.inviteByMailButton = new ReferralWindowBigButton();
this.inviteByMailButton.icon = iconMailBd;
addChild(this.inviteByMailButton);
this.inviteByMailButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_INVITE_BY_EMAIL_TEXT);
this.inviteByMailButton.addEventListener(MouseEvent.CLICK,this.onMailClick);
this.statButton = new ReferalStatButton();
addChild(this.statButton);
this.statButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_STATISTICS_TEXT);
this.statButton.addEventListener(MouseEvent.CLICK,this.onStatClick);
this.closeButton = new DefaultButton();
addChild(this.closeButton);
this.closeButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_CLOSE_TEXT);
this.descrInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.descrInner.x = this.windowMargin;
this.descrInner.y = this.windowMargin;
addChild(this.descrInner);
this.descrInner.visible = false;
this.descrLabel = new Label();
this.descrLabel.color = 381208;
this.descrLabel.multiline = true;
this.descrLabel.wordWrap = true;
addChild(this.descrLabel);
this.descrLabel.visible = false;
this.windowInner = new TankWindowInner(0,0,TankWindowInner.TRANSPARENT);
this.windowInner.x = this.windowMargin;
addChild(this.windowInner);
this.windowInner.visible = false;
this.introContainer = new Sprite();
addChild(this.introContainer);
this.introInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.introInner.x = this.windowMargin;
this.introInner.y = this.windowMargin;
this.introContainer.addChild(this.introInner);
var headerBd:BitmapData = this.localeService.getImage(ImageConst.REFERAL_WINDOW_HEADER_IMAGE);
this.introHeader = new Bitmap(headerBd);
this.introContainer.addChild(this.introHeader);
this.introPic = new Bitmap(introPictBd);
this.introContainer.addChild(this.introPic);
this.infoLabel = new Label();
this.infoLabel.color = 381208;
this.infoLabel.multiline = true;
this.infoLabel.wordWrap = true;
this.introContainer.addChild(this.infoLabel);
switch(this.localeService.language)
{
case "ru":
tableLinkURL = "http://forum.tankionline.com/posts/list/3210.page";
break;
case "en":
tableLinkURL = "http://forum.tankionline.com/posts/list/1150.page";
break;
case "cn":
tableLinkURL = "http://3dtank.com";
break;
default:
tableLinkURL = "";
}
this.infoLabel.htmlText = this.localeService.getText(TextConst.REFERAL_WINDOW_INFO_TEXT,tableLinkURL);
this.statContainer = new Sprite();
addChild(this.statContainer);
this.statInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.statContainer.addChild(this.statInner);
this.countInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.statContainer.addChild(this.countInner);
this.crystalsInner = new TankWindowInner(0,0,TankWindowInner.GREEN);
this.statContainer.addChild(this.crystalsInner);
this.countLabelHeader = new Label();
this.countLabelHeader.text = this.localeService.getText(TextConst.REFERAL_WINDOW_COUNT_LABEL);
this.statContainer.addChild(this.countLabelHeader);
this.countLabel = new Label();
this.countLabel.autoSize = TextFieldAutoSize.RIGHT;
this.countLabel.color = 381208;
this.countLabel.text = "0";
this.statContainer.addChild(this.countLabel);
this.crystalLabelHeader = new Label();
this.crystalLabelHeader.text = this.localeService.getText(TextConst.REFERAL_WINDOW_SUMMARY_LABEL);
this.statContainer.addChild(this.crystalLabelHeader);
this.crystalIcon = new Diamond();
this.statContainer.addChild(this.crystalIcon);
this.crystalLabel = new Label();
this.crystalLabel.autoSize = TextFieldAutoSize.RIGHT;
this.crystalLabel.color = 381208;
this.crystalLabel.text = "0";
this.statContainer.addChild(this.crystalLabel);
this.referalList = new ReferralStatList();
this.statContainer.addChild(this.referalList);
this.linkContainer = new Sprite();
addChild(this.linkContainer);
this.linkURL = new TankInput();
this.linkURL.textField.type = TextFieldType.DYNAMIC;
this.linkContainer.addChild(this.linkURL);
this.linkURL.textField.text = url;
this.copyLinkButton = new DefaultButton();
this.linkContainer.addChild(this.copyLinkButton);
this.copyLinkButton.width = 220;
this.copyLinkButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_COPY_LINK_TEXT);
this.copyLinkButton.addEventListener(MouseEvent.CLICK,this.copyLink);
this.bannerContainer = new Sprite();
addChild(this.bannerContainer);
var context:LoaderContext = new LoaderContext(false,new ApplicationDomain());
this.loader = new Loader();
this.loader.load(new URLRequest("http://" + this.localeService.getText(TextConst.GAME_BASE_URL) + "/tankiref.swf?hash=" + hash + "&server=" + this.localeService.getText(TextConst.GAME_BASE_URL)),context);
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.addbanner);
this.banner = new Sprite();
this.bannerContainer.addChild(this.banner);
with(this.banner as Sprite)
{
graphics.beginFill(0,0.5);
graphics.drawRect(0,0,bannerSize.x,bannerSize.y);
}
this.bannerLoadEffect = new CheckIcons();
this.bannerLoadEffect.gotoAndStop(RegisterForm.CALLSIGN_STATE_PROGRESS);
this.bannerContainer.addChild(this.bannerLoadEffect);
this.bannerCode = new TextArea();
this.bannerCode.tf.text = bannerCodeString;
this.bannerContainer.addChild(this.bannerCode);
this.copyBannerButton = new DefaultButton();
this.bannerContainer.addChild(this.copyBannerButton);
this.copyBannerButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_COPY_BANNER_TEXT);
this.copyBannerButton.addEventListener(MouseEvent.CLICK,this.copyBanner);
this.copyBannerButton.width = 200;
this.mailContainer = new Sprite();
addChild(this.mailContainer);
this.nameInputLabel = new Label();
this.nameInputLabel.multiline = true;
this.nameInputLabel.wordWrap = true;
this.nameInputLabel.htmlText = this.localeService.getText(TextConst.INVITATION_SENDER_NAME_LABEL_TEXT);
this.mailContainer.addChild(this.nameInputLabel);
this.nameInput = new TankInput();
this.nameInput.textField.type = TextFieldType.INPUT;
this.mailContainer.addChild(this.nameInput);
this.nameInput.textField.text = this.panelModel.userName;
this.nameInput.textField.addEventListener(Event.CHANGE,this.onUsernameChange);
this.enterMailLabel = new Label();
this.enterMailLabel.multiline = true;
this.enterMailLabel.wordWrap = true;
this.enterMailLabel.htmlText = this.localeService.getText(TextConst.REFERAL_WINDOW_EMAIL_LABEL_TEXT);
this.mailContainer.addChild(this.enterMailLabel);
this.addressInput = new TankInput();
this.mailContainer.addChild(this.addressInput);
this.mailTextLabel = new Label();
this.mailTextLabel.htmlText = this.localeService.getText(TextConst.REFERAL_WINDOW_LETTER_LABEL_TEXT);
this.mailContainer.addChild(this.mailTextLabel);
this.mailText = new TextArea();
this.mailText.tf.type = TextFieldType.DYNAMIC;
this.mailText.tf.text = this.messageTemplate.replace("%1",this.panelModel.userName);
this.mailContainer.addChild(this.mailText);
this.sendButton = new DefaultButton();
this.mailContainer.addChild(this.sendButton);
this.sendButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_SEND_TEXT);
this.sendButton.addEventListener(MouseEvent.CLICK,this.sendLetter);
this.windowSize = new Point(468 + this.windowMargin * 2 + 4,492);
this.window.width = this.windowSize.x;
this.window.height = this.windowSize.y;
this.descrInner.width = this.windowSize.x - this.windowMargin * 2;
this.descrInner.height = 75;
this.descrLabel.x = this.descrInner.x + this.margin;
this.descrLabel.y = this.descrInner.y + this.margin;
this.descrLabel.width = this.windowSize.x - this.windowMargin * 2 - this.margin * 2;
this.windowInner.y = this.descrInner.y + this.descrInner.height + this.margin;
this.windowInner.width = this.windowSize.x - this.windowMargin * 2;
this.windowInner.height = this.windowSize.y - this.bottomMargin - this.margin - this.windowInner.y;
this.introInner.width = this.windowSize.x - this.windowMargin * 2;
this.introInner.height = this.windowSize.y - this.windowMargin - this.bottomMargin - this.margin;
this.introHeader.x = this.introInner.x + int((this.introInner.width - this.introHeader.width) * 0.5);
this.introHeader.y = this.introInner.y + this.margin * 2;
this.introPic.x = this.introInner.x + int((this.introInner.width - this.introPic.width) * 0.5);
this.introPic.y = this.introInner.y + int(this.introInner.height * (1 - 0.618) - this.introPic.height * 0.5);
this.infoLabel.x = this.introInner.x + this.margin;
this.infoLabel.width = this.windowSize.x - this.windowMargin * 2 - this.margin * 2;
this.infoLabel.y = this.introInner.y + this.introInner.height - this.infoLabel.height - this.margin * 2;
this.countLabelHeader.x = this.windowMargin;
this.countInner.width = 100;
this.countInner.height = 26;
this.countInner.x = this.countLabelHeader.x + this.countLabelHeader.width + this.margin;
this.countInner.y = this.windowMargin;
this.countLabel.x = this.countInner.x + this.countInner.width - this.margin - this.countLabel.width;
this.countLabelHeader.y = this.windowMargin + int((this.countInner.height - this.countLabelHeader.height) * 0.5);
this.countLabel.y = this.countLabelHeader.y;
this.crystalsInner.width = 100;
this.crystalsInner.height = 26;
this.crystalsInner.x = this.windowSize.x - this.windowMargin - this.crystalsInner.width;
this.crystalsInner.y = this.windowMargin;
this.crystalLabelHeader.x = this.crystalsInner.x - this.margin - this.crystalLabelHeader.width;
this.crystalIcon.x = this.windowSize.x - this.windowMargin - this.margin - this.crystalIcon.width;
this.crystalLabel.x = this.crystalIcon.x - 2 - this.crystalLabel.width;
this.crystalLabelHeader.y = this.windowMargin + int((this.crystalsInner.height - this.crystalLabelHeader.height) * 0.5);
this.crystalLabel.y = this.crystalLabelHeader.y;
this.crystalIcon.y = this.windowMargin + int((this.crystalsInner.height - this.crystalIcon.height) * 0.5);
this.statInner.x = this.windowMargin;
this.statInner.y = this.windowMargin + this.margin + this.crystalsInner.height - 3;
this.statInner.width = this.windowSize.x - this.windowMargin * 2;
this.statInner.height = this.windowSize.y - this.statInner.y - this.bottomMargin - this.margin + 1;
this.referalList.x = this.windowMargin + this.listmargin;
this.referalList.y = this.statInner.y + this.listmargin;
this.linkURL.width = this.windowSize.x - this.windowMargin * 2 - this.margin * 2;
this.linkURL.x = this.windowInner.x + this.margin;
this.linkURL.y = this.windowInner.y + this.margin;
this.copyLinkButton.x = this.windowSize.x - this.copyLinkButton.width >> 1;
this.copyLinkButton.y = this.windowInner.y + this.margin * 2 + this.buttonSize.y;
this.sendButton.x = this.windowSize.x - this.windowMargin - this.margin - this.buttonSize.x + 8;
this.sendButton.y = this.windowInner.y + this.windowInner.height - this.margin - this.buttonSize.y;
this.nameInputLabel.x = this.windowInner.x + this.margin;
this.nameInput.y = this.windowInner.y + this.margin;
this.nameInputLabel.width = 100;
this.nameInput.x = this.nameInputLabel.x + 100;
this.nameInputLabel.y = this.nameInput.y;
this.nameInput.width = this.windowSize.x - this.windowMargin - this.margin - this.nameInput.x;
this.addressInput.x = this.nameInput.x;
this.addressInput.y = Math.round(this.nameInput.y + this.nameInput.height + this.margin);
this.addressInput.width = this.windowSize.x - this.windowMargin - this.margin - this.nameInput.x;
this.mailText.x = this.nameInput.x;
this.mailText.y = Math.round(this.addressInput.y + this.addressInput.height + this.margin);
this.mailText.width = this.windowSize.x - this.windowMargin - this.margin - this.nameInput.x;
this.mailText.height = Math.round(this.windowInner.y + this.windowInner.height - this.mailText.y - this.margin * 2 - this.buttonSize.y);
this.mailTextLabel.x = this.windowInner.x + this.margin;
this.mailTextLabel.y = this.mailText.y;
this.mailTextLabel.width = 100;
this.enterMailLabel.x = this.windowInner.x + this.margin;
this.enterMailLabel.y = this.addressInput.y;
this.enterMailLabel.width = 100;
this.mailText.tf.type = TextFieldType.DYNAMIC;
this.getLinkButton.x = (this.windowSize.x - this.getLinkButton.width >> 1) + 3;
this.getLinkButton.y = this.windowSize.y - this.bottomMargin;
this.inviteByMailButton.x = this.windowMargin;
this.inviteByMailButton.y = this.windowSize.y - this.bottomMargin;
this.getBannerButton.x = this.getLinkButton.x + this.getLinkButton.width - 4;
this.getBannerButton.y = this.windowSize.y - this.bottomMargin;
this.closeButton.x = this.windowSize.x - this.windowMargin - this.buttonSize.x + 8;
this.closeButton.y = this.windowSize.y - this.windowMargin - this.buttonSize.y;
this.statButton.x = this.windowMargin;
this.statButton.y = this.closeButton.y;
this.statButton.width = 240;
this.bannerFormLayout();
this.hideAll();
this.state = this.STATE_INTRO;
this.introContainer.visible = true;
}
public function addReferals(data:Array) : void
{
var sum:int = 0;
this.countLabel.text = data.length.toString();
for(var i:int = 0; i < data.length; i++)
{
sum += RefererIncomeData(data[i]).income;
}
this.crystalLabel.text = sum.toString();
this.statButton.label = this.localeService.getText(TextConst.REFERAL_WINDOW_BUTTON_STATISTICS_TEXT) + " " + sum.toString();
this.referalList.addReferrals(data);
this.referalList.width = this.windowSize.x - this.windowMargin * 2 - this.listmargin * 2 + 2;
this.referalList.height = this.windowSize.y - this.statInner.y - this.bottomMargin - this.margin - this.listmargin * 2;
}
private function onUsernameChange(e:Event) : void
{
if(this.nameInput.textField.text.length)
{
this.mailText.tf.text = this.messageTemplate.replace("%1",this.nameInput.textField.text);
}
else
{
this.mailText.tf.text = this.messageTemplate.replace("%1",this.panelModel.userName);
}
}
private function addbanner(e:Event) : void
{
this.bannerLoadEffect.gotoAndStop(RegisterForm.CALLSIGN_STATE_OFF);
this.bannerContainer.removeChild(this.bannerLoadEffect);
this.bannerContainer.removeChild(this.banner);
this.banner = this.loader as DisplayObject;
this.bannerContainer.addChildAt(this.banner,0);
this.bannerFormLayout();
}
private function bannerFormLayout() : void
{
this.banner.x = this.windowInner.x + 2;
this.banner.y = this.windowInner.y + 2;
this.copyBannerButton.x = this.windowSize.x - this.copyBannerButton.width >> 1;
this.copyBannerButton.y = this.windowInner.y + this.windowInner.height - this.margin - this.buttonSize.y;
this.bannerCode.x = this.windowMargin + this.margin;
this.bannerCode.y = this.banner.y + this.banner.height + this.margin;
this.bannerCode.width = this.windowSize.x - this.windowMargin * 2 - this.margin * 2;
this.bannerCode.height = this.copyBannerButton.y - this.margin - this.bannerCode.y;
if(this.bannerContainer.contains(this.bannerLoadEffect))
{
this.bannerLoadEffect.x = this.banner.x + int((this.bannerSize.x - this.bannerLoadEffect.width) * 0.5);
this.bannerLoadEffect.y = this.banner.y + int((this.bannerSize.y - this.bannerLoadEffect.height) * 0.5);
}
}
private function hideAll() : void
{
this.introContainer.visible = false;
this.linkContainer.visible = false;
this.bannerContainer.visible = false;
this.mailContainer.visible = false;
this.statContainer.visible = false;
}
private function onStatClick(e:MouseEvent) : void
{
this.getLinkButton.enable = true;
this.getBannerButton.enable = true;
this.inviteByMailButton.enable = true;
this.statButton.enable = false;
this.hideAll();
this.state = this.STATE_STAT;
this.statContainer.visible = true;
this.descrInner.visible = false;
this.windowInner.visible = false;
this.descrLabel.visible = false;
}
private function onLinkClick(e:MouseEvent) : void
{
this.getLinkButton.enable = false;
this.getBannerButton.enable = true;
this.inviteByMailButton.enable = true;
this.statButton.enable = true;
this.hideAll();
this.state = this.STATE_LINK;
this.linkContainer.visible = true;
this.descrInner.visible = true;
this.windowInner.visible = true;
this.descrLabel.visible = true;
this.descrLabel.text = this.localeService.getText(TextConst.REFERAL_WINDOW_LINK_DESCRIPTION);
}
private function onBannerClick(e:MouseEvent) : void
{
this.getLinkButton.enable = true;
this.getBannerButton.enable = false;
this.inviteByMailButton.enable = true;
this.statButton.enable = true;
this.hideAll();
this.state = this.STATE_BANNER;
this.bannerContainer.visible = true;
this.descrInner.visible = true;
this.windowInner.visible = true;
this.descrLabel.visible = true;
this.descrLabel.text = this.localeService.getText(TextConst.REFERAL_WINDOW_BANNER_DESCRIPTION);
}
private function onMailClick(e:MouseEvent) : void
{
this.getLinkButton.enable = true;
this.getBannerButton.enable = true;
this.inviteByMailButton.enable = false;
this.statButton.enable = true;
this.hideAll();
this.state = this.STATE_MAIL;
this.mailContainer.visible = true;
this.descrInner.visible = true;
this.windowInner.visible = true;
this.descrLabel.visible = true;
this.descrLabel.text = this.localeService.getText(TextConst.REFERAL_WINDOW_MAIL_DESCRIPTION);
}
private function copyLink(e:MouseEvent) : void
{
System.setClipboard(this.linkURL.textField.text);
}
private function copyBanner(e:MouseEvent) : void
{
System.setClipboard(this.bannerCode.tf.text);
}
private function sendLetter(e:MouseEvent) : void
{
dispatchEvent(new ReferalWindowEvent(ReferalWindowEvent.SEND_MAIL,this.addressInput.value,this.mailText.text));
}
public function clearRecipientInputField() : void
{
if(this.addressInput != null)
{
this.addressInput.value = "";
}
}
}
}
|
package alternativa.tanks.locale.en
{
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.locale.constants.ImageConst;
import flash.display.BitmapData;
public class Image
{
[Embed(source="1191.png")]
private static const bitmapReferalHeader:Class;
public static const REFERAL_WINDOW_HEADER_IMAGE:BitmapData = new bitmapReferalHeader().bitmapData;
[Embed(source="1144.png")]
private static const bitmapAbon:Class;
private static const CONGRATULATION_WINDOW_TICKET_IMAGE:BitmapData = new bitmapAbon().bitmapData;
public function Image()
{
super();
}
public static function init(localeService:ILocaleService) : void
{
localeService.registerImage(ImageConst.REFERAL_WINDOW_HEADER_IMAGE,Image.REFERAL_WINDOW_HEADER_IMAGE);
localeService.registerImage(ImageConst.CONGRATULATION_WINDOW_TICKET_IMAGE,Image.CONGRATULATION_WINDOW_TICKET_IMAGE);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.teamlight {
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.teamlight.TeamLightParams;
public class VectorCodecTeamLightParamsLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecTeamLightParamsLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(TeamLightParams,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.<TeamLightParams> = new Vector.<TeamLightParams>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = TeamLightParams(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:TeamLightParams = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<TeamLightParams> = Vector.<TeamLightParams>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.gui {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.gui.ItemInfoPanelBitmaps_bitmapArmorWear.png")]
public class ItemInfoPanelBitmaps_bitmapArmorWear extends BitmapAsset {
public function ItemInfoPanelBitmaps_bitmapArmorWear() {
super();
}
}
}
|
package projects.tanks.client.garage.models.item.properties {
public class ItemProperty {
public static const HULL_ARMOR:ItemProperty = new ItemProperty(0,"HULL_ARMOR");
public static const HULL_SPEED:ItemProperty = new ItemProperty(1,"HULL_SPEED");
public static const HULL_SIDE_ACCELERATION:ItemProperty = new ItemProperty(2,"HULL_SIDE_ACCELERATION");
public static const HULL_TURN_SPEED:ItemProperty = new ItemProperty(3,"HULL_TURN_SPEED");
public static const HULL_TURN_ACCELERATION:ItemProperty = new ItemProperty(4,"HULL_TURN_ACCELERATION");
public static const HULL_REVERSE_TURN_ACCELERATION:ItemProperty = new ItemProperty(5,"HULL_REVERSE_TURN_ACCELERATION");
public static const HULL_TURN_STABILIZATION_ACCELERATION:ItemProperty = new ItemProperty(6,"HULL_TURN_STABILIZATION_ACCELERATION");
public static const HULL_ACCELERATION:ItemProperty = new ItemProperty(7,"HULL_ACCELERATION");
public static const HULL_REVERSE_ACCELERATION:ItemProperty = new ItemProperty(8,"HULL_REVERSE_ACCELERATION");
public static const HULL_MASS:ItemProperty = new ItemProperty(9,"HULL_MASS");
public static const TURRET_TURN_SPEED:ItemProperty = new ItemProperty(10,"TURRET_TURN_SPEED");
public static const TURRET_ROTATION_ACCELERATION:ItemProperty = new ItemProperty(11,"TURRET_ROTATION_ACCELERATION");
public static const INITIAL_TURRET_ANGLE:ItemProperty = new ItemProperty(12,"INITIAL_TURRET_ANGLE");
public static const IMPACT_FORCE:ItemProperty = new ItemProperty(13,"IMPACT_FORCE");
public static const DAMAGE_FROM:ItemProperty = new ItemProperty(14,"DAMAGE_FROM");
public static const DAMAGE_TO:ItemProperty = new ItemProperty(15,"DAMAGE_TO");
public static const DAMAGE_PER_SECOND:ItemProperty = new ItemProperty(16,"DAMAGE_PER_SECOND");
public static const WEAPON_RELOAD_TIME:ItemProperty = new ItemProperty(17,"WEAPON_RELOAD_TIME");
public static const WEAPON_CHARGING_TIME:ItemProperty = new ItemProperty(18,"WEAPON_CHARGING_TIME");
public static const WEAPON_WEAKENING_COEFF:ItemProperty = new ItemProperty(19,"WEAPON_WEAKENING_COEFF");
public static const FIREBIRD_RESISTANCE:ItemProperty = new ItemProperty(20,"FIREBIRD_RESISTANCE");
public static const SMOKY_RESISTANCE:ItemProperty = new ItemProperty(21,"SMOKY_RESISTANCE");
public static const TWINS_RESISTANCE:ItemProperty = new ItemProperty(22,"TWINS_RESISTANCE");
public static const RAILGUN_RESISTANCE:ItemProperty = new ItemProperty(23,"RAILGUN_RESISTANCE");
public static const ISIS_RESISTANCE:ItemProperty = new ItemProperty(24,"ISIS_RESISTANCE");
public static const MINE_RESISTANCE:ItemProperty = new ItemProperty(25,"MINE_RESISTANCE");
public static const THUNDER_RESISTANCE:ItemProperty = new ItemProperty(26,"THUNDER_RESISTANCE");
public static const FREEZE_RESISTANCE:ItemProperty = new ItemProperty(27,"FREEZE_RESISTANCE");
public static const RICOCHET_RESISTANCE:ItemProperty = new ItemProperty(28,"RICOCHET_RESISTANCE");
public static const SHAFT_RESISTANCE:ItemProperty = new ItemProperty(29,"SHAFT_RESISTANCE");
public static const MACHINE_GUN_RESISTANCE:ItemProperty = new ItemProperty(30,"MACHINE_GUN_RESISTANCE");
public static const SHOTGUN_RESISTANCE:ItemProperty = new ItemProperty(31,"SHOTGUN_RESISTANCE");
public static const ROCKET_LAUNCHER_RESISTANCE:ItemProperty = new ItemProperty(32,"ROCKET_LAUNCHER_RESISTANCE");
public static const ARTILLERY_RESISTANCE:ItemProperty = new ItemProperty(33,"ARTILLERY_RESISTANCE");
public static const TERMINATOR_RESISTANCE:ItemProperty = new ItemProperty(34,"TERMINATOR_RESISTANCE");
public static const GAUSS_RESISTANCE:ItemProperty = new ItemProperty(35,"GAUSS_RESISTANCE");
public static const ALL_RESISTANCE:ItemProperty = new ItemProperty(36,"ALL_RESISTANCE");
public static const SHAFT_AIMING_MODE_MIN_DAMAGE:ItemProperty = new ItemProperty(37,"SHAFT_AIMING_MODE_MIN_DAMAGE");
public static const SHAFT_AIMING_MODE_MAX_DAMAGE:ItemProperty = new ItemProperty(38,"SHAFT_AIMING_MODE_MAX_DAMAGE");
public static const SHAFT_VERTICAL_TARGETING_SPEED:ItemProperty = new ItemProperty(39,"SHAFT_VERTICAL_TARGETING_SPEED");
public static const SHAFT_HORIZONTAL_TARGETING_SPEED:ItemProperty = new ItemProperty(40,"SHAFT_HORIZONTAL_TARGETING_SPEED");
public static const SHAFT_AIMING_MODE_CHARGE_RATE:ItemProperty = new ItemProperty(41,"SHAFT_AIMING_MODE_CHARGE_RATE");
public static const SHAFT_AIMED_SHOT_IMPACT:ItemProperty = new ItemProperty(42,"SHAFT_AIMED_SHOT_IMPACT");
public static const SHAFT_ROTATION_DECELERATION_COEFF:ItemProperty = new ItemProperty(43,"SHAFT_ROTATION_DECELERATION_COEFF");
public static const SHAFT_FAST_SHOT_ENERGY:ItemProperty = new ItemProperty(44,"SHAFT_FAST_SHOT_ENERGY");
public static const SHAFT_MIN_AIMED_SHOT_ENERGY:ItemProperty = new ItemProperty(45,"SHAFT_MIN_AIMED_SHOT_ENERGY");
public static const WEAPON_CHARGE_RATE:ItemProperty = new ItemProperty(46,"WEAPON_CHARGE_RATE");
public static const WEAPON_KICKBACK:ItemProperty = new ItemProperty(47,"WEAPON_KICKBACK");
public static const WEAPON_MIN_DAMAGE_PERCENT:ItemProperty = new ItemProperty(48,"WEAPON_MIN_DAMAGE_PERCENT");
public static const WEAPON_MIN_DAMAGE_RADIUS:ItemProperty = new ItemProperty(49,"WEAPON_MIN_DAMAGE_RADIUS");
public static const WEAPON_MAX_DAMAGE_RADIUS:ItemProperty = new ItemProperty(50,"WEAPON_MAX_DAMAGE_RADIUS");
public static const SHOT_RANGE:ItemProperty = new ItemProperty(51,"SHOT_RANGE");
public static const MAX_CRITICAL_HIT_CHANCE:ItemProperty = new ItemProperty(52,"MAX_CRITICAL_HIT_CHANCE");
public static const START_CRITICAL_HIT_CHANCE:ItemProperty = new ItemProperty(53,"START_CRITICAL_HIT_CHANCE");
public static const AFTER_CRIT_CRITICAL_HIT_CHANCE:ItemProperty = new ItemProperty(54,"AFTER_CRIT_CRITICAL_HIT_CHANCE");
public static const CRITICAL_CHANCE_DELTA:ItemProperty = new ItemProperty(55,"CRITICAL_CHANCE_DELTA");
public static const CRITICAL_HIT_CHANCE:ItemProperty = new ItemProperty(56,"CRITICAL_HIT_CHANCE");
public static const CRITICAL_HIT_DAMAGE:ItemProperty = new ItemProperty(57,"CRITICAL_HIT_DAMAGE");
public static const SPLASH_DAMAGE_RADIUS:ItemProperty = new ItemProperty(58,"SPLASH_DAMAGE_RADIUS");
public static const RADIUS_OF_MAX_SPLASH_DAMAGE:ItemProperty = new ItemProperty(59,"RADIUS_OF_MAX_SPLASH_DAMAGE");
public static const MIN_SPLASH_DAMAGE_PERCENT:ItemProperty = new ItemProperty(60,"MIN_SPLASH_DAMAGE_PERCENT");
public static const SPLASH_DAMAGE_IMPACT:ItemProperty = new ItemProperty(61,"SPLASH_DAMAGE_IMPACT");
public static const RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE:ItemProperty = new ItemProperty(62,"RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE");
public static const FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT:ItemProperty = new ItemProperty(63,"FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT");
public static const WEAPON_DISCHARGE_RATE:ItemProperty = new ItemProperty(64,"WEAPON_DISCHARGE_RATE");
public static const DAMAGE_PER_PERIOD:ItemProperty = new ItemProperty(65,"DAMAGE_PER_PERIOD");
public static const ISIS_HEALING_PER_PERIOD:ItemProperty = new ItemProperty(66,"ISIS_HEALING_PER_PERIOD");
public static const ISIS_INCREASE_TARGET_TEMPERATURE_PER_TICK:ItemProperty = new ItemProperty(67,"ISIS_INCREASE_TARGET_TEMPERATURE_PER_TICK");
public static const ISIS_DECREASE_TARGET_TEMPERATURE_PER_TICK:ItemProperty = new ItemProperty(68,"ISIS_DECREASE_TARGET_TEMPERATURE_PER_TICK");
public static const ISIS_DISCHARGE_SPEED_HEALING:ItemProperty = new ItemProperty(69,"ISIS_DISCHARGE_SPEED_HEALING");
public static const ISIS_DISCHARGE_SPEED_IDLE:ItemProperty = new ItemProperty(70,"ISIS_DISCHARGE_SPEED_IDLE");
public static const FLAME_TEMPERATURE_LIMIT:ItemProperty = new ItemProperty(71,"FLAME_TEMPERATURE_LIMIT");
public static const HEAT_PER_PERIOD:ItemProperty = new ItemProperty(72,"HEAT_PER_PERIOD");
public static const ENERGY_PER_SHOT:ItemProperty = new ItemProperty(73,"ENERGY_PER_SHOT");
public static const MACHINE_GUN_SELF_TEMPERATURE_INCREASE_PER_SECOND:ItemProperty = new ItemProperty(74,"MACHINE_GUN_SELF_TEMPERATURE_INCREASE_PER_SECOND");
public static const MACHINE_GUN_SPIN_UP_TIME_SECOND:ItemProperty = new ItemProperty(75,"MACHINE_GUN_SPIN_UP_TIME_SECOND");
public static const MACHINE_GUN_SPIN_DOWN_TIME_SECOND:ItemProperty = new ItemProperty(76,"MACHINE_GUN_SPIN_DOWN_TIME_SECOND");
public static const MACHINE_GUN_WEAPON_TURN_DECELERATION_COEFF:ItemProperty = new ItemProperty(77,"MACHINE_GUN_WEAPON_TURN_DECELERATION_COEFF");
public static const MACHINE_GUN_TEMPERATURE_HITTING_TIME_SECOND:ItemProperty = new ItemProperty(78,"MACHINE_GUN_TEMPERATURE_HITTING_TIME_SECOND");
public static const MACHINE_GUN_OVERHEAT_DAMAGE_COEFF:ItemProperty = new ItemProperty(79,"MACHINE_GUN_OVERHEAT_DAMAGE_COEFF");
public static const MACHINE_GUN_POWER_WHEN_TANK_TEMPERATURE_START_INCREASE:ItemProperty = new ItemProperty(80,"MACHINE_GUN_POWER_WHEN_TANK_TEMPERATURE_START_INCREASE");
public static const ELLIPTIC_CONE_VERTICAL_ANGLE:ItemProperty = new ItemProperty(81,"ELLIPTIC_CONE_VERTICAL_ANGLE");
public static const ELLIPTIC_CONE_HORIZONTAL_ANGLE:ItemProperty = new ItemProperty(82,"ELLIPTIC_CONE_HORIZONTAL_ANGLE");
public static const SHOTGUN_MAGAZINE_SIZE:ItemProperty = new ItemProperty(83,"SHOTGUN_MAGAZINE_SIZE");
public static const SHOTGUN_PELLET_COUNT:ItemProperty = new ItemProperty(84,"SHOTGUN_PELLET_COUNT");
public static const MAGAZINE_RELOAD_TIME:ItemProperty = new ItemProperty(85,"MAGAZINE_RELOAD_TIME");
public static const DAMAGE_PER_HIT:ItemProperty = new ItemProperty(86,"DAMAGE_PER_HIT");
public static const DISCHARGE_SPEED:ItemProperty = new ItemProperty(87,"DISCHARGE_SPEED");
public static const CONE_ANGLE:ItemProperty = new ItemProperty(88,"CONE_ANGLE");
public static const FREEZE_PER_TICK:ItemProperty = new ItemProperty(89,"FREEZE_PER_TICK");
public static const WEAPON_ANGLE_UP:ItemProperty = new ItemProperty(90,"WEAPON_ANGLE_UP");
public static const WEAPON_ANGLE_DOWN:ItemProperty = new ItemProperty(91,"WEAPON_ANGLE_DOWN");
public static const ROCKET_ANGULAR_VELOCITY:ItemProperty = new ItemProperty(92,"ROCKET_ANGULAR_VELOCITY");
public static const SALVO_AIMING_TIME:ItemProperty = new ItemProperty(93,"SALVO_AIMING_TIME");
public static const SALVO_AIMING_GRACE_PERIOD:ItemProperty = new ItemProperty(94,"SALVO_AIMING_GRACE_PERIOD");
public static const TIME_BETWEEN_SHOTS_OF_SALVO:ItemProperty = new ItemProperty(95,"TIME_BETWEEN_SHOTS_OF_SALVO");
public static const SALVO_RELOAD_TIME:ItemProperty = new ItemProperty(96,"SALVO_RELOAD_TIME");
public static const SALVO_SIZE:ItemProperty = new ItemProperty(97,"SALVO_SIZE");
public static const SHELL_SPEED:ItemProperty = new ItemProperty(98,"SHELL_SPEED");
public static const SHELL_RADIUS:ItemProperty = new ItemProperty(99,"SHELL_RADIUS");
public static const MIN_SHELL_SPEED:ItemProperty = new ItemProperty(100,"MIN_SHELL_SPEED");
public static const MAX_SHELL_SPEED:ItemProperty = new ItemProperty(101,"MAX_SHELL_SPEED");
public static const SHELL_BOOST_PHASE_DURATION:ItemProperty = new ItemProperty(102,"SHELL_BOOST_PHASE_DURATION");
public static const SHELL_SPEEDS_COUNT:ItemProperty = new ItemProperty(103,"SHELL_SPEEDS_COUNT");
public static const SHELL_GRAVITY_COEF:ItemProperty = new ItemProperty(104,"SHELL_GRAVITY_COEF");
public static const MAX_RICOCHET_COUNT:ItemProperty = new ItemProperty(105,"MAX_RICOCHET_COUNT");
public static const SECONDARY_WEAPON_KICKBACK:ItemProperty = new ItemProperty(106,"SECONDARY_WEAPON_KICKBACK");
public static const SECONDARY_DAMAGE_FROM:ItemProperty = new ItemProperty(107,"SECONDARY_DAMAGE_FROM");
public static const SECONDARY_DAMAGE_TO:ItemProperty = new ItemProperty(108,"SECONDARY_DAMAGE_TO");
public static const HIGHLIGHTING_DISTANCE:ItemProperty = new ItemProperty(109,"HIGHLIGHTING_DISTANCE");
public static const DRONE_RELOAD:ItemProperty = new ItemProperty(110,"DRONE_RELOAD");
public static const DRONE_REPAIR_HEALTH:ItemProperty = new ItemProperty(111,"DRONE_REPAIR_HEALTH");
public static const DRONE_REPAIR_RADIUS:ItemProperty = new ItemProperty(112,"DRONE_REPAIR_RADIUS");
public static const DRONE_INVENTORY:ItemProperty = new ItemProperty(113,"DRONE_INVENTORY");
public static const DRONE_INVENTORY_ADD:ItemProperty = new ItemProperty(114,"DRONE_INVENTORY_ADD");
public static const DRONE_BONUS_ADD:ItemProperty = new ItemProperty(115,"DRONE_BONUS_ADD");
public static const DRONE_FIRST_AID_BONUS_ADD:ItemProperty = new ItemProperty(116,"DRONE_FIRST_AID_BONUS_ADD");
public static const DRONE_OVERDRIVE_BOOST:ItemProperty = new ItemProperty(117,"DRONE_OVERDRIVE_BOOST");
public static const DRONE_INVENTORY_RADIUS:ItemProperty = new ItemProperty(118,"DRONE_INVENTORY_RADIUS");
public static const DRONE_COOLDOWN_RADIUS:ItemProperty = new ItemProperty(119,"DRONE_COOLDOWN_RADIUS");
public static const DRONE_DEFEND:ItemProperty = new ItemProperty(120,"DRONE_DEFEND");
public static const DRONE_ARMOR_BOOST:ItemProperty = new ItemProperty(121,"DRONE_ARMOR_BOOST");
public static const DRONE_MINE:ItemProperty = new ItemProperty(122,"DRONE_MINE");
public static const DRONE_ADDITIONAL_MINES:ItemProperty = new ItemProperty(123,"DRONE_ADDITIONAL_MINES");
public static const DRONE_MINES_ACTIVATION_DELAY:ItemProperty = new ItemProperty(124,"DRONE_MINES_ACTIVATION_DELAY");
public static const DRONE_INVENTORY_COOLDOWN_BOOST:ItemProperty = new ItemProperty(125,"DRONE_INVENTORY_COOLDOWN_BOOST");
public static const DRONE_MINES_PLACEMENT_RADIUS:ItemProperty = new ItemProperty(126,"DRONE_MINES_PLACEMENT_RADIUS");
public static const DRONE_POWER_BOOST:ItemProperty = new ItemProperty(127,"DRONE_POWER_BOOST");
public static const DRONE_POWER_DURATION:ItemProperty = new ItemProperty(128,"DRONE_POWER_DURATION");
public static const DRONE_CRITICAL_HEALTH:ItemProperty = new ItemProperty(129,"DRONE_CRITICAL_HEALTH");
public static const DRONE_CONSTANT_ARMOR_PERCENT:ItemProperty = new ItemProperty(130,"DRONE_CONSTANT_ARMOR_PERCENT");
public static const DRONE_CONSTANT_POWER_PERCENT:ItemProperty = new ItemProperty(131,"DRONE_CONSTANT_POWER_PERCENT");
public static const ULTIMATE_HEAL_HP:ItemProperty = new ItemProperty(132,"ULTIMATE_HEAL_HP");
public static const DEVICE_TEMPERATURE_NORMALIZATION:ItemProperty = new ItemProperty(133,"DEVICE_TEMPERATURE_NORMALIZATION");
public static const DEVICE_BONUS_ENERGY_ON_KILL:ItemProperty = new ItemProperty(134,"DEVICE_BONUS_ENERGY_ON_KILL");
public static const DEVICE_HEAT_PER_PELLET:ItemProperty = new ItemProperty(135,"DEVICE_HEAT_PER_PELLET");
public static const DEVICE_SMOKY_TEMPERATURE_DELTA_ON_CRITICAL:ItemProperty = new ItemProperty(136,"DEVICE_SMOKY_TEMPERATURE_DELTA_ON_CRITICAL");
public static const DEVICE_TARGET_HEAT_DELTA_ON_SELF_OVERHEAT:ItemProperty = new ItemProperty(137,"DEVICE_TARGET_HEAT_DELTA_ON_SELF_OVERHEAT");
public static const ULTIMATE_CHARGE_PER_SEC:ItemProperty = new ItemProperty(138,"ULTIMATE_CHARGE_PER_SEC");
public static const ULTIMATE_CHARGE_PER_SCORE_POINT:ItemProperty = new ItemProperty(139,"ULTIMATE_CHARGE_PER_SCORE_POINT");
public static const ULTIMATE_SCORE_COOLDOWN_SEC:ItemProperty = new ItemProperty(140,"ULTIMATE_SCORE_COOLDOWN_SEC");
public static const ULTIMATE_ACTIVATION_DISCHARGE_PER_SEC:ItemProperty = new ItemProperty(141,"ULTIMATE_ACTIVATION_DISCHARGE_PER_SEC");
public static const GAUSS_AIMED_SHOT_IMPACT:ItemProperty = new ItemProperty(142,"GAUSS_AIMED_SHOT_IMPACT");
public static const GAUSS_AIMED_SPLASH_DAMAGE_RADIUS:ItemProperty = new ItemProperty(143,"GAUSS_AIMED_SPLASH_DAMAGE_RADIUS");
public static const GAUSS_AIMED_RADIUS_OF_MAX_SPLASH_DAMAGE:ItemProperty = new ItemProperty(144,"GAUSS_AIMED_RADIUS_OF_MAX_SPLASH_DAMAGE");
public static const GAUSS_AIMED_MIN_SPLASH_DAMAGE_PERCENT:ItemProperty = new ItemProperty(145,"GAUSS_AIMED_MIN_SPLASH_DAMAGE_PERCENT");
public static const GAUSS_AIMED_SPLASH_DAMAGE_IMPACT:ItemProperty = new ItemProperty(146,"GAUSS_AIMED_SPLASH_DAMAGE_IMPACT");
public static const GAUSS_AIMED_RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE:ItemProperty = new ItemProperty(147,"GAUSS_AIMED_RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE");
public static const GAUSS_AIMED_FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT:ItemProperty = new ItemProperty(148,"GAUSS_AIMED_FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT");
private var _value:int;
private var _name:String;
public function ItemProperty(param1:int, param2:String) {
super();
this._value = param1;
this._name = param2;
}
public static function get values() : Vector.<ItemProperty> {
var local1:Vector.<ItemProperty> = new Vector.<ItemProperty>();
local1.push(HULL_ARMOR);
local1.push(HULL_SPEED);
local1.push(HULL_SIDE_ACCELERATION);
local1.push(HULL_TURN_SPEED);
local1.push(HULL_TURN_ACCELERATION);
local1.push(HULL_REVERSE_TURN_ACCELERATION);
local1.push(HULL_TURN_STABILIZATION_ACCELERATION);
local1.push(HULL_ACCELERATION);
local1.push(HULL_REVERSE_ACCELERATION);
local1.push(HULL_MASS);
local1.push(TURRET_TURN_SPEED);
local1.push(TURRET_ROTATION_ACCELERATION);
local1.push(INITIAL_TURRET_ANGLE);
local1.push(IMPACT_FORCE);
local1.push(DAMAGE_FROM);
local1.push(DAMAGE_TO);
local1.push(DAMAGE_PER_SECOND);
local1.push(WEAPON_RELOAD_TIME);
local1.push(WEAPON_CHARGING_TIME);
local1.push(WEAPON_WEAKENING_COEFF);
local1.push(FIREBIRD_RESISTANCE);
local1.push(SMOKY_RESISTANCE);
local1.push(TWINS_RESISTANCE);
local1.push(RAILGUN_RESISTANCE);
local1.push(ISIS_RESISTANCE);
local1.push(MINE_RESISTANCE);
local1.push(THUNDER_RESISTANCE);
local1.push(FREEZE_RESISTANCE);
local1.push(RICOCHET_RESISTANCE);
local1.push(SHAFT_RESISTANCE);
local1.push(MACHINE_GUN_RESISTANCE);
local1.push(SHOTGUN_RESISTANCE);
local1.push(ROCKET_LAUNCHER_RESISTANCE);
local1.push(ARTILLERY_RESISTANCE);
local1.push(TERMINATOR_RESISTANCE);
local1.push(GAUSS_RESISTANCE);
local1.push(ALL_RESISTANCE);
local1.push(SHAFT_AIMING_MODE_MIN_DAMAGE);
local1.push(SHAFT_AIMING_MODE_MAX_DAMAGE);
local1.push(SHAFT_VERTICAL_TARGETING_SPEED);
local1.push(SHAFT_HORIZONTAL_TARGETING_SPEED);
local1.push(SHAFT_AIMING_MODE_CHARGE_RATE);
local1.push(SHAFT_AIMED_SHOT_IMPACT);
local1.push(SHAFT_ROTATION_DECELERATION_COEFF);
local1.push(SHAFT_FAST_SHOT_ENERGY);
local1.push(SHAFT_MIN_AIMED_SHOT_ENERGY);
local1.push(WEAPON_CHARGE_RATE);
local1.push(WEAPON_KICKBACK);
local1.push(WEAPON_MIN_DAMAGE_PERCENT);
local1.push(WEAPON_MIN_DAMAGE_RADIUS);
local1.push(WEAPON_MAX_DAMAGE_RADIUS);
local1.push(SHOT_RANGE);
local1.push(MAX_CRITICAL_HIT_CHANCE);
local1.push(START_CRITICAL_HIT_CHANCE);
local1.push(AFTER_CRIT_CRITICAL_HIT_CHANCE);
local1.push(CRITICAL_CHANCE_DELTA);
local1.push(CRITICAL_HIT_CHANCE);
local1.push(CRITICAL_HIT_DAMAGE);
local1.push(SPLASH_DAMAGE_RADIUS);
local1.push(RADIUS_OF_MAX_SPLASH_DAMAGE);
local1.push(MIN_SPLASH_DAMAGE_PERCENT);
local1.push(SPLASH_DAMAGE_IMPACT);
local1.push(RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE);
local1.push(FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT);
local1.push(WEAPON_DISCHARGE_RATE);
local1.push(DAMAGE_PER_PERIOD);
local1.push(ISIS_HEALING_PER_PERIOD);
local1.push(ISIS_INCREASE_TARGET_TEMPERATURE_PER_TICK);
local1.push(ISIS_DECREASE_TARGET_TEMPERATURE_PER_TICK);
local1.push(ISIS_DISCHARGE_SPEED_HEALING);
local1.push(ISIS_DISCHARGE_SPEED_IDLE);
local1.push(FLAME_TEMPERATURE_LIMIT);
local1.push(HEAT_PER_PERIOD);
local1.push(ENERGY_PER_SHOT);
local1.push(MACHINE_GUN_SELF_TEMPERATURE_INCREASE_PER_SECOND);
local1.push(MACHINE_GUN_SPIN_UP_TIME_SECOND);
local1.push(MACHINE_GUN_SPIN_DOWN_TIME_SECOND);
local1.push(MACHINE_GUN_WEAPON_TURN_DECELERATION_COEFF);
local1.push(MACHINE_GUN_TEMPERATURE_HITTING_TIME_SECOND);
local1.push(MACHINE_GUN_OVERHEAT_DAMAGE_COEFF);
local1.push(MACHINE_GUN_POWER_WHEN_TANK_TEMPERATURE_START_INCREASE);
local1.push(ELLIPTIC_CONE_VERTICAL_ANGLE);
local1.push(ELLIPTIC_CONE_HORIZONTAL_ANGLE);
local1.push(SHOTGUN_MAGAZINE_SIZE);
local1.push(SHOTGUN_PELLET_COUNT);
local1.push(MAGAZINE_RELOAD_TIME);
local1.push(DAMAGE_PER_HIT);
local1.push(DISCHARGE_SPEED);
local1.push(CONE_ANGLE);
local1.push(FREEZE_PER_TICK);
local1.push(WEAPON_ANGLE_UP);
local1.push(WEAPON_ANGLE_DOWN);
local1.push(ROCKET_ANGULAR_VELOCITY);
local1.push(SALVO_AIMING_TIME);
local1.push(SALVO_AIMING_GRACE_PERIOD);
local1.push(TIME_BETWEEN_SHOTS_OF_SALVO);
local1.push(SALVO_RELOAD_TIME);
local1.push(SALVO_SIZE);
local1.push(SHELL_SPEED);
local1.push(SHELL_RADIUS);
local1.push(MIN_SHELL_SPEED);
local1.push(MAX_SHELL_SPEED);
local1.push(SHELL_BOOST_PHASE_DURATION);
local1.push(SHELL_SPEEDS_COUNT);
local1.push(SHELL_GRAVITY_COEF);
local1.push(MAX_RICOCHET_COUNT);
local1.push(SECONDARY_WEAPON_KICKBACK);
local1.push(SECONDARY_DAMAGE_FROM);
local1.push(SECONDARY_DAMAGE_TO);
local1.push(HIGHLIGHTING_DISTANCE);
local1.push(DRONE_RELOAD);
local1.push(DRONE_REPAIR_HEALTH);
local1.push(DRONE_REPAIR_RADIUS);
local1.push(DRONE_INVENTORY);
local1.push(DRONE_INVENTORY_ADD);
local1.push(DRONE_BONUS_ADD);
local1.push(DRONE_FIRST_AID_BONUS_ADD);
local1.push(DRONE_OVERDRIVE_BOOST);
local1.push(DRONE_INVENTORY_RADIUS);
local1.push(DRONE_COOLDOWN_RADIUS);
local1.push(DRONE_DEFEND);
local1.push(DRONE_ARMOR_BOOST);
local1.push(DRONE_MINE);
local1.push(DRONE_ADDITIONAL_MINES);
local1.push(DRONE_MINES_ACTIVATION_DELAY);
local1.push(DRONE_INVENTORY_COOLDOWN_BOOST);
local1.push(DRONE_MINES_PLACEMENT_RADIUS);
local1.push(DRONE_POWER_BOOST);
local1.push(DRONE_POWER_DURATION);
local1.push(DRONE_CRITICAL_HEALTH);
local1.push(DRONE_CONSTANT_ARMOR_PERCENT);
local1.push(DRONE_CONSTANT_POWER_PERCENT);
local1.push(ULTIMATE_HEAL_HP);
local1.push(DEVICE_TEMPERATURE_NORMALIZATION);
local1.push(DEVICE_BONUS_ENERGY_ON_KILL);
local1.push(DEVICE_HEAT_PER_PELLET);
local1.push(DEVICE_SMOKY_TEMPERATURE_DELTA_ON_CRITICAL);
local1.push(DEVICE_TARGET_HEAT_DELTA_ON_SELF_OVERHEAT);
local1.push(ULTIMATE_CHARGE_PER_SEC);
local1.push(ULTIMATE_CHARGE_PER_SCORE_POINT);
local1.push(ULTIMATE_SCORE_COOLDOWN_SEC);
local1.push(ULTIMATE_ACTIVATION_DISCHARGE_PER_SEC);
local1.push(GAUSS_AIMED_SHOT_IMPACT);
local1.push(GAUSS_AIMED_SPLASH_DAMAGE_RADIUS);
local1.push(GAUSS_AIMED_RADIUS_OF_MAX_SPLASH_DAMAGE);
local1.push(GAUSS_AIMED_MIN_SPLASH_DAMAGE_PERCENT);
local1.push(GAUSS_AIMED_SPLASH_DAMAGE_IMPACT);
local1.push(GAUSS_AIMED_RADIUS_OF_FIRST_DIMINUTION_SPLASH_DAMAGE);
local1.push(GAUSS_AIMED_FIRST_DIMINUTION_SPLASH_DAMAGE_PERCENT);
return local1;
}
public function toString() : String {
return "ItemProperty [" + this._name + "]";
}
public function get value() : int {
return this._value;
}
public function get name() : String {
return this._name;
}
}
}
|
package controls.resultassets
{
import assets.resultwindow.bres_SELECTED_GREEN_PIXEL;
import assets.resultwindow.bres_SELECTED_GREEN_TL;
import controls.statassets.StatLineBase;
public class ResultWindowGreenSelected extends StatLineBase
{
public function ResultWindowGreenSelected()
{
super();
tl = new bres_SELECTED_GREEN_TL(1,1);
px = new bres_SELECTED_GREEN_PIXEL(1,1);
frameColor = 5898034;
}
}
}
|
package alternativa.tanks.models.effects.crystal
{
import alternativa.model.IModel;
import alternativa.object.ClientObject;
import alternativa.types.Long;
import com.alternativaplatform.projects.tanks.client.warfare.models.effects.crystal.CrystalBonusModelBase;
import com.alternativaplatform.projects.tanks.client.warfare.models.effects.crystal.ICrystalBonusModelBase;
public class CrystalBonusModel extends CrystalBonusModelBase implements ICrystalBonusModelBase
{
public function CrystalBonusModel()
{
super();
_interfaces.push(IModel,ICrystalBonusModelBase);
}
public function activated(clientObject:ClientObject, tankId:Long, crystals:int) : void
{
}
}
}
|
package alternativa.tanks.models.tank {
import alternativa.types.Long;
import platform.client.fp10.core.type.IGameObject;
public interface ReadOnlyUsersRegistry {
function getUser(param1:Long) : IGameObject;
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.clan {
import flash.events.Event;
public class ClanUserInfoEvent extends Event {
public static const UPDATE_GIVE_BONUSES_CLAN:String = "ClanUserInfoEvent.UPDATE_GIVE_BONUSES_CLAN";
public static const ON_JOIN_CLAN:String = "ClanUserInfoEvent.ON_JOIN_CLAN";
public static const ON_LEAVE_CLAN:String = "ClanUserInfoEvent.ON_LEAVE_CLAN";
public function ClanUserInfoEvent(param1:String) {
super(param1,true);
}
}
}
|
package projects.tanks.client.entrance.model.entrance.google {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
public class GoogleEntranceModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _loginId:Long = Long.getLong(818424192,1970200198);
private var _login_idTokenCodec:ICodec;
private var model:IModel;
public function GoogleEntranceModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._login_idTokenCodec = this.protocol.getCodec(new TypeCodecInfo(String,false));
}
public function login(param1:String) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._login_idTokenCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._loginId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package alternativa.engine3d.core {
import alternativa.engine3d.alternativa3d;
import alternativa.engine3d.lights.DirectionalLight;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.events.Event;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.geom.Vector3D;
import flash.system.System;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.utils.Dictionary;
import flash.utils.getDefinitionByName;
import flash.utils.getQualifiedClassName;
import flash.utils.getQualifiedSuperclassName;
import flash.utils.getTimer;
use namespace alternativa3d;
public class Camera3D extends Object3D {
public var view:View;
public var fov:Number = 1.5707963267948966;
public var nearClipping:Number = 1;
public var farClipping:Number = 1000000;
public var onRender:Function;
alternativa3d var viewSizeX:Number;
alternativa3d var viewSizeY:Number;
alternativa3d var focalLength:Number;
alternativa3d var lights:Vector.<Light3D> = new Vector.<Light3D>();
alternativa3d var lightsLength:int = 0;
alternativa3d var occluders:Vector.<Vertex> = new Vector.<Vertex>();
alternativa3d var numOccluders:int;
alternativa3d var occludedAll:Boolean;
alternativa3d var numDraws:int;
alternativa3d var numPolygons:int;
alternativa3d var numTriangles:int;
private var shadows:Dictionary = new Dictionary();
public var fogNear:Number = 0;
public var fogFar:Number = 1000000;
public var fogAlpha:Number = 0;
public var fogColor:int = 8355711;
public var softTransparency:Boolean = false;
public var depthBufferScale:Number = 1;
public var ssao:Boolean = false;
public var ssaoRadius:Number = 100;
public var ssaoRange:Number = 1000;
public var ssaoColor:int = 0;
public var ssaoAlpha:Number = 1;
public var directionalLight:DirectionalLight;
public var shadowMap:ShadowMap;
public var ambientColor:int = 0;
public var deferredLighting:Boolean = false;
public var fogStrength:Number = 1;
public var softTransparencyStrength:Number = 1;
public var ssaoStrength:Number = 1;
public var directionalLightStrength:Number = 1;
public var shadowMapStrength:Number = 1;
public var shadowsStrength:Number = 1;
public var shadowsDistanceMultiplier:Number = 1;
public var deferredLightingStrength:Number = 1;
public var debug:Boolean = false;
private var debugSet:Object = new Object();
private var _diagram:Sprite = this.createDiagram();
public var fpsUpdatePeriod:int = 10;
public var timerUpdatePeriod:int = 10;
private var fpsTextField:TextField;
private var memoryTextField:TextField;
private var drawsTextField:TextField;
private var polygonsTextField:TextField;
private var trianglesTextField:TextField;
private var timerTextField:TextField;
private var graph:Bitmap;
private var rect:Rectangle;
private var _diagramAlign:String = "TR";
private var _diagramHorizontalMargin:Number = 2;
private var _diagramVerticalMargin:Number = 2;
private var fpsUpdateCounter:int;
private var previousFrameTime:int;
private var previousPeriodTime:int;
private var maxMemory:int;
private var timerUpdateCounter:int;
private var timeSum:int;
private var timeCount:int;
private var timer:int;
private var firstVertex:Vertex = new Vertex();
private var firstFace:Face = new Face();
private var firstWrapper:Wrapper = new Wrapper();
alternativa3d var lastWrapper:Wrapper = this.firstWrapper;
alternativa3d var lastVertex:Vertex = this.firstVertex;
alternativa3d var lastFace:Face = this.firstFace;
public function Camera3D() {
super();
}
public function addShadow(param1:Shadow) : void {
this.shadows[param1] = true;
}
public function removeShadow(param1:Shadow) : void {
delete this.shadows[param1];
}
public function removeAllShadows() : void {
this.shadows = new Dictionary();
}
public function render() : void {
var local1:Object3D = null;
var local2:Light3D = null;
var local3:int = 0;
this.alternativa3d::numDraws = 0;
this.alternativa3d::numPolygons = 0;
this.alternativa3d::numTriangles = 0;
if(this.view != null) {
this.alternativa3d::viewSizeX = this.view.alternativa3d::_width * 0.5;
this.alternativa3d::viewSizeY = this.view.alternativa3d::_height * 0.5;
this.alternativa3d::focalLength = Math.sqrt(this.alternativa3d::viewSizeX * this.alternativa3d::viewSizeX + this.alternativa3d::viewSizeY * this.alternativa3d::viewSizeY) / Math.tan(this.fov * 0.5);
this.alternativa3d::composeCameraMatrix();
local1 = this;
while(local1.alternativa3d::_parent != null) {
local1 = local1.alternativa3d::_parent;
local1.alternativa3d::composeMatrix();
alternativa3d::appendMatrix(local1);
}
alternativa3d::invertMatrix();
this.alternativa3d::numOccluders = 0;
this.alternativa3d::occludedAll = false;
this.view.alternativa3d::numDraws = 0;
if(local1 != this && local1.visible) {
this.alternativa3d::lightsLength = 0;
local2 = (local1 as Object3DContainer).alternativa3d::lightList;
while(local2 != null) {
if(local2.visible) {
local2.alternativa3d::calculateCameraMatrix(this);
if(local2.alternativa3d::checkFrustumCulling(this)) {
this.alternativa3d::lights[this.alternativa3d::lightsLength] = local2;
++this.alternativa3d::lightsLength;
}
}
local2 = local2.alternativa3d::nextLight;
}
local1.alternativa3d::appendMatrix(this);
if(local1.alternativa3d::cullingInCamera(this,63) >= 0) {
if(this.debug) {
local3 = 0;
while(local3 < this.alternativa3d::lightsLength) {
(this.alternativa3d::lights[local3] as Light3D).alternativa3d::drawDebug(this,this.view);
local3++;
}
}
local1.alternativa3d::draw(this,this.view);
this.alternativa3d::deferredDestroy();
this.alternativa3d::clearOccluders();
}
}
this.view.alternativa3d::remChildren(this.view.alternativa3d::numDraws);
this.view.alternativa3d::onRender(this);
if(this.onRender != null) {
this.onRender();
}
}
}
public function lookAt(param1:Number, param2:Number, param3:Number) : void {
var local4:Number = param1 - this.x;
var local5:Number = param2 - this.y;
var local6:Number = param3 - this.z;
rotationX = Math.atan2(local6,Math.sqrt(local4 * local4 + local5 * local5)) - Math.PI / 2;
rotationY = 0;
rotationZ = -Math.atan2(local4,local5);
}
public function projectGlobal(param1:Vector3D) : Vector3D {
if(this.view == null) {
throw new Error("It is necessary to have view set.");
}
this.alternativa3d::viewSizeX = this.view.alternativa3d::_width * 0.5;
this.alternativa3d::viewSizeY = this.view.alternativa3d::_height * 0.5;
this.alternativa3d::focalLength = Math.sqrt(this.alternativa3d::viewSizeX * this.alternativa3d::viewSizeX + this.alternativa3d::viewSizeY * this.alternativa3d::viewSizeY) / Math.tan(this.fov * 0.5);
this.alternativa3d::composeCameraMatrix();
var local2:Object3D = this;
while(local2.alternativa3d::_parent != null) {
local2 = local2.alternativa3d::_parent;
alternativa3d::tA.alternativa3d::composeMatrixFromSource(local2);
alternativa3d::appendMatrix(alternativa3d::tA);
}
alternativa3d::invertMatrix();
var local3:Vector3D = new Vector3D();
local3.x = alternativa3d::ma * param1.x + alternativa3d::mb * param1.y + alternativa3d::mc * param1.z + alternativa3d::md;
local3.y = alternativa3d::me * param1.x + alternativa3d::mf * param1.y + alternativa3d::mg * param1.z + alternativa3d::mh;
local3.z = alternativa3d::mi * param1.x + alternativa3d::mj * param1.y + alternativa3d::mk * param1.z + alternativa3d::ml;
local3.x = local3.x * this.alternativa3d::viewSizeX / local3.z + this.alternativa3d::viewSizeX;
local3.y = local3.y * this.alternativa3d::viewSizeY / local3.z + this.alternativa3d::viewSizeY;
return local3;
}
public function calculateRay(param1:Vector3D, param2:Vector3D, param3:Number, param4:Number) : void {
if(this.view == null) {
throw new Error("It is necessary to have view set.");
}
this.alternativa3d::viewSizeX = this.view.alternativa3d::_width * 0.5;
this.alternativa3d::viewSizeY = this.view.alternativa3d::_height * 0.5;
this.alternativa3d::focalLength = Math.sqrt(this.alternativa3d::viewSizeX * this.alternativa3d::viewSizeX + this.alternativa3d::viewSizeY * this.alternativa3d::viewSizeY) / Math.tan(this.fov * 0.5);
param3 -= this.alternativa3d::viewSizeX;
param4 -= this.alternativa3d::viewSizeY;
var local5:Number = param3 * this.alternativa3d::focalLength / this.alternativa3d::viewSizeX;
var local6:Number = param4 * this.alternativa3d::focalLength / this.alternativa3d::viewSizeY;
var local7:Number = this.alternativa3d::focalLength;
var local8:Number = local5 * this.nearClipping / this.alternativa3d::focalLength;
var local9:Number = local6 * this.nearClipping / this.alternativa3d::focalLength;
var local10:Number = this.nearClipping;
this.alternativa3d::composeCameraMatrix();
var local11:Object3D = this;
while(local11.alternativa3d::_parent != null) {
local11 = local11.alternativa3d::_parent;
alternativa3d::tA.alternativa3d::composeMatrixFromSource(local11);
alternativa3d::appendMatrix(alternativa3d::tA);
}
param1.x = alternativa3d::ma * local8 + alternativa3d::mb * local9 + alternativa3d::mc * local10 + alternativa3d::md;
param1.y = alternativa3d::me * local8 + alternativa3d::mf * local9 + alternativa3d::mg * local10 + alternativa3d::mh;
param1.z = alternativa3d::mi * local8 + alternativa3d::mj * local9 + alternativa3d::mk * local10 + alternativa3d::ml;
param2.x = alternativa3d::ma * local5 + alternativa3d::mb * local6 + alternativa3d::mc * local7;
param2.y = alternativa3d::me * local5 + alternativa3d::mf * local6 + alternativa3d::mg * local7;
param2.z = alternativa3d::mi * local5 + alternativa3d::mj * local6 + alternativa3d::mk * local7;
var local12:Number = 1 / Math.sqrt(param2.x * param2.x + param2.y * param2.y + param2.z * param2.z);
param2.x *= local12;
param2.y *= local12;
param2.z *= local12;
}
override public function clone() : Object3D {
var local1:Camera3D = new Camera3D();
local1.clonePropertiesFrom(this);
return local1;
}
override protected function clonePropertiesFrom(param1:Object3D) : void {
super.clonePropertiesFrom(param1);
var local2:Camera3D = param1 as Camera3D;
this.fov = local2.fov;
this.nearClipping = local2.nearClipping;
this.farClipping = local2.farClipping;
this.debug = local2.debug;
}
alternativa3d function composeCameraMatrix() : void {
var local1:Number = this.alternativa3d::viewSizeX / this.alternativa3d::focalLength;
var local2:Number = this.alternativa3d::viewSizeY / this.alternativa3d::focalLength;
var local3:Number = Math.cos(rotationX);
var local4:Number = Math.sin(rotationX);
var local5:Number = Math.cos(rotationY);
var local6:Number = Math.sin(rotationY);
var local7:Number = Math.cos(rotationZ);
var local8:Number = Math.sin(rotationZ);
var local9:Number = local7 * local6;
var local10:Number = local8 * local6;
var local11:Number = local5 * scaleX;
var local12:Number = local4 * scaleY;
var local13:Number = local3 * scaleY;
var local14:Number = local3 * scaleZ;
var local15:Number = local4 * scaleZ;
alternativa3d::ma = local7 * local11 * local1;
alternativa3d::mb = (local9 * local12 - local8 * local13) * local2;
alternativa3d::mc = local9 * local14 + local8 * local15;
alternativa3d::md = x;
alternativa3d::me = local8 * local11 * local1;
alternativa3d::mf = (local10 * local12 + local7 * local13) * local2;
alternativa3d::mg = local10 * local14 - local7 * local15;
alternativa3d::mh = y;
alternativa3d::mi = -local6 * scaleX * local1;
alternativa3d::mj = local5 * local12 * local2;
alternativa3d::mk = local5 * local14;
alternativa3d::ml = z;
var local16:Number = this.view.offsetX / this.alternativa3d::viewSizeX;
var local17:Number = this.view.offsetY / this.alternativa3d::viewSizeY;
alternativa3d::mc -= alternativa3d::ma * local16 + alternativa3d::mb * local17;
alternativa3d::mg -= alternativa3d::me * local16 + alternativa3d::mf * local17;
alternativa3d::mk -= alternativa3d::mi * local16 + alternativa3d::mj * local17;
}
public function addToDebug(param1:int, param2:*) : void {
if(!this.debugSet[param1]) {
this.debugSet[param1] = new Dictionary();
}
this.debugSet[param1][param2] = true;
}
public function removeFromDebug(param1:int, param2:*) : void {
var local3:* = undefined;
if(Boolean(this.debugSet[param1])) {
delete this.debugSet[param1][param2];
var local4:int = 0;
var local5:* = this.debugSet[param1];
for(local3 in local5) {
}
if(!local3) {
delete this.debugSet[param1];
}
}
}
alternativa3d function checkInDebug(param1:Object3D) : int {
var local4:Class = null;
var local2:int = 0;
var local3:int = 1;
while(local3 <= 512) {
if(Boolean(this.debugSet[local3])) {
if(Boolean(this.debugSet[local3][Object3D]) || Boolean(this.debugSet[local3][param1])) {
local2 |= local3;
} else {
local4 = getDefinitionByName(getQualifiedClassName(param1)) as Class;
while(local4 != Object3D) {
if(Boolean(this.debugSet[local3][local4])) {
local2 |= local3;
break;
}
local4 = Class(getDefinitionByName(getQualifiedSuperclassName(local4)));
}
}
}
local3 <<= 1;
}
return local2;
}
public function startTimer() : void {
this.timer = getTimer();
}
public function stopTimer() : void {
this.timeSum += getTimer() - this.timer;
++this.timeCount;
}
public function get diagram() : DisplayObject {
return this._diagram;
}
public function get diagramAlign() : String {
return this._diagramAlign;
}
public function set diagramAlign(param1:String) : void {
this._diagramAlign = param1;
this.resizeDiagram();
}
public function get diagramHorizontalMargin() : Number {
return this._diagramHorizontalMargin;
}
public function set diagramHorizontalMargin(param1:Number) : void {
this._diagramHorizontalMargin = param1;
this.resizeDiagram();
}
public function get diagramVerticalMargin() : Number {
return this._diagramVerticalMargin;
}
public function set diagramVerticalMargin(param1:Number) : void {
this._diagramVerticalMargin = param1;
this.resizeDiagram();
}
private function createDiagram() : Sprite {
var diagram:Sprite = null;
diagram = new Sprite();
diagram.mouseEnabled = false;
diagram.mouseChildren = false;
diagram.addEventListener(Event.ADDED_TO_STAGE,function():void {
while(diagram.numChildren > 0) {
diagram.removeChildAt(0);
}
fpsTextField = new TextField();
fpsTextField.defaultTextFormat = new TextFormat("Tahoma",10,13421772);
fpsTextField.autoSize = TextFieldAutoSize.LEFT;
fpsTextField.text = "FPS:";
fpsTextField.selectable = false;
fpsTextField.x = -3;
fpsTextField.y = -5;
diagram.addChild(fpsTextField);
fpsTextField = new TextField();
fpsTextField.defaultTextFormat = new TextFormat("Tahoma",10,13421772);
fpsTextField.autoSize = TextFieldAutoSize.RIGHT;
fpsTextField.text = Number(diagram.stage.frameRate).toFixed(2);
fpsTextField.selectable = false;
fpsTextField.x = -3;
fpsTextField.y = -5;
fpsTextField.width = 65;
diagram.addChild(fpsTextField);
timerTextField = new TextField();
timerTextField.defaultTextFormat = new TextFormat("Tahoma",10,26367);
timerTextField.autoSize = TextFieldAutoSize.LEFT;
timerTextField.text = "MS:";
timerTextField.selectable = false;
timerTextField.x = -3;
timerTextField.y = 4;
diagram.addChild(timerTextField);
timerTextField = new TextField();
timerTextField.defaultTextFormat = new TextFormat("Tahoma",10,26367);
timerTextField.autoSize = TextFieldAutoSize.RIGHT;
timerTextField.text = "";
timerTextField.selectable = false;
timerTextField.x = -3;
timerTextField.y = 4;
timerTextField.width = 65;
diagram.addChild(timerTextField);
memoryTextField = new TextField();
memoryTextField.defaultTextFormat = new TextFormat("Tahoma",10,13421568);
memoryTextField.autoSize = TextFieldAutoSize.LEFT;
memoryTextField.text = "MEM:";
memoryTextField.selectable = false;
memoryTextField.x = -3;
memoryTextField.y = 13;
diagram.addChild(memoryTextField);
memoryTextField = new TextField();
memoryTextField.defaultTextFormat = new TextFormat("Tahoma",10,13421568);
memoryTextField.autoSize = TextFieldAutoSize.RIGHT;
memoryTextField.text = bytesToString(System.totalMemory);
memoryTextField.selectable = false;
memoryTextField.x = -3;
memoryTextField.y = 13;
memoryTextField.width = 65;
diagram.addChild(memoryTextField);
drawsTextField = new TextField();
drawsTextField.defaultTextFormat = new TextFormat("Tahoma",10,52224);
drawsTextField.autoSize = TextFieldAutoSize.LEFT;
drawsTextField.text = "DRW:";
drawsTextField.selectable = false;
drawsTextField.x = -3;
drawsTextField.y = 22;
diagram.addChild(drawsTextField);
drawsTextField = new TextField();
drawsTextField.defaultTextFormat = new TextFormat("Tahoma",10,52224);
drawsTextField.autoSize = TextFieldAutoSize.RIGHT;
drawsTextField.text = "0";
drawsTextField.selectable = false;
drawsTextField.x = -3;
drawsTextField.y = 22;
drawsTextField.width = 52;
diagram.addChild(drawsTextField);
polygonsTextField = new TextField();
polygonsTextField.defaultTextFormat = new TextFormat("Tahoma",10,16711731);
polygonsTextField.autoSize = TextFieldAutoSize.LEFT;
polygonsTextField.text = "PLG:";
polygonsTextField.selectable = false;
polygonsTextField.x = -3;
polygonsTextField.y = 31;
diagram.addChild(polygonsTextField);
polygonsTextField = new TextField();
polygonsTextField.defaultTextFormat = new TextFormat("Tahoma",10,16711731);
polygonsTextField.autoSize = TextFieldAutoSize.RIGHT;
polygonsTextField.text = "0";
polygonsTextField.selectable = false;
polygonsTextField.x = -3;
polygonsTextField.y = 31;
polygonsTextField.width = 52;
diagram.addChild(polygonsTextField);
trianglesTextField = new TextField();
trianglesTextField.defaultTextFormat = new TextFormat("Tahoma",10,16737792);
trianglesTextField.autoSize = TextFieldAutoSize.LEFT;
trianglesTextField.text = "TRI:";
trianglesTextField.selectable = false;
trianglesTextField.x = -3;
trianglesTextField.y = 40;
diagram.addChild(trianglesTextField);
trianglesTextField = new TextField();
trianglesTextField.defaultTextFormat = new TextFormat("Tahoma",10,16737792);
trianglesTextField.autoSize = TextFieldAutoSize.RIGHT;
trianglesTextField.text = "0";
trianglesTextField.selectable = false;
trianglesTextField.x = -3;
trianglesTextField.y = 40;
trianglesTextField.width = 52;
diagram.addChild(trianglesTextField);
graph = new Bitmap(new BitmapData(60,40,true,553648127));
rect = new Rectangle(0,0,1,40);
graph.x = 0;
graph.y = 54;
diagram.addChild(graph);
previousPeriodTime = getTimer();
previousFrameTime = previousPeriodTime;
fpsUpdateCounter = 0;
maxMemory = 0;
timerUpdateCounter = 0;
timeSum = 0;
timeCount = 0;
diagram.stage.addEventListener(Event.ENTER_FRAME,updateDiagram,false,-1000);
diagram.stage.addEventListener(Event.RESIZE,resizeDiagram,false,-1000);
resizeDiagram();
});
diagram.addEventListener(Event.REMOVED_FROM_STAGE,function():void {
while(diagram.numChildren > 0) {
diagram.removeChildAt(0);
}
fpsTextField = null;
memoryTextField = null;
drawsTextField = null;
polygonsTextField = null;
trianglesTextField = null;
timerTextField = null;
graph.bitmapData.dispose();
graph = null;
rect = null;
diagram.stage.removeEventListener(Event.ENTER_FRAME,updateDiagram);
diagram.stage.removeEventListener(Event.RESIZE,resizeDiagram);
});
return diagram;
}
private function resizeDiagram(param1:Event = null) : void {
var local2:Point = null;
if(this._diagram.stage != null) {
local2 = this._diagram.parent.globalToLocal(new Point());
if(this._diagramAlign == StageAlign.TOP_LEFT || this._diagramAlign == StageAlign.LEFT || this._diagramAlign == StageAlign.BOTTOM_LEFT) {
this._diagram.x = Math.round(local2.x + this._diagramHorizontalMargin);
}
if(this._diagramAlign == StageAlign.TOP || this._diagramAlign == StageAlign.BOTTOM) {
this._diagram.x = Math.round(local2.x + this._diagram.stage.stageWidth / 2 - this.graph.width / 2);
}
if(this._diagramAlign == StageAlign.TOP_RIGHT || this._diagramAlign == StageAlign.RIGHT || this._diagramAlign == StageAlign.BOTTOM_RIGHT) {
this._diagram.x = Math.round(local2.x + this._diagram.stage.stageWidth - this._diagramHorizontalMargin - this.graph.width);
}
if(this._diagramAlign == StageAlign.TOP_LEFT || this._diagramAlign == StageAlign.TOP || this._diagramAlign == StageAlign.TOP_RIGHT) {
this._diagram.y = Math.round(local2.y + this._diagramVerticalMargin);
}
if(this._diagramAlign == StageAlign.LEFT || this._diagramAlign == StageAlign.RIGHT) {
this._diagram.y = Math.round(local2.y + this._diagram.stage.stageHeight / 2 - (this.graph.y + this.graph.height) / 2);
}
if(this._diagramAlign == StageAlign.BOTTOM_LEFT || this._diagramAlign == StageAlign.BOTTOM || this._diagramAlign == StageAlign.BOTTOM_RIGHT) {
this._diagram.y = Math.round(local2.y + this._diagram.stage.stageHeight - this._diagramVerticalMargin - this.graph.y - this.graph.height);
}
}
}
private function updateDiagram(param1:Event) : void {
var local2:Number = NaN;
var local3:int = 0;
var local4:String = null;
var local5:int = getTimer();
var local6:int = this._diagram.stage.frameRate;
if(++this.fpsUpdateCounter == this.fpsUpdatePeriod) {
local2 = 1000 * this.fpsUpdatePeriod / (local5 - this.previousPeriodTime);
if(local2 > local6) {
local2 = local6;
}
local3 = local2 * 100 % 100;
local4 = local3 >= 10 ? String(local3) : (local3 > 0 ? "0" + String(local3) : "00");
this.fpsTextField.text = int(local2) + "." + local4;
this.previousPeriodTime = local5;
this.fpsUpdateCounter = 0;
}
local2 = 1000 / (local5 - this.previousFrameTime);
if(local2 > local6) {
local2 = local6;
}
this.graph.bitmapData.scroll(1,0);
this.graph.bitmapData.fillRect(this.rect,553648127);
this.graph.bitmapData.setPixel32(0,40 * (1 - local2 / local6),4291611852);
this.previousFrameTime = local5;
if(++this.timerUpdateCounter == this.timerUpdatePeriod) {
if(this.timeCount > 0) {
local2 = this.timeSum / this.timeCount;
local3 = local2 * 100 % 100;
local4 = local3 >= 10 ? String(local3) : (local3 > 0 ? "0" + String(local3) : "00");
this.timerTextField.text = int(local2) + "." + local4;
} else {
this.timerTextField.text = "";
}
this.timerUpdateCounter = 0;
this.timeSum = 0;
this.timeCount = 0;
}
var local7:int = int(System.totalMemory);
local2 = local7 / 1048576;
local3 = local2 * 100 % 100;
local4 = local3 >= 10 ? String(local3) : (local3 > 0 ? "0" + String(local3) : "00");
this.memoryTextField.text = int(local2) + "." + local4;
if(local7 > this.maxMemory) {
this.maxMemory = local7;
}
this.graph.bitmapData.setPixel32(0,40 * (1 - local7 / this.maxMemory),4291611648);
this.drawsTextField.text = String(this.alternativa3d::numDraws);
this.polygonsTextField.text = String(this.alternativa3d::numPolygons);
this.trianglesTextField.text = String(this.alternativa3d::numTriangles);
}
private function bytesToString(param1:int) : String {
if(param1 < 1024) {
return param1 + "b";
}
if(param1 < 10240) {
return (param1 / 1024).toFixed(2) + "kb";
}
if(param1 < 102400) {
return (param1 / 1024).toFixed(1) + "kb";
}
if(param1 < 1048576) {
return (param1 >> 10) + "kb";
}
if(param1 < 10485760) {
return (param1 / 1048576).toFixed(2);
}
if(param1 < 104857600) {
return (param1 / 1048576).toFixed(1);
}
return String(param1 >> 20);
}
alternativa3d function deferredDestroy() : void {
var local2:Wrapper = null;
var local3:Wrapper = null;
var local1:Face = this.firstFace.alternativa3d::next;
while(local1 != null) {
local2 = local1.alternativa3d::wrapper;
if(local2 != null) {
local3 = null;
while(local2 != null) {
local2.alternativa3d::vertex = null;
local3 = local2;
local2 = local2.alternativa3d::next;
}
this.alternativa3d::lastWrapper.alternativa3d::next = local1.alternativa3d::wrapper;
this.alternativa3d::lastWrapper = local3;
}
local1.material = null;
local1.alternativa3d::wrapper = null;
local1 = local1.alternativa3d::next;
}
if(this.firstFace != this.alternativa3d::lastFace) {
this.alternativa3d::lastFace.alternativa3d::next = Face.alternativa3d::collector;
Face.alternativa3d::collector = this.firstFace.alternativa3d::next;
this.firstFace.alternativa3d::next = null;
this.alternativa3d::lastFace = this.firstFace;
}
if(this.firstWrapper != this.alternativa3d::lastWrapper) {
this.alternativa3d::lastWrapper.alternativa3d::next = Wrapper.alternativa3d::collector;
Wrapper.alternativa3d::collector = this.firstWrapper.alternativa3d::next;
this.firstWrapper.alternativa3d::next = null;
this.alternativa3d::lastWrapper = this.firstWrapper;
}
if(this.firstVertex != this.alternativa3d::lastVertex) {
this.alternativa3d::lastVertex.alternativa3d::next = Vertex.alternativa3d::collector;
Vertex.alternativa3d::collector = this.firstVertex.alternativa3d::next;
this.firstVertex.alternativa3d::next = null;
this.alternativa3d::lastVertex = this.firstVertex;
}
}
alternativa3d function clearOccluders() : void {
var local2:Vertex = null;
var local3:Vertex = null;
var local1:int = 0;
while(local1 < this.alternativa3d::numOccluders) {
local2 = this.alternativa3d::occluders[local1];
local3 = local2;
while(local3.alternativa3d::next != null) {
local3 = local3.alternativa3d::next;
}
local3.alternativa3d::next = Vertex.alternativa3d::collector;
Vertex.alternativa3d::collector = local2;
this.alternativa3d::occluders[local1] = null;
local1++;
}
this.alternativa3d::numOccluders = 0;
}
alternativa3d function sortByAverageZ(param1:Face) : Face {
var local2:int = 0;
var local3:Number = NaN;
var local4:Wrapper = null;
var local5:Face = param1;
var local6:Face = param1.alternativa3d::processNext;
while(local6 != null && local6.alternativa3d::processNext != null) {
param1 = param1.alternativa3d::processNext;
local6 = local6.alternativa3d::processNext.alternativa3d::processNext;
}
local6 = param1.alternativa3d::processNext;
param1.alternativa3d::processNext = null;
if(local5.alternativa3d::processNext != null) {
local5 = this.alternativa3d::sortByAverageZ(local5);
} else {
local2 = 0;
local3 = 0;
local4 = local5.alternativa3d::wrapper;
while(local4 != null) {
local2++;
local3 += local4.alternativa3d::vertex.alternativa3d::cameraZ;
local4 = local4.alternativa3d::next;
}
local5.alternativa3d::distance = local3 / local2;
}
if(local6.alternativa3d::processNext != null) {
local6 = this.alternativa3d::sortByAverageZ(local6);
} else {
local2 = 0;
local3 = 0;
local4 = local6.alternativa3d::wrapper;
while(local4 != null) {
local2++;
local3 += local4.alternativa3d::vertex.alternativa3d::cameraZ;
local4 = local4.alternativa3d::next;
}
local6.alternativa3d::distance = local3 / local2;
}
var local7:Boolean = local5.alternativa3d::distance > local6.alternativa3d::distance;
if(local7) {
param1 = local5;
local5 = local5.alternativa3d::processNext;
} else {
param1 = local6;
local6 = local6.alternativa3d::processNext;
}
var local8:Face = param1;
while(true) {
if(local5 == null) {
local8.alternativa3d::processNext = local6;
return param1;
}
if(local6 == null) {
local8.alternativa3d::processNext = local5;
return param1;
}
if(local7) {
if(local5.alternativa3d::distance > local6.alternativa3d::distance) {
local8 = local5;
local5 = local5.alternativa3d::processNext;
} else {
local8.alternativa3d::processNext = local6;
local8 = local6;
local6 = local6.alternativa3d::processNext;
local7 = false;
}
} else if(local6.alternativa3d::distance > local5.alternativa3d::distance) {
local8 = local6;
local6 = local6.alternativa3d::processNext;
} else {
local8.alternativa3d::processNext = local5;
local8 = local5;
local5 = local5.alternativa3d::processNext;
local7 = true;
}
}
return null;
}
alternativa3d function sortByDynamicBSP(param1:Face, param2:Number, param3:Face = null) : Face {
var local4:Wrapper = null;
var local5:Vertex = null;
var local6:Vertex = null;
var local7:Vertex = null;
var local8:Vertex = null;
var local23:Face = null;
var local24:Face = null;
var local26:Face = null;
var local27:Face = null;
var local28:Face = null;
var local30:Number = NaN;
var local31:Number = NaN;
var local32:Number = NaN;
var local33:Number = NaN;
var local34:Number = NaN;
var local35:Number = NaN;
var local36:Number = NaN;
var local37:Number = NaN;
var local38:Number = NaN;
var local39:Number = NaN;
var local40:Boolean = false;
var local41:Boolean = false;
var local42:Number = NaN;
var local43:Face = null;
var local44:Face = null;
var local45:Wrapper = null;
var local46:Wrapper = null;
var local47:Wrapper = null;
var local48:Boolean = false;
var local49:Number = NaN;
var local9:Face = param1;
param1 = local9.alternativa3d::processNext;
local4 = local9.alternativa3d::wrapper;
local5 = local4.alternativa3d::vertex;
local4 = local4.alternativa3d::next;
local6 = local4.alternativa3d::vertex;
var local10:Number = Number(local5.alternativa3d::cameraX);
var local11:Number = Number(local5.alternativa3d::cameraY);
var local12:Number = Number(local5.alternativa3d::cameraZ);
var local13:Number = local6.alternativa3d::cameraX - local10;
var local14:Number = local6.alternativa3d::cameraY - local11;
var local15:Number = local6.alternativa3d::cameraZ - local12;
var local16:Number = 0;
var local17:Number = 0;
var local18:Number = 1;
var local19:Number = local12;
var local20:Number = 0;
local4 = local4.alternativa3d::next;
while(local4 != null) {
local8 = local4.alternativa3d::vertex;
local30 = local8.alternativa3d::cameraX - local10;
local31 = local8.alternativa3d::cameraY - local11;
local32 = local8.alternativa3d::cameraZ - local12;
local33 = local32 * local14 - local31 * local15;
local34 = local30 * local15 - local32 * local13;
local35 = local31 * local13 - local30 * local14;
local36 = local33 * local33 + local34 * local34 + local35 * local35;
if(local36 > param2) {
local36 = 1 / Math.sqrt(local36);
local16 = local33 * local36;
local17 = local34 * local36;
local18 = local35 * local36;
local19 = local10 * local16 + local11 * local17 + local12 * local18;
break;
}
if(local36 > local20) {
local36 = 1 / Math.sqrt(local36);
local16 = local33 * local36;
local17 = local34 * local36;
local18 = local35 * local36;
local19 = local10 * local16 + local11 * local17 + local12 * local18;
local20 = local36;
}
local4 = local4.alternativa3d::next;
}
var local21:Number = local19 - param2;
var local22:Number = local19 + param2;
var local25:Face = local9;
var local29:Face = param1;
while(local29 != null) {
local28 = local29.alternativa3d::processNext;
local4 = local29.alternativa3d::wrapper;
local5 = local4.alternativa3d::vertex;
local4 = local4.alternativa3d::next;
local6 = local4.alternativa3d::vertex;
local4 = local4.alternativa3d::next;
local7 = local4.alternativa3d::vertex;
local4 = local4.alternativa3d::next;
local37 = local5.alternativa3d::cameraX * local16 + local5.alternativa3d::cameraY * local17 + local5.alternativa3d::cameraZ * local18;
local38 = local6.alternativa3d::cameraX * local16 + local6.alternativa3d::cameraY * local17 + local6.alternativa3d::cameraZ * local18;
local39 = local7.alternativa3d::cameraX * local16 + local7.alternativa3d::cameraY * local17 + local7.alternativa3d::cameraZ * local18;
local40 = local37 < local21 || local38 < local21 || local39 < local21;
local41 = local37 > local22 || local38 > local22 || local39 > local22;
while(local4 != null) {
local8 = local4.alternativa3d::vertex;
local42 = local8.alternativa3d::cameraX * local16 + local8.alternativa3d::cameraY * local17 + local8.alternativa3d::cameraZ * local18;
if(local42 < local21) {
local40 = true;
} else if(local42 > local22) {
local41 = true;
}
local8.alternativa3d::offset = local42;
local4 = local4.alternativa3d::next;
}
if(!local40) {
if(!local41) {
local25.alternativa3d::processNext = local29;
local25 = local29;
} else {
if(local26 != null) {
local27.alternativa3d::processNext = local29;
} else {
local26 = local29;
}
local27 = local29;
}
} else if(!local41) {
if(local23 != null) {
local24.alternativa3d::processNext = local29;
} else {
local23 = local29;
}
local24 = local29;
} else {
local5.alternativa3d::offset = local37;
local6.alternativa3d::offset = local38;
local7.alternativa3d::offset = local39;
local43 = local29.alternativa3d::create();
local43.material = local29.material;
this.alternativa3d::lastFace.alternativa3d::next = local43;
this.alternativa3d::lastFace = local43;
local44 = local29.alternativa3d::create();
local44.material = local29.material;
this.alternativa3d::lastFace.alternativa3d::next = local44;
this.alternativa3d::lastFace = local44;
local45 = null;
local46 = null;
local4 = local29.alternativa3d::wrapper.alternativa3d::next.alternativa3d::next;
while(local4.alternativa3d::next != null) {
local4 = local4.alternativa3d::next;
}
local5 = local4.alternativa3d::vertex;
local37 = Number(local5.alternativa3d::offset);
local48 = local29.material != null && Boolean(local29.material.alternativa3d::useVerticesNormals);
local4 = local29.alternativa3d::wrapper;
while(local4 != null) {
local6 = local4.alternativa3d::vertex;
local38 = Number(local6.alternativa3d::offset);
if(local37 < local21 && local38 > local22 || local37 > local22 && local38 < local21) {
local49 = (local19 - local37) / (local38 - local37);
local8 = local6.alternativa3d::create();
this.alternativa3d::lastVertex.alternativa3d::next = local8;
this.alternativa3d::lastVertex = local8;
local8.alternativa3d::cameraX = local5.alternativa3d::cameraX + (local6.alternativa3d::cameraX - local5.alternativa3d::cameraX) * local49;
local8.alternativa3d::cameraY = local5.alternativa3d::cameraY + (local6.alternativa3d::cameraY - local5.alternativa3d::cameraY) * local49;
local8.alternativa3d::cameraZ = local5.alternativa3d::cameraZ + (local6.alternativa3d::cameraZ - local5.alternativa3d::cameraZ) * local49;
local8.u = local5.u + (local6.u - local5.u) * local49;
local8.v = local5.v + (local6.v - local5.v) * local49;
if(local48) {
local8.x = local5.x + (local6.x - local5.x) * local49;
local8.y = local5.y + (local6.y - local5.y) * local49;
local8.z = local5.z + (local6.z - local5.z) * local49;
local8.normalX = local5.normalX + (local6.normalX - local5.normalX) * local49;
local8.normalY = local5.normalY + (local6.normalY - local5.normalY) * local49;
local8.normalZ = local5.normalZ + (local6.normalZ - local5.normalZ) * local49;
}
local47 = local4.alternativa3d::create();
local47.alternativa3d::vertex = local8;
if(local45 != null) {
local45.alternativa3d::next = local47;
} else {
local43.alternativa3d::wrapper = local47;
}
local45 = local47;
local47 = local4.alternativa3d::create();
local47.alternativa3d::vertex = local8;
if(local46 != null) {
local46.alternativa3d::next = local47;
} else {
local44.alternativa3d::wrapper = local47;
}
local46 = local47;
}
if(local38 <= local22) {
local47 = local4.alternativa3d::create();
local47.alternativa3d::vertex = local6;
if(local45 != null) {
local45.alternativa3d::next = local47;
} else {
local43.alternativa3d::wrapper = local47;
}
local45 = local47;
}
if(local38 >= local21) {
local47 = local4.alternativa3d::create();
local47.alternativa3d::vertex = local6;
if(local46 != null) {
local46.alternativa3d::next = local47;
} else {
local44.alternativa3d::wrapper = local47;
}
local46 = local47;
}
local5 = local6;
local37 = local38;
local4 = local4.alternativa3d::next;
}
if(local23 != null) {
local24.alternativa3d::processNext = local43;
} else {
local23 = local43;
}
local24 = local43;
if(local26 != null) {
local27.alternativa3d::processNext = local44;
} else {
local26 = local44;
}
local27 = local44;
local29.alternativa3d::processNext = null;
}
local29 = local28;
}
if(local26 != null) {
local27.alternativa3d::processNext = null;
if(local26.alternativa3d::processNext != null) {
param3 = this.alternativa3d::sortByDynamicBSP(local26,param2,param3);
} else {
local26.alternativa3d::processNext = param3;
param3 = local26;
}
}
local25.alternativa3d::processNext = param3;
param3 = local9;
if(local23 != null) {
local24.alternativa3d::processNext = null;
if(local23.alternativa3d::processNext != null) {
param3 = this.alternativa3d::sortByDynamicBSP(local23,param2,param3);
} else {
local23.alternativa3d::processNext = param3;
param3 = local23;
}
}
return param3;
}
alternativa3d function cull(param1:Face, param2:int) : Face {
var local3:Face = null;
var local4:Face = null;
var local5:Face = null;
var local6:Vertex = null;
var local7:Vertex = null;
var local8:Vertex = null;
var local9:Wrapper = null;
var local10:Vertex = null;
var local11:Wrapper = null;
var local12:Number = NaN;
var local13:Number = NaN;
var local14:Number = NaN;
var local15:Number = NaN;
var local16:Number = NaN;
var local17:Number = NaN;
var local18:Number = NaN;
var local19:Number = NaN;
var local20:Number = NaN;
var local21:Boolean = (param2 & 1) > 0;
var local22:Boolean = (param2 & 2) > 0;
var local23:Boolean = (param2 & 4) > 0;
var local24:Boolean = (param2 & 8) > 0;
var local25:Boolean = (param2 & 0x10) > 0;
var local26:Boolean = (param2 & 0x20) > 0;
var local27:Number = this.nearClipping;
var local28:Number = this.farClipping;
var local29:Boolean = local23 || local24;
var local30:Boolean = local25 || local26;
var local31:Face = param1;
for(; local31 != null; local31 = local5) {
local5 = local31.alternativa3d::processNext;
local9 = local31.alternativa3d::wrapper;
local6 = local9.alternativa3d::vertex;
local9 = local9.alternativa3d::next;
local7 = local9.alternativa3d::vertex;
local9 = local9.alternativa3d::next;
local8 = local9.alternativa3d::vertex;
local9 = local9.alternativa3d::next;
if(local29) {
local12 = Number(local6.alternativa3d::cameraX);
local15 = Number(local7.alternativa3d::cameraX);
local18 = Number(local8.alternativa3d::cameraX);
}
if(local30) {
local13 = Number(local6.alternativa3d::cameraY);
local16 = Number(local7.alternativa3d::cameraY);
local19 = Number(local8.alternativa3d::cameraY);
}
local14 = Number(local6.alternativa3d::cameraZ);
local17 = Number(local7.alternativa3d::cameraZ);
local20 = Number(local8.alternativa3d::cameraZ);
if(local21) {
if(local14 <= local27 || local17 <= local27 || local20 <= local27) {
local31.alternativa3d::processNext = null;
continue;
}
local11 = local9;
while(local11 != null) {
if(local11.alternativa3d::vertex.alternativa3d::cameraZ <= local27) {
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 != null) {
local31.alternativa3d::processNext = null;
continue;
}
}
if(local22 && local14 >= local28 && local17 >= local28 && local20 >= local28) {
local11 = local9;
while(local11 != null) {
if(local11.alternativa3d::vertex.alternativa3d::cameraZ < local28) {
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local31.alternativa3d::processNext = null;
continue;
}
}
if(local23 && local14 <= -local12 && local17 <= -local15 && local20 <= -local18) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(-local10.alternativa3d::cameraX < local10.alternativa3d::cameraZ) {
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local31.alternativa3d::processNext = null;
continue;
}
}
if(local24 && local14 <= local12 && local17 <= local15 && local20 <= local18) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(local10.alternativa3d::cameraX < local10.alternativa3d::cameraZ) {
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local31.alternativa3d::processNext = null;
continue;
}
}
if(local25 && local14 <= -local13 && local17 <= -local16 && local20 <= -local19) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(-local10.alternativa3d::cameraY < local10.alternativa3d::cameraZ) {
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local31.alternativa3d::processNext = null;
continue;
}
}
if(local26 && local14 <= local13 && local17 <= local16 && local20 <= local19) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(local10.alternativa3d::cameraY < local10.alternativa3d::cameraZ) {
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local31.alternativa3d::processNext = null;
continue;
}
}
if(local3 != null) {
local4.alternativa3d::processNext = local31;
} else {
local3 = local31;
}
local4 = local31;
}
if(local4 != null) {
local4.alternativa3d::processNext = null;
}
return local3;
}
alternativa3d function clip(param1:Face, param2:int) : Face {
var local3:Face = null;
var local4:Face = null;
var local5:Face = null;
var local6:Vertex = null;
var local7:Vertex = null;
var local8:Vertex = null;
var local9:Wrapper = null;
var local10:Vertex = null;
var local11:Wrapper = null;
var local12:Wrapper = null;
var local13:Wrapper = null;
var local14:Wrapper = null;
var local15:Wrapper = null;
var local16:Number = NaN;
var local17:Number = NaN;
var local18:Number = NaN;
var local19:Number = NaN;
var local20:Number = NaN;
var local21:Number = NaN;
var local22:Number = NaN;
var local23:Number = NaN;
var local24:Number = NaN;
var local35:int = 0;
var local36:Number = NaN;
var local38:Boolean = false;
var local39:Face = null;
var local25:Boolean = (param2 & 1) > 0;
var local26:Boolean = (param2 & 2) > 0;
var local27:Boolean = (param2 & 4) > 0;
var local28:Boolean = (param2 & 8) > 0;
var local29:Boolean = (param2 & 0x10) > 0;
var local30:Boolean = (param2 & 0x20) > 0;
var local31:Number = this.nearClipping;
var local32:Number = this.farClipping;
var local33:Boolean = local27 || local28;
var local34:Boolean = local29 || local30;
var local37:Face = param1;
for(; local37 != null; local37 = local5) {
local5 = local37.alternativa3d::processNext;
local9 = local37.alternativa3d::wrapper;
local6 = local9.alternativa3d::vertex;
local9 = local9.alternativa3d::next;
local7 = local9.alternativa3d::vertex;
local9 = local9.alternativa3d::next;
local8 = local9.alternativa3d::vertex;
local9 = local9.alternativa3d::next;
if(local33) {
local16 = Number(local6.alternativa3d::cameraX);
local19 = Number(local7.alternativa3d::cameraX);
local22 = Number(local8.alternativa3d::cameraX);
}
if(local34) {
local17 = Number(local6.alternativa3d::cameraY);
local20 = Number(local7.alternativa3d::cameraY);
local23 = Number(local8.alternativa3d::cameraY);
}
local18 = Number(local6.alternativa3d::cameraZ);
local21 = Number(local7.alternativa3d::cameraZ);
local24 = Number(local8.alternativa3d::cameraZ);
local35 = 0;
if(local25) {
if(local18 <= local31 && local21 <= local31 && local24 <= local31) {
local11 = local9;
while(local11 != null) {
if(local11.alternativa3d::vertex.alternativa3d::cameraZ > local31) {
local35 |= 1;
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local37.alternativa3d::processNext = null;
continue;
}
} else if(local18 > local31 && local21 > local31 && local24 > local31) {
local11 = local9;
while(local11 != null) {
if(local11.alternativa3d::vertex.alternativa3d::cameraZ <= local31) {
local35 |= 1;
break;
}
local11 = local11.alternativa3d::next;
}
} else {
local35 |= 1;
}
}
if(local26) {
if(local18 >= local32 && local21 >= local32 && local24 >= local32) {
local11 = local9;
while(local11 != null) {
if(local11.alternativa3d::vertex.alternativa3d::cameraZ < local32) {
local35 |= 2;
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local37.alternativa3d::processNext = null;
continue;
}
} else if(local18 < local32 && local21 < local32 && local24 < local32) {
local11 = local9;
while(local11 != null) {
if(local11.alternativa3d::vertex.alternativa3d::cameraZ >= local32) {
local35 |= 2;
break;
}
local11 = local11.alternativa3d::next;
}
} else {
local35 |= 2;
}
}
if(local27) {
if(local18 <= -local16 && local21 <= -local19 && local24 <= -local22) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(-local10.alternativa3d::cameraX < local10.alternativa3d::cameraZ) {
local35 |= 4;
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local37.alternativa3d::processNext = null;
continue;
}
} else if(local18 > -local16 && local21 > -local19 && local24 > -local22) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(-local10.alternativa3d::cameraX >= local10.alternativa3d::cameraZ) {
local35 |= 4;
break;
}
local11 = local11.alternativa3d::next;
}
} else {
local35 |= 4;
}
}
if(local28) {
if(local18 <= local16 && local21 <= local19 && local24 <= local22) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(local10.alternativa3d::cameraX < local10.alternativa3d::cameraZ) {
local35 |= 8;
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local37.alternativa3d::processNext = null;
continue;
}
} else if(local18 > local16 && local21 > local19 && local24 > local22) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(local10.alternativa3d::cameraX >= local10.alternativa3d::cameraZ) {
local35 |= 8;
break;
}
local11 = local11.alternativa3d::next;
}
} else {
local35 |= 8;
}
}
if(local29) {
if(local18 <= -local17 && local21 <= -local20 && local24 <= -local23) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(-local10.alternativa3d::cameraY < local10.alternativa3d::cameraZ) {
local35 |= 16;
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local37.alternativa3d::processNext = null;
continue;
}
} else if(local18 > -local17 && local21 > -local20 && local24 > -local23) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(-local10.alternativa3d::cameraY >= local10.alternativa3d::cameraZ) {
local35 |= 16;
break;
}
local11 = local11.alternativa3d::next;
}
} else {
local35 |= 16;
}
}
if(local30) {
if(local18 <= local17 && local21 <= local20 && local24 <= local23) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(local10.alternativa3d::cameraY < local10.alternativa3d::cameraZ) {
local35 |= 32;
break;
}
local11 = local11.alternativa3d::next;
}
if(local11 == null) {
local37.alternativa3d::processNext = null;
continue;
}
} else if(local18 > local17 && local21 > local20 && local24 > local23) {
local11 = local9;
while(local11 != null) {
local10 = local11.alternativa3d::vertex;
if(local10.alternativa3d::cameraY >= local10.alternativa3d::cameraZ) {
local35 |= 32;
break;
}
local11 = local11.alternativa3d::next;
}
} else {
local35 |= 32;
}
}
if(local35 > 0) {
local38 = local37.material != null && Boolean(local37.material.alternativa3d::useVerticesNormals);
local12 = null;
local13 = null;
local11 = local37.alternativa3d::wrapper;
while(local11 != null) {
local15 = local11.alternativa3d::create();
local15.alternativa3d::vertex = local11.alternativa3d::vertex;
if(local12 != null) {
local13.alternativa3d::next = local15;
} else {
local12 = local15;
}
local13 = local15;
local11 = local11.alternativa3d::next;
}
if(Boolean(local35 & 1)) {
local6 = local13.alternativa3d::vertex;
local18 = Number(local6.alternativa3d::cameraZ);
local11 = local12;
local12 = null;
local13 = null;
while(local11 != null) {
local14 = local11.alternativa3d::next;
local7 = local11.alternativa3d::vertex;
local21 = Number(local7.alternativa3d::cameraZ);
if(local21 > local31 && local18 <= local31 || local21 <= local31 && local18 > local31) {
local36 = (local31 - local18) / (local21 - local18);
local10 = local7.alternativa3d::create();
this.alternativa3d::lastVertex.alternativa3d::next = local10;
this.alternativa3d::lastVertex = local10;
local10.alternativa3d::cameraX = local6.alternativa3d::cameraX + (local7.alternativa3d::cameraX - local6.alternativa3d::cameraX) * local36;
local10.alternativa3d::cameraY = local6.alternativa3d::cameraY + (local7.alternativa3d::cameraY - local6.alternativa3d::cameraY) * local36;
local10.alternativa3d::cameraZ = local18 + (local21 - local18) * local36;
local10.x = local6.x + (local7.x - local6.x) * local36;
local10.y = local6.y + (local7.y - local6.y) * local36;
local10.z = local6.z + (local7.z - local6.z) * local36;
local10.u = local6.u + (local7.u - local6.u) * local36;
local10.v = local6.v + (local7.v - local6.v) * local36;
if(local38) {
local10.normalX = local6.normalX + (local7.normalX - local6.normalX) * local36;
local10.normalY = local6.normalY + (local7.normalY - local6.normalY) * local36;
local10.normalZ = local6.normalZ + (local7.normalZ - local6.normalZ) * local36;
}
local15 = local11.alternativa3d::create();
local15.alternativa3d::vertex = local10;
if(local12 != null) {
local13.alternativa3d::next = local15;
} else {
local12 = local15;
}
local13 = local15;
}
if(local21 > local31) {
if(local12 != null) {
local13.alternativa3d::next = local11;
} else {
local12 = local11;
}
local13 = local11;
local11.alternativa3d::next = null;
} else {
local11.alternativa3d::vertex = null;
local11.alternativa3d::next = Wrapper.alternativa3d::collector;
Wrapper.alternativa3d::collector = local11;
}
local6 = local7;
local18 = local21;
local11 = local14;
}
if(local12 == null) {
local37.alternativa3d::processNext = null;
continue;
}
}
if(Boolean(local35 & 2)) {
local6 = local13.alternativa3d::vertex;
local18 = Number(local6.alternativa3d::cameraZ);
local11 = local12;
local12 = null;
local13 = null;
while(local11 != null) {
local14 = local11.alternativa3d::next;
local7 = local11.alternativa3d::vertex;
local21 = Number(local7.alternativa3d::cameraZ);
if(local21 < local32 && local18 >= local32 || local21 >= local32 && local18 < local32) {
local36 = (local32 - local18) / (local21 - local18);
local10 = local7.alternativa3d::create();
this.alternativa3d::lastVertex.alternativa3d::next = local10;
this.alternativa3d::lastVertex = local10;
local10.alternativa3d::cameraX = local6.alternativa3d::cameraX + (local7.alternativa3d::cameraX - local6.alternativa3d::cameraX) * local36;
local10.alternativa3d::cameraY = local6.alternativa3d::cameraY + (local7.alternativa3d::cameraY - local6.alternativa3d::cameraY) * local36;
local10.alternativa3d::cameraZ = local18 + (local21 - local18) * local36;
local10.x = local6.x + (local7.x - local6.x) * local36;
local10.y = local6.y + (local7.y - local6.y) * local36;
local10.z = local6.z + (local7.z - local6.z) * local36;
local10.u = local6.u + (local7.u - local6.u) * local36;
local10.v = local6.v + (local7.v - local6.v) * local36;
if(local38) {
local10.normalX = local6.normalX + (local7.normalX - local6.normalX) * local36;
local10.normalY = local6.normalY + (local7.normalY - local6.normalY) * local36;
local10.normalZ = local6.normalZ + (local7.normalZ - local6.normalZ) * local36;
}
local15 = local11.alternativa3d::create();
local15.alternativa3d::vertex = local10;
if(local12 != null) {
local13.alternativa3d::next = local15;
} else {
local12 = local15;
}
local13 = local15;
}
if(local21 < local32) {
if(local12 != null) {
local13.alternativa3d::next = local11;
} else {
local12 = local11;
}
local13 = local11;
local11.alternativa3d::next = null;
} else {
local11.alternativa3d::vertex = null;
local11.alternativa3d::next = Wrapper.alternativa3d::collector;
Wrapper.alternativa3d::collector = local11;
}
local6 = local7;
local18 = local21;
local11 = local14;
}
if(local12 == null) {
local37.alternativa3d::processNext = null;
continue;
}
}
if(Boolean(local35 & 4)) {
local6 = local13.alternativa3d::vertex;
local16 = Number(local6.alternativa3d::cameraX);
local18 = Number(local6.alternativa3d::cameraZ);
local11 = local12;
local12 = null;
local13 = null;
while(local11 != null) {
local14 = local11.alternativa3d::next;
local7 = local11.alternativa3d::vertex;
local19 = Number(local7.alternativa3d::cameraX);
local21 = Number(local7.alternativa3d::cameraZ);
if(local21 > -local19 && local18 <= -local16 || local21 <= -local19 && local18 > -local16) {
local36 = (local16 + local18) / (local16 + local18 - local19 - local21);
local10 = local7.alternativa3d::create();
this.alternativa3d::lastVertex.alternativa3d::next = local10;
this.alternativa3d::lastVertex = local10;
local10.alternativa3d::cameraX = local16 + (local19 - local16) * local36;
local10.alternativa3d::cameraY = local6.alternativa3d::cameraY + (local7.alternativa3d::cameraY - local6.alternativa3d::cameraY) * local36;
local10.alternativa3d::cameraZ = local18 + (local21 - local18) * local36;
local10.x = local6.x + (local7.x - local6.x) * local36;
local10.y = local6.y + (local7.y - local6.y) * local36;
local10.z = local6.z + (local7.z - local6.z) * local36;
local10.u = local6.u + (local7.u - local6.u) * local36;
local10.v = local6.v + (local7.v - local6.v) * local36;
if(local38) {
local10.normalX = local6.normalX + (local7.normalX - local6.normalX) * local36;
local10.normalY = local6.normalY + (local7.normalY - local6.normalY) * local36;
local10.normalZ = local6.normalZ + (local7.normalZ - local6.normalZ) * local36;
}
local15 = local11.alternativa3d::create();
local15.alternativa3d::vertex = local10;
if(local12 != null) {
local13.alternativa3d::next = local15;
} else {
local12 = local15;
}
local13 = local15;
}
if(local21 > -local19) {
if(local12 != null) {
local13.alternativa3d::next = local11;
} else {
local12 = local11;
}
local13 = local11;
local11.alternativa3d::next = null;
} else {
local11.alternativa3d::vertex = null;
local11.alternativa3d::next = Wrapper.alternativa3d::collector;
Wrapper.alternativa3d::collector = local11;
}
local6 = local7;
local16 = local19;
local18 = local21;
local11 = local14;
}
if(local12 == null) {
local37.alternativa3d::processNext = null;
continue;
}
}
if(Boolean(local35 & 8)) {
local6 = local13.alternativa3d::vertex;
local16 = Number(local6.alternativa3d::cameraX);
local18 = Number(local6.alternativa3d::cameraZ);
local11 = local12;
local12 = null;
local13 = null;
while(local11 != null) {
local14 = local11.alternativa3d::next;
local7 = local11.alternativa3d::vertex;
local19 = Number(local7.alternativa3d::cameraX);
local21 = Number(local7.alternativa3d::cameraZ);
if(local21 > local19 && local18 <= local16 || local21 <= local19 && local18 > local16) {
local36 = (local18 - local16) / (local18 - local16 + local19 - local21);
local10 = local7.alternativa3d::create();
this.alternativa3d::lastVertex.alternativa3d::next = local10;
this.alternativa3d::lastVertex = local10;
local10.alternativa3d::cameraX = local16 + (local19 - local16) * local36;
local10.alternativa3d::cameraY = local6.alternativa3d::cameraY + (local7.alternativa3d::cameraY - local6.alternativa3d::cameraY) * local36;
local10.alternativa3d::cameraZ = local18 + (local21 - local18) * local36;
local10.x = local6.x + (local7.x - local6.x) * local36;
local10.y = local6.y + (local7.y - local6.y) * local36;
local10.z = local6.z + (local7.z - local6.z) * local36;
local10.u = local6.u + (local7.u - local6.u) * local36;
local10.v = local6.v + (local7.v - local6.v) * local36;
if(local38) {
local10.normalX = local6.normalX + (local7.normalX - local6.normalX) * local36;
local10.normalY = local6.normalY + (local7.normalY - local6.normalY) * local36;
local10.normalZ = local6.normalZ + (local7.normalZ - local6.normalZ) * local36;
}
local15 = local11.alternativa3d::create();
local15.alternativa3d::vertex = local10;
if(local12 != null) {
local13.alternativa3d::next = local15;
} else {
local12 = local15;
}
local13 = local15;
}
if(local21 > local19) {
if(local12 != null) {
local13.alternativa3d::next = local11;
} else {
local12 = local11;
}
local13 = local11;
local11.alternativa3d::next = null;
} else {
local11.alternativa3d::vertex = null;
local11.alternativa3d::next = Wrapper.alternativa3d::collector;
Wrapper.alternativa3d::collector = local11;
}
local6 = local7;
local16 = local19;
local18 = local21;
local11 = local14;
}
if(local12 == null) {
local37.alternativa3d::processNext = null;
continue;
}
}
if(Boolean(local35 & 0x10)) {
local6 = local13.alternativa3d::vertex;
local17 = Number(local6.alternativa3d::cameraY);
local18 = Number(local6.alternativa3d::cameraZ);
local11 = local12;
local12 = null;
local13 = null;
while(local11 != null) {
local14 = local11.alternativa3d::next;
local7 = local11.alternativa3d::vertex;
local20 = Number(local7.alternativa3d::cameraY);
local21 = Number(local7.alternativa3d::cameraZ);
if(local21 > -local20 && local18 <= -local17 || local21 <= -local20 && local18 > -local17) {
local36 = (local17 + local18) / (local17 + local18 - local20 - local21);
local10 = local7.alternativa3d::create();
this.alternativa3d::lastVertex.alternativa3d::next = local10;
this.alternativa3d::lastVertex = local10;
local10.alternativa3d::cameraX = local6.alternativa3d::cameraX + (local7.alternativa3d::cameraX - local6.alternativa3d::cameraX) * local36;
local10.alternativa3d::cameraY = local17 + (local20 - local17) * local36;
local10.alternativa3d::cameraZ = local18 + (local21 - local18) * local36;
local10.x = local6.x + (local7.x - local6.x) * local36;
local10.y = local6.y + (local7.y - local6.y) * local36;
local10.z = local6.z + (local7.z - local6.z) * local36;
local10.u = local6.u + (local7.u - local6.u) * local36;
local10.v = local6.v + (local7.v - local6.v) * local36;
if(local38) {
local10.normalX = local6.normalX + (local7.normalX - local6.normalX) * local36;
local10.normalY = local6.normalY + (local7.normalY - local6.normalY) * local36;
local10.normalZ = local6.normalZ + (local7.normalZ - local6.normalZ) * local36;
}
local15 = local11.alternativa3d::create();
local15.alternativa3d::vertex = local10;
if(local12 != null) {
local13.alternativa3d::next = local15;
} else {
local12 = local15;
}
local13 = local15;
}
if(local21 > -local20) {
if(local12 != null) {
local13.alternativa3d::next = local11;
} else {
local12 = local11;
}
local13 = local11;
local11.alternativa3d::next = null;
} else {
local11.alternativa3d::vertex = null;
local11.alternativa3d::next = Wrapper.alternativa3d::collector;
Wrapper.alternativa3d::collector = local11;
}
local6 = local7;
local17 = local20;
local18 = local21;
local11 = local14;
}
if(local12 == null) {
local37.alternativa3d::processNext = null;
continue;
}
}
if(Boolean(local35 & 0x20)) {
local6 = local13.alternativa3d::vertex;
local17 = Number(local6.alternativa3d::cameraY);
local18 = Number(local6.alternativa3d::cameraZ);
local11 = local12;
local12 = null;
local13 = null;
while(local11 != null) {
local14 = local11.alternativa3d::next;
local7 = local11.alternativa3d::vertex;
local20 = Number(local7.alternativa3d::cameraY);
local21 = Number(local7.alternativa3d::cameraZ);
if(local21 > local20 && local18 <= local17 || local21 <= local20 && local18 > local17) {
local36 = (local18 - local17) / (local18 - local17 + local20 - local21);
local10 = local7.alternativa3d::create();
this.alternativa3d::lastVertex.alternativa3d::next = local10;
this.alternativa3d::lastVertex = local10;
local10.alternativa3d::cameraX = local6.alternativa3d::cameraX + (local7.alternativa3d::cameraX - local6.alternativa3d::cameraX) * local36;
local10.alternativa3d::cameraY = local17 + (local20 - local17) * local36;
local10.alternativa3d::cameraZ = local18 + (local21 - local18) * local36;
local10.x = local6.x + (local7.x - local6.x) * local36;
local10.y = local6.y + (local7.y - local6.y) * local36;
local10.z = local6.z + (local7.z - local6.z) * local36;
local10.u = local6.u + (local7.u - local6.u) * local36;
local10.v = local6.v + (local7.v - local6.v) * local36;
if(local38) {
local10.normalX = local6.normalX + (local7.normalX - local6.normalX) * local36;
local10.normalY = local6.normalY + (local7.normalY - local6.normalY) * local36;
local10.normalZ = local6.normalZ + (local7.normalZ - local6.normalZ) * local36;
}
local15 = local11.alternativa3d::create();
local15.alternativa3d::vertex = local10;
if(local12 != null) {
local13.alternativa3d::next = local15;
} else {
local12 = local15;
}
local13 = local15;
}
if(local21 > local20) {
if(local12 != null) {
local13.alternativa3d::next = local11;
} else {
local12 = local11;
}
local13 = local11;
local11.alternativa3d::next = null;
} else {
local11.alternativa3d::vertex = null;
local11.alternativa3d::next = Wrapper.alternativa3d::collector;
Wrapper.alternativa3d::collector = local11;
}
local6 = local7;
local17 = local20;
local18 = local21;
local11 = local14;
}
if(local12 == null) {
local37.alternativa3d::processNext = null;
continue;
}
}
local37.alternativa3d::processNext = null;
local39 = local37.alternativa3d::create();
local39.material = local37.material;
this.alternativa3d::lastFace.alternativa3d::next = local39;
this.alternativa3d::lastFace = local39;
local39.alternativa3d::wrapper = local12;
local37 = local39;
}
if(local3 != null) {
local4.alternativa3d::processNext = local37;
} else {
local3 = local37;
}
local4 = local37;
}
if(local4 != null) {
local4.alternativa3d::processNext = null;
}
return local3;
}
}
}
|
package projects.tanks.client.tanksservices.model.notifier.rank {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class RankNotifierModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:RankNotifierModelServer;
private var client:IRankNotifierModelBase = IRankNotifierModelBase(this);
private var modelId:Long = Long.getLong(60229216,350352129);
private var _setRankId:Long = Long.getLong(1290751540,-2034560678);
private var _setRank_usersCodec:ICodec;
public function RankNotifierModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new RankNotifierModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(RankNotifierData,false)));
this._setRank_usersCodec = this._protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(RankNotifierData,false),false,1));
}
protected function getInitParam() : RankNotifierData {
return RankNotifierData(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._setRankId:
this.client.setRank(this._setRank_usersCodec.decode(param2) as Vector.<RankNotifierData>);
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package projects.tanks.client.clans.user.accepted {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.clans.container.ContainerCC;
public class ClanUserAcceptedModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ClanUserAcceptedModelServer;
private var client:IClanUserAcceptedModelBase = IClanUserAcceptedModelBase(this);
private var modelId:Long = Long.getLong(471234096,-1683897946);
private var _onAddingId:Long = Long.getLong(1264515209,-1616011663);
private var _onAdding_userIdCodec:ICodec;
private var _onRemovedId:Long = Long.getLong(545265830,-796542002);
private var _onRemoved_userIdCodec:ICodec;
public function ClanUserAcceptedModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ClanUserAcceptedModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(ContainerCC,false)));
this._onAdding_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
this._onRemoved_userIdCodec = this._protocol.getCodec(new TypeCodecInfo(Long,false));
}
protected function getInitParam() : ContainerCC {
return ContainerCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._onAddingId:
this.client.onAdding(Long(this._onAdding_userIdCodec.decode(param2)));
break;
case this._onRemovedId:
this.client.onRemoved(Long(this._onRemoved_userIdCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package controls.base {
import controls.Label;
import flash.display.Bitmap;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
public class TankBaseButton extends MovieClip {
private static const WIDTH:int = 90;
private static const Button:Class = TankBaseButton_Button;
private static const ButtonOver:Class = TankBaseButton_ButtonOver;
private static const ButtonDown:Class = TankBaseButton_ButtonDown;
private static const ButtonSelected:Class = TankBaseButton_ButtonSelected;
public var stateNORMAL:Bitmap = new Bitmap(Bitmap(new Button()).bitmapData);
public var stateOVER:Bitmap = new Bitmap(Bitmap(new ButtonOver()).bitmapData);
public var stateDOWN:Bitmap = new Bitmap(Bitmap(new ButtonDown()).bitmapData);
public var stateSELECTED:Bitmap = new Bitmap(Bitmap(new ButtonSelected()).bitmapData);
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;
protected var _icon:Bitmap;
private var _selected:Boolean;
private var iconX:int;
private var iconY:int;
public function TankBaseButton() {
super();
this.configUI();
this.enable = true;
tabEnabled = false;
}
protected function setIconCoords(param1:int, param2:int) : void {
this.iconX = param1;
this.iconY = param2;
this._icon.x = this.iconX;
this._icon.y = this.iconY;
}
protected function configUI() : void {
addChild(this.stateSELECTED);
addChild(this.stateDOWN);
addChild(this.stateOVER);
addChild(this.stateNORMAL);
addChild(this._icon);
addChild(this._label);
this._icon.x = 3;
this._icon.y = 2;
this.stateOVER.visible = false;
this.stateSELECTED.visible = false;
this.stateDOWN.visible = false;
this.stateNORMAL.visible = true;
}
public function set enable(param1:Boolean) : void {
this._enable = param1;
if(this._enable) {
this.enableButton();
} else {
this.disableButton();
}
}
public function get enable() : Boolean {
return this._enable;
}
private function enableButton() : void {
this.addListeners();
this.stateNORMAL.visible = true;
this.stateSELECTED.visible = false;
this.stateOVER.visible = false;
this.stateDOWN.visible = false;
}
private function disableButton() : void {
this.removeListeners();
this.stateSELECTED.visible = true;
this.stateOVER.visible = false;
this.stateDOWN.visible = false;
this.stateNORMAL.visible = false;
}
public function set short(param1:Boolean) : void {
this._short = param1;
this._label.visible = !this._short;
this._label.width = this._short ? 1 : 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 = 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 addListeners() : void {
buttonMode = true;
mouseEnabled = true;
mouseChildren = true;
addEventListener(MouseEvent.MOUSE_OVER,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_OUT,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseEvent);
addEventListener(MouseEvent.MOUSE_UP,this.onMouseEvent);
}
protected function removeListeners() : void {
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 {
this.stateOVER.visible = false;
this.stateSELECTED.visible = false;
this.stateDOWN.visible = false;
this.stateNORMAL.visible = false;
switch(param1.type) {
case MouseEvent.MOUSE_OVER:
this._label.y = 4;
this._icon.y = this.iconY;
this.stateOVER.visible = true;
break;
case MouseEvent.MOUSE_OUT:
this._label.y = 4;
this._icon.y = this.iconY;
this.stateNORMAL.visible = true;
break;
case MouseEvent.MOUSE_DOWN:
this._label.y = 5;
this._icon.y = this.iconY + 1;
this.stateDOWN.visible = true;
break;
case MouseEvent.MOUSE_UP:
this.stateNORMAL.visible = true;
this._label.y = 4;
this._icon.y = this.iconY;
}
}
public function get selected() : Boolean {
return this._selected;
}
public function set selected(param1:Boolean) : void {
this._selected = param1;
if(this.selected) {
this.stateSELECTED.visible = true;
this.stateOVER.visible = false;
this.stateDOWN.visible = false;
this.stateNORMAL.visible = false;
buttonMode = true;
mouseEnabled = true;
mouseChildren = true;
}
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.tankparts.sfx.shoot.ricochet {
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.sfx.shoot.ricochet.RicochetSFXCC;
public class VectorCodecRicochetSFXCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecRicochetSFXCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(RicochetSFXCC,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.<RicochetSFXCC> = new Vector.<RicochetSFXCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = RicochetSFXCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:RicochetSFXCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<RicochetSFXCC> = Vector.<RicochetSFXCC>(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.service.itempropertyparams {
import projects.tanks.client.commons.types.ItemGarageProperty;
public interface ItemPropertyParamsService {
function getParams(param1:ItemGarageProperty) : ItemPropertyParams;
}
}
|
package assets.button {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.button.button_def_ACTIVE_RIGHT.png")]
public dynamic class button_def_ACTIVE_RIGHT extends BitmapData {
public function button_def_ACTIVE_RIGHT(param1:int = 6, param2:int = 29) {
super(param1,param2);
}
}
}
|
package alternativa.types {
public class URL {
public var scheme:String;
public var host:String;
public var port:String;
public var path:String;
public var query:String;
public var fragment:String;
public function URL(param1:String, param2:Boolean = false) {
super();
var local3:int = int(param1.indexOf(":"));
this.scheme = param1.substring(0,local3);
if(param2) {
this.scheme = "http";
}
param1 = param1.substring(local3 + 3);
local3 = int(param1.indexOf("/"));
var local4:String = param1.substring(0,local3);
var local5:int = int(local4.indexOf(":"));
if(local5 < 0) {
this.host = local4;
} else {
this.host = local4.substring(0,local5);
this.port = local4.substring(local5 + 1);
}
param1 = param1.substring(local3);
var local6:int = int(param1.indexOf("?"));
var local7:int = int(param1.indexOf("#"));
if(local6 > -1) {
this.path = param1.substring(0,local6);
if(local7 > -1) {
this.query = param1.substring(local6 + 1,local7);
this.fragment = param1.substring(local7 + 1);
} else {
this.query = param1.substring(local6 + 1);
}
} else if(local7 > -1) {
this.path = param1.substring(0,local7);
this.fragment = param1.substring(local7 + 1);
} else {
this.path = param1;
}
}
public function getRoot() : String {
var local1:String = this.scheme + "://" + this.host;
if(this.port == null) {
return local1;
}
return local1 + ":" + this.port;
}
public function toString() : String {
return "scheme: " + this.scheme + "\n" + "host: " + this.host + "\n" + "port: " + this.port + "\n" + "path: " + this.path + "\n" + "query: " + this.query + "\n" + "fragment: " + this.fragment;
}
}
}
|
package alternativa.tanks.model.garage.upgradingitems {
import platform.client.fp10.core.type.IGameObject;
public interface UpgradingItem {
function select(param1:IGameObject) : void;
function itemUpgraded(param1:IGameObject) : void;
}
}
|
package alternativa.tanks.model.payment.shop.onetimepurchase {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ShopItemOneTimePurchaseAdapt implements ShopItemOneTimePurchase {
private var object:IGameObject;
private var impl:ShopItemOneTimePurchase;
public function ShopItemOneTimePurchaseAdapt(param1:IGameObject, param2:ShopItemOneTimePurchase) {
super();
this.object = param1;
this.impl = param2;
}
public function isOneTimePurchase() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.isOneTimePurchase());
}
finally {
Model.popObject();
}
return result;
}
public function isTriedToBuy() : Boolean {
var result:Boolean = false;
try {
Model.object = this.object;
result = Boolean(this.impl.isTriedToBuy());
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package projects.tanks.client.users.osgi {
import _codec.projects.tanks.client.users.model.friends.CodecFriendsCC;
import _codec.projects.tanks.client.users.model.friends.VectorCodecFriendsCCLevel1;
import _codec.projects.tanks.client.users.model.friends.container.CodecUserContainerCC;
import _codec.projects.tanks.client.users.model.friends.container.VectorCodecUserContainerCCLevel1;
import _codec.projects.tanks.client.users.model.switchbattleinvite.CodecNotificationEnabledCC;
import _codec.projects.tanks.client.users.model.switchbattleinvite.VectorCodecNotificationEnabledCCLevel1;
import _codec.projects.tanks.client.users.model.userbattlestatistics.rank.CodecRankBounds;
import _codec.projects.tanks.client.users.model.userbattlestatistics.rank.VectorCodecRankBoundsLevel1;
import _codec.projects.tanks.client.users.services.chatmoderator.CodecChatModeratorLevel;
import _codec.projects.tanks.client.users.services.chatmoderator.VectorCodecChatModeratorLevelLevel1;
import alternativa.osgi.OSGi;
import alternativa.osgi.bundle.IBundleActivator;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import platform.client.fp10.core.registry.ModelRegistry;
import projects.tanks.client.users.model.friends.FriendsCC;
import projects.tanks.client.users.model.friends.container.UserContainerCC;
import projects.tanks.client.users.model.switchbattleinvite.NotificationEnabledCC;
import projects.tanks.client.users.model.userbattlestatistics.rank.RankBounds;
import projects.tanks.client.users.services.chatmoderator.ChatModeratorLevel;
public class Activator implements IBundleActivator {
public static var osgi:OSGi;
public function Activator() {
super();
}
public function start(param1:OSGi) : void {
var local4:ICodec = null;
osgi = param1;
var local2:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local2.register(Long.getLong(1693173045,628784534),Long.getLong(608205693,1898592764));
local2.register(Long.getLong(1693173045,628784534),Long.getLong(370363039,338480872));
local2.register(Long.getLong(1693173045,628784534),Long.getLong(311681954,1684738000));
local2.register(Long.getLong(1693173045,628784534),Long.getLong(348947857,-1693710961));
local2.register(Long.getLong(1693173045,628784534),Long.getLong(444676649,1880663147));
local2.register(Long.getLong(1693173045,628784534),Long.getLong(910302409,-1168735433));
local2.register(Long.getLong(1693173045,628784534),Long.getLong(766260615,-36774901));
local2.register(Long.getLong(1696580544,685225790),Long.getLong(1466630272,-1977249165));
local2.register(Long.getLong(1696580544,685225790),Long.getLong(1779101803,-1074606030));
local2.register(Long.getLong(100897389,708983546),Long.getLong(203629091,-1595335121));
local2.register(Long.getLong(100897389,708983546),Long.getLong(2017534548,29039506));
local2.register(Long.getLong(1552139010,1361964288),Long.getLong(1433634624,1589914165));
local2.register(Long.getLong(1552139010,1361964288),Long.getLong(1493000398,-12480436));
local2.register(Long.getLong(1435596993,-649634714),Long.getLong(1727765184,1572488911));
local2.register(Long.getLong(1435596993,-649634714),Long.getLong(2021113166,-552663310));
var local3:IProtocol = IProtocol(osgi.getService(IProtocol));
local4 = new CodecFriendsCC();
local3.registerCodec(new TypeCodecInfo(FriendsCC,false),local4);
local3.registerCodec(new TypeCodecInfo(FriendsCC,true),new OptionalCodecDecorator(local4));
local4 = new CodecUserContainerCC();
local3.registerCodec(new TypeCodecInfo(UserContainerCC,false),local4);
local3.registerCodec(new TypeCodecInfo(UserContainerCC,true),new OptionalCodecDecorator(local4));
local4 = new CodecNotificationEnabledCC();
local3.registerCodec(new TypeCodecInfo(NotificationEnabledCC,false),local4);
local3.registerCodec(new TypeCodecInfo(NotificationEnabledCC,true),new OptionalCodecDecorator(local4));
local4 = new CodecRankBounds();
local3.registerCodec(new TypeCodecInfo(RankBounds,false),local4);
local3.registerCodec(new TypeCodecInfo(RankBounds,true),new OptionalCodecDecorator(local4));
local4 = new CodecChatModeratorLevel();
local3.registerCodec(new EnumCodecInfo(ChatModeratorLevel,false),local4);
local3.registerCodec(new EnumCodecInfo(ChatModeratorLevel,true),new OptionalCodecDecorator(local4));
local4 = new VectorCodecFriendsCCLevel1(false);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(FriendsCC,false),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(FriendsCC,false),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecFriendsCCLevel1(true);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(FriendsCC,true),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(FriendsCC,true),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecUserContainerCCLevel1(false);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserContainerCC,false),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserContainerCC,false),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecUserContainerCCLevel1(true);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserContainerCC,true),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(UserContainerCC,true),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecNotificationEnabledCCLevel1(false);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(NotificationEnabledCC,false),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(NotificationEnabledCC,false),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecNotificationEnabledCCLevel1(true);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(NotificationEnabledCC,true),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(NotificationEnabledCC,true),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecRankBoundsLevel1(false);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(RankBounds,false),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(RankBounds,false),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecRankBoundsLevel1(true);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(RankBounds,true),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new TypeCodecInfo(RankBounds,true),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecChatModeratorLevelLevel1(false);
local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(ChatModeratorLevel,false),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(ChatModeratorLevel,false),true,1),new OptionalCodecDecorator(local4));
local4 = new VectorCodecChatModeratorLevelLevel1(true);
local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(ChatModeratorLevel,true),false,1),local4);
local3.registerCodec(new CollectionCodecInfo(new EnumCodecInfo(ChatModeratorLevel,true),true,1),new OptionalCodecDecorator(local4));
}
public function stop(param1:OSGi) : void {
}
}
}
|
package controls.resultassets {
import assets.resultwindow.bres_HEADER_RED_PIXEL;
import assets.resultwindow.bres_HEADER_RED_TL;
import controls.statassets.StatLineBase;
public class ResultWindowRedHeader extends StatLineBase {
public function ResultWindowRedHeader() {
super();
tl = new bres_HEADER_RED_TL(1,1);
px = new bres_HEADER_RED_PIXEL(1,1);
}
}
}
|
package projects.tanks.clients.flash.commons.models.coloring {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.resource.types.MultiframeTextureResource;
import platform.client.fp10.core.resource.types.TextureResource;
import platform.client.fp10.core.type.IGameObject;
public class IColoringEvents implements IColoring {
private var object:IGameObject;
private var impl:Vector.<Object>;
public function IColoringEvents(param1:IGameObject, param2:Vector.<Object>) {
super();
this.object = param1;
this.impl = param2;
}
public function getColoring() : TextureResource {
var result:TextureResource = null;
var i:int = 0;
var m:IColoring = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IColoring(this.impl[i]);
result = m.getColoring();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function getAnimatedColoring() : MultiframeTextureResource {
var result:MultiframeTextureResource = null;
var i:int = 0;
var m:IColoring = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IColoring(this.impl[i]);
result = m.getAnimatedColoring();
i++;
}
}
finally {
Model.popObject();
}
return result;
}
public function isAnimated() : Boolean {
var result:Boolean = false;
var i:int = 0;
var m:IColoring = null;
try {
Model.object = this.object;
i = 0;
while(i < this.impl.length) {
m = IColoring(this.impl[i]);
result = Boolean(m.isAnimated());
i++;
}
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.gui.communication.tabs.chat {
import flash.events.EventDispatcher;
public class ChatTabView extends EventDispatcher implements IChatTabView {
private var chatTab:ChatTab;
public function ChatTabView() {
super();
}
public function getChatTab() : ChatTab {
return this.chatTab;
}
public function setChatTab(param1:ChatTab) : void {
this.chatTab = param1;
dispatchEvent(new ChatTabViewEvent(ChatTabViewEvent.CHAT_TAB_CREATED));
}
public function clear() : void {
this.chatTab = null;
}
}
}
|
package projects.tanks.client.panel.model.profile.usersettings {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.OptionalMap;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.EnumCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import flash.utils.ByteArray;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.network.command.SpaceCommand;
import platform.client.fp10.core.type.IGameObject;
import platform.client.fp10.core.type.ISpace;
import projects.tanks.client.chat.models.chat.users.personalmessagereceiver.PersonalMessageReceiveMode;
public class SettingsModelServer {
private var protocol:IProtocol;
private var protocolBuffer:ProtocolBuffer;
private var _setReceivePersonalMessagesId:Long = Long.getLong(1792558267,422618582);
private var _setReceivePersonalMessages_modeCodec:ICodec;
private var _showSettingsId:Long = Long.getLong(763612380,736380393);
private var _uploadClientSettingsId:Long = Long.getLong(1605739608,-2116633576);
private var _uploadClientSettings_settingsCodec:ICodec;
private var model:IModel;
public function SettingsModelServer(param1:IModel) {
super();
this.model = param1;
var local2:ByteArray = new ByteArray();
this.protocol = IProtocol(OSGi.getInstance().getService(IProtocol));
this.protocolBuffer = new ProtocolBuffer(local2,local2,new OptionalMap());
this._setReceivePersonalMessages_modeCodec = this.protocol.getCodec(new EnumCodecInfo(PersonalMessageReceiveMode,false));
this._uploadClientSettings_settingsCodec = this.protocol.getCodec(new TypeCodecInfo(ClientStoredSettings,false));
}
public function setReceivePersonalMessages(param1:PersonalMessageReceiveMode) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._setReceivePersonalMessages_modeCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._setReceivePersonalMessagesId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
public function showSettings() : 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._showSettingsId,this.protocolBuffer);
var local2:IGameObject = Model.object;
var local3:ISpace = local2.space;
local3.commandSender.sendCommand(local1);
this.protocolBuffer.optionalMap.clear();
}
public function uploadClientSettings(param1:ClientStoredSettings) : void {
ByteArray(this.protocolBuffer.writer).position = 0;
ByteArray(this.protocolBuffer.writer).length = 0;
this._uploadClientSettings_settingsCodec.encode(this.protocolBuffer,param1);
ByteArray(this.protocolBuffer.writer).position = 0;
if(Model.object == null) {
throw new Error("Execute method without model context.");
}
var local2:SpaceCommand = new SpaceCommand(Model.object.id,this._uploadClientSettingsId,this.protocolBuffer);
var local3:IGameObject = Model.object;
var local4:ISpace = local3.space;
local4.commandSender.sendCommand(local2);
this.protocolBuffer.optionalMap.clear();
}
}
}
|
package mx.core
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import mx.utils.NameUtil;
use namespace mx_internal;
public class FlexBitmap extends Bitmap
{
mx_internal static const VERSION:String = "4.6.0.23201";
public function FlexBitmap(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false)
{
super(bitmapData,pixelSnapping,smoothing);
try
{
name = NameUtil.createUniqueName(this);
}
catch(e:Error)
{
}
}
override public function toString() : String
{
return NameUtil.displayObjectToString(this);
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.cp.resources {
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.resources.DominationSounds;
public class VectorCodecDominationSoundsLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecDominationSoundsLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(DominationSounds,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.<DominationSounds> = new Vector.<DominationSounds>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = DominationSounds(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:DominationSounds = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<DominationSounds> = Vector.<DominationSounds>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.models.sfx.shoot.plasma
{
import alternativa.object.ClientObject;
public interface IPlasmaSFX
{
function getPlasmaSFXData(param1:ClientObject) : PlasmaSFXData;
}
}
|
package controls {
import controls.buttons.ButtonStates;
import controls.buttons.h50px.GreyBigButton;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.filters.DropShadowFilter;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
public class BigButton extends GreyBigButton {
protected var _info:Label = new Label();
protected var _icon:Bitmap = new Bitmap();
protected var _width:int = 100;
public function BigButton() {
super();
this.configUI();
enabled = true;
tabEnabled = false;
}
override public function set width(param1:Number) : void {
this._width = int(param1);
super.width = this._width;
this._info.width = this._width - 4;
if(this._icon.bitmapData != null) {
this._icon.x = this._width - this._icon.width - 6;
this._icon.y = int(25 - this._icon.height / 2);
_label.width = this._width - 4 - this._icon.width;
}
}
public function set info(param1:String) : void {
this._info.htmlText = param1;
}
public function setBigText() : void {
var local1:TextFormat = new TextFormat();
local1.size = 16;
_label.defaultTextFormat = local1;
_label.setTextFormat(local1);
labelPositionY = 14;
}
public function set icon(param1:BitmapData) : void {
if(param1 != null) {
this._icon.visible = true;
_label.width = this._width - 4 - this._icon.width;
} else {
_label.width = this._width - 4;
this._icon.visible = false;
}
this._icon.bitmapData = param1;
this.width = this._width;
}
private function configUI() : void {
addChild(this._icon);
this._info.align = TextFormatAlign.CENTER;
this._info.autoSize = TextFieldAutoSize.NONE;
this._info.selectable = false;
this._info.x = 2;
this._info.y = 24;
this._info.height = 20;
this._info.mouseEnabled = false;
this._info.filters = [new DropShadowFilter(1,45,0,0.7,1,1,1)];
this.width = 120;
}
override protected function onStateChanged() : void {
super.onStateChanged();
var local1:int = getState() == ButtonStates.DOWN ? 1 : 0;
this._info.y = 24 + local1;
this._icon.y = int(25 - this._icon.height / 2) + local1;
}
}
}
|
package _codec.projects.tanks.client.panel.model.quest.notifier {
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import projects.tanks.client.panel.model.quest.notifier.QuestNotifierCC;
public class CodecQuestNotifierCC implements ICodec {
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var codec_hasCompletedDailyQuests:ICodec;
private var codec_hasCompletedWeeklyQuests:ICodec;
private var codec_hasNewDailyQuests:ICodec;
private var codec_hasNewWeeklyQuests:ICodec;
private var codec_hasNotCompletedQuests:ICodec;
public function CodecQuestNotifierCC() {
super();
}
public function init(param1:IProtocol) : void {
this.codec_hasCompletedDailyQuests = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_hasCompletedWeeklyQuests = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_hasNewDailyQuests = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_hasNewWeeklyQuests = param1.getCodec(new TypeCodecInfo(Boolean,false));
this.codec_hasNotCompletedQuests = param1.getCodec(new TypeCodecInfo(Boolean,false));
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:QuestNotifierCC = new QuestNotifierCC();
local2.hasCompletedDailyQuests = this.codec_hasCompletedDailyQuests.decode(param1) as Boolean;
local2.hasCompletedWeeklyQuests = this.codec_hasCompletedWeeklyQuests.decode(param1) as Boolean;
local2.hasNewDailyQuests = this.codec_hasNewDailyQuests.decode(param1) as Boolean;
local2.hasNewWeeklyQuests = this.codec_hasNewWeeklyQuests.decode(param1) as Boolean;
local2.hasNotCompletedQuests = this.codec_hasNotCompletedQuests.decode(param1) as Boolean;
return local2;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:QuestNotifierCC = QuestNotifierCC(param2);
this.codec_hasCompletedDailyQuests.encode(param1,local3.hasCompletedDailyQuests);
this.codec_hasCompletedWeeklyQuests.encode(param1,local3.hasCompletedWeeklyQuests);
this.codec_hasNewDailyQuests.encode(param1,local3.hasNewDailyQuests);
this.codec_hasNewWeeklyQuests.encode(param1,local3.hasNewWeeklyQuests);
this.codec_hasNotCompletedQuests.encode(param1,local3.hasNotCompletedQuests);
}
}
}
|
package projects.tanks.clients.fp10.models.tankspartnersmodel.partners.mailru {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.shop.forms.GoToUrlForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.asyncurl.AsyncUrlPayMode;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import flash.external.ExternalInterface;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.partners.impl.mailru.payment.IMailruGamesPaymentModelBase;
import projects.tanks.client.partners.impl.mailru.payment.MailruGamesPaymentModelBase;
[ModelInfo]
public class MailruGamesPaymentModel extends MailruGamesPaymentModelBase implements IMailruGamesPaymentModelBase, AsyncUrlPayMode, ObjectLoadListener, PayModeView, ObjectUnloadListener {
[Inject]
public static var paymentWindowService:PaymentWindowService;
public function MailruGamesPaymentModel() {
super();
}
public function requestAsyncUrl() : void {
server.getPaymentTransaction(paymentWindowService.getChosenItem().id);
}
public function receivePaymentTransaction(param1:String, param2:Number, param3:String) : void {
if(ExternalInterface.available) {
ExternalInterface.call("showMailruPaymentForItem",param1,param2,param3);
}
paymentWindowService.switchToBeginning();
}
public function getView() : PayModeForm {
return PayModeForm(getData(PayModeForm));
}
public function objectLoaded() : void {
putData(PayModeForm,new GoToUrlForm(object));
}
public function objectUnloaded() : void {
this.getView().destroy();
clearData(PayModeForm);
}
}
}
|
package projects.tanks.client.garage.models.item.fitting {
import alternativa.osgi.OSGi;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.types.Long;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
public class ItemFittingModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:ItemFittingModelServer;
private var client:IItemFittingModelBase = IItemFittingModelBase(this);
private var modelId:Long = Long.getLong(882584998,678334280);
public function ItemFittingModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new ItemFittingModelServer(IModel(this));
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
var local3:* = param1;
switch(false ? 0 : 0) {
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.controlpoints.hud.marker {
import alternativa.math.Vector3;
import alternativa.tanks.models.controlpoints.hud.KeyPoint;
import flash.display.Bitmap;
import flash.display.DisplayObject;
import flash.display.PixelSnapping;
import flash.display.Sprite;
import projects.tanks.client.battlefield.models.battle.cp.ControlPointState;
import utils.graphics.SectorMask;
public class KeyPointHUDMarker extends Sprite {
private var keyPoint:KeyPoint;
private var imageBlue:Bitmap;
private var imageRed:Bitmap;
private var sectorMask:SectorMask;
private var score:Number = 0;
private var container:Sprite = new Sprite();
public function KeyPointHUDMarker(param1:KeyPoint) {
super();
this.keyPoint = param1;
this.createImages();
}
private static function createMarkerBitmap(param1:ControlPointState) : Bitmap {
return new Bitmap(MarkerBitmaps.getMarkerBitmapData(param1),PixelSnapping.AUTO,true);
}
private function createImages() : void {
this.imageBlue = createMarkerBitmap(ControlPointState.BLUE);
this.imageRed = createMarkerBitmap(ControlPointState.RED);
addChild(createMarkerBitmap(ControlPointState.NEUTRAL));
addChild(this.container);
this.sectorMask = new SectorMask(this.imageBlue.width);
this.container.addChild(this.sectorMask);
addChild(new Bitmap(MarkerBitmaps.getLetterImage(this.keyPoint.getName().charAt(0))));
this.paintItGray();
}
public function readPosition3D(param1:Vector3) : void {
this.keyPoint.readPosition(param1);
}
public function update() : void {
this.setScore(this.keyPoint.getClientProgress());
}
public function getKeyPoint() : KeyPoint {
return this.keyPoint;
}
private function setScore(param1:Number) : void {
var local2:Number = NaN;
if(param1 < -100) {
param1 = -100;
} else if(param1 > 100) {
param1 = 100;
}
if(this.score != param1) {
if(param1 == 0) {
this.paintItGray();
} else {
local2 = Math.abs(param1) / 100;
this.sectorMask.setProgress(1 - local2,1);
if(param1 < 0) {
this.paintItRed();
} else if(param1 > 0) {
this.paintItBlue();
}
}
this.score = param1;
}
}
private function paintItGray() : void {
this.container.visible = false;
}
private function paintItRed() : void {
this.container.visible = true;
this.swapObjects(this.imageBlue,this.imageRed);
this.container.mask = this.sectorMask;
}
private function paintItBlue() : void {
this.container.visible = true;
this.swapObjects(this.imageRed,this.imageBlue);
this.container.mask = this.sectorMask;
}
private function swapObjects(param1:DisplayObject, param2:DisplayObject) : void {
if(param2.parent == null) {
if(param1.parent != null) {
this.container.removeChild(param1);
}
this.container.addChild(param2);
}
}
}
}
|
package projects.tanks.client.battlefield.models.effects.description {
public interface IEffectDescriptionModelBase {
function activated(param1:int) : void;
function deactivated() : void;
function merged(param1:int) : void;
}
}
|
package _codec.projects.tanks.client.entrance.model.entrance.logging {
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.entrance.model.entrance.logging.RegistrationUXFormAction;
public class VectorCodecRegistrationUXFormActionLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecRegistrationUXFormActionLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new EnumCodecInfo(RegistrationUXFormAction,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.<RegistrationUXFormAction> = new Vector.<RegistrationUXFormAction>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = RegistrationUXFormAction(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:RegistrationUXFormAction = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<RegistrationUXFormAction> = Vector.<RegistrationUXFormAction>(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.battleservice.model.statistics {
import projects.tanks.client.users.services.chatmoderator.ChatModeratorLevel;
public class UserInfo extends UserStat {
private var _chatModeratorLevel:ChatModeratorLevel;
private var _hasPremium:Boolean;
private var _rank:int;
private var _uid:String;
public function UserInfo(param1:ChatModeratorLevel = null, param2:Boolean = false, param3:int = 0, param4:String = null) {
super();
this._chatModeratorLevel = param1;
this._hasPremium = param2;
this._rank = param3;
this._uid = param4;
}
public function get chatModeratorLevel() : ChatModeratorLevel {
return this._chatModeratorLevel;
}
public function set chatModeratorLevel(param1:ChatModeratorLevel) : void {
this._chatModeratorLevel = param1;
}
public function get hasPremium() : Boolean {
return this._hasPremium;
}
public function set hasPremium(param1:Boolean) : void {
this._hasPremium = param1;
}
public function get rank() : int {
return this._rank;
}
public function set rank(param1:int) : void {
this._rank = param1;
}
public function get uid() : String {
return this._uid;
}
public function set uid(param1:String) : void {
this._uid = param1;
}
override public function toString() : String {
var local1:String = "UserInfo [";
local1 += "chatModeratorLevel = " + this.chatModeratorLevel + " ";
local1 += "hasPremium = " + this.hasPremium + " ";
local1 += "rank = " + this.rank + " ";
local1 += "uid = " + this.uid + " ";
local1 += super.toString();
return local1 + "]";
}
}
}
|
package controls.dropdownlist {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/controls.dropdownlist.DropDownButton_buttonUpClass.png")]
public class DropDownButton_buttonUpClass extends BitmapAsset {
public function DropDownButton_buttonUpClass() {
super();
}
}
}
|
package assets.button {
import flash.display.BitmapData;
[Embed(source="/_assets/assets.button.button_red_DOWN_CENTER.png")]
public dynamic class button_red_DOWN_CENTER extends BitmapData {
public function button_red_DOWN_CENTER(param1:int = 201, param2:int = 30) {
super(param1,param2);
}
}
}
|
package com.alternativaplatform.projects.tanks.client.models.battlefield
{
public interface IBattlefieldModelBase
{
}
}
|
package alternativa.physics
{
public class BodyList
{
public var head:BodyListItem;
public var tail:BodyListItem;
public var size:int;
public function BodyList()
{
super();
}
public function append(body:Body) : void
{
var item:BodyListItem = BodyListItem.create(body);
if(this.head == null)
{
this.head = this.tail = item;
}
else
{
this.tail.next = item;
item.prev = this.tail;
this.tail = item;
}
++this.size;
}
public function remove(body:Body) : Boolean
{
var item:BodyListItem = this.findItem(body);
if(item == null)
{
return false;
}
if(item == this.head)
{
if(this.size == 1)
{
this.head = this.tail = null;
}
else
{
this.head = item.next;
this.head.prev = null;
}
}
else if(item == this.tail)
{
this.tail = item.prev;
this.tail.next = null;
}
else
{
item.prev.next = item.next;
item.next.prev = item.prev;
}
item.dispose();
--this.size;
return true;
}
public function findItem(body:Body) : BodyListItem
{
var item:BodyListItem = this.head;
while(item != null && item.body != body)
{
item = item.next;
}
return item;
}
}
}
|
package platform.client.fp10.core.service.address.impl {
import alternativa.osgi.service.launcherparams.ILauncherParams;
import flash.events.Event;
import platform.client.fp10.core.service.address.AddressService;
public class AddressServiceFakeImpl implements AddressService {
[Inject]
public static var launcherParams:ILauncherParams;
public function AddressServiceFakeImpl() {
super();
}
public function back() : void {
}
public function forward() : void {
}
public function up() : void {
}
public function go(param1:int) : void {
}
public function href(param1:String, param2:String = "_self") : void {
}
public function popup(param1:String, param2:String = "popup", param3:String = "\"\"", param4:String = "") : void {
}
public function addEventListener(param1:String, param2:Function, param3:Boolean = false, param4:int = 0, param5:Boolean = false) : void {
}
public function removeEventListener(param1:String, param2:Function) : void {
}
public function dispatchEvent(param1:Event) : Boolean {
return false;
}
public function hasEventListener(param1:String) : Boolean {
return false;
}
public function getBaseURL() : String {
return launcherParams.getParameter("baseurl");
}
public function getStrict() : Boolean {
return false;
}
public function setStrict(param1:Boolean) : void {
}
public function getHistory() : Boolean {
return false;
}
public function setHistory(param1:Boolean) : void {
}
public function getTracker() : String {
return "";
}
public function setTracker(param1:String) : void {
}
public function getTitle() : String {
return "";
}
public function setTitle(param1:String) : void {
}
public function getStatus() : String {
return "";
}
public function setStatus(param1:String) : void {
}
public function resetStatus() : void {
}
public function getValue() : String {
return launcherParams.getParameter("hashparams","");
}
public function setValue(param1:String, param2:Boolean = true) : void {
launcherParams.setParameter("hashparams",param1);
}
public function getPath() : String {
return "";
}
public function getPathNames() : Array {
return [];
}
public function getQueryString() : String {
return "";
}
public function getParameter(param1:String) : String {
return "";
}
public function getQueryParameter(param1:String) : String {
return launcherParams.getParameter(param1,"");
}
public function getParameterNames() : Array {
return [];
}
public function reload() : void {
}
}
}
|
package _codec.projects.tanks.client.entrance.model.users.antiaddiction {
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import projects.tanks.client.entrance.model.users.antiaddiction.ChangeIdNumberResult;
public class CodecChangeIdNumberResult implements ICodec {
public function CodecChangeIdNumberResult() {
super();
}
public function init(param1:IProtocol) : void {
}
public function decode(param1:ProtocolBuffer) : Object {
var local2:ChangeIdNumberResult = null;
var local3:int = int(param1.reader.readInt());
switch(local3) {
case 0:
local2 = ChangeIdNumberResult.OK;
break;
case 1:
local2 = ChangeIdNumberResult.ID_IS_ALREADY_CORRECT;
break;
case 2:
local2 = ChangeIdNumberResult.ID_IS_INCORRECT;
break;
case 3:
local2 = ChangeIdNumberResult.NAME_IS_INCORRECT;
}
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.models.weapon.shaft {
import alternativa.tanks.models.weapon.shaft.states.IShaftState;
public class TransitionNotFoundError extends Error {
public function TransitionNotFoundError(param1:IShaftState, param2:ShaftEventType) {
super("Transition not found (currentState: " + param1 + ", eventType: " + param2);
}
}
}
|
package alternativa.osgi.service.log
{
public class LogLevel
{
public static const LOG_NONE:int = 0;
public static const LOG_TRACE:int = 1;
public static const LOG_DEBUG:int = 2;
public static const LOG_INFO:int = 3;
public static const LOG_WARNING:int = 4;
public static const LOG_ERROR:int = 5;
private static const strings:Array = ["NONE","TRACE","DEBUG","INFO","WARNING","ERROR"];
public function LogLevel()
{
super();
}
public static function toString(level:int) : String
{
return strings[level];
}
}
}
|
package alternativa.tanks.service.battlecreate {
import flash.events.EventDispatcher;
public class BattleCreateFormService extends EventDispatcher implements IBattleCreateFormService {
private var _battleCreationDisabled:Boolean;
public function BattleCreateFormService() {
super();
}
public function showForm() : void {
dispatchEvent(new BattleCreateFormServiceEvent(BattleCreateFormServiceEvent.SHOW_FORM));
}
public function hideForm() : void {
dispatchEvent(new BattleCreateFormServiceEvent(BattleCreateFormServiceEvent.HIDE_FORM));
}
public function get battleCreationDisabled() : Boolean {
return this._battleCreationDisabled;
}
public function set battleCreationDisabled(param1:Boolean) : void {
this._battleCreationDisabled = param1;
}
}
}
|
package _codec.projects.tanks.client.battlefield.models.battle.battlefield {
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.BattlefieldCC;
public class VectorCodecBattlefieldCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecBattlefieldCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(BattlefieldCC,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.<BattlefieldCC> = new Vector.<BattlefieldCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = BattlefieldCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:BattlefieldCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<BattlefieldCC> = Vector.<BattlefieldCC>(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 _codec.projects.tanks.client.battlefield.models.bonus.bonus.notification {
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.bonus.bonus.notification.NotificationBonusCC;
public class VectorCodecNotificationBonusCCLevel1 implements ICodec {
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecNotificationBonusCCLevel1(param1:Boolean) {
super();
this.optionalElement = param1;
}
public function init(param1:IProtocol) : void {
this.elementCodec = param1.getCodec(new TypeCodecInfo(NotificationBonusCC,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.<NotificationBonusCC> = new Vector.<NotificationBonusCC>(local2,true);
var local4:int = 0;
while(local4 < local2) {
local3[local4] = NotificationBonusCC(this.elementCodec.decode(param1));
local4++;
}
return local3;
}
public function encode(param1:ProtocolBuffer, param2:Object) : void {
var local4:NotificationBonusCC = null;
if(param2 == null) {
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var local3:Vector.<NotificationBonusCC> = Vector.<NotificationBonusCC>(param2);
var local5:int = int(local3.length);
LengthCodecHelper.encodeLength(param1,local5);
var local6:int = 0;
while(local6 < local5) {
this.elementCodec.encode(param1,local3[local6]);
local6++;
}
}
}
}
|
package alternativa.tanks.models.battle.assault {
import alternativa.engine3d.core.Camera3D;
import alternativa.engine3d.core.Face;
import alternativa.engine3d.core.Vertex;
import alternativa.engine3d.core.Wrapper;
import alternativa.engine3d.lights.OmniLight;
import alternativa.engine3d.materials.Material;
import alternativa.engine3d.objects.Mesh;
import alternativa.math.Vector3;
import alternativa.tanks.battle.BattleService;
import alternativa.tanks.battle.scene3d.Renderer;
import alternativa.tanks.models.battle.gui.markers.PointIndicatorStateProvider;
import alternativa.tanks.models.controlpoints.hud.KeyPointView;
import alternativa.tanks.models.teamlight.ModeLight;
import alternativa.tanks.models.teamlight.TeamLightColor;
import alternativa.tanks.services.lightingeffects.ILightingEffectsService;
import flash.geom.Point;
import flash.geom.Vector3D;
import projects.tanks.client.battleservice.BattleMode;
import projects.tanks.client.battleservice.model.battle.team.BattleTeam;
public class PointBaseIndicatorPlane extends Mesh implements Renderer {
[Inject]
public static var lightingEffectsService:ILightingEffectsService;
public static const CIRCLE_SIZE:Number = 1000;
private var battleService:BattleService;
private var material:Material;
private var _faces:Vector.<Face>;
private var uvs:Vector.<Point> = new Vector.<Point>();
private var verts:Vector.<Vector3D> = new Vector.<Vector3D>();
private var lightSource:OmniLight;
private var indicatorStateProvider:PointIndicatorStateProvider;
public function PointBaseIndicatorPlane(param1:BattleTeam, param2:Material, param3:BattleService, param4:PointIndicatorStateProvider) {
super();
this.indicatorStateProvider = param4;
this.material = param2;
this.battleService = param3;
useShadowMap = false;
useLight = false;
shadowMapAlphaThreshold = 2;
depthMapAlphaThreshold = 2;
this.createGeometry();
if(param1 != null) {
this.initLight(param1);
}
this.setPosition();
param3.getBattleScene3D().addObjectToExclusion(this);
}
private function createGeometry() : void {
var local1:Vertex = null;
var local2:Vertex = null;
var local3:Vertex = null;
var local4:Number = CIRCLE_SIZE * 0.5;
var local5:Number = CIRCLE_SIZE * 0.5;
this.verts[0] = new Vector3D(0,local5,0);
this.verts[1] = new Vector3D(-local4,0,0);
this.verts[2] = new Vector3D(0,-local5,0);
this.verts[3] = new Vector3D(local4,0,0);
this.uvs[0] = new Point(0.5,-0.5);
this.uvs[1] = new Point(-0.5,0.5);
this.uvs[2] = new Point(0.5,1.5);
this.uvs[3] = new Point(1.5,0.5);
this._faces = new Vector.<Face>();
local1 = this.createVertex(-local4,0,0,-0.5,0.5);
local2 = this.createVertex(0,0,0,0.5,0.5);
local3 = this.createVertex(0,local5,0,0.5,-0.5);
this._faces[0] = this.createFace(local1,local2,local3,this.material);
local1 = this.createVertex(0,-local5,0,0.5,1.5);
local2 = this.createVertex(0,0,0,0.5,0.5);
local3 = this.createVertex(-local4,0,0,-0.5,0.5);
this._faces[1] = this.createFace(local1,local2,local3,this.material);
local1 = this.createVertex(local4,0,0,1.5,0.5);
local2 = this.createVertex(0,0,0,0.5,0.5);
local3 = this.createVertex(0,-local5,0,0.5,1.5);
this._faces[2] = this.createFace(local1,local2,local3,this.material);
local1 = this.createVertex(0,local5,0,0.5,-0.5);
local2 = this.createVertex(0,0,0,0.5,0.5);
local3 = this.createVertex(local4,0,0,1.5,0.5);
this._faces[3] = this.createFace(local1,local2,local3,this.material);
local1 = this.createVertex(0,0,0,0,0);
local2 = this.createVertex(0,0,0,0.5,0.5);
local3 = this.createVertex(0,0,0,0,0);
this._faces[4] = this.createFace(local1,local2,local3,this.material);
}
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.next = vertexList;
vertexList = local6;
return local6;
}
private function createFace(param1:Vertex, param2:Vertex, param3:Vertex, param4:Material) : Face {
var local5:Face = null;
local5 = new Face();
local5.material = param4;
local5.wrapper = new Wrapper();
local5.wrapper.vertex = param1;
local5.wrapper.next = new Wrapper();
local5.wrapper.next.vertex = param2;
local5.wrapper.next.next = new Wrapper();
local5.wrapper.next.next.vertex = param3;
local5.normalX = 0;
local5.normalY = 0;
local5.normalZ = 1;
local5.offset = 0;
local5.next = faceList;
faceList = local5;
return local5;
}
public function updateRotation(param1:Camera3D) : void {
rotationX = param1.rotationX - Math.PI;
rotationY = 0;
rotationZ = param1.rotationZ;
}
public function render(param1:int, param2:int) : void {
visible = this.indicatorStateProvider.isIndicatorActive();
if(Boolean(this.lightSource)) {
this.lightSource.visible = visible;
}
this.setPosition();
this.updateRotation(this.battleService.getBattleScene3D().getCamera());
}
private function setPosition() : void {
var local1:Vector3 = this.indicatorStateProvider.getIndicatorPosition();
x = local1.x;
y = local1.y;
z = local1.z + KeyPointView.CIRCLE_ASCENSION;
if(Boolean(this.lightSource)) {
this.lightSource.x = x;
this.lightSource.y = y;
this.lightSource.z = z;
}
}
private function initLight(param1:BattleTeam) : void {
var local2:ModeLight = lightingEffectsService.getLightForMode(BattleMode.CP);
var local3:TeamLightColor = local2.getLightForTeam(param1);
this.lightSource = new OmniLight(0,local2.getAttenuationBegin(),local2.getAttenuationEnd());
this.lightSource.color = local3.getColor();
this.lightSource.intensity = local3.getIntensity();
this.battleService.getBattleScene3D().addObject(this.lightSource);
}
}
}
|
package alternativa.tanks.servermodels.loginbyhash {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ILoginByHashAdapt implements ILoginByHash {
private var object:IGameObject;
private var impl:ILoginByHash;
public function ILoginByHashAdapt(param1:IGameObject, param2:ILoginByHash) {
super();
this.object = param1;
this.impl = param2;
}
public function loginByHash(param1:String) : void {
var hash:String = param1;
try {
Model.object = this.object;
this.impl.loginByHash(hash);
}
finally {
Model.popObject();
}
}
public function loginBySingleUseHash(param1:String) : void {
var hash:String = param1;
try {
Model.object = this.object;
this.impl.loginBySingleUseHash(hash);
}
finally {
Model.popObject();
}
}
}
}
|
package alternativa.tanks.gui.shop.shopitems.item.licenseclan {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.shop.shopitems.item.AbstractGarageItemShopItemButton;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.clients.fp10.libraries.TanksLocale;
public class LicenseClanButton extends AbstractGarageItemShopItemButton {
[Inject]
public static var localeService:ILocaleService;
public function LicenseClanButton(param1:IGameObject) {
super(param1);
}
override protected function getNameLabelValue(param1:IGameObject) : String {
return localeService.getText(TanksLocale.TEXT_CLAN_LICENSE);
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties {
import alternativa.types.Long;
public class UserProperties {
private var _userId:Long;
private var _userName:String;
private var _score:int;
private var _rank:int;
public function UserProperties(param1:Long, param2:String, param3:int, param4:int) {
super();
this._userId = param1;
this._userName = param2;
this._score = param3;
this._rank = param4;
}
public function get userId() : Long {
return this._userId;
}
public function set userId(param1:Long) : void {
this._userId = param1;
}
public function get userName() : String {
return this._userName;
}
public function set userName(param1:String) : void {
this._userName = param1;
}
public function get score() : int {
return this._score;
}
public function set score(param1:int) : void {
this._score = param1;
}
public function get rank() : int {
return this._rank;
}
public function set rank(param1:int) : void {
this._rank = param1;
}
}
}
|
package alternativa.tanks.model.payment.modes.qiwi {
import alternativa.tanks.gui.payment.forms.PayModeForm;
import alternativa.tanks.gui.payment.forms.qiwi.QiwiForm;
import alternativa.tanks.model.payment.category.PayModeView;
import alternativa.tanks.model.payment.modes.PayUrl;
import alternativa.tanks.model.payment.modes.errors.ErrorDescription;
import alternativa.tanks.model.payment.paymentstate.PaymentWindowService;
import platform.client.fp10.core.model.ObjectLoadListener;
import projects.tanks.client.panel.model.payment.modes.qiwi.CountryPhoneInfo;
import projects.tanks.client.panel.model.payment.modes.qiwi.IQiwiPaymentModelBase;
import projects.tanks.client.panel.model.payment.modes.qiwi.QiwiPaymentModelBase;
import projects.tanks.client.panel.model.payment.types.PaymentRequestUrl;
import projects.tanks.clients.fp10.libraries.tanksservices.model.payment.PayModeProceed;
[ModelInfo]
public class QiwiPaymentModel extends QiwiPaymentModelBase implements IQiwiPaymentModelBase, QiwiPayment, PayModeView, PayModeProceed, ObjectLoadListener {
[Inject]
public static var paymentWindowService:PaymentWindowService;
private var paymentUrl:PaymentRequestUrl;
public function QiwiPaymentModel() {
super();
}
private static function get errorDescription() : ErrorDescription {
return ErrorDescription(object.adapt(ErrorDescription));
}
public function objectLoaded() : void {
putData(PayModeForm,new QiwiForm(object));
}
public function getView() : PayModeForm {
return PayModeForm(this.view);
}
public function getPaymentUrlAsync(param1:String) : void {
server.getPaymentUrl(paymentWindowService.getChosenItem().id,"+" + param1);
}
public function receiveUrl(param1:PaymentRequestUrl) : void {
this.paymentUrl = param1;
this.view.showUrlReceived();
}
public function error() : void {
this.view.activate();
}
public function proceedPayment() : void {
PayUrl(object.adapt(PayUrl)).forceGoToUrl(this.paymentUrl);
}
public function getCountryPhoneInfo() : Vector.<CountryPhoneInfo> {
return getInitParam().countryPhoneCodes;
}
private function get view() : QiwiForm {
return QiwiForm(getData(PayModeForm));
}
}
}
|
package alternativa.tanks.models.weapon.weakening {
import alternativa.tanks.battle.BattleUtils;
import alternativa.tanks.models.weapon.common.IWeaponCommonModel;
import alternativa.tanks.models.weapon.streamweapon.StreamWeaponReconfiguredListener;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.battlefield.models.tankparts.weapon.weakening.IWeaponWeakeningModelBase;
import projects.tanks.client.battlefield.models.tankparts.weapon.weakening.WeaponWeakeningCC;
import projects.tanks.client.battlefield.models.tankparts.weapon.weakening.WeaponWeakeningModelBase;
[ModelInfo]
public class WeaponWeakeningModel extends WeaponWeakeningModelBase implements IWeaponWeakeningModelBase, IWeaponWeakeningModel, ObjectLoadListener {
public function WeaponWeakeningModel() {
super();
}
public function objectLoaded() : void {
var local1:WeaponWeakeningCC = getInitParam();
var local2:WeaponWeakeningData = new WeaponWeakeningData();
local2.maximumDamageRadius = isNaN(local1.maximumDamageRadius) ? 0 : BattleUtils.toClientScale(local1.maximumDamageRadius);
local2.minimumDamageRadius = isNaN(local1.minimumDamageRadius) ? 1 : BattleUtils.toClientScale(local1.minimumDamageRadius);
local2.minimumDamagePercent = isNaN(local1.minimumDamagePercent) ? 0 : local1.minimumDamagePercent;
if(local2.minimumDamagePercent > 100) {
local2.minimumDamagePercent = 100;
}
putData(WeaponWeakeningData,local2);
}
public function getDistanceWeakening() : DistanceWeakening {
var local1:WeaponWeakeningData = WeaponWeakeningData(getData(WeaponWeakeningData));
return new DistanceWeakening(local1.maximumDamageRadius,local1.minimumDamageRadius,local1.minimumDamagePercent);
}
public function reconfigureWeapon(param1:Number, param2:Number) : void {
var local3:WeaponWeakeningData = WeaponWeakeningData(getData(WeaponWeakeningData));
local3.maximumDamageRadius = isNaN(param1) ? 0 : BattleUtils.toClientScale(param1);
local3.minimumDamageRadius = isNaN(param2) ? 1 : BattleUtils.toClientScale(param2);
var local4:IGameObject = IWeaponCommonModel(object.adapt(IWeaponCommonModel)).getTank().user;
StreamWeaponReconfiguredListener(object.event(StreamWeaponReconfiguredListener)).streamWeaponDistanceChanged(local4,local3.minimumDamageRadius);
}
}
}
|
package com.lorentz.SVG.display {
import com.lorentz.SVG.display.base.SVGShape;
import com.lorentz.SVG.drawing.IDrawer;
public class SVGPolyline extends SVGShape {
public function SVGPolyline(){
super("polyline");
}
private var _points:Vector.<String>;
public function get points():Vector.<String> {
return _points;
}
public function set points(value:Vector.<String>):void {
_points = value;
invalidateRender();
}
override protected function drawToDrawer(drawer:IDrawer):void {
if(points.length>2){
drawer.moveTo(Number(points[0]), Number(points[1]));
var i:int = 2;
while(i < points.length - 1)
drawer.lineTo(Number(points[i++]), Number(points[i++]));
}
}
override public function clone():Object {
var c:SVGPolyline = super.clone() as SVGPolyline;
c.points = points.slice();
return c;
}
}
}
|
package projects.tanks.clients.fp10.libraries.tanksservices.service.friend {
import alternativa.types.Long;
import flash.events.IEventDispatcher;
import projects.tanks.clients.fp10.libraries.tanksservices.model.friends.FriendState;
public interface IFriendInfoService extends IEventDispatcher {
function setFriendState(param1:Long, param2:FriendState) : void;
function isFriendsInState(param1:Long, param2:FriendState) : Boolean;
function isNewFriend(param1:Long) : Boolean;
function getFriendsIdByState(param1:FriendState) : Vector.<Long>;
function deleteFriend(param1:Long, param2:FriendState) : void;
function getOrCreateUpdater(param1:Long) : IFriendsInfoLabelUpdater;
function get acceptedFriendsLength() : int;
function get incomingFriendsLength() : int;
function onAddNewAcceptedFriend(param1:Long) : void;
function onRemoveNewAcceptedFriend(param1:Long) : void;
function removeNewAcceptedFriend(param1:Long) : void;
function isNewAcceptedFriend(param1:Long) : Boolean;
function get newAcceptedFriendsLength() : int;
function onAddNewIncomingFriend(param1:Long) : void;
function onRemoveNewIncomingFriend(param1:Long) : void;
function removeNewIncomingFriend(param1:Long) : void;
function isNewIncomingFriend(param1:Long) : Boolean;
function get newIncomingFriendsLength() : int;
}
}
|
package alternativa.tanks.models.battle.gui.inventory {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.models.battle.gui.inventory.HudInventoryIcon_bgdClass.png")]
public class HudInventoryIcon_bgdClass extends BitmapAsset {
public function HudInventoryIcon_bgdClass() {
super();
}
}
}
|
package alternativa.tanks.battle.events {
public class MainLoopExecutionErrorEvent {
public function MainLoopExecutionErrorEvent() {
super();
}
}
}
|
package alternativa.tanks.model.news
{
import mx.core.BitmapAsset;
[ExcludeClass]
public class NewsIcons__8march extends BitmapAsset
{
public function NewsIcons__8march()
{
super();
}
}
}
|
package alternativa.tanks.models.weapon.artillery.sfx {
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class ArtillerySfxAdapt implements ArtillerySfx {
private var object:IGameObject;
private var impl:ArtillerySfx;
public function ArtillerySfxAdapt(param1:IGameObject, param2:ArtillerySfx) {
super();
this.object = param1;
this.impl = param2;
}
public function getSfxData() : ArtillerySfxData {
var result:ArtillerySfxData = null;
try {
Model.object = this.object;
result = this.impl.getSfxData();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.model.matchmaking.grouplifecycle {
import alternativa.tanks.controllers.mainview.MatchmakingGroupEvent;
import alternativa.tanks.service.matchmaking.MatchmakingFormService;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectUnloadListener;
import projects.tanks.client.battleselect.model.matchmaking.grouplifecycle.IMatchmakingGroupLifecycleModelBase;
import projects.tanks.client.battleselect.model.matchmaking.grouplifecycle.MatchmakingGroupLifecycleModelBase;
import projects.tanks.clients.fp10.libraries.tanksservices.service.matchmakinggroup.MatchmakingGroupMembersEvent;
import projects.tanks.clients.fp10.libraries.tanksservices.service.matchmakinggroup.MatchmakingGroupService;
[ModelInfo]
public class MatchmakingGroupLifecycleModel extends MatchmakingGroupLifecycleModelBase implements IMatchmakingGroupLifecycleModelBase, ObjectLoadListener, ObjectUnloadListener {
[Inject]
public static var matchmakingFormService:MatchmakingFormService;
[Inject]
public static var matchmakingGroupService:MatchmakingGroupService;
public function MatchmakingGroupLifecycleModel() {
super();
}
public function objectLoaded() : void {
matchmakingFormService.addEventListener(MatchmakingGroupEvent.CREATE,getFunctionWrapper(this.onCreateGroup));
matchmakingFormService.addEventListener(MatchmakingGroupEvent.LEAVE,getFunctionWrapper(this.onLeaveGroup));
matchmakingGroupService.addEventListener(MatchmakingGroupMembersEvent.REMOVE,getFunctionWrapper(this.onRemoveUser));
}
public function objectUnloaded() : void {
matchmakingFormService.removeEventListener(MatchmakingGroupEvent.CREATE,getFunctionWrapper(this.onCreateGroup));
matchmakingFormService.removeEventListener(MatchmakingGroupEvent.LEAVE,getFunctionWrapper(this.onLeaveGroup));
matchmakingGroupService.removeEventListener(MatchmakingGroupMembersEvent.REMOVE,getFunctionWrapper(this.onRemoveUser));
}
private function onCreateGroup(param1:MatchmakingGroupEvent) : void {
server.createGroup();
}
private function onLeaveGroup(param1:MatchmakingGroupEvent) : void {
server.leaveGroup();
}
private function onRemoveUser(param1:MatchmakingGroupMembersEvent) : void {
server.removeUser(param1.getUserId());
}
}
}
|
package {
import flash.display.MovieClip;
[Embed(source="/_assets/assets.swf", symbol="symbol868")]
public dynamic class ScrollPane_disabledSkin extends MovieClip {
public function ScrollPane_disabledSkin() {
super();
}
}
}
|
package alternativa.tanks.models.panel.create {
import flash.events.Event;
import projects.tanks.client.clans.clan.clanflag.ClanFlag;
public class CreateClanServiceEvent extends Event {
public static const CREATE:String = "CreateClanServiceEvent.CREATE";
public static const VALIDATE_NAME:String = "CreateClanServiceEvent.VALIDATE_NAME";
public static const VALIDATE_TAG:String = "CreateClanServiceEvent.VALIDATE_TAG";
public static const CORRECT_NAME:String = "ValidateClanNameEvent.CORRECT_NAME";
public static const INCORRECT_NAME:String = "ValidateClanNameEvent.INCORRECT_NAME";
public static const CORRECT_TAG:String = "ValidateClanNameEvent.CORRECT_TAG";
public static const INCORRECT_TAG:String = "ValidateClanNameEvent.INCORRECT_TAG";
public static const NOT_UNIQUE_NAME:String = "ValidateClanNameEvent.NOT_UNIQUE_NAME";
public static const NOT_UNIQUE_TAG:String = "ValidateClanNameEvent.NOT_UNIQUE_TAG";
public static const OTHER_ERROR:String = "ValidateClanNameEvent.OTHER_ERROR";
public static const ALREADY_IN_CLAN:String = "ValidateClanNameEvent.ALREADY_IN_CLAN";
public var clanName:String;
public var clanTag:String;
public var description:String;
public var clanFlag:ClanFlag;
public function CreateClanServiceEvent(param1:String, param2:String = "", param3:String = "", param4:String = "", param5:ClanFlag = null, param6:Boolean = false, param7:Boolean = false) {
this.clanName = param2;
this.clanTag = param3;
this.description = param4;
this.clanFlag = param5;
super(param1,param6,param7);
}
}
}
|
package projects.tanks.clients.fp10.Prelauncher.storage {
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
import flash.net.SharedObject;
import projects.tanks.clients.fp10.Prelauncher.Locale;
import projects.tanks.clients.fp10.Prelauncher.LocalesFactory;
import projects.tanks.clients.fp10.Prelauncher.locales.Locales;
public class Storage {
private static const DISPLAY_STATE:String = "display.bin";
private static const LAST_LOCALE:String = "LAST_LOCALE";
private static const LAST_SERVER:String = "LAST_SERVER";
private static const DEFAULT_STATE:DisplayState = new DisplayState(100,100,1024,768,false);
private static var sharedObject:SharedObject = SharedObject.getLocal("launcherStorage");
public function Storage() {
super();
}
private static function getProperty(name:String) : Object {
return sharedObject.data.hasOwnProperty(name) ? sharedObject.data[name] : null;
}
public static function set lastSessionLocale(value:int) : void {
sharedObject.data[LAST_LOCALE] = value;
sharedObject.flush();
}
public static function setBattleServer(value:int) : void {
sharedObject.data[LAST_SERVER] = value;
sharedObject.flush();
}
public static function setDisplayState(x:int, y:int, width:int, height:int, isInFullscreen:Boolean) : void {
var file:File = File.applicationStorageDirectory.resolvePath(DISPLAY_STATE);
var fileStream:FileStream = new FileStream();
try {
fileStream.open(file,FileMode.WRITE);
fileStream.writeInt(x);
fileStream.writeInt(y);
fileStream.writeInt(width);
fileStream.writeInt(height);
fileStream.writeBoolean(isInFullscreen);
fileStream.close();
}
catch(e:Error) {
}
}
public static function getLastSessionLocale(defaultLocale:Locale) : Locale {
var localeIndex:Object = getProperty(LAST_LOCALE);
return localeIndex == null ? defaultLocale : LocalesFactory.getLocale(Locales.list[int(localeIndex)]);
}
public static function getLastBattleServer() : int {
var server:Object = getProperty(LAST_SERVER);
if(server != null) {
delete sharedObject.data[LAST_SERVER];
}
return server == null ? -1 : int(server);
}
public static function getDisplayState() : DisplayState {
var fileStream:FileStream;
var state:DisplayState = null;
var file:File = File.applicationStorageDirectory.resolvePath(DISPLAY_STATE);
if(!file.exists) {
return DEFAULT_STATE;
}
fileStream = new FileStream();
try {
fileStream.open(file,FileMode.READ);
state = new DisplayState(fileStream.readInt(),fileStream.readInt(),fileStream.readInt(),fileStream.readInt(),fileStream.readBoolean());
fileStream.close();
}
catch(e:Error) {
state = DEFAULT_STATE;
}
finally {
return state;
}
}
}
}
|
package projects.tanks.clients.flash.commons.services.notification {
import alternativa.osgi.service.display.IDisplay;
import alternativa.types.Long;
import controls.TankWindow;
import controls.TankWindowInner;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.utils.clearTimeout;
import flash.utils.setTimeout;
import org.osflash.signals.Signal;
import projects.tanks.clients.flash.commons.services.notification.sound.INotificationSoundService;
import projects.tanks.clients.fp10.libraries.tanksservices.utils.removeDisplayObject;
import utils.tweener.TweenLite;
import utils.tweener.easing.Linear;
public class Notification extends Sprite implements INotification {
[Inject]
public static var display:IDisplay;
[Inject]
public static var notificationSoundService:INotificationSoundService;
protected static const GAP:int = 11;
private static const DEFAULT_WIDTH:int = 247;
private static const DEFAULT_HEIGHT:int = 200;
private static const START_POSITION_X:int = 100;
private static const POSITION_Y:int = 34;
private static const SHOW_TIME_IN_SEC:int = 10;
private static const DURATION_SHOW:Number = 0.3;
private static const DURATION_HIDE:Number = 0.3;
protected var _background:TankWindow;
protected var _inner:TankWindowInner;
protected var _width:int;
protected var _height:int;
protected var _innerHeight:int;
private var _closeSignal:Signal;
private var _isShow:Boolean;
private var _delayHideTimeOut:uint;
private var _userId:Long;
private var _message:String;
private var _autoClosable:Boolean;
public function Notification(param1:Long = null, param2:String = "", param3:Boolean = true) {
super();
this._userId = param1;
this._message = param2;
this._autoClosable = param3;
this.init();
}
protected function init() : void {
this._width = DEFAULT_WIDTH;
this._height = DEFAULT_HEIGHT;
this._innerHeight = this._height - GAP * 2;
this.createBackGround();
addEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
}
private function onAddedToStage(param1:Event) : void {
removeEventListener(Event.ADDED_TO_STAGE,this.onAddedToStage);
display.stage.addEventListener(Event.RESIZE,this.onResize);
this.setEvents();
}
protected function setEvents() : void {
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
addEventListener(MouseEvent.ROLL_OVER,this.onRollOver);
addEventListener(MouseEvent.ROLL_OUT,this.onRollOut);
this._background.addEventListener(MouseEvent.CLICK,this.onCloseNotification);
}
private function onRemoveFromStage(param1:Event) : void {
removeEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
display.stage.removeEventListener(Event.RESIZE,this.onResize);
}
private function onResize(param1:Event) : void {
this.resize();
}
private function onRollOver(param1:MouseEvent) : void {
clearTimeout(this._delayHideTimeOut);
}
private function onRollOut(param1:MouseEvent) : void {
this.clearAndSetHideTimeOut();
}
private function onCloseNotification(param1:MouseEvent) : void {
this.closeNotification();
}
protected function closeNotification() : void {
this.hide();
}
protected function removeEvents() : void {
removeEventListener(MouseEvent.ROLL_OVER,this.onRollOver);
removeEventListener(MouseEvent.ROLL_OUT,this.onRollOut);
this._background.removeEventListener(MouseEvent.CLICK,this.onCloseNotification);
}
private function createBackGround() : void {
this._background = new TankWindow();
addChild(this._background);
this._inner = new TankWindowInner(DEFAULT_WIDTH,DEFAULT_HEIGHT,TankWindowInner.GREEN);
addChild(this._inner);
this._inner.mouseChildren = false;
this._inner.mouseEnabled = false;
this._inner.x = this._inner.y = GAP;
this._inner.showBlink = true;
}
public function show(param1:Signal) : void {
this._closeSignal = param1;
this.resize();
this._isShow = true;
display.noticesLayer.addChild(this);
TweenLite.to(this,DURATION_SHOW,{
"x":display.stage.stageWidth - this._width,
"ease":Linear.easeNone,
"onComplete":this.onCompleteShow
});
notificationSoundService.playNotificationSound();
}
private function onCompleteShow() : void {
this.enable = true;
this.setEvents();
this.clearAndSetHideTimeOut();
}
private function clearAndSetHideTimeOut() : void {
if(this._autoClosable) {
clearTimeout(this._delayHideTimeOut);
this._delayHideTimeOut = setTimeout(this.closeNotification,SHOW_TIME_IN_SEC * 1000);
}
}
public function destroy() : void {
this.removeEvents();
clearTimeout(this._delayHideTimeOut);
removeDisplayObject(this);
}
public function hide() : void {
this._isShow = false;
this.enable = false;
this.removeEvents();
clearTimeout(this._delayHideTimeOut);
TweenLite.to(this,DURATION_HIDE,{
"x":display.stage.stageWidth + START_POSITION_X,
"ease":Linear.easeNone,
"onComplete":this.onCompleteHide
});
}
private function onCompleteHide() : void {
removeDisplayObject(this);
this._closeSignal.dispatch();
this._closeSignal = null;
}
protected function resize() : void {
this.resizeBackground();
if(this._isShow) {
this.x = display.stage.stageWidth - this._width;
} else {
this.x = display.stage.stageWidth + START_POSITION_X;
}
this.y = POSITION_Y;
}
private function resizeBackground() : void {
this._background.width = this._width;
this._background.height = this._height;
this._inner.width = this._background.width - GAP * 2;
this._inner.height = this._innerHeight;
}
public function set enable(param1:Boolean) : void {
mouseChildren = param1;
mouseEnabled = param1;
}
public function get userId() : Long {
return this._userId;
}
public function get message() : String {
return this._message;
}
public function set autoClosable(param1:Boolean) : void {
this._autoClosable = param1;
}
}
}
|
package projects.tanks.client.entrance.model.entrance.vkontakte {
public interface IVkontakteEntranceModelBase {
}
}
|
package alternativa.tanks.view.battleinfo.renderer {
import mx.core.BitmapAsset;
[ExcludeClass]
[Embed(source="/_assets/alternativa.tanks.view.battleinfo.renderer.CellRed_cellRedRight.png")]
public class CellRed_cellRedRight extends BitmapAsset {
public function CellRed_cellRedRight() {
super();
}
}
}
|
package projects.tanks.clients.flash.commons.models.runtime {
import alternativa.types.Long;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.type.IGameObject;
public class DataOwnerAdapt implements DataOwner {
private var object:IGameObject;
private var impl:DataOwner;
public function DataOwnerAdapt(param1:IGameObject, param2:DataOwner) {
super();
this.object = param1;
this.impl = param2;
}
public function equals(param1:IGameObject) : Boolean {
var result:Boolean = false;
var object:IGameObject = param1;
try {
Model.object = this.object;
result = Boolean(this.impl.equals(object));
}
finally {
Model.popObject();
}
return result;
}
public function getDataOwnerId() : Long {
var result:Long = null;
try {
Model.object = this.object;
result = this.impl.getDataOwnerId();
}
finally {
Model.popObject();
}
return result;
}
}
}
|
package alternativa.tanks.models.battlefield
{
import alternativa.init.Main;
import alternativa.model.IModel;
import alternativa.model.IObjectLoadListener;
import alternativa.object.ClientObject;
import alternativa.osgi.service.focus.IFocusListener;
import alternativa.osgi.service.focus.IFocusService;
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.service.IModelService;
import alternativa.tanks.help.IHelpService;
import alternativa.tanks.loader.ILoaderWindowService;
import alternativa.tanks.locale.constants.TextConst;
import alternativa.tanks.model.panel.IBattleSettings;
import alternativa.tanks.model.panel.IPanel;
import alternativa.tanks.model.panel.IPanelListener;
import alternativa.tanks.model.panel.PanelModel;
import alternativa.tanks.models.battlefield.event.ExitEvent;
import alternativa.tanks.models.battlefield.gui.IBattlefieldGUI;
import alternativa.tanks.models.battlefield.gui.PauseIndicator;
import alternativa.tanks.models.battlefield.gui.help.ControlsHelper;
import alternativa.tanks.models.battlefield.gui.statistics.field.FieldStatistics;
import alternativa.tanks.models.battlefield.gui.statistics.field.WinkManager;
import alternativa.tanks.models.battlefield.gui.statistics.fps.FPSText;
import alternativa.tanks.models.battlefield.gui.statistics.messages.BattleMessages;
import alternativa.tanks.models.battlefield.gui.statistics.table.TableStatistics;
import alternativa.tanks.models.ctf.CTFModel;
import alternativa.tanks.models.dom.DOMModel;
import alternativa.tanks.models.dom.IDOMModel;
import alternativa.tanks.models.dom.hud.panel.KeyPointsHUDPanel;
import alternativa.tanks.models.tank.ITank;
import alternativa.tanks.models.tank.TankModel;
import com.alternativaplatform.projects.tanks.client.models.ctf.ICaptureTheFlagModelBase;
import controls.lifeindicator.LifeIndicator;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import forms.FocusWarningWindow;
import projects.tanks.client.battlefield.gui.models.statistics.BattleStatInfo;
import projects.tanks.client.battlefield.gui.models.statistics.IStatisticsModelBase;
import projects.tanks.client.battlefield.gui.models.statistics.StatisticsModelBase;
import projects.tanks.client.battlefield.gui.models.statistics.UserStat;
import projects.tanks.client.battleservice.model.team.BattleTeamType;
public class StatisticsModel extends StatisticsModelBase implements IStatisticsModelBase, IObjectLoadListener, IFocusListener, IBattlefieldGUI, IUserStat, IChatListener, IPanelListener
{
public static const LOG_CHANNEL:String = "STAT";
public static const LOG_PREFIX:String = "[StatisticsModel]";
private var battleClientObject:ClientObject;
private var contentLayer:DisplayObjectContainer;
private var modelService:IModelService;
private var teamPlay:Boolean;
private var tableStatistics:TableStatistics;
private var fieldStatistics:FieldStatistics;
private var pointsHUD:KeyPointsHUDPanel;
private var battleMessages:BattleMessages;
private var userStats:Vector.<UserStat>;
private var battleFinished:Boolean = false;
private var loaderWindow:ILoaderWindowService;
private var fpsIndicator:FPSText;
private var controlsHelper:ControlsHelper;
private var localUserId:String;
private var userStatListeners:Vector.<IUserStatListener>;
private var battleName:String;
private var joinMessage:String;
private var leaveMessage:String;
private var lifeIndicator:LifeIndicator;
private var focusWarningIndicator:FocusWarningWindow;
private var pauseIndicator:PauseIndicator;
private var paused:Boolean;
private var bfModel:BattlefieldModel;
private var goldBoxText:String;
private var rubyBoxText:String;
private var spinBoxText:String;
private var prizeBoxText:String;
public function StatisticsModel()
{
this.userStatListeners = new Vector.<IUserStatListener>();
super();
_interfaces.push(IModel,IStatisticsModelBase,IObjectLoadListener,IFocusListener,IBattlefieldGUI,IUserStat,IChatListener,IPanelListener);
this.contentLayer = Main.contentUILayer;
this.fpsIndicator = new FPSText();
WinkManager.init(500);
Main.osgi.registerService(IBattlefieldGUI,this);
this.localUserId = PanelModel(Main.osgi.getService(IPanel)).userName;
}
public function objectLoaded(object:ClientObject) : void
{
this.paused = false;
this.loaderWindow = Main.osgi.getService(ILoaderWindowService) as ILoaderWindowService;
this.loaderWindow.hideLoaderWindow();
this.loaderWindow.lockLoaderWindow();
Main.stage.addEventListener(Event.RESIZE,this.onResize);
var focusService:IFocusService = IFocusService(Main.osgi.getService(IFocusService));
focusService.addFocusListener(this);
var locale:ILocaleService = ILocaleService(Main.osgi.getService(ILocaleService));
this.pauseIndicator = new PauseIndicator(locale.getText(TextConst.BATTLE_PAUSE_ENABLED),locale.getText(TextConst.BATTLE_PAUSE_PRESS_ANY_KEY),locale.getText(TextConst.BATTLE_PAUSE_BATTLE_LEAVE));
this.bfModel = BattlefieldModel(Main.osgi.getService(IBattleField));
this.goldBoxText = locale.getText(TextConst.BATTLE_PLAYER_TAKEN_GOLD_BOX);
this.rubyBoxText = locale.getText(TextConst.BATTLE_PLAYER_TAKEN_RUBY_BOX);
this.spinBoxText = locale.getText(TextConst.BATTLE_PLAYER_TAKEN_SPIN_BOX);
this.prizeBoxText = locale.getText(TextConst.BATTLE_PLAYER_TAKEN_PRIZE_BOX);
this.fpsIndicator.colored = IBattleSettings(Main.osgi.getService(IBattleSettings)).coloredFPS;
}
public function objectUnloaded(object:ClientObject) : void
{
this.showFocusWarning(false);
this.showPauseIndicator(false);
this.pauseIndicator = null;
var focusService:IFocusService = IFocusService(Main.osgi.getService(IFocusService));
focusService.removeFocusListener(this);
Main.stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
Main.stage.removeEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
Main.stage.removeEventListener(Event.RESIZE,this.onResize);
if(this.contentLayer.contains(this.tableStatistics))
{
this.tableStatistics.hide();
this.contentLayer.removeChild(this.tableStatistics);
}
this.removeDisplayObject(this.contentLayer,this.fieldStatistics);
this.removeDisplayObject(this.contentLayer,this.pointsHUD);
this.removeDisplayObject(this.contentLayer,this.battleMessages);
this.removeDisplayObject(this.contentLayer,this.fpsIndicator);
this.removeDisplayObject(this.contentLayer,this.lifeIndicator);
this.lifeIndicator = null;
this.unregisterControlsHelpScreen();
this.loaderWindow.unlockLoaderWindow();
this.battleClientObject = null;
this.userStats = null;
this.battleMessages = null;
}
public function deactivate() : void
{
if(this.battleClientObject == null)
{
return;
}
if(!this.battleFinished)
{
this.tableStatistics.hide();
}
this.doShowPauseIndicator(false);
this.showFocusWarning(true);
}
public function activate() : void
{
if(this.battleClientObject == null)
{
return;
}
this.showFocusWarning(false);
if(this.paused)
{
this.doShowPauseIndicator(true);
}
}
public function focusOut(exfocusedObject:Object) : void
{
}
public function focusIn(focusedObject:Object) : void
{
}
public function initObject(clientObject:ClientObject, battleName:String) : void
{
this.battleName = battleName;
var locale:ILocaleService = ILocaleService(Main.osgi.getService(ILocaleService));
this.joinMessage = locale.getText(TextConst.BATTLE_PLAYER_JOINED);
this.leaveMessage = locale.getText(TextConst.BATTLE_PLAYER_LEFT);
this.userStatListeners.push(TankModel(Main.osgi.getService(ITank)));
}
public function init(clientObject:ClientObject, initData:BattleStatInfo, userStats:Array) : void
{
var battleType:BattleType = null;
var userStat:UserStat = null;
var ctfModel:CTFModel = null;
var domModel:DOMModel = null;
this.battleClientObject = clientObject;
this.teamPlay = initData.teamPlay;
this.userStats = Vector.<UserStat>(userStats);
this.battleFinished = false;
this.tableStatistics = new TableStatistics(this.battleName,this.teamPlay);
this.contentLayer.addChild(this.tableStatistics);
if(this.teamPlay)
{
ctfModel = CTFModel(Main.osgi.getService(ICaptureTheFlagModelBase));
domModel = DOMModel(Main.osgi.getService(IDOMModel));
battleType = ctfModel != null ? BattleType.CTF : (domModel != null ? BattleType.DOM : BattleType.TDM);
}
else
{
battleType = BattleType.DM;
}
this.fieldStatistics = new FieldStatistics(this.localUserId,initData,this.userStats,battleType);
this.contentLayer.addChild(this.fieldStatistics);
this.fieldStatistics.adjustFields();
this.battleMessages = new BattleMessages();
this.contentLayer.addChild(this.battleMessages);
this.registerControlsHelpScreen();
var settings:IBattleSettings = IBattleSettings(Main.osgi.getService(IBattleSettings));
if(settings.showFPS)
{
this.contentLayer.addChild(this.fpsIndicator);
}
Main.stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
Main.stage.addEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
for each(userStat in this.userStats)
{
this.dispatchStatChange(userStat);
}
this.objectLoaded(clientObject);
this.onResize(null);
}
public function createPointsHUD(HUDPanel:KeyPointsHUDPanel) : void
{
this.pointsHUD = HUDPanel;
this.contentLayer.addChild(this.pointsHUD);
}
public function updatePointsHUD() : void
{
this.pointsHUD.update();
}
public function setBattleState(clientObject:ClientObject) : void
{
}
public function changeUserTeam(clientObject:ClientObject, userId:String, teamType:BattleTeamType) : void
{
var userStat:UserStat = this.getUserStatByID(userId);
if(userStat != null)
{
this.tableStatistics.removePlayer(userId,userStat.teamType);
userStat.teamType = teamType;
this.tableStatistics.updatePlayer(userStat);
}
}
public function userConnect(clientObject:ClientObject, userId:String, teamType:BattleTeamType, name:String, rank:int) : void
{
var userStat:UserStat = new UserStat(0,0,name,rank,0,0,teamType,name);
this.userStats.push(userStat);
this.battleMessages.addMessage(userStat,this.joinMessage);
this.tableStatistics.updatePlayer(userStat);
this.dispatchStatChange(userStat);
}
public function userDisconnect(clientObject:ClientObject, userId:String) : void
{
var idx:int = this.getUserIndexByID(userId);
if(idx < 0)
{
return;
}
var userStat:UserStat = this.userStats[idx];
if(!this.battleFinished)
{
this.tableStatistics.removePlayer(userId,userStat.teamType);
}
this.battleMessages.addMessage(userStat,this.leaveMessage);
this.userStats.splice(idx,1);
}
public function fundChange(clientObject:ClientObject, fund:int) : void
{
if(this.fieldStatistics == null)
{
return;
}
this.fieldStatistics.updateFund(fund);
this.onResize(null);
}
public function finish(clientObject:ClientObject, users:Array, timeToRestart:int) : void
{
if(this.tableStatistics != null)
{
this.tableStatistics.hide();
this.tableStatistics.addEventListener(ExitEvent.EXIT,this.onExit);
this.tableStatistics.show(this.localUserId,Vector.<UserStat>(users),true,timeToRestart);
}
this.battleFinished = true;
if(this.fieldStatistics != null)
{
this.fieldStatistics.finish();
}
}
public function restart(clientObject:ClientObject, newTimeLimit:int) : void
{
var userStat:UserStat = null;
this.tableStatistics.hide();
this.tableStatistics.removeEventListener(ExitEvent.EXIT,this.onExit);
this.fieldStatistics.timeLimit = newTimeLimit;
this.fieldStatistics.resetFields();
this.battleFinished = false;
var len:int = this.userStats.length;
for(var i:int = 0; i < len; i++)
{
userStat = this.userStats[i];
userStat.deaths = 0;
userStat.kills = 0;
userStat.score = 0;
}
}
public function changeTeamScore(clientObject:ClientObject, teamType:BattleTeamType, score:int) : void
{
if(this.battleClientObject == null)
{
return;
}
this.fieldStatistics.setTeamScore(teamType,score);
this.onResize(null);
}
public function changeUsersStat(clientObject:ClientObject, userStats:Array) : void
{
var userStat:UserStat = null;
var localUserStat:UserStat = null;
if(userStats == null)
{
return;
}
var len:int = userStats.length;
for(var i:int = 0; i < len; i++)
{
userStat = userStats[i];
localUserStat = this.getUserStatByID(userStat.userId);
if(localUserStat != null)
{
localUserStat.score = userStat.score;
localUserStat.kills = userStat.kills;
localUserStat.deaths = userStat.deaths;
localUserStat.rank = userStat.rank;
if(!this.battleFinished)
{
this.tableStatistics.updatePlayer(localUserStat);
}
this.fieldStatistics.updateUserKills(userStat);
this.dispatchStatChange(userStat);
}
}
}
public function logUserAction(param1:String, param2:String, param3:String = null) : void
{
var _loc6_:uint = 0;
var _loc4_:UserStat = this.getUserStatByID(param1);
var _loc5_:UserStat = param3 == null ? null : this.getUserStatByID(param3);
if(param2.indexOf("спин ящик") != -1 || param2.indexOf("spin box") != -1)
{
_loc6_ = !!this.bfModel.spectatorMode ? uint(16562432) : (param1 == this.localUserId ? uint(CTFModel.COLOR_POSITIVE) : uint(CTFModel.COLOR_NEGATIVE));
this.bfModel.messages.addMessage(_loc6_,param1 + " " + this.spinBoxText);
}
if(param2.indexOf("подарочный ящик") != -1 || param2.indexOf("prize box") != -1)
{
_loc6_ = !!this.bfModel.spectatorMode ? uint(16562432) : (param1 == this.localUserId ? uint(CTFModel.COLOR_POSITIVE) : uint(CTFModel.COLOR_NEGATIVE));
this.bfModel.messages.addMessage(_loc6_,param1 + " " + this.prizeBoxText);
}
if(param2.indexOf("рубиновый ящик") != -1 || param2.indexOf("ruby box") != -1)
{
_loc6_ = !!this.bfModel.spectatorMode ? uint(16562432) : (param1 == this.localUserId ? uint(CTFModel.COLOR_POSITIVE) : uint(CTFModel.COLOR_NEGATIVE));
this.bfModel.messages.addMessage(_loc6_,param1 + " " + this.rubyBoxText);
}
if(param2.indexOf("золотой ящик") != -1 || param2.indexOf("gold box") != -1)
{
_loc6_ = !!this.bfModel.spectatorMode ? uint(16562432) : (param1 == this.localUserId ? uint(CTFModel.COLOR_POSITIVE) : uint(CTFModel.COLOR_NEGATIVE));
this.bfModel.messages.addMessage(_loc6_,param1 + " " + this.goldBoxText);
this.battleMessages.addMessage(_loc4_,this.goldBoxText);
}
else
{
this.battleMessages.addMessage(_loc4_,param2,_loc5_);
}
}
public function logAction(actionText:String, targetUserId:String = null) : void
{
var targetUserStat:UserStat = targetUserId == null ? null : this.getUserStatByID(targetUserId);
this.battleMessages.addMessage(null,actionText,targetUserStat);
}
public function ctfShowFlagAtBase(teamType:BattleTeamType) : void
{
if(this.fieldStatistics != null)
{
this.fieldStatistics.ctfShowFlagAtBase(teamType);
}
}
public function ctfShowFlagCarried(teamType:BattleTeamType) : void
{
if(this.fieldStatistics != null)
{
this.fieldStatistics.ctfShowFlagCarried(teamType);
}
}
public function ctfShowFlagDropped(teamType:BattleTeamType) : void
{
if(this.fieldStatistics != null)
{
this.fieldStatistics.ctfShowFlagDropped(teamType);
}
}
public function updateHealthIndicator(health:Number) : void
{
if(this.lifeIndicator != null)
{
this.lifeIndicator.life = health;
}
}
public function updateWeaponIndicator(weaponStatus:Number) : void
{
if(this.lifeIndicator != null)
{
this.lifeIndicator.charge = weaponStatus;
}
}
public function showPauseIndicator(show:Boolean) : void
{
if(this.paused == show)
{
return;
}
this.paused = show;
this.doShowPauseIndicator(show);
}
public function setPauseTimeout(seconds:int) : void
{
if(this.pauseIndicator != null)
{
this.pauseIndicator.seconds = seconds;
}
}
public function getUserName(userId:String) : String
{
var userStat:UserStat = this.getUserStatByID(userId);
return userStat == null ? "Unknown " + userId.toString() : userStat.name;
}
public function getUserRank(userId:String) : int
{
var userStat:UserStat = this.getUserStatByID(userId);
return userStat == null ? int(int(-1)) : int(int(userStat.rank));
}
public function addUserStatListener(listener:IUserStatListener) : void
{
var idx:int = this.userStatListeners.indexOf(listener);
if(idx > -1)
{
return;
}
this.userStatListeners.push(listener);
}
public function removeUserStatListener(listener:IUserStatListener) : void
{
var idx:int = this.userStatListeners.indexOf(listener);
if(idx < 0)
{
return;
}
this.userStatListeners.splice(idx,1);
}
public function chatOpened() : void
{
this.hideScores();
}
public function chatClosed() : void
{
}
public function bugReportOpened() : void
{
}
public function bugReportClosed() : void
{
}
public function friendsOpened() : void
{
}
public function friendsClosed() : void
{
}
public function onCloseGame() : void
{
}
public function onCloseGameExit() : void
{
}
public function settingsAccepted() : void
{
var settings:IBattleSettings = IBattleSettings(Main.osgi.getService(IBattleSettings));
if(settings.showFPS)
{
this.contentLayer.addChild(this.fpsIndicator);
this.fpsIndicator.colored = settings.coloredFPS;
}
else
{
this.removeDisplayObject(this.contentLayer,this.fpsIndicator);
}
}
public function settingsCanceled() : void
{
}
public function settingsOpened() : void
{
}
public function setMuteSound(mute:Boolean) : void
{
}
private function onExit(e:ExitEvent) : void
{
this.exit(this.battleClientObject);
var panel:PanelModel = Main.osgi.getService(IPanel) as PanelModel;
panel.lock();
panel.showBattleSelect(null,false);
}
private function exit(battle:ClientObject) : void
{
}
private function onKeyDown(e:KeyboardEvent) : void
{
if(e.keyCode == Keyboard.TAB && !this.battleFinished)
{
this.showScores();
}
}
private function onKeyUp(e:KeyboardEvent) : void
{
if(e.keyCode == Keyboard.TAB && !this.battleFinished)
{
this.hideScores();
}
}
private function showScores() : void
{
if(this.battleFinished)
{
return;
}
this.tableStatistics.show(this.localUserId,this.userStats,false,0);
}
private function hideScores() : void
{
if(this.battleFinished && this.tableStatistics == null)
{
return;
}
if(this.battleFinished)
{
return;
}
if(this.tableStatistics != null)
{
this.tableStatistics.hide();
}
}
private function getUserIndexByID(userId:String) : int
{
var i:int = 0;
if(this.userStats != null)
{
for(i = this.userStats.length - 1; i >= 0; i--)
{
if(UserStat(this.userStats[i]).userId == userId)
{
return i;
}
}
}
return -1;
}
private function getUserStatByID(userId:String) : UserStat
{
var i:int = 0;
var userStat:UserStat = null;
if(this.userStats != null)
{
for(i = this.userStats.length - 1; i >= 0; i--)
{
userStat = this.userStats[i];
if(userStat.userId == userId)
{
return userStat;
}
}
}
return null;
}
private function registerControlsHelpScreen() : void
{
if(this.controlsHelper == null)
{
this.controlsHelper = new ControlsHelper();
}
var helpService:IHelpService = Main.osgi.getService(IHelpService) as IHelpService;
helpService.registerHelper(ControlsHelper.GROUP_ID,ControlsHelper.HELPER_ID,this.controlsHelper,true);
}
private function unregisterControlsHelpScreen() : void
{
var helpService:IHelpService = Main.osgi.getService(IHelpService) as IHelpService;
helpService.unregisterHelper(ControlsHelper.GROUP_ID,ControlsHelper.HELPER_ID);
}
private function dispatchStatChange(userStat:UserStat) : void
{
for(var i:int = this.userStatListeners.length - 1; i >= 0; i--)
{
IUserStatListener(this.userStatListeners[i]).userStatChanged(userStat.userId,userStat.name,userStat.rank);
}
}
private function removeDisplayObject(container:DisplayObjectContainer, object:DisplayObject) : void
{
if(object != null && container.contains(object))
{
container.removeChild(object);
}
}
private function onResize(e:Event) : void
{
var sw:int = Main.stage.stageWidth;
var sh:int = Main.stage.stageHeight;
if(this.lifeIndicator != null)
{
this.lifeIndicator.x = 260;
this.lifeIndicator.y = Main.stage.stageHeight - 50;
}
if(this.focusWarningIndicator != null)
{
this.focusWarningIndicator.x = sw >> 1;
this.focusWarningIndicator.y = sh >> 1;
}
if(this.pauseIndicator != null && this.pauseIndicator.parent != null)
{
this.pauseIndicator.x = sw - this.pauseIndicator.width >> 1;
this.pauseIndicator.y = sh - this.pauseIndicator.height >> 1;
}
if(this.pointsHUD != null)
{
this.pointsHUD.x = this.fieldStatistics.getPositionX() - this.pointsHUD.width - 10;
this.pointsHUD.y = this.fieldStatistics.getPositionY();
}
}
private function showFocusWarning(show:Boolean) : void
{
if(show)
{
if(this.focusWarningIndicator == null)
{
this.focusWarningIndicator = new FocusWarningWindow();
this.focusWarningIndicator.mouseEnabled = false;
this.focusWarningIndicator.mouseChildren = false;
}
Main.stage.addChild(this.focusWarningIndicator);
this.onResize(null);
}
else if(this.focusWarningIndicator != null && this.focusWarningIndicator.parent != null)
{
this.focusWarningIndicator.parent.removeChild(this.focusWarningIndicator);
}
}
private function doShowPauseIndicator(show:Boolean) : void
{
if(show)
{
if(this.focusWarningIndicator == null || this.focusWarningIndicator.parent == null && this.pauseIndicator != null)
{
Main.stage.addChild(this.pauseIndicator);
this.onResize(null);
}
}
else if(this.pauseIndicator != null && this.pauseIndicator.parent != null)
{
this.pauseIndicator.parent.removeChild(this.pauseIndicator);
}
}
}
}
|
package projects.tanks.client.battlefield.models.user.speedcharacteristics {
import alternativa.osgi.OSGi;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import alternativa.types.Long;
import alternativa.types.Short;
import platform.client.fp10.core.model.IModel;
import platform.client.fp10.core.model.impl.Model;
import platform.client.fp10.core.registry.ModelRegistry;
public class SpeedCharacteristicsModelBase extends Model {
private var _protocol:IProtocol = IProtocol(OSGi.getInstance().getService(IProtocol));
protected var server:SpeedCharacteristicsModelServer;
private var client:ISpeedCharacteristicsModelBase = ISpeedCharacteristicsModelBase(this);
private var modelId:Long = Long.getLong(1667805908,-902263720);
private var _setSpecificationId:Long = Long.getLong(2130096710,1381807086);
private var _setSpecification_maxSpeedCodec:ICodec;
private var _setSpecification_maxTurnSpeedCodec:ICodec;
private var _setSpecification_maxTurretRotationSpeedCodec:ICodec;
private var _setSpecification_accelerationCodec:ICodec;
private var _setSpecification_specificationIdCodec:ICodec;
private var _setSpecification_immediatelyCodec:ICodec;
public function SpeedCharacteristicsModelBase() {
super();
this.initCodecs();
}
protected function initCodecs() : void {
this.server = new SpeedCharacteristicsModelServer(IModel(this));
var local1:ModelRegistry = ModelRegistry(OSGi.getInstance().getService(ModelRegistry));
local1.registerModelConstructorCodec(this.modelId,this._protocol.getCodec(new TypeCodecInfo(SpeedCharacteristicsCC,false)));
this._setSpecification_maxSpeedCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._setSpecification_maxTurnSpeedCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._setSpecification_maxTurretRotationSpeedCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._setSpecification_accelerationCodec = this._protocol.getCodec(new TypeCodecInfo(Float,false));
this._setSpecification_specificationIdCodec = this._protocol.getCodec(new TypeCodecInfo(Short,false));
this._setSpecification_immediatelyCodec = this._protocol.getCodec(new TypeCodecInfo(Boolean,false));
}
protected function getInitParam() : SpeedCharacteristicsCC {
return SpeedCharacteristicsCC(initParams[Model.object]);
}
override public function invoke(param1:Long, param2:ProtocolBuffer) : void {
switch(param1) {
case this._setSpecificationId:
this.client.setSpecification(Number(this._setSpecification_maxSpeedCodec.decode(param2)),Number(this._setSpecification_maxTurnSpeedCodec.decode(param2)),Number(this._setSpecification_maxTurretRotationSpeedCodec.decode(param2)),Number(this._setSpecification_accelerationCodec.decode(param2)),int(this._setSpecification_specificationIdCodec.decode(param2)),Boolean(this._setSpecification_immediatelyCodec.decode(param2)));
}
}
override public function get id() : Long {
return this.modelId;
}
}
}
|
package alternativa.tanks.models.user {
import alternativa.osgi.service.locale.ILocaleService;
import alternativa.tanks.gui.clanmanagement.clanmemberlist.ISearchInput;
import alternativa.tanks.gui.clanmanagement.clanmemberlist.ISourceData;
import alternativa.tanks.models.service.ClanService;
import alternativa.types.Long;
import platform.client.fp10.core.model.ObjectLoadListener;
import platform.client.fp10.core.model.ObjectLoadPostListener;
import platform.client.fp10.core.type.IGameObject;
import projects.tanks.client.clans.user.ClanUserModelBase;
import projects.tanks.client.clans.user.IClanUserModelBase;
import projects.tanks.clients.fp10.libraries.TanksLocale;
import projects.tanks.clients.fp10.libraries.tanksservices.service.clan.ClanUserInfoService;
import projects.tanks.clients.fp10.libraries.tanksservices.service.userproperties.IUserPropertiesService;
[ModelInfo]
public class ClanUserModel extends ClanUserModelBase implements IClanUserModelBase, IClanUserModel, ObjectLoadListener, ObjectLoadPostListener, ISourceData {
[Inject]
public static var clanUserService:ClanUserService;
[Inject]
public static var clanService:ClanService;
[Inject]
public static var clanUserInfoService:ClanUserInfoService;
[Inject]
public static var userPropertiesService:IUserPropertiesService;
[Inject]
public static var localeService:ILocaleService;
private static const CLAN_NAME_PATTERN:String = "%CLANNAME%";
private var _searchInput:ISearchInput;
public function ClanUserModel() {
super();
}
public function objectLoaded() : void {
if(!getInitParam().loadingInServiceSpace) {
return;
}
clanUserService.userObject = object;
clanUserInfoService.restrictionTime = getInitParam().restrictionTimeJoinClanInSec;
clanUserInfoService.clanMember = getInitParam().clan;
clanUserInfoService.giveBonusesClan = getInitParam().giveBonusesClan;
clanUserService.otherClan = getInitParam().showOtherClan;
clanUserService.showBuyLicenseButton = getInitParam().showBuyLicenseButton;
}
public function loadingInServiceSpace() : Boolean {
return getInitParam().loadingInServiceSpace;
}
public function objectLoadedPost() : void {
clanUserInfoService.selfClan = !getInitParam().showOtherClan;
if(!getInitParam().loadingInServiceSpace) {
return;
}
}
public function leftClan(param1:int) : void {
clanUserInfoService.clanMember = false;
if(clanService.clanManagementPanel != null) {
clanService.clanManagementPanel.destroy();
}
clanUserInfoService.restrictionTime = param1;
}
public function alreadyInAccepted(param1:String) : void {
}
public function rejectAll() : void {
server.rejectAll();
}
public function revoke(param1:IGameObject) : void {
server.revoke(param1);
}
public function reject(param1:IGameObject) : void {
server.reject(param1);
}
public function addInClan(param1:IGameObject) : void {
server.add(param1);
}
public function acceptRequest(param1:IGameObject) : void {
server.accept(param1);
}
public function accept(param1:Long) : void {
var local2:IGameObject = object.space.getObject(param1);
server.accept(local2);
}
public function addByUid(param1:String) : void {
server.addInClanByName(param1);
}
public function checkUid(param1:String) : void {
server.checkClanName(param1);
}
public function setSearchInput(param1:ISearchInput) : void {
this._searchInput = param1;
}
public function clanExist() : void {
this._searchInput.onUidExist();
}
public function clanNotExist() : void {
this._searchInput.onUidNotExist();
}
public function userLowRank() : void {
var local1:String = localeService.getText(TanksLocale.TEXT_CLAN_YOUR_RANK_TOO_LOW);
this._searchInput.onUserLowRank(local1);
}
public function clanBlocked() : void {
var local1:String = localeService.getText(TanksLocale.TEXT_CLAN_BLOCK);
this._searchInput.clanBlocked(local1);
}
public function clanIncomingRequestDisabled() : void {
var local1:String = localeService.getText(TanksLocale.TEXT_CLAN_DOES_NOT_ACDEPT_REQUEST);
this._searchInput.incomingRequestDisabled(local1);
}
public function alreadyInIncoming(param1:String, param2:IGameObject) : void {
var local3:String = localeService.getText(TanksLocale.TEXT_CLAN_IS_ALREADY_IN_INVITE_LIST);
local3 = local3.replace(CLAN_NAME_PATTERN,param1);
this._searchInput.onAlreadyInIncoming(param2.id,local3);
}
public function alreadyInOutgoing(param1:String) : void {
var local2:String = localeService.getText(TanksLocale.TEXT_CLAN_IS_ALREADY_IN_REQUEST_LIST);
local2 = local2.replace(CLAN_NAME_PATTERN,param1);
this._searchInput.onAlreadyInOutgoing(local2);
}
public function acceptedIntoClan(param1:IGameObject) : void {
}
public function creatorLeaveOfClanIfEmptyClan() : void {
}
public function alreadyInClan() : void {
var local1:String = localeService.getText(TanksLocale.TEXT_CLAN_YOU_ALREADY_IN_CLAN);
this._searchInput.onAlreadyInClan(local1);
}
public function alreadyInClanOutgoing(param1:String, param2:IGameObject) : void {
var local3:String = localeService.getText(TanksLocale.TEXT_CLAN_IS_ALREADY_IN_REQUEST_LIST);
local3 = local3.replace(CLAN_NAME_PATTERN,param1);
this._searchInput.onAlreadyInOutgoing(local3);
}
public function joinClan() : void {
if(clanService.notInClanPanel != null) {
clanService.notInClanPanel.destroy();
}
clanUserInfoService.clanMember = true;
}
public function removeClanBonuses() : void {
clanUserInfoService.giveBonusesClan = false;
}
public function updateStatusBonusesClan(param1:Boolean) : void {
clanUserInfoService.giveBonusesClan = param1;
}
public function showAlertFullClan() : void {
clanService.notInClanPanel.showAlertFullClan();
}
}
}
|
package {
import flash.display.MovieClip;
[Embed(source="/_assets/assets.swf", symbol="symbol826")]
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
public function ScrollArrowUp_upSkin() {
super();
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.